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

13176 lines
488 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package dataflow provides access to the Dataflow API.
  6. //
  7. // For product documentation, see: https://cloud.google.com/dataflow
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/dataflow/v1b3"
  14. // ...
  15. // ctx := context.Background()
  16. // dataflowService, err := dataflow.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // dataflowService, err := dataflow.NewService(ctx, option.WithScopes(dataflow.UserinfoEmailScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // dataflowService, err := dataflow.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // dataflowService, err := dataflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package dataflow // import "google.golang.org/api/dataflow/v1b3"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "dataflow:v1b3"
  71. const apiName = "dataflow"
  72. const apiVersion = "v1b3"
  73. const basePath = "https://dataflow.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your data across Google Cloud Platform services
  77. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  78. // View and manage your Google Compute Engine resources
  79. ComputeScope = "https://www.googleapis.com/auth/compute"
  80. // View your Google Compute Engine resources
  81. ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
  82. // View your email address
  83. UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
  84. )
  85. // NewService creates a new Service.
  86. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  87. scopesOption := option.WithScopes(
  88. "https://www.googleapis.com/auth/cloud-platform",
  89. "https://www.googleapis.com/auth/compute",
  90. "https://www.googleapis.com/auth/compute.readonly",
  91. "https://www.googleapis.com/auth/userinfo.email",
  92. )
  93. // NOTE: prepend, so we don't override user-specified scopes.
  94. opts = append([]option.ClientOption{scopesOption}, opts...)
  95. client, endpoint, err := htransport.NewClient(ctx, opts...)
  96. if err != nil {
  97. return nil, err
  98. }
  99. s, err := New(client)
  100. if err != nil {
  101. return nil, err
  102. }
  103. if endpoint != "" {
  104. s.BasePath = endpoint
  105. }
  106. return s, nil
  107. }
  108. // New creates a new Service. It uses the provided http.Client for requests.
  109. //
  110. // Deprecated: please use NewService instead.
  111. // To provide a custom HTTP client, use option.WithHTTPClient.
  112. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  113. func New(client *http.Client) (*Service, error) {
  114. if client == nil {
  115. return nil, errors.New("client is nil")
  116. }
  117. s := &Service{client: client, BasePath: basePath}
  118. s.Projects = NewProjectsService(s)
  119. return s, nil
  120. }
  121. type Service struct {
  122. client *http.Client
  123. BasePath string // API endpoint base URL
  124. UserAgent string // optional additional User-Agent fragment
  125. Projects *ProjectsService
  126. }
  127. func (s *Service) userAgent() string {
  128. if s.UserAgent == "" {
  129. return googleapi.UserAgent
  130. }
  131. return googleapi.UserAgent + " " + s.UserAgent
  132. }
  133. func NewProjectsService(s *Service) *ProjectsService {
  134. rs := &ProjectsService{s: s}
  135. rs.Jobs = NewProjectsJobsService(s)
  136. rs.Locations = NewProjectsLocationsService(s)
  137. rs.Templates = NewProjectsTemplatesService(s)
  138. return rs
  139. }
  140. type ProjectsService struct {
  141. s *Service
  142. Jobs *ProjectsJobsService
  143. Locations *ProjectsLocationsService
  144. Templates *ProjectsTemplatesService
  145. }
  146. func NewProjectsJobsService(s *Service) *ProjectsJobsService {
  147. rs := &ProjectsJobsService{s: s}
  148. rs.Debug = NewProjectsJobsDebugService(s)
  149. rs.Messages = NewProjectsJobsMessagesService(s)
  150. rs.WorkItems = NewProjectsJobsWorkItemsService(s)
  151. return rs
  152. }
  153. type ProjectsJobsService struct {
  154. s *Service
  155. Debug *ProjectsJobsDebugService
  156. Messages *ProjectsJobsMessagesService
  157. WorkItems *ProjectsJobsWorkItemsService
  158. }
  159. func NewProjectsJobsDebugService(s *Service) *ProjectsJobsDebugService {
  160. rs := &ProjectsJobsDebugService{s: s}
  161. return rs
  162. }
  163. type ProjectsJobsDebugService struct {
  164. s *Service
  165. }
  166. func NewProjectsJobsMessagesService(s *Service) *ProjectsJobsMessagesService {
  167. rs := &ProjectsJobsMessagesService{s: s}
  168. return rs
  169. }
  170. type ProjectsJobsMessagesService struct {
  171. s *Service
  172. }
  173. func NewProjectsJobsWorkItemsService(s *Service) *ProjectsJobsWorkItemsService {
  174. rs := &ProjectsJobsWorkItemsService{s: s}
  175. return rs
  176. }
  177. type ProjectsJobsWorkItemsService struct {
  178. s *Service
  179. }
  180. func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
  181. rs := &ProjectsLocationsService{s: s}
  182. rs.Jobs = NewProjectsLocationsJobsService(s)
  183. rs.Templates = NewProjectsLocationsTemplatesService(s)
  184. return rs
  185. }
  186. type ProjectsLocationsService struct {
  187. s *Service
  188. Jobs *ProjectsLocationsJobsService
  189. Templates *ProjectsLocationsTemplatesService
  190. }
  191. func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService {
  192. rs := &ProjectsLocationsJobsService{s: s}
  193. rs.Debug = NewProjectsLocationsJobsDebugService(s)
  194. rs.Messages = NewProjectsLocationsJobsMessagesService(s)
  195. rs.WorkItems = NewProjectsLocationsJobsWorkItemsService(s)
  196. return rs
  197. }
  198. type ProjectsLocationsJobsService struct {
  199. s *Service
  200. Debug *ProjectsLocationsJobsDebugService
  201. Messages *ProjectsLocationsJobsMessagesService
  202. WorkItems *ProjectsLocationsJobsWorkItemsService
  203. }
  204. func NewProjectsLocationsJobsDebugService(s *Service) *ProjectsLocationsJobsDebugService {
  205. rs := &ProjectsLocationsJobsDebugService{s: s}
  206. return rs
  207. }
  208. type ProjectsLocationsJobsDebugService struct {
  209. s *Service
  210. }
  211. func NewProjectsLocationsJobsMessagesService(s *Service) *ProjectsLocationsJobsMessagesService {
  212. rs := &ProjectsLocationsJobsMessagesService{s: s}
  213. return rs
  214. }
  215. type ProjectsLocationsJobsMessagesService struct {
  216. s *Service
  217. }
  218. func NewProjectsLocationsJobsWorkItemsService(s *Service) *ProjectsLocationsJobsWorkItemsService {
  219. rs := &ProjectsLocationsJobsWorkItemsService{s: s}
  220. return rs
  221. }
  222. type ProjectsLocationsJobsWorkItemsService struct {
  223. s *Service
  224. }
  225. func NewProjectsLocationsTemplatesService(s *Service) *ProjectsLocationsTemplatesService {
  226. rs := &ProjectsLocationsTemplatesService{s: s}
  227. return rs
  228. }
  229. type ProjectsLocationsTemplatesService struct {
  230. s *Service
  231. }
  232. func NewProjectsTemplatesService(s *Service) *ProjectsTemplatesService {
  233. rs := &ProjectsTemplatesService{s: s}
  234. return rs
  235. }
  236. type ProjectsTemplatesService struct {
  237. s *Service
  238. }
  239. // ApproximateProgress: Obsolete in favor of ApproximateReportedProgress
  240. // and ApproximateSplitRequest.
  241. type ApproximateProgress struct {
  242. // PercentComplete: Obsolete.
  243. PercentComplete float64 `json:"percentComplete,omitempty"`
  244. // Position: Obsolete.
  245. Position *Position `json:"position,omitempty"`
  246. // RemainingTime: Obsolete.
  247. RemainingTime string `json:"remainingTime,omitempty"`
  248. // ForceSendFields is a list of field names (e.g. "PercentComplete") to
  249. // unconditionally include in API requests. By default, fields with
  250. // empty values are omitted from API requests. However, any non-pointer,
  251. // non-interface field appearing in ForceSendFields will be sent to the
  252. // server regardless of whether the field is empty or not. This may be
  253. // used to include empty fields in Patch requests.
  254. ForceSendFields []string `json:"-"`
  255. // NullFields is a list of field names (e.g. "PercentComplete") to
  256. // include in API requests with the JSON null value. By default, fields
  257. // with empty values are omitted from API requests. However, any field
  258. // with an empty value appearing in NullFields will be sent to the
  259. // server as null. It is an error if a field in this list has a
  260. // non-empty value. This may be used to include null fields in Patch
  261. // requests.
  262. NullFields []string `json:"-"`
  263. }
  264. func (s *ApproximateProgress) MarshalJSON() ([]byte, error) {
  265. type NoMethod ApproximateProgress
  266. raw := NoMethod(*s)
  267. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  268. }
  269. func (s *ApproximateProgress) UnmarshalJSON(data []byte) error {
  270. type NoMethod ApproximateProgress
  271. var s1 struct {
  272. PercentComplete gensupport.JSONFloat64 `json:"percentComplete"`
  273. *NoMethod
  274. }
  275. s1.NoMethod = (*NoMethod)(s)
  276. if err := json.Unmarshal(data, &s1); err != nil {
  277. return err
  278. }
  279. s.PercentComplete = float64(s1.PercentComplete)
  280. return nil
  281. }
  282. // ApproximateReportedProgress: A progress measurement of a WorkItem by
  283. // a worker.
  284. type ApproximateReportedProgress struct {
  285. // ConsumedParallelism: Total amount of parallelism in the portion of
  286. // input of this task that has
  287. // already been consumed and is no longer active. In the first two
  288. // examples
  289. // above (see remaining_parallelism), the value should be 29 or
  290. // 2
  291. // respectively. The sum of remaining_parallelism and
  292. // consumed_parallelism
  293. // should equal the total amount of parallelism in this work item.
  294. // If
  295. // specified, must be finite.
  296. ConsumedParallelism *ReportedParallelism `json:"consumedParallelism,omitempty"`
  297. // FractionConsumed: Completion as fraction of the input consumed, from
  298. // 0.0 (beginning, nothing
  299. // consumed), to 1.0 (end of the input, entire input consumed).
  300. FractionConsumed float64 `json:"fractionConsumed,omitempty"`
  301. // Position: A Position within the work to represent a progress.
  302. Position *Position `json:"position,omitempty"`
  303. // RemainingParallelism: Total amount of parallelism in the input of
  304. // this task that remains,
  305. // (i.e. can be delegated to this task and any new tasks via
  306. // dynamic
  307. // splitting). Always at least 1 for non-finished work items and 0
  308. // for
  309. // finished.
  310. //
  311. // "Amount of parallelism" refers to how many non-empty parts of the
  312. // input
  313. // can be read in parallel. This does not necessarily equal number
  314. // of records. An input that can be read in parallel down to
  315. // the
  316. // individual records is called "perfectly splittable".
  317. // An example of non-perfectly parallelizable input is a
  318. // block-compressed
  319. // file format where a block of records has to be read as a whole,
  320. // but different blocks can be read in parallel.
  321. //
  322. // Examples:
  323. // * If we are processing record #30 (starting at 1) out of 50 in a
  324. // perfectly
  325. // splittable 50-record input, this value should be 21 (20 remaining +
  326. // 1
  327. // current).
  328. // * If we are reading through block 3 in a block-compressed file
  329. // consisting
  330. // of 5 blocks, this value should be 3 (since blocks 4 and 5 can be
  331. // processed in parallel by new tasks via dynamic splitting and the
  332. // current
  333. // task remains processing block 3).
  334. // * If we are reading through the last block in a block-compressed
  335. // file,
  336. // or reading or processing the last record in a perfectly splittable
  337. // input, this value should be 1, because apart from the current task,
  338. // no
  339. // additional remainder can be split off.
  340. RemainingParallelism *ReportedParallelism `json:"remainingParallelism,omitempty"`
  341. // ForceSendFields is a list of field names (e.g. "ConsumedParallelism")
  342. // to unconditionally include in API requests. By default, fields with
  343. // empty values are omitted from API requests. However, any non-pointer,
  344. // non-interface field appearing in ForceSendFields will be sent to the
  345. // server regardless of whether the field is empty or not. This may be
  346. // used to include empty fields in Patch requests.
  347. ForceSendFields []string `json:"-"`
  348. // NullFields is a list of field names (e.g. "ConsumedParallelism") to
  349. // include in API requests with the JSON null value. By default, fields
  350. // with empty values are omitted from API requests. However, any field
  351. // with an empty value appearing in NullFields will be sent to the
  352. // server as null. It is an error if a field in this list has a
  353. // non-empty value. This may be used to include null fields in Patch
  354. // requests.
  355. NullFields []string `json:"-"`
  356. }
  357. func (s *ApproximateReportedProgress) MarshalJSON() ([]byte, error) {
  358. type NoMethod ApproximateReportedProgress
  359. raw := NoMethod(*s)
  360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  361. }
  362. func (s *ApproximateReportedProgress) UnmarshalJSON(data []byte) error {
  363. type NoMethod ApproximateReportedProgress
  364. var s1 struct {
  365. FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"`
  366. *NoMethod
  367. }
  368. s1.NoMethod = (*NoMethod)(s)
  369. if err := json.Unmarshal(data, &s1); err != nil {
  370. return err
  371. }
  372. s.FractionConsumed = float64(s1.FractionConsumed)
  373. return nil
  374. }
  375. // ApproximateSplitRequest: A suggestion by the service to the worker to
  376. // dynamically split the WorkItem.
  377. type ApproximateSplitRequest struct {
  378. // FractionConsumed: A fraction at which to split the work item, from
  379. // 0.0 (beginning of the
  380. // input) to 1.0 (end of the input).
  381. FractionConsumed float64 `json:"fractionConsumed,omitempty"`
  382. // FractionOfRemainder: The fraction of the remainder of work to split
  383. // the work item at, from 0.0
  384. // (split at the current position) to 1.0 (end of the input).
  385. FractionOfRemainder float64 `json:"fractionOfRemainder,omitempty"`
  386. // Position: A Position at which to split the work item.
  387. Position *Position `json:"position,omitempty"`
  388. // ForceSendFields is a list of field names (e.g. "FractionConsumed") to
  389. // unconditionally include in API requests. By default, fields with
  390. // empty values are omitted from API requests. However, any non-pointer,
  391. // non-interface field appearing in ForceSendFields will be sent to the
  392. // server regardless of whether the field is empty or not. This may be
  393. // used to include empty fields in Patch requests.
  394. ForceSendFields []string `json:"-"`
  395. // NullFields is a list of field names (e.g. "FractionConsumed") to
  396. // include in API requests with the JSON null value. By default, fields
  397. // with empty values are omitted from API requests. However, any field
  398. // with an empty value appearing in NullFields will be sent to the
  399. // server as null. It is an error if a field in this list has a
  400. // non-empty value. This may be used to include null fields in Patch
  401. // requests.
  402. NullFields []string `json:"-"`
  403. }
  404. func (s *ApproximateSplitRequest) MarshalJSON() ([]byte, error) {
  405. type NoMethod ApproximateSplitRequest
  406. raw := NoMethod(*s)
  407. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  408. }
  409. func (s *ApproximateSplitRequest) UnmarshalJSON(data []byte) error {
  410. type NoMethod ApproximateSplitRequest
  411. var s1 struct {
  412. FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"`
  413. FractionOfRemainder gensupport.JSONFloat64 `json:"fractionOfRemainder"`
  414. *NoMethod
  415. }
  416. s1.NoMethod = (*NoMethod)(s)
  417. if err := json.Unmarshal(data, &s1); err != nil {
  418. return err
  419. }
  420. s.FractionConsumed = float64(s1.FractionConsumed)
  421. s.FractionOfRemainder = float64(s1.FractionOfRemainder)
  422. return nil
  423. }
  424. // AutoscalingEvent: A structured message reporting an autoscaling
  425. // decision made by the Dataflow
  426. // service.
  427. type AutoscalingEvent struct {
  428. // CurrentNumWorkers: The current number of workers the job has.
  429. CurrentNumWorkers int64 `json:"currentNumWorkers,omitempty,string"`
  430. // Description: A message describing why the system decided to adjust
  431. // the current
  432. // number of workers, why it failed, or why the system decided to
  433. // not make any changes to the number of workers.
  434. Description *StructuredMessage `json:"description,omitempty"`
  435. // EventType: The type of autoscaling event to report.
  436. //
  437. // Possible values:
  438. // "TYPE_UNKNOWN" - Default type for the enum. Value should never be
  439. // returned.
  440. // "TARGET_NUM_WORKERS_CHANGED" - The TARGET_NUM_WORKERS_CHANGED type
  441. // should be used when the target
  442. // worker pool size has changed at the start of an actuation. An
  443. // event
  444. // should always be specified as TARGET_NUM_WORKERS_CHANGED if it
  445. // reflects
  446. // a change in the target_num_workers.
  447. // "CURRENT_NUM_WORKERS_CHANGED" - The CURRENT_NUM_WORKERS_CHANGED
  448. // type should be used when actual worker
  449. // pool size has been changed, but the target_num_workers has not
  450. // changed.
  451. // "ACTUATION_FAILURE" - The ACTUATION_FAILURE type should be used
  452. // when we want to report
  453. // an error to the user indicating why the current number of workers
  454. // in the pool could not be changed.
  455. // Displayed in the current status and history widgets.
  456. // "NO_CHANGE" - Used when we want to report to the user a reason why
  457. // we are
  458. // not currently adjusting the number of workers.
  459. // Should specify both target_num_workers, current_num_workers and
  460. // a
  461. // decision_message.
  462. EventType string `json:"eventType,omitempty"`
  463. // TargetNumWorkers: The target number of workers the worker pool wants
  464. // to resize to use.
  465. TargetNumWorkers int64 `json:"targetNumWorkers,omitempty,string"`
  466. // Time: The time this event was emitted to indicate a new target or
  467. // current
  468. // num_workers value.
  469. Time string `json:"time,omitempty"`
  470. // WorkerPool: A short and friendly name for the worker pool this event
  471. // refers to,
  472. // populated from the value of PoolStageRelation::user_pool_name.
  473. WorkerPool string `json:"workerPool,omitempty"`
  474. // ForceSendFields is a list of field names (e.g. "CurrentNumWorkers")
  475. // to unconditionally include in API requests. By default, fields with
  476. // empty values are omitted from API requests. However, any non-pointer,
  477. // non-interface field appearing in ForceSendFields will be sent to the
  478. // server regardless of whether the field is empty or not. This may be
  479. // used to include empty fields in Patch requests.
  480. ForceSendFields []string `json:"-"`
  481. // NullFields is a list of field names (e.g. "CurrentNumWorkers") to
  482. // include in API requests with the JSON null value. By default, fields
  483. // with empty values are omitted from API requests. However, any field
  484. // with an empty value appearing in NullFields will be sent to the
  485. // server as null. It is an error if a field in this list has a
  486. // non-empty value. This may be used to include null fields in Patch
  487. // requests.
  488. NullFields []string `json:"-"`
  489. }
  490. func (s *AutoscalingEvent) MarshalJSON() ([]byte, error) {
  491. type NoMethod AutoscalingEvent
  492. raw := NoMethod(*s)
  493. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  494. }
  495. // AutoscalingSettings: Settings for WorkerPool autoscaling.
  496. type AutoscalingSettings struct {
  497. // Algorithm: The algorithm to use for autoscaling.
  498. //
  499. // Possible values:
  500. // "AUTOSCALING_ALGORITHM_UNKNOWN" - The algorithm is unknown, or
  501. // unspecified.
  502. // "AUTOSCALING_ALGORITHM_NONE" - Disable autoscaling.
  503. // "AUTOSCALING_ALGORITHM_BASIC" - Increase worker count over time to
  504. // reduce job execution time.
  505. Algorithm string `json:"algorithm,omitempty"`
  506. // MaxNumWorkers: The maximum number of workers to cap scaling at.
  507. MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"`
  508. // ForceSendFields is a list of field names (e.g. "Algorithm") to
  509. // unconditionally include in API requests. By default, fields with
  510. // empty values are omitted from API requests. However, any non-pointer,
  511. // non-interface field appearing in ForceSendFields will be sent to the
  512. // server regardless of whether the field is empty or not. This may be
  513. // used to include empty fields in Patch requests.
  514. ForceSendFields []string `json:"-"`
  515. // NullFields is a list of field names (e.g. "Algorithm") to include in
  516. // API requests with the JSON null value. By default, fields with empty
  517. // values are omitted from API requests. However, any field with an
  518. // empty value appearing in NullFields will be sent to the server as
  519. // null. It is an error if a field in this list has a non-empty value.
  520. // This may be used to include null fields in Patch requests.
  521. NullFields []string `json:"-"`
  522. }
  523. func (s *AutoscalingSettings) MarshalJSON() ([]byte, error) {
  524. type NoMethod AutoscalingSettings
  525. raw := NoMethod(*s)
  526. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  527. }
  528. // BigQueryIODetails: Metadata for a BigQuery connector used by the job.
  529. type BigQueryIODetails struct {
  530. // Dataset: Dataset accessed in the connection.
  531. Dataset string `json:"dataset,omitempty"`
  532. // ProjectId: Project accessed in the connection.
  533. ProjectId string `json:"projectId,omitempty"`
  534. // Query: Query used to access data in the connection.
  535. Query string `json:"query,omitempty"`
  536. // Table: Table accessed in the connection.
  537. Table string `json:"table,omitempty"`
  538. // ForceSendFields is a list of field names (e.g. "Dataset") to
  539. // unconditionally include in API requests. By default, fields with
  540. // empty values are omitted from API requests. However, any non-pointer,
  541. // non-interface field appearing in ForceSendFields will be sent to the
  542. // server regardless of whether the field is empty or not. This may be
  543. // used to include empty fields in Patch requests.
  544. ForceSendFields []string `json:"-"`
  545. // NullFields is a list of field names (e.g. "Dataset") to include in
  546. // API requests with the JSON null value. By default, fields with empty
  547. // values are omitted from API requests. However, any field with an
  548. // empty value appearing in NullFields will be sent to the server as
  549. // null. It is an error if a field in this list has a non-empty value.
  550. // This may be used to include null fields in Patch requests.
  551. NullFields []string `json:"-"`
  552. }
  553. func (s *BigQueryIODetails) MarshalJSON() ([]byte, error) {
  554. type NoMethod BigQueryIODetails
  555. raw := NoMethod(*s)
  556. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  557. }
  558. // BigTableIODetails: Metadata for a BigTable connector used by the job.
  559. type BigTableIODetails struct {
  560. // InstanceId: InstanceId accessed in the connection.
  561. InstanceId string `json:"instanceId,omitempty"`
  562. // ProjectId: ProjectId accessed in the connection.
  563. ProjectId string `json:"projectId,omitempty"`
  564. // TableId: TableId accessed in the connection.
  565. TableId string `json:"tableId,omitempty"`
  566. // ForceSendFields is a list of field names (e.g. "InstanceId") to
  567. // unconditionally include in API requests. By default, fields with
  568. // empty values are omitted from API requests. However, any non-pointer,
  569. // non-interface field appearing in ForceSendFields will be sent to the
  570. // server regardless of whether the field is empty or not. This may be
  571. // used to include empty fields in Patch requests.
  572. ForceSendFields []string `json:"-"`
  573. // NullFields is a list of field names (e.g. "InstanceId") to include in
  574. // API requests with the JSON null value. By default, fields with empty
  575. // values are omitted from API requests. However, any field with an
  576. // empty value appearing in NullFields will be sent to the server as
  577. // null. It is an error if a field in this list has a non-empty value.
  578. // This may be used to include null fields in Patch requests.
  579. NullFields []string `json:"-"`
  580. }
  581. func (s *BigTableIODetails) MarshalJSON() ([]byte, error) {
  582. type NoMethod BigTableIODetails
  583. raw := NoMethod(*s)
  584. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  585. }
  586. // CPUTime: Modeled after information exposed by /proc/stat.
  587. type CPUTime struct {
  588. // Rate: Average CPU utilization rate (% non-idle cpu / second) since
  589. // previous
  590. // sample.
  591. Rate float64 `json:"rate,omitempty"`
  592. // Timestamp: Timestamp of the measurement.
  593. Timestamp string `json:"timestamp,omitempty"`
  594. // TotalMs: Total active CPU time across all cores (ie., non-idle) in
  595. // milliseconds
  596. // since start-up.
  597. TotalMs uint64 `json:"totalMs,omitempty,string"`
  598. // ForceSendFields is a list of field names (e.g. "Rate") to
  599. // unconditionally include in API requests. By default, fields with
  600. // empty values are omitted from API requests. However, any non-pointer,
  601. // non-interface field appearing in ForceSendFields will be sent to the
  602. // server regardless of whether the field is empty or not. This may be
  603. // used to include empty fields in Patch requests.
  604. ForceSendFields []string `json:"-"`
  605. // NullFields is a list of field names (e.g. "Rate") to include in API
  606. // requests with the JSON null value. By default, fields with empty
  607. // values are omitted from API requests. However, any field with an
  608. // empty value appearing in NullFields will be sent to the server as
  609. // null. It is an error if a field in this list has a non-empty value.
  610. // This may be used to include null fields in Patch requests.
  611. NullFields []string `json:"-"`
  612. }
  613. func (s *CPUTime) MarshalJSON() ([]byte, error) {
  614. type NoMethod CPUTime
  615. raw := NoMethod(*s)
  616. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  617. }
  618. func (s *CPUTime) UnmarshalJSON(data []byte) error {
  619. type NoMethod CPUTime
  620. var s1 struct {
  621. Rate gensupport.JSONFloat64 `json:"rate"`
  622. *NoMethod
  623. }
  624. s1.NoMethod = (*NoMethod)(s)
  625. if err := json.Unmarshal(data, &s1); err != nil {
  626. return err
  627. }
  628. s.Rate = float64(s1.Rate)
  629. return nil
  630. }
  631. // ComponentSource: Description of an interstitial value between
  632. // transforms in an execution
  633. // stage.
  634. type ComponentSource struct {
  635. // Name: Dataflow service generated name for this source.
  636. Name string `json:"name,omitempty"`
  637. // OriginalTransformOrCollection: User name for the original user
  638. // transform or collection with which this
  639. // source is most closely associated.
  640. OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"`
  641. // UserName: Human-readable name for this transform; may be user or
  642. // system generated.
  643. UserName string `json:"userName,omitempty"`
  644. // ForceSendFields is a list of field names (e.g. "Name") to
  645. // unconditionally include in API requests. By default, fields with
  646. // empty values are omitted from API requests. However, any non-pointer,
  647. // non-interface field appearing in ForceSendFields will be sent to the
  648. // server regardless of whether the field is empty or not. This may be
  649. // used to include empty fields in Patch requests.
  650. ForceSendFields []string `json:"-"`
  651. // NullFields is a list of field names (e.g. "Name") to include in API
  652. // requests with the JSON null value. By default, fields with empty
  653. // values are omitted from API requests. However, any field with an
  654. // empty value appearing in NullFields will be sent to the server as
  655. // null. It is an error if a field in this list has a non-empty value.
  656. // This may be used to include null fields in Patch requests.
  657. NullFields []string `json:"-"`
  658. }
  659. func (s *ComponentSource) MarshalJSON() ([]byte, error) {
  660. type NoMethod ComponentSource
  661. raw := NoMethod(*s)
  662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  663. }
  664. // ComponentTransform: Description of a transform executed as part of an
  665. // execution stage.
  666. type ComponentTransform struct {
  667. // Name: Dataflow service generated name for this source.
  668. Name string `json:"name,omitempty"`
  669. // OriginalTransform: User name for the original user transform with
  670. // which this transform is
  671. // most closely associated.
  672. OriginalTransform string `json:"originalTransform,omitempty"`
  673. // UserName: Human-readable name for this transform; may be user or
  674. // system generated.
  675. UserName string `json:"userName,omitempty"`
  676. // ForceSendFields is a list of field names (e.g. "Name") to
  677. // unconditionally include in API requests. By default, fields with
  678. // empty values are omitted from API requests. However, any non-pointer,
  679. // non-interface field appearing in ForceSendFields will be sent to the
  680. // server regardless of whether the field is empty or not. This may be
  681. // used to include empty fields in Patch requests.
  682. ForceSendFields []string `json:"-"`
  683. // NullFields is a list of field names (e.g. "Name") to include in API
  684. // requests with the JSON null value. By default, fields with empty
  685. // values are omitted from API requests. However, any field with an
  686. // empty value appearing in NullFields will be sent to the server as
  687. // null. It is an error if a field in this list has a non-empty value.
  688. // This may be used to include null fields in Patch requests.
  689. NullFields []string `json:"-"`
  690. }
  691. func (s *ComponentTransform) MarshalJSON() ([]byte, error) {
  692. type NoMethod ComponentTransform
  693. raw := NoMethod(*s)
  694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  695. }
  696. // ComputationTopology: All configuration data for a particular
  697. // Computation.
  698. type ComputationTopology struct {
  699. // ComputationId: The ID of the computation.
  700. ComputationId string `json:"computationId,omitempty"`
  701. // Inputs: The inputs to the computation.
  702. Inputs []*StreamLocation `json:"inputs,omitempty"`
  703. // KeyRanges: The key ranges processed by the computation.
  704. KeyRanges []*KeyRangeLocation `json:"keyRanges,omitempty"`
  705. // Outputs: The outputs from the computation.
  706. Outputs []*StreamLocation `json:"outputs,omitempty"`
  707. // StateFamilies: The state family values.
  708. StateFamilies []*StateFamilyConfig `json:"stateFamilies,omitempty"`
  709. // SystemStageName: The system stage name.
  710. SystemStageName string `json:"systemStageName,omitempty"`
  711. // ForceSendFields is a list of field names (e.g. "ComputationId") to
  712. // unconditionally include in API requests. By default, fields with
  713. // empty values are omitted from API requests. However, any non-pointer,
  714. // non-interface field appearing in ForceSendFields will be sent to the
  715. // server regardless of whether the field is empty or not. This may be
  716. // used to include empty fields in Patch requests.
  717. ForceSendFields []string `json:"-"`
  718. // NullFields is a list of field names (e.g. "ComputationId") to include
  719. // in API requests with the JSON null value. By default, fields with
  720. // empty values are omitted from API requests. However, any field with
  721. // an empty value appearing in NullFields will be sent to the server as
  722. // null. It is an error if a field in this list has a non-empty value.
  723. // This may be used to include null fields in Patch requests.
  724. NullFields []string `json:"-"`
  725. }
  726. func (s *ComputationTopology) MarshalJSON() ([]byte, error) {
  727. type NoMethod ComputationTopology
  728. raw := NoMethod(*s)
  729. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  730. }
  731. // ConcatPosition: A position that encapsulates an inner position and an
  732. // index for the inner
  733. // position. A ConcatPosition can be used by a reader of a source
  734. // that
  735. // encapsulates a set of other sources.
  736. type ConcatPosition struct {
  737. // Index: Index of the inner source.
  738. Index int64 `json:"index,omitempty"`
  739. // Position: Position within the inner source.
  740. Position *Position `json:"position,omitempty"`
  741. // ForceSendFields is a list of field names (e.g. "Index") to
  742. // unconditionally include in API requests. By default, fields with
  743. // empty values are omitted from API requests. However, any non-pointer,
  744. // non-interface field appearing in ForceSendFields will be sent to the
  745. // server regardless of whether the field is empty or not. This may be
  746. // used to include empty fields in Patch requests.
  747. ForceSendFields []string `json:"-"`
  748. // NullFields is a list of field names (e.g. "Index") to include in API
  749. // requests with the JSON null value. By default, fields with empty
  750. // values are omitted from API requests. However, any field with an
  751. // empty value appearing in NullFields will be sent to the server as
  752. // null. It is an error if a field in this list has a non-empty value.
  753. // This may be used to include null fields in Patch requests.
  754. NullFields []string `json:"-"`
  755. }
  756. func (s *ConcatPosition) MarshalJSON() ([]byte, error) {
  757. type NoMethod ConcatPosition
  758. raw := NoMethod(*s)
  759. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  760. }
  761. // CounterMetadata: CounterMetadata includes all static non-name
  762. // non-value counter attributes.
  763. type CounterMetadata struct {
  764. // Description: Human-readable description of the counter semantics.
  765. Description string `json:"description,omitempty"`
  766. // Kind: Counter aggregation kind.
  767. //
  768. // Possible values:
  769. // "INVALID" - Counter aggregation kind was not set.
  770. // "SUM" - Aggregated value is the sum of all contributed values.
  771. // "MAX" - Aggregated value is the max of all contributed values.
  772. // "MIN" - Aggregated value is the min of all contributed values.
  773. // "MEAN" - Aggregated value is the mean of all contributed values.
  774. // "OR" - Aggregated value represents the logical 'or' of all
  775. // contributed values.
  776. // "AND" - Aggregated value represents the logical 'and' of all
  777. // contributed values.
  778. // "SET" - Aggregated value is a set of unique contributed values.
  779. // "DISTRIBUTION" - Aggregated value captures statistics about a
  780. // distribution.
  781. // "LATEST_VALUE" - Aggregated value tracks the latest value of a
  782. // variable.
  783. Kind string `json:"kind,omitempty"`
  784. // OtherUnits: A string referring to the unit type.
  785. OtherUnits string `json:"otherUnits,omitempty"`
  786. // StandardUnits: System defined Units, see above enum.
  787. //
  788. // Possible values:
  789. // "BYTES" - Counter returns a value in bytes.
  790. // "BYTES_PER_SEC" - Counter returns a value in bytes per second.
  791. // "MILLISECONDS" - Counter returns a value in milliseconds.
  792. // "MICROSECONDS" - Counter returns a value in microseconds.
  793. // "NANOSECONDS" - Counter returns a value in nanoseconds.
  794. // "TIMESTAMP_MSEC" - Counter returns a timestamp in milliseconds.
  795. // "TIMESTAMP_USEC" - Counter returns a timestamp in microseconds.
  796. // "TIMESTAMP_NSEC" - Counter returns a timestamp in nanoseconds.
  797. StandardUnits string `json:"standardUnits,omitempty"`
  798. // ForceSendFields is a list of field names (e.g. "Description") to
  799. // unconditionally include in API requests. By default, fields with
  800. // empty values are omitted from API requests. However, any non-pointer,
  801. // non-interface field appearing in ForceSendFields will be sent to the
  802. // server regardless of whether the field is empty or not. This may be
  803. // used to include empty fields in Patch requests.
  804. ForceSendFields []string `json:"-"`
  805. // NullFields is a list of field names (e.g. "Description") to include
  806. // in API requests with the JSON null value. By default, fields with
  807. // empty values are omitted from API requests. However, any field with
  808. // an empty value appearing in NullFields will be sent to the server as
  809. // null. It is an error if a field in this list has a non-empty value.
  810. // This may be used to include null fields in Patch requests.
  811. NullFields []string `json:"-"`
  812. }
  813. func (s *CounterMetadata) MarshalJSON() ([]byte, error) {
  814. type NoMethod CounterMetadata
  815. raw := NoMethod(*s)
  816. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  817. }
  818. // CounterStructuredName: Identifies a counter within a per-job
  819. // namespace. Counters whose structured
  820. // names are the same get merged into a single value for the job.
  821. type CounterStructuredName struct {
  822. // ComponentStepName: Name of the optimized step being executed by the
  823. // workers.
  824. ComponentStepName string `json:"componentStepName,omitempty"`
  825. // ExecutionStepName: Name of the stage. An execution step contains
  826. // multiple component steps.
  827. ExecutionStepName string `json:"executionStepName,omitempty"`
  828. // InputIndex: Index of an input collection that's being read
  829. // from/written to as a side
  830. // input.
  831. // The index identifies a step's side inputs starting by 1 (e.g. the
  832. // first
  833. // side input has input_index 1, the third has input_index 3).
  834. // Side inputs are identified by a pair of (original_step_name,
  835. // input_index).
  836. // This field helps uniquely identify them.
  837. InputIndex int64 `json:"inputIndex,omitempty"`
  838. // Name: Counter name. Not necessarily globally-unique, but unique
  839. // within the
  840. // context of the other fields.
  841. // Required.
  842. Name string `json:"name,omitempty"`
  843. // Origin: One of the standard Origins defined above.
  844. //
  845. // Possible values:
  846. // "SYSTEM" - Counter was created by the Dataflow system.
  847. // "USER" - Counter was created by the user.
  848. Origin string `json:"origin,omitempty"`
  849. // OriginNamespace: A string containing a more specific namespace of the
  850. // counter's origin.
  851. OriginNamespace string `json:"originNamespace,omitempty"`
  852. // OriginalRequestingStepName: The step name requesting an operation,
  853. // such as GBK.
  854. // I.e. the ParDo causing a read/write from shuffle to occur, or a
  855. // read from side inputs.
  856. OriginalRequestingStepName string `json:"originalRequestingStepName,omitempty"`
  857. // OriginalStepName: System generated name of the original step in the
  858. // user's graph, before
  859. // optimization.
  860. OriginalStepName string `json:"originalStepName,omitempty"`
  861. // Portion: Portion of this counter, either key or value.
  862. //
  863. // Possible values:
  864. // "ALL" - Counter portion has not been set.
  865. // "KEY" - Counter reports a key.
  866. // "VALUE" - Counter reports a value.
  867. Portion string `json:"portion,omitempty"`
  868. // WorkerId: ID of a particular worker.
  869. WorkerId string `json:"workerId,omitempty"`
  870. // ForceSendFields is a list of field names (e.g. "ComponentStepName")
  871. // to unconditionally include in API requests. By default, fields with
  872. // empty values are omitted from API requests. However, any non-pointer,
  873. // non-interface field appearing in ForceSendFields will be sent to the
  874. // server regardless of whether the field is empty or not. This may be
  875. // used to include empty fields in Patch requests.
  876. ForceSendFields []string `json:"-"`
  877. // NullFields is a list of field names (e.g. "ComponentStepName") to
  878. // include in API requests with the JSON null value. By default, fields
  879. // with empty values are omitted from API requests. However, any field
  880. // with an empty value appearing in NullFields will be sent to the
  881. // server as null. It is an error if a field in this list has a
  882. // non-empty value. This may be used to include null fields in Patch
  883. // requests.
  884. NullFields []string `json:"-"`
  885. }
  886. func (s *CounterStructuredName) MarshalJSON() ([]byte, error) {
  887. type NoMethod CounterStructuredName
  888. raw := NoMethod(*s)
  889. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  890. }
  891. // CounterStructuredNameAndMetadata: A single message which encapsulates
  892. // structured name and metadata for a given
  893. // counter.
  894. type CounterStructuredNameAndMetadata struct {
  895. // Metadata: Metadata associated with a counter
  896. Metadata *CounterMetadata `json:"metadata,omitempty"`
  897. // Name: Structured name of the counter.
  898. Name *CounterStructuredName `json:"name,omitempty"`
  899. // ForceSendFields is a list of field names (e.g. "Metadata") to
  900. // unconditionally include in API requests. By default, fields with
  901. // empty values are omitted from API requests. However, any non-pointer,
  902. // non-interface field appearing in ForceSendFields will be sent to the
  903. // server regardless of whether the field is empty or not. This may be
  904. // used to include empty fields in Patch requests.
  905. ForceSendFields []string `json:"-"`
  906. // NullFields is a list of field names (e.g. "Metadata") to include in
  907. // API requests with the JSON null value. By default, fields with empty
  908. // values are omitted from API requests. However, any field with an
  909. // empty value appearing in NullFields will be sent to the server as
  910. // null. It is an error if a field in this list has a non-empty value.
  911. // This may be used to include null fields in Patch requests.
  912. NullFields []string `json:"-"`
  913. }
  914. func (s *CounterStructuredNameAndMetadata) MarshalJSON() ([]byte, error) {
  915. type NoMethod CounterStructuredNameAndMetadata
  916. raw := NoMethod(*s)
  917. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  918. }
  919. // CounterUpdate: An update to a Counter sent from a worker.
  920. type CounterUpdate struct {
  921. // Boolean: Boolean value for And, Or.
  922. Boolean bool `json:"boolean,omitempty"`
  923. // Cumulative: True if this counter is reported as the total cumulative
  924. // aggregate
  925. // value accumulated since the worker started working on this
  926. // WorkItem.
  927. // By default this is false, indicating that this counter is reported
  928. // as a delta.
  929. Cumulative bool `json:"cumulative,omitempty"`
  930. // Distribution: Distribution data
  931. Distribution *DistributionUpdate `json:"distribution,omitempty"`
  932. // FloatingPoint: Floating point value for Sum, Max, Min.
  933. FloatingPoint float64 `json:"floatingPoint,omitempty"`
  934. // FloatingPointList: List of floating point numbers, for Set.
  935. FloatingPointList *FloatingPointList `json:"floatingPointList,omitempty"`
  936. // FloatingPointMean: Floating point mean aggregation value for Mean.
  937. FloatingPointMean *FloatingPointMean `json:"floatingPointMean,omitempty"`
  938. // Integer: Integer value for Sum, Max, Min.
  939. Integer *SplitInt64 `json:"integer,omitempty"`
  940. // IntegerGauge: Gauge data
  941. IntegerGauge *IntegerGauge `json:"integerGauge,omitempty"`
  942. // IntegerList: List of integers, for Set.
  943. IntegerList *IntegerList `json:"integerList,omitempty"`
  944. // IntegerMean: Integer mean aggregation value for Mean.
  945. IntegerMean *IntegerMean `json:"integerMean,omitempty"`
  946. // Internal: Value for internally-defined counters used by the Dataflow
  947. // service.
  948. Internal interface{} `json:"internal,omitempty"`
  949. // NameAndKind: Counter name and aggregation type.
  950. NameAndKind *NameAndKind `json:"nameAndKind,omitempty"`
  951. // ShortId: The service-generated short identifier for this counter.
  952. // The short_id -> (name, metadata) mapping is constant for the lifetime
  953. // of
  954. // a job.
  955. ShortId int64 `json:"shortId,omitempty,string"`
  956. // StringList: List of strings, for Set.
  957. StringList *StringList `json:"stringList,omitempty"`
  958. // StructuredNameAndMetadata: Counter structured name and metadata.
  959. StructuredNameAndMetadata *CounterStructuredNameAndMetadata `json:"structuredNameAndMetadata,omitempty"`
  960. // ForceSendFields is a list of field names (e.g. "Boolean") to
  961. // unconditionally include in API requests. By default, fields with
  962. // empty values are omitted from API requests. However, any non-pointer,
  963. // non-interface field appearing in ForceSendFields will be sent to the
  964. // server regardless of whether the field is empty or not. This may be
  965. // used to include empty fields in Patch requests.
  966. ForceSendFields []string `json:"-"`
  967. // NullFields is a list of field names (e.g. "Boolean") to include in
  968. // API requests with the JSON null value. By default, fields with empty
  969. // values are omitted from API requests. However, any field with an
  970. // empty value appearing in NullFields will be sent to the server as
  971. // null. It is an error if a field in this list has a non-empty value.
  972. // This may be used to include null fields in Patch requests.
  973. NullFields []string `json:"-"`
  974. }
  975. func (s *CounterUpdate) MarshalJSON() ([]byte, error) {
  976. type NoMethod CounterUpdate
  977. raw := NoMethod(*s)
  978. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  979. }
  980. func (s *CounterUpdate) UnmarshalJSON(data []byte) error {
  981. type NoMethod CounterUpdate
  982. var s1 struct {
  983. FloatingPoint gensupport.JSONFloat64 `json:"floatingPoint"`
  984. *NoMethod
  985. }
  986. s1.NoMethod = (*NoMethod)(s)
  987. if err := json.Unmarshal(data, &s1); err != nil {
  988. return err
  989. }
  990. s.FloatingPoint = float64(s1.FloatingPoint)
  991. return nil
  992. }
  993. // CreateJobFromTemplateRequest: A request to create a Cloud Dataflow
  994. // job from a template.
  995. type CreateJobFromTemplateRequest struct {
  996. // Environment: The runtime environment for the job.
  997. Environment *RuntimeEnvironment `json:"environment,omitempty"`
  998. // GcsPath: Required. A Cloud Storage path to the template from which
  999. // to
  1000. // create the job.
  1001. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  1002. GcsPath string `json:"gcsPath,omitempty"`
  1003. // JobName: Required. The job name to use for the created job.
  1004. JobName string `json:"jobName,omitempty"`
  1005. // Location: The [regional
  1006. // endpoint]
  1007. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  1008. // dpoints) to
  1009. // which to direct the request.
  1010. Location string `json:"location,omitempty"`
  1011. // Parameters: The runtime parameters to pass to the job.
  1012. Parameters map[string]string `json:"parameters,omitempty"`
  1013. // ForceSendFields is a list of field names (e.g. "Environment") to
  1014. // unconditionally include in API requests. By default, fields with
  1015. // empty values are omitted from API requests. However, any non-pointer,
  1016. // non-interface field appearing in ForceSendFields will be sent to the
  1017. // server regardless of whether the field is empty or not. This may be
  1018. // used to include empty fields in Patch requests.
  1019. ForceSendFields []string `json:"-"`
  1020. // NullFields is a list of field names (e.g. "Environment") to include
  1021. // in API requests with the JSON null value. By default, fields with
  1022. // empty values are omitted from API requests. However, any field with
  1023. // an empty value appearing in NullFields will be sent to the server as
  1024. // null. It is an error if a field in this list has a non-empty value.
  1025. // This may be used to include null fields in Patch requests.
  1026. NullFields []string `json:"-"`
  1027. }
  1028. func (s *CreateJobFromTemplateRequest) MarshalJSON() ([]byte, error) {
  1029. type NoMethod CreateJobFromTemplateRequest
  1030. raw := NoMethod(*s)
  1031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1032. }
  1033. // CustomSourceLocation: Identifies the location of a custom souce.
  1034. type CustomSourceLocation struct {
  1035. // Stateful: Whether this source is stateful.
  1036. Stateful bool `json:"stateful,omitempty"`
  1037. // ForceSendFields is a list of field names (e.g. "Stateful") to
  1038. // unconditionally include in API requests. By default, fields with
  1039. // empty values are omitted from API requests. However, any non-pointer,
  1040. // non-interface field appearing in ForceSendFields will be sent to the
  1041. // server regardless of whether the field is empty or not. This may be
  1042. // used to include empty fields in Patch requests.
  1043. ForceSendFields []string `json:"-"`
  1044. // NullFields is a list of field names (e.g. "Stateful") to include in
  1045. // API requests with the JSON null value. By default, fields with empty
  1046. // values are omitted from API requests. However, any field with an
  1047. // empty value appearing in NullFields will be sent to the server as
  1048. // null. It is an error if a field in this list has a non-empty value.
  1049. // This may be used to include null fields in Patch requests.
  1050. NullFields []string `json:"-"`
  1051. }
  1052. func (s *CustomSourceLocation) MarshalJSON() ([]byte, error) {
  1053. type NoMethod CustomSourceLocation
  1054. raw := NoMethod(*s)
  1055. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1056. }
  1057. // DataDiskAssignment: Data disk assignment for a given VM instance.
  1058. type DataDiskAssignment struct {
  1059. // DataDisks: Mounted data disks. The order is important a data disk's
  1060. // 0-based index in
  1061. // this list defines which persistent directory the disk is mounted to,
  1062. // for
  1063. // example the list of { "myproject-1014-104817-4c2-harness-0-disk-0"
  1064. // },
  1065. // { "myproject-1014-104817-4c2-harness-0-disk-1" }.
  1066. DataDisks []string `json:"dataDisks,omitempty"`
  1067. // VmInstance: VM instance name the data disks mounted to, for
  1068. // example
  1069. // "myproject-1014-104817-4c2-harness-0".
  1070. VmInstance string `json:"vmInstance,omitempty"`
  1071. // ForceSendFields is a list of field names (e.g. "DataDisks") to
  1072. // unconditionally include in API requests. By default, fields with
  1073. // empty values are omitted from API requests. However, any non-pointer,
  1074. // non-interface field appearing in ForceSendFields will be sent to the
  1075. // server regardless of whether the field is empty or not. This may be
  1076. // used to include empty fields in Patch requests.
  1077. ForceSendFields []string `json:"-"`
  1078. // NullFields is a list of field names (e.g. "DataDisks") to include in
  1079. // API requests with the JSON null value. By default, fields with empty
  1080. // values are omitted from API requests. However, any field with an
  1081. // empty value appearing in NullFields will be sent to the server as
  1082. // null. It is an error if a field in this list has a non-empty value.
  1083. // This may be used to include null fields in Patch requests.
  1084. NullFields []string `json:"-"`
  1085. }
  1086. func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) {
  1087. type NoMethod DataDiskAssignment
  1088. raw := NoMethod(*s)
  1089. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1090. }
  1091. // DatastoreIODetails: Metadata for a Datastore connector used by the
  1092. // job.
  1093. type DatastoreIODetails struct {
  1094. // Namespace: Namespace used in the connection.
  1095. Namespace string `json:"namespace,omitempty"`
  1096. // ProjectId: ProjectId accessed in the connection.
  1097. ProjectId string `json:"projectId,omitempty"`
  1098. // ForceSendFields is a list of field names (e.g. "Namespace") to
  1099. // unconditionally include in API requests. By default, fields with
  1100. // empty values are omitted from API requests. However, any non-pointer,
  1101. // non-interface field appearing in ForceSendFields will be sent to the
  1102. // server regardless of whether the field is empty or not. This may be
  1103. // used to include empty fields in Patch requests.
  1104. ForceSendFields []string `json:"-"`
  1105. // NullFields is a list of field names (e.g. "Namespace") to include in
  1106. // API requests with the JSON null value. By default, fields with empty
  1107. // values are omitted from API requests. However, any field with an
  1108. // empty value appearing in NullFields will be sent to the server as
  1109. // null. It is an error if a field in this list has a non-empty value.
  1110. // This may be used to include null fields in Patch requests.
  1111. NullFields []string `json:"-"`
  1112. }
  1113. func (s *DatastoreIODetails) MarshalJSON() ([]byte, error) {
  1114. type NoMethod DatastoreIODetails
  1115. raw := NoMethod(*s)
  1116. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1117. }
  1118. // DerivedSource: Specification of one of the bundles produced as a
  1119. // result of splitting
  1120. // a Source (e.g. when executing a SourceSplitRequest, or when
  1121. // splitting an active task using
  1122. // WorkItemStatus.dynamic_source_split),
  1123. // relative to the source being split.
  1124. type DerivedSource struct {
  1125. // DerivationMode: What source to base the produced source on (if any).
  1126. //
  1127. // Possible values:
  1128. // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is
  1129. // unknown, or unspecified.
  1130. // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely
  1131. // independent Source with no base.
  1132. // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based
  1133. // on the Source being split.
  1134. // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source
  1135. // based on the base of the Source being split.
  1136. DerivationMode string `json:"derivationMode,omitempty"`
  1137. // Source: Specification of the source.
  1138. Source *Source `json:"source,omitempty"`
  1139. // ForceSendFields is a list of field names (e.g. "DerivationMode") to
  1140. // unconditionally include in API requests. By default, fields with
  1141. // empty values are omitted from API requests. However, any non-pointer,
  1142. // non-interface field appearing in ForceSendFields will be sent to the
  1143. // server regardless of whether the field is empty or not. This may be
  1144. // used to include empty fields in Patch requests.
  1145. ForceSendFields []string `json:"-"`
  1146. // NullFields is a list of field names (e.g. "DerivationMode") to
  1147. // include in API requests with the JSON null value. By default, fields
  1148. // with empty values are omitted from API requests. However, any field
  1149. // with an empty value appearing in NullFields will be sent to the
  1150. // server as null. It is an error if a field in this list has a
  1151. // non-empty value. This may be used to include null fields in Patch
  1152. // requests.
  1153. NullFields []string `json:"-"`
  1154. }
  1155. func (s *DerivedSource) MarshalJSON() ([]byte, error) {
  1156. type NoMethod DerivedSource
  1157. raw := NoMethod(*s)
  1158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1159. }
  1160. // Disk: Describes the data disk used by a workflow job.
  1161. type Disk struct {
  1162. // DiskType: Disk storage type, as defined by Google Compute Engine.
  1163. // This
  1164. // must be a disk type appropriate to the project and zone in which
  1165. // the workers will run. If unknown or unspecified, the service
  1166. // will attempt to choose a reasonable default.
  1167. //
  1168. // For example, the standard persistent disk type is a resource
  1169. // name
  1170. // typically ending in "pd-standard". If SSD persistent disks
  1171. // are
  1172. // available, the resource name typically ends with "pd-ssd".
  1173. // The
  1174. // actual valid values are defined the Google Compute Engine API,
  1175. // not by the Cloud Dataflow API; consult the Google Compute
  1176. // Engine
  1177. // documentation for more information about determining the set
  1178. // of
  1179. // available disk types for a particular project and zone.
  1180. //
  1181. // Google Compute Engine Disk types are local to a particular
  1182. // project in a particular zone, and so the resource name will
  1183. // typically look something like
  1184. // this:
  1185. //
  1186. // compute.googleapis.com/projects/project-id/zones/zone/diskTypes
  1187. // /pd-standard
  1188. DiskType string `json:"diskType,omitempty"`
  1189. // MountPoint: Directory in a VM where disk is mounted.
  1190. MountPoint string `json:"mountPoint,omitempty"`
  1191. // SizeGb: Size of disk in GB. If zero or unspecified, the service
  1192. // will
  1193. // attempt to choose a reasonable default.
  1194. SizeGb int64 `json:"sizeGb,omitempty"`
  1195. // ForceSendFields is a list of field names (e.g. "DiskType") to
  1196. // unconditionally include in API requests. By default, fields with
  1197. // empty values are omitted from API requests. However, any non-pointer,
  1198. // non-interface field appearing in ForceSendFields will be sent to the
  1199. // server regardless of whether the field is empty or not. This may be
  1200. // used to include empty fields in Patch requests.
  1201. ForceSendFields []string `json:"-"`
  1202. // NullFields is a list of field names (e.g. "DiskType") to include in
  1203. // API requests with the JSON null value. By default, fields with empty
  1204. // values are omitted from API requests. However, any field with an
  1205. // empty value appearing in NullFields will be sent to the server as
  1206. // null. It is an error if a field in this list has a non-empty value.
  1207. // This may be used to include null fields in Patch requests.
  1208. NullFields []string `json:"-"`
  1209. }
  1210. func (s *Disk) MarshalJSON() ([]byte, error) {
  1211. type NoMethod Disk
  1212. raw := NoMethod(*s)
  1213. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1214. }
  1215. // DisplayData: Data provided with a pipeline or transform to provide
  1216. // descriptive info.
  1217. type DisplayData struct {
  1218. // BoolValue: Contains value if the data is of a boolean type.
  1219. BoolValue bool `json:"boolValue,omitempty"`
  1220. // DurationValue: Contains value if the data is of duration type.
  1221. DurationValue string `json:"durationValue,omitempty"`
  1222. // FloatValue: Contains value if the data is of float type.
  1223. FloatValue float64 `json:"floatValue,omitempty"`
  1224. // Int64Value: Contains value if the data is of int64 type.
  1225. Int64Value int64 `json:"int64Value,omitempty,string"`
  1226. // JavaClassValue: Contains value if the data is of java class type.
  1227. JavaClassValue string `json:"javaClassValue,omitempty"`
  1228. // Key: The key identifying the display data.
  1229. // This is intended to be used as a label for the display data
  1230. // when viewed in a dax monitoring system.
  1231. Key string `json:"key,omitempty"`
  1232. // Label: An optional label to display in a dax UI for the element.
  1233. Label string `json:"label,omitempty"`
  1234. // Namespace: The namespace for the key. This is usually a class name or
  1235. // programming
  1236. // language namespace (i.e. python module) which defines the display
  1237. // data.
  1238. // This allows a dax monitoring system to specially handle the data
  1239. // and perform custom rendering.
  1240. Namespace string `json:"namespace,omitempty"`
  1241. // ShortStrValue: A possible additional shorter value to display.
  1242. // For example a java_class_name_value of com.mypackage.MyDoFn
  1243. // will be stored with MyDoFn as the short_str_value
  1244. // and
  1245. // com.mypackage.MyDoFn as the java_class_name value.
  1246. // short_str_value can be displayed and java_class_name_value
  1247. // will be displayed as a tooltip.
  1248. ShortStrValue string `json:"shortStrValue,omitempty"`
  1249. // StrValue: Contains value if the data is of string type.
  1250. StrValue string `json:"strValue,omitempty"`
  1251. // TimestampValue: Contains value if the data is of timestamp type.
  1252. TimestampValue string `json:"timestampValue,omitempty"`
  1253. // Url: An optional full URL.
  1254. Url string `json:"url,omitempty"`
  1255. // ForceSendFields is a list of field names (e.g. "BoolValue") to
  1256. // unconditionally include in API requests. By default, fields with
  1257. // empty values are omitted from API requests. However, any non-pointer,
  1258. // non-interface field appearing in ForceSendFields will be sent to the
  1259. // server regardless of whether the field is empty or not. This may be
  1260. // used to include empty fields in Patch requests.
  1261. ForceSendFields []string `json:"-"`
  1262. // NullFields is a list of field names (e.g. "BoolValue") to include in
  1263. // API requests with the JSON null value. By default, fields with empty
  1264. // values are omitted from API requests. However, any field with an
  1265. // empty value appearing in NullFields will be sent to the server as
  1266. // null. It is an error if a field in this list has a non-empty value.
  1267. // This may be used to include null fields in Patch requests.
  1268. NullFields []string `json:"-"`
  1269. }
  1270. func (s *DisplayData) MarshalJSON() ([]byte, error) {
  1271. type NoMethod DisplayData
  1272. raw := NoMethod(*s)
  1273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1274. }
  1275. func (s *DisplayData) UnmarshalJSON(data []byte) error {
  1276. type NoMethod DisplayData
  1277. var s1 struct {
  1278. FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  1279. *NoMethod
  1280. }
  1281. s1.NoMethod = (*NoMethod)(s)
  1282. if err := json.Unmarshal(data, &s1); err != nil {
  1283. return err
  1284. }
  1285. s.FloatValue = float64(s1.FloatValue)
  1286. return nil
  1287. }
  1288. // DistributionUpdate: A metric value representing a distribution.
  1289. type DistributionUpdate struct {
  1290. // Count: The count of the number of elements present in the
  1291. // distribution.
  1292. Count *SplitInt64 `json:"count,omitempty"`
  1293. // Histogram: (Optional) Histogram of value counts for the distribution.
  1294. Histogram *Histogram `json:"histogram,omitempty"`
  1295. // Max: The maximum value present in the distribution.
  1296. Max *SplitInt64 `json:"max,omitempty"`
  1297. // Min: The minimum value present in the distribution.
  1298. Min *SplitInt64 `json:"min,omitempty"`
  1299. // Sum: Use an int64 since we'd prefer the added precision. If overflow
  1300. // is a common
  1301. // problem we can detect it and use an additional int64 or a double.
  1302. Sum *SplitInt64 `json:"sum,omitempty"`
  1303. // SumOfSquares: Use a double since the sum of squares is likely to
  1304. // overflow int64.
  1305. SumOfSquares float64 `json:"sumOfSquares,omitempty"`
  1306. // ForceSendFields is a list of field names (e.g. "Count") to
  1307. // unconditionally include in API requests. By default, fields with
  1308. // empty values are omitted from API requests. However, any non-pointer,
  1309. // non-interface field appearing in ForceSendFields will be sent to the
  1310. // server regardless of whether the field is empty or not. This may be
  1311. // used to include empty fields in Patch requests.
  1312. ForceSendFields []string `json:"-"`
  1313. // NullFields is a list of field names (e.g. "Count") to include in API
  1314. // requests with the JSON null value. By default, fields with empty
  1315. // values are omitted from API requests. However, any field with an
  1316. // empty value appearing in NullFields will be sent to the server as
  1317. // null. It is an error if a field in this list has a non-empty value.
  1318. // This may be used to include null fields in Patch requests.
  1319. NullFields []string `json:"-"`
  1320. }
  1321. func (s *DistributionUpdate) MarshalJSON() ([]byte, error) {
  1322. type NoMethod DistributionUpdate
  1323. raw := NoMethod(*s)
  1324. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1325. }
  1326. func (s *DistributionUpdate) UnmarshalJSON(data []byte) error {
  1327. type NoMethod DistributionUpdate
  1328. var s1 struct {
  1329. SumOfSquares gensupport.JSONFloat64 `json:"sumOfSquares"`
  1330. *NoMethod
  1331. }
  1332. s1.NoMethod = (*NoMethod)(s)
  1333. if err := json.Unmarshal(data, &s1); err != nil {
  1334. return err
  1335. }
  1336. s.SumOfSquares = float64(s1.SumOfSquares)
  1337. return nil
  1338. }
  1339. // DynamicSourceSplit: When a task splits using
  1340. // WorkItemStatus.dynamic_source_split, this
  1341. // message describes the two parts of the split relative to
  1342. // the
  1343. // description of the current task's input.
  1344. type DynamicSourceSplit struct {
  1345. // Primary: Primary part (continued to be processed by
  1346. // worker).
  1347. // Specified relative to the previously-current source.
  1348. // Becomes current.
  1349. Primary *DerivedSource `json:"primary,omitempty"`
  1350. // Residual: Residual part (returned to the pool of work).
  1351. // Specified relative to the previously-current source.
  1352. Residual *DerivedSource `json:"residual,omitempty"`
  1353. // ForceSendFields is a list of field names (e.g. "Primary") to
  1354. // unconditionally include in API requests. By default, fields with
  1355. // empty values are omitted from API requests. However, any non-pointer,
  1356. // non-interface field appearing in ForceSendFields will be sent to the
  1357. // server regardless of whether the field is empty or not. This may be
  1358. // used to include empty fields in Patch requests.
  1359. ForceSendFields []string `json:"-"`
  1360. // NullFields is a list of field names (e.g. "Primary") to include in
  1361. // API requests with the JSON null value. By default, fields with empty
  1362. // values are omitted from API requests. However, any field with an
  1363. // empty value appearing in NullFields will be sent to the server as
  1364. // null. It is an error if a field in this list has a non-empty value.
  1365. // This may be used to include null fields in Patch requests.
  1366. NullFields []string `json:"-"`
  1367. }
  1368. func (s *DynamicSourceSplit) MarshalJSON() ([]byte, error) {
  1369. type NoMethod DynamicSourceSplit
  1370. raw := NoMethod(*s)
  1371. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1372. }
  1373. // Environment: Describes the environment in which a Dataflow Job runs.
  1374. type Environment struct {
  1375. // ClusterManagerApiService: The type of cluster manager API to use. If
  1376. // unknown or
  1377. // unspecified, the service will attempt to choose a reasonable
  1378. // default. This should be in the form of the API service name,
  1379. // e.g. "compute.googleapis.com".
  1380. ClusterManagerApiService string `json:"clusterManagerApiService,omitempty"`
  1381. // Dataset: The dataset for the current project where various
  1382. // workflow
  1383. // related tables are stored.
  1384. //
  1385. // The supported resource type is:
  1386. //
  1387. // Google BigQuery:
  1388. // bigquery.googleapis.com/{dataset}
  1389. Dataset string `json:"dataset,omitempty"`
  1390. // Experiments: The list of experiments to enable.
  1391. Experiments []string `json:"experiments,omitempty"`
  1392. // FlexResourceSchedulingGoal: Which Flexible Resource Scheduling mode
  1393. // to run in.
  1394. //
  1395. // Possible values:
  1396. // "FLEXRS_UNSPECIFIED" - Run in the default mode.
  1397. // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time.
  1398. // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost.
  1399. FlexResourceSchedulingGoal string `json:"flexResourceSchedulingGoal,omitempty"`
  1400. // InternalExperiments: Experimental settings.
  1401. InternalExperiments googleapi.RawMessage `json:"internalExperiments,omitempty"`
  1402. // SdkPipelineOptions: The Cloud Dataflow SDK pipeline options specified
  1403. // by the user. These
  1404. // options are passed through the service and are used to recreate
  1405. // the
  1406. // SDK pipeline options on the worker in a language agnostic and
  1407. // platform
  1408. // independent way.
  1409. SdkPipelineOptions googleapi.RawMessage `json:"sdkPipelineOptions,omitempty"`
  1410. // ServiceAccountEmail: Identity to run virtual machines as. Defaults to
  1411. // the default account.
  1412. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
  1413. // TempStoragePrefix: The prefix of the resources the system should use
  1414. // for temporary
  1415. // storage. The system will append the suffix "/temp-{JOBNAME} to
  1416. // this resource prefix, where {JOBNAME} is the value of the
  1417. // job_name field. The resulting bucket and object prefix is used
  1418. // as the prefix of the resources used to store temporary data
  1419. // needed during the job execution. NOTE: This will override the
  1420. // value in taskrunner_settings.
  1421. // The supported resource type is:
  1422. //
  1423. // Google Cloud Storage:
  1424. //
  1425. // storage.googleapis.com/{bucket}/{object}
  1426. // bucket.storage.googleapis.com/{object}
  1427. TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
  1428. // UserAgent: A description of the process that generated the request.
  1429. UserAgent googleapi.RawMessage `json:"userAgent,omitempty"`
  1430. // Version: A structure describing which components and their versions
  1431. // of the service
  1432. // are required in order to run the job.
  1433. Version googleapi.RawMessage `json:"version,omitempty"`
  1434. // WorkerPools: The worker pools. At least one "harness" worker pool
  1435. // must be
  1436. // specified in order for the job to have workers.
  1437. WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
  1438. // ForceSendFields is a list of field names (e.g.
  1439. // "ClusterManagerApiService") to unconditionally include in API
  1440. // requests. By default, fields with empty values are omitted from API
  1441. // requests. However, any non-pointer, non-interface field appearing in
  1442. // ForceSendFields will be sent to the server regardless of whether the
  1443. // field is empty or not. This may be used to include empty fields in
  1444. // Patch requests.
  1445. ForceSendFields []string `json:"-"`
  1446. // NullFields is a list of field names (e.g. "ClusterManagerApiService")
  1447. // to include in API requests with the JSON null value. By default,
  1448. // fields with empty values are omitted from API requests. However, any
  1449. // field with an empty value appearing in NullFields will be sent to the
  1450. // server as null. It is an error if a field in this list has a
  1451. // non-empty value. This may be used to include null fields in Patch
  1452. // requests.
  1453. NullFields []string `json:"-"`
  1454. }
  1455. func (s *Environment) MarshalJSON() ([]byte, error) {
  1456. type NoMethod Environment
  1457. raw := NoMethod(*s)
  1458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1459. }
  1460. // ExecutionStageState: A message describing the state of a particular
  1461. // execution stage.
  1462. type ExecutionStageState struct {
  1463. // CurrentStateTime: The time at which the stage transitioned to this
  1464. // state.
  1465. CurrentStateTime string `json:"currentStateTime,omitempty"`
  1466. // ExecutionStageName: The name of the execution stage.
  1467. ExecutionStageName string `json:"executionStageName,omitempty"`
  1468. // ExecutionStageState: Executions stage states allow the same set of
  1469. // values as JobState.
  1470. //
  1471. // Possible values:
  1472. // "JOB_STATE_UNKNOWN" - The job's run state isn't specified.
  1473. // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job
  1474. // has not
  1475. // yet started to run.
  1476. // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is
  1477. // currently running.
  1478. // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has
  1479. // successfully completed.
  1480. // This is a terminal job state. This state may be set by the Cloud
  1481. // Dataflow
  1482. // service, as a transition from `JOB_STATE_RUNNING`. It may also be set
  1483. // via a
  1484. // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a
  1485. // terminal
  1486. // state.
  1487. // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has
  1488. // failed. This is a
  1489. // terminal job state. This state may only be set by the Cloud
  1490. // Dataflow
  1491. // service, and only as a transition from `JOB_STATE_RUNNING`.
  1492. // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the
  1493. // job has been explicitly
  1494. // cancelled. This is a terminal job state. This state may only be
  1495. // set via a Cloud Dataflow `UpdateJob` call, and only if the job has
  1496. // not
  1497. // yet reached another terminal state.
  1498. // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job
  1499. // was successfully updated,
  1500. // meaning that this job was stopped and another job was started,
  1501. // inheriting
  1502. // state from this one. This is a terminal job state. This state may
  1503. // only be
  1504. // set by the Cloud Dataflow service, and only as a transition
  1505. // from
  1506. // `JOB_STATE_RUNNING`.
  1507. // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job
  1508. // is in the process of draining.
  1509. // A draining job has stopped pulling from its input sources and is
  1510. // processing
  1511. // any data that remains in-flight. This state may be set via a Cloud
  1512. // Dataflow
  1513. // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`.
  1514. // Jobs
  1515. // that are draining may only transition to
  1516. // `JOB_STATE_DRAINED`,
  1517. // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.
  1518. // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job
  1519. // has been drained.
  1520. // A drained job terminated by stopping pulling from its input sources
  1521. // and
  1522. // processing any data that remained in-flight when draining was
  1523. // requested.
  1524. // This state is a terminal state, may only be set by the Cloud
  1525. // Dataflow
  1526. // service, and only as a transition from `JOB_STATE_DRAINING`.
  1527. // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job
  1528. // has been created but is not yet
  1529. // running. Jobs that are pending may only transition to
  1530. // `JOB_STATE_RUNNING`,
  1531. // or `JOB_STATE_FAILED`.
  1532. // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the
  1533. // job has been explicitly cancelled
  1534. // and is in the process of stopping. Jobs that are cancelling may
  1535. // only
  1536. // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`.
  1537. // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has
  1538. // been created but is being
  1539. // delayed until launch. Jobs that are queued may only transition
  1540. // to
  1541. // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`.
  1542. ExecutionStageState string `json:"executionStageState,omitempty"`
  1543. // ForceSendFields is a list of field names (e.g. "CurrentStateTime") to
  1544. // unconditionally include in API requests. By default, fields with
  1545. // empty values are omitted from API requests. However, any non-pointer,
  1546. // non-interface field appearing in ForceSendFields will be sent to the
  1547. // server regardless of whether the field is empty or not. This may be
  1548. // used to include empty fields in Patch requests.
  1549. ForceSendFields []string `json:"-"`
  1550. // NullFields is a list of field names (e.g. "CurrentStateTime") to
  1551. // include in API requests with the JSON null value. By default, fields
  1552. // with empty values are omitted from API requests. However, any field
  1553. // with an empty value appearing in NullFields will be sent to the
  1554. // server as null. It is an error if a field in this list has a
  1555. // non-empty value. This may be used to include null fields in Patch
  1556. // requests.
  1557. NullFields []string `json:"-"`
  1558. }
  1559. func (s *ExecutionStageState) MarshalJSON() ([]byte, error) {
  1560. type NoMethod ExecutionStageState
  1561. raw := NoMethod(*s)
  1562. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1563. }
  1564. // ExecutionStageSummary: Description of the composing transforms,
  1565. // names/ids, and input/outputs of a
  1566. // stage of execution. Some composing transforms and sources may have
  1567. // been
  1568. // generated by the Dataflow service during execution planning.
  1569. type ExecutionStageSummary struct {
  1570. // ComponentSource: Collections produced and consumed by component
  1571. // transforms of this stage.
  1572. ComponentSource []*ComponentSource `json:"componentSource,omitempty"`
  1573. // ComponentTransform: Transforms that comprise this execution stage.
  1574. ComponentTransform []*ComponentTransform `json:"componentTransform,omitempty"`
  1575. // Id: Dataflow service generated id for this stage.
  1576. Id string `json:"id,omitempty"`
  1577. // InputSource: Input sources for this stage.
  1578. InputSource []*StageSource `json:"inputSource,omitempty"`
  1579. // Kind: Type of tranform this stage is executing.
  1580. //
  1581. // Possible values:
  1582. // "UNKNOWN_KIND" - Unrecognized transform type.
  1583. // "PAR_DO_KIND" - ParDo transform.
  1584. // "GROUP_BY_KEY_KIND" - Group By Key transform.
  1585. // "FLATTEN_KIND" - Flatten transform.
  1586. // "READ_KIND" - Read transform.
  1587. // "WRITE_KIND" - Write transform.
  1588. // "CONSTANT_KIND" - Constructs from a constant value, such as with
  1589. // Create.of.
  1590. // "SINGLETON_KIND" - Creates a Singleton view of a collection.
  1591. // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as
  1592. // part of a GroupByKey.
  1593. Kind string `json:"kind,omitempty"`
  1594. // Name: Dataflow service generated name for this stage.
  1595. Name string `json:"name,omitempty"`
  1596. // OutputSource: Output sources for this stage.
  1597. OutputSource []*StageSource `json:"outputSource,omitempty"`
  1598. // ForceSendFields is a list of field names (e.g. "ComponentSource") to
  1599. // unconditionally include in API requests. By default, fields with
  1600. // empty values are omitted from API requests. However, any non-pointer,
  1601. // non-interface field appearing in ForceSendFields will be sent to the
  1602. // server regardless of whether the field is empty or not. This may be
  1603. // used to include empty fields in Patch requests.
  1604. ForceSendFields []string `json:"-"`
  1605. // NullFields is a list of field names (e.g. "ComponentSource") to
  1606. // include in API requests with the JSON null value. By default, fields
  1607. // with empty values are omitted from API requests. However, any field
  1608. // with an empty value appearing in NullFields will be sent to the
  1609. // server as null. It is an error if a field in this list has a
  1610. // non-empty value. This may be used to include null fields in Patch
  1611. // requests.
  1612. NullFields []string `json:"-"`
  1613. }
  1614. func (s *ExecutionStageSummary) MarshalJSON() ([]byte, error) {
  1615. type NoMethod ExecutionStageSummary
  1616. raw := NoMethod(*s)
  1617. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1618. }
  1619. // FailedLocation: Indicates which [regional
  1620. // endpoint]
  1621. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  1622. // dpoints) failed
  1623. // to respond to a request for data.
  1624. type FailedLocation struct {
  1625. // Name: The name of the [regional
  1626. // endpoint]
  1627. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  1628. // dpoints) that
  1629. // failed to respond.
  1630. Name string `json:"name,omitempty"`
  1631. // ForceSendFields is a list of field names (e.g. "Name") to
  1632. // unconditionally include in API requests. By default, fields with
  1633. // empty values are omitted from API requests. However, any non-pointer,
  1634. // non-interface field appearing in ForceSendFields will be sent to the
  1635. // server regardless of whether the field is empty or not. This may be
  1636. // used to include empty fields in Patch requests.
  1637. ForceSendFields []string `json:"-"`
  1638. // NullFields is a list of field names (e.g. "Name") to include in API
  1639. // requests with the JSON null value. By default, fields with empty
  1640. // values are omitted from API requests. However, any field with an
  1641. // empty value appearing in NullFields will be sent to the server as
  1642. // null. It is an error if a field in this list has a non-empty value.
  1643. // This may be used to include null fields in Patch requests.
  1644. NullFields []string `json:"-"`
  1645. }
  1646. func (s *FailedLocation) MarshalJSON() ([]byte, error) {
  1647. type NoMethod FailedLocation
  1648. raw := NoMethod(*s)
  1649. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1650. }
  1651. // FileIODetails: Metadata for a File connector used by the job.
  1652. type FileIODetails struct {
  1653. // FilePattern: File Pattern used to access files by the connector.
  1654. FilePattern string `json:"filePattern,omitempty"`
  1655. // ForceSendFields is a list of field names (e.g. "FilePattern") to
  1656. // unconditionally include in API requests. By default, fields with
  1657. // empty values are omitted from API requests. However, any non-pointer,
  1658. // non-interface field appearing in ForceSendFields will be sent to the
  1659. // server regardless of whether the field is empty or not. This may be
  1660. // used to include empty fields in Patch requests.
  1661. ForceSendFields []string `json:"-"`
  1662. // NullFields is a list of field names (e.g. "FilePattern") to include
  1663. // in API requests with the JSON null value. By default, fields with
  1664. // empty values are omitted from API requests. However, any field with
  1665. // an empty value appearing in NullFields will be sent to the server as
  1666. // null. It is an error if a field in this list has a non-empty value.
  1667. // This may be used to include null fields in Patch requests.
  1668. NullFields []string `json:"-"`
  1669. }
  1670. func (s *FileIODetails) MarshalJSON() ([]byte, error) {
  1671. type NoMethod FileIODetails
  1672. raw := NoMethod(*s)
  1673. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1674. }
  1675. // FlattenInstruction: An instruction that copies its inputs (zero or
  1676. // more) to its (single) output.
  1677. type FlattenInstruction struct {
  1678. // Inputs: Describes the inputs to the flatten instruction.
  1679. Inputs []*InstructionInput `json:"inputs,omitempty"`
  1680. // ForceSendFields is a list of field names (e.g. "Inputs") to
  1681. // unconditionally include in API requests. By default, fields with
  1682. // empty values are omitted from API requests. However, any non-pointer,
  1683. // non-interface field appearing in ForceSendFields will be sent to the
  1684. // server regardless of whether the field is empty or not. This may be
  1685. // used to include empty fields in Patch requests.
  1686. ForceSendFields []string `json:"-"`
  1687. // NullFields is a list of field names (e.g. "Inputs") to include in API
  1688. // requests with the JSON null value. By default, fields with empty
  1689. // values are omitted from API requests. However, any field with an
  1690. // empty value appearing in NullFields will be sent to the server as
  1691. // null. It is an error if a field in this list has a non-empty value.
  1692. // This may be used to include null fields in Patch requests.
  1693. NullFields []string `json:"-"`
  1694. }
  1695. func (s *FlattenInstruction) MarshalJSON() ([]byte, error) {
  1696. type NoMethod FlattenInstruction
  1697. raw := NoMethod(*s)
  1698. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1699. }
  1700. // FloatingPointList: A metric value representing a list of floating
  1701. // point numbers.
  1702. type FloatingPointList struct {
  1703. // Elements: Elements of the list.
  1704. Elements []float64 `json:"elements,omitempty"`
  1705. // ForceSendFields is a list of field names (e.g. "Elements") to
  1706. // unconditionally include in API requests. By default, fields with
  1707. // empty values are omitted from API requests. However, any non-pointer,
  1708. // non-interface field appearing in ForceSendFields will be sent to the
  1709. // server regardless of whether the field is empty or not. This may be
  1710. // used to include empty fields in Patch requests.
  1711. ForceSendFields []string `json:"-"`
  1712. // NullFields is a list of field names (e.g. "Elements") to include in
  1713. // API requests with the JSON null value. By default, fields with empty
  1714. // values are omitted from API requests. However, any field with an
  1715. // empty value appearing in NullFields will be sent to the server as
  1716. // null. It is an error if a field in this list has a non-empty value.
  1717. // This may be used to include null fields in Patch requests.
  1718. NullFields []string `json:"-"`
  1719. }
  1720. func (s *FloatingPointList) MarshalJSON() ([]byte, error) {
  1721. type NoMethod FloatingPointList
  1722. raw := NoMethod(*s)
  1723. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1724. }
  1725. // FloatingPointMean: A representation of a floating point mean metric
  1726. // contribution.
  1727. type FloatingPointMean struct {
  1728. // Count: The number of values being aggregated.
  1729. Count *SplitInt64 `json:"count,omitempty"`
  1730. // Sum: The sum of all values being aggregated.
  1731. Sum float64 `json:"sum,omitempty"`
  1732. // ForceSendFields is a list of field names (e.g. "Count") to
  1733. // unconditionally include in API requests. By default, fields with
  1734. // empty values are omitted from API requests. However, any non-pointer,
  1735. // non-interface field appearing in ForceSendFields will be sent to the
  1736. // server regardless of whether the field is empty or not. This may be
  1737. // used to include empty fields in Patch requests.
  1738. ForceSendFields []string `json:"-"`
  1739. // NullFields is a list of field names (e.g. "Count") to include in API
  1740. // requests with the JSON null value. By default, fields with empty
  1741. // values are omitted from API requests. However, any field with an
  1742. // empty value appearing in NullFields will be sent to the server as
  1743. // null. It is an error if a field in this list has a non-empty value.
  1744. // This may be used to include null fields in Patch requests.
  1745. NullFields []string `json:"-"`
  1746. }
  1747. func (s *FloatingPointMean) MarshalJSON() ([]byte, error) {
  1748. type NoMethod FloatingPointMean
  1749. raw := NoMethod(*s)
  1750. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1751. }
  1752. func (s *FloatingPointMean) UnmarshalJSON(data []byte) error {
  1753. type NoMethod FloatingPointMean
  1754. var s1 struct {
  1755. Sum gensupport.JSONFloat64 `json:"sum"`
  1756. *NoMethod
  1757. }
  1758. s1.NoMethod = (*NoMethod)(s)
  1759. if err := json.Unmarshal(data, &s1); err != nil {
  1760. return err
  1761. }
  1762. s.Sum = float64(s1.Sum)
  1763. return nil
  1764. }
  1765. // GetDebugConfigRequest: Request to get updated debug configuration for
  1766. // component.
  1767. type GetDebugConfigRequest struct {
  1768. // ComponentId: The internal component id for which debug configuration
  1769. // is
  1770. // requested.
  1771. ComponentId string `json:"componentId,omitempty"`
  1772. // Location: The [regional
  1773. // endpoint]
  1774. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  1775. // dpoints) that
  1776. // contains the job specified by job_id.
  1777. Location string `json:"location,omitempty"`
  1778. // WorkerId: The worker id, i.e., VM hostname.
  1779. WorkerId string `json:"workerId,omitempty"`
  1780. // ForceSendFields is a list of field names (e.g. "ComponentId") to
  1781. // unconditionally include in API requests. By default, fields with
  1782. // empty values are omitted from API requests. However, any non-pointer,
  1783. // non-interface field appearing in ForceSendFields will be sent to the
  1784. // server regardless of whether the field is empty or not. This may be
  1785. // used to include empty fields in Patch requests.
  1786. ForceSendFields []string `json:"-"`
  1787. // NullFields is a list of field names (e.g. "ComponentId") to include
  1788. // in API requests with the JSON null value. By default, fields with
  1789. // empty values are omitted from API requests. However, any field with
  1790. // an empty value appearing in NullFields will be sent to the server as
  1791. // null. It is an error if a field in this list has a non-empty value.
  1792. // This may be used to include null fields in Patch requests.
  1793. NullFields []string `json:"-"`
  1794. }
  1795. func (s *GetDebugConfigRequest) MarshalJSON() ([]byte, error) {
  1796. type NoMethod GetDebugConfigRequest
  1797. raw := NoMethod(*s)
  1798. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1799. }
  1800. // GetDebugConfigResponse: Response to a get debug configuration
  1801. // request.
  1802. type GetDebugConfigResponse struct {
  1803. // Config: The encoded debug configuration for the requested component.
  1804. Config string `json:"config,omitempty"`
  1805. // ServerResponse contains the HTTP response code and headers from the
  1806. // server.
  1807. googleapi.ServerResponse `json:"-"`
  1808. // ForceSendFields is a list of field names (e.g. "Config") to
  1809. // unconditionally include in API requests. By default, fields with
  1810. // empty values are omitted from API requests. However, any non-pointer,
  1811. // non-interface field appearing in ForceSendFields will be sent to the
  1812. // server regardless of whether the field is empty or not. This may be
  1813. // used to include empty fields in Patch requests.
  1814. ForceSendFields []string `json:"-"`
  1815. // NullFields is a list of field names (e.g. "Config") to include in API
  1816. // requests with the JSON null value. By default, fields with empty
  1817. // values are omitted from API requests. However, any field with an
  1818. // empty value appearing in NullFields will be sent to the server as
  1819. // null. It is an error if a field in this list has a non-empty value.
  1820. // This may be used to include null fields in Patch requests.
  1821. NullFields []string `json:"-"`
  1822. }
  1823. func (s *GetDebugConfigResponse) MarshalJSON() ([]byte, error) {
  1824. type NoMethod GetDebugConfigResponse
  1825. raw := NoMethod(*s)
  1826. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1827. }
  1828. // GetTemplateResponse: The response to a GetTemplate request.
  1829. type GetTemplateResponse struct {
  1830. // Metadata: The template metadata describing the template name,
  1831. // available
  1832. // parameters, etc.
  1833. Metadata *TemplateMetadata `json:"metadata,omitempty"`
  1834. // Status: The status of the get template request. Any problems with
  1835. // the
  1836. // request will be indicated in the error_details.
  1837. Status *Status `json:"status,omitempty"`
  1838. // ServerResponse contains the HTTP response code and headers from the
  1839. // server.
  1840. googleapi.ServerResponse `json:"-"`
  1841. // ForceSendFields is a list of field names (e.g. "Metadata") to
  1842. // unconditionally include in API requests. By default, fields with
  1843. // empty values are omitted from API requests. However, any non-pointer,
  1844. // non-interface field appearing in ForceSendFields will be sent to the
  1845. // server regardless of whether the field is empty or not. This may be
  1846. // used to include empty fields in Patch requests.
  1847. ForceSendFields []string `json:"-"`
  1848. // NullFields is a list of field names (e.g. "Metadata") to include in
  1849. // API requests with the JSON null value. By default, fields with empty
  1850. // values are omitted from API requests. However, any field with an
  1851. // empty value appearing in NullFields will be sent to the server as
  1852. // null. It is an error if a field in this list has a non-empty value.
  1853. // This may be used to include null fields in Patch requests.
  1854. NullFields []string `json:"-"`
  1855. }
  1856. func (s *GetTemplateResponse) MarshalJSON() ([]byte, error) {
  1857. type NoMethod GetTemplateResponse
  1858. raw := NoMethod(*s)
  1859. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1860. }
  1861. // Histogram: Histogram of value counts for a distribution.
  1862. //
  1863. // Buckets have an inclusive lower bound and exclusive upper bound and
  1864. // use
  1865. // "1,2,5 bucketing": The first bucket range is from [0,1) and all
  1866. // subsequent
  1867. // bucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus,
  1868. // bucket
  1869. // boundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000,
  1870. // ...
  1871. // Negative values are not supported.
  1872. type Histogram struct {
  1873. // BucketCounts: Counts of values in each bucket. For efficiency, prefix
  1874. // and trailing
  1875. // buckets with count = 0 are elided. Buckets can store the full range
  1876. // of
  1877. // values of an unsigned long, with ULLONG_MAX falling into the 59th
  1878. // bucket
  1879. // with range [1e19, 2e19).
  1880. BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"`
  1881. // FirstBucketOffset: Starting index of first stored bucket. The
  1882. // non-inclusive upper-bound of
  1883. // the ith bucket is given by:
  1884. // pow(10,(i-first_bucket_offset)/3) *
  1885. // (1,2,5)[(i-first_bucket_offset)%3]
  1886. FirstBucketOffset int64 `json:"firstBucketOffset,omitempty"`
  1887. // ForceSendFields is a list of field names (e.g. "BucketCounts") to
  1888. // unconditionally include in API requests. By default, fields with
  1889. // empty values are omitted from API requests. However, any non-pointer,
  1890. // non-interface field appearing in ForceSendFields will be sent to the
  1891. // server regardless of whether the field is empty or not. This may be
  1892. // used to include empty fields in Patch requests.
  1893. ForceSendFields []string `json:"-"`
  1894. // NullFields is a list of field names (e.g. "BucketCounts") to include
  1895. // in API requests with the JSON null value. By default, fields with
  1896. // empty values are omitted from API requests. However, any field with
  1897. // an empty value appearing in NullFields will be sent to the server as
  1898. // null. It is an error if a field in this list has a non-empty value.
  1899. // This may be used to include null fields in Patch requests.
  1900. NullFields []string `json:"-"`
  1901. }
  1902. func (s *Histogram) MarshalJSON() ([]byte, error) {
  1903. type NoMethod Histogram
  1904. raw := NoMethod(*s)
  1905. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1906. }
  1907. // InstructionInput: An input of an instruction, as a reference to an
  1908. // output of a
  1909. // producer instruction.
  1910. type InstructionInput struct {
  1911. // OutputNum: The output index (origin zero) within the producer.
  1912. OutputNum int64 `json:"outputNum,omitempty"`
  1913. // ProducerInstructionIndex: The index (origin zero) of the parallel
  1914. // instruction that produces
  1915. // the output to be consumed by this input. This index is relative
  1916. // to the list of instructions in this input's instruction's
  1917. // containing MapTask.
  1918. ProducerInstructionIndex int64 `json:"producerInstructionIndex,omitempty"`
  1919. // ForceSendFields is a list of field names (e.g. "OutputNum") to
  1920. // unconditionally include in API requests. By default, fields with
  1921. // empty values are omitted from API requests. However, any non-pointer,
  1922. // non-interface field appearing in ForceSendFields will be sent to the
  1923. // server regardless of whether the field is empty or not. This may be
  1924. // used to include empty fields in Patch requests.
  1925. ForceSendFields []string `json:"-"`
  1926. // NullFields is a list of field names (e.g. "OutputNum") to include in
  1927. // API requests with the JSON null value. By default, fields with empty
  1928. // values are omitted from API requests. However, any field with an
  1929. // empty value appearing in NullFields will be sent to the server as
  1930. // null. It is an error if a field in this list has a non-empty value.
  1931. // This may be used to include null fields in Patch requests.
  1932. NullFields []string `json:"-"`
  1933. }
  1934. func (s *InstructionInput) MarshalJSON() ([]byte, error) {
  1935. type NoMethod InstructionInput
  1936. raw := NoMethod(*s)
  1937. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1938. }
  1939. // InstructionOutput: An output of an instruction.
  1940. type InstructionOutput struct {
  1941. // Codec: The codec to use to encode data being written via this output.
  1942. Codec googleapi.RawMessage `json:"codec,omitempty"`
  1943. // Name: The user-provided name of this output.
  1944. Name string `json:"name,omitempty"`
  1945. // OnlyCountKeyBytes: For system-generated byte and mean byte metrics,
  1946. // certain instructions
  1947. // should only report the key size.
  1948. OnlyCountKeyBytes bool `json:"onlyCountKeyBytes,omitempty"`
  1949. // OnlyCountValueBytes: For system-generated byte and mean byte metrics,
  1950. // certain instructions
  1951. // should only report the value size.
  1952. OnlyCountValueBytes bool `json:"onlyCountValueBytes,omitempty"`
  1953. // OriginalName: System-defined name for this output in the original
  1954. // workflow graph.
  1955. // Outputs that do not contribute to an original instruction do not set
  1956. // this.
  1957. OriginalName string `json:"originalName,omitempty"`
  1958. // SystemName: System-defined name of this output.
  1959. // Unique across the workflow.
  1960. SystemName string `json:"systemName,omitempty"`
  1961. // ForceSendFields is a list of field names (e.g. "Codec") to
  1962. // unconditionally include in API requests. By default, fields with
  1963. // empty values are omitted from API requests. However, any non-pointer,
  1964. // non-interface field appearing in ForceSendFields will be sent to the
  1965. // server regardless of whether the field is empty or not. This may be
  1966. // used to include empty fields in Patch requests.
  1967. ForceSendFields []string `json:"-"`
  1968. // NullFields is a list of field names (e.g. "Codec") to include in API
  1969. // requests with the JSON null value. By default, fields with empty
  1970. // values are omitted from API requests. However, any field with an
  1971. // empty value appearing in NullFields will be sent to the server as
  1972. // null. It is an error if a field in this list has a non-empty value.
  1973. // This may be used to include null fields in Patch requests.
  1974. NullFields []string `json:"-"`
  1975. }
  1976. func (s *InstructionOutput) MarshalJSON() ([]byte, error) {
  1977. type NoMethod InstructionOutput
  1978. raw := NoMethod(*s)
  1979. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1980. }
  1981. // IntegerGauge: A metric value representing temporal values of a
  1982. // variable.
  1983. type IntegerGauge struct {
  1984. // Timestamp: The time at which this value was measured. Measured as
  1985. // msecs from epoch.
  1986. Timestamp string `json:"timestamp,omitempty"`
  1987. // Value: The value of the variable represented by this gauge.
  1988. Value *SplitInt64 `json:"value,omitempty"`
  1989. // ForceSendFields is a list of field names (e.g. "Timestamp") to
  1990. // unconditionally include in API requests. By default, fields with
  1991. // empty values are omitted from API requests. However, any non-pointer,
  1992. // non-interface field appearing in ForceSendFields will be sent to the
  1993. // server regardless of whether the field is empty or not. This may be
  1994. // used to include empty fields in Patch requests.
  1995. ForceSendFields []string `json:"-"`
  1996. // NullFields is a list of field names (e.g. "Timestamp") to include in
  1997. // API requests with the JSON null value. By default, fields with empty
  1998. // values are omitted from API requests. However, any field with an
  1999. // empty value appearing in NullFields will be sent to the server as
  2000. // null. It is an error if a field in this list has a non-empty value.
  2001. // This may be used to include null fields in Patch requests.
  2002. NullFields []string `json:"-"`
  2003. }
  2004. func (s *IntegerGauge) MarshalJSON() ([]byte, error) {
  2005. type NoMethod IntegerGauge
  2006. raw := NoMethod(*s)
  2007. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2008. }
  2009. // IntegerList: A metric value representing a list of integers.
  2010. type IntegerList struct {
  2011. // Elements: Elements of the list.
  2012. Elements []*SplitInt64 `json:"elements,omitempty"`
  2013. // ForceSendFields is a list of field names (e.g. "Elements") to
  2014. // unconditionally include in API requests. By default, fields with
  2015. // empty values are omitted from API requests. However, any non-pointer,
  2016. // non-interface field appearing in ForceSendFields will be sent to the
  2017. // server regardless of whether the field is empty or not. This may be
  2018. // used to include empty fields in Patch requests.
  2019. ForceSendFields []string `json:"-"`
  2020. // NullFields is a list of field names (e.g. "Elements") to include in
  2021. // API requests with the JSON null value. By default, fields with empty
  2022. // values are omitted from API requests. However, any field with an
  2023. // empty value appearing in NullFields will be sent to the server as
  2024. // null. It is an error if a field in this list has a non-empty value.
  2025. // This may be used to include null fields in Patch requests.
  2026. NullFields []string `json:"-"`
  2027. }
  2028. func (s *IntegerList) MarshalJSON() ([]byte, error) {
  2029. type NoMethod IntegerList
  2030. raw := NoMethod(*s)
  2031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2032. }
  2033. // IntegerMean: A representation of an integer mean metric contribution.
  2034. type IntegerMean struct {
  2035. // Count: The number of values being aggregated.
  2036. Count *SplitInt64 `json:"count,omitempty"`
  2037. // Sum: The sum of all values being aggregated.
  2038. Sum *SplitInt64 `json:"sum,omitempty"`
  2039. // ForceSendFields is a list of field names (e.g. "Count") to
  2040. // unconditionally include in API requests. By default, fields with
  2041. // empty values are omitted from API requests. However, any non-pointer,
  2042. // non-interface field appearing in ForceSendFields will be sent to the
  2043. // server regardless of whether the field is empty or not. This may be
  2044. // used to include empty fields in Patch requests.
  2045. ForceSendFields []string `json:"-"`
  2046. // NullFields is a list of field names (e.g. "Count") to include in API
  2047. // requests with the JSON null value. By default, fields with empty
  2048. // values are omitted from API requests. However, any field with an
  2049. // empty value appearing in NullFields will be sent to the server as
  2050. // null. It is an error if a field in this list has a non-empty value.
  2051. // This may be used to include null fields in Patch requests.
  2052. NullFields []string `json:"-"`
  2053. }
  2054. func (s *IntegerMean) MarshalJSON() ([]byte, error) {
  2055. type NoMethod IntegerMean
  2056. raw := NoMethod(*s)
  2057. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2058. }
  2059. // Job: Defines a job to be run by the Cloud Dataflow service.
  2060. type Job struct {
  2061. // ClientRequestId: The client's unique identifier of the job, re-used
  2062. // across retried attempts.
  2063. // If this field is set, the service will ensure its uniqueness.
  2064. // The request to create a job will fail if the service has knowledge of
  2065. // a
  2066. // previously submitted job with the same client's ID and job name.
  2067. // The caller may use this field to ensure idempotence of job
  2068. // creation across retried attempts to create a job.
  2069. // By default, the field is empty and, in that case, the service ignores
  2070. // it.
  2071. ClientRequestId string `json:"clientRequestId,omitempty"`
  2072. // CreateTime: The timestamp when the job was initially created.
  2073. // Immutable and set by the
  2074. // Cloud Dataflow service.
  2075. CreateTime string `json:"createTime,omitempty"`
  2076. // CreatedFromSnapshotId: If this is specified, the job's initial state
  2077. // is populated from the given
  2078. // snapshot.
  2079. CreatedFromSnapshotId string `json:"createdFromSnapshotId,omitempty"`
  2080. // CurrentState: The current state of the job.
  2081. //
  2082. // Jobs are created in the `JOB_STATE_STOPPED` state unless
  2083. // otherwise
  2084. // specified.
  2085. //
  2086. // A job in the `JOB_STATE_RUNNING` state may asynchronously enter
  2087. // a
  2088. // terminal state. After a job has reached a terminal state, no
  2089. // further state updates may be made.
  2090. //
  2091. // This field may be mutated by the Cloud Dataflow service;
  2092. // callers cannot mutate it.
  2093. //
  2094. // Possible values:
  2095. // "JOB_STATE_UNKNOWN" - The job's run state isn't specified.
  2096. // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job
  2097. // has not
  2098. // yet started to run.
  2099. // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is
  2100. // currently running.
  2101. // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has
  2102. // successfully completed.
  2103. // This is a terminal job state. This state may be set by the Cloud
  2104. // Dataflow
  2105. // service, as a transition from `JOB_STATE_RUNNING`. It may also be set
  2106. // via a
  2107. // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a
  2108. // terminal
  2109. // state.
  2110. // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has
  2111. // failed. This is a
  2112. // terminal job state. This state may only be set by the Cloud
  2113. // Dataflow
  2114. // service, and only as a transition from `JOB_STATE_RUNNING`.
  2115. // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the
  2116. // job has been explicitly
  2117. // cancelled. This is a terminal job state. This state may only be
  2118. // set via a Cloud Dataflow `UpdateJob` call, and only if the job has
  2119. // not
  2120. // yet reached another terminal state.
  2121. // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job
  2122. // was successfully updated,
  2123. // meaning that this job was stopped and another job was started,
  2124. // inheriting
  2125. // state from this one. This is a terminal job state. This state may
  2126. // only be
  2127. // set by the Cloud Dataflow service, and only as a transition
  2128. // from
  2129. // `JOB_STATE_RUNNING`.
  2130. // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job
  2131. // is in the process of draining.
  2132. // A draining job has stopped pulling from its input sources and is
  2133. // processing
  2134. // any data that remains in-flight. This state may be set via a Cloud
  2135. // Dataflow
  2136. // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`.
  2137. // Jobs
  2138. // that are draining may only transition to
  2139. // `JOB_STATE_DRAINED`,
  2140. // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.
  2141. // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job
  2142. // has been drained.
  2143. // A drained job terminated by stopping pulling from its input sources
  2144. // and
  2145. // processing any data that remained in-flight when draining was
  2146. // requested.
  2147. // This state is a terminal state, may only be set by the Cloud
  2148. // Dataflow
  2149. // service, and only as a transition from `JOB_STATE_DRAINING`.
  2150. // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job
  2151. // has been created but is not yet
  2152. // running. Jobs that are pending may only transition to
  2153. // `JOB_STATE_RUNNING`,
  2154. // or `JOB_STATE_FAILED`.
  2155. // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the
  2156. // job has been explicitly cancelled
  2157. // and is in the process of stopping. Jobs that are cancelling may
  2158. // only
  2159. // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`.
  2160. // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has
  2161. // been created but is being
  2162. // delayed until launch. Jobs that are queued may only transition
  2163. // to
  2164. // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`.
  2165. CurrentState string `json:"currentState,omitempty"`
  2166. // CurrentStateTime: The timestamp associated with the current state.
  2167. CurrentStateTime string `json:"currentStateTime,omitempty"`
  2168. // Environment: The environment for the job.
  2169. Environment *Environment `json:"environment,omitempty"`
  2170. // ExecutionInfo: Deprecated.
  2171. ExecutionInfo *JobExecutionInfo `json:"executionInfo,omitempty"`
  2172. // Id: The unique ID of this job.
  2173. //
  2174. // This field is set by the Cloud Dataflow service when the Job
  2175. // is
  2176. // created, and is immutable for the life of the job.
  2177. Id string `json:"id,omitempty"`
  2178. // JobMetadata: This field is populated by the Dataflow service to
  2179. // support filtering jobs
  2180. // by the metadata values provided here. Populated for ListJobs and all
  2181. // GetJob
  2182. // views SUMMARY and higher.
  2183. JobMetadata *JobMetadata `json:"jobMetadata,omitempty"`
  2184. // Labels: User-defined labels for this job.
  2185. //
  2186. // The labels map can contain no more than 64 entries. Entries of the
  2187. // labels
  2188. // map are UTF8 strings that comply with the following restrictions:
  2189. //
  2190. // * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62}
  2191. // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  2192. // * Both keys and values are additionally constrained to be <= 128
  2193. // bytes in
  2194. // size.
  2195. Labels map[string]string `json:"labels,omitempty"`
  2196. // Location: The [regional
  2197. // endpoint]
  2198. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  2199. // dpoints) that
  2200. // contains this job.
  2201. Location string `json:"location,omitempty"`
  2202. // Name: The user-specified Cloud Dataflow job name.
  2203. //
  2204. // Only one Job with a given name may exist in a project at any
  2205. // given time. If a caller attempts to create a Job with the same
  2206. // name as an already-existing Job, the attempt returns the
  2207. // existing Job.
  2208. //
  2209. // The name must match the regular
  2210. // expression
  2211. // `[a-z]([-a-z0-9]{0,38}[a-z0-9])?`
  2212. Name string `json:"name,omitempty"`
  2213. // PipelineDescription: Preliminary field: The format of this data may
  2214. // change at any time.
  2215. // A description of the user pipeline and stages through which it is
  2216. // executed.
  2217. // Created by Cloud Dataflow service. Only retrieved
  2218. // with
  2219. // JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL.
  2220. PipelineDescription *PipelineDescription `json:"pipelineDescription,omitempty"`
  2221. // ProjectId: The ID of the Cloud Platform project that the job belongs
  2222. // to.
  2223. ProjectId string `json:"projectId,omitempty"`
  2224. // ReplaceJobId: If this job is an update of an existing job, this field
  2225. // is the job ID
  2226. // of the job it replaced.
  2227. //
  2228. // When sending a `CreateJobRequest`, you can update a job by specifying
  2229. // it
  2230. // here. The job named here is stopped, and its intermediate state
  2231. // is
  2232. // transferred to this job.
  2233. ReplaceJobId string `json:"replaceJobId,omitempty"`
  2234. // ReplacedByJobId: If another job is an update of this job (and thus,
  2235. // this job is in
  2236. // `JOB_STATE_UPDATED`), this field contains the ID of that job.
  2237. ReplacedByJobId string `json:"replacedByJobId,omitempty"`
  2238. // RequestedState: The job's requested state.
  2239. //
  2240. // `UpdateJob` may be used to switch between the `JOB_STATE_STOPPED`
  2241. // and
  2242. // `JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob`
  2243. // may
  2244. // also be used to directly set a job's requested state
  2245. // to
  2246. // `JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating
  2247. // the
  2248. // job if it has not already reached a terminal state.
  2249. //
  2250. // Possible values:
  2251. // "JOB_STATE_UNKNOWN" - The job's run state isn't specified.
  2252. // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job
  2253. // has not
  2254. // yet started to run.
  2255. // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is
  2256. // currently running.
  2257. // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has
  2258. // successfully completed.
  2259. // This is a terminal job state. This state may be set by the Cloud
  2260. // Dataflow
  2261. // service, as a transition from `JOB_STATE_RUNNING`. It may also be set
  2262. // via a
  2263. // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a
  2264. // terminal
  2265. // state.
  2266. // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has
  2267. // failed. This is a
  2268. // terminal job state. This state may only be set by the Cloud
  2269. // Dataflow
  2270. // service, and only as a transition from `JOB_STATE_RUNNING`.
  2271. // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the
  2272. // job has been explicitly
  2273. // cancelled. This is a terminal job state. This state may only be
  2274. // set via a Cloud Dataflow `UpdateJob` call, and only if the job has
  2275. // not
  2276. // yet reached another terminal state.
  2277. // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job
  2278. // was successfully updated,
  2279. // meaning that this job was stopped and another job was started,
  2280. // inheriting
  2281. // state from this one. This is a terminal job state. This state may
  2282. // only be
  2283. // set by the Cloud Dataflow service, and only as a transition
  2284. // from
  2285. // `JOB_STATE_RUNNING`.
  2286. // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job
  2287. // is in the process of draining.
  2288. // A draining job has stopped pulling from its input sources and is
  2289. // processing
  2290. // any data that remains in-flight. This state may be set via a Cloud
  2291. // Dataflow
  2292. // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`.
  2293. // Jobs
  2294. // that are draining may only transition to
  2295. // `JOB_STATE_DRAINED`,
  2296. // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.
  2297. // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job
  2298. // has been drained.
  2299. // A drained job terminated by stopping pulling from its input sources
  2300. // and
  2301. // processing any data that remained in-flight when draining was
  2302. // requested.
  2303. // This state is a terminal state, may only be set by the Cloud
  2304. // Dataflow
  2305. // service, and only as a transition from `JOB_STATE_DRAINING`.
  2306. // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job
  2307. // has been created but is not yet
  2308. // running. Jobs that are pending may only transition to
  2309. // `JOB_STATE_RUNNING`,
  2310. // or `JOB_STATE_FAILED`.
  2311. // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the
  2312. // job has been explicitly cancelled
  2313. // and is in the process of stopping. Jobs that are cancelling may
  2314. // only
  2315. // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`.
  2316. // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has
  2317. // been created but is being
  2318. // delayed until launch. Jobs that are queued may only transition
  2319. // to
  2320. // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`.
  2321. RequestedState string `json:"requestedState,omitempty"`
  2322. // StageStates: This field may be mutated by the Cloud Dataflow
  2323. // service;
  2324. // callers cannot mutate it.
  2325. StageStates []*ExecutionStageState `json:"stageStates,omitempty"`
  2326. // StartTime: The timestamp when the job was started (transitioned to
  2327. // JOB_STATE_PENDING).
  2328. // Flexible resource scheduling jobs are started with some delay after
  2329. // job
  2330. // creation, so start_time is unset before start and is updated when
  2331. // the
  2332. // job is started by the Cloud Dataflow service. For other jobs,
  2333. // start_time
  2334. // always equals to create_time and is immutable and set by the Cloud
  2335. // Dataflow
  2336. // service.
  2337. StartTime string `json:"startTime,omitempty"`
  2338. // Steps: Exactly one of step or steps_location should be
  2339. // specified.
  2340. //
  2341. // The top-level steps that constitute the entire job.
  2342. Steps []*Step `json:"steps,omitempty"`
  2343. // StepsLocation: The GCS location where the steps are stored.
  2344. StepsLocation string `json:"stepsLocation,omitempty"`
  2345. // TempFiles: A set of files the system should be aware of that are
  2346. // used
  2347. // for temporary storage. These temporary files will be
  2348. // removed on job completion.
  2349. // No duplicates are allowed.
  2350. // No file patterns are supported.
  2351. //
  2352. // The supported files are:
  2353. //
  2354. // Google Cloud Storage:
  2355. //
  2356. // storage.googleapis.com/{bucket}/{object}
  2357. // bucket.storage.googleapis.com/{object}
  2358. TempFiles []string `json:"tempFiles,omitempty"`
  2359. // TransformNameMapping: The map of transform name prefixes of the job
  2360. // to be replaced to the
  2361. // corresponding name prefixes of the new job.
  2362. TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"`
  2363. // Type: The type of Cloud Dataflow job.
  2364. //
  2365. // Possible values:
  2366. // "JOB_TYPE_UNKNOWN" - The type of the job is unspecified, or
  2367. // unknown.
  2368. // "JOB_TYPE_BATCH" - A batch job with a well-defined end point: data
  2369. // is read, data is
  2370. // processed, data is written, and the job is done.
  2371. // "JOB_TYPE_STREAMING" - A continuously streaming job with no end:
  2372. // data is read,
  2373. // processed, and written continuously.
  2374. Type string `json:"type,omitempty"`
  2375. // ServerResponse contains the HTTP response code and headers from the
  2376. // server.
  2377. googleapi.ServerResponse `json:"-"`
  2378. // ForceSendFields is a list of field names (e.g. "ClientRequestId") to
  2379. // unconditionally include in API requests. By default, fields with
  2380. // empty values are omitted from API requests. However, any non-pointer,
  2381. // non-interface field appearing in ForceSendFields will be sent to the
  2382. // server regardless of whether the field is empty or not. This may be
  2383. // used to include empty fields in Patch requests.
  2384. ForceSendFields []string `json:"-"`
  2385. // NullFields is a list of field names (e.g. "ClientRequestId") to
  2386. // include in API requests with the JSON null value. By default, fields
  2387. // with empty values are omitted from API requests. However, any field
  2388. // with an empty value appearing in NullFields will be sent to the
  2389. // server as null. It is an error if a field in this list has a
  2390. // non-empty value. This may be used to include null fields in Patch
  2391. // requests.
  2392. NullFields []string `json:"-"`
  2393. }
  2394. func (s *Job) MarshalJSON() ([]byte, error) {
  2395. type NoMethod Job
  2396. raw := NoMethod(*s)
  2397. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2398. }
  2399. // JobExecutionInfo: Additional information about how a Cloud Dataflow
  2400. // job will be executed that
  2401. // isn't contained in the submitted job.
  2402. type JobExecutionInfo struct {
  2403. // Stages: A mapping from each stage to the information about that
  2404. // stage.
  2405. Stages map[string]JobExecutionStageInfo `json:"stages,omitempty"`
  2406. // ForceSendFields is a list of field names (e.g. "Stages") to
  2407. // unconditionally include in API requests. By default, fields with
  2408. // empty values are omitted from API requests. However, any non-pointer,
  2409. // non-interface field appearing in ForceSendFields will be sent to the
  2410. // server regardless of whether the field is empty or not. This may be
  2411. // used to include empty fields in Patch requests.
  2412. ForceSendFields []string `json:"-"`
  2413. // NullFields is a list of field names (e.g. "Stages") to include in API
  2414. // requests with the JSON null value. By default, fields with empty
  2415. // values are omitted from API requests. However, any field with an
  2416. // empty value appearing in NullFields will be sent to the server as
  2417. // null. It is an error if a field in this list has a non-empty value.
  2418. // This may be used to include null fields in Patch requests.
  2419. NullFields []string `json:"-"`
  2420. }
  2421. func (s *JobExecutionInfo) MarshalJSON() ([]byte, error) {
  2422. type NoMethod JobExecutionInfo
  2423. raw := NoMethod(*s)
  2424. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2425. }
  2426. // JobExecutionStageInfo: Contains information about how a
  2427. // particular
  2428. // google.dataflow.v1beta3.Step will be executed.
  2429. type JobExecutionStageInfo struct {
  2430. // StepName: The steps associated with the execution stage.
  2431. // Note that stages may have several steps, and that a given step
  2432. // might be run by more than one stage.
  2433. StepName []string `json:"stepName,omitempty"`
  2434. // ForceSendFields is a list of field names (e.g. "StepName") 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. "StepName") to include in
  2442. // API requests with the JSON null value. By default, fields with empty
  2443. // values are omitted from API requests. However, any field with an
  2444. // 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 *JobExecutionStageInfo) MarshalJSON() ([]byte, error) {
  2450. type NoMethod JobExecutionStageInfo
  2451. raw := NoMethod(*s)
  2452. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2453. }
  2454. // JobMessage: A particular message pertaining to a Dataflow job.
  2455. type JobMessage struct {
  2456. // Id: Deprecated.
  2457. Id string `json:"id,omitempty"`
  2458. // MessageImportance: Importance level of the message.
  2459. //
  2460. // Possible values:
  2461. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't
  2462. // specified, or is unknown.
  2463. // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level:
  2464. // typically only useful for
  2465. // software engineers working on the code the job is running.
  2466. // Typically, Dataflow pipeline runners do not display log messages
  2467. // at this level by default.
  2468. // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level:
  2469. // somewhat verbose, but
  2470. // potentially useful to users. Typically, Dataflow pipeline
  2471. // runners do not display log messages at this level by default.
  2472. // These messages are displayed by default in the Dataflow
  2473. // monitoring UI.
  2474. // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful
  2475. // for keeping
  2476. // track of the execution of a Dataflow pipeline. Typically,
  2477. // Dataflow pipeline runners display log messages at this level
  2478. // by
  2479. // default, and these messages are displayed by default in the
  2480. // Dataflow monitoring UI.
  2481. // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level:
  2482. // indicating a condition
  2483. // pertaining to a job which may require human intervention.
  2484. // Typically, Dataflow pipeline runners display log messages at
  2485. // this
  2486. // level by default, and these messages are displayed by default in
  2487. // the Dataflow monitoring UI.
  2488. // "JOB_MESSAGE_ERROR" - The message is at the 'error' level:
  2489. // indicating a condition
  2490. // preventing a job from succeeding. Typically, Dataflow
  2491. // pipeline
  2492. // runners display log messages at this level by default, and
  2493. // these
  2494. // messages are displayed by default in the Dataflow monitoring UI.
  2495. MessageImportance string `json:"messageImportance,omitempty"`
  2496. // MessageText: The text of the message.
  2497. MessageText string `json:"messageText,omitempty"`
  2498. // Time: The timestamp of the message.
  2499. Time string `json:"time,omitempty"`
  2500. // ForceSendFields is a list of field names (e.g. "Id") to
  2501. // unconditionally include in API requests. By default, fields with
  2502. // empty values are omitted from API requests. However, any non-pointer,
  2503. // non-interface field appearing in ForceSendFields will be sent to the
  2504. // server regardless of whether the field is empty or not. This may be
  2505. // used to include empty fields in Patch requests.
  2506. ForceSendFields []string `json:"-"`
  2507. // NullFields is a list of field names (e.g. "Id") to include in API
  2508. // requests with the JSON null value. By default, fields with empty
  2509. // values are omitted from API requests. However, any field with an
  2510. // empty value appearing in NullFields will be sent to the server as
  2511. // null. It is an error if a field in this list has a non-empty value.
  2512. // This may be used to include null fields in Patch requests.
  2513. NullFields []string `json:"-"`
  2514. }
  2515. func (s *JobMessage) MarshalJSON() ([]byte, error) {
  2516. type NoMethod JobMessage
  2517. raw := NoMethod(*s)
  2518. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2519. }
  2520. // JobMetadata: Metadata available primarily for filtering jobs. Will be
  2521. // included in the
  2522. // ListJob response and Job SUMMARY view.
  2523. type JobMetadata struct {
  2524. // BigTableDetails: Identification of a BigTable source used in the
  2525. // Dataflow job.
  2526. BigTableDetails []*BigTableIODetails `json:"bigTableDetails,omitempty"`
  2527. // BigqueryDetails: Identification of a BigQuery source used in the
  2528. // Dataflow job.
  2529. BigqueryDetails []*BigQueryIODetails `json:"bigqueryDetails,omitempty"`
  2530. // DatastoreDetails: Identification of a Datastore source used in the
  2531. // Dataflow job.
  2532. DatastoreDetails []*DatastoreIODetails `json:"datastoreDetails,omitempty"`
  2533. // FileDetails: Identification of a File source used in the Dataflow
  2534. // job.
  2535. FileDetails []*FileIODetails `json:"fileDetails,omitempty"`
  2536. // PubsubDetails: Identification of a PubSub source used in the Dataflow
  2537. // job.
  2538. PubsubDetails []*PubSubIODetails `json:"pubsubDetails,omitempty"`
  2539. // SdkVersion: The SDK version used to run the job.
  2540. SdkVersion *SdkVersion `json:"sdkVersion,omitempty"`
  2541. // SpannerDetails: Identification of a Spanner source used in the
  2542. // Dataflow job.
  2543. SpannerDetails []*SpannerIODetails `json:"spannerDetails,omitempty"`
  2544. // ForceSendFields is a list of field names (e.g. "BigTableDetails") to
  2545. // unconditionally include in API requests. By default, fields with
  2546. // empty values are omitted from API requests. However, any non-pointer,
  2547. // non-interface field appearing in ForceSendFields will be sent to the
  2548. // server regardless of whether the field is empty or not. This may be
  2549. // used to include empty fields in Patch requests.
  2550. ForceSendFields []string `json:"-"`
  2551. // NullFields is a list of field names (e.g. "BigTableDetails") to
  2552. // include in API requests with the JSON null value. By default, fields
  2553. // with empty values are omitted from API requests. However, any field
  2554. // with an empty value appearing in NullFields will be sent to the
  2555. // server as null. It is an error if a field in this list has a
  2556. // non-empty value. This may be used to include null fields in Patch
  2557. // requests.
  2558. NullFields []string `json:"-"`
  2559. }
  2560. func (s *JobMetadata) MarshalJSON() ([]byte, error) {
  2561. type NoMethod JobMetadata
  2562. raw := NoMethod(*s)
  2563. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2564. }
  2565. // JobMetrics: JobMetrics contains a collection of metrics describing
  2566. // the detailed progress
  2567. // of a Dataflow job. Metrics correspond to user-defined and
  2568. // system-defined
  2569. // metrics in the job.
  2570. //
  2571. // This resource captures only the most recent values of each
  2572. // metric;
  2573. // time-series data can be queried for them (under the same metric
  2574. // names)
  2575. // from Cloud Monitoring.
  2576. type JobMetrics struct {
  2577. // MetricTime: Timestamp as of which metric values are current.
  2578. MetricTime string `json:"metricTime,omitempty"`
  2579. // Metrics: All metrics for this job.
  2580. Metrics []*MetricUpdate `json:"metrics,omitempty"`
  2581. // ServerResponse contains the HTTP response code and headers from the
  2582. // server.
  2583. googleapi.ServerResponse `json:"-"`
  2584. // ForceSendFields is a list of field names (e.g. "MetricTime") to
  2585. // unconditionally include in API requests. By default, fields with
  2586. // empty values are omitted from API requests. However, any non-pointer,
  2587. // non-interface field appearing in ForceSendFields will be sent to the
  2588. // server regardless of whether the field is empty or not. This may be
  2589. // used to include empty fields in Patch requests.
  2590. ForceSendFields []string `json:"-"`
  2591. // NullFields is a list of field names (e.g. "MetricTime") to include in
  2592. // API requests with the JSON null value. By default, fields with empty
  2593. // values are omitted from API requests. However, any field with an
  2594. // empty value appearing in NullFields will be sent to the server as
  2595. // null. It is an error if a field in this list has a non-empty value.
  2596. // This may be used to include null fields in Patch requests.
  2597. NullFields []string `json:"-"`
  2598. }
  2599. func (s *JobMetrics) MarshalJSON() ([]byte, error) {
  2600. type NoMethod JobMetrics
  2601. raw := NoMethod(*s)
  2602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2603. }
  2604. // KeyRangeDataDiskAssignment: Data disk assignment information for a
  2605. // specific key-range of a sharded
  2606. // computation.
  2607. // Currently we only support UTF-8 character splits to simplify encoding
  2608. // into
  2609. // JSON.
  2610. type KeyRangeDataDiskAssignment struct {
  2611. // DataDisk: The name of the data disk where data for this range is
  2612. // stored.
  2613. // This name is local to the Google Cloud Platform project and
  2614. // uniquely
  2615. // identifies the disk within that project, for
  2616. // example
  2617. // "myproject-1014-104817-4c2-harness-0-disk-1".
  2618. DataDisk string `json:"dataDisk,omitempty"`
  2619. // End: The end (exclusive) of the key range.
  2620. End string `json:"end,omitempty"`
  2621. // Start: The start (inclusive) of the key range.
  2622. Start string `json:"start,omitempty"`
  2623. // ForceSendFields is a list of field names (e.g. "DataDisk") to
  2624. // unconditionally include in API requests. By default, fields with
  2625. // empty values are omitted from API requests. However, any non-pointer,
  2626. // non-interface field appearing in ForceSendFields will be sent to the
  2627. // server regardless of whether the field is empty or not. This may be
  2628. // used to include empty fields in Patch requests.
  2629. ForceSendFields []string `json:"-"`
  2630. // NullFields is a list of field names (e.g. "DataDisk") to include in
  2631. // API requests with the JSON null value. By default, fields with empty
  2632. // values are omitted from API requests. However, any field with an
  2633. // empty value appearing in NullFields will be sent to the server as
  2634. // null. It is an error if a field in this list has a non-empty value.
  2635. // This may be used to include null fields in Patch requests.
  2636. NullFields []string `json:"-"`
  2637. }
  2638. func (s *KeyRangeDataDiskAssignment) MarshalJSON() ([]byte, error) {
  2639. type NoMethod KeyRangeDataDiskAssignment
  2640. raw := NoMethod(*s)
  2641. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2642. }
  2643. // KeyRangeLocation: Location information for a specific key-range of a
  2644. // sharded computation.
  2645. // Currently we only support UTF-8 character splits to simplify encoding
  2646. // into
  2647. // JSON.
  2648. type KeyRangeLocation struct {
  2649. // DataDisk: The name of the data disk where data for this range is
  2650. // stored.
  2651. // This name is local to the Google Cloud Platform project and
  2652. // uniquely
  2653. // identifies the disk within that project, for
  2654. // example
  2655. // "myproject-1014-104817-4c2-harness-0-disk-1".
  2656. DataDisk string `json:"dataDisk,omitempty"`
  2657. // DeliveryEndpoint: The physical location of this range assignment to
  2658. // be used for
  2659. // streaming computation cross-worker message delivery.
  2660. DeliveryEndpoint string `json:"deliveryEndpoint,omitempty"`
  2661. // DeprecatedPersistentDirectory: DEPRECATED. The location of the
  2662. // persistent state for this range, as a
  2663. // persistent directory in the worker local filesystem.
  2664. DeprecatedPersistentDirectory string `json:"deprecatedPersistentDirectory,omitempty"`
  2665. // End: The end (exclusive) of the key range.
  2666. End string `json:"end,omitempty"`
  2667. // Start: The start (inclusive) of the key range.
  2668. Start string `json:"start,omitempty"`
  2669. // ForceSendFields is a list of field names (e.g. "DataDisk") to
  2670. // unconditionally include in API requests. By default, fields with
  2671. // empty values are omitted from API requests. However, any non-pointer,
  2672. // non-interface field appearing in ForceSendFields will be sent to the
  2673. // server regardless of whether the field is empty or not. This may be
  2674. // used to include empty fields in Patch requests.
  2675. ForceSendFields []string `json:"-"`
  2676. // NullFields is a list of field names (e.g. "DataDisk") to include in
  2677. // API requests with the JSON null value. By default, fields with empty
  2678. // values are omitted from API requests. However, any field with an
  2679. // empty value appearing in NullFields will be sent to the server as
  2680. // null. It is an error if a field in this list has a non-empty value.
  2681. // This may be used to include null fields in Patch requests.
  2682. NullFields []string `json:"-"`
  2683. }
  2684. func (s *KeyRangeLocation) MarshalJSON() ([]byte, error) {
  2685. type NoMethod KeyRangeLocation
  2686. raw := NoMethod(*s)
  2687. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2688. }
  2689. // LaunchTemplateParameters: Parameters to provide to the template being
  2690. // launched.
  2691. type LaunchTemplateParameters struct {
  2692. // Environment: The runtime environment for the job.
  2693. Environment *RuntimeEnvironment `json:"environment,omitempty"`
  2694. // JobName: Required. The job name to use for the created job.
  2695. JobName string `json:"jobName,omitempty"`
  2696. // Parameters: The runtime parameters to pass to the job.
  2697. Parameters map[string]string `json:"parameters,omitempty"`
  2698. // ForceSendFields is a list of field names (e.g. "Environment") to
  2699. // unconditionally include in API requests. By default, fields with
  2700. // empty values are omitted from API requests. However, any non-pointer,
  2701. // non-interface field appearing in ForceSendFields will be sent to the
  2702. // server regardless of whether the field is empty or not. This may be
  2703. // used to include empty fields in Patch requests.
  2704. ForceSendFields []string `json:"-"`
  2705. // NullFields is a list of field names (e.g. "Environment") to include
  2706. // in API requests with the JSON null value. By default, fields with
  2707. // empty values are omitted from API requests. However, any field with
  2708. // an empty value appearing in NullFields will be sent to the server as
  2709. // null. It is an error if a field in this list has a non-empty value.
  2710. // This may be used to include null fields in Patch requests.
  2711. NullFields []string `json:"-"`
  2712. }
  2713. func (s *LaunchTemplateParameters) MarshalJSON() ([]byte, error) {
  2714. type NoMethod LaunchTemplateParameters
  2715. raw := NoMethod(*s)
  2716. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2717. }
  2718. // LaunchTemplateResponse: Response to the request to launch a template.
  2719. type LaunchTemplateResponse struct {
  2720. // Job: The job that was launched, if the request was not a dry run
  2721. // and
  2722. // the job was successfully launched.
  2723. Job *Job `json:"job,omitempty"`
  2724. // ServerResponse contains the HTTP response code and headers from the
  2725. // server.
  2726. googleapi.ServerResponse `json:"-"`
  2727. // ForceSendFields is a list of field names (e.g. "Job") to
  2728. // unconditionally include in API requests. By default, fields with
  2729. // empty values are omitted from API requests. However, any non-pointer,
  2730. // non-interface field appearing in ForceSendFields will be sent to the
  2731. // server regardless of whether the field is empty or not. This may be
  2732. // used to include empty fields in Patch requests.
  2733. ForceSendFields []string `json:"-"`
  2734. // NullFields is a list of field names (e.g. "Job") to include in API
  2735. // requests with the JSON null value. By default, fields with empty
  2736. // values are omitted from API requests. However, any field with an
  2737. // empty value appearing in NullFields will be sent to the server as
  2738. // null. It is an error if a field in this list has a non-empty value.
  2739. // This may be used to include null fields in Patch requests.
  2740. NullFields []string `json:"-"`
  2741. }
  2742. func (s *LaunchTemplateResponse) MarshalJSON() ([]byte, error) {
  2743. type NoMethod LaunchTemplateResponse
  2744. raw := NoMethod(*s)
  2745. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2746. }
  2747. // LeaseWorkItemRequest: Request to lease WorkItems.
  2748. type LeaseWorkItemRequest struct {
  2749. // CurrentWorkerTime: The current timestamp at the worker.
  2750. CurrentWorkerTime string `json:"currentWorkerTime,omitempty"`
  2751. // Location: The [regional
  2752. // endpoint]
  2753. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  2754. // dpoints) that
  2755. // contains the WorkItem's job.
  2756. Location string `json:"location,omitempty"`
  2757. // RequestedLeaseDuration: The initial lease period.
  2758. RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"`
  2759. // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkRequest from
  2760. // UnifiedWorker.
  2761. UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"`
  2762. // WorkItemTypes: Filter for WorkItem type.
  2763. WorkItemTypes []string `json:"workItemTypes,omitempty"`
  2764. // WorkerCapabilities: Worker capabilities. WorkItems might be limited
  2765. // to workers with specific
  2766. // capabilities.
  2767. WorkerCapabilities []string `json:"workerCapabilities,omitempty"`
  2768. // WorkerId: Identifies the worker leasing work -- typically the ID of
  2769. // the
  2770. // virtual machine running the worker.
  2771. WorkerId string `json:"workerId,omitempty"`
  2772. // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime")
  2773. // to unconditionally include in API requests. By default, fields with
  2774. // empty values are omitted from API requests. However, any non-pointer,
  2775. // non-interface field appearing in ForceSendFields will be sent to the
  2776. // server regardless of whether the field is empty or not. This may be
  2777. // used to include empty fields in Patch requests.
  2778. ForceSendFields []string `json:"-"`
  2779. // NullFields is a list of field names (e.g. "CurrentWorkerTime") to
  2780. // include in API requests with the JSON null value. By default, fields
  2781. // with empty values are omitted from API requests. However, any field
  2782. // with an empty value appearing in NullFields will be sent to the
  2783. // server as null. It is an error if a field in this list has a
  2784. // non-empty value. This may be used to include null fields in Patch
  2785. // requests.
  2786. NullFields []string `json:"-"`
  2787. }
  2788. func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) {
  2789. type NoMethod LeaseWorkItemRequest
  2790. raw := NoMethod(*s)
  2791. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2792. }
  2793. // LeaseWorkItemResponse: Response to a request to lease WorkItems.
  2794. type LeaseWorkItemResponse struct {
  2795. // UnifiedWorkerResponse: Untranslated bag-of-bytes WorkResponse for
  2796. // UnifiedWorker.
  2797. UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"`
  2798. // WorkItems: A list of the leased WorkItems.
  2799. WorkItems []*WorkItem `json:"workItems,omitempty"`
  2800. // ServerResponse contains the HTTP response code and headers from the
  2801. // server.
  2802. googleapi.ServerResponse `json:"-"`
  2803. // ForceSendFields is a list of field names (e.g.
  2804. // "UnifiedWorkerResponse") to unconditionally include in API requests.
  2805. // By default, fields with empty values are omitted from API requests.
  2806. // However, any non-pointer, non-interface field appearing in
  2807. // ForceSendFields will be sent to the server regardless of whether the
  2808. // field is empty or not. This may be used to include empty fields in
  2809. // Patch requests.
  2810. ForceSendFields []string `json:"-"`
  2811. // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to
  2812. // include in API requests with the JSON null value. By default, fields
  2813. // with empty values are omitted from API requests. However, any field
  2814. // with an empty value appearing in NullFields will be sent to the
  2815. // server as null. It is an error if a field in this list has a
  2816. // non-empty value. This may be used to include null fields in Patch
  2817. // requests.
  2818. NullFields []string `json:"-"`
  2819. }
  2820. func (s *LeaseWorkItemResponse) MarshalJSON() ([]byte, error) {
  2821. type NoMethod LeaseWorkItemResponse
  2822. raw := NoMethod(*s)
  2823. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2824. }
  2825. // ListJobMessagesResponse: Response to a request to list job messages.
  2826. type ListJobMessagesResponse struct {
  2827. // AutoscalingEvents: Autoscaling events in ascending timestamp order.
  2828. AutoscalingEvents []*AutoscalingEvent `json:"autoscalingEvents,omitempty"`
  2829. // JobMessages: Messages in ascending timestamp order.
  2830. JobMessages []*JobMessage `json:"jobMessages,omitempty"`
  2831. // NextPageToken: The token to obtain the next page of results if there
  2832. // are more.
  2833. NextPageToken string `json:"nextPageToken,omitempty"`
  2834. // ServerResponse contains the HTTP response code and headers from the
  2835. // server.
  2836. googleapi.ServerResponse `json:"-"`
  2837. // ForceSendFields is a list of field names (e.g. "AutoscalingEvents")
  2838. // to unconditionally include in API requests. By default, fields with
  2839. // empty values are omitted from API requests. However, any non-pointer,
  2840. // non-interface field appearing in ForceSendFields will be sent to the
  2841. // server regardless of whether the field is empty or not. This may be
  2842. // used to include empty fields in Patch requests.
  2843. ForceSendFields []string `json:"-"`
  2844. // NullFields is a list of field names (e.g. "AutoscalingEvents") to
  2845. // include in API requests with the JSON null value. By default, fields
  2846. // with empty values are omitted from API requests. However, any field
  2847. // with an empty value appearing in NullFields will be sent to the
  2848. // server as null. It is an error if a field in this list has a
  2849. // non-empty value. This may be used to include null fields in Patch
  2850. // requests.
  2851. NullFields []string `json:"-"`
  2852. }
  2853. func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) {
  2854. type NoMethod ListJobMessagesResponse
  2855. raw := NoMethod(*s)
  2856. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2857. }
  2858. // ListJobsResponse: Response to a request to list Cloud Dataflow jobs.
  2859. // This may be a partial
  2860. // response, depending on the page size in the ListJobsRequest.
  2861. type ListJobsResponse struct {
  2862. // FailedLocation: Zero or more messages describing the [regional
  2863. // endpoints]
  2864. // (https://cloud.google.com/dataflow/docs/concepts/regional-e
  2865. // ndpoints) that
  2866. // failed to respond.
  2867. FailedLocation []*FailedLocation `json:"failedLocation,omitempty"`
  2868. // Jobs: A subset of the requested job information.
  2869. Jobs []*Job `json:"jobs,omitempty"`
  2870. // NextPageToken: Set if there may be more results than fit in this
  2871. // response.
  2872. NextPageToken string `json:"nextPageToken,omitempty"`
  2873. // ServerResponse contains the HTTP response code and headers from the
  2874. // server.
  2875. googleapi.ServerResponse `json:"-"`
  2876. // ForceSendFields is a list of field names (e.g. "FailedLocation") to
  2877. // unconditionally include in API requests. By default, fields with
  2878. // empty values are omitted from API requests. However, any non-pointer,
  2879. // non-interface field appearing in ForceSendFields will be sent to the
  2880. // server regardless of whether the field is empty or not. This may be
  2881. // used to include empty fields in Patch requests.
  2882. ForceSendFields []string `json:"-"`
  2883. // NullFields is a list of field names (e.g. "FailedLocation") to
  2884. // include in API requests with the JSON null value. By default, fields
  2885. // with empty values are omitted from API requests. However, any field
  2886. // with an empty value appearing in NullFields will be sent to the
  2887. // server as null. It is an error if a field in this list has a
  2888. // non-empty value. This may be used to include null fields in Patch
  2889. // requests.
  2890. NullFields []string `json:"-"`
  2891. }
  2892. func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
  2893. type NoMethod ListJobsResponse
  2894. raw := NoMethod(*s)
  2895. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2896. }
  2897. // MapTask: MapTask consists of an ordered set of instructions, each of
  2898. // which
  2899. // describes one particular low-level operation for the worker
  2900. // to
  2901. // perform in order to accomplish the MapTask's WorkItem.
  2902. //
  2903. // Each instruction must appear in the list before any instructions
  2904. // which
  2905. // depends on its output.
  2906. type MapTask struct {
  2907. // CounterPrefix: Counter prefix that can be used to prefix counters.
  2908. // Not currently used in
  2909. // Dataflow.
  2910. CounterPrefix string `json:"counterPrefix,omitempty"`
  2911. // Instructions: The instructions in the MapTask.
  2912. Instructions []*ParallelInstruction `json:"instructions,omitempty"`
  2913. // StageName: System-defined name of the stage containing this
  2914. // MapTask.
  2915. // Unique across the workflow.
  2916. StageName string `json:"stageName,omitempty"`
  2917. // SystemName: System-defined name of this MapTask.
  2918. // Unique across the workflow.
  2919. SystemName string `json:"systemName,omitempty"`
  2920. // ForceSendFields is a list of field names (e.g. "CounterPrefix") to
  2921. // unconditionally include in API requests. By default, fields with
  2922. // empty values are omitted from API requests. However, any non-pointer,
  2923. // non-interface field appearing in ForceSendFields will be sent to the
  2924. // server regardless of whether the field is empty or not. This may be
  2925. // used to include empty fields in Patch requests.
  2926. ForceSendFields []string `json:"-"`
  2927. // NullFields is a list of field names (e.g. "CounterPrefix") to include
  2928. // in API requests with the JSON null value. By default, fields with
  2929. // empty values are omitted from API requests. However, any field with
  2930. // an empty value appearing in NullFields will be sent to the server as
  2931. // null. It is an error if a field in this list has a non-empty value.
  2932. // This may be used to include null fields in Patch requests.
  2933. NullFields []string `json:"-"`
  2934. }
  2935. func (s *MapTask) MarshalJSON() ([]byte, error) {
  2936. type NoMethod MapTask
  2937. raw := NoMethod(*s)
  2938. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2939. }
  2940. // MetricShortId: The metric short id is returned to the user alongside
  2941. // an offset into
  2942. // ReportWorkItemStatusRequest
  2943. type MetricShortId struct {
  2944. // MetricIndex: The index of the corresponding metric in
  2945. // the ReportWorkItemStatusRequest. Required.
  2946. MetricIndex int64 `json:"metricIndex,omitempty"`
  2947. // ShortId: The service-generated short identifier for the metric.
  2948. ShortId int64 `json:"shortId,omitempty,string"`
  2949. // ForceSendFields is a list of field names (e.g. "MetricIndex") to
  2950. // unconditionally include in API requests. By default, fields with
  2951. // empty values are omitted from API requests. However, any non-pointer,
  2952. // non-interface field appearing in ForceSendFields will be sent to the
  2953. // server regardless of whether the field is empty or not. This may be
  2954. // used to include empty fields in Patch requests.
  2955. ForceSendFields []string `json:"-"`
  2956. // NullFields is a list of field names (e.g. "MetricIndex") to include
  2957. // in API requests with the JSON null value. By default, fields with
  2958. // empty values are omitted from API requests. However, any field with
  2959. // an empty value appearing in NullFields will be sent to the server as
  2960. // null. It is an error if a field in this list has a non-empty value.
  2961. // This may be used to include null fields in Patch requests.
  2962. NullFields []string `json:"-"`
  2963. }
  2964. func (s *MetricShortId) MarshalJSON() ([]byte, error) {
  2965. type NoMethod MetricShortId
  2966. raw := NoMethod(*s)
  2967. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2968. }
  2969. // MetricStructuredName: Identifies a metric, by describing the source
  2970. // which generated the
  2971. // metric.
  2972. type MetricStructuredName struct {
  2973. // Context: Zero or more labeled fields which identify the part of the
  2974. // job this
  2975. // metric is associated with, such as the name of a step or
  2976. // collection.
  2977. //
  2978. // For example, built-in counters associated with steps will
  2979. // have
  2980. // context['step'] = <step-name>. Counters associated with
  2981. // PCollections
  2982. // in the SDK will have context['pcollection'] = <pcollection-name>.
  2983. Context map[string]string `json:"context,omitempty"`
  2984. // Name: Worker-defined metric name.
  2985. Name string `json:"name,omitempty"`
  2986. // Origin: Origin (namespace) of metric name. May be blank for
  2987. // user-define metrics;
  2988. // will be "dataflow" for metrics defined by the Dataflow service or
  2989. // SDK.
  2990. Origin string `json:"origin,omitempty"`
  2991. // ForceSendFields is a list of field names (e.g. "Context") to
  2992. // unconditionally include in API requests. By default, fields with
  2993. // empty values are omitted from API requests. However, any non-pointer,
  2994. // non-interface field appearing in ForceSendFields will be sent to the
  2995. // server regardless of whether the field is empty or not. This may be
  2996. // used to include empty fields in Patch requests.
  2997. ForceSendFields []string `json:"-"`
  2998. // NullFields is a list of field names (e.g. "Context") to include in
  2999. // API requests with the JSON null value. By default, fields with empty
  3000. // values are omitted from API requests. However, any field with an
  3001. // empty value appearing in NullFields will be sent to the server as
  3002. // null. It is an error if a field in this list has a non-empty value.
  3003. // This may be used to include null fields in Patch requests.
  3004. NullFields []string `json:"-"`
  3005. }
  3006. func (s *MetricStructuredName) MarshalJSON() ([]byte, error) {
  3007. type NoMethod MetricStructuredName
  3008. raw := NoMethod(*s)
  3009. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3010. }
  3011. // MetricUpdate: Describes the state of a metric.
  3012. type MetricUpdate struct {
  3013. // Cumulative: True if this metric is reported as the total cumulative
  3014. // aggregate
  3015. // value accumulated since the worker started working on this
  3016. // WorkItem.
  3017. // By default this is false, indicating that this metric is reported
  3018. // as a delta that is not associated with any WorkItem.
  3019. Cumulative bool `json:"cumulative,omitempty"`
  3020. // Distribution: A struct value describing properties of a distribution
  3021. // of numeric values.
  3022. Distribution interface{} `json:"distribution,omitempty"`
  3023. // Gauge: A struct value describing properties of a Gauge.
  3024. // Metrics of gauge type show the value of a metric across time, and
  3025. // is
  3026. // aggregated based on the newest value.
  3027. Gauge interface{} `json:"gauge,omitempty"`
  3028. // Internal: Worker-computed aggregate value for internal use by the
  3029. // Dataflow
  3030. // service.
  3031. Internal interface{} `json:"internal,omitempty"`
  3032. // Kind: Metric aggregation kind. The possible metric aggregation kinds
  3033. // are
  3034. // "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and
  3035. // "Distribution".
  3036. // The specified aggregation kind is case-insensitive.
  3037. //
  3038. // If omitted, this is not an aggregated value but instead
  3039. // a single metric sample value.
  3040. Kind string `json:"kind,omitempty"`
  3041. // MeanCount: Worker-computed aggregate value for the "Mean" aggregation
  3042. // kind.
  3043. // This holds the count of the aggregated values and is used in
  3044. // combination
  3045. // with mean_sum above to obtain the actual mean aggregate value.
  3046. // The only possible value type is Long.
  3047. MeanCount interface{} `json:"meanCount,omitempty"`
  3048. // MeanSum: Worker-computed aggregate value for the "Mean" aggregation
  3049. // kind.
  3050. // This holds the sum of the aggregated values and is used in
  3051. // combination
  3052. // with mean_count below to obtain the actual mean aggregate value.
  3053. // The only possible value types are Long and Double.
  3054. MeanSum interface{} `json:"meanSum,omitempty"`
  3055. // Name: Name of the metric.
  3056. Name *MetricStructuredName `json:"name,omitempty"`
  3057. // Scalar: Worker-computed aggregate value for aggregation kinds "Sum",
  3058. // "Max", "Min",
  3059. // "And", and "Or". The possible value types are Long, Double, and
  3060. // Boolean.
  3061. Scalar interface{} `json:"scalar,omitempty"`
  3062. // Set: Worker-computed aggregate value for the "Set" aggregation kind.
  3063. // The only
  3064. // possible value type is a list of Values whose type can be Long,
  3065. // Double,
  3066. // or String, according to the metric's type. All Values in the list
  3067. // must
  3068. // be of the same type.
  3069. Set interface{} `json:"set,omitempty"`
  3070. // UpdateTime: Timestamp associated with the metric value. Optional when
  3071. // workers are
  3072. // reporting work progress; it will be filled in responses from
  3073. // the
  3074. // metrics API.
  3075. UpdateTime string `json:"updateTime,omitempty"`
  3076. // ForceSendFields is a list of field names (e.g. "Cumulative") to
  3077. // unconditionally include in API requests. By default, fields with
  3078. // empty values are omitted from API requests. However, any non-pointer,
  3079. // non-interface field appearing in ForceSendFields will be sent to the
  3080. // server regardless of whether the field is empty or not. This may be
  3081. // used to include empty fields in Patch requests.
  3082. ForceSendFields []string `json:"-"`
  3083. // NullFields is a list of field names (e.g. "Cumulative") to include in
  3084. // API requests with the JSON null value. By default, fields with empty
  3085. // values are omitted from API requests. However, any field with an
  3086. // empty value appearing in NullFields will be sent to the server as
  3087. // null. It is an error if a field in this list has a non-empty value.
  3088. // This may be used to include null fields in Patch requests.
  3089. NullFields []string `json:"-"`
  3090. }
  3091. func (s *MetricUpdate) MarshalJSON() ([]byte, error) {
  3092. type NoMethod MetricUpdate
  3093. raw := NoMethod(*s)
  3094. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3095. }
  3096. // MountedDataDisk: Describes mounted data disk.
  3097. type MountedDataDisk struct {
  3098. // DataDisk: The name of the data disk.
  3099. // This name is local to the Google Cloud Platform project and
  3100. // uniquely
  3101. // identifies the disk within that project, for
  3102. // example
  3103. // "myproject-1014-104817-4c2-harness-0-disk-1".
  3104. DataDisk string `json:"dataDisk,omitempty"`
  3105. // ForceSendFields is a list of field names (e.g. "DataDisk") to
  3106. // unconditionally include in API requests. By default, fields with
  3107. // empty values are omitted from API requests. However, any non-pointer,
  3108. // non-interface field appearing in ForceSendFields will be sent to the
  3109. // server regardless of whether the field is empty or not. This may be
  3110. // used to include empty fields in Patch requests.
  3111. ForceSendFields []string `json:"-"`
  3112. // NullFields is a list of field names (e.g. "DataDisk") to include in
  3113. // API requests with the JSON null value. By default, fields with empty
  3114. // values are omitted from API requests. However, any field with an
  3115. // empty value appearing in NullFields will be sent to the server as
  3116. // null. It is an error if a field in this list has a non-empty value.
  3117. // This may be used to include null fields in Patch requests.
  3118. NullFields []string `json:"-"`
  3119. }
  3120. func (s *MountedDataDisk) MarshalJSON() ([]byte, error) {
  3121. type NoMethod MountedDataDisk
  3122. raw := NoMethod(*s)
  3123. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3124. }
  3125. // MultiOutputInfo: Information about an output of a multi-output DoFn.
  3126. type MultiOutputInfo struct {
  3127. // Tag: The id of the tag the user code will emit to this output by;
  3128. // this
  3129. // should correspond to the tag of some SideInputInfo.
  3130. Tag string `json:"tag,omitempty"`
  3131. // ForceSendFields is a list of field names (e.g. "Tag") to
  3132. // unconditionally include in API requests. By default, fields with
  3133. // empty values are omitted from API requests. However, any non-pointer,
  3134. // non-interface field appearing in ForceSendFields will be sent to the
  3135. // server regardless of whether the field is empty or not. This may be
  3136. // used to include empty fields in Patch requests.
  3137. ForceSendFields []string `json:"-"`
  3138. // NullFields is a list of field names (e.g. "Tag") to include in API
  3139. // requests with the JSON null value. By default, fields with empty
  3140. // values are omitted from API requests. However, any field with an
  3141. // empty value appearing in NullFields will be sent to the server as
  3142. // null. It is an error if a field in this list has a non-empty value.
  3143. // This may be used to include null fields in Patch requests.
  3144. NullFields []string `json:"-"`
  3145. }
  3146. func (s *MultiOutputInfo) MarshalJSON() ([]byte, error) {
  3147. type NoMethod MultiOutputInfo
  3148. raw := NoMethod(*s)
  3149. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3150. }
  3151. // NameAndKind: Basic metadata about a counter.
  3152. type NameAndKind struct {
  3153. // Kind: Counter aggregation kind.
  3154. //
  3155. // Possible values:
  3156. // "INVALID" - Counter aggregation kind was not set.
  3157. // "SUM" - Aggregated value is the sum of all contributed values.
  3158. // "MAX" - Aggregated value is the max of all contributed values.
  3159. // "MIN" - Aggregated value is the min of all contributed values.
  3160. // "MEAN" - Aggregated value is the mean of all contributed values.
  3161. // "OR" - Aggregated value represents the logical 'or' of all
  3162. // contributed values.
  3163. // "AND" - Aggregated value represents the logical 'and' of all
  3164. // contributed values.
  3165. // "SET" - Aggregated value is a set of unique contributed values.
  3166. // "DISTRIBUTION" - Aggregated value captures statistics about a
  3167. // distribution.
  3168. // "LATEST_VALUE" - Aggregated value tracks the latest value of a
  3169. // variable.
  3170. Kind string `json:"kind,omitempty"`
  3171. // Name: Name of the counter.
  3172. Name string `json:"name,omitempty"`
  3173. // ForceSendFields is a list of field names (e.g. "Kind") to
  3174. // unconditionally include in API requests. By default, fields with
  3175. // empty values are omitted from API requests. However, any non-pointer,
  3176. // non-interface field appearing in ForceSendFields will be sent to the
  3177. // server regardless of whether the field is empty or not. This may be
  3178. // used to include empty fields in Patch requests.
  3179. ForceSendFields []string `json:"-"`
  3180. // NullFields is a list of field names (e.g. "Kind") to include in API
  3181. // requests with the JSON null value. By default, fields with empty
  3182. // values are omitted from API requests. However, any field with an
  3183. // empty value appearing in NullFields will be sent to the server as
  3184. // null. It is an error if a field in this list has a non-empty value.
  3185. // This may be used to include null fields in Patch requests.
  3186. NullFields []string `json:"-"`
  3187. }
  3188. func (s *NameAndKind) MarshalJSON() ([]byte, error) {
  3189. type NoMethod NameAndKind
  3190. raw := NoMethod(*s)
  3191. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3192. }
  3193. // Package: The packages that must be installed in order for a worker to
  3194. // run the
  3195. // steps of the Cloud Dataflow job that will be assigned to its
  3196. // worker
  3197. // pool.
  3198. //
  3199. // This is the mechanism by which the Cloud Dataflow SDK causes code
  3200. // to
  3201. // be loaded onto the workers. For example, the Cloud Dataflow Java
  3202. // SDK
  3203. // might use this to install jars containing the user's code and all of
  3204. // the
  3205. // various dependencies (libraries, data files, etc.) required in
  3206. // order
  3207. // for that code to run.
  3208. type Package struct {
  3209. // Location: The resource to read the package from. The supported
  3210. // resource type is:
  3211. //
  3212. // Google Cloud Storage:
  3213. //
  3214. // storage.googleapis.com/{bucket}
  3215. // bucket.storage.googleapis.com/
  3216. Location string `json:"location,omitempty"`
  3217. // Name: The name of the package.
  3218. Name string `json:"name,omitempty"`
  3219. // ForceSendFields is a list of field names (e.g. "Location") to
  3220. // unconditionally include in API requests. By default, fields with
  3221. // empty values are omitted from API requests. However, any non-pointer,
  3222. // non-interface field appearing in ForceSendFields will be sent to the
  3223. // server regardless of whether the field is empty or not. This may be
  3224. // used to include empty fields in Patch requests.
  3225. ForceSendFields []string `json:"-"`
  3226. // NullFields is a list of field names (e.g. "Location") to include in
  3227. // API requests with the JSON null value. By default, fields with empty
  3228. // values are omitted from API requests. However, any field with an
  3229. // empty value appearing in NullFields will be sent to the server as
  3230. // null. It is an error if a field in this list has a non-empty value.
  3231. // This may be used to include null fields in Patch requests.
  3232. NullFields []string `json:"-"`
  3233. }
  3234. func (s *Package) MarshalJSON() ([]byte, error) {
  3235. type NoMethod Package
  3236. raw := NoMethod(*s)
  3237. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3238. }
  3239. // ParDoInstruction: An instruction that does a ParDo operation.
  3240. // Takes one main input and zero or more side inputs, and produces
  3241. // zero or more outputs.
  3242. // Runs user code.
  3243. type ParDoInstruction struct {
  3244. // Input: The input.
  3245. Input *InstructionInput `json:"input,omitempty"`
  3246. // MultiOutputInfos: Information about each of the outputs, if user_fn
  3247. // is a MultiDoFn.
  3248. MultiOutputInfos []*MultiOutputInfo `json:"multiOutputInfos,omitempty"`
  3249. // NumOutputs: The number of outputs.
  3250. NumOutputs int64 `json:"numOutputs,omitempty"`
  3251. // SideInputs: Zero or more side inputs.
  3252. SideInputs []*SideInputInfo `json:"sideInputs,omitempty"`
  3253. // UserFn: The user function to invoke.
  3254. UserFn googleapi.RawMessage `json:"userFn,omitempty"`
  3255. // ForceSendFields is a list of field names (e.g. "Input") to
  3256. // unconditionally include in API requests. By default, fields with
  3257. // empty values are omitted from API requests. However, any non-pointer,
  3258. // non-interface field appearing in ForceSendFields will be sent to the
  3259. // server regardless of whether the field is empty or not. This may be
  3260. // used to include empty fields in Patch requests.
  3261. ForceSendFields []string `json:"-"`
  3262. // NullFields is a list of field names (e.g. "Input") to include in API
  3263. // requests with the JSON null value. By default, fields with empty
  3264. // values are omitted from API requests. However, any field with an
  3265. // empty value appearing in NullFields will be sent to the server as
  3266. // null. It is an error if a field in this list has a non-empty value.
  3267. // This may be used to include null fields in Patch requests.
  3268. NullFields []string `json:"-"`
  3269. }
  3270. func (s *ParDoInstruction) MarshalJSON() ([]byte, error) {
  3271. type NoMethod ParDoInstruction
  3272. raw := NoMethod(*s)
  3273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3274. }
  3275. // ParallelInstruction: Describes a particular operation comprising a
  3276. // MapTask.
  3277. type ParallelInstruction struct {
  3278. // Flatten: Additional information for Flatten instructions.
  3279. Flatten *FlattenInstruction `json:"flatten,omitempty"`
  3280. // Name: User-provided name of this operation.
  3281. Name string `json:"name,omitempty"`
  3282. // OriginalName: System-defined name for the operation in the original
  3283. // workflow graph.
  3284. OriginalName string `json:"originalName,omitempty"`
  3285. // Outputs: Describes the outputs of the instruction.
  3286. Outputs []*InstructionOutput `json:"outputs,omitempty"`
  3287. // ParDo: Additional information for ParDo instructions.
  3288. ParDo *ParDoInstruction `json:"parDo,omitempty"`
  3289. // PartialGroupByKey: Additional information for PartialGroupByKey
  3290. // instructions.
  3291. PartialGroupByKey *PartialGroupByKeyInstruction `json:"partialGroupByKey,omitempty"`
  3292. // Read: Additional information for Read instructions.
  3293. Read *ReadInstruction `json:"read,omitempty"`
  3294. // SystemName: System-defined name of this operation.
  3295. // Unique across the workflow.
  3296. SystemName string `json:"systemName,omitempty"`
  3297. // Write: Additional information for Write instructions.
  3298. Write *WriteInstruction `json:"write,omitempty"`
  3299. // ForceSendFields is a list of field names (e.g. "Flatten") to
  3300. // unconditionally include in API requests. By default, fields with
  3301. // empty values are omitted from API requests. However, any non-pointer,
  3302. // non-interface field appearing in ForceSendFields will be sent to the
  3303. // server regardless of whether the field is empty or not. This may be
  3304. // used to include empty fields in Patch requests.
  3305. ForceSendFields []string `json:"-"`
  3306. // NullFields is a list of field names (e.g. "Flatten") to include in
  3307. // API requests with the JSON null value. By default, fields with empty
  3308. // values are omitted from API requests. However, any field with an
  3309. // empty value appearing in NullFields will be sent to the server as
  3310. // null. It is an error if a field in this list has a non-empty value.
  3311. // This may be used to include null fields in Patch requests.
  3312. NullFields []string `json:"-"`
  3313. }
  3314. func (s *ParallelInstruction) MarshalJSON() ([]byte, error) {
  3315. type NoMethod ParallelInstruction
  3316. raw := NoMethod(*s)
  3317. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3318. }
  3319. // Parameter: Structured data associated with this message.
  3320. type Parameter struct {
  3321. // Key: Key or name for this parameter.
  3322. Key string `json:"key,omitempty"`
  3323. // Value: Value for this parameter.
  3324. Value interface{} `json:"value,omitempty"`
  3325. // ForceSendFields is a list of field names (e.g. "Key") to
  3326. // unconditionally include in API requests. By default, fields with
  3327. // empty values are omitted from API requests. However, any non-pointer,
  3328. // non-interface field appearing in ForceSendFields will be sent to the
  3329. // server regardless of whether the field is empty or not. This may be
  3330. // used to include empty fields in Patch requests.
  3331. ForceSendFields []string `json:"-"`
  3332. // NullFields is a list of field names (e.g. "Key") to include in API
  3333. // requests with the JSON null value. By default, fields with empty
  3334. // values are omitted from API requests. However, any field with an
  3335. // empty value appearing in NullFields will be sent to the server as
  3336. // null. It is an error if a field in this list has a non-empty value.
  3337. // This may be used to include null fields in Patch requests.
  3338. NullFields []string `json:"-"`
  3339. }
  3340. func (s *Parameter) MarshalJSON() ([]byte, error) {
  3341. type NoMethod Parameter
  3342. raw := NoMethod(*s)
  3343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3344. }
  3345. // ParameterMetadata: Metadata for a specific parameter.
  3346. type ParameterMetadata struct {
  3347. // HelpText: Required. The help text to display for the parameter.
  3348. HelpText string `json:"helpText,omitempty"`
  3349. // IsOptional: Optional. Whether the parameter is optional. Defaults to
  3350. // false.
  3351. IsOptional bool `json:"isOptional,omitempty"`
  3352. // Label: Required. The label to display for the parameter.
  3353. Label string `json:"label,omitempty"`
  3354. // Name: Required. The name of the parameter.
  3355. Name string `json:"name,omitempty"`
  3356. // Regexes: Optional. Regexes that the parameter must match.
  3357. Regexes []string `json:"regexes,omitempty"`
  3358. // ForceSendFields is a list of field names (e.g. "HelpText") to
  3359. // unconditionally include in API requests. By default, fields with
  3360. // empty values are omitted from API requests. However, any non-pointer,
  3361. // non-interface field appearing in ForceSendFields will be sent to the
  3362. // server regardless of whether the field is empty or not. This may be
  3363. // used to include empty fields in Patch requests.
  3364. ForceSendFields []string `json:"-"`
  3365. // NullFields is a list of field names (e.g. "HelpText") to include in
  3366. // API requests with the JSON null value. By default, fields with empty
  3367. // values are omitted from API requests. However, any field with an
  3368. // empty value appearing in NullFields will be sent to the server as
  3369. // null. It is an error if a field in this list has a non-empty value.
  3370. // This may be used to include null fields in Patch requests.
  3371. NullFields []string `json:"-"`
  3372. }
  3373. func (s *ParameterMetadata) MarshalJSON() ([]byte, error) {
  3374. type NoMethod ParameterMetadata
  3375. raw := NoMethod(*s)
  3376. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3377. }
  3378. // PartialGroupByKeyInstruction: An instruction that does a partial
  3379. // group-by-key.
  3380. // One input and one output.
  3381. type PartialGroupByKeyInstruction struct {
  3382. // Input: Describes the input to the partial group-by-key instruction.
  3383. Input *InstructionInput `json:"input,omitempty"`
  3384. // InputElementCodec: The codec to use for interpreting an element in
  3385. // the input PTable.
  3386. InputElementCodec googleapi.RawMessage `json:"inputElementCodec,omitempty"`
  3387. // OriginalCombineValuesInputStoreName: If this instruction includes a
  3388. // combining function this is the name of the
  3389. // intermediate store between the GBK and the CombineValues.
  3390. OriginalCombineValuesInputStoreName string `json:"originalCombineValuesInputStoreName,omitempty"`
  3391. // OriginalCombineValuesStepName: If this instruction includes a
  3392. // combining function, this is the name of the
  3393. // CombineValues instruction lifted into this instruction.
  3394. OriginalCombineValuesStepName string `json:"originalCombineValuesStepName,omitempty"`
  3395. // SideInputs: Zero or more side inputs.
  3396. SideInputs []*SideInputInfo `json:"sideInputs,omitempty"`
  3397. // ValueCombiningFn: The value combining function to invoke.
  3398. ValueCombiningFn googleapi.RawMessage `json:"valueCombiningFn,omitempty"`
  3399. // ForceSendFields is a list of field names (e.g. "Input") to
  3400. // unconditionally include in API requests. By default, fields with
  3401. // empty values are omitted from API requests. However, any non-pointer,
  3402. // non-interface field appearing in ForceSendFields will be sent to the
  3403. // server regardless of whether the field is empty or not. This may be
  3404. // used to include empty fields in Patch requests.
  3405. ForceSendFields []string `json:"-"`
  3406. // NullFields is a list of field names (e.g. "Input") to include in API
  3407. // requests with the JSON null value. By default, fields with empty
  3408. // values are omitted from API requests. However, any field with an
  3409. // empty value appearing in NullFields will be sent to the server as
  3410. // null. It is an error if a field in this list has a non-empty value.
  3411. // This may be used to include null fields in Patch requests.
  3412. NullFields []string `json:"-"`
  3413. }
  3414. func (s *PartialGroupByKeyInstruction) MarshalJSON() ([]byte, error) {
  3415. type NoMethod PartialGroupByKeyInstruction
  3416. raw := NoMethod(*s)
  3417. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3418. }
  3419. // PipelineDescription: A descriptive representation of submitted
  3420. // pipeline as well as the executed
  3421. // form. This data is provided by the Dataflow service for ease of
  3422. // visualizing
  3423. // the pipeline and interpreting Dataflow provided metrics.
  3424. type PipelineDescription struct {
  3425. // DisplayData: Pipeline level display data.
  3426. DisplayData []*DisplayData `json:"displayData,omitempty"`
  3427. // ExecutionPipelineStage: Description of each stage of execution of the
  3428. // pipeline.
  3429. ExecutionPipelineStage []*ExecutionStageSummary `json:"executionPipelineStage,omitempty"`
  3430. // OriginalPipelineTransform: Description of each transform in the
  3431. // pipeline and collections between them.
  3432. OriginalPipelineTransform []*TransformSummary `json:"originalPipelineTransform,omitempty"`
  3433. // ForceSendFields is a list of field names (e.g. "DisplayData") to
  3434. // unconditionally include in API requests. By default, fields with
  3435. // empty values are omitted from API requests. However, any non-pointer,
  3436. // non-interface field appearing in ForceSendFields will be sent to the
  3437. // server regardless of whether the field is empty or not. This may be
  3438. // used to include empty fields in Patch requests.
  3439. ForceSendFields []string `json:"-"`
  3440. // NullFields is a list of field names (e.g. "DisplayData") to include
  3441. // in API requests with the JSON null value. By default, fields with
  3442. // empty values are omitted from API requests. However, any field with
  3443. // an empty value appearing in NullFields will be sent to the server as
  3444. // null. It is an error if a field in this list has a non-empty value.
  3445. // This may be used to include null fields in Patch requests.
  3446. NullFields []string `json:"-"`
  3447. }
  3448. func (s *PipelineDescription) MarshalJSON() ([]byte, error) {
  3449. type NoMethod PipelineDescription
  3450. raw := NoMethod(*s)
  3451. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3452. }
  3453. // Position: Position defines a position within a collection of data.
  3454. // The value
  3455. // can be either the end position, a key (used with
  3456. // ordered
  3457. // collections), a byte offset, or a record index.
  3458. type Position struct {
  3459. // ByteOffset: Position is a byte offset.
  3460. ByteOffset int64 `json:"byteOffset,omitempty,string"`
  3461. // ConcatPosition: CloudPosition is a concat position.
  3462. ConcatPosition *ConcatPosition `json:"concatPosition,omitempty"`
  3463. // End: Position is past all other positions. Also useful for the
  3464. // end
  3465. // position of an unbounded range.
  3466. End bool `json:"end,omitempty"`
  3467. // Key: Position is a string key, ordered lexicographically.
  3468. Key string `json:"key,omitempty"`
  3469. // RecordIndex: Position is a record index.
  3470. RecordIndex int64 `json:"recordIndex,omitempty,string"`
  3471. // ShufflePosition: CloudPosition is a base64 encoded
  3472. // BatchShufflePosition (with FIXED
  3473. // sharding).
  3474. ShufflePosition string `json:"shufflePosition,omitempty"`
  3475. // ForceSendFields is a list of field names (e.g. "ByteOffset") to
  3476. // unconditionally include in API requests. By default, fields with
  3477. // empty values are omitted from API requests. However, any non-pointer,
  3478. // non-interface field appearing in ForceSendFields will be sent to the
  3479. // server regardless of whether the field is empty or not. This may be
  3480. // used to include empty fields in Patch requests.
  3481. ForceSendFields []string `json:"-"`
  3482. // NullFields is a list of field names (e.g. "ByteOffset") to include in
  3483. // API requests with the JSON null value. By default, fields with empty
  3484. // values are omitted from API requests. However, any field with an
  3485. // empty value appearing in NullFields will be sent to the server as
  3486. // null. It is an error if a field in this list has a non-empty value.
  3487. // This may be used to include null fields in Patch requests.
  3488. NullFields []string `json:"-"`
  3489. }
  3490. func (s *Position) MarshalJSON() ([]byte, error) {
  3491. type NoMethod Position
  3492. raw := NoMethod(*s)
  3493. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3494. }
  3495. // PubSubIODetails: Metadata for a PubSub connector used by the job.
  3496. type PubSubIODetails struct {
  3497. // Subscription: Subscription used in the connection.
  3498. Subscription string `json:"subscription,omitempty"`
  3499. // Topic: Topic accessed in the connection.
  3500. Topic string `json:"topic,omitempty"`
  3501. // ForceSendFields is a list of field names (e.g. "Subscription") to
  3502. // unconditionally include in API requests. By default, fields with
  3503. // empty values are omitted from API requests. However, any non-pointer,
  3504. // non-interface field appearing in ForceSendFields will be sent to the
  3505. // server regardless of whether the field is empty or not. This may be
  3506. // used to include empty fields in Patch requests.
  3507. ForceSendFields []string `json:"-"`
  3508. // NullFields is a list of field names (e.g. "Subscription") to include
  3509. // in API requests with the JSON null value. By default, fields with
  3510. // empty values are omitted from API requests. However, any field with
  3511. // an empty value appearing in NullFields will be sent to the server as
  3512. // null. It is an error if a field in this list has a non-empty value.
  3513. // This may be used to include null fields in Patch requests.
  3514. NullFields []string `json:"-"`
  3515. }
  3516. func (s *PubSubIODetails) MarshalJSON() ([]byte, error) {
  3517. type NoMethod PubSubIODetails
  3518. raw := NoMethod(*s)
  3519. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3520. }
  3521. // PubsubLocation: Identifies a pubsub location to use for transferring
  3522. // data into or
  3523. // out of a streaming Dataflow job.
  3524. type PubsubLocation struct {
  3525. // DropLateData: Indicates whether the pipeline allows late-arriving
  3526. // data.
  3527. DropLateData bool `json:"dropLateData,omitempty"`
  3528. // IdLabel: If set, contains a pubsub label from which to extract record
  3529. // ids.
  3530. // If left empty, record deduplication will be strictly best effort.
  3531. IdLabel string `json:"idLabel,omitempty"`
  3532. // Subscription: A pubsub subscription, in the form
  3533. // of
  3534. // "pubsub.googleapis.com/subscriptions/<project-id>/<subscription-nam
  3535. // e>"
  3536. Subscription string `json:"subscription,omitempty"`
  3537. // TimestampLabel: If set, contains a pubsub label from which to extract
  3538. // record timestamps.
  3539. // If left empty, record timestamps will be generated upon arrival.
  3540. TimestampLabel string `json:"timestampLabel,omitempty"`
  3541. // Topic: A pubsub topic, in the form
  3542. // of
  3543. // "pubsub.googleapis.com/topics/<project-id>/<topic-name>"
  3544. Topic string `json:"topic,omitempty"`
  3545. // TrackingSubscription: If set, specifies the pubsub subscription that
  3546. // will be used for tracking
  3547. // custom time timestamps for watermark estimation.
  3548. TrackingSubscription string `json:"trackingSubscription,omitempty"`
  3549. // WithAttributes: If true, then the client has requested to get pubsub
  3550. // attributes.
  3551. WithAttributes bool `json:"withAttributes,omitempty"`
  3552. // ForceSendFields is a list of field names (e.g. "DropLateData") to
  3553. // unconditionally include in API requests. By default, fields with
  3554. // empty values are omitted from API requests. However, any non-pointer,
  3555. // non-interface field appearing in ForceSendFields will be sent to the
  3556. // server regardless of whether the field is empty or not. This may be
  3557. // used to include empty fields in Patch requests.
  3558. ForceSendFields []string `json:"-"`
  3559. // NullFields is a list of field names (e.g. "DropLateData") to include
  3560. // in API requests with the JSON null value. By default, fields with
  3561. // empty values are omitted from API requests. However, any field with
  3562. // an empty value appearing in NullFields will be sent to the server as
  3563. // null. It is an error if a field in this list has a non-empty value.
  3564. // This may be used to include null fields in Patch requests.
  3565. NullFields []string `json:"-"`
  3566. }
  3567. func (s *PubsubLocation) MarshalJSON() ([]byte, error) {
  3568. type NoMethod PubsubLocation
  3569. raw := NoMethod(*s)
  3570. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3571. }
  3572. // ReadInstruction: An instruction that reads records.
  3573. // Takes no inputs, produces one output.
  3574. type ReadInstruction struct {
  3575. // Source: The source to read from.
  3576. Source *Source `json:"source,omitempty"`
  3577. // ForceSendFields is a list of field names (e.g. "Source") to
  3578. // unconditionally include in API requests. By default, fields with
  3579. // empty values are omitted from API requests. However, any non-pointer,
  3580. // non-interface field appearing in ForceSendFields will be sent to the
  3581. // server regardless of whether the field is empty or not. This may be
  3582. // used to include empty fields in Patch requests.
  3583. ForceSendFields []string `json:"-"`
  3584. // NullFields is a list of field names (e.g. "Source") to include in API
  3585. // requests with the JSON null value. By default, fields with empty
  3586. // values are omitted from API requests. However, any field with an
  3587. // empty value appearing in NullFields will be sent to the server as
  3588. // null. It is an error if a field in this list has a non-empty value.
  3589. // This may be used to include null fields in Patch requests.
  3590. NullFields []string `json:"-"`
  3591. }
  3592. func (s *ReadInstruction) MarshalJSON() ([]byte, error) {
  3593. type NoMethod ReadInstruction
  3594. raw := NoMethod(*s)
  3595. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3596. }
  3597. // ReportWorkItemStatusRequest: Request to report the status of
  3598. // WorkItems.
  3599. type ReportWorkItemStatusRequest struct {
  3600. // CurrentWorkerTime: The current timestamp at the worker.
  3601. CurrentWorkerTime string `json:"currentWorkerTime,omitempty"`
  3602. // Location: The [regional
  3603. // endpoint]
  3604. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  3605. // dpoints) that
  3606. // contains the WorkItem's job.
  3607. Location string `json:"location,omitempty"`
  3608. // UnifiedWorkerRequest: Untranslated bag-of-bytes
  3609. // WorkProgressUpdateRequest from UnifiedWorker.
  3610. UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"`
  3611. // WorkItemStatuses: The order is unimportant, except that the order of
  3612. // the
  3613. // WorkItemServiceState messages in the
  3614. // ReportWorkItemStatusResponse
  3615. // corresponds to the order of WorkItemStatus messages here.
  3616. WorkItemStatuses []*WorkItemStatus `json:"workItemStatuses,omitempty"`
  3617. // WorkerId: The ID of the worker reporting the WorkItem status. If
  3618. // this
  3619. // does not match the ID of the worker which the Dataflow
  3620. // service
  3621. // believes currently has the lease on the WorkItem, the report
  3622. // will be dropped (with an error response).
  3623. WorkerId string `json:"workerId,omitempty"`
  3624. // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime")
  3625. // to unconditionally include in API requests. By default, fields with
  3626. // empty values are omitted from API requests. However, any non-pointer,
  3627. // non-interface field appearing in ForceSendFields will be sent to the
  3628. // server regardless of whether the field is empty or not. This may be
  3629. // used to include empty fields in Patch requests.
  3630. ForceSendFields []string `json:"-"`
  3631. // NullFields is a list of field names (e.g. "CurrentWorkerTime") to
  3632. // include in API requests with the JSON null value. By default, fields
  3633. // with empty values are omitted from API requests. However, any field
  3634. // with an empty value appearing in NullFields will be sent to the
  3635. // server as null. It is an error if a field in this list has a
  3636. // non-empty value. This may be used to include null fields in Patch
  3637. // requests.
  3638. NullFields []string `json:"-"`
  3639. }
  3640. func (s *ReportWorkItemStatusRequest) MarshalJSON() ([]byte, error) {
  3641. type NoMethod ReportWorkItemStatusRequest
  3642. raw := NoMethod(*s)
  3643. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3644. }
  3645. // ReportWorkItemStatusResponse: Response from a request to report the
  3646. // status of WorkItems.
  3647. type ReportWorkItemStatusResponse struct {
  3648. // UnifiedWorkerResponse: Untranslated bag-of-bytes
  3649. // WorkProgressUpdateResponse for UnifiedWorker.
  3650. UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"`
  3651. // WorkItemServiceStates: A set of messages indicating the service-side
  3652. // state for each
  3653. // WorkItem whose status was reported, in the same order as
  3654. // the
  3655. // WorkItemStatus messages in the ReportWorkItemStatusRequest
  3656. // which
  3657. // resulting in this response.
  3658. WorkItemServiceStates []*WorkItemServiceState `json:"workItemServiceStates,omitempty"`
  3659. // ServerResponse contains the HTTP response code and headers from the
  3660. // server.
  3661. googleapi.ServerResponse `json:"-"`
  3662. // ForceSendFields is a list of field names (e.g.
  3663. // "UnifiedWorkerResponse") to unconditionally include in API requests.
  3664. // By default, fields with empty values are omitted from API requests.
  3665. // However, any non-pointer, non-interface field appearing in
  3666. // ForceSendFields will be sent to the server regardless of whether the
  3667. // field is empty or not. This may be used to include empty fields in
  3668. // Patch requests.
  3669. ForceSendFields []string `json:"-"`
  3670. // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to
  3671. // include in API requests with the JSON null value. By default, fields
  3672. // with empty values are omitted from API requests. However, any field
  3673. // with an empty value appearing in NullFields will be sent to the
  3674. // server as null. It is an error if a field in this list has a
  3675. // non-empty value. This may be used to include null fields in Patch
  3676. // requests.
  3677. NullFields []string `json:"-"`
  3678. }
  3679. func (s *ReportWorkItemStatusResponse) MarshalJSON() ([]byte, error) {
  3680. type NoMethod ReportWorkItemStatusResponse
  3681. raw := NoMethod(*s)
  3682. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3683. }
  3684. // ReportedParallelism: Represents the level of parallelism in a
  3685. // WorkItem's input,
  3686. // reported by the worker.
  3687. type ReportedParallelism struct {
  3688. // IsInfinite: Specifies whether the parallelism is infinite. If true,
  3689. // "value" is
  3690. // ignored.
  3691. // Infinite parallelism means the service will assume that the work
  3692. // item
  3693. // can always be split into more non-empty work items by dynamic
  3694. // splitting.
  3695. // This is a work-around for lack of support for infinity by the
  3696. // current
  3697. // JSON-based Java RPC stack.
  3698. IsInfinite bool `json:"isInfinite,omitempty"`
  3699. // Value: Specifies the level of parallelism in case it is finite.
  3700. Value float64 `json:"value,omitempty"`
  3701. // ForceSendFields is a list of field names (e.g. "IsInfinite") to
  3702. // unconditionally include in API requests. By default, fields with
  3703. // empty values are omitted from API requests. However, any non-pointer,
  3704. // non-interface field appearing in ForceSendFields will be sent to the
  3705. // server regardless of whether the field is empty or not. This may be
  3706. // used to include empty fields in Patch requests.
  3707. ForceSendFields []string `json:"-"`
  3708. // NullFields is a list of field names (e.g. "IsInfinite") to include in
  3709. // API requests with the JSON null value. By default, fields with empty
  3710. // values are omitted from API requests. However, any field with an
  3711. // empty value appearing in NullFields will be sent to the server as
  3712. // null. It is an error if a field in this list has a non-empty value.
  3713. // This may be used to include null fields in Patch requests.
  3714. NullFields []string `json:"-"`
  3715. }
  3716. func (s *ReportedParallelism) MarshalJSON() ([]byte, error) {
  3717. type NoMethod ReportedParallelism
  3718. raw := NoMethod(*s)
  3719. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3720. }
  3721. func (s *ReportedParallelism) UnmarshalJSON(data []byte) error {
  3722. type NoMethod ReportedParallelism
  3723. var s1 struct {
  3724. Value gensupport.JSONFloat64 `json:"value"`
  3725. *NoMethod
  3726. }
  3727. s1.NoMethod = (*NoMethod)(s)
  3728. if err := json.Unmarshal(data, &s1); err != nil {
  3729. return err
  3730. }
  3731. s.Value = float64(s1.Value)
  3732. return nil
  3733. }
  3734. // ResourceUtilizationReport: Worker metrics exported from workers. This
  3735. // contains resource utilization
  3736. // metrics accumulated from a variety of sources. For more information,
  3737. // see
  3738. // go/df-resource-signals.
  3739. type ResourceUtilizationReport struct {
  3740. // CpuTime: CPU utilization samples.
  3741. CpuTime []*CPUTime `json:"cpuTime,omitempty"`
  3742. // ForceSendFields is a list of field names (e.g. "CpuTime") to
  3743. // unconditionally include in API requests. By default, fields with
  3744. // empty values are omitted from API requests. However, any non-pointer,
  3745. // non-interface field appearing in ForceSendFields will be sent to the
  3746. // server regardless of whether the field is empty or not. This may be
  3747. // used to include empty fields in Patch requests.
  3748. ForceSendFields []string `json:"-"`
  3749. // NullFields is a list of field names (e.g. "CpuTime") to include in
  3750. // API requests with the JSON null value. By default, fields with empty
  3751. // values are omitted from API requests. However, any field with an
  3752. // empty value appearing in NullFields will be sent to the server as
  3753. // null. It is an error if a field in this list has a non-empty value.
  3754. // This may be used to include null fields in Patch requests.
  3755. NullFields []string `json:"-"`
  3756. }
  3757. func (s *ResourceUtilizationReport) MarshalJSON() ([]byte, error) {
  3758. type NoMethod ResourceUtilizationReport
  3759. raw := NoMethod(*s)
  3760. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3761. }
  3762. // ResourceUtilizationReportResponse: Service-side response to
  3763. // WorkerMessage reporting resource utilization.
  3764. type ResourceUtilizationReportResponse struct {
  3765. }
  3766. // RuntimeEnvironment: The environment values to set at runtime.
  3767. type RuntimeEnvironment struct {
  3768. // AdditionalExperiments: Additional experiment flags for the job.
  3769. AdditionalExperiments []string `json:"additionalExperiments,omitempty"`
  3770. // AdditionalUserLabels: Additional user labels attached to the job.
  3771. AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"`
  3772. // BypassTempDirValidation: Whether to bypass the safety checks for the
  3773. // job's temporary directory.
  3774. // Use with caution.
  3775. BypassTempDirValidation bool `json:"bypassTempDirValidation,omitempty"`
  3776. // MachineType: The machine type to use for the job. Defaults to the
  3777. // value from the
  3778. // template if not specified.
  3779. MachineType string `json:"machineType,omitempty"`
  3780. // MaxWorkers: The maximum number of Google Compute Engine instances to
  3781. // be made
  3782. // available to your pipeline during execution, from 1 to 1000.
  3783. MaxWorkers int64 `json:"maxWorkers,omitempty"`
  3784. // Network: Network to which VMs will be assigned. If empty or
  3785. // unspecified,
  3786. // the service will use the network "default".
  3787. Network string `json:"network,omitempty"`
  3788. // NumWorkers: The initial number of Google Compute Engine instnaces for
  3789. // the job.
  3790. NumWorkers int64 `json:"numWorkers,omitempty"`
  3791. // ServiceAccountEmail: The email address of the service account to run
  3792. // the job as.
  3793. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
  3794. // Subnetwork: Subnetwork to which VMs will be assigned, if desired.
  3795. // Expected to be of
  3796. // the form "regions/REGION/subnetworks/SUBNETWORK".
  3797. Subnetwork string `json:"subnetwork,omitempty"`
  3798. // TempLocation: The Cloud Storage path to use for temporary files.
  3799. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  3800. TempLocation string `json:"tempLocation,omitempty"`
  3801. // Zone: The Compute Engine
  3802. // [availability
  3803. // zone](https://cloud.google.com/compute/docs/regions-zone
  3804. // s/regions-zones)
  3805. // for launching worker instances to run your pipeline.
  3806. Zone string `json:"zone,omitempty"`
  3807. // ForceSendFields is a list of field names (e.g.
  3808. // "AdditionalExperiments") to unconditionally include in API requests.
  3809. // By default, fields with empty values are omitted from API requests.
  3810. // However, any non-pointer, non-interface field appearing in
  3811. // ForceSendFields will be sent to the server regardless of whether the
  3812. // field is empty or not. This may be used to include empty fields in
  3813. // Patch requests.
  3814. ForceSendFields []string `json:"-"`
  3815. // NullFields is a list of field names (e.g. "AdditionalExperiments") to
  3816. // include in API requests with the JSON null value. By default, fields
  3817. // with empty values are omitted from API requests. However, any field
  3818. // with an empty value appearing in NullFields will be sent to the
  3819. // server as null. It is an error if a field in this list has a
  3820. // non-empty value. This may be used to include null fields in Patch
  3821. // requests.
  3822. NullFields []string `json:"-"`
  3823. }
  3824. func (s *RuntimeEnvironment) MarshalJSON() ([]byte, error) {
  3825. type NoMethod RuntimeEnvironment
  3826. raw := NoMethod(*s)
  3827. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3828. }
  3829. // SdkVersion: The version of the SDK used to run the job.
  3830. type SdkVersion struct {
  3831. // SdkSupportStatus: The support status for this SDK version.
  3832. //
  3833. // Possible values:
  3834. // "UNKNOWN" - Cloud Dataflow is unaware of this version.
  3835. // "SUPPORTED" - This is a known version of an SDK, and is supported.
  3836. // "STALE" - A newer version of the SDK family exists, and an update
  3837. // is recommended.
  3838. // "DEPRECATED" - This version of the SDK is deprecated and will
  3839. // eventually be no
  3840. // longer supported.
  3841. // "UNSUPPORTED" - Support for this SDK version has ended and it
  3842. // should no longer be used.
  3843. SdkSupportStatus string `json:"sdkSupportStatus,omitempty"`
  3844. // Version: The version of the SDK used to run the job.
  3845. Version string `json:"version,omitempty"`
  3846. // VersionDisplayName: A readable string describing the version of the
  3847. // SDK.
  3848. VersionDisplayName string `json:"versionDisplayName,omitempty"`
  3849. // ForceSendFields is a list of field names (e.g. "SdkSupportStatus") to
  3850. // unconditionally include in API requests. By default, fields with
  3851. // empty values are omitted from API requests. However, any non-pointer,
  3852. // non-interface field appearing in ForceSendFields will be sent to the
  3853. // server regardless of whether the field is empty or not. This may be
  3854. // used to include empty fields in Patch requests.
  3855. ForceSendFields []string `json:"-"`
  3856. // NullFields is a list of field names (e.g. "SdkSupportStatus") to
  3857. // include in API requests with the JSON null value. By default, fields
  3858. // with empty values are omitted from API requests. However, any field
  3859. // with an empty value appearing in NullFields will be sent to the
  3860. // server as null. It is an error if a field in this list has a
  3861. // non-empty value. This may be used to include null fields in Patch
  3862. // requests.
  3863. NullFields []string `json:"-"`
  3864. }
  3865. func (s *SdkVersion) MarshalJSON() ([]byte, error) {
  3866. type NoMethod SdkVersion
  3867. raw := NoMethod(*s)
  3868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3869. }
  3870. // SendDebugCaptureRequest: Request to send encoded debug information.
  3871. type SendDebugCaptureRequest struct {
  3872. // ComponentId: The internal component id for which debug information is
  3873. // sent.
  3874. ComponentId string `json:"componentId,omitempty"`
  3875. // Data: The encoded debug information.
  3876. Data string `json:"data,omitempty"`
  3877. // Location: The [regional
  3878. // endpoint]
  3879. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  3880. // dpoints) that
  3881. // contains the job specified by job_id.
  3882. Location string `json:"location,omitempty"`
  3883. // WorkerId: The worker id, i.e., VM hostname.
  3884. WorkerId string `json:"workerId,omitempty"`
  3885. // ForceSendFields is a list of field names (e.g. "ComponentId") to
  3886. // unconditionally include in API requests. By default, fields with
  3887. // empty values are omitted from API requests. However, any non-pointer,
  3888. // non-interface field appearing in ForceSendFields will be sent to the
  3889. // server regardless of whether the field is empty or not. This may be
  3890. // used to include empty fields in Patch requests.
  3891. ForceSendFields []string `json:"-"`
  3892. // NullFields is a list of field names (e.g. "ComponentId") to include
  3893. // in API requests with the JSON null value. By default, fields with
  3894. // empty values are omitted from API requests. However, any field with
  3895. // an empty value appearing in NullFields will be sent to the server as
  3896. // null. It is an error if a field in this list has a non-empty value.
  3897. // This may be used to include null fields in Patch requests.
  3898. NullFields []string `json:"-"`
  3899. }
  3900. func (s *SendDebugCaptureRequest) MarshalJSON() ([]byte, error) {
  3901. type NoMethod SendDebugCaptureRequest
  3902. raw := NoMethod(*s)
  3903. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3904. }
  3905. // SendDebugCaptureResponse: Response to a send capture request.
  3906. // nothing
  3907. type SendDebugCaptureResponse struct {
  3908. // ServerResponse contains the HTTP response code and headers from the
  3909. // server.
  3910. googleapi.ServerResponse `json:"-"`
  3911. }
  3912. // SendWorkerMessagesRequest: A request for sending worker messages to
  3913. // the service.
  3914. type SendWorkerMessagesRequest struct {
  3915. // Location: The [regional
  3916. // endpoint]
  3917. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  3918. // dpoints) that
  3919. // contains the job.
  3920. Location string `json:"location,omitempty"`
  3921. // WorkerMessages: The WorkerMessages to send.
  3922. WorkerMessages []*WorkerMessage `json:"workerMessages,omitempty"`
  3923. // ForceSendFields is a list of field names (e.g. "Location") to
  3924. // unconditionally include in API requests. By default, fields with
  3925. // empty values are omitted from API requests. However, any non-pointer,
  3926. // non-interface field appearing in ForceSendFields will be sent to the
  3927. // server regardless of whether the field is empty or not. This may be
  3928. // used to include empty fields in Patch requests.
  3929. ForceSendFields []string `json:"-"`
  3930. // NullFields is a list of field names (e.g. "Location") to include in
  3931. // API requests with the JSON null value. By default, fields with empty
  3932. // values are omitted from API requests. However, any field with an
  3933. // empty value appearing in NullFields will be sent to the server as
  3934. // null. It is an error if a field in this list has a non-empty value.
  3935. // This may be used to include null fields in Patch requests.
  3936. NullFields []string `json:"-"`
  3937. }
  3938. func (s *SendWorkerMessagesRequest) MarshalJSON() ([]byte, error) {
  3939. type NoMethod SendWorkerMessagesRequest
  3940. raw := NoMethod(*s)
  3941. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3942. }
  3943. // SendWorkerMessagesResponse: The response to the worker messages.
  3944. type SendWorkerMessagesResponse struct {
  3945. // WorkerMessageResponses: The servers response to the worker messages.
  3946. WorkerMessageResponses []*WorkerMessageResponse `json:"workerMessageResponses,omitempty"`
  3947. // ServerResponse contains the HTTP response code and headers from the
  3948. // server.
  3949. googleapi.ServerResponse `json:"-"`
  3950. // ForceSendFields is a list of field names (e.g.
  3951. // "WorkerMessageResponses") to unconditionally include in API requests.
  3952. // By default, fields with empty values are omitted from API requests.
  3953. // However, any non-pointer, non-interface field appearing in
  3954. // ForceSendFields will be sent to the server regardless of whether the
  3955. // field is empty or not. This may be used to include empty fields in
  3956. // Patch requests.
  3957. ForceSendFields []string `json:"-"`
  3958. // NullFields is a list of field names (e.g. "WorkerMessageResponses")
  3959. // to include in API requests with the JSON null value. By default,
  3960. // fields with empty values are omitted from API requests. However, any
  3961. // field with an empty value appearing in NullFields will be sent to the
  3962. // server as null. It is an error if a field in this list has a
  3963. // non-empty value. This may be used to include null fields in Patch
  3964. // requests.
  3965. NullFields []string `json:"-"`
  3966. }
  3967. func (s *SendWorkerMessagesResponse) MarshalJSON() ([]byte, error) {
  3968. type NoMethod SendWorkerMessagesResponse
  3969. raw := NoMethod(*s)
  3970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3971. }
  3972. // SeqMapTask: Describes a particular function to invoke.
  3973. type SeqMapTask struct {
  3974. // Inputs: Information about each of the inputs.
  3975. Inputs []*SideInputInfo `json:"inputs,omitempty"`
  3976. // Name: The user-provided name of the SeqDo operation.
  3977. Name string `json:"name,omitempty"`
  3978. // OutputInfos: Information about each of the outputs.
  3979. OutputInfos []*SeqMapTaskOutputInfo `json:"outputInfos,omitempty"`
  3980. // StageName: System-defined name of the stage containing the SeqDo
  3981. // operation.
  3982. // Unique across the workflow.
  3983. StageName string `json:"stageName,omitempty"`
  3984. // SystemName: System-defined name of the SeqDo operation.
  3985. // Unique across the workflow.
  3986. SystemName string `json:"systemName,omitempty"`
  3987. // UserFn: The user function to invoke.
  3988. UserFn googleapi.RawMessage `json:"userFn,omitempty"`
  3989. // ForceSendFields is a list of field names (e.g. "Inputs") to
  3990. // unconditionally include in API requests. By default, fields with
  3991. // empty values are omitted from API requests. However, any non-pointer,
  3992. // non-interface field appearing in ForceSendFields will be sent to the
  3993. // server regardless of whether the field is empty or not. This may be
  3994. // used to include empty fields in Patch requests.
  3995. ForceSendFields []string `json:"-"`
  3996. // NullFields is a list of field names (e.g. "Inputs") to include in API
  3997. // requests with the JSON null value. By default, fields with empty
  3998. // values are omitted from API requests. However, any field with an
  3999. // empty value appearing in NullFields will be sent to the server as
  4000. // null. It is an error if a field in this list has a non-empty value.
  4001. // This may be used to include null fields in Patch requests.
  4002. NullFields []string `json:"-"`
  4003. }
  4004. func (s *SeqMapTask) MarshalJSON() ([]byte, error) {
  4005. type NoMethod SeqMapTask
  4006. raw := NoMethod(*s)
  4007. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4008. }
  4009. // SeqMapTaskOutputInfo: Information about an output of a SeqMapTask.
  4010. type SeqMapTaskOutputInfo struct {
  4011. // Sink: The sink to write the output value to.
  4012. Sink *Sink `json:"sink,omitempty"`
  4013. // Tag: The id of the TupleTag the user code will tag the output value
  4014. // by.
  4015. Tag string `json:"tag,omitempty"`
  4016. // ForceSendFields is a list of field names (e.g. "Sink") to
  4017. // unconditionally include in API requests. By default, fields with
  4018. // empty values are omitted from API requests. However, any non-pointer,
  4019. // non-interface field appearing in ForceSendFields will be sent to the
  4020. // server regardless of whether the field is empty or not. This may be
  4021. // used to include empty fields in Patch requests.
  4022. ForceSendFields []string `json:"-"`
  4023. // NullFields is a list of field names (e.g. "Sink") to include in API
  4024. // requests with the JSON null value. By default, fields with empty
  4025. // values are omitted from API requests. However, any field with an
  4026. // empty value appearing in NullFields will be sent to the server as
  4027. // null. It is an error if a field in this list has a non-empty value.
  4028. // This may be used to include null fields in Patch requests.
  4029. NullFields []string `json:"-"`
  4030. }
  4031. func (s *SeqMapTaskOutputInfo) MarshalJSON() ([]byte, error) {
  4032. type NoMethod SeqMapTaskOutputInfo
  4033. raw := NoMethod(*s)
  4034. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4035. }
  4036. // ShellTask: A task which consists of a shell command for the worker to
  4037. // execute.
  4038. type ShellTask struct {
  4039. // Command: The shell command to run.
  4040. Command string `json:"command,omitempty"`
  4041. // ExitCode: Exit code for the task.
  4042. ExitCode int64 `json:"exitCode,omitempty"`
  4043. // ForceSendFields is a list of field names (e.g. "Command") to
  4044. // unconditionally include in API requests. By default, fields with
  4045. // empty values are omitted from API requests. However, any non-pointer,
  4046. // non-interface field appearing in ForceSendFields will be sent to the
  4047. // server regardless of whether the field is empty or not. This may be
  4048. // used to include empty fields in Patch requests.
  4049. ForceSendFields []string `json:"-"`
  4050. // NullFields is a list of field names (e.g. "Command") to include in
  4051. // API requests with the JSON null value. By default, fields with empty
  4052. // values are omitted from API requests. However, any field with an
  4053. // empty value appearing in NullFields will be sent to the server as
  4054. // null. It is an error if a field in this list has a non-empty value.
  4055. // This may be used to include null fields in Patch requests.
  4056. NullFields []string `json:"-"`
  4057. }
  4058. func (s *ShellTask) MarshalJSON() ([]byte, error) {
  4059. type NoMethod ShellTask
  4060. raw := NoMethod(*s)
  4061. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4062. }
  4063. // SideInputInfo: Information about a side input of a DoFn or an input
  4064. // of a SeqDoFn.
  4065. type SideInputInfo struct {
  4066. // Kind: How to interpret the source element(s) as a side input value.
  4067. Kind googleapi.RawMessage `json:"kind,omitempty"`
  4068. // Sources: The source(s) to read element(s) from to get the value of
  4069. // this side input.
  4070. // If more than one source, then the elements are taken from
  4071. // the
  4072. // sources, in the specified order if order matters.
  4073. // At least one source is required.
  4074. Sources []*Source `json:"sources,omitempty"`
  4075. // Tag: The id of the tag the user code will access this side input
  4076. // by;
  4077. // this should correspond to the tag of some MultiOutputInfo.
  4078. Tag string `json:"tag,omitempty"`
  4079. // ForceSendFields is a list of field names (e.g. "Kind") to
  4080. // unconditionally include in API requests. By default, fields with
  4081. // empty values are omitted from API requests. However, any non-pointer,
  4082. // non-interface field appearing in ForceSendFields will be sent to the
  4083. // server regardless of whether the field is empty or not. This may be
  4084. // used to include empty fields in Patch requests.
  4085. ForceSendFields []string `json:"-"`
  4086. // NullFields is a list of field names (e.g. "Kind") to include in API
  4087. // requests with the JSON null value. By default, fields with empty
  4088. // values are omitted from API requests. However, any field with an
  4089. // empty value appearing in NullFields will be sent to the server as
  4090. // null. It is an error if a field in this list has a non-empty value.
  4091. // This may be used to include null fields in Patch requests.
  4092. NullFields []string `json:"-"`
  4093. }
  4094. func (s *SideInputInfo) MarshalJSON() ([]byte, error) {
  4095. type NoMethod SideInputInfo
  4096. raw := NoMethod(*s)
  4097. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4098. }
  4099. // Sink: A sink that records can be encoded and written to.
  4100. type Sink struct {
  4101. // Codec: The codec to use to encode data written to the sink.
  4102. Codec googleapi.RawMessage `json:"codec,omitempty"`
  4103. // Spec: The sink to write to, plus its parameters.
  4104. Spec googleapi.RawMessage `json:"spec,omitempty"`
  4105. // ForceSendFields is a list of field names (e.g. "Codec") to
  4106. // unconditionally include in API requests. By default, fields with
  4107. // empty values are omitted from API requests. However, any non-pointer,
  4108. // non-interface field appearing in ForceSendFields will be sent to the
  4109. // server regardless of whether the field is empty or not. This may be
  4110. // used to include empty fields in Patch requests.
  4111. ForceSendFields []string `json:"-"`
  4112. // NullFields is a list of field names (e.g. "Codec") to include in API
  4113. // requests with the JSON null value. By default, fields with empty
  4114. // values are omitted from API requests. However, any field with an
  4115. // empty value appearing in NullFields will be sent to the server as
  4116. // null. It is an error if a field in this list has a non-empty value.
  4117. // This may be used to include null fields in Patch requests.
  4118. NullFields []string `json:"-"`
  4119. }
  4120. func (s *Sink) MarshalJSON() ([]byte, error) {
  4121. type NoMethod Sink
  4122. raw := NoMethod(*s)
  4123. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4124. }
  4125. // Snapshot: Represents a snapshot of a job.
  4126. type Snapshot struct {
  4127. // CreationTime: The time this snapshot was created.
  4128. CreationTime string `json:"creationTime,omitempty"`
  4129. // Id: The unique ID of this snapshot.
  4130. Id string `json:"id,omitempty"`
  4131. // ProjectId: The project this snapshot belongs to.
  4132. ProjectId string `json:"projectId,omitempty"`
  4133. // SourceJobId: The job this snapshot was created from.
  4134. SourceJobId string `json:"sourceJobId,omitempty"`
  4135. // Ttl: The time after which this snapshot will be automatically
  4136. // deleted.
  4137. Ttl string `json:"ttl,omitempty"`
  4138. // ServerResponse contains the HTTP response code and headers from the
  4139. // server.
  4140. googleapi.ServerResponse `json:"-"`
  4141. // ForceSendFields is a list of field names (e.g. "CreationTime") to
  4142. // unconditionally include in API requests. By default, fields with
  4143. // empty values are omitted from API requests. However, any non-pointer,
  4144. // non-interface field appearing in ForceSendFields will be sent to the
  4145. // server regardless of whether the field is empty or not. This may be
  4146. // used to include empty fields in Patch requests.
  4147. ForceSendFields []string `json:"-"`
  4148. // NullFields is a list of field names (e.g. "CreationTime") to include
  4149. // in API requests with the JSON null value. By default, fields with
  4150. // empty values are omitted from API requests. However, any field with
  4151. // an empty value appearing in NullFields will be sent to the server as
  4152. // null. It is an error if a field in this list has a non-empty value.
  4153. // This may be used to include null fields in Patch requests.
  4154. NullFields []string `json:"-"`
  4155. }
  4156. func (s *Snapshot) MarshalJSON() ([]byte, error) {
  4157. type NoMethod Snapshot
  4158. raw := NoMethod(*s)
  4159. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4160. }
  4161. // SnapshotJobRequest: Request to create a snapshot of a job.
  4162. type SnapshotJobRequest struct {
  4163. // Location: The location that contains this job.
  4164. Location string `json:"location,omitempty"`
  4165. // Ttl: TTL for the snapshot.
  4166. Ttl string `json:"ttl,omitempty"`
  4167. // ForceSendFields is a list of field names (e.g. "Location") to
  4168. // unconditionally include in API requests. By default, fields with
  4169. // empty values are omitted from API requests. However, any non-pointer,
  4170. // non-interface field appearing in ForceSendFields will be sent to the
  4171. // server regardless of whether the field is empty or not. This may be
  4172. // used to include empty fields in Patch requests.
  4173. ForceSendFields []string `json:"-"`
  4174. // NullFields is a list of field names (e.g. "Location") to include in
  4175. // API requests with the JSON null value. By default, fields with empty
  4176. // values are omitted from API requests. However, any field with an
  4177. // empty value appearing in NullFields will be sent to the server as
  4178. // null. It is an error if a field in this list has a non-empty value.
  4179. // This may be used to include null fields in Patch requests.
  4180. NullFields []string `json:"-"`
  4181. }
  4182. func (s *SnapshotJobRequest) MarshalJSON() ([]byte, error) {
  4183. type NoMethod SnapshotJobRequest
  4184. raw := NoMethod(*s)
  4185. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4186. }
  4187. // Source: A source that records can be read and decoded from.
  4188. type Source struct {
  4189. // BaseSpecs: While splitting, sources may specify the produced
  4190. // bundles
  4191. // as differences against another source, in order to save
  4192. // backend-side
  4193. // memory and allow bigger jobs. For details, see SourceSplitRequest.
  4194. // To support this use case, the full set of parameters of the source
  4195. // is logically obtained by taking the latest explicitly specified
  4196. // value
  4197. // of each parameter in the order:
  4198. // base_specs (later items win), spec (overrides anything in
  4199. // base_specs).
  4200. BaseSpecs []googleapi.RawMessage `json:"baseSpecs,omitempty"`
  4201. // Codec: The codec to use to decode data read from the source.
  4202. Codec googleapi.RawMessage `json:"codec,omitempty"`
  4203. // DoesNotNeedSplitting: Setting this value to true hints to the
  4204. // framework that the source
  4205. // doesn't need splitting, and using SourceSplitRequest on it
  4206. // would
  4207. // yield SOURCE_SPLIT_OUTCOME_USE_CURRENT.
  4208. //
  4209. // E.g. a file splitter may set this to true when splitting a single
  4210. // file
  4211. // into a set of byte ranges of appropriate size, and set this
  4212. // to false when splitting a filepattern into individual files.
  4213. // However, for efficiency, a file splitter may decide to produce
  4214. // file subranges directly from the filepattern to avoid a
  4215. // splitting
  4216. // round-trip.
  4217. //
  4218. // See SourceSplitRequest for an overview of the splitting
  4219. // process.
  4220. //
  4221. // This field is meaningful only in the Source objects populated
  4222. // by the user (e.g. when filling in a DerivedSource).
  4223. // Source objects supplied by the framework to the user don't have
  4224. // this field populated.
  4225. DoesNotNeedSplitting bool `json:"doesNotNeedSplitting,omitempty"`
  4226. // Metadata: Optionally, metadata for this source can be supplied right
  4227. // away,
  4228. // avoiding a SourceGetMetadataOperation roundtrip
  4229. // (see SourceOperationRequest).
  4230. //
  4231. // This field is meaningful only in the Source objects populated
  4232. // by the user (e.g. when filling in a DerivedSource).
  4233. // Source objects supplied by the framework to the user don't have
  4234. // this field populated.
  4235. Metadata *SourceMetadata `json:"metadata,omitempty"`
  4236. // Spec: The source to read from, plus its parameters.
  4237. Spec googleapi.RawMessage `json:"spec,omitempty"`
  4238. // ForceSendFields is a list of field names (e.g. "BaseSpecs") to
  4239. // unconditionally include in API requests. By default, fields with
  4240. // empty values are omitted from API requests. However, any non-pointer,
  4241. // non-interface field appearing in ForceSendFields will be sent to the
  4242. // server regardless of whether the field is empty or not. This may be
  4243. // used to include empty fields in Patch requests.
  4244. ForceSendFields []string `json:"-"`
  4245. // NullFields is a list of field names (e.g. "BaseSpecs") to include in
  4246. // API requests with the JSON null value. By default, fields with empty
  4247. // values are omitted from API requests. However, any field with an
  4248. // empty value appearing in NullFields will be sent to the server as
  4249. // null. It is an error if a field in this list has a non-empty value.
  4250. // This may be used to include null fields in Patch requests.
  4251. NullFields []string `json:"-"`
  4252. }
  4253. func (s *Source) MarshalJSON() ([]byte, error) {
  4254. type NoMethod Source
  4255. raw := NoMethod(*s)
  4256. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4257. }
  4258. // SourceFork: DEPRECATED in favor of DynamicSourceSplit.
  4259. type SourceFork struct {
  4260. // Primary: DEPRECATED
  4261. Primary *SourceSplitShard `json:"primary,omitempty"`
  4262. // PrimarySource: DEPRECATED
  4263. PrimarySource *DerivedSource `json:"primarySource,omitempty"`
  4264. // Residual: DEPRECATED
  4265. Residual *SourceSplitShard `json:"residual,omitempty"`
  4266. // ResidualSource: DEPRECATED
  4267. ResidualSource *DerivedSource `json:"residualSource,omitempty"`
  4268. // ForceSendFields is a list of field names (e.g. "Primary") to
  4269. // unconditionally include in API requests. By default, fields with
  4270. // empty values are omitted from API requests. However, any non-pointer,
  4271. // non-interface field appearing in ForceSendFields will be sent to the
  4272. // server regardless of whether the field is empty or not. This may be
  4273. // used to include empty fields in Patch requests.
  4274. ForceSendFields []string `json:"-"`
  4275. // NullFields is a list of field names (e.g. "Primary") to include in
  4276. // API requests with the JSON null value. By default, fields with empty
  4277. // values are omitted from API requests. However, any field with an
  4278. // empty value appearing in NullFields will be sent to the server as
  4279. // null. It is an error if a field in this list has a non-empty value.
  4280. // This may be used to include null fields in Patch requests.
  4281. NullFields []string `json:"-"`
  4282. }
  4283. func (s *SourceFork) MarshalJSON() ([]byte, error) {
  4284. type NoMethod SourceFork
  4285. raw := NoMethod(*s)
  4286. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4287. }
  4288. // SourceGetMetadataRequest: A request to compute the SourceMetadata of
  4289. // a Source.
  4290. type SourceGetMetadataRequest struct {
  4291. // Source: Specification of the source whose metadata should be
  4292. // computed.
  4293. Source *Source `json:"source,omitempty"`
  4294. // ForceSendFields is a list of field names (e.g. "Source") to
  4295. // unconditionally include in API requests. By default, fields with
  4296. // empty values are omitted from API requests. However, any non-pointer,
  4297. // non-interface field appearing in ForceSendFields will be sent to the
  4298. // server regardless of whether the field is empty or not. This may be
  4299. // used to include empty fields in Patch requests.
  4300. ForceSendFields []string `json:"-"`
  4301. // NullFields is a list of field names (e.g. "Source") to include in API
  4302. // requests with the JSON null value. By default, fields with empty
  4303. // values are omitted from API requests. However, any field with an
  4304. // empty value appearing in NullFields will be sent to the server as
  4305. // null. It is an error if a field in this list has a non-empty value.
  4306. // This may be used to include null fields in Patch requests.
  4307. NullFields []string `json:"-"`
  4308. }
  4309. func (s *SourceGetMetadataRequest) MarshalJSON() ([]byte, error) {
  4310. type NoMethod SourceGetMetadataRequest
  4311. raw := NoMethod(*s)
  4312. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4313. }
  4314. // SourceGetMetadataResponse: The result of a
  4315. // SourceGetMetadataOperation.
  4316. type SourceGetMetadataResponse struct {
  4317. // Metadata: The computed metadata.
  4318. Metadata *SourceMetadata `json:"metadata,omitempty"`
  4319. // ForceSendFields is a list of field names (e.g. "Metadata") to
  4320. // unconditionally include in API requests. By default, fields with
  4321. // empty values are omitted from API requests. However, any non-pointer,
  4322. // non-interface field appearing in ForceSendFields will be sent to the
  4323. // server regardless of whether the field is empty or not. This may be
  4324. // used to include empty fields in Patch requests.
  4325. ForceSendFields []string `json:"-"`
  4326. // NullFields is a list of field names (e.g. "Metadata") to include in
  4327. // API requests with the JSON null value. By default, fields with empty
  4328. // values are omitted from API requests. However, any field with an
  4329. // empty value appearing in NullFields will be sent to the server as
  4330. // null. It is an error if a field in this list has a non-empty value.
  4331. // This may be used to include null fields in Patch requests.
  4332. NullFields []string `json:"-"`
  4333. }
  4334. func (s *SourceGetMetadataResponse) MarshalJSON() ([]byte, error) {
  4335. type NoMethod SourceGetMetadataResponse
  4336. raw := NoMethod(*s)
  4337. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4338. }
  4339. // SourceMetadata: Metadata about a Source useful for automatically
  4340. // optimizing
  4341. // and tuning the pipeline, etc.
  4342. type SourceMetadata struct {
  4343. // EstimatedSizeBytes: An estimate of the total size (in bytes) of the
  4344. // data that would be
  4345. // read from this source. This estimate is in terms of external
  4346. // storage
  4347. // size, before any decompression or other processing done by the
  4348. // reader.
  4349. EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"`
  4350. // Infinite: Specifies that the size of this source is known to be
  4351. // infinite
  4352. // (this is a streaming source).
  4353. Infinite bool `json:"infinite,omitempty"`
  4354. // ProducesSortedKeys: Whether this source is known to produce key/value
  4355. // pairs with
  4356. // the (encoded) keys in lexicographically sorted order.
  4357. ProducesSortedKeys bool `json:"producesSortedKeys,omitempty"`
  4358. // ForceSendFields is a list of field names (e.g. "EstimatedSizeBytes")
  4359. // to unconditionally include in API requests. By default, fields with
  4360. // empty values are omitted from API requests. However, any non-pointer,
  4361. // non-interface field appearing in ForceSendFields will be sent to the
  4362. // server regardless of whether the field is empty or not. This may be
  4363. // used to include empty fields in Patch requests.
  4364. ForceSendFields []string `json:"-"`
  4365. // NullFields is a list of field names (e.g. "EstimatedSizeBytes") to
  4366. // include in API requests with the JSON null value. By default, fields
  4367. // with empty values are omitted from API requests. However, any field
  4368. // with an empty value appearing in NullFields will be sent to the
  4369. // server as null. It is an error if a field in this list has a
  4370. // non-empty value. This may be used to include null fields in Patch
  4371. // requests.
  4372. NullFields []string `json:"-"`
  4373. }
  4374. func (s *SourceMetadata) MarshalJSON() ([]byte, error) {
  4375. type NoMethod SourceMetadata
  4376. raw := NoMethod(*s)
  4377. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4378. }
  4379. // SourceOperationRequest: A work item that represents the different
  4380. // operations that can be
  4381. // performed on a user-defined Source specification.
  4382. type SourceOperationRequest struct {
  4383. // GetMetadata: Information about a request to get metadata about a
  4384. // source.
  4385. GetMetadata *SourceGetMetadataRequest `json:"getMetadata,omitempty"`
  4386. // Name: User-provided name of the Read instruction for this source.
  4387. Name string `json:"name,omitempty"`
  4388. // OriginalName: System-defined name for the Read instruction for this
  4389. // source
  4390. // in the original workflow graph.
  4391. OriginalName string `json:"originalName,omitempty"`
  4392. // Split: Information about a request to split a source.
  4393. Split *SourceSplitRequest `json:"split,omitempty"`
  4394. // StageName: System-defined name of the stage containing the source
  4395. // operation.
  4396. // Unique across the workflow.
  4397. StageName string `json:"stageName,omitempty"`
  4398. // SystemName: System-defined name of the Read instruction for this
  4399. // source.
  4400. // Unique across the workflow.
  4401. SystemName string `json:"systemName,omitempty"`
  4402. // ForceSendFields is a list of field names (e.g. "GetMetadata") to
  4403. // unconditionally include in API requests. By default, fields with
  4404. // empty values are omitted from API requests. However, any non-pointer,
  4405. // non-interface field appearing in ForceSendFields will be sent to the
  4406. // server regardless of whether the field is empty or not. This may be
  4407. // used to include empty fields in Patch requests.
  4408. ForceSendFields []string `json:"-"`
  4409. // NullFields is a list of field names (e.g. "GetMetadata") to include
  4410. // in API requests with the JSON null value. By default, fields with
  4411. // empty values are omitted from API requests. However, any field with
  4412. // an empty value appearing in NullFields will be sent to the server as
  4413. // null. It is an error if a field in this list has a non-empty value.
  4414. // This may be used to include null fields in Patch requests.
  4415. NullFields []string `json:"-"`
  4416. }
  4417. func (s *SourceOperationRequest) MarshalJSON() ([]byte, error) {
  4418. type NoMethod SourceOperationRequest
  4419. raw := NoMethod(*s)
  4420. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4421. }
  4422. // SourceOperationResponse: The result of a SourceOperationRequest,
  4423. // specified in
  4424. // ReportWorkItemStatusRequest.source_operation when the work item
  4425. // is completed.
  4426. type SourceOperationResponse struct {
  4427. // GetMetadata: A response to a request to get metadata about a source.
  4428. GetMetadata *SourceGetMetadataResponse `json:"getMetadata,omitempty"`
  4429. // Split: A response to a request to split a source.
  4430. Split *SourceSplitResponse `json:"split,omitempty"`
  4431. // ForceSendFields is a list of field names (e.g. "GetMetadata") to
  4432. // unconditionally include in API requests. By default, fields with
  4433. // empty values are omitted from API requests. However, any non-pointer,
  4434. // non-interface field appearing in ForceSendFields will be sent to the
  4435. // server regardless of whether the field is empty or not. This may be
  4436. // used to include empty fields in Patch requests.
  4437. ForceSendFields []string `json:"-"`
  4438. // NullFields is a list of field names (e.g. "GetMetadata") to include
  4439. // in API requests with the JSON null value. By default, fields with
  4440. // empty values are omitted from API requests. However, any field with
  4441. // an empty value appearing in NullFields will be sent to the server as
  4442. // null. It is an error if a field in this list has a non-empty value.
  4443. // This may be used to include null fields in Patch requests.
  4444. NullFields []string `json:"-"`
  4445. }
  4446. func (s *SourceOperationResponse) MarshalJSON() ([]byte, error) {
  4447. type NoMethod SourceOperationResponse
  4448. raw := NoMethod(*s)
  4449. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4450. }
  4451. // SourceSplitOptions: Hints for splitting a Source into bundles (parts
  4452. // for parallel
  4453. // processing) using SourceSplitRequest.
  4454. type SourceSplitOptions struct {
  4455. // DesiredBundleSizeBytes: The source should be split into a set of
  4456. // bundles where the estimated size
  4457. // of each is approximately this many bytes.
  4458. DesiredBundleSizeBytes int64 `json:"desiredBundleSizeBytes,omitempty,string"`
  4459. // DesiredShardSizeBytes: DEPRECATED in favor of
  4460. // desired_bundle_size_bytes.
  4461. DesiredShardSizeBytes int64 `json:"desiredShardSizeBytes,omitempty,string"`
  4462. // ForceSendFields is a list of field names (e.g.
  4463. // "DesiredBundleSizeBytes") to unconditionally include in API requests.
  4464. // By default, fields with empty values are omitted from API requests.
  4465. // However, any non-pointer, non-interface field appearing in
  4466. // ForceSendFields will be sent to the server regardless of whether the
  4467. // field is empty or not. This may be used to include empty fields in
  4468. // Patch requests.
  4469. ForceSendFields []string `json:"-"`
  4470. // NullFields is a list of field names (e.g. "DesiredBundleSizeBytes")
  4471. // to include in API requests with the JSON null value. By default,
  4472. // fields with empty values are omitted from API requests. However, any
  4473. // field with an empty value appearing in NullFields will be sent to the
  4474. // server as null. It is an error if a field in this list has a
  4475. // non-empty value. This may be used to include null fields in Patch
  4476. // requests.
  4477. NullFields []string `json:"-"`
  4478. }
  4479. func (s *SourceSplitOptions) MarshalJSON() ([]byte, error) {
  4480. type NoMethod SourceSplitOptions
  4481. raw := NoMethod(*s)
  4482. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4483. }
  4484. // SourceSplitRequest: Represents the operation to split a high-level
  4485. // Source specification
  4486. // into bundles (parts for parallel processing).
  4487. //
  4488. // At a high level, splitting of a source into bundles happens as
  4489. // follows:
  4490. // SourceSplitRequest is applied to the source. If it
  4491. // returns
  4492. // SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and
  4493. // the source
  4494. // is used "as is". Otherwise, splitting is applied recursively to
  4495. // each
  4496. // produced DerivedSource.
  4497. //
  4498. // As an optimization, for any Source, if its does_not_need_splitting
  4499. // is
  4500. // true, the framework assumes that splitting this source would
  4501. // return
  4502. // SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a
  4503. // SourceSplitRequest.
  4504. // This applies both to the initial source being split and to
  4505. // bundles
  4506. // produced from it.
  4507. type SourceSplitRequest struct {
  4508. // Options: Hints for tuning the splitting process.
  4509. Options *SourceSplitOptions `json:"options,omitempty"`
  4510. // Source: Specification of the source to be split.
  4511. Source *Source `json:"source,omitempty"`
  4512. // ForceSendFields is a list of field names (e.g. "Options") to
  4513. // unconditionally include in API requests. By default, fields with
  4514. // empty values are omitted from API requests. However, any non-pointer,
  4515. // non-interface field appearing in ForceSendFields will be sent to the
  4516. // server regardless of whether the field is empty or not. This may be
  4517. // used to include empty fields in Patch requests.
  4518. ForceSendFields []string `json:"-"`
  4519. // NullFields is a list of field names (e.g. "Options") to include in
  4520. // API requests with the JSON null value. By default, fields with empty
  4521. // values are omitted from API requests. However, any field with an
  4522. // empty value appearing in NullFields will be sent to the server as
  4523. // null. It is an error if a field in this list has a non-empty value.
  4524. // This may be used to include null fields in Patch requests.
  4525. NullFields []string `json:"-"`
  4526. }
  4527. func (s *SourceSplitRequest) MarshalJSON() ([]byte, error) {
  4528. type NoMethod SourceSplitRequest
  4529. raw := NoMethod(*s)
  4530. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4531. }
  4532. // SourceSplitResponse: The response to a SourceSplitRequest.
  4533. type SourceSplitResponse struct {
  4534. // Bundles: If outcome is SPLITTING_HAPPENED, then this is a list of
  4535. // bundles
  4536. // into which the source was split. Otherwise this field is
  4537. // ignored.
  4538. // This list can be empty, which means the source represents an empty
  4539. // input.
  4540. Bundles []*DerivedSource `json:"bundles,omitempty"`
  4541. // Outcome: Indicates whether splitting happened and produced a list of
  4542. // bundles.
  4543. // If this is USE_CURRENT_SOURCE_AS_IS, the current source should
  4544. // be processed "as is" without splitting. "bundles" is ignored in this
  4545. // case.
  4546. // If this is SPLITTING_HAPPENED, then "bundles" contains a list
  4547. // of
  4548. // bundles into which the source was split.
  4549. //
  4550. // Possible values:
  4551. // "SOURCE_SPLIT_OUTCOME_UNKNOWN" - The source split outcome is
  4552. // unknown, or unspecified.
  4553. // "SOURCE_SPLIT_OUTCOME_USE_CURRENT" - The current source should be
  4554. // processed "as is" without splitting.
  4555. // "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - Splitting produced a
  4556. // list of bundles.
  4557. Outcome string `json:"outcome,omitempty"`
  4558. // Shards: DEPRECATED in favor of bundles.
  4559. Shards []*SourceSplitShard `json:"shards,omitempty"`
  4560. // ForceSendFields is a list of field names (e.g. "Bundles") to
  4561. // unconditionally include in API requests. By default, fields with
  4562. // empty values are omitted from API requests. However, any non-pointer,
  4563. // non-interface field appearing in ForceSendFields will be sent to the
  4564. // server regardless of whether the field is empty or not. This may be
  4565. // used to include empty fields in Patch requests.
  4566. ForceSendFields []string `json:"-"`
  4567. // NullFields is a list of field names (e.g. "Bundles") to include in
  4568. // API requests with the JSON null value. By default, fields with empty
  4569. // values are omitted from API requests. However, any field with an
  4570. // empty value appearing in NullFields will be sent to the server as
  4571. // null. It is an error if a field in this list has a non-empty value.
  4572. // This may be used to include null fields in Patch requests.
  4573. NullFields []string `json:"-"`
  4574. }
  4575. func (s *SourceSplitResponse) MarshalJSON() ([]byte, error) {
  4576. type NoMethod SourceSplitResponse
  4577. raw := NoMethod(*s)
  4578. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4579. }
  4580. // SourceSplitShard: DEPRECATED in favor of DerivedSource.
  4581. type SourceSplitShard struct {
  4582. // DerivationMode: DEPRECATED
  4583. //
  4584. // Possible values:
  4585. // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is
  4586. // unknown, or unspecified.
  4587. // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely
  4588. // independent Source with no base.
  4589. // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based
  4590. // on the Source being split.
  4591. // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source
  4592. // based on the base of the Source being split.
  4593. DerivationMode string `json:"derivationMode,omitempty"`
  4594. // Source: DEPRECATED
  4595. Source *Source `json:"source,omitempty"`
  4596. // ForceSendFields is a list of field names (e.g. "DerivationMode") to
  4597. // unconditionally include in API requests. By default, fields with
  4598. // empty values are omitted from API requests. However, any non-pointer,
  4599. // non-interface field appearing in ForceSendFields will be sent to the
  4600. // server regardless of whether the field is empty or not. This may be
  4601. // used to include empty fields in Patch requests.
  4602. ForceSendFields []string `json:"-"`
  4603. // NullFields is a list of field names (e.g. "DerivationMode") to
  4604. // include in API requests with the JSON null value. By default, fields
  4605. // with empty values are omitted from API requests. However, any field
  4606. // with an empty value appearing in NullFields will be sent to the
  4607. // server as null. It is an error if a field in this list has a
  4608. // non-empty value. This may be used to include null fields in Patch
  4609. // requests.
  4610. NullFields []string `json:"-"`
  4611. }
  4612. func (s *SourceSplitShard) MarshalJSON() ([]byte, error) {
  4613. type NoMethod SourceSplitShard
  4614. raw := NoMethod(*s)
  4615. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4616. }
  4617. // SpannerIODetails: Metadata for a Spanner connector used by the job.
  4618. type SpannerIODetails struct {
  4619. // DatabaseId: DatabaseId accessed in the connection.
  4620. DatabaseId string `json:"databaseId,omitempty"`
  4621. // InstanceId: InstanceId accessed in the connection.
  4622. InstanceId string `json:"instanceId,omitempty"`
  4623. // ProjectId: ProjectId accessed in the connection.
  4624. ProjectId string `json:"projectId,omitempty"`
  4625. // ForceSendFields is a list of field names (e.g. "DatabaseId") to
  4626. // unconditionally include in API requests. By default, fields with
  4627. // empty values are omitted from API requests. However, any non-pointer,
  4628. // non-interface field appearing in ForceSendFields will be sent to the
  4629. // server regardless of whether the field is empty or not. This may be
  4630. // used to include empty fields in Patch requests.
  4631. ForceSendFields []string `json:"-"`
  4632. // NullFields is a list of field names (e.g. "DatabaseId") to include in
  4633. // API requests with the JSON null value. By default, fields with empty
  4634. // values are omitted from API requests. However, any field with an
  4635. // empty value appearing in NullFields will be sent to the server as
  4636. // null. It is an error if a field in this list has a non-empty value.
  4637. // This may be used to include null fields in Patch requests.
  4638. NullFields []string `json:"-"`
  4639. }
  4640. func (s *SpannerIODetails) MarshalJSON() ([]byte, error) {
  4641. type NoMethod SpannerIODetails
  4642. raw := NoMethod(*s)
  4643. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4644. }
  4645. // SplitInt64: A representation of an int64, n, that is immune to
  4646. // precision loss when
  4647. // encoded in JSON.
  4648. type SplitInt64 struct {
  4649. // HighBits: The high order bits, including the sign: n >> 32.
  4650. HighBits int64 `json:"highBits,omitempty"`
  4651. // LowBits: The low order bits: n & 0xffffffff.
  4652. LowBits int64 `json:"lowBits,omitempty"`
  4653. // ForceSendFields is a list of field names (e.g. "HighBits") to
  4654. // unconditionally include in API requests. By default, fields with
  4655. // empty values are omitted from API requests. However, any non-pointer,
  4656. // non-interface field appearing in ForceSendFields will be sent to the
  4657. // server regardless of whether the field is empty or not. This may be
  4658. // used to include empty fields in Patch requests.
  4659. ForceSendFields []string `json:"-"`
  4660. // NullFields is a list of field names (e.g. "HighBits") to include in
  4661. // API requests with the JSON null value. By default, fields with empty
  4662. // values are omitted from API requests. However, any field with an
  4663. // empty value appearing in NullFields will be sent to the server as
  4664. // null. It is an error if a field in this list has a non-empty value.
  4665. // This may be used to include null fields in Patch requests.
  4666. NullFields []string `json:"-"`
  4667. }
  4668. func (s *SplitInt64) MarshalJSON() ([]byte, error) {
  4669. type NoMethod SplitInt64
  4670. raw := NoMethod(*s)
  4671. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4672. }
  4673. // StageSource: Description of an input or output of an execution stage.
  4674. type StageSource struct {
  4675. // Name: Dataflow service generated name for this source.
  4676. Name string `json:"name,omitempty"`
  4677. // OriginalTransformOrCollection: User name for the original user
  4678. // transform or collection with which this
  4679. // source is most closely associated.
  4680. OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"`
  4681. // SizeBytes: Size of the source, if measurable.
  4682. SizeBytes int64 `json:"sizeBytes,omitempty,string"`
  4683. // UserName: Human-readable name for this source; may be user or system
  4684. // generated.
  4685. UserName string `json:"userName,omitempty"`
  4686. // ForceSendFields is a list of field names (e.g. "Name") to
  4687. // unconditionally include in API requests. By default, fields with
  4688. // empty values are omitted from API requests. However, any non-pointer,
  4689. // non-interface field appearing in ForceSendFields will be sent to the
  4690. // server regardless of whether the field is empty or not. This may be
  4691. // used to include empty fields in Patch requests.
  4692. ForceSendFields []string `json:"-"`
  4693. // NullFields is a list of field names (e.g. "Name") to include in API
  4694. // requests with the JSON null value. By default, fields with empty
  4695. // values are omitted from API requests. However, any field with an
  4696. // empty value appearing in NullFields will be sent to the server as
  4697. // null. It is an error if a field in this list has a non-empty value.
  4698. // This may be used to include null fields in Patch requests.
  4699. NullFields []string `json:"-"`
  4700. }
  4701. func (s *StageSource) MarshalJSON() ([]byte, error) {
  4702. type NoMethod StageSource
  4703. raw := NoMethod(*s)
  4704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4705. }
  4706. // StateFamilyConfig: State family configuration.
  4707. type StateFamilyConfig struct {
  4708. // IsRead: If true, this family corresponds to a read operation.
  4709. IsRead bool `json:"isRead,omitempty"`
  4710. // StateFamily: The state family value.
  4711. StateFamily string `json:"stateFamily,omitempty"`
  4712. // ForceSendFields is a list of field names (e.g. "IsRead") to
  4713. // unconditionally include in API requests. By default, fields with
  4714. // empty values are omitted from API requests. However, any non-pointer,
  4715. // non-interface field appearing in ForceSendFields will be sent to the
  4716. // server regardless of whether the field is empty or not. This may be
  4717. // used to include empty fields in Patch requests.
  4718. ForceSendFields []string `json:"-"`
  4719. // NullFields is a list of field names (e.g. "IsRead") to include in API
  4720. // requests with the JSON null value. By default, fields with empty
  4721. // values are omitted from API requests. However, any field with an
  4722. // empty value appearing in NullFields will be sent to the server as
  4723. // null. It is an error if a field in this list has a non-empty value.
  4724. // This may be used to include null fields in Patch requests.
  4725. NullFields []string `json:"-"`
  4726. }
  4727. func (s *StateFamilyConfig) MarshalJSON() ([]byte, error) {
  4728. type NoMethod StateFamilyConfig
  4729. raw := NoMethod(*s)
  4730. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4731. }
  4732. // Status: The `Status` type defines a logical error model that is
  4733. // suitable for different
  4734. // programming environments, including REST APIs and RPC APIs. It is
  4735. // used by
  4736. // [gRPC](https://github.com/grpc). The error model is designed to
  4737. // be:
  4738. //
  4739. // - Simple to use and understand for most users
  4740. // - Flexible enough to meet unexpected needs
  4741. //
  4742. // # Overview
  4743. //
  4744. // The `Status` message contains three pieces of data: error code, error
  4745. // message,
  4746. // and error details. The error code should be an enum value
  4747. // of
  4748. // google.rpc.Code, but it may accept additional error codes if needed.
  4749. // The
  4750. // error message should be a developer-facing English message that
  4751. // helps
  4752. // developers *understand* and *resolve* the error. If a localized
  4753. // user-facing
  4754. // error message is needed, put the localized message in the error
  4755. // details or
  4756. // localize it in the client. The optional error details may contain
  4757. // arbitrary
  4758. // information about the error. There is a predefined set of error
  4759. // detail types
  4760. // in the package `google.rpc` that can be used for common error
  4761. // conditions.
  4762. //
  4763. // # Language mapping
  4764. //
  4765. // The `Status` message is the logical representation of the error
  4766. // model, but it
  4767. // is not necessarily the actual wire format. When the `Status` message
  4768. // is
  4769. // exposed in different client libraries and different wire protocols,
  4770. // it can be
  4771. // mapped differently. For example, it will likely be mapped to some
  4772. // exceptions
  4773. // in Java, but more likely mapped to some error codes in C.
  4774. //
  4775. // # Other uses
  4776. //
  4777. // The error model and the `Status` message can be used in a variety
  4778. // of
  4779. // environments, either with or without APIs, to provide a
  4780. // consistent developer experience across different
  4781. // environments.
  4782. //
  4783. // Example uses of this error model include:
  4784. //
  4785. // - Partial errors. If a service needs to return partial errors to the
  4786. // client,
  4787. // it may embed the `Status` in the normal response to indicate the
  4788. // partial
  4789. // errors.
  4790. //
  4791. // - Workflow errors. A typical workflow has multiple steps. Each step
  4792. // may
  4793. // have a `Status` message for error reporting.
  4794. //
  4795. // - Batch operations. If a client uses batch request and batch
  4796. // response, the
  4797. // `Status` message should be used directly inside batch response,
  4798. // one for
  4799. // each error sub-response.
  4800. //
  4801. // - Asynchronous operations. If an API call embeds asynchronous
  4802. // operation
  4803. // results in its response, the status of those operations should
  4804. // be
  4805. // represented directly using the `Status` message.
  4806. //
  4807. // - Logging. If some API errors are stored in logs, the message
  4808. // `Status` could
  4809. // be used directly after any stripping needed for security/privacy
  4810. // reasons.
  4811. type Status struct {
  4812. // Code: The status code, which should be an enum value of
  4813. // google.rpc.Code.
  4814. Code int64 `json:"code,omitempty"`
  4815. // Details: A list of messages that carry the error details. There is a
  4816. // common set of
  4817. // message types for APIs to use.
  4818. Details []googleapi.RawMessage `json:"details,omitempty"`
  4819. // Message: A developer-facing error message, which should be in
  4820. // English. Any
  4821. // user-facing error message should be localized and sent in
  4822. // the
  4823. // google.rpc.Status.details field, or localized by the client.
  4824. Message string `json:"message,omitempty"`
  4825. // ForceSendFields is a list of field names (e.g. "Code") to
  4826. // unconditionally include in API requests. By default, fields with
  4827. // empty values are omitted from API requests. However, any non-pointer,
  4828. // non-interface field appearing in ForceSendFields will be sent to the
  4829. // server regardless of whether the field is empty or not. This may be
  4830. // used to include empty fields in Patch requests.
  4831. ForceSendFields []string `json:"-"`
  4832. // NullFields is a list of field names (e.g. "Code") to include in API
  4833. // requests with the JSON null value. By default, fields with empty
  4834. // values are omitted from API requests. However, any field with an
  4835. // empty value appearing in NullFields will be sent to the server as
  4836. // null. It is an error if a field in this list has a non-empty value.
  4837. // This may be used to include null fields in Patch requests.
  4838. NullFields []string `json:"-"`
  4839. }
  4840. func (s *Status) MarshalJSON() ([]byte, error) {
  4841. type NoMethod Status
  4842. raw := NoMethod(*s)
  4843. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4844. }
  4845. // Step: Defines a particular step within a Cloud Dataflow job.
  4846. //
  4847. // A job consists of multiple steps, each of which performs
  4848. // some
  4849. // specific operation as part of the overall job. Data is
  4850. // typically
  4851. // passed from one step to another as part of the job.
  4852. //
  4853. // Here's an example of a sequence of steps which together implement
  4854. // a
  4855. // Map-Reduce job:
  4856. //
  4857. // * Read a collection of data from some source, parsing the
  4858. // collection's elements.
  4859. //
  4860. // * Validate the elements.
  4861. //
  4862. // * Apply a user-defined function to map each element to some value
  4863. // and extract an element-specific key value.
  4864. //
  4865. // * Group elements with the same key into a single element with
  4866. // that key, transforming a multiply-keyed collection into a
  4867. // uniquely-keyed collection.
  4868. //
  4869. // * Write the elements out to some data sink.
  4870. //
  4871. // Note that the Cloud Dataflow service may be used to run many
  4872. // different
  4873. // types of jobs, not just Map-Reduce.
  4874. type Step struct {
  4875. // Kind: The kind of step in the Cloud Dataflow job.
  4876. Kind string `json:"kind,omitempty"`
  4877. // Name: The name that identifies the step. This must be unique for
  4878. // each
  4879. // step with respect to all other steps in the Cloud Dataflow job.
  4880. Name string `json:"name,omitempty"`
  4881. // Properties: Named properties associated with the step. Each kind
  4882. // of
  4883. // predefined step has its own required set of properties.
  4884. // Must be provided on Create. Only retrieved with JOB_VIEW_ALL.
  4885. Properties googleapi.RawMessage `json:"properties,omitempty"`
  4886. // ForceSendFields is a list of field names (e.g. "Kind") to
  4887. // unconditionally include in API requests. By default, fields with
  4888. // empty values are omitted from API requests. However, any non-pointer,
  4889. // non-interface field appearing in ForceSendFields will be sent to the
  4890. // server regardless of whether the field is empty or not. This may be
  4891. // used to include empty fields in Patch requests.
  4892. ForceSendFields []string `json:"-"`
  4893. // NullFields is a list of field names (e.g. "Kind") to include in API
  4894. // requests with the JSON null value. By default, fields with empty
  4895. // values are omitted from API requests. However, any field with an
  4896. // empty value appearing in NullFields will be sent to the server as
  4897. // null. It is an error if a field in this list has a non-empty value.
  4898. // This may be used to include null fields in Patch requests.
  4899. NullFields []string `json:"-"`
  4900. }
  4901. func (s *Step) MarshalJSON() ([]byte, error) {
  4902. type NoMethod Step
  4903. raw := NoMethod(*s)
  4904. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4905. }
  4906. // StreamLocation: Describes a stream of data, either as input to be
  4907. // processed or as
  4908. // output of a streaming Dataflow job.
  4909. type StreamLocation struct {
  4910. // CustomSourceLocation: The stream is a custom source.
  4911. CustomSourceLocation *CustomSourceLocation `json:"customSourceLocation,omitempty"`
  4912. // PubsubLocation: The stream is a pubsub stream.
  4913. PubsubLocation *PubsubLocation `json:"pubsubLocation,omitempty"`
  4914. // SideInputLocation: The stream is a streaming side input.
  4915. SideInputLocation *StreamingSideInputLocation `json:"sideInputLocation,omitempty"`
  4916. // StreamingStageLocation: The stream is part of another computation
  4917. // within the current
  4918. // streaming Dataflow job.
  4919. StreamingStageLocation *StreamingStageLocation `json:"streamingStageLocation,omitempty"`
  4920. // ForceSendFields is a list of field names (e.g.
  4921. // "CustomSourceLocation") to unconditionally include in API requests.
  4922. // By default, fields with empty values are omitted from API requests.
  4923. // However, any non-pointer, non-interface field appearing in
  4924. // ForceSendFields will be sent to the server regardless of whether the
  4925. // field is empty or not. This may be used to include empty fields in
  4926. // Patch requests.
  4927. ForceSendFields []string `json:"-"`
  4928. // NullFields is a list of field names (e.g. "CustomSourceLocation") to
  4929. // include in API requests with the JSON null value. By default, fields
  4930. // with empty values are omitted from API requests. However, any field
  4931. // with an empty value appearing in NullFields will be sent to the
  4932. // server as null. It is an error if a field in this list has a
  4933. // non-empty value. This may be used to include null fields in Patch
  4934. // requests.
  4935. NullFields []string `json:"-"`
  4936. }
  4937. func (s *StreamLocation) MarshalJSON() ([]byte, error) {
  4938. type NoMethod StreamLocation
  4939. raw := NoMethod(*s)
  4940. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4941. }
  4942. // StreamingApplianceSnapshotConfig: Streaming appliance snapshot
  4943. // configuration.
  4944. type StreamingApplianceSnapshotConfig struct {
  4945. // ImportStateEndpoint: Indicates which endpoint is used to import
  4946. // appliance state.
  4947. ImportStateEndpoint string `json:"importStateEndpoint,omitempty"`
  4948. // SnapshotId: If set, indicates the snapshot id for the snapshot being
  4949. // performed.
  4950. SnapshotId string `json:"snapshotId,omitempty"`
  4951. // ForceSendFields is a list of field names (e.g. "ImportStateEndpoint")
  4952. // to unconditionally include in API requests. By default, fields with
  4953. // empty values are omitted from API requests. However, any non-pointer,
  4954. // non-interface field appearing in ForceSendFields will be sent to the
  4955. // server regardless of whether the field is empty or not. This may be
  4956. // used to include empty fields in Patch requests.
  4957. ForceSendFields []string `json:"-"`
  4958. // NullFields is a list of field names (e.g. "ImportStateEndpoint") to
  4959. // include in API requests with the JSON null value. By default, fields
  4960. // with empty values are omitted from API requests. However, any field
  4961. // with an empty value appearing in NullFields will be sent to the
  4962. // server as null. It is an error if a field in this list has a
  4963. // non-empty value. This may be used to include null fields in Patch
  4964. // requests.
  4965. NullFields []string `json:"-"`
  4966. }
  4967. func (s *StreamingApplianceSnapshotConfig) MarshalJSON() ([]byte, error) {
  4968. type NoMethod StreamingApplianceSnapshotConfig
  4969. raw := NoMethod(*s)
  4970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4971. }
  4972. // StreamingComputationConfig: Configuration information for a single
  4973. // streaming computation.
  4974. type StreamingComputationConfig struct {
  4975. // ComputationId: Unique identifier for this computation.
  4976. ComputationId string `json:"computationId,omitempty"`
  4977. // Instructions: Instructions that comprise the computation.
  4978. Instructions []*ParallelInstruction `json:"instructions,omitempty"`
  4979. // StageName: Stage name of this computation.
  4980. StageName string `json:"stageName,omitempty"`
  4981. // SystemName: System defined name for this computation.
  4982. SystemName string `json:"systemName,omitempty"`
  4983. // TransformUserNameToStateFamily: Map from user name of stateful
  4984. // transforms in this stage to their state
  4985. // family.
  4986. TransformUserNameToStateFamily map[string]string `json:"transformUserNameToStateFamily,omitempty"`
  4987. // ForceSendFields is a list of field names (e.g. "ComputationId") to
  4988. // unconditionally include in API requests. By default, fields with
  4989. // empty values are omitted from API requests. However, any non-pointer,
  4990. // non-interface field appearing in ForceSendFields will be sent to the
  4991. // server regardless of whether the field is empty or not. This may be
  4992. // used to include empty fields in Patch requests.
  4993. ForceSendFields []string `json:"-"`
  4994. // NullFields is a list of field names (e.g. "ComputationId") to include
  4995. // in API requests with the JSON null value. By default, fields with
  4996. // empty values are omitted from API requests. However, any field with
  4997. // an empty value appearing in NullFields will be sent to the server as
  4998. // null. It is an error if a field in this list has a non-empty value.
  4999. // This may be used to include null fields in Patch requests.
  5000. NullFields []string `json:"-"`
  5001. }
  5002. func (s *StreamingComputationConfig) MarshalJSON() ([]byte, error) {
  5003. type NoMethod StreamingComputationConfig
  5004. raw := NoMethod(*s)
  5005. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5006. }
  5007. // StreamingComputationRanges: Describes full or partial data disk
  5008. // assignment information of the computation
  5009. // ranges.
  5010. type StreamingComputationRanges struct {
  5011. // ComputationId: The ID of the computation.
  5012. ComputationId string `json:"computationId,omitempty"`
  5013. // RangeAssignments: Data disk assignments for ranges from this
  5014. // computation.
  5015. RangeAssignments []*KeyRangeDataDiskAssignment `json:"rangeAssignments,omitempty"`
  5016. // ForceSendFields is a list of field names (e.g. "ComputationId") to
  5017. // unconditionally include in API requests. By default, fields with
  5018. // empty values are omitted from API requests. However, any non-pointer,
  5019. // non-interface field appearing in ForceSendFields will be sent to the
  5020. // server regardless of whether the field is empty or not. This may be
  5021. // used to include empty fields in Patch requests.
  5022. ForceSendFields []string `json:"-"`
  5023. // NullFields is a list of field names (e.g. "ComputationId") to include
  5024. // in API requests with the JSON null value. By default, fields with
  5025. // empty values are omitted from API requests. However, any field with
  5026. // an empty value appearing in NullFields will be sent to the server as
  5027. // null. It is an error if a field in this list has a non-empty value.
  5028. // This may be used to include null fields in Patch requests.
  5029. NullFields []string `json:"-"`
  5030. }
  5031. func (s *StreamingComputationRanges) MarshalJSON() ([]byte, error) {
  5032. type NoMethod StreamingComputationRanges
  5033. raw := NoMethod(*s)
  5034. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5035. }
  5036. // StreamingComputationTask: A task which describes what action should
  5037. // be performed for the specified
  5038. // streaming computation ranges.
  5039. type StreamingComputationTask struct {
  5040. // ComputationRanges: Contains ranges of a streaming computation this
  5041. // task should apply to.
  5042. ComputationRanges []*StreamingComputationRanges `json:"computationRanges,omitempty"`
  5043. // DataDisks: Describes the set of data disks this task should apply to.
  5044. DataDisks []*MountedDataDisk `json:"dataDisks,omitempty"`
  5045. // TaskType: A type of streaming computation task.
  5046. //
  5047. // Possible values:
  5048. // "STREAMING_COMPUTATION_TASK_UNKNOWN" - The streaming computation
  5049. // task is unknown, or unspecified.
  5050. // "STREAMING_COMPUTATION_TASK_STOP" - Stop processing specified
  5051. // streaming computation range(s).
  5052. // "STREAMING_COMPUTATION_TASK_START" - Start processing specified
  5053. // streaming computation range(s).
  5054. TaskType string `json:"taskType,omitempty"`
  5055. // ForceSendFields is a list of field names (e.g. "ComputationRanges")
  5056. // to unconditionally include in API requests. By default, fields with
  5057. // empty values are omitted from API requests. However, any non-pointer,
  5058. // non-interface field appearing in ForceSendFields will be sent to the
  5059. // server regardless of whether the field is empty or not. This may be
  5060. // used to include empty fields in Patch requests.
  5061. ForceSendFields []string `json:"-"`
  5062. // NullFields is a list of field names (e.g. "ComputationRanges") to
  5063. // include in API requests with the JSON null value. By default, fields
  5064. // with empty values are omitted from API requests. However, any field
  5065. // with an empty value appearing in NullFields will be sent to the
  5066. // server as null. It is an error if a field in this list has a
  5067. // non-empty value. This may be used to include null fields in Patch
  5068. // requests.
  5069. NullFields []string `json:"-"`
  5070. }
  5071. func (s *StreamingComputationTask) MarshalJSON() ([]byte, error) {
  5072. type NoMethod StreamingComputationTask
  5073. raw := NoMethod(*s)
  5074. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5075. }
  5076. // StreamingConfigTask: A task that carries configuration information
  5077. // for streaming computations.
  5078. type StreamingConfigTask struct {
  5079. // MaxWorkItemCommitBytes: Maximum size for work item commit supported
  5080. // windmill storage layer.
  5081. MaxWorkItemCommitBytes int64 `json:"maxWorkItemCommitBytes,omitempty,string"`
  5082. // StreamingComputationConfigs: Set of computation configuration
  5083. // information.
  5084. StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"`
  5085. // UserStepToStateFamilyNameMap: Map from user step names to state
  5086. // families.
  5087. UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"`
  5088. // WindmillServiceEndpoint: If present, the worker must use this
  5089. // endpoint to communicate with Windmill
  5090. // Service dispatchers, otherwise the worker must continue to use
  5091. // whatever
  5092. // endpoint it had been using.
  5093. WindmillServiceEndpoint string `json:"windmillServiceEndpoint,omitempty"`
  5094. // WindmillServicePort: If present, the worker must use this port to
  5095. // communicate with Windmill
  5096. // Service dispatchers. Only applicable when windmill_service_endpoint
  5097. // is
  5098. // specified.
  5099. WindmillServicePort int64 `json:"windmillServicePort,omitempty,string"`
  5100. // ForceSendFields is a list of field names (e.g.
  5101. // "MaxWorkItemCommitBytes") to unconditionally include in API requests.
  5102. // By default, fields with empty values are omitted from API requests.
  5103. // However, any non-pointer, non-interface field appearing in
  5104. // ForceSendFields will be sent to the server regardless of whether the
  5105. // field is empty or not. This may be used to include empty fields in
  5106. // Patch requests.
  5107. ForceSendFields []string `json:"-"`
  5108. // NullFields is a list of field names (e.g. "MaxWorkItemCommitBytes")
  5109. // to include in API requests with the JSON null value. By default,
  5110. // fields with empty values are omitted from API requests. However, any
  5111. // field with an empty value appearing in NullFields will be sent to the
  5112. // server as null. It is an error if a field in this list has a
  5113. // non-empty value. This may be used to include null fields in Patch
  5114. // requests.
  5115. NullFields []string `json:"-"`
  5116. }
  5117. func (s *StreamingConfigTask) MarshalJSON() ([]byte, error) {
  5118. type NoMethod StreamingConfigTask
  5119. raw := NoMethod(*s)
  5120. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5121. }
  5122. // StreamingSetupTask: A task which initializes part of a streaming
  5123. // Dataflow job.
  5124. type StreamingSetupTask struct {
  5125. // Drain: The user has requested drain.
  5126. Drain bool `json:"drain,omitempty"`
  5127. // ReceiveWorkPort: The TCP port on which the worker should listen for
  5128. // messages from
  5129. // other streaming computation workers.
  5130. ReceiveWorkPort int64 `json:"receiveWorkPort,omitempty"`
  5131. // SnapshotConfig: Configures streaming appliance snapshot.
  5132. SnapshotConfig *StreamingApplianceSnapshotConfig `json:"snapshotConfig,omitempty"`
  5133. // StreamingComputationTopology: The global topology of the streaming
  5134. // Dataflow job.
  5135. StreamingComputationTopology *TopologyConfig `json:"streamingComputationTopology,omitempty"`
  5136. // WorkerHarnessPort: The TCP port used by the worker to communicate
  5137. // with the Dataflow
  5138. // worker harness.
  5139. WorkerHarnessPort int64 `json:"workerHarnessPort,omitempty"`
  5140. // ForceSendFields is a list of field names (e.g. "Drain") to
  5141. // unconditionally include in API requests. By default, fields with
  5142. // empty values are omitted from API requests. However, any non-pointer,
  5143. // non-interface field appearing in ForceSendFields will be sent to the
  5144. // server regardless of whether the field is empty or not. This may be
  5145. // used to include empty fields in Patch requests.
  5146. ForceSendFields []string `json:"-"`
  5147. // NullFields is a list of field names (e.g. "Drain") to include in API
  5148. // requests with the JSON null value. By default, fields with empty
  5149. // values are omitted from API requests. However, any field with an
  5150. // empty value appearing in NullFields will be sent to the server as
  5151. // null. It is an error if a field in this list has a non-empty value.
  5152. // This may be used to include null fields in Patch requests.
  5153. NullFields []string `json:"-"`
  5154. }
  5155. func (s *StreamingSetupTask) MarshalJSON() ([]byte, error) {
  5156. type NoMethod StreamingSetupTask
  5157. raw := NoMethod(*s)
  5158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5159. }
  5160. // StreamingSideInputLocation: Identifies the location of a streaming
  5161. // side input.
  5162. type StreamingSideInputLocation struct {
  5163. // StateFamily: Identifies the state family where this side input is
  5164. // stored.
  5165. StateFamily string `json:"stateFamily,omitempty"`
  5166. // Tag: Identifies the particular side input within the streaming
  5167. // Dataflow job.
  5168. Tag string `json:"tag,omitempty"`
  5169. // ForceSendFields is a list of field names (e.g. "StateFamily") to
  5170. // unconditionally include in API requests. By default, fields with
  5171. // empty values are omitted from API requests. However, any non-pointer,
  5172. // non-interface field appearing in ForceSendFields will be sent to the
  5173. // server regardless of whether the field is empty or not. This may be
  5174. // used to include empty fields in Patch requests.
  5175. ForceSendFields []string `json:"-"`
  5176. // NullFields is a list of field names (e.g. "StateFamily") to include
  5177. // in API requests with the JSON null value. By default, fields with
  5178. // empty values are omitted from API requests. However, any field with
  5179. // an empty value appearing in NullFields will be sent to the server as
  5180. // null. It is an error if a field in this list has a non-empty value.
  5181. // This may be used to include null fields in Patch requests.
  5182. NullFields []string `json:"-"`
  5183. }
  5184. func (s *StreamingSideInputLocation) MarshalJSON() ([]byte, error) {
  5185. type NoMethod StreamingSideInputLocation
  5186. raw := NoMethod(*s)
  5187. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5188. }
  5189. // StreamingStageLocation: Identifies the location of a streaming
  5190. // computation stage, for
  5191. // stage-to-stage communication.
  5192. type StreamingStageLocation struct {
  5193. // StreamId: Identifies the particular stream within the streaming
  5194. // Dataflow
  5195. // job.
  5196. StreamId string `json:"streamId,omitempty"`
  5197. // ForceSendFields is a list of field names (e.g. "StreamId") to
  5198. // unconditionally include in API requests. By default, fields with
  5199. // empty values are omitted from API requests. However, any non-pointer,
  5200. // non-interface field appearing in ForceSendFields will be sent to the
  5201. // server regardless of whether the field is empty or not. This may be
  5202. // used to include empty fields in Patch requests.
  5203. ForceSendFields []string `json:"-"`
  5204. // NullFields is a list of field names (e.g. "StreamId") to include in
  5205. // API requests with the JSON null value. By default, fields with empty
  5206. // values are omitted from API requests. However, any field with an
  5207. // empty value appearing in NullFields will be sent to the server as
  5208. // null. It is an error if a field in this list has a non-empty value.
  5209. // This may be used to include null fields in Patch requests.
  5210. NullFields []string `json:"-"`
  5211. }
  5212. func (s *StreamingStageLocation) MarshalJSON() ([]byte, error) {
  5213. type NoMethod StreamingStageLocation
  5214. raw := NoMethod(*s)
  5215. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5216. }
  5217. // StringList: A metric value representing a list of strings.
  5218. type StringList struct {
  5219. // Elements: Elements of the list.
  5220. Elements []string `json:"elements,omitempty"`
  5221. // ForceSendFields is a list of field names (e.g. "Elements") to
  5222. // unconditionally include in API requests. By default, fields with
  5223. // empty values are omitted from API requests. However, any non-pointer,
  5224. // non-interface field appearing in ForceSendFields will be sent to the
  5225. // server regardless of whether the field is empty or not. This may be
  5226. // used to include empty fields in Patch requests.
  5227. ForceSendFields []string `json:"-"`
  5228. // NullFields is a list of field names (e.g. "Elements") to include in
  5229. // API requests with the JSON null value. By default, fields with empty
  5230. // values are omitted from API requests. However, any field with an
  5231. // empty value appearing in NullFields will be sent to the server as
  5232. // null. It is an error if a field in this list has a non-empty value.
  5233. // This may be used to include null fields in Patch requests.
  5234. NullFields []string `json:"-"`
  5235. }
  5236. func (s *StringList) MarshalJSON() ([]byte, error) {
  5237. type NoMethod StringList
  5238. raw := NoMethod(*s)
  5239. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5240. }
  5241. // StructuredMessage: A rich message format, including a human readable
  5242. // string, a key for
  5243. // identifying the message, and structured data associated with the
  5244. // message for
  5245. // programmatic consumption.
  5246. type StructuredMessage struct {
  5247. // MessageKey: Identifier for this message type. Used by external
  5248. // systems to
  5249. // internationalize or personalize message.
  5250. MessageKey string `json:"messageKey,omitempty"`
  5251. // MessageText: Human-readable version of message.
  5252. MessageText string `json:"messageText,omitempty"`
  5253. // Parameters: The structured data associated with this message.
  5254. Parameters []*Parameter `json:"parameters,omitempty"`
  5255. // ForceSendFields is a list of field names (e.g. "MessageKey") to
  5256. // unconditionally include in API requests. By default, fields with
  5257. // empty values are omitted from API requests. However, any non-pointer,
  5258. // non-interface field appearing in ForceSendFields will be sent to the
  5259. // server regardless of whether the field is empty or not. This may be
  5260. // used to include empty fields in Patch requests.
  5261. ForceSendFields []string `json:"-"`
  5262. // NullFields is a list of field names (e.g. "MessageKey") to include in
  5263. // API requests with the JSON null value. By default, fields with empty
  5264. // values are omitted from API requests. However, any field with an
  5265. // empty value appearing in NullFields will be sent to the server as
  5266. // null. It is an error if a field in this list has a non-empty value.
  5267. // This may be used to include null fields in Patch requests.
  5268. NullFields []string `json:"-"`
  5269. }
  5270. func (s *StructuredMessage) MarshalJSON() ([]byte, error) {
  5271. type NoMethod StructuredMessage
  5272. raw := NoMethod(*s)
  5273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5274. }
  5275. // TaskRunnerSettings: Taskrunner configuration settings.
  5276. type TaskRunnerSettings struct {
  5277. // Alsologtostderr: Whether to also send taskrunner log info to stderr.
  5278. Alsologtostderr bool `json:"alsologtostderr,omitempty"`
  5279. // BaseTaskDir: The location on the worker for task-specific
  5280. // subdirectories.
  5281. BaseTaskDir string `json:"baseTaskDir,omitempty"`
  5282. // BaseUrl: The base URL for the taskrunner to use when accessing Google
  5283. // Cloud APIs.
  5284. //
  5285. // When workers access Google Cloud APIs, they logically do so
  5286. // via
  5287. // relative URLs. If this field is specified, it supplies the base
  5288. // URL to use for resolving these relative URLs. The
  5289. // normative
  5290. // algorithm used is defined by RFC 1808, "Relative Uniform
  5291. // Resource
  5292. // Locators".
  5293. //
  5294. // If not specified, the default value is "http://www.googleapis.com/"
  5295. BaseUrl string `json:"baseUrl,omitempty"`
  5296. // CommandlinesFileName: The file to store preprocessing commands in.
  5297. CommandlinesFileName string `json:"commandlinesFileName,omitempty"`
  5298. // ContinueOnException: Whether to continue taskrunner if an exception
  5299. // is hit.
  5300. ContinueOnException bool `json:"continueOnException,omitempty"`
  5301. // DataflowApiVersion: The API version of endpoint, e.g. "v1b3"
  5302. DataflowApiVersion string `json:"dataflowApiVersion,omitempty"`
  5303. // HarnessCommand: The command to launch the worker harness.
  5304. HarnessCommand string `json:"harnessCommand,omitempty"`
  5305. // LanguageHint: The suggested backend language.
  5306. LanguageHint string `json:"languageHint,omitempty"`
  5307. // LogDir: The directory on the VM to store logs.
  5308. LogDir string `json:"logDir,omitempty"`
  5309. // LogToSerialconsole: Whether to send taskrunner log info to Google
  5310. // Compute Engine VM serial
  5311. // console.
  5312. LogToSerialconsole bool `json:"logToSerialconsole,omitempty"`
  5313. // LogUploadLocation: Indicates where to put logs. If this is not
  5314. // specified, the logs
  5315. // will not be uploaded.
  5316. //
  5317. // The supported resource type is:
  5318. //
  5319. // Google Cloud Storage:
  5320. // storage.googleapis.com/{bucket}/{object}
  5321. // bucket.storage.googleapis.com/{object}
  5322. LogUploadLocation string `json:"logUploadLocation,omitempty"`
  5323. // OauthScopes: The OAuth2 scopes to be requested by the taskrunner in
  5324. // order to
  5325. // access the Cloud Dataflow API.
  5326. OauthScopes []string `json:"oauthScopes,omitempty"`
  5327. // ParallelWorkerSettings: The settings to pass to the parallel worker
  5328. // harness.
  5329. ParallelWorkerSettings *WorkerSettings `json:"parallelWorkerSettings,omitempty"`
  5330. // StreamingWorkerMainClass: The streaming worker main class name.
  5331. StreamingWorkerMainClass string `json:"streamingWorkerMainClass,omitempty"`
  5332. // TaskGroup: The UNIX group ID on the worker VM to use for tasks
  5333. // launched by
  5334. // taskrunner; e.g. "wheel".
  5335. TaskGroup string `json:"taskGroup,omitempty"`
  5336. // TaskUser: The UNIX user ID on the worker VM to use for tasks launched
  5337. // by
  5338. // taskrunner; e.g. "root".
  5339. TaskUser string `json:"taskUser,omitempty"`
  5340. // TempStoragePrefix: The prefix of the resources the taskrunner should
  5341. // use for
  5342. // temporary storage.
  5343. //
  5344. // The supported resource type is:
  5345. //
  5346. // Google Cloud Storage:
  5347. // storage.googleapis.com/{bucket}/{object}
  5348. // bucket.storage.googleapis.com/{object}
  5349. TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
  5350. // VmId: The ID string of the VM.
  5351. VmId string `json:"vmId,omitempty"`
  5352. // WorkflowFileName: The file to store the workflow in.
  5353. WorkflowFileName string `json:"workflowFileName,omitempty"`
  5354. // ForceSendFields is a list of field names (e.g. "Alsologtostderr") to
  5355. // unconditionally include in API requests. By default, fields with
  5356. // empty values are omitted from API requests. However, any non-pointer,
  5357. // non-interface field appearing in ForceSendFields will be sent to the
  5358. // server regardless of whether the field is empty or not. This may be
  5359. // used to include empty fields in Patch requests.
  5360. ForceSendFields []string `json:"-"`
  5361. // NullFields is a list of field names (e.g. "Alsologtostderr") to
  5362. // include in API requests with the JSON null value. By default, fields
  5363. // with empty values are omitted from API requests. However, any field
  5364. // with an empty value appearing in NullFields will be sent to the
  5365. // server as null. It is an error if a field in this list has a
  5366. // non-empty value. This may be used to include null fields in Patch
  5367. // requests.
  5368. NullFields []string `json:"-"`
  5369. }
  5370. func (s *TaskRunnerSettings) MarshalJSON() ([]byte, error) {
  5371. type NoMethod TaskRunnerSettings
  5372. raw := NoMethod(*s)
  5373. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5374. }
  5375. // TemplateMetadata: Metadata describing a template.
  5376. type TemplateMetadata struct {
  5377. // Description: Optional. A description of the template.
  5378. Description string `json:"description,omitempty"`
  5379. // Name: Required. The name of the template.
  5380. Name string `json:"name,omitempty"`
  5381. // Parameters: The parameters for the template.
  5382. Parameters []*ParameterMetadata `json:"parameters,omitempty"`
  5383. // ForceSendFields is a list of field names (e.g. "Description") to
  5384. // unconditionally include in API requests. By default, fields with
  5385. // empty values are omitted from API requests. However, any non-pointer,
  5386. // non-interface field appearing in ForceSendFields will be sent to the
  5387. // server regardless of whether the field is empty or not. This may be
  5388. // used to include empty fields in Patch requests.
  5389. ForceSendFields []string `json:"-"`
  5390. // NullFields is a list of field names (e.g. "Description") to include
  5391. // in API requests with the JSON null value. By default, fields with
  5392. // empty values are omitted from API requests. However, any field with
  5393. // an empty value appearing in NullFields will be sent to the server as
  5394. // null. It is an error if a field in this list has a non-empty value.
  5395. // This may be used to include null fields in Patch requests.
  5396. NullFields []string `json:"-"`
  5397. }
  5398. func (s *TemplateMetadata) MarshalJSON() ([]byte, error) {
  5399. type NoMethod TemplateMetadata
  5400. raw := NoMethod(*s)
  5401. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5402. }
  5403. // TopologyConfig: Global topology of the streaming Dataflow job,
  5404. // including all
  5405. // computations and their sharded locations.
  5406. type TopologyConfig struct {
  5407. // Computations: The computations associated with a streaming Dataflow
  5408. // job.
  5409. Computations []*ComputationTopology `json:"computations,omitempty"`
  5410. // DataDiskAssignments: The disks assigned to a streaming Dataflow job.
  5411. DataDiskAssignments []*DataDiskAssignment `json:"dataDiskAssignments,omitempty"`
  5412. // ForwardingKeyBits: The size (in bits) of keys that will be assigned
  5413. // to source messages.
  5414. ForwardingKeyBits int64 `json:"forwardingKeyBits,omitempty"`
  5415. // PersistentStateVersion: Version number for persistent state.
  5416. PersistentStateVersion int64 `json:"persistentStateVersion,omitempty"`
  5417. // UserStageToComputationNameMap: Maps user stage names to stable
  5418. // computation names.
  5419. UserStageToComputationNameMap map[string]string `json:"userStageToComputationNameMap,omitempty"`
  5420. // ForceSendFields is a list of field names (e.g. "Computations") to
  5421. // unconditionally include in API requests. By default, fields with
  5422. // empty values are omitted from API requests. However, any non-pointer,
  5423. // non-interface field appearing in ForceSendFields will be sent to the
  5424. // server regardless of whether the field is empty or not. This may be
  5425. // used to include empty fields in Patch requests.
  5426. ForceSendFields []string `json:"-"`
  5427. // NullFields is a list of field names (e.g. "Computations") to include
  5428. // in API requests with the JSON null value. By default, fields with
  5429. // empty values are omitted from API requests. However, any field with
  5430. // an empty value appearing in NullFields will be sent to the server as
  5431. // null. It is an error if a field in this list has a non-empty value.
  5432. // This may be used to include null fields in Patch requests.
  5433. NullFields []string `json:"-"`
  5434. }
  5435. func (s *TopologyConfig) MarshalJSON() ([]byte, error) {
  5436. type NoMethod TopologyConfig
  5437. raw := NoMethod(*s)
  5438. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5439. }
  5440. // TransformSummary: Description of the type, names/ids, and
  5441. // input/outputs for a transform.
  5442. type TransformSummary struct {
  5443. // DisplayData: Transform-specific display data.
  5444. DisplayData []*DisplayData `json:"displayData,omitempty"`
  5445. // Id: SDK generated id of this transform instance.
  5446. Id string `json:"id,omitempty"`
  5447. // InputCollectionName: User names for all collection inputs to this
  5448. // transform.
  5449. InputCollectionName []string `json:"inputCollectionName,omitempty"`
  5450. // Kind: Type of transform.
  5451. //
  5452. // Possible values:
  5453. // "UNKNOWN_KIND" - Unrecognized transform type.
  5454. // "PAR_DO_KIND" - ParDo transform.
  5455. // "GROUP_BY_KEY_KIND" - Group By Key transform.
  5456. // "FLATTEN_KIND" - Flatten transform.
  5457. // "READ_KIND" - Read transform.
  5458. // "WRITE_KIND" - Write transform.
  5459. // "CONSTANT_KIND" - Constructs from a constant value, such as with
  5460. // Create.of.
  5461. // "SINGLETON_KIND" - Creates a Singleton view of a collection.
  5462. // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as
  5463. // part of a GroupByKey.
  5464. Kind string `json:"kind,omitempty"`
  5465. // Name: User provided name for this transform instance.
  5466. Name string `json:"name,omitempty"`
  5467. // OutputCollectionName: User names for all collection outputs to this
  5468. // transform.
  5469. OutputCollectionName []string `json:"outputCollectionName,omitempty"`
  5470. // ForceSendFields is a list of field names (e.g. "DisplayData") to
  5471. // unconditionally include in API requests. By default, fields with
  5472. // empty values are omitted from API requests. However, any non-pointer,
  5473. // non-interface field appearing in ForceSendFields will be sent to the
  5474. // server regardless of whether the field is empty or not. This may be
  5475. // used to include empty fields in Patch requests.
  5476. ForceSendFields []string `json:"-"`
  5477. // NullFields is a list of field names (e.g. "DisplayData") to include
  5478. // in API requests with the JSON null value. By default, fields with
  5479. // empty values are omitted from API requests. However, any field with
  5480. // an empty value appearing in NullFields will be sent to the server as
  5481. // null. It is an error if a field in this list has a non-empty value.
  5482. // This may be used to include null fields in Patch requests.
  5483. NullFields []string `json:"-"`
  5484. }
  5485. func (s *TransformSummary) MarshalJSON() ([]byte, error) {
  5486. type NoMethod TransformSummary
  5487. raw := NoMethod(*s)
  5488. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5489. }
  5490. // WorkItem: WorkItem represents basic information about a WorkItem to
  5491. // be executed
  5492. // in the cloud.
  5493. type WorkItem struct {
  5494. // Configuration: Work item-specific configuration as an opaque blob.
  5495. Configuration string `json:"configuration,omitempty"`
  5496. // Id: Identifies this WorkItem.
  5497. Id int64 `json:"id,omitempty,string"`
  5498. // InitialReportIndex: The initial index to use when reporting the
  5499. // status of the WorkItem.
  5500. InitialReportIndex int64 `json:"initialReportIndex,omitempty,string"`
  5501. // JobId: Identifies the workflow job this WorkItem belongs to.
  5502. JobId string `json:"jobId,omitempty"`
  5503. // LeaseExpireTime: Time when the lease on this Work will expire.
  5504. LeaseExpireTime string `json:"leaseExpireTime,omitempty"`
  5505. // MapTask: Additional information for MapTask WorkItems.
  5506. MapTask *MapTask `json:"mapTask,omitempty"`
  5507. // Packages: Any required packages that need to be fetched in order to
  5508. // execute
  5509. // this WorkItem.
  5510. Packages []*Package `json:"packages,omitempty"`
  5511. // ProjectId: Identifies the cloud project this WorkItem belongs to.
  5512. ProjectId string `json:"projectId,omitempty"`
  5513. // ReportStatusInterval: Recommended reporting interval.
  5514. ReportStatusInterval string `json:"reportStatusInterval,omitempty"`
  5515. // SeqMapTask: Additional information for SeqMapTask WorkItems.
  5516. SeqMapTask *SeqMapTask `json:"seqMapTask,omitempty"`
  5517. // ShellTask: Additional information for ShellTask WorkItems.
  5518. ShellTask *ShellTask `json:"shellTask,omitempty"`
  5519. // SourceOperationTask: Additional information for source operation
  5520. // WorkItems.
  5521. SourceOperationTask *SourceOperationRequest `json:"sourceOperationTask,omitempty"`
  5522. // StreamingComputationTask: Additional information for
  5523. // StreamingComputationTask WorkItems.
  5524. StreamingComputationTask *StreamingComputationTask `json:"streamingComputationTask,omitempty"`
  5525. // StreamingConfigTask: Additional information for StreamingConfigTask
  5526. // WorkItems.
  5527. StreamingConfigTask *StreamingConfigTask `json:"streamingConfigTask,omitempty"`
  5528. // StreamingSetupTask: Additional information for StreamingSetupTask
  5529. // WorkItems.
  5530. StreamingSetupTask *StreamingSetupTask `json:"streamingSetupTask,omitempty"`
  5531. // ForceSendFields is a list of field names (e.g. "Configuration") to
  5532. // unconditionally include in API requests. By default, fields with
  5533. // empty values are omitted from API requests. However, any non-pointer,
  5534. // non-interface field appearing in ForceSendFields will be sent to the
  5535. // server regardless of whether the field is empty or not. This may be
  5536. // used to include empty fields in Patch requests.
  5537. ForceSendFields []string `json:"-"`
  5538. // NullFields is a list of field names (e.g. "Configuration") to include
  5539. // in API requests with the JSON null value. By default, fields with
  5540. // empty values are omitted from API requests. However, any field with
  5541. // an empty value appearing in NullFields will be sent to the server as
  5542. // null. It is an error if a field in this list has a non-empty value.
  5543. // This may be used to include null fields in Patch requests.
  5544. NullFields []string `json:"-"`
  5545. }
  5546. func (s *WorkItem) MarshalJSON() ([]byte, error) {
  5547. type NoMethod WorkItem
  5548. raw := NoMethod(*s)
  5549. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5550. }
  5551. // WorkItemServiceState: The Dataflow service's idea of the current
  5552. // state of a WorkItem
  5553. // being processed by a worker.
  5554. type WorkItemServiceState struct {
  5555. // HarnessData: Other data returned by the service, specific to the
  5556. // particular
  5557. // worker harness.
  5558. HarnessData googleapi.RawMessage `json:"harnessData,omitempty"`
  5559. // LeaseExpireTime: Time at which the current lease will expire.
  5560. LeaseExpireTime string `json:"leaseExpireTime,omitempty"`
  5561. // MetricShortId: The short ids that workers should use in subsequent
  5562. // metric updates.
  5563. // Workers should strive to use short ids whenever possible, but it is
  5564. // ok
  5565. // to request the short_id again if a worker lost track of it
  5566. // (e.g. if the worker is recovering from a crash).
  5567. // NOTE: it is possible that the response may have short ids for a
  5568. // subset
  5569. // of the metrics.
  5570. MetricShortId []*MetricShortId `json:"metricShortId,omitempty"`
  5571. // NextReportIndex: The index value to use for the next report sent by
  5572. // the worker.
  5573. // Note: If the report call fails for whatever reason, the worker
  5574. // should
  5575. // reuse this index for subsequent report attempts.
  5576. NextReportIndex int64 `json:"nextReportIndex,omitempty,string"`
  5577. // ReportStatusInterval: New recommended reporting interval.
  5578. ReportStatusInterval string `json:"reportStatusInterval,omitempty"`
  5579. // SplitRequest: The progress point in the WorkItem where the Dataflow
  5580. // service
  5581. // suggests that the worker truncate the task.
  5582. SplitRequest *ApproximateSplitRequest `json:"splitRequest,omitempty"`
  5583. // SuggestedStopPoint: DEPRECATED in favor of split_request.
  5584. SuggestedStopPoint *ApproximateProgress `json:"suggestedStopPoint,omitempty"`
  5585. // SuggestedStopPosition: Obsolete, always empty.
  5586. SuggestedStopPosition *Position `json:"suggestedStopPosition,omitempty"`
  5587. // ForceSendFields is a list of field names (e.g. "HarnessData") to
  5588. // unconditionally include in API requests. By default, fields with
  5589. // empty values are omitted from API requests. However, any non-pointer,
  5590. // non-interface field appearing in ForceSendFields will be sent to the
  5591. // server regardless of whether the field is empty or not. This may be
  5592. // used to include empty fields in Patch requests.
  5593. ForceSendFields []string `json:"-"`
  5594. // NullFields is a list of field names (e.g. "HarnessData") to include
  5595. // in API requests with the JSON null value. By default, fields with
  5596. // empty values are omitted from API requests. However, any field with
  5597. // an empty value appearing in NullFields will be sent to the server as
  5598. // null. It is an error if a field in this list has a non-empty value.
  5599. // This may be used to include null fields in Patch requests.
  5600. NullFields []string `json:"-"`
  5601. }
  5602. func (s *WorkItemServiceState) MarshalJSON() ([]byte, error) {
  5603. type NoMethod WorkItemServiceState
  5604. raw := NoMethod(*s)
  5605. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5606. }
  5607. // WorkItemStatus: Conveys a worker's progress through the work
  5608. // described by a WorkItem.
  5609. type WorkItemStatus struct {
  5610. // Completed: True if the WorkItem was completed (successfully or
  5611. // unsuccessfully).
  5612. Completed bool `json:"completed,omitempty"`
  5613. // CounterUpdates: Worker output counters for this WorkItem.
  5614. CounterUpdates []*CounterUpdate `json:"counterUpdates,omitempty"`
  5615. // DynamicSourceSplit: See documentation of stop_position.
  5616. DynamicSourceSplit *DynamicSourceSplit `json:"dynamicSourceSplit,omitempty"`
  5617. // Errors: Specifies errors which occurred during processing. If errors
  5618. // are
  5619. // provided, and completed = true, then the WorkItem is considered
  5620. // to have failed.
  5621. Errors []*Status `json:"errors,omitempty"`
  5622. // MetricUpdates: DEPRECATED in favor of counter_updates.
  5623. MetricUpdates []*MetricUpdate `json:"metricUpdates,omitempty"`
  5624. // Progress: DEPRECATED in favor of reported_progress.
  5625. Progress *ApproximateProgress `json:"progress,omitempty"`
  5626. // ReportIndex: The report index. When a WorkItem is leased, the lease
  5627. // will
  5628. // contain an initial report index. When a WorkItem's status
  5629. // is
  5630. // reported to the system, the report should be sent with
  5631. // that report index, and the response will contain the index the
  5632. // worker should use for the next report. Reports received
  5633. // with
  5634. // unexpected index values will be rejected by the service.
  5635. //
  5636. // In order to preserve idempotency, the worker should not alter
  5637. // the
  5638. // contents of a report, even if the worker must submit the same
  5639. // report multiple times before getting back a response. The
  5640. // worker
  5641. // should not submit a subsequent report until the response for
  5642. // the
  5643. // previous report had been received from the service.
  5644. ReportIndex int64 `json:"reportIndex,omitempty,string"`
  5645. // ReportedProgress: The worker's progress through this WorkItem.
  5646. ReportedProgress *ApproximateReportedProgress `json:"reportedProgress,omitempty"`
  5647. // RequestedLeaseDuration: Amount of time the worker requests for its
  5648. // lease.
  5649. RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"`
  5650. // SourceFork: DEPRECATED in favor of dynamic_source_split.
  5651. SourceFork *SourceFork `json:"sourceFork,omitempty"`
  5652. // SourceOperationResponse: If the work item represented a
  5653. // SourceOperationRequest, and the work
  5654. // is completed, contains the result of the operation.
  5655. SourceOperationResponse *SourceOperationResponse `json:"sourceOperationResponse,omitempty"`
  5656. // StopPosition: A worker may split an active map task in two parts,
  5657. // "primary" and
  5658. // "residual", continuing to process the primary part and returning
  5659. // the
  5660. // residual part into the pool of available work.
  5661. // This event is called a "dynamic split" and is critical to the
  5662. // dynamic
  5663. // work rebalancing feature. The two obtained sub-tasks are
  5664. // called
  5665. // "parts" of the split.
  5666. // The parts, if concatenated, must represent the same input as would
  5667. // be read by the current task if the split did not happen.
  5668. // The exact way in which the original task is decomposed into the
  5669. // two
  5670. // parts is specified either as a position demarcating
  5671. // them
  5672. // (stop_position), or explicitly as two DerivedSources, if this
  5673. // task consumes a user-defined source type (dynamic_source_split).
  5674. //
  5675. // The "current" task is adjusted as a result of the split: after a
  5676. // task
  5677. // with range [A, B) sends a stop_position update at C, its range
  5678. // is
  5679. // considered to be [A, C), e.g.:
  5680. // * Progress should be interpreted relative to the new range, e.g.
  5681. // "75% completed" means "75% of [A, C) completed"
  5682. // * The worker should interpret proposed_stop_position relative to the
  5683. // new range, e.g. "split at 68%" should be interpreted as
  5684. // "split at 68% of [A, C)".
  5685. // * If the worker chooses to split again using stop_position, only
  5686. // stop_positions in [A, C) will be accepted.
  5687. // * Etc.
  5688. // dynamic_source_split has similar semantics: e.g., if a task
  5689. // with
  5690. // source S splits using dynamic_source_split into {P, R}
  5691. // (where P and R must be together equivalent to S), then
  5692. // subsequent
  5693. // progress and proposed_stop_position should be interpreted relative
  5694. // to P, and in a potential subsequent dynamic_source_split into {P',
  5695. // R'},
  5696. // P' and R' must be together equivalent to P, etc.
  5697. StopPosition *Position `json:"stopPosition,omitempty"`
  5698. // TotalThrottlerWaitTimeSeconds: Total time the worker spent being
  5699. // throttled by external systems.
  5700. TotalThrottlerWaitTimeSeconds float64 `json:"totalThrottlerWaitTimeSeconds,omitempty"`
  5701. // WorkItemId: Identifies the WorkItem.
  5702. WorkItemId string `json:"workItemId,omitempty"`
  5703. // ForceSendFields is a list of field names (e.g. "Completed") to
  5704. // unconditionally include in API requests. By default, fields with
  5705. // empty values are omitted from API requests. However, any non-pointer,
  5706. // non-interface field appearing in ForceSendFields will be sent to the
  5707. // server regardless of whether the field is empty or not. This may be
  5708. // used to include empty fields in Patch requests.
  5709. ForceSendFields []string `json:"-"`
  5710. // NullFields is a list of field names (e.g. "Completed") to include in
  5711. // API requests with the JSON null value. By default, fields with empty
  5712. // values are omitted from API requests. However, any field with an
  5713. // empty value appearing in NullFields will be sent to the server as
  5714. // null. It is an error if a field in this list has a non-empty value.
  5715. // This may be used to include null fields in Patch requests.
  5716. NullFields []string `json:"-"`
  5717. }
  5718. func (s *WorkItemStatus) MarshalJSON() ([]byte, error) {
  5719. type NoMethod WorkItemStatus
  5720. raw := NoMethod(*s)
  5721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5722. }
  5723. func (s *WorkItemStatus) UnmarshalJSON(data []byte) error {
  5724. type NoMethod WorkItemStatus
  5725. var s1 struct {
  5726. TotalThrottlerWaitTimeSeconds gensupport.JSONFloat64 `json:"totalThrottlerWaitTimeSeconds"`
  5727. *NoMethod
  5728. }
  5729. s1.NoMethod = (*NoMethod)(s)
  5730. if err := json.Unmarshal(data, &s1); err != nil {
  5731. return err
  5732. }
  5733. s.TotalThrottlerWaitTimeSeconds = float64(s1.TotalThrottlerWaitTimeSeconds)
  5734. return nil
  5735. }
  5736. // WorkerHealthReport: WorkerHealthReport contains information about the
  5737. // health of a worker.
  5738. //
  5739. // The VM should be identified by the labels attached to the
  5740. // WorkerMessage that
  5741. // this health ping belongs to.
  5742. type WorkerHealthReport struct {
  5743. // Pods: The pods running on the worker.
  5744. // See:
  5745. // http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#
  5746. // _v1_pod
  5747. //
  5748. // This field is used by the worker to send the status of the
  5749. // indvidual
  5750. // containers running on each worker.
  5751. Pods []googleapi.RawMessage `json:"pods,omitempty"`
  5752. // ReportInterval: The interval at which the worker is sending health
  5753. // reports.
  5754. // The default value of 0 should be interpreted as the field is not
  5755. // being
  5756. // explicitly set by the worker.
  5757. ReportInterval string `json:"reportInterval,omitempty"`
  5758. // VmIsHealthy: Whether the VM is healthy.
  5759. VmIsHealthy bool `json:"vmIsHealthy,omitempty"`
  5760. // VmStartupTime: The time the VM was booted.
  5761. VmStartupTime string `json:"vmStartupTime,omitempty"`
  5762. // ForceSendFields is a list of field names (e.g. "Pods") to
  5763. // unconditionally include in API requests. By default, fields with
  5764. // empty values are omitted from API requests. However, any non-pointer,
  5765. // non-interface field appearing in ForceSendFields will be sent to the
  5766. // server regardless of whether the field is empty or not. This may be
  5767. // used to include empty fields in Patch requests.
  5768. ForceSendFields []string `json:"-"`
  5769. // NullFields is a list of field names (e.g. "Pods") to include in API
  5770. // requests with the JSON null value. By default, fields with empty
  5771. // values are omitted from API requests. However, any field with an
  5772. // empty value appearing in NullFields will be sent to the server as
  5773. // null. It is an error if a field in this list has a non-empty value.
  5774. // This may be used to include null fields in Patch requests.
  5775. NullFields []string `json:"-"`
  5776. }
  5777. func (s *WorkerHealthReport) MarshalJSON() ([]byte, error) {
  5778. type NoMethod WorkerHealthReport
  5779. raw := NoMethod(*s)
  5780. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5781. }
  5782. // WorkerHealthReportResponse: WorkerHealthReportResponse contains
  5783. // information returned to the worker
  5784. // in response to a health ping.
  5785. type WorkerHealthReportResponse struct {
  5786. // ReportInterval: A positive value indicates the worker should change
  5787. // its reporting interval
  5788. // to the specified value.
  5789. //
  5790. // The default value of zero means no change in report rate is requested
  5791. // by
  5792. // the server.
  5793. ReportInterval string `json:"reportInterval,omitempty"`
  5794. // ForceSendFields is a list of field names (e.g. "ReportInterval") to
  5795. // unconditionally include in API requests. By default, fields with
  5796. // empty values are omitted from API requests. However, any non-pointer,
  5797. // non-interface field appearing in ForceSendFields will be sent to the
  5798. // server regardless of whether the field is empty or not. This may be
  5799. // used to include empty fields in Patch requests.
  5800. ForceSendFields []string `json:"-"`
  5801. // NullFields is a list of field names (e.g. "ReportInterval") to
  5802. // include in API requests with the JSON null value. By default, fields
  5803. // with empty values are omitted from API requests. However, any field
  5804. // with an empty value appearing in NullFields will be sent to the
  5805. // server as null. It is an error if a field in this list has a
  5806. // non-empty value. This may be used to include null fields in Patch
  5807. // requests.
  5808. NullFields []string `json:"-"`
  5809. }
  5810. func (s *WorkerHealthReportResponse) MarshalJSON() ([]byte, error) {
  5811. type NoMethod WorkerHealthReportResponse
  5812. raw := NoMethod(*s)
  5813. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5814. }
  5815. // WorkerLifecycleEvent: A report of an event in a worker's
  5816. // lifecycle.
  5817. // The proto contains one event, because the worker is expected
  5818. // to
  5819. // asynchronously send each message immediately after the event.
  5820. // Due to this asynchrony, messages may arrive out of order (or
  5821. // missing), and it
  5822. // is up to the consumer to interpret.
  5823. // The timestamp of the event is in the enclosing WorkerMessage proto.
  5824. type WorkerLifecycleEvent struct {
  5825. // ContainerStartTime: The start time of this container. All events will
  5826. // report this so that
  5827. // events can be grouped together across container/VM restarts.
  5828. ContainerStartTime string `json:"containerStartTime,omitempty"`
  5829. // Event: The event being reported.
  5830. //
  5831. // Possible values:
  5832. // "UNKNOWN_EVENT" - Invalid event.
  5833. // "OS_START" - The time the VM started.
  5834. // "CONTAINER_START" - Our container code starts running. Multiple
  5835. // containers could be
  5836. // distinguished with WorkerMessage.labels if desired.
  5837. // "NETWORK_UP" - The worker has a functional external network
  5838. // connection.
  5839. // "STAGING_FILES_DOWNLOAD_START" - Started downloading staging files.
  5840. // "STAGING_FILES_DOWNLOAD_FINISH" - Finished downloading all staging
  5841. // files.
  5842. // "SDK_INSTALL_START" - For applicable SDKs, started installation of
  5843. // SDK and worker packages.
  5844. // "SDK_INSTALL_FINISH" - Finished installing SDK.
  5845. Event string `json:"event,omitempty"`
  5846. // Metadata: Other stats that can accompany an event. E.g.
  5847. // { "downloaded_bytes" : "123456" }
  5848. Metadata map[string]string `json:"metadata,omitempty"`
  5849. // ForceSendFields is a list of field names (e.g. "ContainerStartTime")
  5850. // to unconditionally include in API requests. By default, fields with
  5851. // empty values are omitted from API requests. However, any non-pointer,
  5852. // non-interface field appearing in ForceSendFields will be sent to the
  5853. // server regardless of whether the field is empty or not. This may be
  5854. // used to include empty fields in Patch requests.
  5855. ForceSendFields []string `json:"-"`
  5856. // NullFields is a list of field names (e.g. "ContainerStartTime") to
  5857. // include in API requests with the JSON null value. By default, fields
  5858. // with empty values are omitted from API requests. However, any field
  5859. // with an empty value appearing in NullFields will be sent to the
  5860. // server as null. It is an error if a field in this list has a
  5861. // non-empty value. This may be used to include null fields in Patch
  5862. // requests.
  5863. NullFields []string `json:"-"`
  5864. }
  5865. func (s *WorkerLifecycleEvent) MarshalJSON() ([]byte, error) {
  5866. type NoMethod WorkerLifecycleEvent
  5867. raw := NoMethod(*s)
  5868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5869. }
  5870. // WorkerMessage: WorkerMessage provides information to the backend
  5871. // about a worker.
  5872. type WorkerMessage struct {
  5873. // Labels: Labels are used to group WorkerMessages.
  5874. // For example, a worker_message about a particular container
  5875. // might have the labels:
  5876. // { "JOB_ID": "2015-04-22",
  5877. // "WORKER_ID": "wordcount-vm-2015…"
  5878. // "CONTAINER_TYPE": "worker",
  5879. // "CONTAINER_ID": "ac1234def"}
  5880. // Label tags typically correspond to Label enum values. However, for
  5881. // ease
  5882. // of development other strings can be used as tags. LABEL_UNSPECIFIED
  5883. // should
  5884. // not be used here.
  5885. Labels map[string]string `json:"labels,omitempty"`
  5886. // Time: The timestamp of the worker_message.
  5887. Time string `json:"time,omitempty"`
  5888. // WorkerHealthReport: The health of a worker.
  5889. WorkerHealthReport *WorkerHealthReport `json:"workerHealthReport,omitempty"`
  5890. // WorkerLifecycleEvent: Record of worker lifecycle events.
  5891. WorkerLifecycleEvent *WorkerLifecycleEvent `json:"workerLifecycleEvent,omitempty"`
  5892. // WorkerMessageCode: A worker message code.
  5893. WorkerMessageCode *WorkerMessageCode `json:"workerMessageCode,omitempty"`
  5894. // WorkerMetrics: Resource metrics reported by workers.
  5895. WorkerMetrics *ResourceUtilizationReport `json:"workerMetrics,omitempty"`
  5896. // WorkerShutdownNotice: Shutdown notice by workers.
  5897. WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,omitempty"`
  5898. // ForceSendFields is a list of field names (e.g. "Labels") to
  5899. // unconditionally include in API requests. By default, fields with
  5900. // empty values are omitted from API requests. However, any non-pointer,
  5901. // non-interface field appearing in ForceSendFields will be sent to the
  5902. // server regardless of whether the field is empty or not. This may be
  5903. // used to include empty fields in Patch requests.
  5904. ForceSendFields []string `json:"-"`
  5905. // NullFields is a list of field names (e.g. "Labels") to include in API
  5906. // requests with the JSON null value. By default, fields with empty
  5907. // values are omitted from API requests. However, any field with an
  5908. // empty value appearing in NullFields will be sent to the server as
  5909. // null. It is an error if a field in this list has a non-empty value.
  5910. // This may be used to include null fields in Patch requests.
  5911. NullFields []string `json:"-"`
  5912. }
  5913. func (s *WorkerMessage) MarshalJSON() ([]byte, error) {
  5914. type NoMethod WorkerMessage
  5915. raw := NoMethod(*s)
  5916. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5917. }
  5918. // WorkerMessageCode: A message code is used to report status and error
  5919. // messages to the service.
  5920. // The message codes are intended to be machine readable. The service
  5921. // will
  5922. // take care of translating these into user understandable messages
  5923. // if
  5924. // necessary.
  5925. //
  5926. // Example use cases:
  5927. // 1. Worker processes reporting successful startup.
  5928. // 2. Worker processes reporting specific errors (e.g. package
  5929. // staging
  5930. // failure).
  5931. type WorkerMessageCode struct {
  5932. // Code: The code is a string intended for consumption by a machine that
  5933. // identifies
  5934. // the type of message being sent.
  5935. // Examples:
  5936. // 1. "HARNESS_STARTED" might be used to indicate the worker harness
  5937. // has
  5938. // started.
  5939. // 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error
  5940. // downloading
  5941. // a GCS file as part of the boot process of one of the worker
  5942. // containers.
  5943. //
  5944. // This is a string and not an enum to make it easy to add new codes
  5945. // without
  5946. // waiting for an API change.
  5947. Code string `json:"code,omitempty"`
  5948. // Parameters: Parameters contains specific information about the
  5949. // code.
  5950. //
  5951. // This is a struct to allow parameters of different types.
  5952. //
  5953. // Examples:
  5954. // 1. For a "HARNESS_STARTED" message parameters might provide the
  5955. // name
  5956. // of the worker and additional data like timing information.
  5957. // 2. For a "GCS_DOWNLOAD_ERROR" parameters might contain fields
  5958. // listing
  5959. // the GCS objects being downloaded and fields containing
  5960. // errors.
  5961. //
  5962. // In general complex data structures should be avoided. If a
  5963. // worker
  5964. // needs to send a specific and complicated data structure then
  5965. // please
  5966. // consider defining a new proto and adding it to the data oneof
  5967. // in
  5968. // WorkerMessageResponse.
  5969. //
  5970. // Conventions:
  5971. // Parameters should only be used for information that isn't typically
  5972. // passed
  5973. // as a label.
  5974. // hostname and other worker identifiers should almost always be
  5975. // passed
  5976. // as labels since they will be included on most messages.
  5977. Parameters googleapi.RawMessage `json:"parameters,omitempty"`
  5978. // ForceSendFields is a list of field names (e.g. "Code") to
  5979. // unconditionally include in API requests. By default, fields with
  5980. // empty values are omitted from API requests. However, any non-pointer,
  5981. // non-interface field appearing in ForceSendFields will be sent to the
  5982. // server regardless of whether the field is empty or not. This may be
  5983. // used to include empty fields in Patch requests.
  5984. ForceSendFields []string `json:"-"`
  5985. // NullFields is a list of field names (e.g. "Code") to include in API
  5986. // requests with the JSON null value. By default, fields with empty
  5987. // values are omitted from API requests. However, any field with an
  5988. // empty value appearing in NullFields will be sent to the server as
  5989. // null. It is an error if a field in this list has a non-empty value.
  5990. // This may be used to include null fields in Patch requests.
  5991. NullFields []string `json:"-"`
  5992. }
  5993. func (s *WorkerMessageCode) MarshalJSON() ([]byte, error) {
  5994. type NoMethod WorkerMessageCode
  5995. raw := NoMethod(*s)
  5996. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5997. }
  5998. // WorkerMessageResponse: A worker_message response allows the server to
  5999. // pass information to the
  6000. // sender.
  6001. type WorkerMessageResponse struct {
  6002. // WorkerHealthReportResponse: The service's response to a worker's
  6003. // health report.
  6004. WorkerHealthReportResponse *WorkerHealthReportResponse `json:"workerHealthReportResponse,omitempty"`
  6005. // WorkerMetricsResponse: Service's response to reporting worker metrics
  6006. // (currently empty).
  6007. WorkerMetricsResponse *ResourceUtilizationReportResponse `json:"workerMetricsResponse,omitempty"`
  6008. // WorkerShutdownNoticeResponse: Service's response to shutdown notice
  6009. // (currently empty).
  6010. WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"`
  6011. // ForceSendFields is a list of field names (e.g.
  6012. // "WorkerHealthReportResponse") to unconditionally include in API
  6013. // requests. By default, fields with empty values are omitted from API
  6014. // requests. However, any non-pointer, non-interface field appearing in
  6015. // ForceSendFields will be sent to the server regardless of whether the
  6016. // field is empty or not. This may be used to include empty fields in
  6017. // Patch requests.
  6018. ForceSendFields []string `json:"-"`
  6019. // NullFields is a list of field names (e.g.
  6020. // "WorkerHealthReportResponse") to include in API requests with the
  6021. // JSON null value. By default, fields with empty values are omitted
  6022. // from API requests. However, any field with an empty value appearing
  6023. // in NullFields will be sent to the server as null. It is an error if a
  6024. // field in this list has a non-empty value. This may be used to include
  6025. // null fields in Patch requests.
  6026. NullFields []string `json:"-"`
  6027. }
  6028. func (s *WorkerMessageResponse) MarshalJSON() ([]byte, error) {
  6029. type NoMethod WorkerMessageResponse
  6030. raw := NoMethod(*s)
  6031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6032. }
  6033. // WorkerPool: Describes one particular pool of Cloud Dataflow workers
  6034. // to be
  6035. // instantiated by the Cloud Dataflow service in order to perform
  6036. // the
  6037. // computations required by a job. Note that a workflow job may
  6038. // use
  6039. // multiple pools, in order to match the various
  6040. // computational
  6041. // requirements of the various stages of the job.
  6042. type WorkerPool struct {
  6043. // AutoscalingSettings: Settings for autoscaling of this WorkerPool.
  6044. AutoscalingSettings *AutoscalingSettings `json:"autoscalingSettings,omitempty"`
  6045. // DataDisks: Data disks that are used by a VM in this workflow.
  6046. DataDisks []*Disk `json:"dataDisks,omitempty"`
  6047. // DefaultPackageSet: The default package set to install. This allows
  6048. // the service to
  6049. // select a default set of packages which are useful to worker
  6050. // harnesses written in a particular language.
  6051. //
  6052. // Possible values:
  6053. // "DEFAULT_PACKAGE_SET_UNKNOWN" - The default set of packages to
  6054. // stage is unknown, or unspecified.
  6055. // "DEFAULT_PACKAGE_SET_NONE" - Indicates that no packages should be
  6056. // staged at the worker unless
  6057. // explicitly specified by the job.
  6058. // "DEFAULT_PACKAGE_SET_JAVA" - Stage packages typically useful to
  6059. // workers written in Java.
  6060. // "DEFAULT_PACKAGE_SET_PYTHON" - Stage pacakges typically useful to
  6061. // workers written in Python.
  6062. DefaultPackageSet string `json:"defaultPackageSet,omitempty"`
  6063. // DiskSizeGb: Size of root disk for VMs, in GB. If zero or
  6064. // unspecified, the service will
  6065. // attempt to choose a reasonable default.
  6066. DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
  6067. // DiskSourceImage: Fully qualified source image for disks.
  6068. DiskSourceImage string `json:"diskSourceImage,omitempty"`
  6069. // DiskType: Type of root disk for VMs. If empty or unspecified, the
  6070. // service will
  6071. // attempt to choose a reasonable default.
  6072. DiskType string `json:"diskType,omitempty"`
  6073. // IpConfiguration: Configuration for VM IPs.
  6074. //
  6075. // Possible values:
  6076. // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or
  6077. // unspecified.
  6078. // "WORKER_IP_PUBLIC" - Workers should have public IP addresses.
  6079. // "WORKER_IP_PRIVATE" - Workers should have private IP addresses.
  6080. IpConfiguration string `json:"ipConfiguration,omitempty"`
  6081. // Kind: The kind of the worker pool; currently only `harness` and
  6082. // `shuffle`
  6083. // are supported.
  6084. Kind string `json:"kind,omitempty"`
  6085. // MachineType: Machine type (e.g. "n1-standard-1"). If empty or
  6086. // unspecified, the
  6087. // service will attempt to choose a reasonable default.
  6088. MachineType string `json:"machineType,omitempty"`
  6089. // Metadata: Metadata to set on the Google Compute Engine VMs.
  6090. Metadata map[string]string `json:"metadata,omitempty"`
  6091. // Network: Network to which VMs will be assigned. If empty or
  6092. // unspecified,
  6093. // the service will use the network "default".
  6094. Network string `json:"network,omitempty"`
  6095. // NumThreadsPerWorker: The number of threads per worker harness. If
  6096. // empty or unspecified, the
  6097. // service will choose a number of threads (according to the number of
  6098. // cores
  6099. // on the selected machine type for batch, or 1 by convention for
  6100. // streaming).
  6101. NumThreadsPerWorker int64 `json:"numThreadsPerWorker,omitempty"`
  6102. // NumWorkers: Number of Google Compute Engine workers in this pool
  6103. // needed to
  6104. // execute the job. If zero or unspecified, the service will
  6105. // attempt to choose a reasonable default.
  6106. NumWorkers int64 `json:"numWorkers,omitempty"`
  6107. // OnHostMaintenance: The action to take on host maintenance, as defined
  6108. // by the Google
  6109. // Compute Engine API.
  6110. OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
  6111. // Packages: Packages to be installed on workers.
  6112. Packages []*Package `json:"packages,omitempty"`
  6113. // PoolArgs: Extra arguments for this worker pool.
  6114. PoolArgs googleapi.RawMessage `json:"poolArgs,omitempty"`
  6115. // Subnetwork: Subnetwork to which VMs will be assigned, if desired.
  6116. // Expected to be of
  6117. // the form "regions/REGION/subnetworks/SUBNETWORK".
  6118. Subnetwork string `json:"subnetwork,omitempty"`
  6119. // TaskrunnerSettings: Settings passed through to Google Compute Engine
  6120. // workers when
  6121. // using the standard Dataflow task runner. Users should ignore
  6122. // this field.
  6123. TaskrunnerSettings *TaskRunnerSettings `json:"taskrunnerSettings,omitempty"`
  6124. // TeardownPolicy: Sets the policy for determining when to turndown
  6125. // worker pool.
  6126. // Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`,
  6127. // and
  6128. // `TEARDOWN_NEVER`.
  6129. // `TEARDOWN_ALWAYS` means workers are always torn down regardless of
  6130. // whether
  6131. // the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn
  6132. // down
  6133. // if the job succeeds. `TEARDOWN_NEVER` means the workers are never
  6134. // torn
  6135. // down.
  6136. //
  6137. // If the workers are not torn down by the service, they will
  6138. // continue to run and use Google Compute Engine VM resources in
  6139. // the
  6140. // user's project until they are explicitly terminated by the
  6141. // user.
  6142. // Because of this, Google recommends using the `TEARDOWN_ALWAYS`
  6143. // policy except for small, manually supervised test jobs.
  6144. //
  6145. // If unknown or unspecified, the service will attempt to choose a
  6146. // reasonable
  6147. // default.
  6148. //
  6149. // Possible values:
  6150. // "TEARDOWN_POLICY_UNKNOWN" - The teardown policy isn't specified, or
  6151. // is unknown.
  6152. // "TEARDOWN_ALWAYS" - Always teardown the resource.
  6153. // "TEARDOWN_ON_SUCCESS" - Teardown the resource on success. This is
  6154. // useful for debugging
  6155. // failures.
  6156. // "TEARDOWN_NEVER" - Never teardown the resource. This is useful for
  6157. // debugging and
  6158. // development.
  6159. TeardownPolicy string `json:"teardownPolicy,omitempty"`
  6160. // WorkerHarnessContainerImage: Required. Docker container image that
  6161. // executes the Cloud Dataflow worker
  6162. // harness, residing in Google Container Registry.
  6163. WorkerHarnessContainerImage string `json:"workerHarnessContainerImage,omitempty"`
  6164. // Zone: Zone to run the worker pools in. If empty or unspecified, the
  6165. // service
  6166. // will attempt to choose a reasonable default.
  6167. Zone string `json:"zone,omitempty"`
  6168. // ForceSendFields is a list of field names (e.g. "AutoscalingSettings")
  6169. // to unconditionally include in API requests. By default, fields with
  6170. // empty values are omitted from API requests. However, any non-pointer,
  6171. // non-interface field appearing in ForceSendFields will be sent to the
  6172. // server regardless of whether the field is empty or not. This may be
  6173. // used to include empty fields in Patch requests.
  6174. ForceSendFields []string `json:"-"`
  6175. // NullFields is a list of field names (e.g. "AutoscalingSettings") to
  6176. // include in API requests with the JSON null value. By default, fields
  6177. // with empty values are omitted from API requests. However, any field
  6178. // with an empty value appearing in NullFields will be sent to the
  6179. // server as null. It is an error if a field in this list has a
  6180. // non-empty value. This may be used to include null fields in Patch
  6181. // requests.
  6182. NullFields []string `json:"-"`
  6183. }
  6184. func (s *WorkerPool) MarshalJSON() ([]byte, error) {
  6185. type NoMethod WorkerPool
  6186. raw := NoMethod(*s)
  6187. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6188. }
  6189. // WorkerSettings: Provides data to pass through to the worker harness.
  6190. type WorkerSettings struct {
  6191. // BaseUrl: The base URL for accessing Google Cloud APIs.
  6192. //
  6193. // When workers access Google Cloud APIs, they logically do so
  6194. // via
  6195. // relative URLs. If this field is specified, it supplies the base
  6196. // URL to use for resolving these relative URLs. The
  6197. // normative
  6198. // algorithm used is defined by RFC 1808, "Relative Uniform
  6199. // Resource
  6200. // Locators".
  6201. //
  6202. // If not specified, the default value is "http://www.googleapis.com/"
  6203. BaseUrl string `json:"baseUrl,omitempty"`
  6204. // ReportingEnabled: Whether to send work progress updates to the
  6205. // service.
  6206. ReportingEnabled bool `json:"reportingEnabled,omitempty"`
  6207. // ServicePath: The Cloud Dataflow service path relative to the root
  6208. // URL, for example,
  6209. // "dataflow/v1b3/projects".
  6210. ServicePath string `json:"servicePath,omitempty"`
  6211. // ShuffleServicePath: The Shuffle service path relative to the root
  6212. // URL, for example,
  6213. // "shuffle/v1beta1".
  6214. ShuffleServicePath string `json:"shuffleServicePath,omitempty"`
  6215. // TempStoragePrefix: The prefix of the resources the system should use
  6216. // for temporary
  6217. // storage.
  6218. //
  6219. // The supported resource type is:
  6220. //
  6221. // Google Cloud Storage:
  6222. //
  6223. // storage.googleapis.com/{bucket}/{object}
  6224. // bucket.storage.googleapis.com/{object}
  6225. TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
  6226. // WorkerId: The ID of the worker running this pipeline.
  6227. WorkerId string `json:"workerId,omitempty"`
  6228. // ForceSendFields is a list of field names (e.g. "BaseUrl") to
  6229. // unconditionally include in API requests. By default, fields with
  6230. // empty values are omitted from API requests. However, any non-pointer,
  6231. // non-interface field appearing in ForceSendFields will be sent to the
  6232. // server regardless of whether the field is empty or not. This may be
  6233. // used to include empty fields in Patch requests.
  6234. ForceSendFields []string `json:"-"`
  6235. // NullFields is a list of field names (e.g. "BaseUrl") to include in
  6236. // API requests with the JSON null value. By default, fields with empty
  6237. // values are omitted from API requests. However, any field with an
  6238. // empty value appearing in NullFields will be sent to the server as
  6239. // null. It is an error if a field in this list has a non-empty value.
  6240. // This may be used to include null fields in Patch requests.
  6241. NullFields []string `json:"-"`
  6242. }
  6243. func (s *WorkerSettings) MarshalJSON() ([]byte, error) {
  6244. type NoMethod WorkerSettings
  6245. raw := NoMethod(*s)
  6246. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6247. }
  6248. // WorkerShutdownNotice: Shutdown notification from workers. This is to
  6249. // be sent by the shutdown
  6250. // script of the worker VM so that the backend knows that the VM is
  6251. // being
  6252. // shut down.
  6253. type WorkerShutdownNotice struct {
  6254. // Reason: The reason for the worker shutdown.
  6255. // Current possible values are:
  6256. // "UNKNOWN": shutdown reason is unknown.
  6257. // "PREEMPTION": shutdown reason is preemption.
  6258. // Other possible reasons may be added in the future.
  6259. Reason string `json:"reason,omitempty"`
  6260. // ForceSendFields is a list of field names (e.g. "Reason") to
  6261. // unconditionally include in API requests. By default, fields with
  6262. // empty values are omitted from API requests. However, any non-pointer,
  6263. // non-interface field appearing in ForceSendFields will be sent to the
  6264. // server regardless of whether the field is empty or not. This may be
  6265. // used to include empty fields in Patch requests.
  6266. ForceSendFields []string `json:"-"`
  6267. // NullFields is a list of field names (e.g. "Reason") to include in API
  6268. // requests with the JSON null value. By default, fields with empty
  6269. // values are omitted from API requests. However, any field with an
  6270. // empty value appearing in NullFields will be sent to the server as
  6271. // null. It is an error if a field in this list has a non-empty value.
  6272. // This may be used to include null fields in Patch requests.
  6273. NullFields []string `json:"-"`
  6274. }
  6275. func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) {
  6276. type NoMethod WorkerShutdownNotice
  6277. raw := NoMethod(*s)
  6278. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6279. }
  6280. // WorkerShutdownNoticeResponse: Service-side response to WorkerMessage
  6281. // issuing shutdown notice.
  6282. type WorkerShutdownNoticeResponse struct {
  6283. }
  6284. // WriteInstruction: An instruction that writes records.
  6285. // Takes one input, produces no outputs.
  6286. type WriteInstruction struct {
  6287. // Input: The input.
  6288. Input *InstructionInput `json:"input,omitempty"`
  6289. // Sink: The sink to write to.
  6290. Sink *Sink `json:"sink,omitempty"`
  6291. // ForceSendFields is a list of field names (e.g. "Input") to
  6292. // unconditionally include in API requests. By default, fields with
  6293. // empty values are omitted from API requests. However, any non-pointer,
  6294. // non-interface field appearing in ForceSendFields will be sent to the
  6295. // server regardless of whether the field is empty or not. This may be
  6296. // used to include empty fields in Patch requests.
  6297. ForceSendFields []string `json:"-"`
  6298. // NullFields is a list of field names (e.g. "Input") to include in API
  6299. // requests with the JSON null value. By default, fields with empty
  6300. // values are omitted from API requests. However, any field with an
  6301. // empty value appearing in NullFields will be sent to the server as
  6302. // null. It is an error if a field in this list has a non-empty value.
  6303. // This may be used to include null fields in Patch requests.
  6304. NullFields []string `json:"-"`
  6305. }
  6306. func (s *WriteInstruction) MarshalJSON() ([]byte, error) {
  6307. type NoMethod WriteInstruction
  6308. raw := NoMethod(*s)
  6309. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6310. }
  6311. // method id "dataflow.projects.workerMessages":
  6312. type ProjectsWorkerMessagesCall struct {
  6313. s *Service
  6314. projectId string
  6315. sendworkermessagesrequest *SendWorkerMessagesRequest
  6316. urlParams_ gensupport.URLParams
  6317. ctx_ context.Context
  6318. header_ http.Header
  6319. }
  6320. // WorkerMessages: Send a worker_message to the service.
  6321. func (r *ProjectsService) WorkerMessages(projectId string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsWorkerMessagesCall {
  6322. c := &ProjectsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6323. c.projectId = projectId
  6324. c.sendworkermessagesrequest = sendworkermessagesrequest
  6325. return c
  6326. }
  6327. // Fields allows partial responses to be retrieved. See
  6328. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6329. // for more information.
  6330. func (c *ProjectsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsWorkerMessagesCall {
  6331. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6332. return c
  6333. }
  6334. // Context sets the context to be used in this call's Do method. Any
  6335. // pending HTTP request will be aborted if the provided context is
  6336. // canceled.
  6337. func (c *ProjectsWorkerMessagesCall) Context(ctx context.Context) *ProjectsWorkerMessagesCall {
  6338. c.ctx_ = ctx
  6339. return c
  6340. }
  6341. // Header returns an http.Header that can be modified by the caller to
  6342. // add HTTP headers to the request.
  6343. func (c *ProjectsWorkerMessagesCall) Header() http.Header {
  6344. if c.header_ == nil {
  6345. c.header_ = make(http.Header)
  6346. }
  6347. return c.header_
  6348. }
  6349. func (c *ProjectsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) {
  6350. reqHeaders := make(http.Header)
  6351. for k, v := range c.header_ {
  6352. reqHeaders[k] = v
  6353. }
  6354. reqHeaders.Set("User-Agent", c.s.userAgent())
  6355. var body io.Reader = nil
  6356. body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest)
  6357. if err != nil {
  6358. return nil, err
  6359. }
  6360. reqHeaders.Set("Content-Type", "application/json")
  6361. c.urlParams_.Set("alt", alt)
  6362. c.urlParams_.Set("prettyPrint", "false")
  6363. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/WorkerMessages")
  6364. urls += "?" + c.urlParams_.Encode()
  6365. req, err := http.NewRequest("POST", urls, body)
  6366. if err != nil {
  6367. return nil, err
  6368. }
  6369. req.Header = reqHeaders
  6370. googleapi.Expand(req.URL, map[string]string{
  6371. "projectId": c.projectId,
  6372. })
  6373. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6374. }
  6375. // Do executes the "dataflow.projects.workerMessages" call.
  6376. // Exactly one of *SendWorkerMessagesResponse or error will be non-nil.
  6377. // Any non-2xx status code is an error. Response headers are in either
  6378. // *SendWorkerMessagesResponse.ServerResponse.Header or (if a response
  6379. // was returned at all) in error.(*googleapi.Error).Header. Use
  6380. // googleapi.IsNotModified to check whether the returned error was
  6381. // because http.StatusNotModified was returned.
  6382. func (c *ProjectsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) {
  6383. gensupport.SetOptions(c.urlParams_, opts...)
  6384. res, err := c.doRequest("json")
  6385. if res != nil && res.StatusCode == http.StatusNotModified {
  6386. if res.Body != nil {
  6387. res.Body.Close()
  6388. }
  6389. return nil, &googleapi.Error{
  6390. Code: res.StatusCode,
  6391. Header: res.Header,
  6392. }
  6393. }
  6394. if err != nil {
  6395. return nil, err
  6396. }
  6397. defer googleapi.CloseBody(res)
  6398. if err := googleapi.CheckResponse(res); err != nil {
  6399. return nil, err
  6400. }
  6401. ret := &SendWorkerMessagesResponse{
  6402. ServerResponse: googleapi.ServerResponse{
  6403. Header: res.Header,
  6404. HTTPStatusCode: res.StatusCode,
  6405. },
  6406. }
  6407. target := &ret
  6408. if err := gensupport.DecodeResponse(target, res); err != nil {
  6409. return nil, err
  6410. }
  6411. return ret, nil
  6412. // {
  6413. // "description": "Send a worker_message to the service.",
  6414. // "flatPath": "v1b3/projects/{projectId}/WorkerMessages",
  6415. // "httpMethod": "POST",
  6416. // "id": "dataflow.projects.workerMessages",
  6417. // "parameterOrder": [
  6418. // "projectId"
  6419. // ],
  6420. // "parameters": {
  6421. // "projectId": {
  6422. // "description": "The project to send the WorkerMessages to.",
  6423. // "location": "path",
  6424. // "required": true,
  6425. // "type": "string"
  6426. // }
  6427. // },
  6428. // "path": "v1b3/projects/{projectId}/WorkerMessages",
  6429. // "request": {
  6430. // "$ref": "SendWorkerMessagesRequest"
  6431. // },
  6432. // "response": {
  6433. // "$ref": "SendWorkerMessagesResponse"
  6434. // },
  6435. // "scopes": [
  6436. // "https://www.googleapis.com/auth/cloud-platform",
  6437. // "https://www.googleapis.com/auth/compute",
  6438. // "https://www.googleapis.com/auth/compute.readonly",
  6439. // "https://www.googleapis.com/auth/userinfo.email"
  6440. // ]
  6441. // }
  6442. }
  6443. // method id "dataflow.projects.jobs.aggregated":
  6444. type ProjectsJobsAggregatedCall struct {
  6445. s *Service
  6446. projectId string
  6447. urlParams_ gensupport.URLParams
  6448. ifNoneMatch_ string
  6449. ctx_ context.Context
  6450. header_ http.Header
  6451. }
  6452. // Aggregated: List the jobs of a project across all regions.
  6453. func (r *ProjectsJobsService) Aggregated(projectId string) *ProjectsJobsAggregatedCall {
  6454. c := &ProjectsJobsAggregatedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6455. c.projectId = projectId
  6456. return c
  6457. }
  6458. // Filter sets the optional parameter "filter": The kind of filter to
  6459. // use.
  6460. //
  6461. // Possible values:
  6462. // "UNKNOWN"
  6463. // "ALL"
  6464. // "TERMINATED"
  6465. // "ACTIVE"
  6466. func (c *ProjectsJobsAggregatedCall) Filter(filter string) *ProjectsJobsAggregatedCall {
  6467. c.urlParams_.Set("filter", filter)
  6468. return c
  6469. }
  6470. // Location sets the optional parameter "location": The [regional
  6471. // endpoint]
  6472. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  6473. // dpoints) that
  6474. // contains this job.
  6475. func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggregatedCall {
  6476. c.urlParams_.Set("location", location)
  6477. return c
  6478. }
  6479. // PageSize sets the optional parameter "pageSize": If there are many
  6480. // jobs, limit response to at most this many.
  6481. // The actual number of jobs returned will be the lesser of
  6482. // max_responses
  6483. // and an unspecified server-defined limit.
  6484. func (c *ProjectsJobsAggregatedCall) PageSize(pageSize int64) *ProjectsJobsAggregatedCall {
  6485. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6486. return c
  6487. }
  6488. // PageToken sets the optional parameter "pageToken": Set this to the
  6489. // 'next_page_token' field of a previous response
  6490. // to request additional results in a long list.
  6491. func (c *ProjectsJobsAggregatedCall) PageToken(pageToken string) *ProjectsJobsAggregatedCall {
  6492. c.urlParams_.Set("pageToken", pageToken)
  6493. return c
  6494. }
  6495. // View sets the optional parameter "view": Level of information
  6496. // requested in response. Default is `JOB_VIEW_SUMMARY`.
  6497. //
  6498. // Possible values:
  6499. // "JOB_VIEW_UNKNOWN"
  6500. // "JOB_VIEW_SUMMARY"
  6501. // "JOB_VIEW_ALL"
  6502. // "JOB_VIEW_DESCRIPTION"
  6503. func (c *ProjectsJobsAggregatedCall) View(view string) *ProjectsJobsAggregatedCall {
  6504. c.urlParams_.Set("view", view)
  6505. return c
  6506. }
  6507. // Fields allows partial responses to be retrieved. See
  6508. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6509. // for more information.
  6510. func (c *ProjectsJobsAggregatedCall) Fields(s ...googleapi.Field) *ProjectsJobsAggregatedCall {
  6511. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6512. return c
  6513. }
  6514. // IfNoneMatch sets the optional parameter which makes the operation
  6515. // fail if the object's ETag matches the given value. This is useful for
  6516. // getting updates only after the object has changed since the last
  6517. // request. Use googleapi.IsNotModified to check whether the response
  6518. // error from Do is the result of In-None-Match.
  6519. func (c *ProjectsJobsAggregatedCall) IfNoneMatch(entityTag string) *ProjectsJobsAggregatedCall {
  6520. c.ifNoneMatch_ = entityTag
  6521. return c
  6522. }
  6523. // Context sets the context to be used in this call's Do method. Any
  6524. // pending HTTP request will be aborted if the provided context is
  6525. // canceled.
  6526. func (c *ProjectsJobsAggregatedCall) Context(ctx context.Context) *ProjectsJobsAggregatedCall {
  6527. c.ctx_ = ctx
  6528. return c
  6529. }
  6530. // Header returns an http.Header that can be modified by the caller to
  6531. // add HTTP headers to the request.
  6532. func (c *ProjectsJobsAggregatedCall) Header() http.Header {
  6533. if c.header_ == nil {
  6534. c.header_ = make(http.Header)
  6535. }
  6536. return c.header_
  6537. }
  6538. func (c *ProjectsJobsAggregatedCall) doRequest(alt string) (*http.Response, error) {
  6539. reqHeaders := make(http.Header)
  6540. for k, v := range c.header_ {
  6541. reqHeaders[k] = v
  6542. }
  6543. reqHeaders.Set("User-Agent", c.s.userAgent())
  6544. if c.ifNoneMatch_ != "" {
  6545. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6546. }
  6547. var body io.Reader = nil
  6548. c.urlParams_.Set("alt", alt)
  6549. c.urlParams_.Set("prettyPrint", "false")
  6550. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs:aggregated")
  6551. urls += "?" + c.urlParams_.Encode()
  6552. req, err := http.NewRequest("GET", urls, body)
  6553. if err != nil {
  6554. return nil, err
  6555. }
  6556. req.Header = reqHeaders
  6557. googleapi.Expand(req.URL, map[string]string{
  6558. "projectId": c.projectId,
  6559. })
  6560. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6561. }
  6562. // Do executes the "dataflow.projects.jobs.aggregated" call.
  6563. // Exactly one of *ListJobsResponse or error will be non-nil. Any
  6564. // non-2xx status code is an error. Response headers are in either
  6565. // *ListJobsResponse.ServerResponse.Header or (if a response was
  6566. // returned at all) in error.(*googleapi.Error).Header. Use
  6567. // googleapi.IsNotModified to check whether the returned error was
  6568. // because http.StatusNotModified was returned.
  6569. func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  6570. gensupport.SetOptions(c.urlParams_, opts...)
  6571. res, err := c.doRequest("json")
  6572. if res != nil && res.StatusCode == http.StatusNotModified {
  6573. if res.Body != nil {
  6574. res.Body.Close()
  6575. }
  6576. return nil, &googleapi.Error{
  6577. Code: res.StatusCode,
  6578. Header: res.Header,
  6579. }
  6580. }
  6581. if err != nil {
  6582. return nil, err
  6583. }
  6584. defer googleapi.CloseBody(res)
  6585. if err := googleapi.CheckResponse(res); err != nil {
  6586. return nil, err
  6587. }
  6588. ret := &ListJobsResponse{
  6589. ServerResponse: googleapi.ServerResponse{
  6590. Header: res.Header,
  6591. HTTPStatusCode: res.StatusCode,
  6592. },
  6593. }
  6594. target := &ret
  6595. if err := gensupport.DecodeResponse(target, res); err != nil {
  6596. return nil, err
  6597. }
  6598. return ret, nil
  6599. // {
  6600. // "description": "List the jobs of a project across all regions.",
  6601. // "flatPath": "v1b3/projects/{projectId}/jobs:aggregated",
  6602. // "httpMethod": "GET",
  6603. // "id": "dataflow.projects.jobs.aggregated",
  6604. // "parameterOrder": [
  6605. // "projectId"
  6606. // ],
  6607. // "parameters": {
  6608. // "filter": {
  6609. // "description": "The kind of filter to use.",
  6610. // "enum": [
  6611. // "UNKNOWN",
  6612. // "ALL",
  6613. // "TERMINATED",
  6614. // "ACTIVE"
  6615. // ],
  6616. // "location": "query",
  6617. // "type": "string"
  6618. // },
  6619. // "location": {
  6620. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  6621. // "location": "query",
  6622. // "type": "string"
  6623. // },
  6624. // "pageSize": {
  6625. // "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.",
  6626. // "format": "int32",
  6627. // "location": "query",
  6628. // "type": "integer"
  6629. // },
  6630. // "pageToken": {
  6631. // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.",
  6632. // "location": "query",
  6633. // "type": "string"
  6634. // },
  6635. // "projectId": {
  6636. // "description": "The project which owns the jobs.",
  6637. // "location": "path",
  6638. // "required": true,
  6639. // "type": "string"
  6640. // },
  6641. // "view": {
  6642. // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.",
  6643. // "enum": [
  6644. // "JOB_VIEW_UNKNOWN",
  6645. // "JOB_VIEW_SUMMARY",
  6646. // "JOB_VIEW_ALL",
  6647. // "JOB_VIEW_DESCRIPTION"
  6648. // ],
  6649. // "location": "query",
  6650. // "type": "string"
  6651. // }
  6652. // },
  6653. // "path": "v1b3/projects/{projectId}/jobs:aggregated",
  6654. // "response": {
  6655. // "$ref": "ListJobsResponse"
  6656. // },
  6657. // "scopes": [
  6658. // "https://www.googleapis.com/auth/cloud-platform",
  6659. // "https://www.googleapis.com/auth/compute",
  6660. // "https://www.googleapis.com/auth/compute.readonly",
  6661. // "https://www.googleapis.com/auth/userinfo.email"
  6662. // ]
  6663. // }
  6664. }
  6665. // Pages invokes f for each page of results.
  6666. // A non-nil error returned from f will halt the iteration.
  6667. // The provided context supersedes any context provided to the Context method.
  6668. func (c *ProjectsJobsAggregatedCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  6669. c.ctx_ = ctx
  6670. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6671. for {
  6672. x, err := c.Do()
  6673. if err != nil {
  6674. return err
  6675. }
  6676. if err := f(x); err != nil {
  6677. return err
  6678. }
  6679. if x.NextPageToken == "" {
  6680. return nil
  6681. }
  6682. c.PageToken(x.NextPageToken)
  6683. }
  6684. }
  6685. // method id "dataflow.projects.jobs.create":
  6686. type ProjectsJobsCreateCall struct {
  6687. s *Service
  6688. projectId string
  6689. job *Job
  6690. urlParams_ gensupport.URLParams
  6691. ctx_ context.Context
  6692. header_ http.Header
  6693. }
  6694. // Create: Creates a Cloud Dataflow job.
  6695. //
  6696. // To create a job, we recommend using `projects.locations.jobs.create`
  6697. // with a
  6698. // [regional
  6699. // endpoint]
  6700. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  6701. // dpoints). Using
  6702. // `projects.jobs.create` is not recommended, as your job will always
  6703. // start
  6704. // in `us-central1`.
  6705. func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCreateCall {
  6706. c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6707. c.projectId = projectId
  6708. c.job = job
  6709. return c
  6710. }
  6711. // Location sets the optional parameter "location": The [regional
  6712. // endpoint]
  6713. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  6714. // dpoints) that
  6715. // contains this job.
  6716. func (c *ProjectsJobsCreateCall) Location(location string) *ProjectsJobsCreateCall {
  6717. c.urlParams_.Set("location", location)
  6718. return c
  6719. }
  6720. // ReplaceJobId sets the optional parameter "replaceJobId": Deprecated.
  6721. // This field is now in the Job message.
  6722. func (c *ProjectsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsJobsCreateCall {
  6723. c.urlParams_.Set("replaceJobId", replaceJobId)
  6724. return c
  6725. }
  6726. // View sets the optional parameter "view": The level of information
  6727. // requested in response.
  6728. //
  6729. // Possible values:
  6730. // "JOB_VIEW_UNKNOWN"
  6731. // "JOB_VIEW_SUMMARY"
  6732. // "JOB_VIEW_ALL"
  6733. // "JOB_VIEW_DESCRIPTION"
  6734. func (c *ProjectsJobsCreateCall) View(view string) *ProjectsJobsCreateCall {
  6735. c.urlParams_.Set("view", view)
  6736. return c
  6737. }
  6738. // Fields allows partial responses to be retrieved. See
  6739. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6740. // for more information.
  6741. func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall {
  6742. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6743. return c
  6744. }
  6745. // Context sets the context to be used in this call's Do method. Any
  6746. // pending HTTP request will be aborted if the provided context is
  6747. // canceled.
  6748. func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
  6749. c.ctx_ = ctx
  6750. return c
  6751. }
  6752. // Header returns an http.Header that can be modified by the caller to
  6753. // add HTTP headers to the request.
  6754. func (c *ProjectsJobsCreateCall) Header() http.Header {
  6755. if c.header_ == nil {
  6756. c.header_ = make(http.Header)
  6757. }
  6758. return c.header_
  6759. }
  6760. func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  6761. reqHeaders := make(http.Header)
  6762. for k, v := range c.header_ {
  6763. reqHeaders[k] = v
  6764. }
  6765. reqHeaders.Set("User-Agent", c.s.userAgent())
  6766. var body io.Reader = nil
  6767. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  6768. if err != nil {
  6769. return nil, err
  6770. }
  6771. reqHeaders.Set("Content-Type", "application/json")
  6772. c.urlParams_.Set("alt", alt)
  6773. c.urlParams_.Set("prettyPrint", "false")
  6774. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs")
  6775. urls += "?" + c.urlParams_.Encode()
  6776. req, err := http.NewRequest("POST", urls, body)
  6777. if err != nil {
  6778. return nil, err
  6779. }
  6780. req.Header = reqHeaders
  6781. googleapi.Expand(req.URL, map[string]string{
  6782. "projectId": c.projectId,
  6783. })
  6784. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6785. }
  6786. // Do executes the "dataflow.projects.jobs.create" call.
  6787. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  6788. // is an error. Response headers are in either
  6789. // *Job.ServerResponse.Header or (if a response was returned at all) in
  6790. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6791. // whether the returned error was because http.StatusNotModified was
  6792. // returned.
  6793. func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  6794. gensupport.SetOptions(c.urlParams_, opts...)
  6795. res, err := c.doRequest("json")
  6796. if res != nil && res.StatusCode == http.StatusNotModified {
  6797. if res.Body != nil {
  6798. res.Body.Close()
  6799. }
  6800. return nil, &googleapi.Error{
  6801. Code: res.StatusCode,
  6802. Header: res.Header,
  6803. }
  6804. }
  6805. if err != nil {
  6806. return nil, err
  6807. }
  6808. defer googleapi.CloseBody(res)
  6809. if err := googleapi.CheckResponse(res); err != nil {
  6810. return nil, err
  6811. }
  6812. ret := &Job{
  6813. ServerResponse: googleapi.ServerResponse{
  6814. Header: res.Header,
  6815. HTTPStatusCode: res.StatusCode,
  6816. },
  6817. }
  6818. target := &ret
  6819. if err := gensupport.DecodeResponse(target, res); err != nil {
  6820. return nil, err
  6821. }
  6822. return ret, nil
  6823. // {
  6824. // "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.",
  6825. // "flatPath": "v1b3/projects/{projectId}/jobs",
  6826. // "httpMethod": "POST",
  6827. // "id": "dataflow.projects.jobs.create",
  6828. // "parameterOrder": [
  6829. // "projectId"
  6830. // ],
  6831. // "parameters": {
  6832. // "location": {
  6833. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  6834. // "location": "query",
  6835. // "type": "string"
  6836. // },
  6837. // "projectId": {
  6838. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  6839. // "location": "path",
  6840. // "required": true,
  6841. // "type": "string"
  6842. // },
  6843. // "replaceJobId": {
  6844. // "description": "Deprecated. This field is now in the Job message.",
  6845. // "location": "query",
  6846. // "type": "string"
  6847. // },
  6848. // "view": {
  6849. // "description": "The level of information requested in response.",
  6850. // "enum": [
  6851. // "JOB_VIEW_UNKNOWN",
  6852. // "JOB_VIEW_SUMMARY",
  6853. // "JOB_VIEW_ALL",
  6854. // "JOB_VIEW_DESCRIPTION"
  6855. // ],
  6856. // "location": "query",
  6857. // "type": "string"
  6858. // }
  6859. // },
  6860. // "path": "v1b3/projects/{projectId}/jobs",
  6861. // "request": {
  6862. // "$ref": "Job"
  6863. // },
  6864. // "response": {
  6865. // "$ref": "Job"
  6866. // },
  6867. // "scopes": [
  6868. // "https://www.googleapis.com/auth/cloud-platform",
  6869. // "https://www.googleapis.com/auth/compute",
  6870. // "https://www.googleapis.com/auth/compute.readonly",
  6871. // "https://www.googleapis.com/auth/userinfo.email"
  6872. // ]
  6873. // }
  6874. }
  6875. // method id "dataflow.projects.jobs.get":
  6876. type ProjectsJobsGetCall struct {
  6877. s *Service
  6878. projectId string
  6879. jobId string
  6880. urlParams_ gensupport.URLParams
  6881. ifNoneMatch_ string
  6882. ctx_ context.Context
  6883. header_ http.Header
  6884. }
  6885. // Get: Gets the state of the specified Cloud Dataflow job.
  6886. //
  6887. // To get the state of a job, we recommend using
  6888. // `projects.locations.jobs.get`
  6889. // with a [regional
  6890. // endpoint]
  6891. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  6892. // dpoints). Using
  6893. // `projects.jobs.get` is not recommended, as you can only get the state
  6894. // of
  6895. // jobs that are running in `us-central1`.
  6896. func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall {
  6897. c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6898. c.projectId = projectId
  6899. c.jobId = jobId
  6900. return c
  6901. }
  6902. // Location sets the optional parameter "location": The [regional
  6903. // endpoint]
  6904. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  6905. // dpoints) that
  6906. // contains this job.
  6907. func (c *ProjectsJobsGetCall) Location(location string) *ProjectsJobsGetCall {
  6908. c.urlParams_.Set("location", location)
  6909. return c
  6910. }
  6911. // View sets the optional parameter "view": The level of information
  6912. // requested in response.
  6913. //
  6914. // Possible values:
  6915. // "JOB_VIEW_UNKNOWN"
  6916. // "JOB_VIEW_SUMMARY"
  6917. // "JOB_VIEW_ALL"
  6918. // "JOB_VIEW_DESCRIPTION"
  6919. func (c *ProjectsJobsGetCall) View(view string) *ProjectsJobsGetCall {
  6920. c.urlParams_.Set("view", view)
  6921. return c
  6922. }
  6923. // Fields allows partial responses to be retrieved. See
  6924. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6925. // for more information.
  6926. func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall {
  6927. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6928. return c
  6929. }
  6930. // IfNoneMatch sets the optional parameter which makes the operation
  6931. // fail if the object's ETag matches the given value. This is useful for
  6932. // getting updates only after the object has changed since the last
  6933. // request. Use googleapi.IsNotModified to check whether the response
  6934. // error from Do is the result of In-None-Match.
  6935. func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall {
  6936. c.ifNoneMatch_ = entityTag
  6937. return c
  6938. }
  6939. // Context sets the context to be used in this call's Do method. Any
  6940. // pending HTTP request will be aborted if the provided context is
  6941. // canceled.
  6942. func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
  6943. c.ctx_ = ctx
  6944. return c
  6945. }
  6946. // Header returns an http.Header that can be modified by the caller to
  6947. // add HTTP headers to the request.
  6948. func (c *ProjectsJobsGetCall) Header() http.Header {
  6949. if c.header_ == nil {
  6950. c.header_ = make(http.Header)
  6951. }
  6952. return c.header_
  6953. }
  6954. func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  6955. reqHeaders := make(http.Header)
  6956. for k, v := range c.header_ {
  6957. reqHeaders[k] = v
  6958. }
  6959. reqHeaders.Set("User-Agent", c.s.userAgent())
  6960. if c.ifNoneMatch_ != "" {
  6961. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6962. }
  6963. var body io.Reader = nil
  6964. c.urlParams_.Set("alt", alt)
  6965. c.urlParams_.Set("prettyPrint", "false")
  6966. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}")
  6967. urls += "?" + c.urlParams_.Encode()
  6968. req, err := http.NewRequest("GET", urls, body)
  6969. if err != nil {
  6970. return nil, err
  6971. }
  6972. req.Header = reqHeaders
  6973. googleapi.Expand(req.URL, map[string]string{
  6974. "projectId": c.projectId,
  6975. "jobId": c.jobId,
  6976. })
  6977. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6978. }
  6979. // Do executes the "dataflow.projects.jobs.get" call.
  6980. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  6981. // is an error. Response headers are in either
  6982. // *Job.ServerResponse.Header or (if a response was returned at all) in
  6983. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6984. // whether the returned error was because http.StatusNotModified was
  6985. // returned.
  6986. func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  6987. gensupport.SetOptions(c.urlParams_, opts...)
  6988. res, err := c.doRequest("json")
  6989. if res != nil && res.StatusCode == http.StatusNotModified {
  6990. if res.Body != nil {
  6991. res.Body.Close()
  6992. }
  6993. return nil, &googleapi.Error{
  6994. Code: res.StatusCode,
  6995. Header: res.Header,
  6996. }
  6997. }
  6998. if err != nil {
  6999. return nil, err
  7000. }
  7001. defer googleapi.CloseBody(res)
  7002. if err := googleapi.CheckResponse(res); err != nil {
  7003. return nil, err
  7004. }
  7005. ret := &Job{
  7006. ServerResponse: googleapi.ServerResponse{
  7007. Header: res.Header,
  7008. HTTPStatusCode: res.StatusCode,
  7009. },
  7010. }
  7011. target := &ret
  7012. if err := gensupport.DecodeResponse(target, res); err != nil {
  7013. return nil, err
  7014. }
  7015. return ret, nil
  7016. // {
  7017. // "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.",
  7018. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}",
  7019. // "httpMethod": "GET",
  7020. // "id": "dataflow.projects.jobs.get",
  7021. // "parameterOrder": [
  7022. // "projectId",
  7023. // "jobId"
  7024. // ],
  7025. // "parameters": {
  7026. // "jobId": {
  7027. // "description": "The job ID.",
  7028. // "location": "path",
  7029. // "required": true,
  7030. // "type": "string"
  7031. // },
  7032. // "location": {
  7033. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  7034. // "location": "query",
  7035. // "type": "string"
  7036. // },
  7037. // "projectId": {
  7038. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  7039. // "location": "path",
  7040. // "required": true,
  7041. // "type": "string"
  7042. // },
  7043. // "view": {
  7044. // "description": "The level of information requested in response.",
  7045. // "enum": [
  7046. // "JOB_VIEW_UNKNOWN",
  7047. // "JOB_VIEW_SUMMARY",
  7048. // "JOB_VIEW_ALL",
  7049. // "JOB_VIEW_DESCRIPTION"
  7050. // ],
  7051. // "location": "query",
  7052. // "type": "string"
  7053. // }
  7054. // },
  7055. // "path": "v1b3/projects/{projectId}/jobs/{jobId}",
  7056. // "response": {
  7057. // "$ref": "Job"
  7058. // },
  7059. // "scopes": [
  7060. // "https://www.googleapis.com/auth/cloud-platform",
  7061. // "https://www.googleapis.com/auth/compute",
  7062. // "https://www.googleapis.com/auth/compute.readonly",
  7063. // "https://www.googleapis.com/auth/userinfo.email"
  7064. // ]
  7065. // }
  7066. }
  7067. // method id "dataflow.projects.jobs.getMetrics":
  7068. type ProjectsJobsGetMetricsCall struct {
  7069. s *Service
  7070. projectId string
  7071. jobId string
  7072. urlParams_ gensupport.URLParams
  7073. ifNoneMatch_ string
  7074. ctx_ context.Context
  7075. header_ http.Header
  7076. }
  7077. // GetMetrics: Request the job status.
  7078. //
  7079. // To request the status of a job, we recommend
  7080. // using
  7081. // `projects.locations.jobs.getMetrics` with a [regional
  7082. // endpoint]
  7083. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  7084. // dpoints). Using
  7085. // `projects.jobs.getMetrics` is not recommended, as you can only
  7086. // request the
  7087. // status of jobs that are running in `us-central1`.
  7088. func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *ProjectsJobsGetMetricsCall {
  7089. c := &ProjectsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7090. c.projectId = projectId
  7091. c.jobId = jobId
  7092. return c
  7093. }
  7094. // Location sets the optional parameter "location": The [regional
  7095. // endpoint]
  7096. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  7097. // dpoints) that
  7098. // contains the job specified by job_id.
  7099. func (c *ProjectsJobsGetMetricsCall) Location(location string) *ProjectsJobsGetMetricsCall {
  7100. c.urlParams_.Set("location", location)
  7101. return c
  7102. }
  7103. // StartTime sets the optional parameter "startTime": Return only metric
  7104. // data that has changed since this time.
  7105. // Default is to return all information about all metrics for the job.
  7106. func (c *ProjectsJobsGetMetricsCall) StartTime(startTime string) *ProjectsJobsGetMetricsCall {
  7107. c.urlParams_.Set("startTime", startTime)
  7108. return c
  7109. }
  7110. // Fields allows partial responses to be retrieved. See
  7111. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7112. // for more information.
  7113. func (c *ProjectsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsJobsGetMetricsCall {
  7114. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7115. return c
  7116. }
  7117. // IfNoneMatch sets the optional parameter which makes the operation
  7118. // fail if the object's ETag matches the given value. This is useful for
  7119. // getting updates only after the object has changed since the last
  7120. // request. Use googleapi.IsNotModified to check whether the response
  7121. // error from Do is the result of In-None-Match.
  7122. func (c *ProjectsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsJobsGetMetricsCall {
  7123. c.ifNoneMatch_ = entityTag
  7124. return c
  7125. }
  7126. // Context sets the context to be used in this call's Do method. Any
  7127. // pending HTTP request will be aborted if the provided context is
  7128. // canceled.
  7129. func (c *ProjectsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsJobsGetMetricsCall {
  7130. c.ctx_ = ctx
  7131. return c
  7132. }
  7133. // Header returns an http.Header that can be modified by the caller to
  7134. // add HTTP headers to the request.
  7135. func (c *ProjectsJobsGetMetricsCall) Header() http.Header {
  7136. if c.header_ == nil {
  7137. c.header_ = make(http.Header)
  7138. }
  7139. return c.header_
  7140. }
  7141. func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) {
  7142. reqHeaders := make(http.Header)
  7143. for k, v := range c.header_ {
  7144. reqHeaders[k] = v
  7145. }
  7146. reqHeaders.Set("User-Agent", c.s.userAgent())
  7147. if c.ifNoneMatch_ != "" {
  7148. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7149. }
  7150. var body io.Reader = nil
  7151. c.urlParams_.Set("alt", alt)
  7152. c.urlParams_.Set("prettyPrint", "false")
  7153. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/metrics")
  7154. urls += "?" + c.urlParams_.Encode()
  7155. req, err := http.NewRequest("GET", urls, body)
  7156. if err != nil {
  7157. return nil, err
  7158. }
  7159. req.Header = reqHeaders
  7160. googleapi.Expand(req.URL, map[string]string{
  7161. "projectId": c.projectId,
  7162. "jobId": c.jobId,
  7163. })
  7164. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7165. }
  7166. // Do executes the "dataflow.projects.jobs.getMetrics" call.
  7167. // Exactly one of *JobMetrics or error will be non-nil. Any non-2xx
  7168. // status code is an error. Response headers are in either
  7169. // *JobMetrics.ServerResponse.Header or (if a response was returned at
  7170. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7171. // to check whether the returned error was because
  7172. // http.StatusNotModified was returned.
  7173. func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) {
  7174. gensupport.SetOptions(c.urlParams_, opts...)
  7175. res, err := c.doRequest("json")
  7176. if res != nil && res.StatusCode == http.StatusNotModified {
  7177. if res.Body != nil {
  7178. res.Body.Close()
  7179. }
  7180. return nil, &googleapi.Error{
  7181. Code: res.StatusCode,
  7182. Header: res.Header,
  7183. }
  7184. }
  7185. if err != nil {
  7186. return nil, err
  7187. }
  7188. defer googleapi.CloseBody(res)
  7189. if err := googleapi.CheckResponse(res); err != nil {
  7190. return nil, err
  7191. }
  7192. ret := &JobMetrics{
  7193. ServerResponse: googleapi.ServerResponse{
  7194. Header: res.Header,
  7195. HTTPStatusCode: res.StatusCode,
  7196. },
  7197. }
  7198. target := &ret
  7199. if err := gensupport.DecodeResponse(target, res); err != nil {
  7200. return nil, err
  7201. }
  7202. return ret, nil
  7203. // {
  7204. // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.",
  7205. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics",
  7206. // "httpMethod": "GET",
  7207. // "id": "dataflow.projects.jobs.getMetrics",
  7208. // "parameterOrder": [
  7209. // "projectId",
  7210. // "jobId"
  7211. // ],
  7212. // "parameters": {
  7213. // "jobId": {
  7214. // "description": "The job to get messages for.",
  7215. // "location": "path",
  7216. // "required": true,
  7217. // "type": "string"
  7218. // },
  7219. // "location": {
  7220. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.",
  7221. // "location": "query",
  7222. // "type": "string"
  7223. // },
  7224. // "projectId": {
  7225. // "description": "A project id.",
  7226. // "location": "path",
  7227. // "required": true,
  7228. // "type": "string"
  7229. // },
  7230. // "startTime": {
  7231. // "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.",
  7232. // "format": "google-datetime",
  7233. // "location": "query",
  7234. // "type": "string"
  7235. // }
  7236. // },
  7237. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics",
  7238. // "response": {
  7239. // "$ref": "JobMetrics"
  7240. // },
  7241. // "scopes": [
  7242. // "https://www.googleapis.com/auth/cloud-platform",
  7243. // "https://www.googleapis.com/auth/compute",
  7244. // "https://www.googleapis.com/auth/compute.readonly",
  7245. // "https://www.googleapis.com/auth/userinfo.email"
  7246. // ]
  7247. // }
  7248. }
  7249. // method id "dataflow.projects.jobs.list":
  7250. type ProjectsJobsListCall struct {
  7251. s *Service
  7252. projectId string
  7253. urlParams_ gensupport.URLParams
  7254. ifNoneMatch_ string
  7255. ctx_ context.Context
  7256. header_ http.Header
  7257. }
  7258. // List: List the jobs of a project.
  7259. //
  7260. // To list the jobs of a project in a region, we recommend
  7261. // using
  7262. // `projects.locations.jobs.get` with a [regional
  7263. // endpoint]
  7264. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  7265. // dpoints). To
  7266. // list the all jobs across all regions, use `projects.jobs.aggregated`.
  7267. // Using
  7268. // `projects.jobs.list` is not recommended, as you can only get the list
  7269. // of
  7270. // jobs that are running in `us-central1`.
  7271. func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall {
  7272. c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7273. c.projectId = projectId
  7274. return c
  7275. }
  7276. // Filter sets the optional parameter "filter": The kind of filter to
  7277. // use.
  7278. //
  7279. // Possible values:
  7280. // "UNKNOWN"
  7281. // "ALL"
  7282. // "TERMINATED"
  7283. // "ACTIVE"
  7284. func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall {
  7285. c.urlParams_.Set("filter", filter)
  7286. return c
  7287. }
  7288. // Location sets the optional parameter "location": The [regional
  7289. // endpoint]
  7290. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  7291. // dpoints) that
  7292. // contains this job.
  7293. func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall {
  7294. c.urlParams_.Set("location", location)
  7295. return c
  7296. }
  7297. // PageSize sets the optional parameter "pageSize": If there are many
  7298. // jobs, limit response to at most this many.
  7299. // The actual number of jobs returned will be the lesser of
  7300. // max_responses
  7301. // and an unspecified server-defined limit.
  7302. func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall {
  7303. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7304. return c
  7305. }
  7306. // PageToken sets the optional parameter "pageToken": Set this to the
  7307. // 'next_page_token' field of a previous response
  7308. // to request additional results in a long list.
  7309. func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall {
  7310. c.urlParams_.Set("pageToken", pageToken)
  7311. return c
  7312. }
  7313. // View sets the optional parameter "view": Level of information
  7314. // requested in response. Default is `JOB_VIEW_SUMMARY`.
  7315. //
  7316. // Possible values:
  7317. // "JOB_VIEW_UNKNOWN"
  7318. // "JOB_VIEW_SUMMARY"
  7319. // "JOB_VIEW_ALL"
  7320. // "JOB_VIEW_DESCRIPTION"
  7321. func (c *ProjectsJobsListCall) View(view string) *ProjectsJobsListCall {
  7322. c.urlParams_.Set("view", view)
  7323. return c
  7324. }
  7325. // Fields allows partial responses to be retrieved. See
  7326. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7327. // for more information.
  7328. func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall {
  7329. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7330. return c
  7331. }
  7332. // IfNoneMatch sets the optional parameter which makes the operation
  7333. // fail if the object's ETag matches the given value. This is useful for
  7334. // getting updates only after the object has changed since the last
  7335. // request. Use googleapi.IsNotModified to check whether the response
  7336. // error from Do is the result of In-None-Match.
  7337. func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall {
  7338. c.ifNoneMatch_ = entityTag
  7339. return c
  7340. }
  7341. // Context sets the context to be used in this call's Do method. Any
  7342. // pending HTTP request will be aborted if the provided context is
  7343. // canceled.
  7344. func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
  7345. c.ctx_ = ctx
  7346. return c
  7347. }
  7348. // Header returns an http.Header that can be modified by the caller to
  7349. // add HTTP headers to the request.
  7350. func (c *ProjectsJobsListCall) Header() http.Header {
  7351. if c.header_ == nil {
  7352. c.header_ = make(http.Header)
  7353. }
  7354. return c.header_
  7355. }
  7356. func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
  7357. reqHeaders := make(http.Header)
  7358. for k, v := range c.header_ {
  7359. reqHeaders[k] = v
  7360. }
  7361. reqHeaders.Set("User-Agent", c.s.userAgent())
  7362. if c.ifNoneMatch_ != "" {
  7363. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7364. }
  7365. var body io.Reader = nil
  7366. c.urlParams_.Set("alt", alt)
  7367. c.urlParams_.Set("prettyPrint", "false")
  7368. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs")
  7369. urls += "?" + c.urlParams_.Encode()
  7370. req, err := http.NewRequest("GET", urls, body)
  7371. if err != nil {
  7372. return nil, err
  7373. }
  7374. req.Header = reqHeaders
  7375. googleapi.Expand(req.URL, map[string]string{
  7376. "projectId": c.projectId,
  7377. })
  7378. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7379. }
  7380. // Do executes the "dataflow.projects.jobs.list" call.
  7381. // Exactly one of *ListJobsResponse or error will be non-nil. Any
  7382. // non-2xx status code is an error. Response headers are in either
  7383. // *ListJobsResponse.ServerResponse.Header or (if a response was
  7384. // returned at all) in error.(*googleapi.Error).Header. Use
  7385. // googleapi.IsNotModified to check whether the returned error was
  7386. // because http.StatusNotModified was returned.
  7387. func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  7388. gensupport.SetOptions(c.urlParams_, opts...)
  7389. res, err := c.doRequest("json")
  7390. if res != nil && res.StatusCode == http.StatusNotModified {
  7391. if res.Body != nil {
  7392. res.Body.Close()
  7393. }
  7394. return nil, &googleapi.Error{
  7395. Code: res.StatusCode,
  7396. Header: res.Header,
  7397. }
  7398. }
  7399. if err != nil {
  7400. return nil, err
  7401. }
  7402. defer googleapi.CloseBody(res)
  7403. if err := googleapi.CheckResponse(res); err != nil {
  7404. return nil, err
  7405. }
  7406. ret := &ListJobsResponse{
  7407. ServerResponse: googleapi.ServerResponse{
  7408. Header: res.Header,
  7409. HTTPStatusCode: res.StatusCode,
  7410. },
  7411. }
  7412. target := &ret
  7413. if err := gensupport.DecodeResponse(target, res); err != nil {
  7414. return nil, err
  7415. }
  7416. return ret, nil
  7417. // {
  7418. // "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.",
  7419. // "flatPath": "v1b3/projects/{projectId}/jobs",
  7420. // "httpMethod": "GET",
  7421. // "id": "dataflow.projects.jobs.list",
  7422. // "parameterOrder": [
  7423. // "projectId"
  7424. // ],
  7425. // "parameters": {
  7426. // "filter": {
  7427. // "description": "The kind of filter to use.",
  7428. // "enum": [
  7429. // "UNKNOWN",
  7430. // "ALL",
  7431. // "TERMINATED",
  7432. // "ACTIVE"
  7433. // ],
  7434. // "location": "query",
  7435. // "type": "string"
  7436. // },
  7437. // "location": {
  7438. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  7439. // "location": "query",
  7440. // "type": "string"
  7441. // },
  7442. // "pageSize": {
  7443. // "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.",
  7444. // "format": "int32",
  7445. // "location": "query",
  7446. // "type": "integer"
  7447. // },
  7448. // "pageToken": {
  7449. // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.",
  7450. // "location": "query",
  7451. // "type": "string"
  7452. // },
  7453. // "projectId": {
  7454. // "description": "The project which owns the jobs.",
  7455. // "location": "path",
  7456. // "required": true,
  7457. // "type": "string"
  7458. // },
  7459. // "view": {
  7460. // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.",
  7461. // "enum": [
  7462. // "JOB_VIEW_UNKNOWN",
  7463. // "JOB_VIEW_SUMMARY",
  7464. // "JOB_VIEW_ALL",
  7465. // "JOB_VIEW_DESCRIPTION"
  7466. // ],
  7467. // "location": "query",
  7468. // "type": "string"
  7469. // }
  7470. // },
  7471. // "path": "v1b3/projects/{projectId}/jobs",
  7472. // "response": {
  7473. // "$ref": "ListJobsResponse"
  7474. // },
  7475. // "scopes": [
  7476. // "https://www.googleapis.com/auth/cloud-platform",
  7477. // "https://www.googleapis.com/auth/compute",
  7478. // "https://www.googleapis.com/auth/compute.readonly",
  7479. // "https://www.googleapis.com/auth/userinfo.email"
  7480. // ]
  7481. // }
  7482. }
  7483. // Pages invokes f for each page of results.
  7484. // A non-nil error returned from f will halt the iteration.
  7485. // The provided context supersedes any context provided to the Context method.
  7486. func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  7487. c.ctx_ = ctx
  7488. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7489. for {
  7490. x, err := c.Do()
  7491. if err != nil {
  7492. return err
  7493. }
  7494. if err := f(x); err != nil {
  7495. return err
  7496. }
  7497. if x.NextPageToken == "" {
  7498. return nil
  7499. }
  7500. c.PageToken(x.NextPageToken)
  7501. }
  7502. }
  7503. // method id "dataflow.projects.jobs.snapshot":
  7504. type ProjectsJobsSnapshotCall struct {
  7505. s *Service
  7506. projectId string
  7507. jobId string
  7508. snapshotjobrequest *SnapshotJobRequest
  7509. urlParams_ gensupport.URLParams
  7510. ctx_ context.Context
  7511. header_ http.Header
  7512. }
  7513. // Snapshot: Snapshot the state of a streaming job.
  7514. func (r *ProjectsJobsService) Snapshot(projectId string, jobId string, snapshotjobrequest *SnapshotJobRequest) *ProjectsJobsSnapshotCall {
  7515. c := &ProjectsJobsSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7516. c.projectId = projectId
  7517. c.jobId = jobId
  7518. c.snapshotjobrequest = snapshotjobrequest
  7519. return c
  7520. }
  7521. // Fields allows partial responses to be retrieved. See
  7522. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7523. // for more information.
  7524. func (c *ProjectsJobsSnapshotCall) Fields(s ...googleapi.Field) *ProjectsJobsSnapshotCall {
  7525. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7526. return c
  7527. }
  7528. // Context sets the context to be used in this call's Do method. Any
  7529. // pending HTTP request will be aborted if the provided context is
  7530. // canceled.
  7531. func (c *ProjectsJobsSnapshotCall) Context(ctx context.Context) *ProjectsJobsSnapshotCall {
  7532. c.ctx_ = ctx
  7533. return c
  7534. }
  7535. // Header returns an http.Header that can be modified by the caller to
  7536. // add HTTP headers to the request.
  7537. func (c *ProjectsJobsSnapshotCall) Header() http.Header {
  7538. if c.header_ == nil {
  7539. c.header_ = make(http.Header)
  7540. }
  7541. return c.header_
  7542. }
  7543. func (c *ProjectsJobsSnapshotCall) doRequest(alt string) (*http.Response, error) {
  7544. reqHeaders := make(http.Header)
  7545. for k, v := range c.header_ {
  7546. reqHeaders[k] = v
  7547. }
  7548. reqHeaders.Set("User-Agent", c.s.userAgent())
  7549. var body io.Reader = nil
  7550. body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotjobrequest)
  7551. if err != nil {
  7552. return nil, err
  7553. }
  7554. reqHeaders.Set("Content-Type", "application/json")
  7555. c.urlParams_.Set("alt", alt)
  7556. c.urlParams_.Set("prettyPrint", "false")
  7557. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}:snapshot")
  7558. urls += "?" + c.urlParams_.Encode()
  7559. req, err := http.NewRequest("POST", urls, body)
  7560. if err != nil {
  7561. return nil, err
  7562. }
  7563. req.Header = reqHeaders
  7564. googleapi.Expand(req.URL, map[string]string{
  7565. "projectId": c.projectId,
  7566. "jobId": c.jobId,
  7567. })
  7568. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7569. }
  7570. // Do executes the "dataflow.projects.jobs.snapshot" call.
  7571. // Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
  7572. // code is an error. Response headers are in either
  7573. // *Snapshot.ServerResponse.Header or (if a response was returned at
  7574. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7575. // to check whether the returned error was because
  7576. // http.StatusNotModified was returned.
  7577. func (c *ProjectsJobsSnapshotCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
  7578. gensupport.SetOptions(c.urlParams_, opts...)
  7579. res, err := c.doRequest("json")
  7580. if res != nil && res.StatusCode == http.StatusNotModified {
  7581. if res.Body != nil {
  7582. res.Body.Close()
  7583. }
  7584. return nil, &googleapi.Error{
  7585. Code: res.StatusCode,
  7586. Header: res.Header,
  7587. }
  7588. }
  7589. if err != nil {
  7590. return nil, err
  7591. }
  7592. defer googleapi.CloseBody(res)
  7593. if err := googleapi.CheckResponse(res); err != nil {
  7594. return nil, err
  7595. }
  7596. ret := &Snapshot{
  7597. ServerResponse: googleapi.ServerResponse{
  7598. Header: res.Header,
  7599. HTTPStatusCode: res.StatusCode,
  7600. },
  7601. }
  7602. target := &ret
  7603. if err := gensupport.DecodeResponse(target, res); err != nil {
  7604. return nil, err
  7605. }
  7606. return ret, nil
  7607. // {
  7608. // "description": "Snapshot the state of a streaming job.",
  7609. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}:snapshot",
  7610. // "httpMethod": "POST",
  7611. // "id": "dataflow.projects.jobs.snapshot",
  7612. // "parameterOrder": [
  7613. // "projectId",
  7614. // "jobId"
  7615. // ],
  7616. // "parameters": {
  7617. // "jobId": {
  7618. // "description": "The job to be snapshotted.",
  7619. // "location": "path",
  7620. // "required": true,
  7621. // "type": "string"
  7622. // },
  7623. // "projectId": {
  7624. // "description": "The project which owns the job to be snapshotted.",
  7625. // "location": "path",
  7626. // "required": true,
  7627. // "type": "string"
  7628. // }
  7629. // },
  7630. // "path": "v1b3/projects/{projectId}/jobs/{jobId}:snapshot",
  7631. // "request": {
  7632. // "$ref": "SnapshotJobRequest"
  7633. // },
  7634. // "response": {
  7635. // "$ref": "Snapshot"
  7636. // },
  7637. // "scopes": [
  7638. // "https://www.googleapis.com/auth/cloud-platform",
  7639. // "https://www.googleapis.com/auth/compute",
  7640. // "https://www.googleapis.com/auth/compute.readonly",
  7641. // "https://www.googleapis.com/auth/userinfo.email"
  7642. // ]
  7643. // }
  7644. }
  7645. // method id "dataflow.projects.jobs.update":
  7646. type ProjectsJobsUpdateCall struct {
  7647. s *Service
  7648. projectId string
  7649. jobId string
  7650. job *Job
  7651. urlParams_ gensupport.URLParams
  7652. ctx_ context.Context
  7653. header_ http.Header
  7654. }
  7655. // Update: Updates the state of an existing Cloud Dataflow job.
  7656. //
  7657. // To update the state of an existing job, we recommend
  7658. // using
  7659. // `projects.locations.jobs.update` with a [regional
  7660. // endpoint]
  7661. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  7662. // dpoints). Using
  7663. // `projects.jobs.update` is not recommended, as you can only update the
  7664. // state
  7665. // of jobs that are running in `us-central1`.
  7666. func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) *ProjectsJobsUpdateCall {
  7667. c := &ProjectsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7668. c.projectId = projectId
  7669. c.jobId = jobId
  7670. c.job = job
  7671. return c
  7672. }
  7673. // Location sets the optional parameter "location": The [regional
  7674. // endpoint]
  7675. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  7676. // dpoints) that
  7677. // contains this job.
  7678. func (c *ProjectsJobsUpdateCall) Location(location string) *ProjectsJobsUpdateCall {
  7679. c.urlParams_.Set("location", location)
  7680. return c
  7681. }
  7682. // Fields allows partial responses to be retrieved. See
  7683. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7684. // for more information.
  7685. func (c *ProjectsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsJobsUpdateCall {
  7686. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7687. return c
  7688. }
  7689. // Context sets the context to be used in this call's Do method. Any
  7690. // pending HTTP request will be aborted if the provided context is
  7691. // canceled.
  7692. func (c *ProjectsJobsUpdateCall) Context(ctx context.Context) *ProjectsJobsUpdateCall {
  7693. c.ctx_ = ctx
  7694. return c
  7695. }
  7696. // Header returns an http.Header that can be modified by the caller to
  7697. // add HTTP headers to the request.
  7698. func (c *ProjectsJobsUpdateCall) Header() http.Header {
  7699. if c.header_ == nil {
  7700. c.header_ = make(http.Header)
  7701. }
  7702. return c.header_
  7703. }
  7704. func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) {
  7705. reqHeaders := make(http.Header)
  7706. for k, v := range c.header_ {
  7707. reqHeaders[k] = v
  7708. }
  7709. reqHeaders.Set("User-Agent", c.s.userAgent())
  7710. var body io.Reader = nil
  7711. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  7712. if err != nil {
  7713. return nil, err
  7714. }
  7715. reqHeaders.Set("Content-Type", "application/json")
  7716. c.urlParams_.Set("alt", alt)
  7717. c.urlParams_.Set("prettyPrint", "false")
  7718. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}")
  7719. urls += "?" + c.urlParams_.Encode()
  7720. req, err := http.NewRequest("PUT", urls, body)
  7721. if err != nil {
  7722. return nil, err
  7723. }
  7724. req.Header = reqHeaders
  7725. googleapi.Expand(req.URL, map[string]string{
  7726. "projectId": c.projectId,
  7727. "jobId": c.jobId,
  7728. })
  7729. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7730. }
  7731. // Do executes the "dataflow.projects.jobs.update" call.
  7732. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  7733. // is an error. Response headers are in either
  7734. // *Job.ServerResponse.Header or (if a response was returned at all) in
  7735. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7736. // whether the returned error was because http.StatusNotModified was
  7737. // returned.
  7738. func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  7739. gensupport.SetOptions(c.urlParams_, opts...)
  7740. res, err := c.doRequest("json")
  7741. if res != nil && res.StatusCode == http.StatusNotModified {
  7742. if res.Body != nil {
  7743. res.Body.Close()
  7744. }
  7745. return nil, &googleapi.Error{
  7746. Code: res.StatusCode,
  7747. Header: res.Header,
  7748. }
  7749. }
  7750. if err != nil {
  7751. return nil, err
  7752. }
  7753. defer googleapi.CloseBody(res)
  7754. if err := googleapi.CheckResponse(res); err != nil {
  7755. return nil, err
  7756. }
  7757. ret := &Job{
  7758. ServerResponse: googleapi.ServerResponse{
  7759. Header: res.Header,
  7760. HTTPStatusCode: res.StatusCode,
  7761. },
  7762. }
  7763. target := &ret
  7764. if err := gensupport.DecodeResponse(target, res); err != nil {
  7765. return nil, err
  7766. }
  7767. return ret, nil
  7768. // {
  7769. // "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.",
  7770. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}",
  7771. // "httpMethod": "PUT",
  7772. // "id": "dataflow.projects.jobs.update",
  7773. // "parameterOrder": [
  7774. // "projectId",
  7775. // "jobId"
  7776. // ],
  7777. // "parameters": {
  7778. // "jobId": {
  7779. // "description": "The job ID.",
  7780. // "location": "path",
  7781. // "required": true,
  7782. // "type": "string"
  7783. // },
  7784. // "location": {
  7785. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  7786. // "location": "query",
  7787. // "type": "string"
  7788. // },
  7789. // "projectId": {
  7790. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  7791. // "location": "path",
  7792. // "required": true,
  7793. // "type": "string"
  7794. // }
  7795. // },
  7796. // "path": "v1b3/projects/{projectId}/jobs/{jobId}",
  7797. // "request": {
  7798. // "$ref": "Job"
  7799. // },
  7800. // "response": {
  7801. // "$ref": "Job"
  7802. // },
  7803. // "scopes": [
  7804. // "https://www.googleapis.com/auth/cloud-platform",
  7805. // "https://www.googleapis.com/auth/compute",
  7806. // "https://www.googleapis.com/auth/compute.readonly",
  7807. // "https://www.googleapis.com/auth/userinfo.email"
  7808. // ]
  7809. // }
  7810. }
  7811. // method id "dataflow.projects.jobs.debug.getConfig":
  7812. type ProjectsJobsDebugGetConfigCall struct {
  7813. s *Service
  7814. projectId string
  7815. jobId string
  7816. getdebugconfigrequest *GetDebugConfigRequest
  7817. urlParams_ gensupport.URLParams
  7818. ctx_ context.Context
  7819. header_ http.Header
  7820. }
  7821. // GetConfig: Get encoded debug configuration for component. Not
  7822. // cacheable.
  7823. func (r *ProjectsJobsDebugService) GetConfig(projectId string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsJobsDebugGetConfigCall {
  7824. c := &ProjectsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7825. c.projectId = projectId
  7826. c.jobId = jobId
  7827. c.getdebugconfigrequest = getdebugconfigrequest
  7828. return c
  7829. }
  7830. // Fields allows partial responses to be retrieved. See
  7831. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7832. // for more information.
  7833. func (c *ProjectsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugGetConfigCall {
  7834. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7835. return c
  7836. }
  7837. // Context sets the context to be used in this call's Do method. Any
  7838. // pending HTTP request will be aborted if the provided context is
  7839. // canceled.
  7840. func (c *ProjectsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsJobsDebugGetConfigCall {
  7841. c.ctx_ = ctx
  7842. return c
  7843. }
  7844. // Header returns an http.Header that can be modified by the caller to
  7845. // add HTTP headers to the request.
  7846. func (c *ProjectsJobsDebugGetConfigCall) Header() http.Header {
  7847. if c.header_ == nil {
  7848. c.header_ = make(http.Header)
  7849. }
  7850. return c.header_
  7851. }
  7852. func (c *ProjectsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) {
  7853. reqHeaders := make(http.Header)
  7854. for k, v := range c.header_ {
  7855. reqHeaders[k] = v
  7856. }
  7857. reqHeaders.Set("User-Agent", c.s.userAgent())
  7858. var body io.Reader = nil
  7859. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest)
  7860. if err != nil {
  7861. return nil, err
  7862. }
  7863. reqHeaders.Set("Content-Type", "application/json")
  7864. c.urlParams_.Set("alt", alt)
  7865. c.urlParams_.Set("prettyPrint", "false")
  7866. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig")
  7867. urls += "?" + c.urlParams_.Encode()
  7868. req, err := http.NewRequest("POST", urls, body)
  7869. if err != nil {
  7870. return nil, err
  7871. }
  7872. req.Header = reqHeaders
  7873. googleapi.Expand(req.URL, map[string]string{
  7874. "projectId": c.projectId,
  7875. "jobId": c.jobId,
  7876. })
  7877. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7878. }
  7879. // Do executes the "dataflow.projects.jobs.debug.getConfig" call.
  7880. // Exactly one of *GetDebugConfigResponse or error will be non-nil. Any
  7881. // non-2xx status code is an error. Response headers are in either
  7882. // *GetDebugConfigResponse.ServerResponse.Header or (if a response was
  7883. // returned at all) in error.(*googleapi.Error).Header. Use
  7884. // googleapi.IsNotModified to check whether the returned error was
  7885. // because http.StatusNotModified was returned.
  7886. func (c *ProjectsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) {
  7887. gensupport.SetOptions(c.urlParams_, opts...)
  7888. res, err := c.doRequest("json")
  7889. if res != nil && res.StatusCode == http.StatusNotModified {
  7890. if res.Body != nil {
  7891. res.Body.Close()
  7892. }
  7893. return nil, &googleapi.Error{
  7894. Code: res.StatusCode,
  7895. Header: res.Header,
  7896. }
  7897. }
  7898. if err != nil {
  7899. return nil, err
  7900. }
  7901. defer googleapi.CloseBody(res)
  7902. if err := googleapi.CheckResponse(res); err != nil {
  7903. return nil, err
  7904. }
  7905. ret := &GetDebugConfigResponse{
  7906. ServerResponse: googleapi.ServerResponse{
  7907. Header: res.Header,
  7908. HTTPStatusCode: res.StatusCode,
  7909. },
  7910. }
  7911. target := &ret
  7912. if err := gensupport.DecodeResponse(target, res); err != nil {
  7913. return nil, err
  7914. }
  7915. return ret, nil
  7916. // {
  7917. // "description": "Get encoded debug configuration for component. Not cacheable.",
  7918. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig",
  7919. // "httpMethod": "POST",
  7920. // "id": "dataflow.projects.jobs.debug.getConfig",
  7921. // "parameterOrder": [
  7922. // "projectId",
  7923. // "jobId"
  7924. // ],
  7925. // "parameters": {
  7926. // "jobId": {
  7927. // "description": "The job id.",
  7928. // "location": "path",
  7929. // "required": true,
  7930. // "type": "string"
  7931. // },
  7932. // "projectId": {
  7933. // "description": "The project id.",
  7934. // "location": "path",
  7935. // "required": true,
  7936. // "type": "string"
  7937. // }
  7938. // },
  7939. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig",
  7940. // "request": {
  7941. // "$ref": "GetDebugConfigRequest"
  7942. // },
  7943. // "response": {
  7944. // "$ref": "GetDebugConfigResponse"
  7945. // },
  7946. // "scopes": [
  7947. // "https://www.googleapis.com/auth/cloud-platform",
  7948. // "https://www.googleapis.com/auth/compute",
  7949. // "https://www.googleapis.com/auth/compute.readonly",
  7950. // "https://www.googleapis.com/auth/userinfo.email"
  7951. // ]
  7952. // }
  7953. }
  7954. // method id "dataflow.projects.jobs.debug.sendCapture":
  7955. type ProjectsJobsDebugSendCaptureCall struct {
  7956. s *Service
  7957. projectId string
  7958. jobId string
  7959. senddebugcapturerequest *SendDebugCaptureRequest
  7960. urlParams_ gensupport.URLParams
  7961. ctx_ context.Context
  7962. header_ http.Header
  7963. }
  7964. // SendCapture: Send encoded debug capture data for component.
  7965. func (r *ProjectsJobsDebugService) SendCapture(projectId string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsJobsDebugSendCaptureCall {
  7966. c := &ProjectsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7967. c.projectId = projectId
  7968. c.jobId = jobId
  7969. c.senddebugcapturerequest = senddebugcapturerequest
  7970. return c
  7971. }
  7972. // Fields allows partial responses to be retrieved. See
  7973. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7974. // for more information.
  7975. func (c *ProjectsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugSendCaptureCall {
  7976. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7977. return c
  7978. }
  7979. // Context sets the context to be used in this call's Do method. Any
  7980. // pending HTTP request will be aborted if the provided context is
  7981. // canceled.
  7982. func (c *ProjectsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsJobsDebugSendCaptureCall {
  7983. c.ctx_ = ctx
  7984. return c
  7985. }
  7986. // Header returns an http.Header that can be modified by the caller to
  7987. // add HTTP headers to the request.
  7988. func (c *ProjectsJobsDebugSendCaptureCall) Header() http.Header {
  7989. if c.header_ == nil {
  7990. c.header_ = make(http.Header)
  7991. }
  7992. return c.header_
  7993. }
  7994. func (c *ProjectsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) {
  7995. reqHeaders := make(http.Header)
  7996. for k, v := range c.header_ {
  7997. reqHeaders[k] = v
  7998. }
  7999. reqHeaders.Set("User-Agent", c.s.userAgent())
  8000. var body io.Reader = nil
  8001. body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest)
  8002. if err != nil {
  8003. return nil, err
  8004. }
  8005. reqHeaders.Set("Content-Type", "application/json")
  8006. c.urlParams_.Set("alt", alt)
  8007. c.urlParams_.Set("prettyPrint", "false")
  8008. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture")
  8009. urls += "?" + c.urlParams_.Encode()
  8010. req, err := http.NewRequest("POST", urls, body)
  8011. if err != nil {
  8012. return nil, err
  8013. }
  8014. req.Header = reqHeaders
  8015. googleapi.Expand(req.URL, map[string]string{
  8016. "projectId": c.projectId,
  8017. "jobId": c.jobId,
  8018. })
  8019. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8020. }
  8021. // Do executes the "dataflow.projects.jobs.debug.sendCapture" call.
  8022. // Exactly one of *SendDebugCaptureResponse or error will be non-nil.
  8023. // Any non-2xx status code is an error. Response headers are in either
  8024. // *SendDebugCaptureResponse.ServerResponse.Header or (if a response was
  8025. // returned at all) in error.(*googleapi.Error).Header. Use
  8026. // googleapi.IsNotModified to check whether the returned error was
  8027. // because http.StatusNotModified was returned.
  8028. func (c *ProjectsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) {
  8029. gensupport.SetOptions(c.urlParams_, opts...)
  8030. res, err := c.doRequest("json")
  8031. if res != nil && res.StatusCode == http.StatusNotModified {
  8032. if res.Body != nil {
  8033. res.Body.Close()
  8034. }
  8035. return nil, &googleapi.Error{
  8036. Code: res.StatusCode,
  8037. Header: res.Header,
  8038. }
  8039. }
  8040. if err != nil {
  8041. return nil, err
  8042. }
  8043. defer googleapi.CloseBody(res)
  8044. if err := googleapi.CheckResponse(res); err != nil {
  8045. return nil, err
  8046. }
  8047. ret := &SendDebugCaptureResponse{
  8048. ServerResponse: googleapi.ServerResponse{
  8049. Header: res.Header,
  8050. HTTPStatusCode: res.StatusCode,
  8051. },
  8052. }
  8053. target := &ret
  8054. if err := gensupport.DecodeResponse(target, res); err != nil {
  8055. return nil, err
  8056. }
  8057. return ret, nil
  8058. // {
  8059. // "description": "Send encoded debug capture data for component.",
  8060. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture",
  8061. // "httpMethod": "POST",
  8062. // "id": "dataflow.projects.jobs.debug.sendCapture",
  8063. // "parameterOrder": [
  8064. // "projectId",
  8065. // "jobId"
  8066. // ],
  8067. // "parameters": {
  8068. // "jobId": {
  8069. // "description": "The job id.",
  8070. // "location": "path",
  8071. // "required": true,
  8072. // "type": "string"
  8073. // },
  8074. // "projectId": {
  8075. // "description": "The project id.",
  8076. // "location": "path",
  8077. // "required": true,
  8078. // "type": "string"
  8079. // }
  8080. // },
  8081. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture",
  8082. // "request": {
  8083. // "$ref": "SendDebugCaptureRequest"
  8084. // },
  8085. // "response": {
  8086. // "$ref": "SendDebugCaptureResponse"
  8087. // },
  8088. // "scopes": [
  8089. // "https://www.googleapis.com/auth/cloud-platform",
  8090. // "https://www.googleapis.com/auth/compute",
  8091. // "https://www.googleapis.com/auth/compute.readonly",
  8092. // "https://www.googleapis.com/auth/userinfo.email"
  8093. // ]
  8094. // }
  8095. }
  8096. // method id "dataflow.projects.jobs.messages.list":
  8097. type ProjectsJobsMessagesListCall struct {
  8098. s *Service
  8099. projectId string
  8100. jobId string
  8101. urlParams_ gensupport.URLParams
  8102. ifNoneMatch_ string
  8103. ctx_ context.Context
  8104. header_ http.Header
  8105. }
  8106. // List: Request the job status.
  8107. //
  8108. // To request the status of a job, we recommend
  8109. // using
  8110. // `projects.locations.jobs.messages.list` with a [regional
  8111. // endpoint]
  8112. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  8113. // dpoints). Using
  8114. // `projects.jobs.messages.list` is not recommended, as you can only
  8115. // request
  8116. // the status of jobs that are running in `us-central1`.
  8117. func (r *ProjectsJobsMessagesService) List(projectId string, jobId string) *ProjectsJobsMessagesListCall {
  8118. c := &ProjectsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8119. c.projectId = projectId
  8120. c.jobId = jobId
  8121. return c
  8122. }
  8123. // EndTime sets the optional parameter "endTime": Return only messages
  8124. // with timestamps < end_time. The default is now
  8125. // (i.e. return up to the latest messages available).
  8126. func (c *ProjectsJobsMessagesListCall) EndTime(endTime string) *ProjectsJobsMessagesListCall {
  8127. c.urlParams_.Set("endTime", endTime)
  8128. return c
  8129. }
  8130. // Location sets the optional parameter "location": The [regional
  8131. // endpoint]
  8132. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  8133. // dpoints) that
  8134. // contains the job specified by job_id.
  8135. func (c *ProjectsJobsMessagesListCall) Location(location string) *ProjectsJobsMessagesListCall {
  8136. c.urlParams_.Set("location", location)
  8137. return c
  8138. }
  8139. // MinimumImportance sets the optional parameter "minimumImportance":
  8140. // Filter to only get messages with importance >= level
  8141. //
  8142. // Possible values:
  8143. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN"
  8144. // "JOB_MESSAGE_DEBUG"
  8145. // "JOB_MESSAGE_DETAILED"
  8146. // "JOB_MESSAGE_BASIC"
  8147. // "JOB_MESSAGE_WARNING"
  8148. // "JOB_MESSAGE_ERROR"
  8149. func (c *ProjectsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsJobsMessagesListCall {
  8150. c.urlParams_.Set("minimumImportance", minimumImportance)
  8151. return c
  8152. }
  8153. // PageSize sets the optional parameter "pageSize": If specified,
  8154. // determines the maximum number of messages to
  8155. // return. If unspecified, the service may choose an
  8156. // appropriate
  8157. // default, or may return an arbitrarily large number of results.
  8158. func (c *ProjectsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsJobsMessagesListCall {
  8159. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8160. return c
  8161. }
  8162. // PageToken sets the optional parameter "pageToken": If supplied, this
  8163. // should be the value of next_page_token returned
  8164. // by an earlier call. This will cause the next page of results to
  8165. // be returned.
  8166. func (c *ProjectsJobsMessagesListCall) PageToken(pageToken string) *ProjectsJobsMessagesListCall {
  8167. c.urlParams_.Set("pageToken", pageToken)
  8168. return c
  8169. }
  8170. // StartTime sets the optional parameter "startTime": If specified,
  8171. // return only messages with timestamps >= start_time.
  8172. // The default is the job creation time (i.e. beginning of messages).
  8173. func (c *ProjectsJobsMessagesListCall) StartTime(startTime string) *ProjectsJobsMessagesListCall {
  8174. c.urlParams_.Set("startTime", startTime)
  8175. return c
  8176. }
  8177. // Fields allows partial responses to be retrieved. See
  8178. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8179. // for more information.
  8180. func (c *ProjectsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsJobsMessagesListCall {
  8181. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8182. return c
  8183. }
  8184. // IfNoneMatch sets the optional parameter which makes the operation
  8185. // fail if the object's ETag matches the given value. This is useful for
  8186. // getting updates only after the object has changed since the last
  8187. // request. Use googleapi.IsNotModified to check whether the response
  8188. // error from Do is the result of In-None-Match.
  8189. func (c *ProjectsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsJobsMessagesListCall {
  8190. c.ifNoneMatch_ = entityTag
  8191. return c
  8192. }
  8193. // Context sets the context to be used in this call's Do method. Any
  8194. // pending HTTP request will be aborted if the provided context is
  8195. // canceled.
  8196. func (c *ProjectsJobsMessagesListCall) Context(ctx context.Context) *ProjectsJobsMessagesListCall {
  8197. c.ctx_ = ctx
  8198. return c
  8199. }
  8200. // Header returns an http.Header that can be modified by the caller to
  8201. // add HTTP headers to the request.
  8202. func (c *ProjectsJobsMessagesListCall) Header() http.Header {
  8203. if c.header_ == nil {
  8204. c.header_ = make(http.Header)
  8205. }
  8206. return c.header_
  8207. }
  8208. func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) {
  8209. reqHeaders := make(http.Header)
  8210. for k, v := range c.header_ {
  8211. reqHeaders[k] = v
  8212. }
  8213. reqHeaders.Set("User-Agent", c.s.userAgent())
  8214. if c.ifNoneMatch_ != "" {
  8215. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8216. }
  8217. var body io.Reader = nil
  8218. c.urlParams_.Set("alt", alt)
  8219. c.urlParams_.Set("prettyPrint", "false")
  8220. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/messages")
  8221. urls += "?" + c.urlParams_.Encode()
  8222. req, err := http.NewRequest("GET", urls, body)
  8223. if err != nil {
  8224. return nil, err
  8225. }
  8226. req.Header = reqHeaders
  8227. googleapi.Expand(req.URL, map[string]string{
  8228. "projectId": c.projectId,
  8229. "jobId": c.jobId,
  8230. })
  8231. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8232. }
  8233. // Do executes the "dataflow.projects.jobs.messages.list" call.
  8234. // Exactly one of *ListJobMessagesResponse or error will be non-nil. Any
  8235. // non-2xx status code is an error. Response headers are in either
  8236. // *ListJobMessagesResponse.ServerResponse.Header or (if a response was
  8237. // returned at all) in error.(*googleapi.Error).Header. Use
  8238. // googleapi.IsNotModified to check whether the returned error was
  8239. // because http.StatusNotModified was returned.
  8240. func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) {
  8241. gensupport.SetOptions(c.urlParams_, opts...)
  8242. res, err := c.doRequest("json")
  8243. if res != nil && res.StatusCode == http.StatusNotModified {
  8244. if res.Body != nil {
  8245. res.Body.Close()
  8246. }
  8247. return nil, &googleapi.Error{
  8248. Code: res.StatusCode,
  8249. Header: res.Header,
  8250. }
  8251. }
  8252. if err != nil {
  8253. return nil, err
  8254. }
  8255. defer googleapi.CloseBody(res)
  8256. if err := googleapi.CheckResponse(res); err != nil {
  8257. return nil, err
  8258. }
  8259. ret := &ListJobMessagesResponse{
  8260. ServerResponse: googleapi.ServerResponse{
  8261. Header: res.Header,
  8262. HTTPStatusCode: res.StatusCode,
  8263. },
  8264. }
  8265. target := &ret
  8266. if err := gensupport.DecodeResponse(target, res); err != nil {
  8267. return nil, err
  8268. }
  8269. return ret, nil
  8270. // {
  8271. // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.",
  8272. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages",
  8273. // "httpMethod": "GET",
  8274. // "id": "dataflow.projects.jobs.messages.list",
  8275. // "parameterOrder": [
  8276. // "projectId",
  8277. // "jobId"
  8278. // ],
  8279. // "parameters": {
  8280. // "endTime": {
  8281. // "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).",
  8282. // "format": "google-datetime",
  8283. // "location": "query",
  8284. // "type": "string"
  8285. // },
  8286. // "jobId": {
  8287. // "description": "The job to get messages about.",
  8288. // "location": "path",
  8289. // "required": true,
  8290. // "type": "string"
  8291. // },
  8292. // "location": {
  8293. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.",
  8294. // "location": "query",
  8295. // "type": "string"
  8296. // },
  8297. // "minimumImportance": {
  8298. // "description": "Filter to only get messages with importance \u003e= level",
  8299. // "enum": [
  8300. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN",
  8301. // "JOB_MESSAGE_DEBUG",
  8302. // "JOB_MESSAGE_DETAILED",
  8303. // "JOB_MESSAGE_BASIC",
  8304. // "JOB_MESSAGE_WARNING",
  8305. // "JOB_MESSAGE_ERROR"
  8306. // ],
  8307. // "location": "query",
  8308. // "type": "string"
  8309. // },
  8310. // "pageSize": {
  8311. // "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.",
  8312. // "format": "int32",
  8313. // "location": "query",
  8314. // "type": "integer"
  8315. // },
  8316. // "pageToken": {
  8317. // "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.",
  8318. // "location": "query",
  8319. // "type": "string"
  8320. // },
  8321. // "projectId": {
  8322. // "description": "A project id.",
  8323. // "location": "path",
  8324. // "required": true,
  8325. // "type": "string"
  8326. // },
  8327. // "startTime": {
  8328. // "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).",
  8329. // "format": "google-datetime",
  8330. // "location": "query",
  8331. // "type": "string"
  8332. // }
  8333. // },
  8334. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages",
  8335. // "response": {
  8336. // "$ref": "ListJobMessagesResponse"
  8337. // },
  8338. // "scopes": [
  8339. // "https://www.googleapis.com/auth/cloud-platform",
  8340. // "https://www.googleapis.com/auth/compute",
  8341. // "https://www.googleapis.com/auth/compute.readonly",
  8342. // "https://www.googleapis.com/auth/userinfo.email"
  8343. // ]
  8344. // }
  8345. }
  8346. // Pages invokes f for each page of results.
  8347. // A non-nil error returned from f will halt the iteration.
  8348. // The provided context supersedes any context provided to the Context method.
  8349. func (c *ProjectsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error {
  8350. c.ctx_ = ctx
  8351. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8352. for {
  8353. x, err := c.Do()
  8354. if err != nil {
  8355. return err
  8356. }
  8357. if err := f(x); err != nil {
  8358. return err
  8359. }
  8360. if x.NextPageToken == "" {
  8361. return nil
  8362. }
  8363. c.PageToken(x.NextPageToken)
  8364. }
  8365. }
  8366. // method id "dataflow.projects.jobs.workItems.lease":
  8367. type ProjectsJobsWorkItemsLeaseCall struct {
  8368. s *Service
  8369. projectId string
  8370. jobId string
  8371. leaseworkitemrequest *LeaseWorkItemRequest
  8372. urlParams_ gensupport.URLParams
  8373. ctx_ context.Context
  8374. header_ http.Header
  8375. }
  8376. // Lease: Leases a dataflow WorkItem to run.
  8377. func (r *ProjectsJobsWorkItemsService) Lease(projectId string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsJobsWorkItemsLeaseCall {
  8378. c := &ProjectsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8379. c.projectId = projectId
  8380. c.jobId = jobId
  8381. c.leaseworkitemrequest = leaseworkitemrequest
  8382. return c
  8383. }
  8384. // Fields allows partial responses to be retrieved. See
  8385. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8386. // for more information.
  8387. func (c *ProjectsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsLeaseCall {
  8388. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8389. return c
  8390. }
  8391. // Context sets the context to be used in this call's Do method. Any
  8392. // pending HTTP request will be aborted if the provided context is
  8393. // canceled.
  8394. func (c *ProjectsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsJobsWorkItemsLeaseCall {
  8395. c.ctx_ = ctx
  8396. return c
  8397. }
  8398. // Header returns an http.Header that can be modified by the caller to
  8399. // add HTTP headers to the request.
  8400. func (c *ProjectsJobsWorkItemsLeaseCall) Header() http.Header {
  8401. if c.header_ == nil {
  8402. c.header_ = make(http.Header)
  8403. }
  8404. return c.header_
  8405. }
  8406. func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) {
  8407. reqHeaders := make(http.Header)
  8408. for k, v := range c.header_ {
  8409. reqHeaders[k] = v
  8410. }
  8411. reqHeaders.Set("User-Agent", c.s.userAgent())
  8412. var body io.Reader = nil
  8413. body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest)
  8414. if err != nil {
  8415. return nil, err
  8416. }
  8417. reqHeaders.Set("Content-Type", "application/json")
  8418. c.urlParams_.Set("alt", alt)
  8419. c.urlParams_.Set("prettyPrint", "false")
  8420. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease")
  8421. urls += "?" + c.urlParams_.Encode()
  8422. req, err := http.NewRequest("POST", urls, body)
  8423. if err != nil {
  8424. return nil, err
  8425. }
  8426. req.Header = reqHeaders
  8427. googleapi.Expand(req.URL, map[string]string{
  8428. "projectId": c.projectId,
  8429. "jobId": c.jobId,
  8430. })
  8431. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8432. }
  8433. // Do executes the "dataflow.projects.jobs.workItems.lease" call.
  8434. // Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any
  8435. // non-2xx status code is an error. Response headers are in either
  8436. // *LeaseWorkItemResponse.ServerResponse.Header or (if a response was
  8437. // returned at all) in error.(*googleapi.Error).Header. Use
  8438. // googleapi.IsNotModified to check whether the returned error was
  8439. // because http.StatusNotModified was returned.
  8440. func (c *ProjectsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) {
  8441. gensupport.SetOptions(c.urlParams_, opts...)
  8442. res, err := c.doRequest("json")
  8443. if res != nil && res.StatusCode == http.StatusNotModified {
  8444. if res.Body != nil {
  8445. res.Body.Close()
  8446. }
  8447. return nil, &googleapi.Error{
  8448. Code: res.StatusCode,
  8449. Header: res.Header,
  8450. }
  8451. }
  8452. if err != nil {
  8453. return nil, err
  8454. }
  8455. defer googleapi.CloseBody(res)
  8456. if err := googleapi.CheckResponse(res); err != nil {
  8457. return nil, err
  8458. }
  8459. ret := &LeaseWorkItemResponse{
  8460. ServerResponse: googleapi.ServerResponse{
  8461. Header: res.Header,
  8462. HTTPStatusCode: res.StatusCode,
  8463. },
  8464. }
  8465. target := &ret
  8466. if err := gensupport.DecodeResponse(target, res); err != nil {
  8467. return nil, err
  8468. }
  8469. return ret, nil
  8470. // {
  8471. // "description": "Leases a dataflow WorkItem to run.",
  8472. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease",
  8473. // "httpMethod": "POST",
  8474. // "id": "dataflow.projects.jobs.workItems.lease",
  8475. // "parameterOrder": [
  8476. // "projectId",
  8477. // "jobId"
  8478. // ],
  8479. // "parameters": {
  8480. // "jobId": {
  8481. // "description": "Identifies the workflow job this worker belongs to.",
  8482. // "location": "path",
  8483. // "required": true,
  8484. // "type": "string"
  8485. // },
  8486. // "projectId": {
  8487. // "description": "Identifies the project this worker belongs to.",
  8488. // "location": "path",
  8489. // "required": true,
  8490. // "type": "string"
  8491. // }
  8492. // },
  8493. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease",
  8494. // "request": {
  8495. // "$ref": "LeaseWorkItemRequest"
  8496. // },
  8497. // "response": {
  8498. // "$ref": "LeaseWorkItemResponse"
  8499. // },
  8500. // "scopes": [
  8501. // "https://www.googleapis.com/auth/cloud-platform",
  8502. // "https://www.googleapis.com/auth/compute",
  8503. // "https://www.googleapis.com/auth/compute.readonly",
  8504. // "https://www.googleapis.com/auth/userinfo.email"
  8505. // ]
  8506. // }
  8507. }
  8508. // method id "dataflow.projects.jobs.workItems.reportStatus":
  8509. type ProjectsJobsWorkItemsReportStatusCall struct {
  8510. s *Service
  8511. projectId string
  8512. jobId string
  8513. reportworkitemstatusrequest *ReportWorkItemStatusRequest
  8514. urlParams_ gensupport.URLParams
  8515. ctx_ context.Context
  8516. header_ http.Header
  8517. }
  8518. // ReportStatus: Reports the status of dataflow WorkItems leased by a
  8519. // worker.
  8520. func (r *ProjectsJobsWorkItemsService) ReportStatus(projectId string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsJobsWorkItemsReportStatusCall {
  8521. c := &ProjectsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8522. c.projectId = projectId
  8523. c.jobId = jobId
  8524. c.reportworkitemstatusrequest = reportworkitemstatusrequest
  8525. return c
  8526. }
  8527. // Fields allows partial responses to be retrieved. See
  8528. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8529. // for more information.
  8530. func (c *ProjectsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsReportStatusCall {
  8531. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8532. return c
  8533. }
  8534. // Context sets the context to be used in this call's Do method. Any
  8535. // pending HTTP request will be aborted if the provided context is
  8536. // canceled.
  8537. func (c *ProjectsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsJobsWorkItemsReportStatusCall {
  8538. c.ctx_ = ctx
  8539. return c
  8540. }
  8541. // Header returns an http.Header that can be modified by the caller to
  8542. // add HTTP headers to the request.
  8543. func (c *ProjectsJobsWorkItemsReportStatusCall) Header() http.Header {
  8544. if c.header_ == nil {
  8545. c.header_ = make(http.Header)
  8546. }
  8547. return c.header_
  8548. }
  8549. func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) {
  8550. reqHeaders := make(http.Header)
  8551. for k, v := range c.header_ {
  8552. reqHeaders[k] = v
  8553. }
  8554. reqHeaders.Set("User-Agent", c.s.userAgent())
  8555. var body io.Reader = nil
  8556. body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest)
  8557. if err != nil {
  8558. return nil, err
  8559. }
  8560. reqHeaders.Set("Content-Type", "application/json")
  8561. c.urlParams_.Set("alt", alt)
  8562. c.urlParams_.Set("prettyPrint", "false")
  8563. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus")
  8564. urls += "?" + c.urlParams_.Encode()
  8565. req, err := http.NewRequest("POST", urls, body)
  8566. if err != nil {
  8567. return nil, err
  8568. }
  8569. req.Header = reqHeaders
  8570. googleapi.Expand(req.URL, map[string]string{
  8571. "projectId": c.projectId,
  8572. "jobId": c.jobId,
  8573. })
  8574. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8575. }
  8576. // Do executes the "dataflow.projects.jobs.workItems.reportStatus" call.
  8577. // Exactly one of *ReportWorkItemStatusResponse or error will be
  8578. // non-nil. Any non-2xx status code is an error. Response headers are in
  8579. // either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a
  8580. // response was returned at all) in error.(*googleapi.Error).Header. Use
  8581. // googleapi.IsNotModified to check whether the returned error was
  8582. // because http.StatusNotModified was returned.
  8583. func (c *ProjectsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) {
  8584. gensupport.SetOptions(c.urlParams_, opts...)
  8585. res, err := c.doRequest("json")
  8586. if res != nil && res.StatusCode == http.StatusNotModified {
  8587. if res.Body != nil {
  8588. res.Body.Close()
  8589. }
  8590. return nil, &googleapi.Error{
  8591. Code: res.StatusCode,
  8592. Header: res.Header,
  8593. }
  8594. }
  8595. if err != nil {
  8596. return nil, err
  8597. }
  8598. defer googleapi.CloseBody(res)
  8599. if err := googleapi.CheckResponse(res); err != nil {
  8600. return nil, err
  8601. }
  8602. ret := &ReportWorkItemStatusResponse{
  8603. ServerResponse: googleapi.ServerResponse{
  8604. Header: res.Header,
  8605. HTTPStatusCode: res.StatusCode,
  8606. },
  8607. }
  8608. target := &ret
  8609. if err := gensupport.DecodeResponse(target, res); err != nil {
  8610. return nil, err
  8611. }
  8612. return ret, nil
  8613. // {
  8614. // "description": "Reports the status of dataflow WorkItems leased by a worker.",
  8615. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus",
  8616. // "httpMethod": "POST",
  8617. // "id": "dataflow.projects.jobs.workItems.reportStatus",
  8618. // "parameterOrder": [
  8619. // "projectId",
  8620. // "jobId"
  8621. // ],
  8622. // "parameters": {
  8623. // "jobId": {
  8624. // "description": "The job which the WorkItem is part of.",
  8625. // "location": "path",
  8626. // "required": true,
  8627. // "type": "string"
  8628. // },
  8629. // "projectId": {
  8630. // "description": "The project which owns the WorkItem's job.",
  8631. // "location": "path",
  8632. // "required": true,
  8633. // "type": "string"
  8634. // }
  8635. // },
  8636. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus",
  8637. // "request": {
  8638. // "$ref": "ReportWorkItemStatusRequest"
  8639. // },
  8640. // "response": {
  8641. // "$ref": "ReportWorkItemStatusResponse"
  8642. // },
  8643. // "scopes": [
  8644. // "https://www.googleapis.com/auth/cloud-platform",
  8645. // "https://www.googleapis.com/auth/compute",
  8646. // "https://www.googleapis.com/auth/compute.readonly",
  8647. // "https://www.googleapis.com/auth/userinfo.email"
  8648. // ]
  8649. // }
  8650. }
  8651. // method id "dataflow.projects.locations.workerMessages":
  8652. type ProjectsLocationsWorkerMessagesCall struct {
  8653. s *Service
  8654. projectId string
  8655. location string
  8656. sendworkermessagesrequest *SendWorkerMessagesRequest
  8657. urlParams_ gensupport.URLParams
  8658. ctx_ context.Context
  8659. header_ http.Header
  8660. }
  8661. // WorkerMessages: Send a worker_message to the service.
  8662. func (r *ProjectsLocationsService) WorkerMessages(projectId string, location string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsLocationsWorkerMessagesCall {
  8663. c := &ProjectsLocationsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8664. c.projectId = projectId
  8665. c.location = location
  8666. c.sendworkermessagesrequest = sendworkermessagesrequest
  8667. return c
  8668. }
  8669. // Fields allows partial responses to be retrieved. See
  8670. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8671. // for more information.
  8672. func (c *ProjectsLocationsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerMessagesCall {
  8673. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8674. return c
  8675. }
  8676. // Context sets the context to be used in this call's Do method. Any
  8677. // pending HTTP request will be aborted if the provided context is
  8678. // canceled.
  8679. func (c *ProjectsLocationsWorkerMessagesCall) Context(ctx context.Context) *ProjectsLocationsWorkerMessagesCall {
  8680. c.ctx_ = ctx
  8681. return c
  8682. }
  8683. // Header returns an http.Header that can be modified by the caller to
  8684. // add HTTP headers to the request.
  8685. func (c *ProjectsLocationsWorkerMessagesCall) Header() http.Header {
  8686. if c.header_ == nil {
  8687. c.header_ = make(http.Header)
  8688. }
  8689. return c.header_
  8690. }
  8691. func (c *ProjectsLocationsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) {
  8692. reqHeaders := make(http.Header)
  8693. for k, v := range c.header_ {
  8694. reqHeaders[k] = v
  8695. }
  8696. reqHeaders.Set("User-Agent", c.s.userAgent())
  8697. var body io.Reader = nil
  8698. body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest)
  8699. if err != nil {
  8700. return nil, err
  8701. }
  8702. reqHeaders.Set("Content-Type", "application/json")
  8703. c.urlParams_.Set("alt", alt)
  8704. c.urlParams_.Set("prettyPrint", "false")
  8705. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/WorkerMessages")
  8706. urls += "?" + c.urlParams_.Encode()
  8707. req, err := http.NewRequest("POST", urls, body)
  8708. if err != nil {
  8709. return nil, err
  8710. }
  8711. req.Header = reqHeaders
  8712. googleapi.Expand(req.URL, map[string]string{
  8713. "projectId": c.projectId,
  8714. "location": c.location,
  8715. })
  8716. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8717. }
  8718. // Do executes the "dataflow.projects.locations.workerMessages" call.
  8719. // Exactly one of *SendWorkerMessagesResponse or error will be non-nil.
  8720. // Any non-2xx status code is an error. Response headers are in either
  8721. // *SendWorkerMessagesResponse.ServerResponse.Header or (if a response
  8722. // was returned at all) in error.(*googleapi.Error).Header. Use
  8723. // googleapi.IsNotModified to check whether the returned error was
  8724. // because http.StatusNotModified was returned.
  8725. func (c *ProjectsLocationsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) {
  8726. gensupport.SetOptions(c.urlParams_, opts...)
  8727. res, err := c.doRequest("json")
  8728. if res != nil && res.StatusCode == http.StatusNotModified {
  8729. if res.Body != nil {
  8730. res.Body.Close()
  8731. }
  8732. return nil, &googleapi.Error{
  8733. Code: res.StatusCode,
  8734. Header: res.Header,
  8735. }
  8736. }
  8737. if err != nil {
  8738. return nil, err
  8739. }
  8740. defer googleapi.CloseBody(res)
  8741. if err := googleapi.CheckResponse(res); err != nil {
  8742. return nil, err
  8743. }
  8744. ret := &SendWorkerMessagesResponse{
  8745. ServerResponse: googleapi.ServerResponse{
  8746. Header: res.Header,
  8747. HTTPStatusCode: res.StatusCode,
  8748. },
  8749. }
  8750. target := &ret
  8751. if err := gensupport.DecodeResponse(target, res); err != nil {
  8752. return nil, err
  8753. }
  8754. return ret, nil
  8755. // {
  8756. // "description": "Send a worker_message to the service.",
  8757. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages",
  8758. // "httpMethod": "POST",
  8759. // "id": "dataflow.projects.locations.workerMessages",
  8760. // "parameterOrder": [
  8761. // "projectId",
  8762. // "location"
  8763. // ],
  8764. // "parameters": {
  8765. // "location": {
  8766. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job.",
  8767. // "location": "path",
  8768. // "required": true,
  8769. // "type": "string"
  8770. // },
  8771. // "projectId": {
  8772. // "description": "The project to send the WorkerMessages to.",
  8773. // "location": "path",
  8774. // "required": true,
  8775. // "type": "string"
  8776. // }
  8777. // },
  8778. // "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages",
  8779. // "request": {
  8780. // "$ref": "SendWorkerMessagesRequest"
  8781. // },
  8782. // "response": {
  8783. // "$ref": "SendWorkerMessagesResponse"
  8784. // },
  8785. // "scopes": [
  8786. // "https://www.googleapis.com/auth/cloud-platform",
  8787. // "https://www.googleapis.com/auth/compute",
  8788. // "https://www.googleapis.com/auth/compute.readonly",
  8789. // "https://www.googleapis.com/auth/userinfo.email"
  8790. // ]
  8791. // }
  8792. }
  8793. // method id "dataflow.projects.locations.jobs.create":
  8794. type ProjectsLocationsJobsCreateCall struct {
  8795. s *Service
  8796. projectId string
  8797. location string
  8798. job *Job
  8799. urlParams_ gensupport.URLParams
  8800. ctx_ context.Context
  8801. header_ http.Header
  8802. }
  8803. // Create: Creates a Cloud Dataflow job.
  8804. //
  8805. // To create a job, we recommend using `projects.locations.jobs.create`
  8806. // with a
  8807. // [regional
  8808. // endpoint]
  8809. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  8810. // dpoints). Using
  8811. // `projects.jobs.create` is not recommended, as your job will always
  8812. // start
  8813. // in `us-central1`.
  8814. func (r *ProjectsLocationsJobsService) Create(projectId string, location string, job *Job) *ProjectsLocationsJobsCreateCall {
  8815. c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8816. c.projectId = projectId
  8817. c.location = location
  8818. c.job = job
  8819. return c
  8820. }
  8821. // ReplaceJobId sets the optional parameter "replaceJobId": Deprecated.
  8822. // This field is now in the Job message.
  8823. func (c *ProjectsLocationsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsLocationsJobsCreateCall {
  8824. c.urlParams_.Set("replaceJobId", replaceJobId)
  8825. return c
  8826. }
  8827. // View sets the optional parameter "view": The level of information
  8828. // requested in response.
  8829. //
  8830. // Possible values:
  8831. // "JOB_VIEW_UNKNOWN"
  8832. // "JOB_VIEW_SUMMARY"
  8833. // "JOB_VIEW_ALL"
  8834. // "JOB_VIEW_DESCRIPTION"
  8835. func (c *ProjectsLocationsJobsCreateCall) View(view string) *ProjectsLocationsJobsCreateCall {
  8836. c.urlParams_.Set("view", view)
  8837. return c
  8838. }
  8839. // Fields allows partial responses to be retrieved. See
  8840. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8841. // for more information.
  8842. func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall {
  8843. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8844. return c
  8845. }
  8846. // Context sets the context to be used in this call's Do method. Any
  8847. // pending HTTP request will be aborted if the provided context is
  8848. // canceled.
  8849. func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall {
  8850. c.ctx_ = ctx
  8851. return c
  8852. }
  8853. // Header returns an http.Header that can be modified by the caller to
  8854. // add HTTP headers to the request.
  8855. func (c *ProjectsLocationsJobsCreateCall) Header() http.Header {
  8856. if c.header_ == nil {
  8857. c.header_ = make(http.Header)
  8858. }
  8859. return c.header_
  8860. }
  8861. func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  8862. reqHeaders := make(http.Header)
  8863. for k, v := range c.header_ {
  8864. reqHeaders[k] = v
  8865. }
  8866. reqHeaders.Set("User-Agent", c.s.userAgent())
  8867. var body io.Reader = nil
  8868. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  8869. if err != nil {
  8870. return nil, err
  8871. }
  8872. reqHeaders.Set("Content-Type", "application/json")
  8873. c.urlParams_.Set("alt", alt)
  8874. c.urlParams_.Set("prettyPrint", "false")
  8875. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs")
  8876. urls += "?" + c.urlParams_.Encode()
  8877. req, err := http.NewRequest("POST", urls, body)
  8878. if err != nil {
  8879. return nil, err
  8880. }
  8881. req.Header = reqHeaders
  8882. googleapi.Expand(req.URL, map[string]string{
  8883. "projectId": c.projectId,
  8884. "location": c.location,
  8885. })
  8886. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8887. }
  8888. // Do executes the "dataflow.projects.locations.jobs.create" call.
  8889. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  8890. // is an error. Response headers are in either
  8891. // *Job.ServerResponse.Header or (if a response was returned at all) in
  8892. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8893. // whether the returned error was because http.StatusNotModified was
  8894. // returned.
  8895. func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  8896. gensupport.SetOptions(c.urlParams_, opts...)
  8897. res, err := c.doRequest("json")
  8898. if res != nil && res.StatusCode == http.StatusNotModified {
  8899. if res.Body != nil {
  8900. res.Body.Close()
  8901. }
  8902. return nil, &googleapi.Error{
  8903. Code: res.StatusCode,
  8904. Header: res.Header,
  8905. }
  8906. }
  8907. if err != nil {
  8908. return nil, err
  8909. }
  8910. defer googleapi.CloseBody(res)
  8911. if err := googleapi.CheckResponse(res); err != nil {
  8912. return nil, err
  8913. }
  8914. ret := &Job{
  8915. ServerResponse: googleapi.ServerResponse{
  8916. Header: res.Header,
  8917. HTTPStatusCode: res.StatusCode,
  8918. },
  8919. }
  8920. target := &ret
  8921. if err := gensupport.DecodeResponse(target, res); err != nil {
  8922. return nil, err
  8923. }
  8924. return ret, nil
  8925. // {
  8926. // "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.",
  8927. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs",
  8928. // "httpMethod": "POST",
  8929. // "id": "dataflow.projects.locations.jobs.create",
  8930. // "parameterOrder": [
  8931. // "projectId",
  8932. // "location"
  8933. // ],
  8934. // "parameters": {
  8935. // "location": {
  8936. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  8937. // "location": "path",
  8938. // "required": true,
  8939. // "type": "string"
  8940. // },
  8941. // "projectId": {
  8942. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  8943. // "location": "path",
  8944. // "required": true,
  8945. // "type": "string"
  8946. // },
  8947. // "replaceJobId": {
  8948. // "description": "Deprecated. This field is now in the Job message.",
  8949. // "location": "query",
  8950. // "type": "string"
  8951. // },
  8952. // "view": {
  8953. // "description": "The level of information requested in response.",
  8954. // "enum": [
  8955. // "JOB_VIEW_UNKNOWN",
  8956. // "JOB_VIEW_SUMMARY",
  8957. // "JOB_VIEW_ALL",
  8958. // "JOB_VIEW_DESCRIPTION"
  8959. // ],
  8960. // "location": "query",
  8961. // "type": "string"
  8962. // }
  8963. // },
  8964. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs",
  8965. // "request": {
  8966. // "$ref": "Job"
  8967. // },
  8968. // "response": {
  8969. // "$ref": "Job"
  8970. // },
  8971. // "scopes": [
  8972. // "https://www.googleapis.com/auth/cloud-platform",
  8973. // "https://www.googleapis.com/auth/compute",
  8974. // "https://www.googleapis.com/auth/compute.readonly",
  8975. // "https://www.googleapis.com/auth/userinfo.email"
  8976. // ]
  8977. // }
  8978. }
  8979. // method id "dataflow.projects.locations.jobs.get":
  8980. type ProjectsLocationsJobsGetCall struct {
  8981. s *Service
  8982. projectId string
  8983. location string
  8984. jobId string
  8985. urlParams_ gensupport.URLParams
  8986. ifNoneMatch_ string
  8987. ctx_ context.Context
  8988. header_ http.Header
  8989. }
  8990. // Get: Gets the state of the specified Cloud Dataflow job.
  8991. //
  8992. // To get the state of a job, we recommend using
  8993. // `projects.locations.jobs.get`
  8994. // with a [regional
  8995. // endpoint]
  8996. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  8997. // dpoints). Using
  8998. // `projects.jobs.get` is not recommended, as you can only get the state
  8999. // of
  9000. // jobs that are running in `us-central1`.
  9001. func (r *ProjectsLocationsJobsService) Get(projectId string, location string, jobId string) *ProjectsLocationsJobsGetCall {
  9002. c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9003. c.projectId = projectId
  9004. c.location = location
  9005. c.jobId = jobId
  9006. return c
  9007. }
  9008. // View sets the optional parameter "view": The level of information
  9009. // requested in response.
  9010. //
  9011. // Possible values:
  9012. // "JOB_VIEW_UNKNOWN"
  9013. // "JOB_VIEW_SUMMARY"
  9014. // "JOB_VIEW_ALL"
  9015. // "JOB_VIEW_DESCRIPTION"
  9016. func (c *ProjectsLocationsJobsGetCall) View(view string) *ProjectsLocationsJobsGetCall {
  9017. c.urlParams_.Set("view", view)
  9018. return c
  9019. }
  9020. // Fields allows partial responses to be retrieved. See
  9021. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9022. // for more information.
  9023. func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall {
  9024. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9025. return c
  9026. }
  9027. // IfNoneMatch sets the optional parameter which makes the operation
  9028. // fail if the object's ETag matches the given value. This is useful for
  9029. // getting updates only after the object has changed since the last
  9030. // request. Use googleapi.IsNotModified to check whether the response
  9031. // error from Do is the result of In-None-Match.
  9032. func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall {
  9033. c.ifNoneMatch_ = entityTag
  9034. return c
  9035. }
  9036. // Context sets the context to be used in this call's Do method. Any
  9037. // pending HTTP request will be aborted if the provided context is
  9038. // canceled.
  9039. func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall {
  9040. c.ctx_ = ctx
  9041. return c
  9042. }
  9043. // Header returns an http.Header that can be modified by the caller to
  9044. // add HTTP headers to the request.
  9045. func (c *ProjectsLocationsJobsGetCall) Header() http.Header {
  9046. if c.header_ == nil {
  9047. c.header_ = make(http.Header)
  9048. }
  9049. return c.header_
  9050. }
  9051. func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  9052. reqHeaders := make(http.Header)
  9053. for k, v := range c.header_ {
  9054. reqHeaders[k] = v
  9055. }
  9056. reqHeaders.Set("User-Agent", c.s.userAgent())
  9057. if c.ifNoneMatch_ != "" {
  9058. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9059. }
  9060. var body io.Reader = nil
  9061. c.urlParams_.Set("alt", alt)
  9062. c.urlParams_.Set("prettyPrint", "false")
  9063. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}")
  9064. urls += "?" + c.urlParams_.Encode()
  9065. req, err := http.NewRequest("GET", urls, body)
  9066. if err != nil {
  9067. return nil, err
  9068. }
  9069. req.Header = reqHeaders
  9070. googleapi.Expand(req.URL, map[string]string{
  9071. "projectId": c.projectId,
  9072. "location": c.location,
  9073. "jobId": c.jobId,
  9074. })
  9075. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9076. }
  9077. // Do executes the "dataflow.projects.locations.jobs.get" call.
  9078. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  9079. // is an error. Response headers are in either
  9080. // *Job.ServerResponse.Header or (if a response was returned at all) in
  9081. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9082. // whether the returned error was because http.StatusNotModified was
  9083. // returned.
  9084. func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  9085. gensupport.SetOptions(c.urlParams_, opts...)
  9086. res, err := c.doRequest("json")
  9087. if res != nil && res.StatusCode == http.StatusNotModified {
  9088. if res.Body != nil {
  9089. res.Body.Close()
  9090. }
  9091. return nil, &googleapi.Error{
  9092. Code: res.StatusCode,
  9093. Header: res.Header,
  9094. }
  9095. }
  9096. if err != nil {
  9097. return nil, err
  9098. }
  9099. defer googleapi.CloseBody(res)
  9100. if err := googleapi.CheckResponse(res); err != nil {
  9101. return nil, err
  9102. }
  9103. ret := &Job{
  9104. ServerResponse: googleapi.ServerResponse{
  9105. Header: res.Header,
  9106. HTTPStatusCode: res.StatusCode,
  9107. },
  9108. }
  9109. target := &ret
  9110. if err := gensupport.DecodeResponse(target, res); err != nil {
  9111. return nil, err
  9112. }
  9113. return ret, nil
  9114. // {
  9115. // "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.",
  9116. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  9117. // "httpMethod": "GET",
  9118. // "id": "dataflow.projects.locations.jobs.get",
  9119. // "parameterOrder": [
  9120. // "projectId",
  9121. // "location",
  9122. // "jobId"
  9123. // ],
  9124. // "parameters": {
  9125. // "jobId": {
  9126. // "description": "The job ID.",
  9127. // "location": "path",
  9128. // "required": true,
  9129. // "type": "string"
  9130. // },
  9131. // "location": {
  9132. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  9133. // "location": "path",
  9134. // "required": true,
  9135. // "type": "string"
  9136. // },
  9137. // "projectId": {
  9138. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  9139. // "location": "path",
  9140. // "required": true,
  9141. // "type": "string"
  9142. // },
  9143. // "view": {
  9144. // "description": "The level of information requested in response.",
  9145. // "enum": [
  9146. // "JOB_VIEW_UNKNOWN",
  9147. // "JOB_VIEW_SUMMARY",
  9148. // "JOB_VIEW_ALL",
  9149. // "JOB_VIEW_DESCRIPTION"
  9150. // ],
  9151. // "location": "query",
  9152. // "type": "string"
  9153. // }
  9154. // },
  9155. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  9156. // "response": {
  9157. // "$ref": "Job"
  9158. // },
  9159. // "scopes": [
  9160. // "https://www.googleapis.com/auth/cloud-platform",
  9161. // "https://www.googleapis.com/auth/compute",
  9162. // "https://www.googleapis.com/auth/compute.readonly",
  9163. // "https://www.googleapis.com/auth/userinfo.email"
  9164. // ]
  9165. // }
  9166. }
  9167. // method id "dataflow.projects.locations.jobs.getMetrics":
  9168. type ProjectsLocationsJobsGetMetricsCall struct {
  9169. s *Service
  9170. projectId string
  9171. location string
  9172. jobId string
  9173. urlParams_ gensupport.URLParams
  9174. ifNoneMatch_ string
  9175. ctx_ context.Context
  9176. header_ http.Header
  9177. }
  9178. // GetMetrics: Request the job status.
  9179. //
  9180. // To request the status of a job, we recommend
  9181. // using
  9182. // `projects.locations.jobs.getMetrics` with a [regional
  9183. // endpoint]
  9184. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  9185. // dpoints). Using
  9186. // `projects.jobs.getMetrics` is not recommended, as you can only
  9187. // request the
  9188. // status of jobs that are running in `us-central1`.
  9189. func (r *ProjectsLocationsJobsService) GetMetrics(projectId string, location string, jobId string) *ProjectsLocationsJobsGetMetricsCall {
  9190. c := &ProjectsLocationsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9191. c.projectId = projectId
  9192. c.location = location
  9193. c.jobId = jobId
  9194. return c
  9195. }
  9196. // StartTime sets the optional parameter "startTime": Return only metric
  9197. // data that has changed since this time.
  9198. // Default is to return all information about all metrics for the job.
  9199. func (c *ProjectsLocationsJobsGetMetricsCall) StartTime(startTime string) *ProjectsLocationsJobsGetMetricsCall {
  9200. c.urlParams_.Set("startTime", startTime)
  9201. return c
  9202. }
  9203. // Fields allows partial responses to be retrieved. See
  9204. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9205. // for more information.
  9206. func (c *ProjectsLocationsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetMetricsCall {
  9207. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9208. return c
  9209. }
  9210. // IfNoneMatch sets the optional parameter which makes the operation
  9211. // fail if the object's ETag matches the given value. This is useful for
  9212. // getting updates only after the object has changed since the last
  9213. // request. Use googleapi.IsNotModified to check whether the response
  9214. // error from Do is the result of In-None-Match.
  9215. func (c *ProjectsLocationsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetMetricsCall {
  9216. c.ifNoneMatch_ = entityTag
  9217. return c
  9218. }
  9219. // Context sets the context to be used in this call's Do method. Any
  9220. // pending HTTP request will be aborted if the provided context is
  9221. // canceled.
  9222. func (c *ProjectsLocationsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetMetricsCall {
  9223. c.ctx_ = ctx
  9224. return c
  9225. }
  9226. // Header returns an http.Header that can be modified by the caller to
  9227. // add HTTP headers to the request.
  9228. func (c *ProjectsLocationsJobsGetMetricsCall) Header() http.Header {
  9229. if c.header_ == nil {
  9230. c.header_ = make(http.Header)
  9231. }
  9232. return c.header_
  9233. }
  9234. func (c *ProjectsLocationsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) {
  9235. reqHeaders := make(http.Header)
  9236. for k, v := range c.header_ {
  9237. reqHeaders[k] = v
  9238. }
  9239. reqHeaders.Set("User-Agent", c.s.userAgent())
  9240. if c.ifNoneMatch_ != "" {
  9241. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9242. }
  9243. var body io.Reader = nil
  9244. c.urlParams_.Set("alt", alt)
  9245. c.urlParams_.Set("prettyPrint", "false")
  9246. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics")
  9247. urls += "?" + c.urlParams_.Encode()
  9248. req, err := http.NewRequest("GET", urls, body)
  9249. if err != nil {
  9250. return nil, err
  9251. }
  9252. req.Header = reqHeaders
  9253. googleapi.Expand(req.URL, map[string]string{
  9254. "projectId": c.projectId,
  9255. "location": c.location,
  9256. "jobId": c.jobId,
  9257. })
  9258. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9259. }
  9260. // Do executes the "dataflow.projects.locations.jobs.getMetrics" call.
  9261. // Exactly one of *JobMetrics or error will be non-nil. Any non-2xx
  9262. // status code is an error. Response headers are in either
  9263. // *JobMetrics.ServerResponse.Header or (if a response was returned at
  9264. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9265. // to check whether the returned error was because
  9266. // http.StatusNotModified was returned.
  9267. func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) {
  9268. gensupport.SetOptions(c.urlParams_, opts...)
  9269. res, err := c.doRequest("json")
  9270. if res != nil && res.StatusCode == http.StatusNotModified {
  9271. if res.Body != nil {
  9272. res.Body.Close()
  9273. }
  9274. return nil, &googleapi.Error{
  9275. Code: res.StatusCode,
  9276. Header: res.Header,
  9277. }
  9278. }
  9279. if err != nil {
  9280. return nil, err
  9281. }
  9282. defer googleapi.CloseBody(res)
  9283. if err := googleapi.CheckResponse(res); err != nil {
  9284. return nil, err
  9285. }
  9286. ret := &JobMetrics{
  9287. ServerResponse: googleapi.ServerResponse{
  9288. Header: res.Header,
  9289. HTTPStatusCode: res.StatusCode,
  9290. },
  9291. }
  9292. target := &ret
  9293. if err := gensupport.DecodeResponse(target, res); err != nil {
  9294. return nil, err
  9295. }
  9296. return ret, nil
  9297. // {
  9298. // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.",
  9299. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics",
  9300. // "httpMethod": "GET",
  9301. // "id": "dataflow.projects.locations.jobs.getMetrics",
  9302. // "parameterOrder": [
  9303. // "projectId",
  9304. // "location",
  9305. // "jobId"
  9306. // ],
  9307. // "parameters": {
  9308. // "jobId": {
  9309. // "description": "The job to get messages for.",
  9310. // "location": "path",
  9311. // "required": true,
  9312. // "type": "string"
  9313. // },
  9314. // "location": {
  9315. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.",
  9316. // "location": "path",
  9317. // "required": true,
  9318. // "type": "string"
  9319. // },
  9320. // "projectId": {
  9321. // "description": "A project id.",
  9322. // "location": "path",
  9323. // "required": true,
  9324. // "type": "string"
  9325. // },
  9326. // "startTime": {
  9327. // "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.",
  9328. // "format": "google-datetime",
  9329. // "location": "query",
  9330. // "type": "string"
  9331. // }
  9332. // },
  9333. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics",
  9334. // "response": {
  9335. // "$ref": "JobMetrics"
  9336. // },
  9337. // "scopes": [
  9338. // "https://www.googleapis.com/auth/cloud-platform",
  9339. // "https://www.googleapis.com/auth/compute",
  9340. // "https://www.googleapis.com/auth/compute.readonly",
  9341. // "https://www.googleapis.com/auth/userinfo.email"
  9342. // ]
  9343. // }
  9344. }
  9345. // method id "dataflow.projects.locations.jobs.list":
  9346. type ProjectsLocationsJobsListCall struct {
  9347. s *Service
  9348. projectId string
  9349. location string
  9350. urlParams_ gensupport.URLParams
  9351. ifNoneMatch_ string
  9352. ctx_ context.Context
  9353. header_ http.Header
  9354. }
  9355. // List: List the jobs of a project.
  9356. //
  9357. // To list the jobs of a project in a region, we recommend
  9358. // using
  9359. // `projects.locations.jobs.get` with a [regional
  9360. // endpoint]
  9361. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  9362. // dpoints). To
  9363. // list the all jobs across all regions, use `projects.jobs.aggregated`.
  9364. // Using
  9365. // `projects.jobs.list` is not recommended, as you can only get the list
  9366. // of
  9367. // jobs that are running in `us-central1`.
  9368. func (r *ProjectsLocationsJobsService) List(projectId string, location string) *ProjectsLocationsJobsListCall {
  9369. c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9370. c.projectId = projectId
  9371. c.location = location
  9372. return c
  9373. }
  9374. // Filter sets the optional parameter "filter": The kind of filter to
  9375. // use.
  9376. //
  9377. // Possible values:
  9378. // "UNKNOWN"
  9379. // "ALL"
  9380. // "TERMINATED"
  9381. // "ACTIVE"
  9382. func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall {
  9383. c.urlParams_.Set("filter", filter)
  9384. return c
  9385. }
  9386. // PageSize sets the optional parameter "pageSize": If there are many
  9387. // jobs, limit response to at most this many.
  9388. // The actual number of jobs returned will be the lesser of
  9389. // max_responses
  9390. // and an unspecified server-defined limit.
  9391. func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall {
  9392. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9393. return c
  9394. }
  9395. // PageToken sets the optional parameter "pageToken": Set this to the
  9396. // 'next_page_token' field of a previous response
  9397. // to request additional results in a long list.
  9398. func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall {
  9399. c.urlParams_.Set("pageToken", pageToken)
  9400. return c
  9401. }
  9402. // View sets the optional parameter "view": Level of information
  9403. // requested in response. Default is `JOB_VIEW_SUMMARY`.
  9404. //
  9405. // Possible values:
  9406. // "JOB_VIEW_UNKNOWN"
  9407. // "JOB_VIEW_SUMMARY"
  9408. // "JOB_VIEW_ALL"
  9409. // "JOB_VIEW_DESCRIPTION"
  9410. func (c *ProjectsLocationsJobsListCall) View(view string) *ProjectsLocationsJobsListCall {
  9411. c.urlParams_.Set("view", view)
  9412. return c
  9413. }
  9414. // Fields allows partial responses to be retrieved. See
  9415. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9416. // for more information.
  9417. func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall {
  9418. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9419. return c
  9420. }
  9421. // IfNoneMatch sets the optional parameter which makes the operation
  9422. // fail if the object's ETag matches the given value. This is useful for
  9423. // getting updates only after the object has changed since the last
  9424. // request. Use googleapi.IsNotModified to check whether the response
  9425. // error from Do is the result of In-None-Match.
  9426. func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall {
  9427. c.ifNoneMatch_ = entityTag
  9428. return c
  9429. }
  9430. // Context sets the context to be used in this call's Do method. Any
  9431. // pending HTTP request will be aborted if the provided context is
  9432. // canceled.
  9433. func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall {
  9434. c.ctx_ = ctx
  9435. return c
  9436. }
  9437. // Header returns an http.Header that can be modified by the caller to
  9438. // add HTTP headers to the request.
  9439. func (c *ProjectsLocationsJobsListCall) Header() http.Header {
  9440. if c.header_ == nil {
  9441. c.header_ = make(http.Header)
  9442. }
  9443. return c.header_
  9444. }
  9445. func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) {
  9446. reqHeaders := make(http.Header)
  9447. for k, v := range c.header_ {
  9448. reqHeaders[k] = v
  9449. }
  9450. reqHeaders.Set("User-Agent", c.s.userAgent())
  9451. if c.ifNoneMatch_ != "" {
  9452. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9453. }
  9454. var body io.Reader = nil
  9455. c.urlParams_.Set("alt", alt)
  9456. c.urlParams_.Set("prettyPrint", "false")
  9457. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs")
  9458. urls += "?" + c.urlParams_.Encode()
  9459. req, err := http.NewRequest("GET", urls, body)
  9460. if err != nil {
  9461. return nil, err
  9462. }
  9463. req.Header = reqHeaders
  9464. googleapi.Expand(req.URL, map[string]string{
  9465. "projectId": c.projectId,
  9466. "location": c.location,
  9467. })
  9468. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9469. }
  9470. // Do executes the "dataflow.projects.locations.jobs.list" call.
  9471. // Exactly one of *ListJobsResponse or error will be non-nil. Any
  9472. // non-2xx status code is an error. Response headers are in either
  9473. // *ListJobsResponse.ServerResponse.Header or (if a response was
  9474. // returned at all) in error.(*googleapi.Error).Header. Use
  9475. // googleapi.IsNotModified to check whether the returned error was
  9476. // because http.StatusNotModified was returned.
  9477. func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  9478. gensupport.SetOptions(c.urlParams_, opts...)
  9479. res, err := c.doRequest("json")
  9480. if res != nil && res.StatusCode == http.StatusNotModified {
  9481. if res.Body != nil {
  9482. res.Body.Close()
  9483. }
  9484. return nil, &googleapi.Error{
  9485. Code: res.StatusCode,
  9486. Header: res.Header,
  9487. }
  9488. }
  9489. if err != nil {
  9490. return nil, err
  9491. }
  9492. defer googleapi.CloseBody(res)
  9493. if err := googleapi.CheckResponse(res); err != nil {
  9494. return nil, err
  9495. }
  9496. ret := &ListJobsResponse{
  9497. ServerResponse: googleapi.ServerResponse{
  9498. Header: res.Header,
  9499. HTTPStatusCode: res.StatusCode,
  9500. },
  9501. }
  9502. target := &ret
  9503. if err := gensupport.DecodeResponse(target, res); err != nil {
  9504. return nil, err
  9505. }
  9506. return ret, nil
  9507. // {
  9508. // "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.",
  9509. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs",
  9510. // "httpMethod": "GET",
  9511. // "id": "dataflow.projects.locations.jobs.list",
  9512. // "parameterOrder": [
  9513. // "projectId",
  9514. // "location"
  9515. // ],
  9516. // "parameters": {
  9517. // "filter": {
  9518. // "description": "The kind of filter to use.",
  9519. // "enum": [
  9520. // "UNKNOWN",
  9521. // "ALL",
  9522. // "TERMINATED",
  9523. // "ACTIVE"
  9524. // ],
  9525. // "location": "query",
  9526. // "type": "string"
  9527. // },
  9528. // "location": {
  9529. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  9530. // "location": "path",
  9531. // "required": true,
  9532. // "type": "string"
  9533. // },
  9534. // "pageSize": {
  9535. // "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.",
  9536. // "format": "int32",
  9537. // "location": "query",
  9538. // "type": "integer"
  9539. // },
  9540. // "pageToken": {
  9541. // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.",
  9542. // "location": "query",
  9543. // "type": "string"
  9544. // },
  9545. // "projectId": {
  9546. // "description": "The project which owns the jobs.",
  9547. // "location": "path",
  9548. // "required": true,
  9549. // "type": "string"
  9550. // },
  9551. // "view": {
  9552. // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.",
  9553. // "enum": [
  9554. // "JOB_VIEW_UNKNOWN",
  9555. // "JOB_VIEW_SUMMARY",
  9556. // "JOB_VIEW_ALL",
  9557. // "JOB_VIEW_DESCRIPTION"
  9558. // ],
  9559. // "location": "query",
  9560. // "type": "string"
  9561. // }
  9562. // },
  9563. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs",
  9564. // "response": {
  9565. // "$ref": "ListJobsResponse"
  9566. // },
  9567. // "scopes": [
  9568. // "https://www.googleapis.com/auth/cloud-platform",
  9569. // "https://www.googleapis.com/auth/compute",
  9570. // "https://www.googleapis.com/auth/compute.readonly",
  9571. // "https://www.googleapis.com/auth/userinfo.email"
  9572. // ]
  9573. // }
  9574. }
  9575. // Pages invokes f for each page of results.
  9576. // A non-nil error returned from f will halt the iteration.
  9577. // The provided context supersedes any context provided to the Context method.
  9578. func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  9579. c.ctx_ = ctx
  9580. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9581. for {
  9582. x, err := c.Do()
  9583. if err != nil {
  9584. return err
  9585. }
  9586. if err := f(x); err != nil {
  9587. return err
  9588. }
  9589. if x.NextPageToken == "" {
  9590. return nil
  9591. }
  9592. c.PageToken(x.NextPageToken)
  9593. }
  9594. }
  9595. // method id "dataflow.projects.locations.jobs.snapshot":
  9596. type ProjectsLocationsJobsSnapshotCall struct {
  9597. s *Service
  9598. projectId string
  9599. location string
  9600. jobId string
  9601. snapshotjobrequest *SnapshotJobRequest
  9602. urlParams_ gensupport.URLParams
  9603. ctx_ context.Context
  9604. header_ http.Header
  9605. }
  9606. // Snapshot: Snapshot the state of a streaming job.
  9607. func (r *ProjectsLocationsJobsService) Snapshot(projectId string, location string, jobId string, snapshotjobrequest *SnapshotJobRequest) *ProjectsLocationsJobsSnapshotCall {
  9608. c := &ProjectsLocationsJobsSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9609. c.projectId = projectId
  9610. c.location = location
  9611. c.jobId = jobId
  9612. c.snapshotjobrequest = snapshotjobrequest
  9613. return c
  9614. }
  9615. // Fields allows partial responses to be retrieved. See
  9616. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9617. // for more information.
  9618. func (c *ProjectsLocationsJobsSnapshotCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsSnapshotCall {
  9619. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9620. return c
  9621. }
  9622. // Context sets the context to be used in this call's Do method. Any
  9623. // pending HTTP request will be aborted if the provided context is
  9624. // canceled.
  9625. func (c *ProjectsLocationsJobsSnapshotCall) Context(ctx context.Context) *ProjectsLocationsJobsSnapshotCall {
  9626. c.ctx_ = ctx
  9627. return c
  9628. }
  9629. // Header returns an http.Header that can be modified by the caller to
  9630. // add HTTP headers to the request.
  9631. func (c *ProjectsLocationsJobsSnapshotCall) Header() http.Header {
  9632. if c.header_ == nil {
  9633. c.header_ = make(http.Header)
  9634. }
  9635. return c.header_
  9636. }
  9637. func (c *ProjectsLocationsJobsSnapshotCall) doRequest(alt string) (*http.Response, error) {
  9638. reqHeaders := make(http.Header)
  9639. for k, v := range c.header_ {
  9640. reqHeaders[k] = v
  9641. }
  9642. reqHeaders.Set("User-Agent", c.s.userAgent())
  9643. var body io.Reader = nil
  9644. body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotjobrequest)
  9645. if err != nil {
  9646. return nil, err
  9647. }
  9648. reqHeaders.Set("Content-Type", "application/json")
  9649. c.urlParams_.Set("alt", alt)
  9650. c.urlParams_.Set("prettyPrint", "false")
  9651. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot")
  9652. urls += "?" + c.urlParams_.Encode()
  9653. req, err := http.NewRequest("POST", urls, body)
  9654. if err != nil {
  9655. return nil, err
  9656. }
  9657. req.Header = reqHeaders
  9658. googleapi.Expand(req.URL, map[string]string{
  9659. "projectId": c.projectId,
  9660. "location": c.location,
  9661. "jobId": c.jobId,
  9662. })
  9663. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9664. }
  9665. // Do executes the "dataflow.projects.locations.jobs.snapshot" call.
  9666. // Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
  9667. // code is an error. Response headers are in either
  9668. // *Snapshot.ServerResponse.Header or (if a response was returned at
  9669. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9670. // to check whether the returned error was because
  9671. // http.StatusNotModified was returned.
  9672. func (c *ProjectsLocationsJobsSnapshotCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
  9673. gensupport.SetOptions(c.urlParams_, opts...)
  9674. res, err := c.doRequest("json")
  9675. if res != nil && res.StatusCode == http.StatusNotModified {
  9676. if res.Body != nil {
  9677. res.Body.Close()
  9678. }
  9679. return nil, &googleapi.Error{
  9680. Code: res.StatusCode,
  9681. Header: res.Header,
  9682. }
  9683. }
  9684. if err != nil {
  9685. return nil, err
  9686. }
  9687. defer googleapi.CloseBody(res)
  9688. if err := googleapi.CheckResponse(res); err != nil {
  9689. return nil, err
  9690. }
  9691. ret := &Snapshot{
  9692. ServerResponse: googleapi.ServerResponse{
  9693. Header: res.Header,
  9694. HTTPStatusCode: res.StatusCode,
  9695. },
  9696. }
  9697. target := &ret
  9698. if err := gensupport.DecodeResponse(target, res); err != nil {
  9699. return nil, err
  9700. }
  9701. return ret, nil
  9702. // {
  9703. // "description": "Snapshot the state of a streaming job.",
  9704. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot",
  9705. // "httpMethod": "POST",
  9706. // "id": "dataflow.projects.locations.jobs.snapshot",
  9707. // "parameterOrder": [
  9708. // "projectId",
  9709. // "location",
  9710. // "jobId"
  9711. // ],
  9712. // "parameters": {
  9713. // "jobId": {
  9714. // "description": "The job to be snapshotted.",
  9715. // "location": "path",
  9716. // "required": true,
  9717. // "type": "string"
  9718. // },
  9719. // "location": {
  9720. // "description": "The location that contains this job.",
  9721. // "location": "path",
  9722. // "required": true,
  9723. // "type": "string"
  9724. // },
  9725. // "projectId": {
  9726. // "description": "The project which owns the job to be snapshotted.",
  9727. // "location": "path",
  9728. // "required": true,
  9729. // "type": "string"
  9730. // }
  9731. // },
  9732. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot",
  9733. // "request": {
  9734. // "$ref": "SnapshotJobRequest"
  9735. // },
  9736. // "response": {
  9737. // "$ref": "Snapshot"
  9738. // },
  9739. // "scopes": [
  9740. // "https://www.googleapis.com/auth/cloud-platform",
  9741. // "https://www.googleapis.com/auth/compute",
  9742. // "https://www.googleapis.com/auth/compute.readonly",
  9743. // "https://www.googleapis.com/auth/userinfo.email"
  9744. // ]
  9745. // }
  9746. }
  9747. // method id "dataflow.projects.locations.jobs.update":
  9748. type ProjectsLocationsJobsUpdateCall struct {
  9749. s *Service
  9750. projectId string
  9751. location string
  9752. jobId string
  9753. job *Job
  9754. urlParams_ gensupport.URLParams
  9755. ctx_ context.Context
  9756. header_ http.Header
  9757. }
  9758. // Update: Updates the state of an existing Cloud Dataflow job.
  9759. //
  9760. // To update the state of an existing job, we recommend
  9761. // using
  9762. // `projects.locations.jobs.update` with a [regional
  9763. // endpoint]
  9764. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  9765. // dpoints). Using
  9766. // `projects.jobs.update` is not recommended, as you can only update the
  9767. // state
  9768. // of jobs that are running in `us-central1`.
  9769. func (r *ProjectsLocationsJobsService) Update(projectId string, location string, jobId string, job *Job) *ProjectsLocationsJobsUpdateCall {
  9770. c := &ProjectsLocationsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9771. c.projectId = projectId
  9772. c.location = location
  9773. c.jobId = jobId
  9774. c.job = job
  9775. return c
  9776. }
  9777. // Fields allows partial responses to be retrieved. See
  9778. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9779. // for more information.
  9780. func (c *ProjectsLocationsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsUpdateCall {
  9781. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9782. return c
  9783. }
  9784. // Context sets the context to be used in this call's Do method. Any
  9785. // pending HTTP request will be aborted if the provided context is
  9786. // canceled.
  9787. func (c *ProjectsLocationsJobsUpdateCall) Context(ctx context.Context) *ProjectsLocationsJobsUpdateCall {
  9788. c.ctx_ = ctx
  9789. return c
  9790. }
  9791. // Header returns an http.Header that can be modified by the caller to
  9792. // add HTTP headers to the request.
  9793. func (c *ProjectsLocationsJobsUpdateCall) Header() http.Header {
  9794. if c.header_ == nil {
  9795. c.header_ = make(http.Header)
  9796. }
  9797. return c.header_
  9798. }
  9799. func (c *ProjectsLocationsJobsUpdateCall) doRequest(alt string) (*http.Response, error) {
  9800. reqHeaders := make(http.Header)
  9801. for k, v := range c.header_ {
  9802. reqHeaders[k] = v
  9803. }
  9804. reqHeaders.Set("User-Agent", c.s.userAgent())
  9805. var body io.Reader = nil
  9806. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  9807. if err != nil {
  9808. return nil, err
  9809. }
  9810. reqHeaders.Set("Content-Type", "application/json")
  9811. c.urlParams_.Set("alt", alt)
  9812. c.urlParams_.Set("prettyPrint", "false")
  9813. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}")
  9814. urls += "?" + c.urlParams_.Encode()
  9815. req, err := http.NewRequest("PUT", urls, body)
  9816. if err != nil {
  9817. return nil, err
  9818. }
  9819. req.Header = reqHeaders
  9820. googleapi.Expand(req.URL, map[string]string{
  9821. "projectId": c.projectId,
  9822. "location": c.location,
  9823. "jobId": c.jobId,
  9824. })
  9825. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9826. }
  9827. // Do executes the "dataflow.projects.locations.jobs.update" call.
  9828. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  9829. // is an error. Response headers are in either
  9830. // *Job.ServerResponse.Header or (if a response was returned at all) in
  9831. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9832. // whether the returned error was because http.StatusNotModified was
  9833. // returned.
  9834. func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  9835. gensupport.SetOptions(c.urlParams_, opts...)
  9836. res, err := c.doRequest("json")
  9837. if res != nil && res.StatusCode == http.StatusNotModified {
  9838. if res.Body != nil {
  9839. res.Body.Close()
  9840. }
  9841. return nil, &googleapi.Error{
  9842. Code: res.StatusCode,
  9843. Header: res.Header,
  9844. }
  9845. }
  9846. if err != nil {
  9847. return nil, err
  9848. }
  9849. defer googleapi.CloseBody(res)
  9850. if err := googleapi.CheckResponse(res); err != nil {
  9851. return nil, err
  9852. }
  9853. ret := &Job{
  9854. ServerResponse: googleapi.ServerResponse{
  9855. Header: res.Header,
  9856. HTTPStatusCode: res.StatusCode,
  9857. },
  9858. }
  9859. target := &ret
  9860. if err := gensupport.DecodeResponse(target, res); err != nil {
  9861. return nil, err
  9862. }
  9863. return ret, nil
  9864. // {
  9865. // "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.",
  9866. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  9867. // "httpMethod": "PUT",
  9868. // "id": "dataflow.projects.locations.jobs.update",
  9869. // "parameterOrder": [
  9870. // "projectId",
  9871. // "location",
  9872. // "jobId"
  9873. // ],
  9874. // "parameters": {
  9875. // "jobId": {
  9876. // "description": "The job ID.",
  9877. // "location": "path",
  9878. // "required": true,
  9879. // "type": "string"
  9880. // },
  9881. // "location": {
  9882. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.",
  9883. // "location": "path",
  9884. // "required": true,
  9885. // "type": "string"
  9886. // },
  9887. // "projectId": {
  9888. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  9889. // "location": "path",
  9890. // "required": true,
  9891. // "type": "string"
  9892. // }
  9893. // },
  9894. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  9895. // "request": {
  9896. // "$ref": "Job"
  9897. // },
  9898. // "response": {
  9899. // "$ref": "Job"
  9900. // },
  9901. // "scopes": [
  9902. // "https://www.googleapis.com/auth/cloud-platform",
  9903. // "https://www.googleapis.com/auth/compute",
  9904. // "https://www.googleapis.com/auth/compute.readonly",
  9905. // "https://www.googleapis.com/auth/userinfo.email"
  9906. // ]
  9907. // }
  9908. }
  9909. // method id "dataflow.projects.locations.jobs.debug.getConfig":
  9910. type ProjectsLocationsJobsDebugGetConfigCall struct {
  9911. s *Service
  9912. projectId string
  9913. location string
  9914. jobId string
  9915. getdebugconfigrequest *GetDebugConfigRequest
  9916. urlParams_ gensupport.URLParams
  9917. ctx_ context.Context
  9918. header_ http.Header
  9919. }
  9920. // GetConfig: Get encoded debug configuration for component. Not
  9921. // cacheable.
  9922. func (r *ProjectsLocationsJobsDebugService) GetConfig(projectId string, location string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsLocationsJobsDebugGetConfigCall {
  9923. c := &ProjectsLocationsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9924. c.projectId = projectId
  9925. c.location = location
  9926. c.jobId = jobId
  9927. c.getdebugconfigrequest = getdebugconfigrequest
  9928. return c
  9929. }
  9930. // Fields allows partial responses to be retrieved. See
  9931. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9932. // for more information.
  9933. func (c *ProjectsLocationsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugGetConfigCall {
  9934. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9935. return c
  9936. }
  9937. // Context sets the context to be used in this call's Do method. Any
  9938. // pending HTTP request will be aborted if the provided context is
  9939. // canceled.
  9940. func (c *ProjectsLocationsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugGetConfigCall {
  9941. c.ctx_ = ctx
  9942. return c
  9943. }
  9944. // Header returns an http.Header that can be modified by the caller to
  9945. // add HTTP headers to the request.
  9946. func (c *ProjectsLocationsJobsDebugGetConfigCall) Header() http.Header {
  9947. if c.header_ == nil {
  9948. c.header_ = make(http.Header)
  9949. }
  9950. return c.header_
  9951. }
  9952. func (c *ProjectsLocationsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) {
  9953. reqHeaders := make(http.Header)
  9954. for k, v := range c.header_ {
  9955. reqHeaders[k] = v
  9956. }
  9957. reqHeaders.Set("User-Agent", c.s.userAgent())
  9958. var body io.Reader = nil
  9959. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest)
  9960. if err != nil {
  9961. return nil, err
  9962. }
  9963. reqHeaders.Set("Content-Type", "application/json")
  9964. c.urlParams_.Set("alt", alt)
  9965. c.urlParams_.Set("prettyPrint", "false")
  9966. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig")
  9967. urls += "?" + c.urlParams_.Encode()
  9968. req, err := http.NewRequest("POST", urls, body)
  9969. if err != nil {
  9970. return nil, err
  9971. }
  9972. req.Header = reqHeaders
  9973. googleapi.Expand(req.URL, map[string]string{
  9974. "projectId": c.projectId,
  9975. "location": c.location,
  9976. "jobId": c.jobId,
  9977. })
  9978. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9979. }
  9980. // Do executes the "dataflow.projects.locations.jobs.debug.getConfig" call.
  9981. // Exactly one of *GetDebugConfigResponse or error will be non-nil. Any
  9982. // non-2xx status code is an error. Response headers are in either
  9983. // *GetDebugConfigResponse.ServerResponse.Header or (if a response was
  9984. // returned at all) in error.(*googleapi.Error).Header. Use
  9985. // googleapi.IsNotModified to check whether the returned error was
  9986. // because http.StatusNotModified was returned.
  9987. func (c *ProjectsLocationsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) {
  9988. gensupport.SetOptions(c.urlParams_, opts...)
  9989. res, err := c.doRequest("json")
  9990. if res != nil && res.StatusCode == http.StatusNotModified {
  9991. if res.Body != nil {
  9992. res.Body.Close()
  9993. }
  9994. return nil, &googleapi.Error{
  9995. Code: res.StatusCode,
  9996. Header: res.Header,
  9997. }
  9998. }
  9999. if err != nil {
  10000. return nil, err
  10001. }
  10002. defer googleapi.CloseBody(res)
  10003. if err := googleapi.CheckResponse(res); err != nil {
  10004. return nil, err
  10005. }
  10006. ret := &GetDebugConfigResponse{
  10007. ServerResponse: googleapi.ServerResponse{
  10008. Header: res.Header,
  10009. HTTPStatusCode: res.StatusCode,
  10010. },
  10011. }
  10012. target := &ret
  10013. if err := gensupport.DecodeResponse(target, res); err != nil {
  10014. return nil, err
  10015. }
  10016. return ret, nil
  10017. // {
  10018. // "description": "Get encoded debug configuration for component. Not cacheable.",
  10019. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig",
  10020. // "httpMethod": "POST",
  10021. // "id": "dataflow.projects.locations.jobs.debug.getConfig",
  10022. // "parameterOrder": [
  10023. // "projectId",
  10024. // "location",
  10025. // "jobId"
  10026. // ],
  10027. // "parameters": {
  10028. // "jobId": {
  10029. // "description": "The job id.",
  10030. // "location": "path",
  10031. // "required": true,
  10032. // "type": "string"
  10033. // },
  10034. // "location": {
  10035. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.",
  10036. // "location": "path",
  10037. // "required": true,
  10038. // "type": "string"
  10039. // },
  10040. // "projectId": {
  10041. // "description": "The project id.",
  10042. // "location": "path",
  10043. // "required": true,
  10044. // "type": "string"
  10045. // }
  10046. // },
  10047. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig",
  10048. // "request": {
  10049. // "$ref": "GetDebugConfigRequest"
  10050. // },
  10051. // "response": {
  10052. // "$ref": "GetDebugConfigResponse"
  10053. // },
  10054. // "scopes": [
  10055. // "https://www.googleapis.com/auth/cloud-platform",
  10056. // "https://www.googleapis.com/auth/compute",
  10057. // "https://www.googleapis.com/auth/compute.readonly",
  10058. // "https://www.googleapis.com/auth/userinfo.email"
  10059. // ]
  10060. // }
  10061. }
  10062. // method id "dataflow.projects.locations.jobs.debug.sendCapture":
  10063. type ProjectsLocationsJobsDebugSendCaptureCall struct {
  10064. s *Service
  10065. projectId string
  10066. location string
  10067. jobId string
  10068. senddebugcapturerequest *SendDebugCaptureRequest
  10069. urlParams_ gensupport.URLParams
  10070. ctx_ context.Context
  10071. header_ http.Header
  10072. }
  10073. // SendCapture: Send encoded debug capture data for component.
  10074. func (r *ProjectsLocationsJobsDebugService) SendCapture(projectId string, location string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsLocationsJobsDebugSendCaptureCall {
  10075. c := &ProjectsLocationsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10076. c.projectId = projectId
  10077. c.location = location
  10078. c.jobId = jobId
  10079. c.senddebugcapturerequest = senddebugcapturerequest
  10080. return c
  10081. }
  10082. // Fields allows partial responses to be retrieved. See
  10083. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10084. // for more information.
  10085. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugSendCaptureCall {
  10086. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10087. return c
  10088. }
  10089. // Context sets the context to be used in this call's Do method. Any
  10090. // pending HTTP request will be aborted if the provided context is
  10091. // canceled.
  10092. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugSendCaptureCall {
  10093. c.ctx_ = ctx
  10094. return c
  10095. }
  10096. // Header returns an http.Header that can be modified by the caller to
  10097. // add HTTP headers to the request.
  10098. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Header() http.Header {
  10099. if c.header_ == nil {
  10100. c.header_ = make(http.Header)
  10101. }
  10102. return c.header_
  10103. }
  10104. func (c *ProjectsLocationsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) {
  10105. reqHeaders := make(http.Header)
  10106. for k, v := range c.header_ {
  10107. reqHeaders[k] = v
  10108. }
  10109. reqHeaders.Set("User-Agent", c.s.userAgent())
  10110. var body io.Reader = nil
  10111. body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest)
  10112. if err != nil {
  10113. return nil, err
  10114. }
  10115. reqHeaders.Set("Content-Type", "application/json")
  10116. c.urlParams_.Set("alt", alt)
  10117. c.urlParams_.Set("prettyPrint", "false")
  10118. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture")
  10119. urls += "?" + c.urlParams_.Encode()
  10120. req, err := http.NewRequest("POST", urls, body)
  10121. if err != nil {
  10122. return nil, err
  10123. }
  10124. req.Header = reqHeaders
  10125. googleapi.Expand(req.URL, map[string]string{
  10126. "projectId": c.projectId,
  10127. "location": c.location,
  10128. "jobId": c.jobId,
  10129. })
  10130. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10131. }
  10132. // Do executes the "dataflow.projects.locations.jobs.debug.sendCapture" call.
  10133. // Exactly one of *SendDebugCaptureResponse or error will be non-nil.
  10134. // Any non-2xx status code is an error. Response headers are in either
  10135. // *SendDebugCaptureResponse.ServerResponse.Header or (if a response was
  10136. // returned at all) in error.(*googleapi.Error).Header. Use
  10137. // googleapi.IsNotModified to check whether the returned error was
  10138. // because http.StatusNotModified was returned.
  10139. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) {
  10140. gensupport.SetOptions(c.urlParams_, opts...)
  10141. res, err := c.doRequest("json")
  10142. if res != nil && res.StatusCode == http.StatusNotModified {
  10143. if res.Body != nil {
  10144. res.Body.Close()
  10145. }
  10146. return nil, &googleapi.Error{
  10147. Code: res.StatusCode,
  10148. Header: res.Header,
  10149. }
  10150. }
  10151. if err != nil {
  10152. return nil, err
  10153. }
  10154. defer googleapi.CloseBody(res)
  10155. if err := googleapi.CheckResponse(res); err != nil {
  10156. return nil, err
  10157. }
  10158. ret := &SendDebugCaptureResponse{
  10159. ServerResponse: googleapi.ServerResponse{
  10160. Header: res.Header,
  10161. HTTPStatusCode: res.StatusCode,
  10162. },
  10163. }
  10164. target := &ret
  10165. if err := gensupport.DecodeResponse(target, res); err != nil {
  10166. return nil, err
  10167. }
  10168. return ret, nil
  10169. // {
  10170. // "description": "Send encoded debug capture data for component.",
  10171. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture",
  10172. // "httpMethod": "POST",
  10173. // "id": "dataflow.projects.locations.jobs.debug.sendCapture",
  10174. // "parameterOrder": [
  10175. // "projectId",
  10176. // "location",
  10177. // "jobId"
  10178. // ],
  10179. // "parameters": {
  10180. // "jobId": {
  10181. // "description": "The job id.",
  10182. // "location": "path",
  10183. // "required": true,
  10184. // "type": "string"
  10185. // },
  10186. // "location": {
  10187. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.",
  10188. // "location": "path",
  10189. // "required": true,
  10190. // "type": "string"
  10191. // },
  10192. // "projectId": {
  10193. // "description": "The project id.",
  10194. // "location": "path",
  10195. // "required": true,
  10196. // "type": "string"
  10197. // }
  10198. // },
  10199. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture",
  10200. // "request": {
  10201. // "$ref": "SendDebugCaptureRequest"
  10202. // },
  10203. // "response": {
  10204. // "$ref": "SendDebugCaptureResponse"
  10205. // },
  10206. // "scopes": [
  10207. // "https://www.googleapis.com/auth/cloud-platform",
  10208. // "https://www.googleapis.com/auth/compute",
  10209. // "https://www.googleapis.com/auth/compute.readonly",
  10210. // "https://www.googleapis.com/auth/userinfo.email"
  10211. // ]
  10212. // }
  10213. }
  10214. // method id "dataflow.projects.locations.jobs.messages.list":
  10215. type ProjectsLocationsJobsMessagesListCall struct {
  10216. s *Service
  10217. projectId string
  10218. location string
  10219. jobId string
  10220. urlParams_ gensupport.URLParams
  10221. ifNoneMatch_ string
  10222. ctx_ context.Context
  10223. header_ http.Header
  10224. }
  10225. // List: Request the job status.
  10226. //
  10227. // To request the status of a job, we recommend
  10228. // using
  10229. // `projects.locations.jobs.messages.list` with a [regional
  10230. // endpoint]
  10231. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  10232. // dpoints). Using
  10233. // `projects.jobs.messages.list` is not recommended, as you can only
  10234. // request
  10235. // the status of jobs that are running in `us-central1`.
  10236. func (r *ProjectsLocationsJobsMessagesService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsMessagesListCall {
  10237. c := &ProjectsLocationsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10238. c.projectId = projectId
  10239. c.location = location
  10240. c.jobId = jobId
  10241. return c
  10242. }
  10243. // EndTime sets the optional parameter "endTime": Return only messages
  10244. // with timestamps < end_time. The default is now
  10245. // (i.e. return up to the latest messages available).
  10246. func (c *ProjectsLocationsJobsMessagesListCall) EndTime(endTime string) *ProjectsLocationsJobsMessagesListCall {
  10247. c.urlParams_.Set("endTime", endTime)
  10248. return c
  10249. }
  10250. // MinimumImportance sets the optional parameter "minimumImportance":
  10251. // Filter to only get messages with importance >= level
  10252. //
  10253. // Possible values:
  10254. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN"
  10255. // "JOB_MESSAGE_DEBUG"
  10256. // "JOB_MESSAGE_DETAILED"
  10257. // "JOB_MESSAGE_BASIC"
  10258. // "JOB_MESSAGE_WARNING"
  10259. // "JOB_MESSAGE_ERROR"
  10260. func (c *ProjectsLocationsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsLocationsJobsMessagesListCall {
  10261. c.urlParams_.Set("minimumImportance", minimumImportance)
  10262. return c
  10263. }
  10264. // PageSize sets the optional parameter "pageSize": If specified,
  10265. // determines the maximum number of messages to
  10266. // return. If unspecified, the service may choose an
  10267. // appropriate
  10268. // default, or may return an arbitrarily large number of results.
  10269. func (c *ProjectsLocationsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsJobsMessagesListCall {
  10270. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  10271. return c
  10272. }
  10273. // PageToken sets the optional parameter "pageToken": If supplied, this
  10274. // should be the value of next_page_token returned
  10275. // by an earlier call. This will cause the next page of results to
  10276. // be returned.
  10277. func (c *ProjectsLocationsJobsMessagesListCall) PageToken(pageToken string) *ProjectsLocationsJobsMessagesListCall {
  10278. c.urlParams_.Set("pageToken", pageToken)
  10279. return c
  10280. }
  10281. // StartTime sets the optional parameter "startTime": If specified,
  10282. // return only messages with timestamps >= start_time.
  10283. // The default is the job creation time (i.e. beginning of messages).
  10284. func (c *ProjectsLocationsJobsMessagesListCall) StartTime(startTime string) *ProjectsLocationsJobsMessagesListCall {
  10285. c.urlParams_.Set("startTime", startTime)
  10286. return c
  10287. }
  10288. // Fields allows partial responses to be retrieved. See
  10289. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10290. // for more information.
  10291. func (c *ProjectsLocationsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsMessagesListCall {
  10292. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10293. return c
  10294. }
  10295. // IfNoneMatch sets the optional parameter which makes the operation
  10296. // fail if the object's ETag matches the given value. This is useful for
  10297. // getting updates only after the object has changed since the last
  10298. // request. Use googleapi.IsNotModified to check whether the response
  10299. // error from Do is the result of In-None-Match.
  10300. func (c *ProjectsLocationsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsMessagesListCall {
  10301. c.ifNoneMatch_ = entityTag
  10302. return c
  10303. }
  10304. // Context sets the context to be used in this call's Do method. Any
  10305. // pending HTTP request will be aborted if the provided context is
  10306. // canceled.
  10307. func (c *ProjectsLocationsJobsMessagesListCall) Context(ctx context.Context) *ProjectsLocationsJobsMessagesListCall {
  10308. c.ctx_ = ctx
  10309. return c
  10310. }
  10311. // Header returns an http.Header that can be modified by the caller to
  10312. // add HTTP headers to the request.
  10313. func (c *ProjectsLocationsJobsMessagesListCall) Header() http.Header {
  10314. if c.header_ == nil {
  10315. c.header_ = make(http.Header)
  10316. }
  10317. return c.header_
  10318. }
  10319. func (c *ProjectsLocationsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) {
  10320. reqHeaders := make(http.Header)
  10321. for k, v := range c.header_ {
  10322. reqHeaders[k] = v
  10323. }
  10324. reqHeaders.Set("User-Agent", c.s.userAgent())
  10325. if c.ifNoneMatch_ != "" {
  10326. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10327. }
  10328. var body io.Reader = nil
  10329. c.urlParams_.Set("alt", alt)
  10330. c.urlParams_.Set("prettyPrint", "false")
  10331. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages")
  10332. urls += "?" + c.urlParams_.Encode()
  10333. req, err := http.NewRequest("GET", urls, body)
  10334. if err != nil {
  10335. return nil, err
  10336. }
  10337. req.Header = reqHeaders
  10338. googleapi.Expand(req.URL, map[string]string{
  10339. "projectId": c.projectId,
  10340. "location": c.location,
  10341. "jobId": c.jobId,
  10342. })
  10343. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10344. }
  10345. // Do executes the "dataflow.projects.locations.jobs.messages.list" call.
  10346. // Exactly one of *ListJobMessagesResponse or error will be non-nil. Any
  10347. // non-2xx status code is an error. Response headers are in either
  10348. // *ListJobMessagesResponse.ServerResponse.Header or (if a response was
  10349. // returned at all) in error.(*googleapi.Error).Header. Use
  10350. // googleapi.IsNotModified to check whether the returned error was
  10351. // because http.StatusNotModified was returned.
  10352. func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) {
  10353. gensupport.SetOptions(c.urlParams_, opts...)
  10354. res, err := c.doRequest("json")
  10355. if res != nil && res.StatusCode == http.StatusNotModified {
  10356. if res.Body != nil {
  10357. res.Body.Close()
  10358. }
  10359. return nil, &googleapi.Error{
  10360. Code: res.StatusCode,
  10361. Header: res.Header,
  10362. }
  10363. }
  10364. if err != nil {
  10365. return nil, err
  10366. }
  10367. defer googleapi.CloseBody(res)
  10368. if err := googleapi.CheckResponse(res); err != nil {
  10369. return nil, err
  10370. }
  10371. ret := &ListJobMessagesResponse{
  10372. ServerResponse: googleapi.ServerResponse{
  10373. Header: res.Header,
  10374. HTTPStatusCode: res.StatusCode,
  10375. },
  10376. }
  10377. target := &ret
  10378. if err := gensupport.DecodeResponse(target, res); err != nil {
  10379. return nil, err
  10380. }
  10381. return ret, nil
  10382. // {
  10383. // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.",
  10384. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages",
  10385. // "httpMethod": "GET",
  10386. // "id": "dataflow.projects.locations.jobs.messages.list",
  10387. // "parameterOrder": [
  10388. // "projectId",
  10389. // "location",
  10390. // "jobId"
  10391. // ],
  10392. // "parameters": {
  10393. // "endTime": {
  10394. // "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).",
  10395. // "format": "google-datetime",
  10396. // "location": "query",
  10397. // "type": "string"
  10398. // },
  10399. // "jobId": {
  10400. // "description": "The job to get messages about.",
  10401. // "location": "path",
  10402. // "required": true,
  10403. // "type": "string"
  10404. // },
  10405. // "location": {
  10406. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.",
  10407. // "location": "path",
  10408. // "required": true,
  10409. // "type": "string"
  10410. // },
  10411. // "minimumImportance": {
  10412. // "description": "Filter to only get messages with importance \u003e= level",
  10413. // "enum": [
  10414. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN",
  10415. // "JOB_MESSAGE_DEBUG",
  10416. // "JOB_MESSAGE_DETAILED",
  10417. // "JOB_MESSAGE_BASIC",
  10418. // "JOB_MESSAGE_WARNING",
  10419. // "JOB_MESSAGE_ERROR"
  10420. // ],
  10421. // "location": "query",
  10422. // "type": "string"
  10423. // },
  10424. // "pageSize": {
  10425. // "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.",
  10426. // "format": "int32",
  10427. // "location": "query",
  10428. // "type": "integer"
  10429. // },
  10430. // "pageToken": {
  10431. // "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.",
  10432. // "location": "query",
  10433. // "type": "string"
  10434. // },
  10435. // "projectId": {
  10436. // "description": "A project id.",
  10437. // "location": "path",
  10438. // "required": true,
  10439. // "type": "string"
  10440. // },
  10441. // "startTime": {
  10442. // "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).",
  10443. // "format": "google-datetime",
  10444. // "location": "query",
  10445. // "type": "string"
  10446. // }
  10447. // },
  10448. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages",
  10449. // "response": {
  10450. // "$ref": "ListJobMessagesResponse"
  10451. // },
  10452. // "scopes": [
  10453. // "https://www.googleapis.com/auth/cloud-platform",
  10454. // "https://www.googleapis.com/auth/compute",
  10455. // "https://www.googleapis.com/auth/compute.readonly",
  10456. // "https://www.googleapis.com/auth/userinfo.email"
  10457. // ]
  10458. // }
  10459. }
  10460. // Pages invokes f for each page of results.
  10461. // A non-nil error returned from f will halt the iteration.
  10462. // The provided context supersedes any context provided to the Context method.
  10463. func (c *ProjectsLocationsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error {
  10464. c.ctx_ = ctx
  10465. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  10466. for {
  10467. x, err := c.Do()
  10468. if err != nil {
  10469. return err
  10470. }
  10471. if err := f(x); err != nil {
  10472. return err
  10473. }
  10474. if x.NextPageToken == "" {
  10475. return nil
  10476. }
  10477. c.PageToken(x.NextPageToken)
  10478. }
  10479. }
  10480. // method id "dataflow.projects.locations.jobs.workItems.lease":
  10481. type ProjectsLocationsJobsWorkItemsLeaseCall struct {
  10482. s *Service
  10483. projectId string
  10484. location string
  10485. jobId string
  10486. leaseworkitemrequest *LeaseWorkItemRequest
  10487. urlParams_ gensupport.URLParams
  10488. ctx_ context.Context
  10489. header_ http.Header
  10490. }
  10491. // Lease: Leases a dataflow WorkItem to run.
  10492. func (r *ProjectsLocationsJobsWorkItemsService) Lease(projectId string, location string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsLocationsJobsWorkItemsLeaseCall {
  10493. c := &ProjectsLocationsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10494. c.projectId = projectId
  10495. c.location = location
  10496. c.jobId = jobId
  10497. c.leaseworkitemrequest = leaseworkitemrequest
  10498. return c
  10499. }
  10500. // Fields allows partial responses to be retrieved. See
  10501. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10502. // for more information.
  10503. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsLeaseCall {
  10504. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10505. return c
  10506. }
  10507. // Context sets the context to be used in this call's Do method. Any
  10508. // pending HTTP request will be aborted if the provided context is
  10509. // canceled.
  10510. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsLeaseCall {
  10511. c.ctx_ = ctx
  10512. return c
  10513. }
  10514. // Header returns an http.Header that can be modified by the caller to
  10515. // add HTTP headers to the request.
  10516. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Header() http.Header {
  10517. if c.header_ == nil {
  10518. c.header_ = make(http.Header)
  10519. }
  10520. return c.header_
  10521. }
  10522. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) {
  10523. reqHeaders := make(http.Header)
  10524. for k, v := range c.header_ {
  10525. reqHeaders[k] = v
  10526. }
  10527. reqHeaders.Set("User-Agent", c.s.userAgent())
  10528. var body io.Reader = nil
  10529. body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest)
  10530. if err != nil {
  10531. return nil, err
  10532. }
  10533. reqHeaders.Set("Content-Type", "application/json")
  10534. c.urlParams_.Set("alt", alt)
  10535. c.urlParams_.Set("prettyPrint", "false")
  10536. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease")
  10537. urls += "?" + c.urlParams_.Encode()
  10538. req, err := http.NewRequest("POST", urls, body)
  10539. if err != nil {
  10540. return nil, err
  10541. }
  10542. req.Header = reqHeaders
  10543. googleapi.Expand(req.URL, map[string]string{
  10544. "projectId": c.projectId,
  10545. "location": c.location,
  10546. "jobId": c.jobId,
  10547. })
  10548. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10549. }
  10550. // Do executes the "dataflow.projects.locations.jobs.workItems.lease" call.
  10551. // Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any
  10552. // non-2xx status code is an error. Response headers are in either
  10553. // *LeaseWorkItemResponse.ServerResponse.Header or (if a response was
  10554. // returned at all) in error.(*googleapi.Error).Header. Use
  10555. // googleapi.IsNotModified to check whether the returned error was
  10556. // because http.StatusNotModified was returned.
  10557. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) {
  10558. gensupport.SetOptions(c.urlParams_, opts...)
  10559. res, err := c.doRequest("json")
  10560. if res != nil && res.StatusCode == http.StatusNotModified {
  10561. if res.Body != nil {
  10562. res.Body.Close()
  10563. }
  10564. return nil, &googleapi.Error{
  10565. Code: res.StatusCode,
  10566. Header: res.Header,
  10567. }
  10568. }
  10569. if err != nil {
  10570. return nil, err
  10571. }
  10572. defer googleapi.CloseBody(res)
  10573. if err := googleapi.CheckResponse(res); err != nil {
  10574. return nil, err
  10575. }
  10576. ret := &LeaseWorkItemResponse{
  10577. ServerResponse: googleapi.ServerResponse{
  10578. Header: res.Header,
  10579. HTTPStatusCode: res.StatusCode,
  10580. },
  10581. }
  10582. target := &ret
  10583. if err := gensupport.DecodeResponse(target, res); err != nil {
  10584. return nil, err
  10585. }
  10586. return ret, nil
  10587. // {
  10588. // "description": "Leases a dataflow WorkItem to run.",
  10589. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease",
  10590. // "httpMethod": "POST",
  10591. // "id": "dataflow.projects.locations.jobs.workItems.lease",
  10592. // "parameterOrder": [
  10593. // "projectId",
  10594. // "location",
  10595. // "jobId"
  10596. // ],
  10597. // "parameters": {
  10598. // "jobId": {
  10599. // "description": "Identifies the workflow job this worker belongs to.",
  10600. // "location": "path",
  10601. // "required": true,
  10602. // "type": "string"
  10603. // },
  10604. // "location": {
  10605. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.",
  10606. // "location": "path",
  10607. // "required": true,
  10608. // "type": "string"
  10609. // },
  10610. // "projectId": {
  10611. // "description": "Identifies the project this worker belongs to.",
  10612. // "location": "path",
  10613. // "required": true,
  10614. // "type": "string"
  10615. // }
  10616. // },
  10617. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease",
  10618. // "request": {
  10619. // "$ref": "LeaseWorkItemRequest"
  10620. // },
  10621. // "response": {
  10622. // "$ref": "LeaseWorkItemResponse"
  10623. // },
  10624. // "scopes": [
  10625. // "https://www.googleapis.com/auth/cloud-platform",
  10626. // "https://www.googleapis.com/auth/compute",
  10627. // "https://www.googleapis.com/auth/compute.readonly",
  10628. // "https://www.googleapis.com/auth/userinfo.email"
  10629. // ]
  10630. // }
  10631. }
  10632. // method id "dataflow.projects.locations.jobs.workItems.reportStatus":
  10633. type ProjectsLocationsJobsWorkItemsReportStatusCall struct {
  10634. s *Service
  10635. projectId string
  10636. location string
  10637. jobId string
  10638. reportworkitemstatusrequest *ReportWorkItemStatusRequest
  10639. urlParams_ gensupport.URLParams
  10640. ctx_ context.Context
  10641. header_ http.Header
  10642. }
  10643. // ReportStatus: Reports the status of dataflow WorkItems leased by a
  10644. // worker.
  10645. func (r *ProjectsLocationsJobsWorkItemsService) ReportStatus(projectId string, location string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsLocationsJobsWorkItemsReportStatusCall {
  10646. c := &ProjectsLocationsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10647. c.projectId = projectId
  10648. c.location = location
  10649. c.jobId = jobId
  10650. c.reportworkitemstatusrequest = reportworkitemstatusrequest
  10651. return c
  10652. }
  10653. // Fields allows partial responses to be retrieved. See
  10654. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10655. // for more information.
  10656. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsReportStatusCall {
  10657. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10658. return c
  10659. }
  10660. // Context sets the context to be used in this call's Do method. Any
  10661. // pending HTTP request will be aborted if the provided context is
  10662. // canceled.
  10663. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsReportStatusCall {
  10664. c.ctx_ = ctx
  10665. return c
  10666. }
  10667. // Header returns an http.Header that can be modified by the caller to
  10668. // add HTTP headers to the request.
  10669. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Header() http.Header {
  10670. if c.header_ == nil {
  10671. c.header_ = make(http.Header)
  10672. }
  10673. return c.header_
  10674. }
  10675. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) {
  10676. reqHeaders := make(http.Header)
  10677. for k, v := range c.header_ {
  10678. reqHeaders[k] = v
  10679. }
  10680. reqHeaders.Set("User-Agent", c.s.userAgent())
  10681. var body io.Reader = nil
  10682. body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest)
  10683. if err != nil {
  10684. return nil, err
  10685. }
  10686. reqHeaders.Set("Content-Type", "application/json")
  10687. c.urlParams_.Set("alt", alt)
  10688. c.urlParams_.Set("prettyPrint", "false")
  10689. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus")
  10690. urls += "?" + c.urlParams_.Encode()
  10691. req, err := http.NewRequest("POST", urls, body)
  10692. if err != nil {
  10693. return nil, err
  10694. }
  10695. req.Header = reqHeaders
  10696. googleapi.Expand(req.URL, map[string]string{
  10697. "projectId": c.projectId,
  10698. "location": c.location,
  10699. "jobId": c.jobId,
  10700. })
  10701. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10702. }
  10703. // Do executes the "dataflow.projects.locations.jobs.workItems.reportStatus" call.
  10704. // Exactly one of *ReportWorkItemStatusResponse or error will be
  10705. // non-nil. Any non-2xx status code is an error. Response headers are in
  10706. // either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a
  10707. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10708. // googleapi.IsNotModified to check whether the returned error was
  10709. // because http.StatusNotModified was returned.
  10710. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) {
  10711. gensupport.SetOptions(c.urlParams_, opts...)
  10712. res, err := c.doRequest("json")
  10713. if res != nil && res.StatusCode == http.StatusNotModified {
  10714. if res.Body != nil {
  10715. res.Body.Close()
  10716. }
  10717. return nil, &googleapi.Error{
  10718. Code: res.StatusCode,
  10719. Header: res.Header,
  10720. }
  10721. }
  10722. if err != nil {
  10723. return nil, err
  10724. }
  10725. defer googleapi.CloseBody(res)
  10726. if err := googleapi.CheckResponse(res); err != nil {
  10727. return nil, err
  10728. }
  10729. ret := &ReportWorkItemStatusResponse{
  10730. ServerResponse: googleapi.ServerResponse{
  10731. Header: res.Header,
  10732. HTTPStatusCode: res.StatusCode,
  10733. },
  10734. }
  10735. target := &ret
  10736. if err := gensupport.DecodeResponse(target, res); err != nil {
  10737. return nil, err
  10738. }
  10739. return ret, nil
  10740. // {
  10741. // "description": "Reports the status of dataflow WorkItems leased by a worker.",
  10742. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus",
  10743. // "httpMethod": "POST",
  10744. // "id": "dataflow.projects.locations.jobs.workItems.reportStatus",
  10745. // "parameterOrder": [
  10746. // "projectId",
  10747. // "location",
  10748. // "jobId"
  10749. // ],
  10750. // "parameters": {
  10751. // "jobId": {
  10752. // "description": "The job which the WorkItem is part of.",
  10753. // "location": "path",
  10754. // "required": true,
  10755. // "type": "string"
  10756. // },
  10757. // "location": {
  10758. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.",
  10759. // "location": "path",
  10760. // "required": true,
  10761. // "type": "string"
  10762. // },
  10763. // "projectId": {
  10764. // "description": "The project which owns the WorkItem's job.",
  10765. // "location": "path",
  10766. // "required": true,
  10767. // "type": "string"
  10768. // }
  10769. // },
  10770. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus",
  10771. // "request": {
  10772. // "$ref": "ReportWorkItemStatusRequest"
  10773. // },
  10774. // "response": {
  10775. // "$ref": "ReportWorkItemStatusResponse"
  10776. // },
  10777. // "scopes": [
  10778. // "https://www.googleapis.com/auth/cloud-platform",
  10779. // "https://www.googleapis.com/auth/compute",
  10780. // "https://www.googleapis.com/auth/compute.readonly",
  10781. // "https://www.googleapis.com/auth/userinfo.email"
  10782. // ]
  10783. // }
  10784. }
  10785. // method id "dataflow.projects.locations.templates.create":
  10786. type ProjectsLocationsTemplatesCreateCall struct {
  10787. s *Service
  10788. projectId string
  10789. location string
  10790. createjobfromtemplaterequest *CreateJobFromTemplateRequest
  10791. urlParams_ gensupport.URLParams
  10792. ctx_ context.Context
  10793. header_ http.Header
  10794. }
  10795. // Create: Creates a Cloud Dataflow job from a template.
  10796. func (r *ProjectsLocationsTemplatesService) Create(projectId string, location string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsLocationsTemplatesCreateCall {
  10797. c := &ProjectsLocationsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10798. c.projectId = projectId
  10799. c.location = location
  10800. c.createjobfromtemplaterequest = createjobfromtemplaterequest
  10801. return c
  10802. }
  10803. // Fields allows partial responses to be retrieved. See
  10804. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10805. // for more information.
  10806. func (c *ProjectsLocationsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesCreateCall {
  10807. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10808. return c
  10809. }
  10810. // Context sets the context to be used in this call's Do method. Any
  10811. // pending HTTP request will be aborted if the provided context is
  10812. // canceled.
  10813. func (c *ProjectsLocationsTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTemplatesCreateCall {
  10814. c.ctx_ = ctx
  10815. return c
  10816. }
  10817. // Header returns an http.Header that can be modified by the caller to
  10818. // add HTTP headers to the request.
  10819. func (c *ProjectsLocationsTemplatesCreateCall) Header() http.Header {
  10820. if c.header_ == nil {
  10821. c.header_ = make(http.Header)
  10822. }
  10823. return c.header_
  10824. }
  10825. func (c *ProjectsLocationsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  10826. reqHeaders := make(http.Header)
  10827. for k, v := range c.header_ {
  10828. reqHeaders[k] = v
  10829. }
  10830. reqHeaders.Set("User-Agent", c.s.userAgent())
  10831. var body io.Reader = nil
  10832. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest)
  10833. if err != nil {
  10834. return nil, err
  10835. }
  10836. reqHeaders.Set("Content-Type", "application/json")
  10837. c.urlParams_.Set("alt", alt)
  10838. c.urlParams_.Set("prettyPrint", "false")
  10839. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates")
  10840. urls += "?" + c.urlParams_.Encode()
  10841. req, err := http.NewRequest("POST", urls, body)
  10842. if err != nil {
  10843. return nil, err
  10844. }
  10845. req.Header = reqHeaders
  10846. googleapi.Expand(req.URL, map[string]string{
  10847. "projectId": c.projectId,
  10848. "location": c.location,
  10849. })
  10850. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10851. }
  10852. // Do executes the "dataflow.projects.locations.templates.create" call.
  10853. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  10854. // is an error. Response headers are in either
  10855. // *Job.ServerResponse.Header or (if a response was returned at all) in
  10856. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10857. // whether the returned error was because http.StatusNotModified was
  10858. // returned.
  10859. func (c *ProjectsLocationsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  10860. gensupport.SetOptions(c.urlParams_, opts...)
  10861. res, err := c.doRequest("json")
  10862. if res != nil && res.StatusCode == http.StatusNotModified {
  10863. if res.Body != nil {
  10864. res.Body.Close()
  10865. }
  10866. return nil, &googleapi.Error{
  10867. Code: res.StatusCode,
  10868. Header: res.Header,
  10869. }
  10870. }
  10871. if err != nil {
  10872. return nil, err
  10873. }
  10874. defer googleapi.CloseBody(res)
  10875. if err := googleapi.CheckResponse(res); err != nil {
  10876. return nil, err
  10877. }
  10878. ret := &Job{
  10879. ServerResponse: googleapi.ServerResponse{
  10880. Header: res.Header,
  10881. HTTPStatusCode: res.StatusCode,
  10882. },
  10883. }
  10884. target := &ret
  10885. if err := gensupport.DecodeResponse(target, res); err != nil {
  10886. return nil, err
  10887. }
  10888. return ret, nil
  10889. // {
  10890. // "description": "Creates a Cloud Dataflow job from a template.",
  10891. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates",
  10892. // "httpMethod": "POST",
  10893. // "id": "dataflow.projects.locations.templates.create",
  10894. // "parameterOrder": [
  10895. // "projectId",
  10896. // "location"
  10897. // ],
  10898. // "parameters": {
  10899. // "location": {
  10900. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.",
  10901. // "location": "path",
  10902. // "required": true,
  10903. // "type": "string"
  10904. // },
  10905. // "projectId": {
  10906. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  10907. // "location": "path",
  10908. // "required": true,
  10909. // "type": "string"
  10910. // }
  10911. // },
  10912. // "path": "v1b3/projects/{projectId}/locations/{location}/templates",
  10913. // "request": {
  10914. // "$ref": "CreateJobFromTemplateRequest"
  10915. // },
  10916. // "response": {
  10917. // "$ref": "Job"
  10918. // },
  10919. // "scopes": [
  10920. // "https://www.googleapis.com/auth/cloud-platform",
  10921. // "https://www.googleapis.com/auth/compute",
  10922. // "https://www.googleapis.com/auth/compute.readonly",
  10923. // "https://www.googleapis.com/auth/userinfo.email"
  10924. // ]
  10925. // }
  10926. }
  10927. // method id "dataflow.projects.locations.templates.get":
  10928. type ProjectsLocationsTemplatesGetCall struct {
  10929. s *Service
  10930. projectId string
  10931. location string
  10932. urlParams_ gensupport.URLParams
  10933. ifNoneMatch_ string
  10934. ctx_ context.Context
  10935. header_ http.Header
  10936. }
  10937. // Get: Get the template associated with a template.
  10938. func (r *ProjectsLocationsTemplatesService) Get(projectId string, location string) *ProjectsLocationsTemplatesGetCall {
  10939. c := &ProjectsLocationsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10940. c.projectId = projectId
  10941. c.location = location
  10942. return c
  10943. }
  10944. // GcsPath sets the optional parameter "gcsPath": Required. A Cloud
  10945. // Storage path to the template from which to
  10946. // create the job.
  10947. // Must be valid Cloud Storage URL, beginning with 'gs://'.
  10948. func (c *ProjectsLocationsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesGetCall {
  10949. c.urlParams_.Set("gcsPath", gcsPath)
  10950. return c
  10951. }
  10952. // View sets the optional parameter "view": The view to retrieve.
  10953. // Defaults to METADATA_ONLY.
  10954. //
  10955. // Possible values:
  10956. // "METADATA_ONLY"
  10957. func (c *ProjectsLocationsTemplatesGetCall) View(view string) *ProjectsLocationsTemplatesGetCall {
  10958. c.urlParams_.Set("view", view)
  10959. return c
  10960. }
  10961. // Fields allows partial responses to be retrieved. See
  10962. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10963. // for more information.
  10964. func (c *ProjectsLocationsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesGetCall {
  10965. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10966. return c
  10967. }
  10968. // IfNoneMatch sets the optional parameter which makes the operation
  10969. // fail if the object's ETag matches the given value. This is useful for
  10970. // getting updates only after the object has changed since the last
  10971. // request. Use googleapi.IsNotModified to check whether the response
  10972. // error from Do is the result of In-None-Match.
  10973. func (c *ProjectsLocationsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTemplatesGetCall {
  10974. c.ifNoneMatch_ = entityTag
  10975. return c
  10976. }
  10977. // Context sets the context to be used in this call's Do method. Any
  10978. // pending HTTP request will be aborted if the provided context is
  10979. // canceled.
  10980. func (c *ProjectsLocationsTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTemplatesGetCall {
  10981. c.ctx_ = ctx
  10982. return c
  10983. }
  10984. // Header returns an http.Header that can be modified by the caller to
  10985. // add HTTP headers to the request.
  10986. func (c *ProjectsLocationsTemplatesGetCall) Header() http.Header {
  10987. if c.header_ == nil {
  10988. c.header_ = make(http.Header)
  10989. }
  10990. return c.header_
  10991. }
  10992. func (c *ProjectsLocationsTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  10993. reqHeaders := make(http.Header)
  10994. for k, v := range c.header_ {
  10995. reqHeaders[k] = v
  10996. }
  10997. reqHeaders.Set("User-Agent", c.s.userAgent())
  10998. if c.ifNoneMatch_ != "" {
  10999. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11000. }
  11001. var body io.Reader = nil
  11002. c.urlParams_.Set("alt", alt)
  11003. c.urlParams_.Set("prettyPrint", "false")
  11004. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:get")
  11005. urls += "?" + c.urlParams_.Encode()
  11006. req, err := http.NewRequest("GET", urls, body)
  11007. if err != nil {
  11008. return nil, err
  11009. }
  11010. req.Header = reqHeaders
  11011. googleapi.Expand(req.URL, map[string]string{
  11012. "projectId": c.projectId,
  11013. "location": c.location,
  11014. })
  11015. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11016. }
  11017. // Do executes the "dataflow.projects.locations.templates.get" call.
  11018. // Exactly one of *GetTemplateResponse or error will be non-nil. Any
  11019. // non-2xx status code is an error. Response headers are in either
  11020. // *GetTemplateResponse.ServerResponse.Header or (if a response was
  11021. // returned at all) in error.(*googleapi.Error).Header. Use
  11022. // googleapi.IsNotModified to check whether the returned error was
  11023. // because http.StatusNotModified was returned.
  11024. func (c *ProjectsLocationsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) {
  11025. gensupport.SetOptions(c.urlParams_, opts...)
  11026. res, err := c.doRequest("json")
  11027. if res != nil && res.StatusCode == http.StatusNotModified {
  11028. if res.Body != nil {
  11029. res.Body.Close()
  11030. }
  11031. return nil, &googleapi.Error{
  11032. Code: res.StatusCode,
  11033. Header: res.Header,
  11034. }
  11035. }
  11036. if err != nil {
  11037. return nil, err
  11038. }
  11039. defer googleapi.CloseBody(res)
  11040. if err := googleapi.CheckResponse(res); err != nil {
  11041. return nil, err
  11042. }
  11043. ret := &GetTemplateResponse{
  11044. ServerResponse: googleapi.ServerResponse{
  11045. Header: res.Header,
  11046. HTTPStatusCode: res.StatusCode,
  11047. },
  11048. }
  11049. target := &ret
  11050. if err := gensupport.DecodeResponse(target, res); err != nil {
  11051. return nil, err
  11052. }
  11053. return ret, nil
  11054. // {
  11055. // "description": "Get the template associated with a template.",
  11056. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get",
  11057. // "httpMethod": "GET",
  11058. // "id": "dataflow.projects.locations.templates.get",
  11059. // "parameterOrder": [
  11060. // "projectId",
  11061. // "location"
  11062. // ],
  11063. // "parameters": {
  11064. // "gcsPath": {
  11065. // "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.",
  11066. // "location": "query",
  11067. // "type": "string"
  11068. // },
  11069. // "location": {
  11070. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.",
  11071. // "location": "path",
  11072. // "required": true,
  11073. // "type": "string"
  11074. // },
  11075. // "projectId": {
  11076. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  11077. // "location": "path",
  11078. // "required": true,
  11079. // "type": "string"
  11080. // },
  11081. // "view": {
  11082. // "description": "The view to retrieve. Defaults to METADATA_ONLY.",
  11083. // "enum": [
  11084. // "METADATA_ONLY"
  11085. // ],
  11086. // "location": "query",
  11087. // "type": "string"
  11088. // }
  11089. // },
  11090. // "path": "v1b3/projects/{projectId}/locations/{location}/templates:get",
  11091. // "response": {
  11092. // "$ref": "GetTemplateResponse"
  11093. // },
  11094. // "scopes": [
  11095. // "https://www.googleapis.com/auth/cloud-platform",
  11096. // "https://www.googleapis.com/auth/compute",
  11097. // "https://www.googleapis.com/auth/compute.readonly",
  11098. // "https://www.googleapis.com/auth/userinfo.email"
  11099. // ]
  11100. // }
  11101. }
  11102. // method id "dataflow.projects.locations.templates.launch":
  11103. type ProjectsLocationsTemplatesLaunchCall struct {
  11104. s *Service
  11105. projectId string
  11106. location string
  11107. launchtemplateparameters *LaunchTemplateParameters
  11108. urlParams_ gensupport.URLParams
  11109. ctx_ context.Context
  11110. header_ http.Header
  11111. }
  11112. // Launch: Launch a template.
  11113. func (r *ProjectsLocationsTemplatesService) Launch(projectId string, location string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsLocationsTemplatesLaunchCall {
  11114. c := &ProjectsLocationsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11115. c.projectId = projectId
  11116. c.location = location
  11117. c.launchtemplateparameters = launchtemplateparameters
  11118. return c
  11119. }
  11120. // DynamicTemplateGcsPath sets the optional parameter
  11121. // "dynamicTemplate.gcsPath": Path to dynamic template spec file on
  11122. // GCS.
  11123. // The file must be a Json serialized DynamicTemplateFieSpec object.
  11124. func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsLocationsTemplatesLaunchCall {
  11125. c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath)
  11126. return c
  11127. }
  11128. // DynamicTemplateStagingLocation sets the optional parameter
  11129. // "dynamicTemplate.stagingLocation": Cloud Storage path for staging
  11130. // dependencies.
  11131. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  11132. func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsLocationsTemplatesLaunchCall {
  11133. c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation)
  11134. return c
  11135. }
  11136. // GcsPath sets the optional parameter "gcsPath": A Cloud Storage path
  11137. // to the template from which to create
  11138. // the job.
  11139. // Must be valid Cloud Storage URL, beginning with 'gs://'.
  11140. func (c *ProjectsLocationsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesLaunchCall {
  11141. c.urlParams_.Set("gcsPath", gcsPath)
  11142. return c
  11143. }
  11144. // ValidateOnly sets the optional parameter "validateOnly": If true, the
  11145. // request is validated but not actually executed.
  11146. // Defaults to false.
  11147. func (c *ProjectsLocationsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTemplatesLaunchCall {
  11148. c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  11149. return c
  11150. }
  11151. // Fields allows partial responses to be retrieved. See
  11152. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11153. // for more information.
  11154. func (c *ProjectsLocationsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesLaunchCall {
  11155. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11156. return c
  11157. }
  11158. // Context sets the context to be used in this call's Do method. Any
  11159. // pending HTTP request will be aborted if the provided context is
  11160. // canceled.
  11161. func (c *ProjectsLocationsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsTemplatesLaunchCall {
  11162. c.ctx_ = ctx
  11163. return c
  11164. }
  11165. // Header returns an http.Header that can be modified by the caller to
  11166. // add HTTP headers to the request.
  11167. func (c *ProjectsLocationsTemplatesLaunchCall) Header() http.Header {
  11168. if c.header_ == nil {
  11169. c.header_ = make(http.Header)
  11170. }
  11171. return c.header_
  11172. }
  11173. func (c *ProjectsLocationsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) {
  11174. reqHeaders := make(http.Header)
  11175. for k, v := range c.header_ {
  11176. reqHeaders[k] = v
  11177. }
  11178. reqHeaders.Set("User-Agent", c.s.userAgent())
  11179. var body io.Reader = nil
  11180. body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters)
  11181. if err != nil {
  11182. return nil, err
  11183. }
  11184. reqHeaders.Set("Content-Type", "application/json")
  11185. c.urlParams_.Set("alt", alt)
  11186. c.urlParams_.Set("prettyPrint", "false")
  11187. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:launch")
  11188. urls += "?" + c.urlParams_.Encode()
  11189. req, err := http.NewRequest("POST", urls, body)
  11190. if err != nil {
  11191. return nil, err
  11192. }
  11193. req.Header = reqHeaders
  11194. googleapi.Expand(req.URL, map[string]string{
  11195. "projectId": c.projectId,
  11196. "location": c.location,
  11197. })
  11198. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11199. }
  11200. // Do executes the "dataflow.projects.locations.templates.launch" call.
  11201. // Exactly one of *LaunchTemplateResponse or error will be non-nil. Any
  11202. // non-2xx status code is an error. Response headers are in either
  11203. // *LaunchTemplateResponse.ServerResponse.Header or (if a response was
  11204. // returned at all) in error.(*googleapi.Error).Header. Use
  11205. // googleapi.IsNotModified to check whether the returned error was
  11206. // because http.StatusNotModified was returned.
  11207. func (c *ProjectsLocationsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) {
  11208. gensupport.SetOptions(c.urlParams_, opts...)
  11209. res, err := c.doRequest("json")
  11210. if res != nil && res.StatusCode == http.StatusNotModified {
  11211. if res.Body != nil {
  11212. res.Body.Close()
  11213. }
  11214. return nil, &googleapi.Error{
  11215. Code: res.StatusCode,
  11216. Header: res.Header,
  11217. }
  11218. }
  11219. if err != nil {
  11220. return nil, err
  11221. }
  11222. defer googleapi.CloseBody(res)
  11223. if err := googleapi.CheckResponse(res); err != nil {
  11224. return nil, err
  11225. }
  11226. ret := &LaunchTemplateResponse{
  11227. ServerResponse: googleapi.ServerResponse{
  11228. Header: res.Header,
  11229. HTTPStatusCode: res.StatusCode,
  11230. },
  11231. }
  11232. target := &ret
  11233. if err := gensupport.DecodeResponse(target, res); err != nil {
  11234. return nil, err
  11235. }
  11236. return ret, nil
  11237. // {
  11238. // "description": "Launch a template.",
  11239. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch",
  11240. // "httpMethod": "POST",
  11241. // "id": "dataflow.projects.locations.templates.launch",
  11242. // "parameterOrder": [
  11243. // "projectId",
  11244. // "location"
  11245. // ],
  11246. // "parameters": {
  11247. // "dynamicTemplate.gcsPath": {
  11248. // "description": "Path to dynamic template spec file on GCS.\nThe file must be a Json serialized DynamicTemplateFieSpec object.",
  11249. // "location": "query",
  11250. // "type": "string"
  11251. // },
  11252. // "dynamicTemplate.stagingLocation": {
  11253. // "description": "Cloud Storage path for staging dependencies.\nMust be a valid Cloud Storage URL, beginning with `gs://`.",
  11254. // "location": "query",
  11255. // "type": "string"
  11256. // },
  11257. // "gcsPath": {
  11258. // "description": "A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.",
  11259. // "location": "query",
  11260. // "type": "string"
  11261. // },
  11262. // "location": {
  11263. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.",
  11264. // "location": "path",
  11265. // "required": true,
  11266. // "type": "string"
  11267. // },
  11268. // "projectId": {
  11269. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  11270. // "location": "path",
  11271. // "required": true,
  11272. // "type": "string"
  11273. // },
  11274. // "validateOnly": {
  11275. // "description": "If true, the request is validated but not actually executed.\nDefaults to false.",
  11276. // "location": "query",
  11277. // "type": "boolean"
  11278. // }
  11279. // },
  11280. // "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch",
  11281. // "request": {
  11282. // "$ref": "LaunchTemplateParameters"
  11283. // },
  11284. // "response": {
  11285. // "$ref": "LaunchTemplateResponse"
  11286. // },
  11287. // "scopes": [
  11288. // "https://www.googleapis.com/auth/cloud-platform",
  11289. // "https://www.googleapis.com/auth/compute",
  11290. // "https://www.googleapis.com/auth/compute.readonly",
  11291. // "https://www.googleapis.com/auth/userinfo.email"
  11292. // ]
  11293. // }
  11294. }
  11295. // method id "dataflow.projects.templates.create":
  11296. type ProjectsTemplatesCreateCall struct {
  11297. s *Service
  11298. projectId string
  11299. createjobfromtemplaterequest *CreateJobFromTemplateRequest
  11300. urlParams_ gensupport.URLParams
  11301. ctx_ context.Context
  11302. header_ http.Header
  11303. }
  11304. // Create: Creates a Cloud Dataflow job from a template.
  11305. func (r *ProjectsTemplatesService) Create(projectId string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsTemplatesCreateCall {
  11306. c := &ProjectsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11307. c.projectId = projectId
  11308. c.createjobfromtemplaterequest = createjobfromtemplaterequest
  11309. return c
  11310. }
  11311. // Fields allows partial responses to be retrieved. See
  11312. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11313. // for more information.
  11314. func (c *ProjectsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsTemplatesCreateCall {
  11315. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11316. return c
  11317. }
  11318. // Context sets the context to be used in this call's Do method. Any
  11319. // pending HTTP request will be aborted if the provided context is
  11320. // canceled.
  11321. func (c *ProjectsTemplatesCreateCall) Context(ctx context.Context) *ProjectsTemplatesCreateCall {
  11322. c.ctx_ = ctx
  11323. return c
  11324. }
  11325. // Header returns an http.Header that can be modified by the caller to
  11326. // add HTTP headers to the request.
  11327. func (c *ProjectsTemplatesCreateCall) Header() http.Header {
  11328. if c.header_ == nil {
  11329. c.header_ = make(http.Header)
  11330. }
  11331. return c.header_
  11332. }
  11333. func (c *ProjectsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  11334. reqHeaders := make(http.Header)
  11335. for k, v := range c.header_ {
  11336. reqHeaders[k] = v
  11337. }
  11338. reqHeaders.Set("User-Agent", c.s.userAgent())
  11339. var body io.Reader = nil
  11340. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest)
  11341. if err != nil {
  11342. return nil, err
  11343. }
  11344. reqHeaders.Set("Content-Type", "application/json")
  11345. c.urlParams_.Set("alt", alt)
  11346. c.urlParams_.Set("prettyPrint", "false")
  11347. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates")
  11348. urls += "?" + c.urlParams_.Encode()
  11349. req, err := http.NewRequest("POST", urls, body)
  11350. if err != nil {
  11351. return nil, err
  11352. }
  11353. req.Header = reqHeaders
  11354. googleapi.Expand(req.URL, map[string]string{
  11355. "projectId": c.projectId,
  11356. })
  11357. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11358. }
  11359. // Do executes the "dataflow.projects.templates.create" call.
  11360. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  11361. // is an error. Response headers are in either
  11362. // *Job.ServerResponse.Header or (if a response was returned at all) in
  11363. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11364. // whether the returned error was because http.StatusNotModified was
  11365. // returned.
  11366. func (c *ProjectsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  11367. gensupport.SetOptions(c.urlParams_, opts...)
  11368. res, err := c.doRequest("json")
  11369. if res != nil && res.StatusCode == http.StatusNotModified {
  11370. if res.Body != nil {
  11371. res.Body.Close()
  11372. }
  11373. return nil, &googleapi.Error{
  11374. Code: res.StatusCode,
  11375. Header: res.Header,
  11376. }
  11377. }
  11378. if err != nil {
  11379. return nil, err
  11380. }
  11381. defer googleapi.CloseBody(res)
  11382. if err := googleapi.CheckResponse(res); err != nil {
  11383. return nil, err
  11384. }
  11385. ret := &Job{
  11386. ServerResponse: googleapi.ServerResponse{
  11387. Header: res.Header,
  11388. HTTPStatusCode: res.StatusCode,
  11389. },
  11390. }
  11391. target := &ret
  11392. if err := gensupport.DecodeResponse(target, res); err != nil {
  11393. return nil, err
  11394. }
  11395. return ret, nil
  11396. // {
  11397. // "description": "Creates a Cloud Dataflow job from a template.",
  11398. // "flatPath": "v1b3/projects/{projectId}/templates",
  11399. // "httpMethod": "POST",
  11400. // "id": "dataflow.projects.templates.create",
  11401. // "parameterOrder": [
  11402. // "projectId"
  11403. // ],
  11404. // "parameters": {
  11405. // "projectId": {
  11406. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  11407. // "location": "path",
  11408. // "required": true,
  11409. // "type": "string"
  11410. // }
  11411. // },
  11412. // "path": "v1b3/projects/{projectId}/templates",
  11413. // "request": {
  11414. // "$ref": "CreateJobFromTemplateRequest"
  11415. // },
  11416. // "response": {
  11417. // "$ref": "Job"
  11418. // },
  11419. // "scopes": [
  11420. // "https://www.googleapis.com/auth/cloud-platform",
  11421. // "https://www.googleapis.com/auth/compute",
  11422. // "https://www.googleapis.com/auth/compute.readonly",
  11423. // "https://www.googleapis.com/auth/userinfo.email"
  11424. // ]
  11425. // }
  11426. }
  11427. // method id "dataflow.projects.templates.get":
  11428. type ProjectsTemplatesGetCall struct {
  11429. s *Service
  11430. projectId string
  11431. urlParams_ gensupport.URLParams
  11432. ifNoneMatch_ string
  11433. ctx_ context.Context
  11434. header_ http.Header
  11435. }
  11436. // Get: Get the template associated with a template.
  11437. func (r *ProjectsTemplatesService) Get(projectId string) *ProjectsTemplatesGetCall {
  11438. c := &ProjectsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11439. c.projectId = projectId
  11440. return c
  11441. }
  11442. // GcsPath sets the optional parameter "gcsPath": Required. A Cloud
  11443. // Storage path to the template from which to
  11444. // create the job.
  11445. // Must be valid Cloud Storage URL, beginning with 'gs://'.
  11446. func (c *ProjectsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsTemplatesGetCall {
  11447. c.urlParams_.Set("gcsPath", gcsPath)
  11448. return c
  11449. }
  11450. // Location sets the optional parameter "location": The [regional
  11451. // endpoint]
  11452. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  11453. // dpoints) to
  11454. // which to direct the request.
  11455. func (c *ProjectsTemplatesGetCall) Location(location string) *ProjectsTemplatesGetCall {
  11456. c.urlParams_.Set("location", location)
  11457. return c
  11458. }
  11459. // View sets the optional parameter "view": The view to retrieve.
  11460. // Defaults to METADATA_ONLY.
  11461. //
  11462. // Possible values:
  11463. // "METADATA_ONLY"
  11464. func (c *ProjectsTemplatesGetCall) View(view string) *ProjectsTemplatesGetCall {
  11465. c.urlParams_.Set("view", view)
  11466. return c
  11467. }
  11468. // Fields allows partial responses to be retrieved. See
  11469. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11470. // for more information.
  11471. func (c *ProjectsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsTemplatesGetCall {
  11472. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11473. return c
  11474. }
  11475. // IfNoneMatch sets the optional parameter which makes the operation
  11476. // fail if the object's ETag matches the given value. This is useful for
  11477. // getting updates only after the object has changed since the last
  11478. // request. Use googleapi.IsNotModified to check whether the response
  11479. // error from Do is the result of In-None-Match.
  11480. func (c *ProjectsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsTemplatesGetCall {
  11481. c.ifNoneMatch_ = entityTag
  11482. return c
  11483. }
  11484. // Context sets the context to be used in this call's Do method. Any
  11485. // pending HTTP request will be aborted if the provided context is
  11486. // canceled.
  11487. func (c *ProjectsTemplatesGetCall) Context(ctx context.Context) *ProjectsTemplatesGetCall {
  11488. c.ctx_ = ctx
  11489. return c
  11490. }
  11491. // Header returns an http.Header that can be modified by the caller to
  11492. // add HTTP headers to the request.
  11493. func (c *ProjectsTemplatesGetCall) Header() http.Header {
  11494. if c.header_ == nil {
  11495. c.header_ = make(http.Header)
  11496. }
  11497. return c.header_
  11498. }
  11499. func (c *ProjectsTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  11500. reqHeaders := make(http.Header)
  11501. for k, v := range c.header_ {
  11502. reqHeaders[k] = v
  11503. }
  11504. reqHeaders.Set("User-Agent", c.s.userAgent())
  11505. if c.ifNoneMatch_ != "" {
  11506. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11507. }
  11508. var body io.Reader = nil
  11509. c.urlParams_.Set("alt", alt)
  11510. c.urlParams_.Set("prettyPrint", "false")
  11511. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:get")
  11512. urls += "?" + c.urlParams_.Encode()
  11513. req, err := http.NewRequest("GET", urls, body)
  11514. if err != nil {
  11515. return nil, err
  11516. }
  11517. req.Header = reqHeaders
  11518. googleapi.Expand(req.URL, map[string]string{
  11519. "projectId": c.projectId,
  11520. })
  11521. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11522. }
  11523. // Do executes the "dataflow.projects.templates.get" call.
  11524. // Exactly one of *GetTemplateResponse or error will be non-nil. Any
  11525. // non-2xx status code is an error. Response headers are in either
  11526. // *GetTemplateResponse.ServerResponse.Header or (if a response was
  11527. // returned at all) in error.(*googleapi.Error).Header. Use
  11528. // googleapi.IsNotModified to check whether the returned error was
  11529. // because http.StatusNotModified was returned.
  11530. func (c *ProjectsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) {
  11531. gensupport.SetOptions(c.urlParams_, opts...)
  11532. res, err := c.doRequest("json")
  11533. if res != nil && res.StatusCode == http.StatusNotModified {
  11534. if res.Body != nil {
  11535. res.Body.Close()
  11536. }
  11537. return nil, &googleapi.Error{
  11538. Code: res.StatusCode,
  11539. Header: res.Header,
  11540. }
  11541. }
  11542. if err != nil {
  11543. return nil, err
  11544. }
  11545. defer googleapi.CloseBody(res)
  11546. if err := googleapi.CheckResponse(res); err != nil {
  11547. return nil, err
  11548. }
  11549. ret := &GetTemplateResponse{
  11550. ServerResponse: googleapi.ServerResponse{
  11551. Header: res.Header,
  11552. HTTPStatusCode: res.StatusCode,
  11553. },
  11554. }
  11555. target := &ret
  11556. if err := gensupport.DecodeResponse(target, res); err != nil {
  11557. return nil, err
  11558. }
  11559. return ret, nil
  11560. // {
  11561. // "description": "Get the template associated with a template.",
  11562. // "flatPath": "v1b3/projects/{projectId}/templates:get",
  11563. // "httpMethod": "GET",
  11564. // "id": "dataflow.projects.templates.get",
  11565. // "parameterOrder": [
  11566. // "projectId"
  11567. // ],
  11568. // "parameters": {
  11569. // "gcsPath": {
  11570. // "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.",
  11571. // "location": "query",
  11572. // "type": "string"
  11573. // },
  11574. // "location": {
  11575. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.",
  11576. // "location": "query",
  11577. // "type": "string"
  11578. // },
  11579. // "projectId": {
  11580. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  11581. // "location": "path",
  11582. // "required": true,
  11583. // "type": "string"
  11584. // },
  11585. // "view": {
  11586. // "description": "The view to retrieve. Defaults to METADATA_ONLY.",
  11587. // "enum": [
  11588. // "METADATA_ONLY"
  11589. // ],
  11590. // "location": "query",
  11591. // "type": "string"
  11592. // }
  11593. // },
  11594. // "path": "v1b3/projects/{projectId}/templates:get",
  11595. // "response": {
  11596. // "$ref": "GetTemplateResponse"
  11597. // },
  11598. // "scopes": [
  11599. // "https://www.googleapis.com/auth/cloud-platform",
  11600. // "https://www.googleapis.com/auth/compute",
  11601. // "https://www.googleapis.com/auth/compute.readonly",
  11602. // "https://www.googleapis.com/auth/userinfo.email"
  11603. // ]
  11604. // }
  11605. }
  11606. // method id "dataflow.projects.templates.launch":
  11607. type ProjectsTemplatesLaunchCall struct {
  11608. s *Service
  11609. projectId string
  11610. launchtemplateparameters *LaunchTemplateParameters
  11611. urlParams_ gensupport.URLParams
  11612. ctx_ context.Context
  11613. header_ http.Header
  11614. }
  11615. // Launch: Launch a template.
  11616. func (r *ProjectsTemplatesService) Launch(projectId string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsTemplatesLaunchCall {
  11617. c := &ProjectsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11618. c.projectId = projectId
  11619. c.launchtemplateparameters = launchtemplateparameters
  11620. return c
  11621. }
  11622. // DynamicTemplateGcsPath sets the optional parameter
  11623. // "dynamicTemplate.gcsPath": Path to dynamic template spec file on
  11624. // GCS.
  11625. // The file must be a Json serialized DynamicTemplateFieSpec object.
  11626. func (c *ProjectsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsTemplatesLaunchCall {
  11627. c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath)
  11628. return c
  11629. }
  11630. // DynamicTemplateStagingLocation sets the optional parameter
  11631. // "dynamicTemplate.stagingLocation": Cloud Storage path for staging
  11632. // dependencies.
  11633. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  11634. func (c *ProjectsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsTemplatesLaunchCall {
  11635. c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation)
  11636. return c
  11637. }
  11638. // GcsPath sets the optional parameter "gcsPath": A Cloud Storage path
  11639. // to the template from which to create
  11640. // the job.
  11641. // Must be valid Cloud Storage URL, beginning with 'gs://'.
  11642. func (c *ProjectsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsTemplatesLaunchCall {
  11643. c.urlParams_.Set("gcsPath", gcsPath)
  11644. return c
  11645. }
  11646. // Location sets the optional parameter "location": The [regional
  11647. // endpoint]
  11648. // (https://cloud.google.com/dataflow/docs/concepts/regional-en
  11649. // dpoints) to
  11650. // which to direct the request.
  11651. func (c *ProjectsTemplatesLaunchCall) Location(location string) *ProjectsTemplatesLaunchCall {
  11652. c.urlParams_.Set("location", location)
  11653. return c
  11654. }
  11655. // ValidateOnly sets the optional parameter "validateOnly": If true, the
  11656. // request is validated but not actually executed.
  11657. // Defaults to false.
  11658. func (c *ProjectsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsTemplatesLaunchCall {
  11659. c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  11660. return c
  11661. }
  11662. // Fields allows partial responses to be retrieved. See
  11663. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11664. // for more information.
  11665. func (c *ProjectsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsTemplatesLaunchCall {
  11666. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11667. return c
  11668. }
  11669. // Context sets the context to be used in this call's Do method. Any
  11670. // pending HTTP request will be aborted if the provided context is
  11671. // canceled.
  11672. func (c *ProjectsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsTemplatesLaunchCall {
  11673. c.ctx_ = ctx
  11674. return c
  11675. }
  11676. // Header returns an http.Header that can be modified by the caller to
  11677. // add HTTP headers to the request.
  11678. func (c *ProjectsTemplatesLaunchCall) Header() http.Header {
  11679. if c.header_ == nil {
  11680. c.header_ = make(http.Header)
  11681. }
  11682. return c.header_
  11683. }
  11684. func (c *ProjectsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) {
  11685. reqHeaders := make(http.Header)
  11686. for k, v := range c.header_ {
  11687. reqHeaders[k] = v
  11688. }
  11689. reqHeaders.Set("User-Agent", c.s.userAgent())
  11690. var body io.Reader = nil
  11691. body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters)
  11692. if err != nil {
  11693. return nil, err
  11694. }
  11695. reqHeaders.Set("Content-Type", "application/json")
  11696. c.urlParams_.Set("alt", alt)
  11697. c.urlParams_.Set("prettyPrint", "false")
  11698. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:launch")
  11699. urls += "?" + c.urlParams_.Encode()
  11700. req, err := http.NewRequest("POST", urls, body)
  11701. if err != nil {
  11702. return nil, err
  11703. }
  11704. req.Header = reqHeaders
  11705. googleapi.Expand(req.URL, map[string]string{
  11706. "projectId": c.projectId,
  11707. })
  11708. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11709. }
  11710. // Do executes the "dataflow.projects.templates.launch" call.
  11711. // Exactly one of *LaunchTemplateResponse or error will be non-nil. Any
  11712. // non-2xx status code is an error. Response headers are in either
  11713. // *LaunchTemplateResponse.ServerResponse.Header or (if a response was
  11714. // returned at all) in error.(*googleapi.Error).Header. Use
  11715. // googleapi.IsNotModified to check whether the returned error was
  11716. // because http.StatusNotModified was returned.
  11717. func (c *ProjectsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) {
  11718. gensupport.SetOptions(c.urlParams_, opts...)
  11719. res, err := c.doRequest("json")
  11720. if res != nil && res.StatusCode == http.StatusNotModified {
  11721. if res.Body != nil {
  11722. res.Body.Close()
  11723. }
  11724. return nil, &googleapi.Error{
  11725. Code: res.StatusCode,
  11726. Header: res.Header,
  11727. }
  11728. }
  11729. if err != nil {
  11730. return nil, err
  11731. }
  11732. defer googleapi.CloseBody(res)
  11733. if err := googleapi.CheckResponse(res); err != nil {
  11734. return nil, err
  11735. }
  11736. ret := &LaunchTemplateResponse{
  11737. ServerResponse: googleapi.ServerResponse{
  11738. Header: res.Header,
  11739. HTTPStatusCode: res.StatusCode,
  11740. },
  11741. }
  11742. target := &ret
  11743. if err := gensupport.DecodeResponse(target, res); err != nil {
  11744. return nil, err
  11745. }
  11746. return ret, nil
  11747. // {
  11748. // "description": "Launch a template.",
  11749. // "flatPath": "v1b3/projects/{projectId}/templates:launch",
  11750. // "httpMethod": "POST",
  11751. // "id": "dataflow.projects.templates.launch",
  11752. // "parameterOrder": [
  11753. // "projectId"
  11754. // ],
  11755. // "parameters": {
  11756. // "dynamicTemplate.gcsPath": {
  11757. // "description": "Path to dynamic template spec file on GCS.\nThe file must be a Json serialized DynamicTemplateFieSpec object.",
  11758. // "location": "query",
  11759. // "type": "string"
  11760. // },
  11761. // "dynamicTemplate.stagingLocation": {
  11762. // "description": "Cloud Storage path for staging dependencies.\nMust be a valid Cloud Storage URL, beginning with `gs://`.",
  11763. // "location": "query",
  11764. // "type": "string"
  11765. // },
  11766. // "gcsPath": {
  11767. // "description": "A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.",
  11768. // "location": "query",
  11769. // "type": "string"
  11770. // },
  11771. // "location": {
  11772. // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.",
  11773. // "location": "query",
  11774. // "type": "string"
  11775. // },
  11776. // "projectId": {
  11777. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  11778. // "location": "path",
  11779. // "required": true,
  11780. // "type": "string"
  11781. // },
  11782. // "validateOnly": {
  11783. // "description": "If true, the request is validated but not actually executed.\nDefaults to false.",
  11784. // "location": "query",
  11785. // "type": "boolean"
  11786. // }
  11787. // },
  11788. // "path": "v1b3/projects/{projectId}/templates:launch",
  11789. // "request": {
  11790. // "$ref": "LaunchTemplateParameters"
  11791. // },
  11792. // "response": {
  11793. // "$ref": "LaunchTemplateResponse"
  11794. // },
  11795. // "scopes": [
  11796. // "https://www.googleapis.com/auth/cloud-platform",
  11797. // "https://www.googleapis.com/auth/compute",
  11798. // "https://www.googleapis.com/auth/compute.readonly",
  11799. // "https://www.googleapis.com/auth/userinfo.email"
  11800. // ]
  11801. // }
  11802. }