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.
 
 
 

11928 lines
438 KiB

  1. // Package dataflow provides access to the Dataflow API.
  2. //
  3. // See https://cloud.google.com/dataflow
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/dataflow/v1b3"
  8. // ...
  9. // dataflowService, err := dataflow.New(oauthHttpClient)
  10. package dataflow // import "google.golang.org/api/dataflow/v1b3"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "dataflow:v1b3"
  41. const apiName = "dataflow"
  42. const apiVersion = "v1b3"
  43. const basePath = "https://dataflow.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. // View and manage your Google Compute Engine resources
  49. ComputeScope = "https://www.googleapis.com/auth/compute"
  50. // View your Google Compute Engine resources
  51. ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
  52. // View your email address
  53. UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
  54. )
  55. func New(client *http.Client) (*Service, error) {
  56. if client == nil {
  57. return nil, errors.New("client is nil")
  58. }
  59. s := &Service{client: client, BasePath: basePath}
  60. s.Projects = NewProjectsService(s)
  61. return s, nil
  62. }
  63. type Service struct {
  64. client *http.Client
  65. BasePath string // API endpoint base URL
  66. UserAgent string // optional additional User-Agent fragment
  67. Projects *ProjectsService
  68. }
  69. func (s *Service) userAgent() string {
  70. if s.UserAgent == "" {
  71. return googleapi.UserAgent
  72. }
  73. return googleapi.UserAgent + " " + s.UserAgent
  74. }
  75. func NewProjectsService(s *Service) *ProjectsService {
  76. rs := &ProjectsService{s: s}
  77. rs.Jobs = NewProjectsJobsService(s)
  78. rs.Locations = NewProjectsLocationsService(s)
  79. rs.Templates = NewProjectsTemplatesService(s)
  80. return rs
  81. }
  82. type ProjectsService struct {
  83. s *Service
  84. Jobs *ProjectsJobsService
  85. Locations *ProjectsLocationsService
  86. Templates *ProjectsTemplatesService
  87. }
  88. func NewProjectsJobsService(s *Service) *ProjectsJobsService {
  89. rs := &ProjectsJobsService{s: s}
  90. rs.Debug = NewProjectsJobsDebugService(s)
  91. rs.Messages = NewProjectsJobsMessagesService(s)
  92. rs.WorkItems = NewProjectsJobsWorkItemsService(s)
  93. return rs
  94. }
  95. type ProjectsJobsService struct {
  96. s *Service
  97. Debug *ProjectsJobsDebugService
  98. Messages *ProjectsJobsMessagesService
  99. WorkItems *ProjectsJobsWorkItemsService
  100. }
  101. func NewProjectsJobsDebugService(s *Service) *ProjectsJobsDebugService {
  102. rs := &ProjectsJobsDebugService{s: s}
  103. return rs
  104. }
  105. type ProjectsJobsDebugService struct {
  106. s *Service
  107. }
  108. func NewProjectsJobsMessagesService(s *Service) *ProjectsJobsMessagesService {
  109. rs := &ProjectsJobsMessagesService{s: s}
  110. return rs
  111. }
  112. type ProjectsJobsMessagesService struct {
  113. s *Service
  114. }
  115. func NewProjectsJobsWorkItemsService(s *Service) *ProjectsJobsWorkItemsService {
  116. rs := &ProjectsJobsWorkItemsService{s: s}
  117. return rs
  118. }
  119. type ProjectsJobsWorkItemsService struct {
  120. s *Service
  121. }
  122. func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
  123. rs := &ProjectsLocationsService{s: s}
  124. rs.Jobs = NewProjectsLocationsJobsService(s)
  125. rs.Templates = NewProjectsLocationsTemplatesService(s)
  126. return rs
  127. }
  128. type ProjectsLocationsService struct {
  129. s *Service
  130. Jobs *ProjectsLocationsJobsService
  131. Templates *ProjectsLocationsTemplatesService
  132. }
  133. func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService {
  134. rs := &ProjectsLocationsJobsService{s: s}
  135. rs.Debug = NewProjectsLocationsJobsDebugService(s)
  136. rs.Messages = NewProjectsLocationsJobsMessagesService(s)
  137. rs.WorkItems = NewProjectsLocationsJobsWorkItemsService(s)
  138. return rs
  139. }
  140. type ProjectsLocationsJobsService struct {
  141. s *Service
  142. Debug *ProjectsLocationsJobsDebugService
  143. Messages *ProjectsLocationsJobsMessagesService
  144. WorkItems *ProjectsLocationsJobsWorkItemsService
  145. }
  146. func NewProjectsLocationsJobsDebugService(s *Service) *ProjectsLocationsJobsDebugService {
  147. rs := &ProjectsLocationsJobsDebugService{s: s}
  148. return rs
  149. }
  150. type ProjectsLocationsJobsDebugService struct {
  151. s *Service
  152. }
  153. func NewProjectsLocationsJobsMessagesService(s *Service) *ProjectsLocationsJobsMessagesService {
  154. rs := &ProjectsLocationsJobsMessagesService{s: s}
  155. return rs
  156. }
  157. type ProjectsLocationsJobsMessagesService struct {
  158. s *Service
  159. }
  160. func NewProjectsLocationsJobsWorkItemsService(s *Service) *ProjectsLocationsJobsWorkItemsService {
  161. rs := &ProjectsLocationsJobsWorkItemsService{s: s}
  162. return rs
  163. }
  164. type ProjectsLocationsJobsWorkItemsService struct {
  165. s *Service
  166. }
  167. func NewProjectsLocationsTemplatesService(s *Service) *ProjectsLocationsTemplatesService {
  168. rs := &ProjectsLocationsTemplatesService{s: s}
  169. return rs
  170. }
  171. type ProjectsLocationsTemplatesService struct {
  172. s *Service
  173. }
  174. func NewProjectsTemplatesService(s *Service) *ProjectsTemplatesService {
  175. rs := &ProjectsTemplatesService{s: s}
  176. return rs
  177. }
  178. type ProjectsTemplatesService struct {
  179. s *Service
  180. }
  181. // ApproximateProgress: Obsolete in favor of ApproximateReportedProgress
  182. // and ApproximateSplitRequest.
  183. type ApproximateProgress struct {
  184. // PercentComplete: Obsolete.
  185. PercentComplete float64 `json:"percentComplete,omitempty"`
  186. // Position: Obsolete.
  187. Position *Position `json:"position,omitempty"`
  188. // RemainingTime: Obsolete.
  189. RemainingTime string `json:"remainingTime,omitempty"`
  190. // ForceSendFields is a list of field names (e.g. "PercentComplete") to
  191. // unconditionally include in API requests. By default, fields with
  192. // empty values are omitted from API requests. However, any non-pointer,
  193. // non-interface field appearing in ForceSendFields will be sent to the
  194. // server regardless of whether the field is empty or not. This may be
  195. // used to include empty fields in Patch requests.
  196. ForceSendFields []string `json:"-"`
  197. // NullFields is a list of field names (e.g. "PercentComplete") to
  198. // include in API requests with the JSON null value. By default, fields
  199. // with empty values are omitted from API requests. However, any field
  200. // with an empty value appearing in NullFields will be sent to the
  201. // server as null. It is an error if a field in this list has a
  202. // non-empty value. This may be used to include null fields in Patch
  203. // requests.
  204. NullFields []string `json:"-"`
  205. }
  206. func (s *ApproximateProgress) MarshalJSON() ([]byte, error) {
  207. type NoMethod ApproximateProgress
  208. raw := NoMethod(*s)
  209. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  210. }
  211. func (s *ApproximateProgress) UnmarshalJSON(data []byte) error {
  212. type NoMethod ApproximateProgress
  213. var s1 struct {
  214. PercentComplete gensupport.JSONFloat64 `json:"percentComplete"`
  215. *NoMethod
  216. }
  217. s1.NoMethod = (*NoMethod)(s)
  218. if err := json.Unmarshal(data, &s1); err != nil {
  219. return err
  220. }
  221. s.PercentComplete = float64(s1.PercentComplete)
  222. return nil
  223. }
  224. // ApproximateReportedProgress: A progress measurement of a WorkItem by
  225. // a worker.
  226. type ApproximateReportedProgress struct {
  227. // ConsumedParallelism: Total amount of parallelism in the portion of
  228. // input of this task that has
  229. // already been consumed and is no longer active. In the first two
  230. // examples
  231. // above (see remaining_parallelism), the value should be 29 or
  232. // 2
  233. // respectively. The sum of remaining_parallelism and
  234. // consumed_parallelism
  235. // should equal the total amount of parallelism in this work item.
  236. // If
  237. // specified, must be finite.
  238. ConsumedParallelism *ReportedParallelism `json:"consumedParallelism,omitempty"`
  239. // FractionConsumed: Completion as fraction of the input consumed, from
  240. // 0.0 (beginning, nothing
  241. // consumed), to 1.0 (end of the input, entire input consumed).
  242. FractionConsumed float64 `json:"fractionConsumed,omitempty"`
  243. // Position: A Position within the work to represent a progress.
  244. Position *Position `json:"position,omitempty"`
  245. // RemainingParallelism: Total amount of parallelism in the input of
  246. // this task that remains,
  247. // (i.e. can be delegated to this task and any new tasks via
  248. // dynamic
  249. // splitting). Always at least 1 for non-finished work items and 0
  250. // for
  251. // finished.
  252. //
  253. // "Amount of parallelism" refers to how many non-empty parts of the
  254. // input
  255. // can be read in parallel. This does not necessarily equal number
  256. // of records. An input that can be read in parallel down to
  257. // the
  258. // individual records is called "perfectly splittable".
  259. // An example of non-perfectly parallelizable input is a
  260. // block-compressed
  261. // file format where a block of records has to be read as a whole,
  262. // but different blocks can be read in parallel.
  263. //
  264. // Examples:
  265. // * If we are processing record #30 (starting at 1) out of 50 in a
  266. // perfectly
  267. // splittable 50-record input, this value should be 21 (20 remaining +
  268. // 1
  269. // current).
  270. // * If we are reading through block 3 in a block-compressed file
  271. // consisting
  272. // of 5 blocks, this value should be 3 (since blocks 4 and 5 can be
  273. // processed in parallel by new tasks via dynamic splitting and the
  274. // current
  275. // task remains processing block 3).
  276. // * If we are reading through the last block in a block-compressed
  277. // file,
  278. // or reading or processing the last record in a perfectly splittable
  279. // input, this value should be 1, because apart from the current task,
  280. // no
  281. // additional remainder can be split off.
  282. RemainingParallelism *ReportedParallelism `json:"remainingParallelism,omitempty"`
  283. // ForceSendFields is a list of field names (e.g. "ConsumedParallelism")
  284. // to unconditionally include in API requests. By default, fields with
  285. // empty values are omitted from API requests. However, any non-pointer,
  286. // non-interface field appearing in ForceSendFields will be sent to the
  287. // server regardless of whether the field is empty or not. This may be
  288. // used to include empty fields in Patch requests.
  289. ForceSendFields []string `json:"-"`
  290. // NullFields is a list of field names (e.g. "ConsumedParallelism") to
  291. // include in API requests with the JSON null value. By default, fields
  292. // with empty values are omitted from API requests. However, any field
  293. // with an empty value appearing in NullFields will be sent to the
  294. // server as null. It is an error if a field in this list has a
  295. // non-empty value. This may be used to include null fields in Patch
  296. // requests.
  297. NullFields []string `json:"-"`
  298. }
  299. func (s *ApproximateReportedProgress) MarshalJSON() ([]byte, error) {
  300. type NoMethod ApproximateReportedProgress
  301. raw := NoMethod(*s)
  302. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  303. }
  304. func (s *ApproximateReportedProgress) UnmarshalJSON(data []byte) error {
  305. type NoMethod ApproximateReportedProgress
  306. var s1 struct {
  307. FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"`
  308. *NoMethod
  309. }
  310. s1.NoMethod = (*NoMethod)(s)
  311. if err := json.Unmarshal(data, &s1); err != nil {
  312. return err
  313. }
  314. s.FractionConsumed = float64(s1.FractionConsumed)
  315. return nil
  316. }
  317. // ApproximateSplitRequest: A suggestion by the service to the worker to
  318. // dynamically split the WorkItem.
  319. type ApproximateSplitRequest struct {
  320. // FractionConsumed: A fraction at which to split the work item, from
  321. // 0.0 (beginning of the
  322. // input) to 1.0 (end of the input).
  323. FractionConsumed float64 `json:"fractionConsumed,omitempty"`
  324. // Position: A Position at which to split the work item.
  325. Position *Position `json:"position,omitempty"`
  326. // ForceSendFields is a list of field names (e.g. "FractionConsumed") to
  327. // unconditionally include in API requests. By default, fields with
  328. // empty values are omitted from API requests. However, any non-pointer,
  329. // non-interface field appearing in ForceSendFields will be sent to the
  330. // server regardless of whether the field is empty or not. This may be
  331. // used to include empty fields in Patch requests.
  332. ForceSendFields []string `json:"-"`
  333. // NullFields is a list of field names (e.g. "FractionConsumed") to
  334. // include in API requests with the JSON null value. By default, fields
  335. // with empty values are omitted from API requests. However, any field
  336. // with an empty value appearing in NullFields will be sent to the
  337. // server as null. It is an error if a field in this list has a
  338. // non-empty value. This may be used to include null fields in Patch
  339. // requests.
  340. NullFields []string `json:"-"`
  341. }
  342. func (s *ApproximateSplitRequest) MarshalJSON() ([]byte, error) {
  343. type NoMethod ApproximateSplitRequest
  344. raw := NoMethod(*s)
  345. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  346. }
  347. func (s *ApproximateSplitRequest) UnmarshalJSON(data []byte) error {
  348. type NoMethod ApproximateSplitRequest
  349. var s1 struct {
  350. FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"`
  351. *NoMethod
  352. }
  353. s1.NoMethod = (*NoMethod)(s)
  354. if err := json.Unmarshal(data, &s1); err != nil {
  355. return err
  356. }
  357. s.FractionConsumed = float64(s1.FractionConsumed)
  358. return nil
  359. }
  360. // AutoscalingEvent: A structured message reporting an autoscaling
  361. // decision made by the Dataflow
  362. // service.
  363. type AutoscalingEvent struct {
  364. // CurrentNumWorkers: The current number of workers the job has.
  365. CurrentNumWorkers int64 `json:"currentNumWorkers,omitempty,string"`
  366. // Description: A message describing why the system decided to adjust
  367. // the current
  368. // number of workers, why it failed, or why the system decided to
  369. // not make any changes to the number of workers.
  370. Description *StructuredMessage `json:"description,omitempty"`
  371. // EventType: The type of autoscaling event to report.
  372. //
  373. // Possible values:
  374. // "TYPE_UNKNOWN" - Default type for the enum. Value should never be
  375. // returned.
  376. // "TARGET_NUM_WORKERS_CHANGED" - The TARGET_NUM_WORKERS_CHANGED type
  377. // should be used when the target
  378. // worker pool size has changed at the start of an actuation. An
  379. // event
  380. // should always be specified as TARGET_NUM_WORKERS_CHANGED if it
  381. // reflects
  382. // a change in the target_num_workers.
  383. // "CURRENT_NUM_WORKERS_CHANGED" - The CURRENT_NUM_WORKERS_CHANGED
  384. // type should be used when actual worker
  385. // pool size has been changed, but the target_num_workers has not
  386. // changed.
  387. // "ACTUATION_FAILURE" - The ACTUATION_FAILURE type should be used
  388. // when we want to report
  389. // an error to the user indicating why the current number of workers
  390. // in the pool could not be changed.
  391. // Displayed in the current status and history widgets.
  392. // "NO_CHANGE" - Used when we want to report to the user a reason why
  393. // we are
  394. // not currently adjusting the number of workers.
  395. // Should specify both target_num_workers, current_num_workers and
  396. // a
  397. // decision_message.
  398. EventType string `json:"eventType,omitempty"`
  399. // TargetNumWorkers: The target number of workers the worker pool wants
  400. // to resize to use.
  401. TargetNumWorkers int64 `json:"targetNumWorkers,omitempty,string"`
  402. // Time: The time this event was emitted to indicate a new target or
  403. // current
  404. // num_workers value.
  405. Time string `json:"time,omitempty"`
  406. // WorkerPool: A short and friendly name for the worker pool this event
  407. // refers to,
  408. // populated from the value of PoolStageRelation::user_pool_name.
  409. WorkerPool string `json:"workerPool,omitempty"`
  410. // ForceSendFields is a list of field names (e.g. "CurrentNumWorkers")
  411. // to unconditionally include in API requests. By default, fields with
  412. // empty values are omitted from API requests. However, any non-pointer,
  413. // non-interface field appearing in ForceSendFields will be sent to the
  414. // server regardless of whether the field is empty or not. This may be
  415. // used to include empty fields in Patch requests.
  416. ForceSendFields []string `json:"-"`
  417. // NullFields is a list of field names (e.g. "CurrentNumWorkers") to
  418. // include in API requests with the JSON null value. By default, fields
  419. // with empty values are omitted from API requests. However, any field
  420. // with an empty value appearing in NullFields will be sent to the
  421. // server as null. It is an error if a field in this list has a
  422. // non-empty value. This may be used to include null fields in Patch
  423. // requests.
  424. NullFields []string `json:"-"`
  425. }
  426. func (s *AutoscalingEvent) MarshalJSON() ([]byte, error) {
  427. type NoMethod AutoscalingEvent
  428. raw := NoMethod(*s)
  429. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  430. }
  431. // AutoscalingSettings: Settings for WorkerPool autoscaling.
  432. type AutoscalingSettings struct {
  433. // Algorithm: The algorithm to use for autoscaling.
  434. //
  435. // Possible values:
  436. // "AUTOSCALING_ALGORITHM_UNKNOWN" - The algorithm is unknown, or
  437. // unspecified.
  438. // "AUTOSCALING_ALGORITHM_NONE" - Disable autoscaling.
  439. // "AUTOSCALING_ALGORITHM_BASIC" - Increase worker count over time to
  440. // reduce job execution time.
  441. Algorithm string `json:"algorithm,omitempty"`
  442. // MaxNumWorkers: The maximum number of workers to cap scaling at.
  443. MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"`
  444. // ForceSendFields is a list of field names (e.g. "Algorithm") to
  445. // unconditionally include in API requests. By default, fields with
  446. // empty values are omitted from API requests. However, any non-pointer,
  447. // non-interface field appearing in ForceSendFields will be sent to the
  448. // server regardless of whether the field is empty or not. This may be
  449. // used to include empty fields in Patch requests.
  450. ForceSendFields []string `json:"-"`
  451. // NullFields is a list of field names (e.g. "Algorithm") to include in
  452. // API requests with the JSON null value. By default, fields with empty
  453. // values are omitted from API requests. However, any field with an
  454. // empty value appearing in NullFields will be sent to the server as
  455. // null. It is an error if a field in this list has a non-empty value.
  456. // This may be used to include null fields in Patch requests.
  457. NullFields []string `json:"-"`
  458. }
  459. func (s *AutoscalingSettings) MarshalJSON() ([]byte, error) {
  460. type NoMethod AutoscalingSettings
  461. raw := NoMethod(*s)
  462. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  463. }
  464. // CPUTime: Modeled after information exposed by /proc/stat.
  465. type CPUTime struct {
  466. // Rate: Average CPU utilization rate (% non-idle cpu / second) since
  467. // previous
  468. // sample.
  469. Rate float64 `json:"rate,omitempty"`
  470. // Timestamp: Timestamp of the measurement.
  471. Timestamp string `json:"timestamp,omitempty"`
  472. // TotalMs: Total active CPU time across all cores (ie., non-idle) in
  473. // milliseconds
  474. // since start-up.
  475. TotalMs uint64 `json:"totalMs,omitempty,string"`
  476. // ForceSendFields is a list of field names (e.g. "Rate") to
  477. // unconditionally include in API requests. By default, fields with
  478. // empty values are omitted from API requests. However, any non-pointer,
  479. // non-interface field appearing in ForceSendFields will be sent to the
  480. // server regardless of whether the field is empty or not. This may be
  481. // used to include empty fields in Patch requests.
  482. ForceSendFields []string `json:"-"`
  483. // NullFields is a list of field names (e.g. "Rate") to include in API
  484. // requests with the JSON null value. By default, fields with empty
  485. // values are omitted from API requests. However, any field with an
  486. // empty value appearing in NullFields will be sent to the server as
  487. // null. It is an error if a field in this list has a non-empty value.
  488. // This may be used to include null fields in Patch requests.
  489. NullFields []string `json:"-"`
  490. }
  491. func (s *CPUTime) MarshalJSON() ([]byte, error) {
  492. type NoMethod CPUTime
  493. raw := NoMethod(*s)
  494. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  495. }
  496. func (s *CPUTime) UnmarshalJSON(data []byte) error {
  497. type NoMethod CPUTime
  498. var s1 struct {
  499. Rate gensupport.JSONFloat64 `json:"rate"`
  500. *NoMethod
  501. }
  502. s1.NoMethod = (*NoMethod)(s)
  503. if err := json.Unmarshal(data, &s1); err != nil {
  504. return err
  505. }
  506. s.Rate = float64(s1.Rate)
  507. return nil
  508. }
  509. // ComponentSource: Description of an interstitial value between
  510. // transforms in an execution
  511. // stage.
  512. type ComponentSource struct {
  513. // Name: Dataflow service generated name for this source.
  514. Name string `json:"name,omitempty"`
  515. // OriginalTransformOrCollection: User name for the original user
  516. // transform or collection with which this
  517. // source is most closely associated.
  518. OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"`
  519. // UserName: Human-readable name for this transform; may be user or
  520. // system generated.
  521. UserName string `json:"userName,omitempty"`
  522. // ForceSendFields is a list of field names (e.g. "Name") to
  523. // unconditionally include in API requests. By default, fields with
  524. // empty values are omitted from API requests. However, any non-pointer,
  525. // non-interface field appearing in ForceSendFields will be sent to the
  526. // server regardless of whether the field is empty or not. This may be
  527. // used to include empty fields in Patch requests.
  528. ForceSendFields []string `json:"-"`
  529. // NullFields is a list of field names (e.g. "Name") to include in API
  530. // requests with the JSON null value. By default, fields with empty
  531. // values are omitted from API requests. However, any field with an
  532. // empty value appearing in NullFields will be sent to the server as
  533. // null. It is an error if a field in this list has a non-empty value.
  534. // This may be used to include null fields in Patch requests.
  535. NullFields []string `json:"-"`
  536. }
  537. func (s *ComponentSource) MarshalJSON() ([]byte, error) {
  538. type NoMethod ComponentSource
  539. raw := NoMethod(*s)
  540. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  541. }
  542. // ComponentTransform: Description of a transform executed as part of an
  543. // execution stage.
  544. type ComponentTransform struct {
  545. // Name: Dataflow service generated name for this source.
  546. Name string `json:"name,omitempty"`
  547. // OriginalTransform: User name for the original user transform with
  548. // which this transform is
  549. // most closely associated.
  550. OriginalTransform string `json:"originalTransform,omitempty"`
  551. // UserName: Human-readable name for this transform; may be user or
  552. // system generated.
  553. UserName string `json:"userName,omitempty"`
  554. // ForceSendFields is a list of field names (e.g. "Name") to
  555. // unconditionally include in API requests. By default, fields with
  556. // empty values are omitted from API requests. However, any non-pointer,
  557. // non-interface field appearing in ForceSendFields will be sent to the
  558. // server regardless of whether the field is empty or not. This may be
  559. // used to include empty fields in Patch requests.
  560. ForceSendFields []string `json:"-"`
  561. // NullFields is a list of field names (e.g. "Name") to include in API
  562. // requests with the JSON null value. By default, fields with empty
  563. // values are omitted from API requests. However, any field with an
  564. // empty value appearing in NullFields will be sent to the server as
  565. // null. It is an error if a field in this list has a non-empty value.
  566. // This may be used to include null fields in Patch requests.
  567. NullFields []string `json:"-"`
  568. }
  569. func (s *ComponentTransform) MarshalJSON() ([]byte, error) {
  570. type NoMethod ComponentTransform
  571. raw := NoMethod(*s)
  572. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  573. }
  574. // ComputationTopology: All configuration data for a particular
  575. // Computation.
  576. type ComputationTopology struct {
  577. // ComputationId: The ID of the computation.
  578. ComputationId string `json:"computationId,omitempty"`
  579. // Inputs: The inputs to the computation.
  580. Inputs []*StreamLocation `json:"inputs,omitempty"`
  581. // KeyRanges: The key ranges processed by the computation.
  582. KeyRanges []*KeyRangeLocation `json:"keyRanges,omitempty"`
  583. // Outputs: The outputs from the computation.
  584. Outputs []*StreamLocation `json:"outputs,omitempty"`
  585. // StateFamilies: The state family values.
  586. StateFamilies []*StateFamilyConfig `json:"stateFamilies,omitempty"`
  587. // SystemStageName: The system stage name.
  588. SystemStageName string `json:"systemStageName,omitempty"`
  589. // ForceSendFields is a list of field names (e.g. "ComputationId") to
  590. // unconditionally include in API requests. By default, fields with
  591. // empty values are omitted from API requests. However, any non-pointer,
  592. // non-interface field appearing in ForceSendFields will be sent to the
  593. // server regardless of whether the field is empty or not. This may be
  594. // used to include empty fields in Patch requests.
  595. ForceSendFields []string `json:"-"`
  596. // NullFields is a list of field names (e.g. "ComputationId") to include
  597. // in API requests with the JSON null value. By default, fields with
  598. // empty values are omitted from API requests. However, any field with
  599. // an empty value appearing in NullFields will be sent to the server as
  600. // null. It is an error if a field in this list has a non-empty value.
  601. // This may be used to include null fields in Patch requests.
  602. NullFields []string `json:"-"`
  603. }
  604. func (s *ComputationTopology) MarshalJSON() ([]byte, error) {
  605. type NoMethod ComputationTopology
  606. raw := NoMethod(*s)
  607. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  608. }
  609. // ConcatPosition: A position that encapsulates an inner position and an
  610. // index for the inner
  611. // position. A ConcatPosition can be used by a reader of a source
  612. // that
  613. // encapsulates a set of other sources.
  614. type ConcatPosition struct {
  615. // Index: Index of the inner source.
  616. Index int64 `json:"index,omitempty"`
  617. // Position: Position within the inner source.
  618. Position *Position `json:"position,omitempty"`
  619. // ForceSendFields is a list of field names (e.g. "Index") to
  620. // unconditionally include in API requests. By default, fields with
  621. // empty values are omitted from API requests. However, any non-pointer,
  622. // non-interface field appearing in ForceSendFields will be sent to the
  623. // server regardless of whether the field is empty or not. This may be
  624. // used to include empty fields in Patch requests.
  625. ForceSendFields []string `json:"-"`
  626. // NullFields is a list of field names (e.g. "Index") to include in API
  627. // requests with the JSON null value. By default, fields with empty
  628. // values are omitted from API requests. However, any field with an
  629. // empty value appearing in NullFields will be sent to the server as
  630. // null. It is an error if a field in this list has a non-empty value.
  631. // This may be used to include null fields in Patch requests.
  632. NullFields []string `json:"-"`
  633. }
  634. func (s *ConcatPosition) MarshalJSON() ([]byte, error) {
  635. type NoMethod ConcatPosition
  636. raw := NoMethod(*s)
  637. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  638. }
  639. // CounterMetadata: CounterMetadata includes all static non-name
  640. // non-value counter attributes.
  641. type CounterMetadata struct {
  642. // Description: Human-readable description of the counter semantics.
  643. Description string `json:"description,omitempty"`
  644. // Kind: Counter aggregation kind.
  645. //
  646. // Possible values:
  647. // "INVALID" - Counter aggregation kind was not set.
  648. // "SUM" - Aggregated value is the sum of all contributed values.
  649. // "MAX" - Aggregated value is the max of all contributed values.
  650. // "MIN" - Aggregated value is the min of all contributed values.
  651. // "MEAN" - Aggregated value is the mean of all contributed values.
  652. // "OR" - Aggregated value represents the logical 'or' of all
  653. // contributed values.
  654. // "AND" - Aggregated value represents the logical 'and' of all
  655. // contributed values.
  656. // "SET" - Aggregated value is a set of unique contributed values.
  657. // "DISTRIBUTION" - Aggregated value captures statistics about a
  658. // distribution.
  659. // "LATEST_VALUE" - Aggregated value tracks the latest value of a
  660. // variable.
  661. Kind string `json:"kind,omitempty"`
  662. // OtherUnits: A string referring to the unit type.
  663. OtherUnits string `json:"otherUnits,omitempty"`
  664. // StandardUnits: System defined Units, see above enum.
  665. //
  666. // Possible values:
  667. // "BYTES" - Counter returns a value in bytes.
  668. // "BYTES_PER_SEC" - Counter returns a value in bytes per second.
  669. // "MILLISECONDS" - Counter returns a value in milliseconds.
  670. // "MICROSECONDS" - Counter returns a value in microseconds.
  671. // "NANOSECONDS" - Counter returns a value in nanoseconds.
  672. // "TIMESTAMP_MSEC" - Counter returns a timestamp in milliseconds.
  673. // "TIMESTAMP_USEC" - Counter returns a timestamp in microseconds.
  674. // "TIMESTAMP_NSEC" - Counter returns a timestamp in nanoseconds.
  675. StandardUnits string `json:"standardUnits,omitempty"`
  676. // ForceSendFields is a list of field names (e.g. "Description") 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. "Description") to include
  684. // in API requests with the JSON null value. By default, fields with
  685. // empty values are omitted from API requests. However, any field with
  686. // an 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 *CounterMetadata) MarshalJSON() ([]byte, error) {
  692. type NoMethod CounterMetadata
  693. raw := NoMethod(*s)
  694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  695. }
  696. // CounterStructuredName: Identifies a counter within a per-job
  697. // namespace. Counters whose structured
  698. // names are the same get merged into a single value for the job.
  699. type CounterStructuredName struct {
  700. // ComponentStepName: Name of the optimized step being executed by the
  701. // workers.
  702. ComponentStepName string `json:"componentStepName,omitempty"`
  703. // ExecutionStepName: Name of the stage. An execution step contains
  704. // multiple component steps.
  705. ExecutionStepName string `json:"executionStepName,omitempty"`
  706. // InputIndex: Index of an input collection that's being read
  707. // from/written to as a side
  708. // input.
  709. // The index identifies a step's side inputs starting by 1 (e.g. the
  710. // first
  711. // side input has input_index 1, the third has input_index 3).
  712. // Side inputs are identified by a pair of (original_step_name,
  713. // input_index).
  714. // This field helps uniquely identify them.
  715. InputIndex int64 `json:"inputIndex,omitempty"`
  716. // Name: Counter name. Not necessarily globally-unique, but unique
  717. // within the
  718. // context of the other fields.
  719. // Required.
  720. Name string `json:"name,omitempty"`
  721. // Origin: One of the standard Origins defined above.
  722. //
  723. // Possible values:
  724. // "SYSTEM" - Counter was created by the Dataflow system.
  725. // "USER" - Counter was created by the user.
  726. Origin string `json:"origin,omitempty"`
  727. // OriginNamespace: A string containing a more specific namespace of the
  728. // counter's origin.
  729. OriginNamespace string `json:"originNamespace,omitempty"`
  730. // OriginalRequestingStepName: The step name requesting an operation,
  731. // such as GBK.
  732. // I.e. the ParDo causing a read/write from shuffle to occur, or a
  733. // read from side inputs.
  734. OriginalRequestingStepName string `json:"originalRequestingStepName,omitempty"`
  735. // OriginalStepName: System generated name of the original step in the
  736. // user's graph, before
  737. // optimization.
  738. OriginalStepName string `json:"originalStepName,omitempty"`
  739. // Portion: Portion of this counter, either key or value.
  740. //
  741. // Possible values:
  742. // "ALL" - Counter portion has not been set.
  743. // "KEY" - Counter reports a key.
  744. // "VALUE" - Counter reports a value.
  745. Portion string `json:"portion,omitempty"`
  746. // WorkerId: ID of a particular worker.
  747. WorkerId string `json:"workerId,omitempty"`
  748. // ForceSendFields is a list of field names (e.g. "ComponentStepName")
  749. // to unconditionally include in API requests. By default, fields with
  750. // empty values are omitted from API requests. However, any non-pointer,
  751. // non-interface field appearing in ForceSendFields will be sent to the
  752. // server regardless of whether the field is empty or not. This may be
  753. // used to include empty fields in Patch requests.
  754. ForceSendFields []string `json:"-"`
  755. // NullFields is a list of field names (e.g. "ComponentStepName") to
  756. // include in API requests with the JSON null value. By default, fields
  757. // with empty values are omitted from API requests. However, any field
  758. // with an empty value appearing in NullFields will be sent to the
  759. // server as null. It is an error if a field in this list has a
  760. // non-empty value. This may be used to include null fields in Patch
  761. // requests.
  762. NullFields []string `json:"-"`
  763. }
  764. func (s *CounterStructuredName) MarshalJSON() ([]byte, error) {
  765. type NoMethod CounterStructuredName
  766. raw := NoMethod(*s)
  767. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  768. }
  769. // CounterStructuredNameAndMetadata: A single message which encapsulates
  770. // structured name and metadata for a given
  771. // counter.
  772. type CounterStructuredNameAndMetadata struct {
  773. // Metadata: Metadata associated with a counter
  774. Metadata *CounterMetadata `json:"metadata,omitempty"`
  775. // Name: Structured name of the counter.
  776. Name *CounterStructuredName `json:"name,omitempty"`
  777. // ForceSendFields is a list of field names (e.g. "Metadata") to
  778. // unconditionally include in API requests. By default, fields with
  779. // empty values are omitted from API requests. However, any non-pointer,
  780. // non-interface field appearing in ForceSendFields will be sent to the
  781. // server regardless of whether the field is empty or not. This may be
  782. // used to include empty fields in Patch requests.
  783. ForceSendFields []string `json:"-"`
  784. // NullFields is a list of field names (e.g. "Metadata") to include in
  785. // API requests with the JSON null value. By default, fields with empty
  786. // values are omitted from API requests. However, any field with an
  787. // empty value appearing in NullFields will be sent to the server as
  788. // null. It is an error if a field in this list has a non-empty value.
  789. // This may be used to include null fields in Patch requests.
  790. NullFields []string `json:"-"`
  791. }
  792. func (s *CounterStructuredNameAndMetadata) MarshalJSON() ([]byte, error) {
  793. type NoMethod CounterStructuredNameAndMetadata
  794. raw := NoMethod(*s)
  795. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  796. }
  797. // CounterUpdate: An update to a Counter sent from a worker.
  798. type CounterUpdate struct {
  799. // Boolean: Boolean value for And, Or.
  800. Boolean bool `json:"boolean,omitempty"`
  801. // Cumulative: True if this counter is reported as the total cumulative
  802. // aggregate
  803. // value accumulated since the worker started working on this
  804. // WorkItem.
  805. // By default this is false, indicating that this counter is reported
  806. // as a delta.
  807. Cumulative bool `json:"cumulative,omitempty"`
  808. // Distribution: Distribution data
  809. Distribution *DistributionUpdate `json:"distribution,omitempty"`
  810. // FloatingPoint: Floating point value for Sum, Max, Min.
  811. FloatingPoint float64 `json:"floatingPoint,omitempty"`
  812. // FloatingPointList: List of floating point numbers, for Set.
  813. FloatingPointList *FloatingPointList `json:"floatingPointList,omitempty"`
  814. // FloatingPointMean: Floating point mean aggregation value for Mean.
  815. FloatingPointMean *FloatingPointMean `json:"floatingPointMean,omitempty"`
  816. // Integer: Integer value for Sum, Max, Min.
  817. Integer *SplitInt64 `json:"integer,omitempty"`
  818. // IntegerGauge: Gauge data
  819. IntegerGauge *IntegerGauge `json:"integerGauge,omitempty"`
  820. // IntegerList: List of integers, for Set.
  821. IntegerList *IntegerList `json:"integerList,omitempty"`
  822. // IntegerMean: Integer mean aggregation value for Mean.
  823. IntegerMean *IntegerMean `json:"integerMean,omitempty"`
  824. // Internal: Value for internally-defined counters used by the Dataflow
  825. // service.
  826. Internal interface{} `json:"internal,omitempty"`
  827. // NameAndKind: Counter name and aggregation type.
  828. NameAndKind *NameAndKind `json:"nameAndKind,omitempty"`
  829. // ShortId: The service-generated short identifier for this counter.
  830. // The short_id -> (name, metadata) mapping is constant for the lifetime
  831. // of
  832. // a job.
  833. ShortId int64 `json:"shortId,omitempty,string"`
  834. // StringList: List of strings, for Set.
  835. StringList *StringList `json:"stringList,omitempty"`
  836. // StructuredNameAndMetadata: Counter structured name and metadata.
  837. StructuredNameAndMetadata *CounterStructuredNameAndMetadata `json:"structuredNameAndMetadata,omitempty"`
  838. // ForceSendFields is a list of field names (e.g. "Boolean") to
  839. // unconditionally include in API requests. By default, fields with
  840. // empty values are omitted from API requests. However, any non-pointer,
  841. // non-interface field appearing in ForceSendFields will be sent to the
  842. // server regardless of whether the field is empty or not. This may be
  843. // used to include empty fields in Patch requests.
  844. ForceSendFields []string `json:"-"`
  845. // NullFields is a list of field names (e.g. "Boolean") to include in
  846. // API requests with the JSON null value. By default, fields with empty
  847. // values are omitted from API requests. However, any field with an
  848. // empty value appearing in NullFields will be sent to the server as
  849. // null. It is an error if a field in this list has a non-empty value.
  850. // This may be used to include null fields in Patch requests.
  851. NullFields []string `json:"-"`
  852. }
  853. func (s *CounterUpdate) MarshalJSON() ([]byte, error) {
  854. type NoMethod CounterUpdate
  855. raw := NoMethod(*s)
  856. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  857. }
  858. func (s *CounterUpdate) UnmarshalJSON(data []byte) error {
  859. type NoMethod CounterUpdate
  860. var s1 struct {
  861. FloatingPoint gensupport.JSONFloat64 `json:"floatingPoint"`
  862. *NoMethod
  863. }
  864. s1.NoMethod = (*NoMethod)(s)
  865. if err := json.Unmarshal(data, &s1); err != nil {
  866. return err
  867. }
  868. s.FloatingPoint = float64(s1.FloatingPoint)
  869. return nil
  870. }
  871. // CreateJobFromTemplateRequest: A request to create a Cloud Dataflow
  872. // job from a template.
  873. type CreateJobFromTemplateRequest struct {
  874. // Environment: The runtime environment for the job.
  875. Environment *RuntimeEnvironment `json:"environment,omitempty"`
  876. // GcsPath: Required. A Cloud Storage path to the template from which
  877. // to
  878. // create the job.
  879. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  880. GcsPath string `json:"gcsPath,omitempty"`
  881. // JobName: Required. The job name to use for the created job.
  882. JobName string `json:"jobName,omitempty"`
  883. // Location: The location to which to direct the request.
  884. Location string `json:"location,omitempty"`
  885. // Parameters: The runtime parameters to pass to the job.
  886. Parameters map[string]string `json:"parameters,omitempty"`
  887. // ForceSendFields is a list of field names (e.g. "Environment") to
  888. // unconditionally include in API requests. By default, fields with
  889. // empty values are omitted from API requests. However, any non-pointer,
  890. // non-interface field appearing in ForceSendFields will be sent to the
  891. // server regardless of whether the field is empty or not. This may be
  892. // used to include empty fields in Patch requests.
  893. ForceSendFields []string `json:"-"`
  894. // NullFields is a list of field names (e.g. "Environment") to include
  895. // in API requests with the JSON null value. By default, fields with
  896. // empty values are omitted from API requests. However, any field with
  897. // an empty value appearing in NullFields will be sent to the server as
  898. // null. It is an error if a field in this list has a non-empty value.
  899. // This may be used to include null fields in Patch requests.
  900. NullFields []string `json:"-"`
  901. }
  902. func (s *CreateJobFromTemplateRequest) MarshalJSON() ([]byte, error) {
  903. type NoMethod CreateJobFromTemplateRequest
  904. raw := NoMethod(*s)
  905. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  906. }
  907. // CustomSourceLocation: Identifies the location of a custom souce.
  908. type CustomSourceLocation struct {
  909. // Stateful: Whether this source is stateful.
  910. Stateful bool `json:"stateful,omitempty"`
  911. // ForceSendFields is a list of field names (e.g. "Stateful") to
  912. // unconditionally include in API requests. By default, fields with
  913. // empty values are omitted from API requests. However, any non-pointer,
  914. // non-interface field appearing in ForceSendFields will be sent to the
  915. // server regardless of whether the field is empty or not. This may be
  916. // used to include empty fields in Patch requests.
  917. ForceSendFields []string `json:"-"`
  918. // NullFields is a list of field names (e.g. "Stateful") to include in
  919. // API requests with the JSON null value. By default, fields with empty
  920. // values are omitted from API requests. However, any field with an
  921. // empty value appearing in NullFields will be sent to the server as
  922. // null. It is an error if a field in this list has a non-empty value.
  923. // This may be used to include null fields in Patch requests.
  924. NullFields []string `json:"-"`
  925. }
  926. func (s *CustomSourceLocation) MarshalJSON() ([]byte, error) {
  927. type NoMethod CustomSourceLocation
  928. raw := NoMethod(*s)
  929. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  930. }
  931. // DataDiskAssignment: Data disk assignment for a given VM instance.
  932. type DataDiskAssignment struct {
  933. // DataDisks: Mounted data disks. The order is important a data disk's
  934. // 0-based index in
  935. // this list defines which persistent directory the disk is mounted to,
  936. // for
  937. // example the list of { "myproject-1014-104817-4c2-harness-0-disk-0"
  938. // },
  939. // { "myproject-1014-104817-4c2-harness-0-disk-1" }.
  940. DataDisks []string `json:"dataDisks,omitempty"`
  941. // VmInstance: VM instance name the data disks mounted to, for
  942. // example
  943. // "myproject-1014-104817-4c2-harness-0".
  944. VmInstance string `json:"vmInstance,omitempty"`
  945. // ForceSendFields is a list of field names (e.g. "DataDisks") to
  946. // unconditionally include in API requests. By default, fields with
  947. // empty values are omitted from API requests. However, any non-pointer,
  948. // non-interface field appearing in ForceSendFields will be sent to the
  949. // server regardless of whether the field is empty or not. This may be
  950. // used to include empty fields in Patch requests.
  951. ForceSendFields []string `json:"-"`
  952. // NullFields is a list of field names (e.g. "DataDisks") to include in
  953. // API requests with the JSON null value. By default, fields with empty
  954. // values are omitted from API requests. However, any field with an
  955. // empty value appearing in NullFields will be sent to the server as
  956. // null. It is an error if a field in this list has a non-empty value.
  957. // This may be used to include null fields in Patch requests.
  958. NullFields []string `json:"-"`
  959. }
  960. func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) {
  961. type NoMethod DataDiskAssignment
  962. raw := NoMethod(*s)
  963. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  964. }
  965. // DerivedSource: Specification of one of the bundles produced as a
  966. // result of splitting
  967. // a Source (e.g. when executing a SourceSplitRequest, or when
  968. // splitting an active task using
  969. // WorkItemStatus.dynamic_source_split),
  970. // relative to the source being split.
  971. type DerivedSource struct {
  972. // DerivationMode: What source to base the produced source on (if any).
  973. //
  974. // Possible values:
  975. // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is
  976. // unknown, or unspecified.
  977. // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely
  978. // independent Source with no base.
  979. // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based
  980. // on the Source being split.
  981. // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source
  982. // based on the base of the Source being split.
  983. DerivationMode string `json:"derivationMode,omitempty"`
  984. // Source: Specification of the source.
  985. Source *Source `json:"source,omitempty"`
  986. // ForceSendFields is a list of field names (e.g. "DerivationMode") to
  987. // unconditionally include in API requests. By default, fields with
  988. // empty values are omitted from API requests. However, any non-pointer,
  989. // non-interface field appearing in ForceSendFields will be sent to the
  990. // server regardless of whether the field is empty or not. This may be
  991. // used to include empty fields in Patch requests.
  992. ForceSendFields []string `json:"-"`
  993. // NullFields is a list of field names (e.g. "DerivationMode") to
  994. // include in API requests with the JSON null value. By default, fields
  995. // with empty values are omitted from API requests. However, any field
  996. // with an empty value appearing in NullFields will be sent to the
  997. // server as null. It is an error if a field in this list has a
  998. // non-empty value. This may be used to include null fields in Patch
  999. // requests.
  1000. NullFields []string `json:"-"`
  1001. }
  1002. func (s *DerivedSource) MarshalJSON() ([]byte, error) {
  1003. type NoMethod DerivedSource
  1004. raw := NoMethod(*s)
  1005. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1006. }
  1007. // Disk: Describes the data disk used by a workflow job.
  1008. type Disk struct {
  1009. // DiskType: Disk storage type, as defined by Google Compute Engine.
  1010. // This
  1011. // must be a disk type appropriate to the project and zone in which
  1012. // the workers will run. If unknown or unspecified, the service
  1013. // will attempt to choose a reasonable default.
  1014. //
  1015. // For example, the standard persistent disk type is a resource
  1016. // name
  1017. // typically ending in "pd-standard". If SSD persistent disks
  1018. // are
  1019. // available, the resource name typically ends with "pd-ssd".
  1020. // The
  1021. // actual valid values are defined the Google Compute Engine API,
  1022. // not by the Cloud Dataflow API; consult the Google Compute
  1023. // Engine
  1024. // documentation for more information about determining the set
  1025. // of
  1026. // available disk types for a particular project and zone.
  1027. //
  1028. // Google Compute Engine Disk types are local to a particular
  1029. // project in a particular zone, and so the resource name will
  1030. // typically look something like
  1031. // this:
  1032. //
  1033. // compute.googleapis.com/projects/project-id/zones/zone/diskTypes
  1034. // /pd-standard
  1035. DiskType string `json:"diskType,omitempty"`
  1036. // MountPoint: Directory in a VM where disk is mounted.
  1037. MountPoint string `json:"mountPoint,omitempty"`
  1038. // SizeGb: Size of disk in GB. If zero or unspecified, the service
  1039. // will
  1040. // attempt to choose a reasonable default.
  1041. SizeGb int64 `json:"sizeGb,omitempty"`
  1042. // ForceSendFields is a list of field names (e.g. "DiskType") to
  1043. // unconditionally include in API requests. By default, fields with
  1044. // empty values are omitted from API requests. However, any non-pointer,
  1045. // non-interface field appearing in ForceSendFields will be sent to the
  1046. // server regardless of whether the field is empty or not. This may be
  1047. // used to include empty fields in Patch requests.
  1048. ForceSendFields []string `json:"-"`
  1049. // NullFields is a list of field names (e.g. "DiskType") to include in
  1050. // API requests with the JSON null value. By default, fields with empty
  1051. // values are omitted from API requests. However, any field with an
  1052. // empty value appearing in NullFields will be sent to the server as
  1053. // null. It is an error if a field in this list has a non-empty value.
  1054. // This may be used to include null fields in Patch requests.
  1055. NullFields []string `json:"-"`
  1056. }
  1057. func (s *Disk) MarshalJSON() ([]byte, error) {
  1058. type NoMethod Disk
  1059. raw := NoMethod(*s)
  1060. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1061. }
  1062. // DisplayData: Data provided with a pipeline or transform to provide
  1063. // descriptive info.
  1064. type DisplayData struct {
  1065. // BoolValue: Contains value if the data is of a boolean type.
  1066. BoolValue bool `json:"boolValue,omitempty"`
  1067. // DurationValue: Contains value if the data is of duration type.
  1068. DurationValue string `json:"durationValue,omitempty"`
  1069. // FloatValue: Contains value if the data is of float type.
  1070. FloatValue float64 `json:"floatValue,omitempty"`
  1071. // Int64Value: Contains value if the data is of int64 type.
  1072. Int64Value int64 `json:"int64Value,omitempty,string"`
  1073. // JavaClassValue: Contains value if the data is of java class type.
  1074. JavaClassValue string `json:"javaClassValue,omitempty"`
  1075. // Key: The key identifying the display data.
  1076. // This is intended to be used as a label for the display data
  1077. // when viewed in a dax monitoring system.
  1078. Key string `json:"key,omitempty"`
  1079. // Label: An optional label to display in a dax UI for the element.
  1080. Label string `json:"label,omitempty"`
  1081. // Namespace: The namespace for the key. This is usually a class name or
  1082. // programming
  1083. // language namespace (i.e. python module) which defines the display
  1084. // data.
  1085. // This allows a dax monitoring system to specially handle the data
  1086. // and perform custom rendering.
  1087. Namespace string `json:"namespace,omitempty"`
  1088. // ShortStrValue: A possible additional shorter value to display.
  1089. // For example a java_class_name_value of com.mypackage.MyDoFn
  1090. // will be stored with MyDoFn as the short_str_value
  1091. // and
  1092. // com.mypackage.MyDoFn as the java_class_name value.
  1093. // short_str_value can be displayed and java_class_name_value
  1094. // will be displayed as a tooltip.
  1095. ShortStrValue string `json:"shortStrValue,omitempty"`
  1096. // StrValue: Contains value if the data is of string type.
  1097. StrValue string `json:"strValue,omitempty"`
  1098. // TimestampValue: Contains value if the data is of timestamp type.
  1099. TimestampValue string `json:"timestampValue,omitempty"`
  1100. // Url: An optional full URL.
  1101. Url string `json:"url,omitempty"`
  1102. // ForceSendFields is a list of field names (e.g. "BoolValue") to
  1103. // unconditionally include in API requests. By default, fields with
  1104. // empty values are omitted from API requests. However, any non-pointer,
  1105. // non-interface field appearing in ForceSendFields will be sent to the
  1106. // server regardless of whether the field is empty or not. This may be
  1107. // used to include empty fields in Patch requests.
  1108. ForceSendFields []string `json:"-"`
  1109. // NullFields is a list of field names (e.g. "BoolValue") to include in
  1110. // API requests with the JSON null value. By default, fields with empty
  1111. // values are omitted from API requests. However, any field with an
  1112. // empty value appearing in NullFields will be sent to the server as
  1113. // null. It is an error if a field in this list has a non-empty value.
  1114. // This may be used to include null fields in Patch requests.
  1115. NullFields []string `json:"-"`
  1116. }
  1117. func (s *DisplayData) MarshalJSON() ([]byte, error) {
  1118. type NoMethod DisplayData
  1119. raw := NoMethod(*s)
  1120. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1121. }
  1122. func (s *DisplayData) UnmarshalJSON(data []byte) error {
  1123. type NoMethod DisplayData
  1124. var s1 struct {
  1125. FloatValue gensupport.JSONFloat64 `json:"floatValue"`
  1126. *NoMethod
  1127. }
  1128. s1.NoMethod = (*NoMethod)(s)
  1129. if err := json.Unmarshal(data, &s1); err != nil {
  1130. return err
  1131. }
  1132. s.FloatValue = float64(s1.FloatValue)
  1133. return nil
  1134. }
  1135. // DistributionUpdate: A metric value representing a distribution.
  1136. type DistributionUpdate struct {
  1137. // Count: The count of the number of elements present in the
  1138. // distribution.
  1139. Count *SplitInt64 `json:"count,omitempty"`
  1140. // Histogram: (Optional) Histogram of value counts for the distribution.
  1141. Histogram *Histogram `json:"histogram,omitempty"`
  1142. // Max: The maximum value present in the distribution.
  1143. Max *SplitInt64 `json:"max,omitempty"`
  1144. // Min: The minimum value present in the distribution.
  1145. Min *SplitInt64 `json:"min,omitempty"`
  1146. // Sum: Use an int64 since we'd prefer the added precision. If overflow
  1147. // is a common
  1148. // problem we can detect it and use an additional int64 or a double.
  1149. Sum *SplitInt64 `json:"sum,omitempty"`
  1150. // SumOfSquares: Use a double since the sum of squares is likely to
  1151. // overflow int64.
  1152. SumOfSquares float64 `json:"sumOfSquares,omitempty"`
  1153. // ForceSendFields is a list of field names (e.g. "Count") to
  1154. // unconditionally include in API requests. By default, fields with
  1155. // empty values are omitted from API requests. However, any non-pointer,
  1156. // non-interface field appearing in ForceSendFields will be sent to the
  1157. // server regardless of whether the field is empty or not. This may be
  1158. // used to include empty fields in Patch requests.
  1159. ForceSendFields []string `json:"-"`
  1160. // NullFields is a list of field names (e.g. "Count") to include in API
  1161. // requests with the JSON null value. By default, fields with empty
  1162. // values are omitted from API requests. However, any field with an
  1163. // empty value appearing in NullFields will be sent to the server as
  1164. // null. It is an error if a field in this list has a non-empty value.
  1165. // This may be used to include null fields in Patch requests.
  1166. NullFields []string `json:"-"`
  1167. }
  1168. func (s *DistributionUpdate) MarshalJSON() ([]byte, error) {
  1169. type NoMethod DistributionUpdate
  1170. raw := NoMethod(*s)
  1171. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1172. }
  1173. func (s *DistributionUpdate) UnmarshalJSON(data []byte) error {
  1174. type NoMethod DistributionUpdate
  1175. var s1 struct {
  1176. SumOfSquares gensupport.JSONFloat64 `json:"sumOfSquares"`
  1177. *NoMethod
  1178. }
  1179. s1.NoMethod = (*NoMethod)(s)
  1180. if err := json.Unmarshal(data, &s1); err != nil {
  1181. return err
  1182. }
  1183. s.SumOfSquares = float64(s1.SumOfSquares)
  1184. return nil
  1185. }
  1186. // DynamicSourceSplit: When a task splits using
  1187. // WorkItemStatus.dynamic_source_split, this
  1188. // message describes the two parts of the split relative to
  1189. // the
  1190. // description of the current task's input.
  1191. type DynamicSourceSplit struct {
  1192. // Primary: Primary part (continued to be processed by
  1193. // worker).
  1194. // Specified relative to the previously-current source.
  1195. // Becomes current.
  1196. Primary *DerivedSource `json:"primary,omitempty"`
  1197. // Residual: Residual part (returned to the pool of work).
  1198. // Specified relative to the previously-current source.
  1199. Residual *DerivedSource `json:"residual,omitempty"`
  1200. // ForceSendFields is a list of field names (e.g. "Primary") to
  1201. // unconditionally include in API requests. By default, fields with
  1202. // empty values are omitted from API requests. However, any non-pointer,
  1203. // non-interface field appearing in ForceSendFields will be sent to the
  1204. // server regardless of whether the field is empty or not. This may be
  1205. // used to include empty fields in Patch requests.
  1206. ForceSendFields []string `json:"-"`
  1207. // NullFields is a list of field names (e.g. "Primary") to include in
  1208. // API requests with the JSON null value. By default, fields with empty
  1209. // values are omitted from API requests. However, any field with an
  1210. // empty value appearing in NullFields will be sent to the server as
  1211. // null. It is an error if a field in this list has a non-empty value.
  1212. // This may be used to include null fields in Patch requests.
  1213. NullFields []string `json:"-"`
  1214. }
  1215. func (s *DynamicSourceSplit) MarshalJSON() ([]byte, error) {
  1216. type NoMethod DynamicSourceSplit
  1217. raw := NoMethod(*s)
  1218. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1219. }
  1220. // Environment: Describes the environment in which a Dataflow Job runs.
  1221. type Environment struct {
  1222. // ClusterManagerApiService: The type of cluster manager API to use. If
  1223. // unknown or
  1224. // unspecified, the service will attempt to choose a reasonable
  1225. // default. This should be in the form of the API service name,
  1226. // e.g. "compute.googleapis.com".
  1227. ClusterManagerApiService string `json:"clusterManagerApiService,omitempty"`
  1228. // Dataset: The dataset for the current project where various
  1229. // workflow
  1230. // related tables are stored.
  1231. //
  1232. // The supported resource type is:
  1233. //
  1234. // Google BigQuery:
  1235. // bigquery.googleapis.com/{dataset}
  1236. Dataset string `json:"dataset,omitempty"`
  1237. // Experiments: The list of experiments to enable.
  1238. Experiments []string `json:"experiments,omitempty"`
  1239. // InternalExperiments: Experimental settings.
  1240. InternalExperiments googleapi.RawMessage `json:"internalExperiments,omitempty"`
  1241. // SdkPipelineOptions: The Cloud Dataflow SDK pipeline options specified
  1242. // by the user. These
  1243. // options are passed through the service and are used to recreate
  1244. // the
  1245. // SDK pipeline options on the worker in a language agnostic and
  1246. // platform
  1247. // independent way.
  1248. SdkPipelineOptions googleapi.RawMessage `json:"sdkPipelineOptions,omitempty"`
  1249. // ServiceAccountEmail: Identity to run virtual machines as. Defaults to
  1250. // the default account.
  1251. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
  1252. // TempStoragePrefix: The prefix of the resources the system should use
  1253. // for temporary
  1254. // storage. The system will append the suffix "/temp-{JOBNAME} to
  1255. // this resource prefix, where {JOBNAME} is the value of the
  1256. // job_name field. The resulting bucket and object prefix is used
  1257. // as the prefix of the resources used to store temporary data
  1258. // needed during the job execution. NOTE: This will override the
  1259. // value in taskrunner_settings.
  1260. // The supported resource type is:
  1261. //
  1262. // Google Cloud Storage:
  1263. //
  1264. // storage.googleapis.com/{bucket}/{object}
  1265. // bucket.storage.googleapis.com/{object}
  1266. TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
  1267. // UserAgent: A description of the process that generated the request.
  1268. UserAgent googleapi.RawMessage `json:"userAgent,omitempty"`
  1269. // Version: A structure describing which components and their versions
  1270. // of the service
  1271. // are required in order to run the job.
  1272. Version googleapi.RawMessage `json:"version,omitempty"`
  1273. // WorkerPools: The worker pools. At least one "harness" worker pool
  1274. // must be
  1275. // specified in order for the job to have workers.
  1276. WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
  1277. // ForceSendFields is a list of field names (e.g.
  1278. // "ClusterManagerApiService") to unconditionally include in API
  1279. // requests. By default, fields with empty values are omitted from API
  1280. // requests. However, any non-pointer, non-interface field appearing in
  1281. // ForceSendFields will be sent to the server regardless of whether the
  1282. // field is empty or not. This may be used to include empty fields in
  1283. // Patch requests.
  1284. ForceSendFields []string `json:"-"`
  1285. // NullFields is a list of field names (e.g. "ClusterManagerApiService")
  1286. // to include in API requests with the JSON null value. By default,
  1287. // fields with empty values are omitted from API requests. However, any
  1288. // field with an empty value appearing in NullFields will be sent to the
  1289. // server as null. It is an error if a field in this list has a
  1290. // non-empty value. This may be used to include null fields in Patch
  1291. // requests.
  1292. NullFields []string `json:"-"`
  1293. }
  1294. func (s *Environment) MarshalJSON() ([]byte, error) {
  1295. type NoMethod Environment
  1296. raw := NoMethod(*s)
  1297. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1298. }
  1299. // ExecutionStageState: A message describing the state of a particular
  1300. // execution stage.
  1301. type ExecutionStageState struct {
  1302. // CurrentStateTime: The time at which the stage transitioned to this
  1303. // state.
  1304. CurrentStateTime string `json:"currentStateTime,omitempty"`
  1305. // ExecutionStageName: The name of the execution stage.
  1306. ExecutionStageName string `json:"executionStageName,omitempty"`
  1307. // ExecutionStageState: Executions stage states allow the same set of
  1308. // values as JobState.
  1309. //
  1310. // Possible values:
  1311. // "JOB_STATE_UNKNOWN" - The job's run state isn't specified.
  1312. // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job
  1313. // has not
  1314. // yet started to run.
  1315. // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is
  1316. // currently running.
  1317. // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has
  1318. // successfully completed.
  1319. // This is a terminal job state. This state may be set by the Cloud
  1320. // Dataflow
  1321. // service, as a transition from `JOB_STATE_RUNNING`. It may also be set
  1322. // via a
  1323. // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a
  1324. // terminal
  1325. // state.
  1326. // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has
  1327. // failed. This is a
  1328. // terminal job state. This state may only be set by the Cloud
  1329. // Dataflow
  1330. // service, and only as a transition from `JOB_STATE_RUNNING`.
  1331. // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the
  1332. // job has been explicitly
  1333. // cancelled. This is a terminal job state. This state may only be
  1334. // set via a Cloud Dataflow `UpdateJob` call, and only if the job has
  1335. // not
  1336. // yet reached another terminal state.
  1337. // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job
  1338. // was successfully updated,
  1339. // meaning that this job was stopped and another job was started,
  1340. // inheriting
  1341. // state from this one. This is a terminal job state. This state may
  1342. // only be
  1343. // set by the Cloud Dataflow service, and only as a transition
  1344. // from
  1345. // `JOB_STATE_RUNNING`.
  1346. // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job
  1347. // is in the process of draining.
  1348. // A draining job has stopped pulling from its input sources and is
  1349. // processing
  1350. // any data that remains in-flight. This state may be set via a Cloud
  1351. // Dataflow
  1352. // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`.
  1353. // Jobs
  1354. // that are draining may only transition to
  1355. // `JOB_STATE_DRAINED`,
  1356. // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.
  1357. // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job
  1358. // has been drained.
  1359. // A drained job terminated by stopping pulling from its input sources
  1360. // and
  1361. // processing any data that remained in-flight when draining was
  1362. // requested.
  1363. // This state is a terminal state, may only be set by the Cloud
  1364. // Dataflow
  1365. // service, and only as a transition from `JOB_STATE_DRAINING`.
  1366. // "JOB_STATE_PENDING" - 'JOB_STATE_PENDING' indicates that the job
  1367. // has been created but is not yet
  1368. // running. Jobs that are pending may only transition to
  1369. // `JOB_STATE_RUNNING`,
  1370. // or `JOB_STATE_FAILED`.
  1371. // "JOB_STATE_CANCELLING" - 'JOB_STATE_CANCELLING' indicates that the
  1372. // job has been explicitly cancelled
  1373. // and is in the process of stopping. Jobs that are cancelling may
  1374. // only
  1375. // transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'.
  1376. ExecutionStageState string `json:"executionStageState,omitempty"`
  1377. // ForceSendFields is a list of field names (e.g. "CurrentStateTime") to
  1378. // unconditionally include in API requests. By default, fields with
  1379. // empty values are omitted from API requests. However, any non-pointer,
  1380. // non-interface field appearing in ForceSendFields will be sent to the
  1381. // server regardless of whether the field is empty or not. This may be
  1382. // used to include empty fields in Patch requests.
  1383. ForceSendFields []string `json:"-"`
  1384. // NullFields is a list of field names (e.g. "CurrentStateTime") to
  1385. // include in API requests with the JSON null value. By default, fields
  1386. // with empty values are omitted from API requests. However, any field
  1387. // with an empty value appearing in NullFields will be sent to the
  1388. // server as null. It is an error if a field in this list has a
  1389. // non-empty value. This may be used to include null fields in Patch
  1390. // requests.
  1391. NullFields []string `json:"-"`
  1392. }
  1393. func (s *ExecutionStageState) MarshalJSON() ([]byte, error) {
  1394. type NoMethod ExecutionStageState
  1395. raw := NoMethod(*s)
  1396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1397. }
  1398. // ExecutionStageSummary: Description of the composing transforms,
  1399. // names/ids, and input/outputs of a
  1400. // stage of execution. Some composing transforms and sources may have
  1401. // been
  1402. // generated by the Dataflow service during execution planning.
  1403. type ExecutionStageSummary struct {
  1404. // ComponentSource: Collections produced and consumed by component
  1405. // transforms of this stage.
  1406. ComponentSource []*ComponentSource `json:"componentSource,omitempty"`
  1407. // ComponentTransform: Transforms that comprise this execution stage.
  1408. ComponentTransform []*ComponentTransform `json:"componentTransform,omitempty"`
  1409. // Id: Dataflow service generated id for this stage.
  1410. Id string `json:"id,omitempty"`
  1411. // InputSource: Input sources for this stage.
  1412. InputSource []*StageSource `json:"inputSource,omitempty"`
  1413. // Kind: Type of tranform this stage is executing.
  1414. //
  1415. // Possible values:
  1416. // "UNKNOWN_KIND" - Unrecognized transform type.
  1417. // "PAR_DO_KIND" - ParDo transform.
  1418. // "GROUP_BY_KEY_KIND" - Group By Key transform.
  1419. // "FLATTEN_KIND" - Flatten transform.
  1420. // "READ_KIND" - Read transform.
  1421. // "WRITE_KIND" - Write transform.
  1422. // "CONSTANT_KIND" - Constructs from a constant value, such as with
  1423. // Create.of.
  1424. // "SINGLETON_KIND" - Creates a Singleton view of a collection.
  1425. // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as
  1426. // part of a GroupByKey.
  1427. Kind string `json:"kind,omitempty"`
  1428. // Name: Dataflow service generated name for this stage.
  1429. Name string `json:"name,omitempty"`
  1430. // OutputSource: Output sources for this stage.
  1431. OutputSource []*StageSource `json:"outputSource,omitempty"`
  1432. // ForceSendFields is a list of field names (e.g. "ComponentSource") to
  1433. // unconditionally include in API requests. By default, fields with
  1434. // empty values are omitted from API requests. However, any non-pointer,
  1435. // non-interface field appearing in ForceSendFields will be sent to the
  1436. // server regardless of whether the field is empty or not. This may be
  1437. // used to include empty fields in Patch requests.
  1438. ForceSendFields []string `json:"-"`
  1439. // NullFields is a list of field names (e.g. "ComponentSource") to
  1440. // include in API requests with the JSON null value. By default, fields
  1441. // with empty values are omitted from API requests. However, any field
  1442. // with an empty value appearing in NullFields will be sent to the
  1443. // server as null. It is an error if a field in this list has a
  1444. // non-empty value. This may be used to include null fields in Patch
  1445. // requests.
  1446. NullFields []string `json:"-"`
  1447. }
  1448. func (s *ExecutionStageSummary) MarshalJSON() ([]byte, error) {
  1449. type NoMethod ExecutionStageSummary
  1450. raw := NoMethod(*s)
  1451. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1452. }
  1453. // FailedLocation: Indicates which location failed to respond to a
  1454. // request for data.
  1455. type FailedLocation struct {
  1456. // Name: The name of the failed location.
  1457. Name string `json:"name,omitempty"`
  1458. // ForceSendFields is a list of field names (e.g. "Name") to
  1459. // unconditionally include in API requests. By default, fields with
  1460. // empty values are omitted from API requests. However, any non-pointer,
  1461. // non-interface field appearing in ForceSendFields will be sent to the
  1462. // server regardless of whether the field is empty or not. This may be
  1463. // used to include empty fields in Patch requests.
  1464. ForceSendFields []string `json:"-"`
  1465. // NullFields is a list of field names (e.g. "Name") to include in API
  1466. // requests with the JSON null value. By default, fields with empty
  1467. // values are omitted from API requests. However, any field with an
  1468. // empty value appearing in NullFields will be sent to the server as
  1469. // null. It is an error if a field in this list has a non-empty value.
  1470. // This may be used to include null fields in Patch requests.
  1471. NullFields []string `json:"-"`
  1472. }
  1473. func (s *FailedLocation) MarshalJSON() ([]byte, error) {
  1474. type NoMethod FailedLocation
  1475. raw := NoMethod(*s)
  1476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1477. }
  1478. // FlattenInstruction: An instruction that copies its inputs (zero or
  1479. // more) to its (single) output.
  1480. type FlattenInstruction struct {
  1481. // Inputs: Describes the inputs to the flatten instruction.
  1482. Inputs []*InstructionInput `json:"inputs,omitempty"`
  1483. // ForceSendFields is a list of field names (e.g. "Inputs") to
  1484. // unconditionally include in API requests. By default, fields with
  1485. // empty values are omitted from API requests. However, any non-pointer,
  1486. // non-interface field appearing in ForceSendFields will be sent to the
  1487. // server regardless of whether the field is empty or not. This may be
  1488. // used to include empty fields in Patch requests.
  1489. ForceSendFields []string `json:"-"`
  1490. // NullFields is a list of field names (e.g. "Inputs") to include in API
  1491. // requests with the JSON null value. By default, fields with empty
  1492. // values are omitted from API requests. However, any field with an
  1493. // empty value appearing in NullFields will be sent to the server as
  1494. // null. It is an error if a field in this list has a non-empty value.
  1495. // This may be used to include null fields in Patch requests.
  1496. NullFields []string `json:"-"`
  1497. }
  1498. func (s *FlattenInstruction) MarshalJSON() ([]byte, error) {
  1499. type NoMethod FlattenInstruction
  1500. raw := NoMethod(*s)
  1501. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1502. }
  1503. // FloatingPointList: A metric value representing a list of floating
  1504. // point numbers.
  1505. type FloatingPointList struct {
  1506. // Elements: Elements of the list.
  1507. Elements []float64 `json:"elements,omitempty"`
  1508. // ForceSendFields is a list of field names (e.g. "Elements") to
  1509. // unconditionally include in API requests. By default, fields with
  1510. // empty values are omitted from API requests. However, any non-pointer,
  1511. // non-interface field appearing in ForceSendFields will be sent to the
  1512. // server regardless of whether the field is empty or not. This may be
  1513. // used to include empty fields in Patch requests.
  1514. ForceSendFields []string `json:"-"`
  1515. // NullFields is a list of field names (e.g. "Elements") to include in
  1516. // API requests with the JSON null value. By default, fields with empty
  1517. // values are omitted from API requests. However, any field with an
  1518. // empty value appearing in NullFields will be sent to the server as
  1519. // null. It is an error if a field in this list has a non-empty value.
  1520. // This may be used to include null fields in Patch requests.
  1521. NullFields []string `json:"-"`
  1522. }
  1523. func (s *FloatingPointList) MarshalJSON() ([]byte, error) {
  1524. type NoMethod FloatingPointList
  1525. raw := NoMethod(*s)
  1526. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1527. }
  1528. // FloatingPointMean: A representation of a floating point mean metric
  1529. // contribution.
  1530. type FloatingPointMean struct {
  1531. // Count: The number of values being aggregated.
  1532. Count *SplitInt64 `json:"count,omitempty"`
  1533. // Sum: The sum of all values being aggregated.
  1534. Sum float64 `json:"sum,omitempty"`
  1535. // ForceSendFields is a list of field names (e.g. "Count") to
  1536. // unconditionally include in API requests. By default, fields with
  1537. // empty values are omitted from API requests. However, any non-pointer,
  1538. // non-interface field appearing in ForceSendFields will be sent to the
  1539. // server regardless of whether the field is empty or not. This may be
  1540. // used to include empty fields in Patch requests.
  1541. ForceSendFields []string `json:"-"`
  1542. // NullFields is a list of field names (e.g. "Count") to include in API
  1543. // requests with the JSON null value. By default, fields with empty
  1544. // values are omitted from API requests. However, any field with an
  1545. // empty value appearing in NullFields will be sent to the server as
  1546. // null. It is an error if a field in this list has a non-empty value.
  1547. // This may be used to include null fields in Patch requests.
  1548. NullFields []string `json:"-"`
  1549. }
  1550. func (s *FloatingPointMean) MarshalJSON() ([]byte, error) {
  1551. type NoMethod FloatingPointMean
  1552. raw := NoMethod(*s)
  1553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1554. }
  1555. func (s *FloatingPointMean) UnmarshalJSON(data []byte) error {
  1556. type NoMethod FloatingPointMean
  1557. var s1 struct {
  1558. Sum gensupport.JSONFloat64 `json:"sum"`
  1559. *NoMethod
  1560. }
  1561. s1.NoMethod = (*NoMethod)(s)
  1562. if err := json.Unmarshal(data, &s1); err != nil {
  1563. return err
  1564. }
  1565. s.Sum = float64(s1.Sum)
  1566. return nil
  1567. }
  1568. // GetDebugConfigRequest: Request to get updated debug configuration for
  1569. // component.
  1570. type GetDebugConfigRequest struct {
  1571. // ComponentId: The internal component id for which debug configuration
  1572. // is
  1573. // requested.
  1574. ComponentId string `json:"componentId,omitempty"`
  1575. // Location: The location which contains the job specified by job_id.
  1576. Location string `json:"location,omitempty"`
  1577. // WorkerId: The worker id, i.e., VM hostname.
  1578. WorkerId string `json:"workerId,omitempty"`
  1579. // ForceSendFields is a list of field names (e.g. "ComponentId") to
  1580. // unconditionally include in API requests. By default, fields with
  1581. // empty values are omitted from API requests. However, any non-pointer,
  1582. // non-interface field appearing in ForceSendFields will be sent to the
  1583. // server regardless of whether the field is empty or not. This may be
  1584. // used to include empty fields in Patch requests.
  1585. ForceSendFields []string `json:"-"`
  1586. // NullFields is a list of field names (e.g. "ComponentId") to include
  1587. // in API requests with the JSON null value. By default, fields with
  1588. // empty values are omitted from API requests. However, any field with
  1589. // an empty value appearing in NullFields will be sent to the server as
  1590. // null. It is an error if a field in this list has a non-empty value.
  1591. // This may be used to include null fields in Patch requests.
  1592. NullFields []string `json:"-"`
  1593. }
  1594. func (s *GetDebugConfigRequest) MarshalJSON() ([]byte, error) {
  1595. type NoMethod GetDebugConfigRequest
  1596. raw := NoMethod(*s)
  1597. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1598. }
  1599. // GetDebugConfigResponse: Response to a get debug configuration
  1600. // request.
  1601. type GetDebugConfigResponse struct {
  1602. // Config: The encoded debug configuration for the requested component.
  1603. Config string `json:"config,omitempty"`
  1604. // ServerResponse contains the HTTP response code and headers from the
  1605. // server.
  1606. googleapi.ServerResponse `json:"-"`
  1607. // ForceSendFields is a list of field names (e.g. "Config") to
  1608. // unconditionally include in API requests. By default, fields with
  1609. // empty values are omitted from API requests. However, any non-pointer,
  1610. // non-interface field appearing in ForceSendFields will be sent to the
  1611. // server regardless of whether the field is empty or not. This may be
  1612. // used to include empty fields in Patch requests.
  1613. ForceSendFields []string `json:"-"`
  1614. // NullFields is a list of field names (e.g. "Config") to include in API
  1615. // requests with the JSON null value. By default, fields with empty
  1616. // values are omitted from API requests. However, any field with an
  1617. // empty value appearing in NullFields will be sent to the server as
  1618. // null. It is an error if a field in this list has a non-empty value.
  1619. // This may be used to include null fields in Patch requests.
  1620. NullFields []string `json:"-"`
  1621. }
  1622. func (s *GetDebugConfigResponse) MarshalJSON() ([]byte, error) {
  1623. type NoMethod GetDebugConfigResponse
  1624. raw := NoMethod(*s)
  1625. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1626. }
  1627. // GetTemplateResponse: The response to a GetTemplate request.
  1628. type GetTemplateResponse struct {
  1629. // Metadata: The template metadata describing the template name,
  1630. // available
  1631. // parameters, etc.
  1632. Metadata *TemplateMetadata `json:"metadata,omitempty"`
  1633. // Status: The status of the get template request. Any problems with
  1634. // the
  1635. // request will be indicated in the error_details.
  1636. Status *Status `json:"status,omitempty"`
  1637. // ServerResponse contains the HTTP response code and headers from the
  1638. // server.
  1639. googleapi.ServerResponse `json:"-"`
  1640. // ForceSendFields is a list of field names (e.g. "Metadata") to
  1641. // unconditionally include in API requests. By default, fields with
  1642. // empty values are omitted from API requests. However, any non-pointer,
  1643. // non-interface field appearing in ForceSendFields will be sent to the
  1644. // server regardless of whether the field is empty or not. This may be
  1645. // used to include empty fields in Patch requests.
  1646. ForceSendFields []string `json:"-"`
  1647. // NullFields is a list of field names (e.g. "Metadata") to include in
  1648. // API requests with the JSON null value. By default, fields with empty
  1649. // values are omitted from API requests. However, any field with an
  1650. // empty value appearing in NullFields will be sent to the server as
  1651. // null. It is an error if a field in this list has a non-empty value.
  1652. // This may be used to include null fields in Patch requests.
  1653. NullFields []string `json:"-"`
  1654. }
  1655. func (s *GetTemplateResponse) MarshalJSON() ([]byte, error) {
  1656. type NoMethod GetTemplateResponse
  1657. raw := NoMethod(*s)
  1658. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1659. }
  1660. // Histogram: Histogram of value counts for a distribution.
  1661. //
  1662. // Buckets have an inclusive lower bound and exclusive upper bound and
  1663. // use
  1664. // "1,2,5 bucketing": The first bucket range is from [0,1) and all
  1665. // subsequent
  1666. // bucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus,
  1667. // bucket
  1668. // boundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000,
  1669. // ...
  1670. // Negative values are not supported.
  1671. type Histogram struct {
  1672. // BucketCounts: Counts of values in each bucket. For efficiency, prefix
  1673. // and trailing
  1674. // buckets with count = 0 are elided. Buckets can store the full range
  1675. // of
  1676. // values of an unsigned long, with ULLONG_MAX falling into the 59th
  1677. // bucket
  1678. // with range [1e19, 2e19).
  1679. BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"`
  1680. // FirstBucketOffset: Starting index of first stored bucket. The
  1681. // non-inclusive upper-bound of
  1682. // the ith bucket is given by:
  1683. // pow(10,(i-first_bucket_offset)/3) *
  1684. // (1,2,5)[(i-first_bucket_offset)%3]
  1685. FirstBucketOffset int64 `json:"firstBucketOffset,omitempty"`
  1686. // ForceSendFields is a list of field names (e.g. "BucketCounts") to
  1687. // unconditionally include in API requests. By default, fields with
  1688. // empty values are omitted from API requests. However, any non-pointer,
  1689. // non-interface field appearing in ForceSendFields will be sent to the
  1690. // server regardless of whether the field is empty or not. This may be
  1691. // used to include empty fields in Patch requests.
  1692. ForceSendFields []string `json:"-"`
  1693. // NullFields is a list of field names (e.g. "BucketCounts") to include
  1694. // in API requests with the JSON null value. By default, fields with
  1695. // empty values are omitted from API requests. However, any field with
  1696. // an empty value appearing in NullFields will be sent to the server as
  1697. // null. It is an error if a field in this list has a non-empty value.
  1698. // This may be used to include null fields in Patch requests.
  1699. NullFields []string `json:"-"`
  1700. }
  1701. func (s *Histogram) MarshalJSON() ([]byte, error) {
  1702. type NoMethod Histogram
  1703. raw := NoMethod(*s)
  1704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1705. }
  1706. // InstructionInput: An input of an instruction, as a reference to an
  1707. // output of a
  1708. // producer instruction.
  1709. type InstructionInput struct {
  1710. // OutputNum: The output index (origin zero) within the producer.
  1711. OutputNum int64 `json:"outputNum,omitempty"`
  1712. // ProducerInstructionIndex: The index (origin zero) of the parallel
  1713. // instruction that produces
  1714. // the output to be consumed by this input. This index is relative
  1715. // to the list of instructions in this input's instruction's
  1716. // containing MapTask.
  1717. ProducerInstructionIndex int64 `json:"producerInstructionIndex,omitempty"`
  1718. // ForceSendFields is a list of field names (e.g. "OutputNum") to
  1719. // unconditionally include in API requests. By default, fields with
  1720. // empty values are omitted from API requests. However, any non-pointer,
  1721. // non-interface field appearing in ForceSendFields will be sent to the
  1722. // server regardless of whether the field is empty or not. This may be
  1723. // used to include empty fields in Patch requests.
  1724. ForceSendFields []string `json:"-"`
  1725. // NullFields is a list of field names (e.g. "OutputNum") to include in
  1726. // API requests with the JSON null value. By default, fields with empty
  1727. // values are omitted from API requests. However, any field with an
  1728. // empty value appearing in NullFields will be sent to the server as
  1729. // null. It is an error if a field in this list has a non-empty value.
  1730. // This may be used to include null fields in Patch requests.
  1731. NullFields []string `json:"-"`
  1732. }
  1733. func (s *InstructionInput) MarshalJSON() ([]byte, error) {
  1734. type NoMethod InstructionInput
  1735. raw := NoMethod(*s)
  1736. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1737. }
  1738. // InstructionOutput: An output of an instruction.
  1739. type InstructionOutput struct {
  1740. // Codec: The codec to use to encode data being written via this output.
  1741. Codec googleapi.RawMessage `json:"codec,omitempty"`
  1742. // Name: The user-provided name of this output.
  1743. Name string `json:"name,omitempty"`
  1744. // OnlyCountKeyBytes: For system-generated byte and mean byte metrics,
  1745. // certain instructions
  1746. // should only report the key size.
  1747. OnlyCountKeyBytes bool `json:"onlyCountKeyBytes,omitempty"`
  1748. // OnlyCountValueBytes: For system-generated byte and mean byte metrics,
  1749. // certain instructions
  1750. // should only report the value size.
  1751. OnlyCountValueBytes bool `json:"onlyCountValueBytes,omitempty"`
  1752. // OriginalName: System-defined name for this output in the original
  1753. // workflow graph.
  1754. // Outputs that do not contribute to an original instruction do not set
  1755. // this.
  1756. OriginalName string `json:"originalName,omitempty"`
  1757. // SystemName: System-defined name of this output.
  1758. // Unique across the workflow.
  1759. SystemName string `json:"systemName,omitempty"`
  1760. // ForceSendFields is a list of field names (e.g. "Codec") to
  1761. // unconditionally include in API requests. By default, fields with
  1762. // empty values are omitted from API requests. However, any non-pointer,
  1763. // non-interface field appearing in ForceSendFields will be sent to the
  1764. // server regardless of whether the field is empty or not. This may be
  1765. // used to include empty fields in Patch requests.
  1766. ForceSendFields []string `json:"-"`
  1767. // NullFields is a list of field names (e.g. "Codec") to include in API
  1768. // requests with the JSON null value. By default, fields with empty
  1769. // values are omitted from API requests. However, any field with an
  1770. // empty value appearing in NullFields will be sent to the server as
  1771. // null. It is an error if a field in this list has a non-empty value.
  1772. // This may be used to include null fields in Patch requests.
  1773. NullFields []string `json:"-"`
  1774. }
  1775. func (s *InstructionOutput) MarshalJSON() ([]byte, error) {
  1776. type NoMethod InstructionOutput
  1777. raw := NoMethod(*s)
  1778. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1779. }
  1780. // IntegerGauge: A metric value representing temporal values of a
  1781. // variable.
  1782. type IntegerGauge struct {
  1783. // Timestamp: The time at which this value was measured. Measured as
  1784. // msecs from epoch.
  1785. Timestamp string `json:"timestamp,omitempty"`
  1786. // Value: The value of the variable represented by this gauge.
  1787. Value *SplitInt64 `json:"value,omitempty"`
  1788. // ForceSendFields is a list of field names (e.g. "Timestamp") to
  1789. // unconditionally include in API requests. By default, fields with
  1790. // empty values are omitted from API requests. However, any non-pointer,
  1791. // non-interface field appearing in ForceSendFields will be sent to the
  1792. // server regardless of whether the field is empty or not. This may be
  1793. // used to include empty fields in Patch requests.
  1794. ForceSendFields []string `json:"-"`
  1795. // NullFields is a list of field names (e.g. "Timestamp") to include in
  1796. // API requests with the JSON null value. By default, fields with empty
  1797. // values are omitted from API requests. However, any field with an
  1798. // empty value appearing in NullFields will be sent to the server as
  1799. // null. It is an error if a field in this list has a non-empty value.
  1800. // This may be used to include null fields in Patch requests.
  1801. NullFields []string `json:"-"`
  1802. }
  1803. func (s *IntegerGauge) MarshalJSON() ([]byte, error) {
  1804. type NoMethod IntegerGauge
  1805. raw := NoMethod(*s)
  1806. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1807. }
  1808. // IntegerList: A metric value representing a list of integers.
  1809. type IntegerList struct {
  1810. // Elements: Elements of the list.
  1811. Elements []*SplitInt64 `json:"elements,omitempty"`
  1812. // ForceSendFields is a list of field names (e.g. "Elements") to
  1813. // unconditionally include in API requests. By default, fields with
  1814. // empty values are omitted from API requests. However, any non-pointer,
  1815. // non-interface field appearing in ForceSendFields will be sent to the
  1816. // server regardless of whether the field is empty or not. This may be
  1817. // used to include empty fields in Patch requests.
  1818. ForceSendFields []string `json:"-"`
  1819. // NullFields is a list of field names (e.g. "Elements") to include in
  1820. // API requests with the JSON null value. By default, fields with empty
  1821. // values are omitted from API requests. However, any field with an
  1822. // empty value appearing in NullFields will be sent to the server as
  1823. // null. It is an error if a field in this list has a non-empty value.
  1824. // This may be used to include null fields in Patch requests.
  1825. NullFields []string `json:"-"`
  1826. }
  1827. func (s *IntegerList) MarshalJSON() ([]byte, error) {
  1828. type NoMethod IntegerList
  1829. raw := NoMethod(*s)
  1830. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1831. }
  1832. // IntegerMean: A representation of an integer mean metric contribution.
  1833. type IntegerMean struct {
  1834. // Count: The number of values being aggregated.
  1835. Count *SplitInt64 `json:"count,omitempty"`
  1836. // Sum: The sum of all values being aggregated.
  1837. Sum *SplitInt64 `json:"sum,omitempty"`
  1838. // ForceSendFields is a list of field names (e.g. "Count") to
  1839. // unconditionally include in API requests. By default, fields with
  1840. // empty values are omitted from API requests. However, any non-pointer,
  1841. // non-interface field appearing in ForceSendFields will be sent to the
  1842. // server regardless of whether the field is empty or not. This may be
  1843. // used to include empty fields in Patch requests.
  1844. ForceSendFields []string `json:"-"`
  1845. // NullFields is a list of field names (e.g. "Count") to include in API
  1846. // requests with the JSON null value. By default, fields with empty
  1847. // values are omitted from API requests. However, any field with an
  1848. // empty value appearing in NullFields will be sent to the server as
  1849. // null. It is an error if a field in this list has a non-empty value.
  1850. // This may be used to include null fields in Patch requests.
  1851. NullFields []string `json:"-"`
  1852. }
  1853. func (s *IntegerMean) MarshalJSON() ([]byte, error) {
  1854. type NoMethod IntegerMean
  1855. raw := NoMethod(*s)
  1856. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1857. }
  1858. // Job: Defines a job to be run by the Cloud Dataflow service.
  1859. type Job struct {
  1860. // ClientRequestId: The client's unique identifier of the job, re-used
  1861. // across retried attempts.
  1862. // If this field is set, the service will ensure its uniqueness.
  1863. // The request to create a job will fail if the service has knowledge of
  1864. // a
  1865. // previously submitted job with the same client's ID and job name.
  1866. // The caller may use this field to ensure idempotence of job
  1867. // creation across retried attempts to create a job.
  1868. // By default, the field is empty and, in that case, the service ignores
  1869. // it.
  1870. ClientRequestId string `json:"clientRequestId,omitempty"`
  1871. // CreateTime: The timestamp when the job was initially created.
  1872. // Immutable and set by the
  1873. // Cloud Dataflow service.
  1874. CreateTime string `json:"createTime,omitempty"`
  1875. // CurrentState: The current state of the job.
  1876. //
  1877. // Jobs are created in the `JOB_STATE_STOPPED` state unless
  1878. // otherwise
  1879. // specified.
  1880. //
  1881. // A job in the `JOB_STATE_RUNNING` state may asynchronously enter
  1882. // a
  1883. // terminal state. After a job has reached a terminal state, no
  1884. // further state updates may be made.
  1885. //
  1886. // This field may be mutated by the Cloud Dataflow service;
  1887. // callers cannot mutate it.
  1888. //
  1889. // Possible values:
  1890. // "JOB_STATE_UNKNOWN" - The job's run state isn't specified.
  1891. // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job
  1892. // has not
  1893. // yet started to run.
  1894. // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is
  1895. // currently running.
  1896. // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has
  1897. // successfully completed.
  1898. // This is a terminal job state. This state may be set by the Cloud
  1899. // Dataflow
  1900. // service, as a transition from `JOB_STATE_RUNNING`. It may also be set
  1901. // via a
  1902. // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a
  1903. // terminal
  1904. // state.
  1905. // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has
  1906. // failed. This is a
  1907. // terminal job state. This state may only be set by the Cloud
  1908. // Dataflow
  1909. // service, and only as a transition from `JOB_STATE_RUNNING`.
  1910. // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the
  1911. // job has been explicitly
  1912. // cancelled. This is a terminal job state. This state may only be
  1913. // set via a Cloud Dataflow `UpdateJob` call, and only if the job has
  1914. // not
  1915. // yet reached another terminal state.
  1916. // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job
  1917. // was successfully updated,
  1918. // meaning that this job was stopped and another job was started,
  1919. // inheriting
  1920. // state from this one. This is a terminal job state. This state may
  1921. // only be
  1922. // set by the Cloud Dataflow service, and only as a transition
  1923. // from
  1924. // `JOB_STATE_RUNNING`.
  1925. // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job
  1926. // is in the process of draining.
  1927. // A draining job has stopped pulling from its input sources and is
  1928. // processing
  1929. // any data that remains in-flight. This state may be set via a Cloud
  1930. // Dataflow
  1931. // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`.
  1932. // Jobs
  1933. // that are draining may only transition to
  1934. // `JOB_STATE_DRAINED`,
  1935. // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.
  1936. // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job
  1937. // has been drained.
  1938. // A drained job terminated by stopping pulling from its input sources
  1939. // and
  1940. // processing any data that remained in-flight when draining was
  1941. // requested.
  1942. // This state is a terminal state, may only be set by the Cloud
  1943. // Dataflow
  1944. // service, and only as a transition from `JOB_STATE_DRAINING`.
  1945. // "JOB_STATE_PENDING" - 'JOB_STATE_PENDING' indicates that the job
  1946. // has been created but is not yet
  1947. // running. Jobs that are pending may only transition to
  1948. // `JOB_STATE_RUNNING`,
  1949. // or `JOB_STATE_FAILED`.
  1950. // "JOB_STATE_CANCELLING" - 'JOB_STATE_CANCELLING' indicates that the
  1951. // job has been explicitly cancelled
  1952. // and is in the process of stopping. Jobs that are cancelling may
  1953. // only
  1954. // transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'.
  1955. CurrentState string `json:"currentState,omitempty"`
  1956. // CurrentStateTime: The timestamp associated with the current state.
  1957. CurrentStateTime string `json:"currentStateTime,omitempty"`
  1958. // Environment: The environment for the job.
  1959. Environment *Environment `json:"environment,omitempty"`
  1960. // ExecutionInfo: Deprecated.
  1961. ExecutionInfo *JobExecutionInfo `json:"executionInfo,omitempty"`
  1962. // Id: The unique ID of this job.
  1963. //
  1964. // This field is set by the Cloud Dataflow service when the Job
  1965. // is
  1966. // created, and is immutable for the life of the job.
  1967. Id string `json:"id,omitempty"`
  1968. // Labels: User-defined labels for this job.
  1969. //
  1970. // The labels map can contain no more than 64 entries. Entries of the
  1971. // labels
  1972. // map are UTF8 strings that comply with the following restrictions:
  1973. //
  1974. // * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62}
  1975. // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
  1976. // * Both keys and values are additionally constrained to be <= 128
  1977. // bytes in
  1978. // size.
  1979. Labels map[string]string `json:"labels,omitempty"`
  1980. // Location: The location that contains this job.
  1981. Location string `json:"location,omitempty"`
  1982. // Name: The user-specified Cloud Dataflow job name.
  1983. //
  1984. // Only one Job with a given name may exist in a project at any
  1985. // given time. If a caller attempts to create a Job with the same
  1986. // name as an already-existing Job, the attempt returns the
  1987. // existing Job.
  1988. //
  1989. // The name must match the regular
  1990. // expression
  1991. // `[a-z]([-a-z0-9]{0,38}[a-z0-9])?`
  1992. Name string `json:"name,omitempty"`
  1993. // PipelineDescription: Preliminary field: The format of this data may
  1994. // change at any time.
  1995. // A description of the user pipeline and stages through which it is
  1996. // executed.
  1997. // Created by Cloud Dataflow service. Only retrieved
  1998. // with
  1999. // JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL.
  2000. PipelineDescription *PipelineDescription `json:"pipelineDescription,omitempty"`
  2001. // ProjectId: The ID of the Cloud Platform project that the job belongs
  2002. // to.
  2003. ProjectId string `json:"projectId,omitempty"`
  2004. // ReplaceJobId: If this job is an update of an existing job, this field
  2005. // is the job ID
  2006. // of the job it replaced.
  2007. //
  2008. // When sending a `CreateJobRequest`, you can update a job by specifying
  2009. // it
  2010. // here. The job named here is stopped, and its intermediate state
  2011. // is
  2012. // transferred to this job.
  2013. ReplaceJobId string `json:"replaceJobId,omitempty"`
  2014. // ReplacedByJobId: If another job is an update of this job (and thus,
  2015. // this job is in
  2016. // `JOB_STATE_UPDATED`), this field contains the ID of that job.
  2017. ReplacedByJobId string `json:"replacedByJobId,omitempty"`
  2018. // RequestedState: The job's requested state.
  2019. //
  2020. // `UpdateJob` may be used to switch between the `JOB_STATE_STOPPED`
  2021. // and
  2022. // `JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob`
  2023. // may
  2024. // also be used to directly set a job's requested state
  2025. // to
  2026. // `JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating
  2027. // the
  2028. // job if it has not already reached a terminal state.
  2029. //
  2030. // Possible values:
  2031. // "JOB_STATE_UNKNOWN" - The job's run state isn't specified.
  2032. // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job
  2033. // has not
  2034. // yet started to run.
  2035. // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is
  2036. // currently running.
  2037. // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has
  2038. // successfully completed.
  2039. // This is a terminal job state. This state may be set by the Cloud
  2040. // Dataflow
  2041. // service, as a transition from `JOB_STATE_RUNNING`. It may also be set
  2042. // via a
  2043. // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a
  2044. // terminal
  2045. // state.
  2046. // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has
  2047. // failed. This is a
  2048. // terminal job state. This state may only be set by the Cloud
  2049. // Dataflow
  2050. // service, and only as a transition from `JOB_STATE_RUNNING`.
  2051. // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the
  2052. // job has been explicitly
  2053. // cancelled. This is a terminal job state. This state may only be
  2054. // set via a Cloud Dataflow `UpdateJob` call, and only if the job has
  2055. // not
  2056. // yet reached another terminal state.
  2057. // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job
  2058. // was successfully updated,
  2059. // meaning that this job was stopped and another job was started,
  2060. // inheriting
  2061. // state from this one. This is a terminal job state. This state may
  2062. // only be
  2063. // set by the Cloud Dataflow service, and only as a transition
  2064. // from
  2065. // `JOB_STATE_RUNNING`.
  2066. // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job
  2067. // is in the process of draining.
  2068. // A draining job has stopped pulling from its input sources and is
  2069. // processing
  2070. // any data that remains in-flight. This state may be set via a Cloud
  2071. // Dataflow
  2072. // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`.
  2073. // Jobs
  2074. // that are draining may only transition to
  2075. // `JOB_STATE_DRAINED`,
  2076. // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.
  2077. // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job
  2078. // has been drained.
  2079. // A drained job terminated by stopping pulling from its input sources
  2080. // and
  2081. // processing any data that remained in-flight when draining was
  2082. // requested.
  2083. // This state is a terminal state, may only be set by the Cloud
  2084. // Dataflow
  2085. // service, and only as a transition from `JOB_STATE_DRAINING`.
  2086. // "JOB_STATE_PENDING" - 'JOB_STATE_PENDING' indicates that the job
  2087. // has been created but is not yet
  2088. // running. Jobs that are pending may only transition to
  2089. // `JOB_STATE_RUNNING`,
  2090. // or `JOB_STATE_FAILED`.
  2091. // "JOB_STATE_CANCELLING" - 'JOB_STATE_CANCELLING' indicates that the
  2092. // job has been explicitly cancelled
  2093. // and is in the process of stopping. Jobs that are cancelling may
  2094. // only
  2095. // transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'.
  2096. RequestedState string `json:"requestedState,omitempty"`
  2097. // StageStates: This field may be mutated by the Cloud Dataflow
  2098. // service;
  2099. // callers cannot mutate it.
  2100. StageStates []*ExecutionStageState `json:"stageStates,omitempty"`
  2101. // Steps: The top-level steps that constitute the entire job.
  2102. Steps []*Step `json:"steps,omitempty"`
  2103. // TempFiles: A set of files the system should be aware of that are
  2104. // used
  2105. // for temporary storage. These temporary files will be
  2106. // removed on job completion.
  2107. // No duplicates are allowed.
  2108. // No file patterns are supported.
  2109. //
  2110. // The supported files are:
  2111. //
  2112. // Google Cloud Storage:
  2113. //
  2114. // storage.googleapis.com/{bucket}/{object}
  2115. // bucket.storage.googleapis.com/{object}
  2116. TempFiles []string `json:"tempFiles,omitempty"`
  2117. // TransformNameMapping: The map of transform name prefixes of the job
  2118. // to be replaced to the
  2119. // corresponding name prefixes of the new job.
  2120. TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"`
  2121. // Type: The type of Cloud Dataflow job.
  2122. //
  2123. // Possible values:
  2124. // "JOB_TYPE_UNKNOWN" - The type of the job is unspecified, or
  2125. // unknown.
  2126. // "JOB_TYPE_BATCH" - A batch job with a well-defined end point: data
  2127. // is read, data is
  2128. // processed, data is written, and the job is done.
  2129. // "JOB_TYPE_STREAMING" - A continuously streaming job with no end:
  2130. // data is read,
  2131. // processed, and written continuously.
  2132. Type string `json:"type,omitempty"`
  2133. // ServerResponse contains the HTTP response code and headers from the
  2134. // server.
  2135. googleapi.ServerResponse `json:"-"`
  2136. // ForceSendFields is a list of field names (e.g. "ClientRequestId") to
  2137. // unconditionally include in API requests. By default, fields with
  2138. // empty values are omitted from API requests. However, any non-pointer,
  2139. // non-interface field appearing in ForceSendFields will be sent to the
  2140. // server regardless of whether the field is empty or not. This may be
  2141. // used to include empty fields in Patch requests.
  2142. ForceSendFields []string `json:"-"`
  2143. // NullFields is a list of field names (e.g. "ClientRequestId") to
  2144. // include in API requests with the JSON null value. By default, fields
  2145. // with empty values are omitted from API requests. However, any field
  2146. // with an empty value appearing in NullFields will be sent to the
  2147. // server as null. It is an error if a field in this list has a
  2148. // non-empty value. This may be used to include null fields in Patch
  2149. // requests.
  2150. NullFields []string `json:"-"`
  2151. }
  2152. func (s *Job) MarshalJSON() ([]byte, error) {
  2153. type NoMethod Job
  2154. raw := NoMethod(*s)
  2155. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2156. }
  2157. // JobExecutionInfo: Additional information about how a Cloud Dataflow
  2158. // job will be executed that
  2159. // isn't contained in the submitted job.
  2160. type JobExecutionInfo struct {
  2161. // Stages: A mapping from each stage to the information about that
  2162. // stage.
  2163. Stages map[string]JobExecutionStageInfo `json:"stages,omitempty"`
  2164. // ForceSendFields is a list of field names (e.g. "Stages") to
  2165. // unconditionally include in API requests. By default, fields with
  2166. // empty values are omitted from API requests. However, any non-pointer,
  2167. // non-interface field appearing in ForceSendFields will be sent to the
  2168. // server regardless of whether the field is empty or not. This may be
  2169. // used to include empty fields in Patch requests.
  2170. ForceSendFields []string `json:"-"`
  2171. // NullFields is a list of field names (e.g. "Stages") to include in API
  2172. // requests with the JSON null value. By default, fields with empty
  2173. // values are omitted from API requests. However, any field with an
  2174. // empty value appearing in NullFields will be sent to the server as
  2175. // null. It is an error if a field in this list has a non-empty value.
  2176. // This may be used to include null fields in Patch requests.
  2177. NullFields []string `json:"-"`
  2178. }
  2179. func (s *JobExecutionInfo) MarshalJSON() ([]byte, error) {
  2180. type NoMethod JobExecutionInfo
  2181. raw := NoMethod(*s)
  2182. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2183. }
  2184. // JobExecutionStageInfo: Contains information about how a
  2185. // particular
  2186. // google.dataflow.v1beta3.Step will be executed.
  2187. type JobExecutionStageInfo struct {
  2188. // StepName: The steps associated with the execution stage.
  2189. // Note that stages may have several steps, and that a given step
  2190. // might be run by more than one stage.
  2191. StepName []string `json:"stepName,omitempty"`
  2192. // ForceSendFields is a list of field names (e.g. "StepName") to
  2193. // unconditionally include in API requests. By default, fields with
  2194. // empty values are omitted from API requests. However, any non-pointer,
  2195. // non-interface field appearing in ForceSendFields will be sent to the
  2196. // server regardless of whether the field is empty or not. This may be
  2197. // used to include empty fields in Patch requests.
  2198. ForceSendFields []string `json:"-"`
  2199. // NullFields is a list of field names (e.g. "StepName") to include in
  2200. // API requests with the JSON null value. By default, fields with empty
  2201. // values are omitted from API requests. However, any field with an
  2202. // empty value appearing in NullFields will be sent to the server as
  2203. // null. It is an error if a field in this list has a non-empty value.
  2204. // This may be used to include null fields in Patch requests.
  2205. NullFields []string `json:"-"`
  2206. }
  2207. func (s *JobExecutionStageInfo) MarshalJSON() ([]byte, error) {
  2208. type NoMethod JobExecutionStageInfo
  2209. raw := NoMethod(*s)
  2210. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2211. }
  2212. // JobMessage: A particular message pertaining to a Dataflow job.
  2213. type JobMessage struct {
  2214. // Id: Deprecated.
  2215. Id string `json:"id,omitempty"`
  2216. // MessageImportance: Importance level of the message.
  2217. //
  2218. // Possible values:
  2219. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't
  2220. // specified, or is unknown.
  2221. // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level:
  2222. // typically only useful for
  2223. // software engineers working on the code the job is running.
  2224. // Typically, Dataflow pipeline runners do not display log messages
  2225. // at this level by default.
  2226. // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level:
  2227. // somewhat verbose, but
  2228. // potentially useful to users. Typically, Dataflow pipeline
  2229. // runners do not display log messages at this level by default.
  2230. // These messages are displayed by default in the Dataflow
  2231. // monitoring UI.
  2232. // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful
  2233. // for keeping
  2234. // track of the execution of a Dataflow pipeline. Typically,
  2235. // Dataflow pipeline runners display log messages at this level
  2236. // by
  2237. // default, and these messages are displayed by default in the
  2238. // Dataflow monitoring UI.
  2239. // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level:
  2240. // indicating a condition
  2241. // pertaining to a job which may require human intervention.
  2242. // Typically, Dataflow pipeline runners display log messages at
  2243. // this
  2244. // level by default, and these messages are displayed by default in
  2245. // the Dataflow monitoring UI.
  2246. // "JOB_MESSAGE_ERROR" - The message is at the 'error' level:
  2247. // indicating a condition
  2248. // preventing a job from succeeding. Typically, Dataflow
  2249. // pipeline
  2250. // runners display log messages at this level by default, and
  2251. // these
  2252. // messages are displayed by default in the Dataflow monitoring UI.
  2253. MessageImportance string `json:"messageImportance,omitempty"`
  2254. // MessageText: The text of the message.
  2255. MessageText string `json:"messageText,omitempty"`
  2256. // Time: The timestamp of the message.
  2257. Time string `json:"time,omitempty"`
  2258. // ForceSendFields is a list of field names (e.g. "Id") to
  2259. // unconditionally include in API requests. By default, fields with
  2260. // empty values are omitted from API requests. However, any non-pointer,
  2261. // non-interface field appearing in ForceSendFields will be sent to the
  2262. // server regardless of whether the field is empty or not. This may be
  2263. // used to include empty fields in Patch requests.
  2264. ForceSendFields []string `json:"-"`
  2265. // NullFields is a list of field names (e.g. "Id") to include in API
  2266. // requests with the JSON null value. By default, fields with empty
  2267. // values are omitted from API requests. However, any field with an
  2268. // empty value appearing in NullFields will be sent to the server as
  2269. // null. It is an error if a field in this list has a non-empty value.
  2270. // This may be used to include null fields in Patch requests.
  2271. NullFields []string `json:"-"`
  2272. }
  2273. func (s *JobMessage) MarshalJSON() ([]byte, error) {
  2274. type NoMethod JobMessage
  2275. raw := NoMethod(*s)
  2276. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2277. }
  2278. // JobMetrics: JobMetrics contains a collection of metrics descibing the
  2279. // detailed progress
  2280. // of a Dataflow job. Metrics correspond to user-defined and
  2281. // system-defined
  2282. // metrics in the job.
  2283. //
  2284. // This resource captures only the most recent values of each
  2285. // metric;
  2286. // time-series data can be queried for them (under the same metric
  2287. // names)
  2288. // from Cloud Monitoring.
  2289. type JobMetrics struct {
  2290. // MetricTime: Timestamp as of which metric values are current.
  2291. MetricTime string `json:"metricTime,omitempty"`
  2292. // Metrics: All metrics for this job.
  2293. Metrics []*MetricUpdate `json:"metrics,omitempty"`
  2294. // ServerResponse contains the HTTP response code and headers from the
  2295. // server.
  2296. googleapi.ServerResponse `json:"-"`
  2297. // ForceSendFields is a list of field names (e.g. "MetricTime") to
  2298. // unconditionally include in API requests. By default, fields with
  2299. // empty values are omitted from API requests. However, any non-pointer,
  2300. // non-interface field appearing in ForceSendFields will be sent to the
  2301. // server regardless of whether the field is empty or not. This may be
  2302. // used to include empty fields in Patch requests.
  2303. ForceSendFields []string `json:"-"`
  2304. // NullFields is a list of field names (e.g. "MetricTime") to include in
  2305. // API requests with the JSON null value. By default, fields with empty
  2306. // values are omitted from API requests. However, any field with an
  2307. // empty value appearing in NullFields will be sent to the server as
  2308. // null. It is an error if a field in this list has a non-empty value.
  2309. // This may be used to include null fields in Patch requests.
  2310. NullFields []string `json:"-"`
  2311. }
  2312. func (s *JobMetrics) MarshalJSON() ([]byte, error) {
  2313. type NoMethod JobMetrics
  2314. raw := NoMethod(*s)
  2315. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2316. }
  2317. // KeyRangeDataDiskAssignment: Data disk assignment information for a
  2318. // specific key-range of a sharded
  2319. // computation.
  2320. // Currently we only support UTF-8 character splits to simplify encoding
  2321. // into
  2322. // JSON.
  2323. type KeyRangeDataDiskAssignment struct {
  2324. // DataDisk: The name of the data disk where data for this range is
  2325. // stored.
  2326. // This name is local to the Google Cloud Platform project and
  2327. // uniquely
  2328. // identifies the disk within that project, for
  2329. // example
  2330. // "myproject-1014-104817-4c2-harness-0-disk-1".
  2331. DataDisk string `json:"dataDisk,omitempty"`
  2332. // End: The end (exclusive) of the key range.
  2333. End string `json:"end,omitempty"`
  2334. // Start: The start (inclusive) of the key range.
  2335. Start string `json:"start,omitempty"`
  2336. // ForceSendFields is a list of field names (e.g. "DataDisk") to
  2337. // unconditionally include in API requests. By default, fields with
  2338. // empty values are omitted from API requests. However, any non-pointer,
  2339. // non-interface field appearing in ForceSendFields will be sent to the
  2340. // server regardless of whether the field is empty or not. This may be
  2341. // used to include empty fields in Patch requests.
  2342. ForceSendFields []string `json:"-"`
  2343. // NullFields is a list of field names (e.g. "DataDisk") to include in
  2344. // API requests with the JSON null value. By default, fields with empty
  2345. // values are omitted from API requests. However, any field with an
  2346. // empty value appearing in NullFields will be sent to the server as
  2347. // null. It is an error if a field in this list has a non-empty value.
  2348. // This may be used to include null fields in Patch requests.
  2349. NullFields []string `json:"-"`
  2350. }
  2351. func (s *KeyRangeDataDiskAssignment) MarshalJSON() ([]byte, error) {
  2352. type NoMethod KeyRangeDataDiskAssignment
  2353. raw := NoMethod(*s)
  2354. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2355. }
  2356. // KeyRangeLocation: Location information for a specific key-range of a
  2357. // sharded computation.
  2358. // Currently we only support UTF-8 character splits to simplify encoding
  2359. // into
  2360. // JSON.
  2361. type KeyRangeLocation struct {
  2362. // DataDisk: The name of the data disk where data for this range is
  2363. // stored.
  2364. // This name is local to the Google Cloud Platform project and
  2365. // uniquely
  2366. // identifies the disk within that project, for
  2367. // example
  2368. // "myproject-1014-104817-4c2-harness-0-disk-1".
  2369. DataDisk string `json:"dataDisk,omitempty"`
  2370. // DeliveryEndpoint: The physical location of this range assignment to
  2371. // be used for
  2372. // streaming computation cross-worker message delivery.
  2373. DeliveryEndpoint string `json:"deliveryEndpoint,omitempty"`
  2374. // DeprecatedPersistentDirectory: DEPRECATED. The location of the
  2375. // persistent state for this range, as a
  2376. // persistent directory in the worker local filesystem.
  2377. DeprecatedPersistentDirectory string `json:"deprecatedPersistentDirectory,omitempty"`
  2378. // End: The end (exclusive) of the key range.
  2379. End string `json:"end,omitempty"`
  2380. // Start: The start (inclusive) of the key range.
  2381. Start string `json:"start,omitempty"`
  2382. // ForceSendFields is a list of field names (e.g. "DataDisk") to
  2383. // unconditionally include in API requests. By default, fields with
  2384. // empty values are omitted from API requests. However, any non-pointer,
  2385. // non-interface field appearing in ForceSendFields will be sent to the
  2386. // server regardless of whether the field is empty or not. This may be
  2387. // used to include empty fields in Patch requests.
  2388. ForceSendFields []string `json:"-"`
  2389. // NullFields is a list of field names (e.g. "DataDisk") to include in
  2390. // API requests with the JSON null value. By default, fields with empty
  2391. // values are omitted from API requests. However, any field with an
  2392. // empty value appearing in NullFields will be sent to the server as
  2393. // null. It is an error if a field in this list has a non-empty value.
  2394. // This may be used to include null fields in Patch requests.
  2395. NullFields []string `json:"-"`
  2396. }
  2397. func (s *KeyRangeLocation) MarshalJSON() ([]byte, error) {
  2398. type NoMethod KeyRangeLocation
  2399. raw := NoMethod(*s)
  2400. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2401. }
  2402. // LaunchTemplateParameters: Parameters to provide to the template being
  2403. // launched.
  2404. type LaunchTemplateParameters struct {
  2405. // Environment: The runtime environment for the job.
  2406. Environment *RuntimeEnvironment `json:"environment,omitempty"`
  2407. // JobName: Required. The job name to use for the created job.
  2408. JobName string `json:"jobName,omitempty"`
  2409. // Parameters: The runtime parameters to pass to the job.
  2410. Parameters map[string]string `json:"parameters,omitempty"`
  2411. // ForceSendFields is a list of field names (e.g. "Environment") to
  2412. // unconditionally include in API requests. By default, fields with
  2413. // empty values are omitted from API requests. However, any non-pointer,
  2414. // non-interface field appearing in ForceSendFields will be sent to the
  2415. // server regardless of whether the field is empty or not. This may be
  2416. // used to include empty fields in Patch requests.
  2417. ForceSendFields []string `json:"-"`
  2418. // NullFields is a list of field names (e.g. "Environment") to include
  2419. // in API requests with the JSON null value. By default, fields with
  2420. // empty values are omitted from API requests. However, any field with
  2421. // an empty value appearing in NullFields will be sent to the server as
  2422. // null. It is an error if a field in this list has a non-empty value.
  2423. // This may be used to include null fields in Patch requests.
  2424. NullFields []string `json:"-"`
  2425. }
  2426. func (s *LaunchTemplateParameters) MarshalJSON() ([]byte, error) {
  2427. type NoMethod LaunchTemplateParameters
  2428. raw := NoMethod(*s)
  2429. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2430. }
  2431. // LaunchTemplateResponse: Response to the request to launch a template.
  2432. type LaunchTemplateResponse struct {
  2433. // Job: The job that was launched, if the request was not a dry run
  2434. // and
  2435. // the job was successfully launched.
  2436. Job *Job `json:"job,omitempty"`
  2437. // ServerResponse contains the HTTP response code and headers from the
  2438. // server.
  2439. googleapi.ServerResponse `json:"-"`
  2440. // ForceSendFields is a list of field names (e.g. "Job") to
  2441. // unconditionally include in API requests. By default, fields with
  2442. // empty values are omitted from API requests. However, any non-pointer,
  2443. // non-interface field appearing in ForceSendFields will be sent to the
  2444. // server regardless of whether the field is empty or not. This may be
  2445. // used to include empty fields in Patch requests.
  2446. ForceSendFields []string `json:"-"`
  2447. // NullFields is a list of field names (e.g. "Job") to include in API
  2448. // requests with the JSON null value. By default, fields with empty
  2449. // values are omitted from API requests. However, any field with an
  2450. // empty value appearing in NullFields will be sent to the server as
  2451. // null. It is an error if a field in this list has a non-empty value.
  2452. // This may be used to include null fields in Patch requests.
  2453. NullFields []string `json:"-"`
  2454. }
  2455. func (s *LaunchTemplateResponse) MarshalJSON() ([]byte, error) {
  2456. type NoMethod LaunchTemplateResponse
  2457. raw := NoMethod(*s)
  2458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2459. }
  2460. // LeaseWorkItemRequest: Request to lease WorkItems.
  2461. type LeaseWorkItemRequest struct {
  2462. // CurrentWorkerTime: The current timestamp at the worker.
  2463. CurrentWorkerTime string `json:"currentWorkerTime,omitempty"`
  2464. // Location: The location which contains the WorkItem's job.
  2465. Location string `json:"location,omitempty"`
  2466. // RequestedLeaseDuration: The initial lease period.
  2467. RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"`
  2468. // WorkItemTypes: Filter for WorkItem type.
  2469. WorkItemTypes []string `json:"workItemTypes,omitempty"`
  2470. // WorkerCapabilities: Worker capabilities. WorkItems might be limited
  2471. // to workers with specific
  2472. // capabilities.
  2473. WorkerCapabilities []string `json:"workerCapabilities,omitempty"`
  2474. // WorkerId: Identifies the worker leasing work -- typically the ID of
  2475. // the
  2476. // virtual machine running the worker.
  2477. WorkerId string `json:"workerId,omitempty"`
  2478. // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime")
  2479. // to unconditionally include in API requests. By default, fields with
  2480. // empty values are omitted from API requests. However, any non-pointer,
  2481. // non-interface field appearing in ForceSendFields will be sent to the
  2482. // server regardless of whether the field is empty or not. This may be
  2483. // used to include empty fields in Patch requests.
  2484. ForceSendFields []string `json:"-"`
  2485. // NullFields is a list of field names (e.g. "CurrentWorkerTime") to
  2486. // include in API requests with the JSON null value. By default, fields
  2487. // with empty values are omitted from API requests. However, any field
  2488. // with an empty value appearing in NullFields will be sent to the
  2489. // server as null. It is an error if a field in this list has a
  2490. // non-empty value. This may be used to include null fields in Patch
  2491. // requests.
  2492. NullFields []string `json:"-"`
  2493. }
  2494. func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) {
  2495. type NoMethod LeaseWorkItemRequest
  2496. raw := NoMethod(*s)
  2497. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2498. }
  2499. // LeaseWorkItemResponse: Response to a request to lease WorkItems.
  2500. type LeaseWorkItemResponse struct {
  2501. // WorkItems: A list of the leased WorkItems.
  2502. WorkItems []*WorkItem `json:"workItems,omitempty"`
  2503. // ServerResponse contains the HTTP response code and headers from the
  2504. // server.
  2505. googleapi.ServerResponse `json:"-"`
  2506. // ForceSendFields is a list of field names (e.g. "WorkItems") to
  2507. // unconditionally include in API requests. By default, fields with
  2508. // empty values are omitted from API requests. However, any non-pointer,
  2509. // non-interface field appearing in ForceSendFields will be sent to the
  2510. // server regardless of whether the field is empty or not. This may be
  2511. // used to include empty fields in Patch requests.
  2512. ForceSendFields []string `json:"-"`
  2513. // NullFields is a list of field names (e.g. "WorkItems") to include in
  2514. // API requests with the JSON null value. By default, fields with empty
  2515. // values are omitted from API requests. However, any field with an
  2516. // empty value appearing in NullFields will be sent to the server as
  2517. // null. It is an error if a field in this list has a non-empty value.
  2518. // This may be used to include null fields in Patch requests.
  2519. NullFields []string `json:"-"`
  2520. }
  2521. func (s *LeaseWorkItemResponse) MarshalJSON() ([]byte, error) {
  2522. type NoMethod LeaseWorkItemResponse
  2523. raw := NoMethod(*s)
  2524. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2525. }
  2526. // ListJobMessagesResponse: Response to a request to list job messages.
  2527. type ListJobMessagesResponse struct {
  2528. // AutoscalingEvents: Autoscaling events in ascending timestamp order.
  2529. AutoscalingEvents []*AutoscalingEvent `json:"autoscalingEvents,omitempty"`
  2530. // JobMessages: Messages in ascending timestamp order.
  2531. JobMessages []*JobMessage `json:"jobMessages,omitempty"`
  2532. // NextPageToken: The token to obtain the next page of results if there
  2533. // are more.
  2534. NextPageToken string `json:"nextPageToken,omitempty"`
  2535. // ServerResponse contains the HTTP response code and headers from the
  2536. // server.
  2537. googleapi.ServerResponse `json:"-"`
  2538. // ForceSendFields is a list of field names (e.g. "AutoscalingEvents")
  2539. // to unconditionally include in API requests. By default, fields with
  2540. // empty values are omitted from API requests. However, any non-pointer,
  2541. // non-interface field appearing in ForceSendFields will be sent to the
  2542. // server regardless of whether the field is empty or not. This may be
  2543. // used to include empty fields in Patch requests.
  2544. ForceSendFields []string `json:"-"`
  2545. // NullFields is a list of field names (e.g. "AutoscalingEvents") to
  2546. // include in API requests with the JSON null value. By default, fields
  2547. // with empty values are omitted from API requests. However, any field
  2548. // with an empty value appearing in NullFields will be sent to the
  2549. // server as null. It is an error if a field in this list has a
  2550. // non-empty value. This may be used to include null fields in Patch
  2551. // requests.
  2552. NullFields []string `json:"-"`
  2553. }
  2554. func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) {
  2555. type NoMethod ListJobMessagesResponse
  2556. raw := NoMethod(*s)
  2557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2558. }
  2559. // ListJobsResponse: Response to a request to list Cloud Dataflow jobs.
  2560. // This may be a partial
  2561. // response, depending on the page size in the ListJobsRequest.
  2562. type ListJobsResponse struct {
  2563. // FailedLocation: Zero or more messages describing locations that
  2564. // failed to respond.
  2565. FailedLocation []*FailedLocation `json:"failedLocation,omitempty"`
  2566. // Jobs: A subset of the requested job information.
  2567. Jobs []*Job `json:"jobs,omitempty"`
  2568. // NextPageToken: Set if there may be more results than fit in this
  2569. // response.
  2570. NextPageToken string `json:"nextPageToken,omitempty"`
  2571. // ServerResponse contains the HTTP response code and headers from the
  2572. // server.
  2573. googleapi.ServerResponse `json:"-"`
  2574. // ForceSendFields is a list of field names (e.g. "FailedLocation") to
  2575. // unconditionally include in API requests. By default, fields with
  2576. // empty values are omitted from API requests. However, any non-pointer,
  2577. // non-interface field appearing in ForceSendFields will be sent to the
  2578. // server regardless of whether the field is empty or not. This may be
  2579. // used to include empty fields in Patch requests.
  2580. ForceSendFields []string `json:"-"`
  2581. // NullFields is a list of field names (e.g. "FailedLocation") to
  2582. // include in API requests with the JSON null value. By default, fields
  2583. // with empty values are omitted from API requests. However, any field
  2584. // with an empty value appearing in NullFields will be sent to the
  2585. // server as null. It is an error if a field in this list has a
  2586. // non-empty value. This may be used to include null fields in Patch
  2587. // requests.
  2588. NullFields []string `json:"-"`
  2589. }
  2590. func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
  2591. type NoMethod ListJobsResponse
  2592. raw := NoMethod(*s)
  2593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2594. }
  2595. // MapTask: MapTask consists of an ordered set of instructions, each of
  2596. // which
  2597. // describes one particular low-level operation for the worker
  2598. // to
  2599. // perform in order to accomplish the MapTask's WorkItem.
  2600. //
  2601. // Each instruction must appear in the list before any instructions
  2602. // which
  2603. // depends on its output.
  2604. type MapTask struct {
  2605. // Instructions: The instructions in the MapTask.
  2606. Instructions []*ParallelInstruction `json:"instructions,omitempty"`
  2607. // StageName: System-defined name of the stage containing this
  2608. // MapTask.
  2609. // Unique across the workflow.
  2610. StageName string `json:"stageName,omitempty"`
  2611. // SystemName: System-defined name of this MapTask.
  2612. // Unique across the workflow.
  2613. SystemName string `json:"systemName,omitempty"`
  2614. // ForceSendFields is a list of field names (e.g. "Instructions") to
  2615. // unconditionally include in API requests. By default, fields with
  2616. // empty values are omitted from API requests. However, any non-pointer,
  2617. // non-interface field appearing in ForceSendFields will be sent to the
  2618. // server regardless of whether the field is empty or not. This may be
  2619. // used to include empty fields in Patch requests.
  2620. ForceSendFields []string `json:"-"`
  2621. // NullFields is a list of field names (e.g. "Instructions") to include
  2622. // in API requests with the JSON null value. By default, fields with
  2623. // empty values are omitted from API requests. However, any field with
  2624. // an empty value appearing in NullFields will be sent to the server as
  2625. // null. It is an error if a field in this list has a non-empty value.
  2626. // This may be used to include null fields in Patch requests.
  2627. NullFields []string `json:"-"`
  2628. }
  2629. func (s *MapTask) MarshalJSON() ([]byte, error) {
  2630. type NoMethod MapTask
  2631. raw := NoMethod(*s)
  2632. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2633. }
  2634. // MetricShortId: The metric short id is returned to the user alongside
  2635. // an offset into
  2636. // ReportWorkItemStatusRequest
  2637. type MetricShortId struct {
  2638. // MetricIndex: The index of the corresponding metric in
  2639. // the ReportWorkItemStatusRequest. Required.
  2640. MetricIndex int64 `json:"metricIndex,omitempty"`
  2641. // ShortId: The service-generated short identifier for the metric.
  2642. ShortId int64 `json:"shortId,omitempty,string"`
  2643. // ForceSendFields is a list of field names (e.g. "MetricIndex") to
  2644. // unconditionally include in API requests. By default, fields with
  2645. // empty values are omitted from API requests. However, any non-pointer,
  2646. // non-interface field appearing in ForceSendFields will be sent to the
  2647. // server regardless of whether the field is empty or not. This may be
  2648. // used to include empty fields in Patch requests.
  2649. ForceSendFields []string `json:"-"`
  2650. // NullFields is a list of field names (e.g. "MetricIndex") to include
  2651. // in API requests with the JSON null value. By default, fields with
  2652. // empty values are omitted from API requests. However, any field with
  2653. // an empty value appearing in NullFields will be sent to the server as
  2654. // null. It is an error if a field in this list has a non-empty value.
  2655. // This may be used to include null fields in Patch requests.
  2656. NullFields []string `json:"-"`
  2657. }
  2658. func (s *MetricShortId) MarshalJSON() ([]byte, error) {
  2659. type NoMethod MetricShortId
  2660. raw := NoMethod(*s)
  2661. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2662. }
  2663. // MetricStructuredName: Identifies a metric, by describing the source
  2664. // which generated the
  2665. // metric.
  2666. type MetricStructuredName struct {
  2667. // Context: Zero or more labeled fields which identify the part of the
  2668. // job this
  2669. // metric is associated with, such as the name of a step or
  2670. // collection.
  2671. //
  2672. // For example, built-in counters associated with steps will
  2673. // have
  2674. // context['step'] = <step-name>. Counters associated with
  2675. // PCollections
  2676. // in the SDK will have context['pcollection'] = <pcollection-name>.
  2677. Context map[string]string `json:"context,omitempty"`
  2678. // Name: Worker-defined metric name.
  2679. Name string `json:"name,omitempty"`
  2680. // Origin: Origin (namespace) of metric name. May be blank for
  2681. // user-define metrics;
  2682. // will be "dataflow" for metrics defined by the Dataflow service or
  2683. // SDK.
  2684. Origin string `json:"origin,omitempty"`
  2685. // ForceSendFields is a list of field names (e.g. "Context") to
  2686. // unconditionally include in API requests. By default, fields with
  2687. // empty values are omitted from API requests. However, any non-pointer,
  2688. // non-interface field appearing in ForceSendFields will be sent to the
  2689. // server regardless of whether the field is empty or not. This may be
  2690. // used to include empty fields in Patch requests.
  2691. ForceSendFields []string `json:"-"`
  2692. // NullFields is a list of field names (e.g. "Context") to include in
  2693. // API requests with the JSON null value. By default, fields with empty
  2694. // values are omitted from API requests. However, any field with an
  2695. // empty value appearing in NullFields will be sent to the server as
  2696. // null. It is an error if a field in this list has a non-empty value.
  2697. // This may be used to include null fields in Patch requests.
  2698. NullFields []string `json:"-"`
  2699. }
  2700. func (s *MetricStructuredName) MarshalJSON() ([]byte, error) {
  2701. type NoMethod MetricStructuredName
  2702. raw := NoMethod(*s)
  2703. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2704. }
  2705. // MetricUpdate: Describes the state of a metric.
  2706. type MetricUpdate struct {
  2707. // Cumulative: True if this metric is reported as the total cumulative
  2708. // aggregate
  2709. // value accumulated since the worker started working on this
  2710. // WorkItem.
  2711. // By default this is false, indicating that this metric is reported
  2712. // as a delta that is not associated with any WorkItem.
  2713. Cumulative bool `json:"cumulative,omitempty"`
  2714. // Distribution: A struct value describing properties of a distribution
  2715. // of numeric values.
  2716. Distribution interface{} `json:"distribution,omitempty"`
  2717. // Gauge: A struct value describing properties of a Gauge.
  2718. // Metrics of gauge type show the value of a metric across time, and
  2719. // is
  2720. // aggregated based on the newest value.
  2721. Gauge interface{} `json:"gauge,omitempty"`
  2722. // Internal: Worker-computed aggregate value for internal use by the
  2723. // Dataflow
  2724. // service.
  2725. Internal interface{} `json:"internal,omitempty"`
  2726. // Kind: Metric aggregation kind. The possible metric aggregation kinds
  2727. // are
  2728. // "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and
  2729. // "Distribution".
  2730. // The specified aggregation kind is case-insensitive.
  2731. //
  2732. // If omitted, this is not an aggregated value but instead
  2733. // a single metric sample value.
  2734. Kind string `json:"kind,omitempty"`
  2735. // MeanCount: Worker-computed aggregate value for the "Mean" aggregation
  2736. // kind.
  2737. // This holds the count of the aggregated values and is used in
  2738. // combination
  2739. // with mean_sum above to obtain the actual mean aggregate value.
  2740. // The only possible value type is Long.
  2741. MeanCount interface{} `json:"meanCount,omitempty"`
  2742. // MeanSum: Worker-computed aggregate value for the "Mean" aggregation
  2743. // kind.
  2744. // This holds the sum of the aggregated values and is used in
  2745. // combination
  2746. // with mean_count below to obtain the actual mean aggregate value.
  2747. // The only possible value types are Long and Double.
  2748. MeanSum interface{} `json:"meanSum,omitempty"`
  2749. // Name: Name of the metric.
  2750. Name *MetricStructuredName `json:"name,omitempty"`
  2751. // Scalar: Worker-computed aggregate value for aggregation kinds "Sum",
  2752. // "Max", "Min",
  2753. // "And", and "Or". The possible value types are Long, Double, and
  2754. // Boolean.
  2755. Scalar interface{} `json:"scalar,omitempty"`
  2756. // Set: Worker-computed aggregate value for the "Set" aggregation kind.
  2757. // The only
  2758. // possible value type is a list of Values whose type can be Long,
  2759. // Double,
  2760. // or String, according to the metric's type. All Values in the list
  2761. // must
  2762. // be of the same type.
  2763. Set interface{} `json:"set,omitempty"`
  2764. // UpdateTime: Timestamp associated with the metric value. Optional when
  2765. // workers are
  2766. // reporting work progress; it will be filled in responses from
  2767. // the
  2768. // metrics API.
  2769. UpdateTime string `json:"updateTime,omitempty"`
  2770. // ForceSendFields is a list of field names (e.g. "Cumulative") to
  2771. // unconditionally include in API requests. By default, fields with
  2772. // empty values are omitted from API requests. However, any non-pointer,
  2773. // non-interface field appearing in ForceSendFields will be sent to the
  2774. // server regardless of whether the field is empty or not. This may be
  2775. // used to include empty fields in Patch requests.
  2776. ForceSendFields []string `json:"-"`
  2777. // NullFields is a list of field names (e.g. "Cumulative") to include in
  2778. // API requests with the JSON null value. By default, fields with empty
  2779. // values are omitted from API requests. However, any field with an
  2780. // empty value appearing in NullFields will be sent to the server as
  2781. // null. It is an error if a field in this list has a non-empty value.
  2782. // This may be used to include null fields in Patch requests.
  2783. NullFields []string `json:"-"`
  2784. }
  2785. func (s *MetricUpdate) MarshalJSON() ([]byte, error) {
  2786. type NoMethod MetricUpdate
  2787. raw := NoMethod(*s)
  2788. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2789. }
  2790. // MountedDataDisk: Describes mounted data disk.
  2791. type MountedDataDisk struct {
  2792. // DataDisk: The name of the data disk.
  2793. // This name is local to the Google Cloud Platform project and
  2794. // uniquely
  2795. // identifies the disk within that project, for
  2796. // example
  2797. // "myproject-1014-104817-4c2-harness-0-disk-1".
  2798. DataDisk string `json:"dataDisk,omitempty"`
  2799. // ForceSendFields is a list of field names (e.g. "DataDisk") to
  2800. // unconditionally include in API requests. By default, fields with
  2801. // empty values are omitted from API requests. However, any non-pointer,
  2802. // non-interface field appearing in ForceSendFields will be sent to the
  2803. // server regardless of whether the field is empty or not. This may be
  2804. // used to include empty fields in Patch requests.
  2805. ForceSendFields []string `json:"-"`
  2806. // NullFields is a list of field names (e.g. "DataDisk") to include in
  2807. // API requests with the JSON null value. By default, fields with empty
  2808. // values are omitted from API requests. However, any field with an
  2809. // empty value appearing in NullFields will be sent to the server as
  2810. // null. It is an error if a field in this list has a non-empty value.
  2811. // This may be used to include null fields in Patch requests.
  2812. NullFields []string `json:"-"`
  2813. }
  2814. func (s *MountedDataDisk) MarshalJSON() ([]byte, error) {
  2815. type NoMethod MountedDataDisk
  2816. raw := NoMethod(*s)
  2817. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2818. }
  2819. // MultiOutputInfo: Information about an output of a multi-output DoFn.
  2820. type MultiOutputInfo struct {
  2821. // Tag: The id of the tag the user code will emit to this output by;
  2822. // this
  2823. // should correspond to the tag of some SideInputInfo.
  2824. Tag string `json:"tag,omitempty"`
  2825. // ForceSendFields is a list of field names (e.g. "Tag") to
  2826. // unconditionally include in API requests. By default, fields with
  2827. // empty values are omitted from API requests. However, any non-pointer,
  2828. // non-interface field appearing in ForceSendFields will be sent to the
  2829. // server regardless of whether the field is empty or not. This may be
  2830. // used to include empty fields in Patch requests.
  2831. ForceSendFields []string `json:"-"`
  2832. // NullFields is a list of field names (e.g. "Tag") to include in API
  2833. // requests with the JSON null value. By default, fields with empty
  2834. // values are omitted from API requests. However, any field with an
  2835. // empty value appearing in NullFields will be sent to the server as
  2836. // null. It is an error if a field in this list has a non-empty value.
  2837. // This may be used to include null fields in Patch requests.
  2838. NullFields []string `json:"-"`
  2839. }
  2840. func (s *MultiOutputInfo) MarshalJSON() ([]byte, error) {
  2841. type NoMethod MultiOutputInfo
  2842. raw := NoMethod(*s)
  2843. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2844. }
  2845. // NameAndKind: Basic metadata about a counter.
  2846. type NameAndKind struct {
  2847. // Kind: Counter aggregation kind.
  2848. //
  2849. // Possible values:
  2850. // "INVALID" - Counter aggregation kind was not set.
  2851. // "SUM" - Aggregated value is the sum of all contributed values.
  2852. // "MAX" - Aggregated value is the max of all contributed values.
  2853. // "MIN" - Aggregated value is the min of all contributed values.
  2854. // "MEAN" - Aggregated value is the mean of all contributed values.
  2855. // "OR" - Aggregated value represents the logical 'or' of all
  2856. // contributed values.
  2857. // "AND" - Aggregated value represents the logical 'and' of all
  2858. // contributed values.
  2859. // "SET" - Aggregated value is a set of unique contributed values.
  2860. // "DISTRIBUTION" - Aggregated value captures statistics about a
  2861. // distribution.
  2862. // "LATEST_VALUE" - Aggregated value tracks the latest value of a
  2863. // variable.
  2864. Kind string `json:"kind,omitempty"`
  2865. // Name: Name of the counter.
  2866. Name string `json:"name,omitempty"`
  2867. // ForceSendFields is a list of field names (e.g. "Kind") to
  2868. // unconditionally include in API requests. By default, fields with
  2869. // empty values are omitted from API requests. However, any non-pointer,
  2870. // non-interface field appearing in ForceSendFields will be sent to the
  2871. // server regardless of whether the field is empty or not. This may be
  2872. // used to include empty fields in Patch requests.
  2873. ForceSendFields []string `json:"-"`
  2874. // NullFields is a list of field names (e.g. "Kind") to include in API
  2875. // requests with the JSON null value. By default, fields with empty
  2876. // values are omitted from API requests. However, any field with an
  2877. // empty value appearing in NullFields will be sent to the server as
  2878. // null. It is an error if a field in this list has a non-empty value.
  2879. // This may be used to include null fields in Patch requests.
  2880. NullFields []string `json:"-"`
  2881. }
  2882. func (s *NameAndKind) MarshalJSON() ([]byte, error) {
  2883. type NoMethod NameAndKind
  2884. raw := NoMethod(*s)
  2885. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2886. }
  2887. // Package: The packages that must be installed in order for a worker to
  2888. // run the
  2889. // steps of the Cloud Dataflow job that will be assigned to its
  2890. // worker
  2891. // pool.
  2892. //
  2893. // This is the mechanism by which the Cloud Dataflow SDK causes code
  2894. // to
  2895. // be loaded onto the workers. For example, the Cloud Dataflow Java
  2896. // SDK
  2897. // might use this to install jars containing the user's code and all of
  2898. // the
  2899. // various dependencies (libraries, data files, etc.) required in
  2900. // order
  2901. // for that code to run.
  2902. type Package struct {
  2903. // Location: The resource to read the package from. The supported
  2904. // resource type is:
  2905. //
  2906. // Google Cloud Storage:
  2907. //
  2908. // storage.googleapis.com/{bucket}
  2909. // bucket.storage.googleapis.com/
  2910. Location string `json:"location,omitempty"`
  2911. // Name: The name of the package.
  2912. Name string `json:"name,omitempty"`
  2913. // ForceSendFields is a list of field names (e.g. "Location") to
  2914. // unconditionally include in API requests. By default, fields with
  2915. // empty values are omitted from API requests. However, any non-pointer,
  2916. // non-interface field appearing in ForceSendFields will be sent to the
  2917. // server regardless of whether the field is empty or not. This may be
  2918. // used to include empty fields in Patch requests.
  2919. ForceSendFields []string `json:"-"`
  2920. // NullFields is a list of field names (e.g. "Location") to include in
  2921. // API requests with the JSON null value. By default, fields with empty
  2922. // values are omitted from API requests. However, any field with an
  2923. // empty value appearing in NullFields will be sent to the server as
  2924. // null. It is an error if a field in this list has a non-empty value.
  2925. // This may be used to include null fields in Patch requests.
  2926. NullFields []string `json:"-"`
  2927. }
  2928. func (s *Package) MarshalJSON() ([]byte, error) {
  2929. type NoMethod Package
  2930. raw := NoMethod(*s)
  2931. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2932. }
  2933. // ParDoInstruction: An instruction that does a ParDo operation.
  2934. // Takes one main input and zero or more side inputs, and produces
  2935. // zero or more outputs.
  2936. // Runs user code.
  2937. type ParDoInstruction struct {
  2938. // Input: The input.
  2939. Input *InstructionInput `json:"input,omitempty"`
  2940. // MultiOutputInfos: Information about each of the outputs, if user_fn
  2941. // is a MultiDoFn.
  2942. MultiOutputInfos []*MultiOutputInfo `json:"multiOutputInfos,omitempty"`
  2943. // NumOutputs: The number of outputs.
  2944. NumOutputs int64 `json:"numOutputs,omitempty"`
  2945. // SideInputs: Zero or more side inputs.
  2946. SideInputs []*SideInputInfo `json:"sideInputs,omitempty"`
  2947. // UserFn: The user function to invoke.
  2948. UserFn googleapi.RawMessage `json:"userFn,omitempty"`
  2949. // ForceSendFields is a list of field names (e.g. "Input") 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. "Input") to include in API
  2957. // requests with the JSON null value. By default, fields with empty
  2958. // values are omitted from API requests. However, any field with an
  2959. // 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 *ParDoInstruction) MarshalJSON() ([]byte, error) {
  2965. type NoMethod ParDoInstruction
  2966. raw := NoMethod(*s)
  2967. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2968. }
  2969. // ParallelInstruction: Describes a particular operation comprising a
  2970. // MapTask.
  2971. type ParallelInstruction struct {
  2972. // Flatten: Additional information for Flatten instructions.
  2973. Flatten *FlattenInstruction `json:"flatten,omitempty"`
  2974. // Name: User-provided name of this operation.
  2975. Name string `json:"name,omitempty"`
  2976. // OriginalName: System-defined name for the operation in the original
  2977. // workflow graph.
  2978. OriginalName string `json:"originalName,omitempty"`
  2979. // Outputs: Describes the outputs of the instruction.
  2980. Outputs []*InstructionOutput `json:"outputs,omitempty"`
  2981. // ParDo: Additional information for ParDo instructions.
  2982. ParDo *ParDoInstruction `json:"parDo,omitempty"`
  2983. // PartialGroupByKey: Additional information for PartialGroupByKey
  2984. // instructions.
  2985. PartialGroupByKey *PartialGroupByKeyInstruction `json:"partialGroupByKey,omitempty"`
  2986. // Read: Additional information for Read instructions.
  2987. Read *ReadInstruction `json:"read,omitempty"`
  2988. // SystemName: System-defined name of this operation.
  2989. // Unique across the workflow.
  2990. SystemName string `json:"systemName,omitempty"`
  2991. // Write: Additional information for Write instructions.
  2992. Write *WriteInstruction `json:"write,omitempty"`
  2993. // ForceSendFields is a list of field names (e.g. "Flatten") to
  2994. // unconditionally include in API requests. By default, fields with
  2995. // empty values are omitted from API requests. However, any non-pointer,
  2996. // non-interface field appearing in ForceSendFields will be sent to the
  2997. // server regardless of whether the field is empty or not. This may be
  2998. // used to include empty fields in Patch requests.
  2999. ForceSendFields []string `json:"-"`
  3000. // NullFields is a list of field names (e.g. "Flatten") to include in
  3001. // API requests with the JSON null value. By default, fields with empty
  3002. // values are omitted from API requests. However, any field with an
  3003. // empty value appearing in NullFields will be sent to the server as
  3004. // null. It is an error if a field in this list has a non-empty value.
  3005. // This may be used to include null fields in Patch requests.
  3006. NullFields []string `json:"-"`
  3007. }
  3008. func (s *ParallelInstruction) MarshalJSON() ([]byte, error) {
  3009. type NoMethod ParallelInstruction
  3010. raw := NoMethod(*s)
  3011. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3012. }
  3013. // Parameter: Structured data associated with this message.
  3014. type Parameter struct {
  3015. // Key: Key or name for this parameter.
  3016. Key string `json:"key,omitempty"`
  3017. // Value: Value for this parameter.
  3018. Value interface{} `json:"value,omitempty"`
  3019. // ForceSendFields is a list of field names (e.g. "Key") to
  3020. // unconditionally include in API requests. By default, fields with
  3021. // empty values are omitted from API requests. However, any non-pointer,
  3022. // non-interface field appearing in ForceSendFields will be sent to the
  3023. // server regardless of whether the field is empty or not. This may be
  3024. // used to include empty fields in Patch requests.
  3025. ForceSendFields []string `json:"-"`
  3026. // NullFields is a list of field names (e.g. "Key") to include in API
  3027. // requests with the JSON null value. By default, fields with empty
  3028. // values are omitted from API requests. However, any field with an
  3029. // empty value appearing in NullFields will be sent to the server as
  3030. // null. It is an error if a field in this list has a non-empty value.
  3031. // This may be used to include null fields in Patch requests.
  3032. NullFields []string `json:"-"`
  3033. }
  3034. func (s *Parameter) MarshalJSON() ([]byte, error) {
  3035. type NoMethod Parameter
  3036. raw := NoMethod(*s)
  3037. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3038. }
  3039. // ParameterMetadata: Metadata for a specific parameter.
  3040. type ParameterMetadata struct {
  3041. // HelpText: Required. The help text to display for the parameter.
  3042. HelpText string `json:"helpText,omitempty"`
  3043. // IsOptional: Optional. Whether the parameter is optional. Defaults to
  3044. // false.
  3045. IsOptional bool `json:"isOptional,omitempty"`
  3046. // Label: Required. The label to display for the parameter.
  3047. Label string `json:"label,omitempty"`
  3048. // Name: Required. The name of the parameter.
  3049. Name string `json:"name,omitempty"`
  3050. // Regexes: Optional. Regexes that the parameter must match.
  3051. Regexes []string `json:"regexes,omitempty"`
  3052. // ForceSendFields is a list of field names (e.g. "HelpText") to
  3053. // unconditionally include in API requests. By default, fields with
  3054. // empty values are omitted from API requests. However, any non-pointer,
  3055. // non-interface field appearing in ForceSendFields will be sent to the
  3056. // server regardless of whether the field is empty or not. This may be
  3057. // used to include empty fields in Patch requests.
  3058. ForceSendFields []string `json:"-"`
  3059. // NullFields is a list of field names (e.g. "HelpText") to include in
  3060. // API requests with the JSON null value. By default, fields with empty
  3061. // values are omitted from API requests. However, any field with an
  3062. // empty value appearing in NullFields will be sent to the server as
  3063. // null. It is an error if a field in this list has a non-empty value.
  3064. // This may be used to include null fields in Patch requests.
  3065. NullFields []string `json:"-"`
  3066. }
  3067. func (s *ParameterMetadata) MarshalJSON() ([]byte, error) {
  3068. type NoMethod ParameterMetadata
  3069. raw := NoMethod(*s)
  3070. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3071. }
  3072. // PartialGroupByKeyInstruction: An instruction that does a partial
  3073. // group-by-key.
  3074. // One input and one output.
  3075. type PartialGroupByKeyInstruction struct {
  3076. // Input: Describes the input to the partial group-by-key instruction.
  3077. Input *InstructionInput `json:"input,omitempty"`
  3078. // InputElementCodec: The codec to use for interpreting an element in
  3079. // the input PTable.
  3080. InputElementCodec googleapi.RawMessage `json:"inputElementCodec,omitempty"`
  3081. // OriginalCombineValuesInputStoreName: If this instruction includes a
  3082. // combining function this is the name of the
  3083. // intermediate store between the GBK and the CombineValues.
  3084. OriginalCombineValuesInputStoreName string `json:"originalCombineValuesInputStoreName,omitempty"`
  3085. // OriginalCombineValuesStepName: If this instruction includes a
  3086. // combining function, this is the name of the
  3087. // CombineValues instruction lifted into this instruction.
  3088. OriginalCombineValuesStepName string `json:"originalCombineValuesStepName,omitempty"`
  3089. // SideInputs: Zero or more side inputs.
  3090. SideInputs []*SideInputInfo `json:"sideInputs,omitempty"`
  3091. // ValueCombiningFn: The value combining function to invoke.
  3092. ValueCombiningFn googleapi.RawMessage `json:"valueCombiningFn,omitempty"`
  3093. // ForceSendFields is a list of field names (e.g. "Input") to
  3094. // unconditionally include in API requests. By default, fields with
  3095. // empty values are omitted from API requests. However, any non-pointer,
  3096. // non-interface field appearing in ForceSendFields will be sent to the
  3097. // server regardless of whether the field is empty or not. This may be
  3098. // used to include empty fields in Patch requests.
  3099. ForceSendFields []string `json:"-"`
  3100. // NullFields is a list of field names (e.g. "Input") to include in API
  3101. // requests with the JSON null value. By default, fields with empty
  3102. // values are omitted from API requests. However, any field with an
  3103. // empty value appearing in NullFields will be sent to the server as
  3104. // null. It is an error if a field in this list has a non-empty value.
  3105. // This may be used to include null fields in Patch requests.
  3106. NullFields []string `json:"-"`
  3107. }
  3108. func (s *PartialGroupByKeyInstruction) MarshalJSON() ([]byte, error) {
  3109. type NoMethod PartialGroupByKeyInstruction
  3110. raw := NoMethod(*s)
  3111. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3112. }
  3113. // PipelineDescription: A descriptive representation of submitted
  3114. // pipeline as well as the executed
  3115. // form. This data is provided by the Dataflow service for ease of
  3116. // visualizing
  3117. // the pipeline and interpretting Dataflow provided metrics.
  3118. type PipelineDescription struct {
  3119. // DisplayData: Pipeline level display data.
  3120. DisplayData []*DisplayData `json:"displayData,omitempty"`
  3121. // ExecutionPipelineStage: Description of each stage of execution of the
  3122. // pipeline.
  3123. ExecutionPipelineStage []*ExecutionStageSummary `json:"executionPipelineStage,omitempty"`
  3124. // OriginalPipelineTransform: Description of each transform in the
  3125. // pipeline and collections between them.
  3126. OriginalPipelineTransform []*TransformSummary `json:"originalPipelineTransform,omitempty"`
  3127. // ForceSendFields is a list of field names (e.g. "DisplayData") to
  3128. // unconditionally include in API requests. By default, fields with
  3129. // empty values are omitted from API requests. However, any non-pointer,
  3130. // non-interface field appearing in ForceSendFields will be sent to the
  3131. // server regardless of whether the field is empty or not. This may be
  3132. // used to include empty fields in Patch requests.
  3133. ForceSendFields []string `json:"-"`
  3134. // NullFields is a list of field names (e.g. "DisplayData") to include
  3135. // in API requests with the JSON null value. By default, fields with
  3136. // empty values are omitted from API requests. However, any field with
  3137. // an empty value appearing in NullFields will be sent to the server as
  3138. // null. It is an error if a field in this list has a non-empty value.
  3139. // This may be used to include null fields in Patch requests.
  3140. NullFields []string `json:"-"`
  3141. }
  3142. func (s *PipelineDescription) MarshalJSON() ([]byte, error) {
  3143. type NoMethod PipelineDescription
  3144. raw := NoMethod(*s)
  3145. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3146. }
  3147. // Position: Position defines a position within a collection of data.
  3148. // The value
  3149. // can be either the end position, a key (used with
  3150. // ordered
  3151. // collections), a byte offset, or a record index.
  3152. type Position struct {
  3153. // ByteOffset: Position is a byte offset.
  3154. ByteOffset int64 `json:"byteOffset,omitempty,string"`
  3155. // ConcatPosition: CloudPosition is a concat position.
  3156. ConcatPosition *ConcatPosition `json:"concatPosition,omitempty"`
  3157. // End: Position is past all other positions. Also useful for the
  3158. // end
  3159. // position of an unbounded range.
  3160. End bool `json:"end,omitempty"`
  3161. // Key: Position is a string key, ordered lexicographically.
  3162. Key string `json:"key,omitempty"`
  3163. // RecordIndex: Position is a record index.
  3164. RecordIndex int64 `json:"recordIndex,omitempty,string"`
  3165. // ShufflePosition: CloudPosition is a base64 encoded
  3166. // BatchShufflePosition (with FIXED
  3167. // sharding).
  3168. ShufflePosition string `json:"shufflePosition,omitempty"`
  3169. // ForceSendFields is a list of field names (e.g. "ByteOffset") to
  3170. // unconditionally include in API requests. By default, fields with
  3171. // empty values are omitted from API requests. However, any non-pointer,
  3172. // non-interface field appearing in ForceSendFields will be sent to the
  3173. // server regardless of whether the field is empty or not. This may be
  3174. // used to include empty fields in Patch requests.
  3175. ForceSendFields []string `json:"-"`
  3176. // NullFields is a list of field names (e.g. "ByteOffset") to include in
  3177. // API requests with the JSON null value. By default, fields with empty
  3178. // values are omitted from API requests. However, any field with an
  3179. // empty value appearing in NullFields will be sent to the server as
  3180. // null. It is an error if a field in this list has a non-empty value.
  3181. // This may be used to include null fields in Patch requests.
  3182. NullFields []string `json:"-"`
  3183. }
  3184. func (s *Position) MarshalJSON() ([]byte, error) {
  3185. type NoMethod Position
  3186. raw := NoMethod(*s)
  3187. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3188. }
  3189. // PubsubLocation: Identifies a pubsub location to use for transferring
  3190. // data into or
  3191. // out of a streaming Dataflow job.
  3192. type PubsubLocation struct {
  3193. // DropLateData: Indicates whether the pipeline allows late-arriving
  3194. // data.
  3195. DropLateData bool `json:"dropLateData,omitempty"`
  3196. // IdLabel: If set, contains a pubsub label from which to extract record
  3197. // ids.
  3198. // If left empty, record deduplication will be strictly best effort.
  3199. IdLabel string `json:"idLabel,omitempty"`
  3200. // Subscription: A pubsub subscription, in the form
  3201. // of
  3202. // "pubsub.googleapis.com/subscriptions/<project-id>/<subscription-nam
  3203. // e>"
  3204. Subscription string `json:"subscription,omitempty"`
  3205. // TimestampLabel: If set, contains a pubsub label from which to extract
  3206. // record timestamps.
  3207. // If left empty, record timestamps will be generated upon arrival.
  3208. TimestampLabel string `json:"timestampLabel,omitempty"`
  3209. // Topic: A pubsub topic, in the form
  3210. // of
  3211. // "pubsub.googleapis.com/topics/<project-id>/<topic-name>"
  3212. Topic string `json:"topic,omitempty"`
  3213. // TrackingSubscription: If set, specifies the pubsub subscription that
  3214. // will be used for tracking
  3215. // custom time timestamps for watermark estimation.
  3216. TrackingSubscription string `json:"trackingSubscription,omitempty"`
  3217. // WithAttributes: If true, then the client has requested to get pubsub
  3218. // attributes.
  3219. WithAttributes bool `json:"withAttributes,omitempty"`
  3220. // ForceSendFields is a list of field names (e.g. "DropLateData") to
  3221. // unconditionally include in API requests. By default, fields with
  3222. // empty values are omitted from API requests. However, any non-pointer,
  3223. // non-interface field appearing in ForceSendFields will be sent to the
  3224. // server regardless of whether the field is empty or not. This may be
  3225. // used to include empty fields in Patch requests.
  3226. ForceSendFields []string `json:"-"`
  3227. // NullFields is a list of field names (e.g. "DropLateData") to include
  3228. // in API requests with the JSON null value. By default, fields with
  3229. // empty values are omitted from API requests. However, any field with
  3230. // an empty value appearing in NullFields will be sent to the server as
  3231. // null. It is an error if a field in this list has a non-empty value.
  3232. // This may be used to include null fields in Patch requests.
  3233. NullFields []string `json:"-"`
  3234. }
  3235. func (s *PubsubLocation) MarshalJSON() ([]byte, error) {
  3236. type NoMethod PubsubLocation
  3237. raw := NoMethod(*s)
  3238. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3239. }
  3240. // ReadInstruction: An instruction that reads records.
  3241. // Takes no inputs, produces one output.
  3242. type ReadInstruction struct {
  3243. // Source: The source to read from.
  3244. Source *Source `json:"source,omitempty"`
  3245. // ForceSendFields is a list of field names (e.g. "Source") to
  3246. // unconditionally include in API requests. By default, fields with
  3247. // empty values are omitted from API requests. However, any non-pointer,
  3248. // non-interface field appearing in ForceSendFields will be sent to the
  3249. // server regardless of whether the field is empty or not. This may be
  3250. // used to include empty fields in Patch requests.
  3251. ForceSendFields []string `json:"-"`
  3252. // NullFields is a list of field names (e.g. "Source") to include in API
  3253. // requests with the JSON null value. By default, fields with empty
  3254. // values are omitted from API requests. However, any field with an
  3255. // empty value appearing in NullFields will be sent to the server as
  3256. // null. It is an error if a field in this list has a non-empty value.
  3257. // This may be used to include null fields in Patch requests.
  3258. NullFields []string `json:"-"`
  3259. }
  3260. func (s *ReadInstruction) MarshalJSON() ([]byte, error) {
  3261. type NoMethod ReadInstruction
  3262. raw := NoMethod(*s)
  3263. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3264. }
  3265. // ReportWorkItemStatusRequest: Request to report the status of
  3266. // WorkItems.
  3267. type ReportWorkItemStatusRequest struct {
  3268. // CurrentWorkerTime: The current timestamp at the worker.
  3269. CurrentWorkerTime string `json:"currentWorkerTime,omitempty"`
  3270. // Location: The location which contains the WorkItem's job.
  3271. Location string `json:"location,omitempty"`
  3272. // WorkItemStatuses: The order is unimportant, except that the order of
  3273. // the
  3274. // WorkItemServiceState messages in the
  3275. // ReportWorkItemStatusResponse
  3276. // corresponds to the order of WorkItemStatus messages here.
  3277. WorkItemStatuses []*WorkItemStatus `json:"workItemStatuses,omitempty"`
  3278. // WorkerId: The ID of the worker reporting the WorkItem status. If
  3279. // this
  3280. // does not match the ID of the worker which the Dataflow
  3281. // service
  3282. // believes currently has the lease on the WorkItem, the report
  3283. // will be dropped (with an error response).
  3284. WorkerId string `json:"workerId,omitempty"`
  3285. // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime")
  3286. // to unconditionally include in API requests. By default, fields with
  3287. // empty values are omitted from API requests. However, any non-pointer,
  3288. // non-interface field appearing in ForceSendFields will be sent to the
  3289. // server regardless of whether the field is empty or not. This may be
  3290. // used to include empty fields in Patch requests.
  3291. ForceSendFields []string `json:"-"`
  3292. // NullFields is a list of field names (e.g. "CurrentWorkerTime") to
  3293. // include in API requests with the JSON null value. By default, fields
  3294. // with empty values are omitted from API requests. However, any field
  3295. // with an empty value appearing in NullFields will be sent to the
  3296. // server as null. It is an error if a field in this list has a
  3297. // non-empty value. This may be used to include null fields in Patch
  3298. // requests.
  3299. NullFields []string `json:"-"`
  3300. }
  3301. func (s *ReportWorkItemStatusRequest) MarshalJSON() ([]byte, error) {
  3302. type NoMethod ReportWorkItemStatusRequest
  3303. raw := NoMethod(*s)
  3304. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3305. }
  3306. // ReportWorkItemStatusResponse: Response from a request to report the
  3307. // status of WorkItems.
  3308. type ReportWorkItemStatusResponse struct {
  3309. // WorkItemServiceStates: A set of messages indicating the service-side
  3310. // state for each
  3311. // WorkItem whose status was reported, in the same order as
  3312. // the
  3313. // WorkItemStatus messages in the ReportWorkItemStatusRequest
  3314. // which
  3315. // resulting in this response.
  3316. WorkItemServiceStates []*WorkItemServiceState `json:"workItemServiceStates,omitempty"`
  3317. // ServerResponse contains the HTTP response code and headers from the
  3318. // server.
  3319. googleapi.ServerResponse `json:"-"`
  3320. // ForceSendFields is a list of field names (e.g.
  3321. // "WorkItemServiceStates") to unconditionally include in API requests.
  3322. // By default, fields with empty values are omitted from API requests.
  3323. // However, any non-pointer, non-interface field appearing in
  3324. // ForceSendFields will be sent to the server regardless of whether the
  3325. // field is empty or not. This may be used to include empty fields in
  3326. // Patch requests.
  3327. ForceSendFields []string `json:"-"`
  3328. // NullFields is a list of field names (e.g. "WorkItemServiceStates") to
  3329. // include in API requests with the JSON null value. By default, fields
  3330. // with empty values are omitted from API requests. However, any field
  3331. // with an empty value appearing in NullFields will be sent to the
  3332. // server as null. It is an error if a field in this list has a
  3333. // non-empty value. This may be used to include null fields in Patch
  3334. // requests.
  3335. NullFields []string `json:"-"`
  3336. }
  3337. func (s *ReportWorkItemStatusResponse) MarshalJSON() ([]byte, error) {
  3338. type NoMethod ReportWorkItemStatusResponse
  3339. raw := NoMethod(*s)
  3340. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3341. }
  3342. // ReportedParallelism: Represents the level of parallelism in a
  3343. // WorkItem's input,
  3344. // reported by the worker.
  3345. type ReportedParallelism struct {
  3346. // IsInfinite: Specifies whether the parallelism is infinite. If true,
  3347. // "value" is
  3348. // ignored.
  3349. // Infinite parallelism means the service will assume that the work
  3350. // item
  3351. // can always be split into more non-empty work items by dynamic
  3352. // splitting.
  3353. // This is a work-around for lack of support for infinity by the
  3354. // current
  3355. // JSON-based Java RPC stack.
  3356. IsInfinite bool `json:"isInfinite,omitempty"`
  3357. // Value: Specifies the level of parallelism in case it is finite.
  3358. Value float64 `json:"value,omitempty"`
  3359. // ForceSendFields is a list of field names (e.g. "IsInfinite") to
  3360. // unconditionally include in API requests. By default, fields with
  3361. // empty values are omitted from API requests. However, any non-pointer,
  3362. // non-interface field appearing in ForceSendFields will be sent to the
  3363. // server regardless of whether the field is empty or not. This may be
  3364. // used to include empty fields in Patch requests.
  3365. ForceSendFields []string `json:"-"`
  3366. // NullFields is a list of field names (e.g. "IsInfinite") to include in
  3367. // API requests with the JSON null value. By default, fields with empty
  3368. // values are omitted from API requests. However, any field with an
  3369. // empty value appearing in NullFields will be sent to the server as
  3370. // null. It is an error if a field in this list has a non-empty value.
  3371. // This may be used to include null fields in Patch requests.
  3372. NullFields []string `json:"-"`
  3373. }
  3374. func (s *ReportedParallelism) MarshalJSON() ([]byte, error) {
  3375. type NoMethod ReportedParallelism
  3376. raw := NoMethod(*s)
  3377. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3378. }
  3379. func (s *ReportedParallelism) UnmarshalJSON(data []byte) error {
  3380. type NoMethod ReportedParallelism
  3381. var s1 struct {
  3382. Value gensupport.JSONFloat64 `json:"value"`
  3383. *NoMethod
  3384. }
  3385. s1.NoMethod = (*NoMethod)(s)
  3386. if err := json.Unmarshal(data, &s1); err != nil {
  3387. return err
  3388. }
  3389. s.Value = float64(s1.Value)
  3390. return nil
  3391. }
  3392. // ResourceUtilizationReport: Worker metrics exported from workers. This
  3393. // contains resource utilization
  3394. // metrics accumulated from a variety of sources. For more information,
  3395. // see
  3396. // go/df-resource-signals.
  3397. type ResourceUtilizationReport struct {
  3398. // CpuTime: CPU utilization samples.
  3399. CpuTime []*CPUTime `json:"cpuTime,omitempty"`
  3400. // ForceSendFields is a list of field names (e.g. "CpuTime") to
  3401. // unconditionally include in API requests. By default, fields with
  3402. // empty values are omitted from API requests. However, any non-pointer,
  3403. // non-interface field appearing in ForceSendFields will be sent to the
  3404. // server regardless of whether the field is empty or not. This may be
  3405. // used to include empty fields in Patch requests.
  3406. ForceSendFields []string `json:"-"`
  3407. // NullFields is a list of field names (e.g. "CpuTime") to include in
  3408. // API requests with the JSON null value. By default, fields with empty
  3409. // values are omitted from API requests. However, any field with an
  3410. // empty value appearing in NullFields will be sent to the server as
  3411. // null. It is an error if a field in this list has a non-empty value.
  3412. // This may be used to include null fields in Patch requests.
  3413. NullFields []string `json:"-"`
  3414. }
  3415. func (s *ResourceUtilizationReport) MarshalJSON() ([]byte, error) {
  3416. type NoMethod ResourceUtilizationReport
  3417. raw := NoMethod(*s)
  3418. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3419. }
  3420. // ResourceUtilizationReportResponse: Service-side response to
  3421. // WorkerMessage reporting resource utilization.
  3422. type ResourceUtilizationReportResponse struct {
  3423. }
  3424. // RuntimeEnvironment: The environment values to set at runtime.
  3425. type RuntimeEnvironment struct {
  3426. // AdditionalExperiments: Additional experiment flags for the job.
  3427. AdditionalExperiments []string `json:"additionalExperiments,omitempty"`
  3428. // BypassTempDirValidation: Whether to bypass the safety checks for the
  3429. // job's temporary directory.
  3430. // Use with caution.
  3431. BypassTempDirValidation bool `json:"bypassTempDirValidation,omitempty"`
  3432. // MachineType: The machine type to use for the job. Defaults to the
  3433. // value from the
  3434. // template if not specified.
  3435. MachineType string `json:"machineType,omitempty"`
  3436. // MaxWorkers: The maximum number of Google Compute Engine instances to
  3437. // be made
  3438. // available to your pipeline during execution, from 1 to 1000.
  3439. MaxWorkers int64 `json:"maxWorkers,omitempty"`
  3440. // Network: Network to which VMs will be assigned. If empty or
  3441. // unspecified,
  3442. // the service will use the network "default".
  3443. Network string `json:"network,omitempty"`
  3444. // ServiceAccountEmail: The email address of the service account to run
  3445. // the job as.
  3446. ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
  3447. // Subnetwork: Subnetwork to which VMs will be assigned, if desired.
  3448. // Expected to be of
  3449. // the form "regions/REGION/subnetworks/SUBNETWORK".
  3450. Subnetwork string `json:"subnetwork,omitempty"`
  3451. // TempLocation: The Cloud Storage path to use for temporary files.
  3452. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  3453. TempLocation string `json:"tempLocation,omitempty"`
  3454. // Zone: The Compute Engine
  3455. // [availability
  3456. // zone](https://cloud.google.com/compute/docs/regions-zone
  3457. // s/regions-zones)
  3458. // for launching worker instances to run your pipeline.
  3459. Zone string `json:"zone,omitempty"`
  3460. // ForceSendFields is a list of field names (e.g.
  3461. // "AdditionalExperiments") to unconditionally include in API requests.
  3462. // By default, fields with empty values are omitted from API requests.
  3463. // However, any non-pointer, non-interface field appearing in
  3464. // ForceSendFields will be sent to the server regardless of whether the
  3465. // field is empty or not. This may be used to include empty fields in
  3466. // Patch requests.
  3467. ForceSendFields []string `json:"-"`
  3468. // NullFields is a list of field names (e.g. "AdditionalExperiments") to
  3469. // include in API requests with the JSON null value. By default, fields
  3470. // with empty values are omitted from API requests. However, any field
  3471. // with an empty value appearing in NullFields will be sent to the
  3472. // server as null. It is an error if a field in this list has a
  3473. // non-empty value. This may be used to include null fields in Patch
  3474. // requests.
  3475. NullFields []string `json:"-"`
  3476. }
  3477. func (s *RuntimeEnvironment) MarshalJSON() ([]byte, error) {
  3478. type NoMethod RuntimeEnvironment
  3479. raw := NoMethod(*s)
  3480. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3481. }
  3482. // SendDebugCaptureRequest: Request to send encoded debug information.
  3483. type SendDebugCaptureRequest struct {
  3484. // ComponentId: The internal component id for which debug information is
  3485. // sent.
  3486. ComponentId string `json:"componentId,omitempty"`
  3487. // Data: The encoded debug information.
  3488. Data string `json:"data,omitempty"`
  3489. // Location: The location which contains the job specified by job_id.
  3490. Location string `json:"location,omitempty"`
  3491. // WorkerId: The worker id, i.e., VM hostname.
  3492. WorkerId string `json:"workerId,omitempty"`
  3493. // ForceSendFields is a list of field names (e.g. "ComponentId") to
  3494. // unconditionally include in API requests. By default, fields with
  3495. // empty values are omitted from API requests. However, any non-pointer,
  3496. // non-interface field appearing in ForceSendFields will be sent to the
  3497. // server regardless of whether the field is empty or not. This may be
  3498. // used to include empty fields in Patch requests.
  3499. ForceSendFields []string `json:"-"`
  3500. // NullFields is a list of field names (e.g. "ComponentId") to include
  3501. // in API requests with the JSON null value. By default, fields with
  3502. // empty values are omitted from API requests. However, any field with
  3503. // an empty value appearing in NullFields will be sent to the server as
  3504. // null. It is an error if a field in this list has a non-empty value.
  3505. // This may be used to include null fields in Patch requests.
  3506. NullFields []string `json:"-"`
  3507. }
  3508. func (s *SendDebugCaptureRequest) MarshalJSON() ([]byte, error) {
  3509. type NoMethod SendDebugCaptureRequest
  3510. raw := NoMethod(*s)
  3511. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3512. }
  3513. // SendDebugCaptureResponse: Response to a send capture request.
  3514. // nothing
  3515. type SendDebugCaptureResponse struct {
  3516. // ServerResponse contains the HTTP response code and headers from the
  3517. // server.
  3518. googleapi.ServerResponse `json:"-"`
  3519. }
  3520. // SendWorkerMessagesRequest: A request for sending worker messages to
  3521. // the service.
  3522. type SendWorkerMessagesRequest struct {
  3523. // Location: The location which contains the job
  3524. Location string `json:"location,omitempty"`
  3525. // WorkerMessages: The WorkerMessages to send.
  3526. WorkerMessages []*WorkerMessage `json:"workerMessages,omitempty"`
  3527. // ForceSendFields is a list of field names (e.g. "Location") to
  3528. // unconditionally include in API requests. By default, fields with
  3529. // empty values are omitted from API requests. However, any non-pointer,
  3530. // non-interface field appearing in ForceSendFields will be sent to the
  3531. // server regardless of whether the field is empty or not. This may be
  3532. // used to include empty fields in Patch requests.
  3533. ForceSendFields []string `json:"-"`
  3534. // NullFields is a list of field names (e.g. "Location") to include in
  3535. // API requests with the JSON null value. By default, fields with empty
  3536. // values are omitted from API requests. However, any field with an
  3537. // empty value appearing in NullFields will be sent to the server as
  3538. // null. It is an error if a field in this list has a non-empty value.
  3539. // This may be used to include null fields in Patch requests.
  3540. NullFields []string `json:"-"`
  3541. }
  3542. func (s *SendWorkerMessagesRequest) MarshalJSON() ([]byte, error) {
  3543. type NoMethod SendWorkerMessagesRequest
  3544. raw := NoMethod(*s)
  3545. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3546. }
  3547. // SendWorkerMessagesResponse: The response to the worker messages.
  3548. type SendWorkerMessagesResponse struct {
  3549. // WorkerMessageResponses: The servers response to the worker messages.
  3550. WorkerMessageResponses []*WorkerMessageResponse `json:"workerMessageResponses,omitempty"`
  3551. // ServerResponse contains the HTTP response code and headers from the
  3552. // server.
  3553. googleapi.ServerResponse `json:"-"`
  3554. // ForceSendFields is a list of field names (e.g.
  3555. // "WorkerMessageResponses") to unconditionally include in API requests.
  3556. // By default, fields with empty values are omitted from API requests.
  3557. // However, any non-pointer, non-interface field appearing in
  3558. // ForceSendFields will be sent to the server regardless of whether the
  3559. // field is empty or not. This may be used to include empty fields in
  3560. // Patch requests.
  3561. ForceSendFields []string `json:"-"`
  3562. // NullFields is a list of field names (e.g. "WorkerMessageResponses")
  3563. // to include in API requests with the JSON null value. By default,
  3564. // fields with empty values are omitted from API requests. However, any
  3565. // field with an empty value appearing in NullFields will be sent to the
  3566. // server as null. It is an error if a field in this list has a
  3567. // non-empty value. This may be used to include null fields in Patch
  3568. // requests.
  3569. NullFields []string `json:"-"`
  3570. }
  3571. func (s *SendWorkerMessagesResponse) MarshalJSON() ([]byte, error) {
  3572. type NoMethod SendWorkerMessagesResponse
  3573. raw := NoMethod(*s)
  3574. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3575. }
  3576. // SeqMapTask: Describes a particular function to invoke.
  3577. type SeqMapTask struct {
  3578. // Inputs: Information about each of the inputs.
  3579. Inputs []*SideInputInfo `json:"inputs,omitempty"`
  3580. // Name: The user-provided name of the SeqDo operation.
  3581. Name string `json:"name,omitempty"`
  3582. // OutputInfos: Information about each of the outputs.
  3583. OutputInfos []*SeqMapTaskOutputInfo `json:"outputInfos,omitempty"`
  3584. // StageName: System-defined name of the stage containing the SeqDo
  3585. // operation.
  3586. // Unique across the workflow.
  3587. StageName string `json:"stageName,omitempty"`
  3588. // SystemName: System-defined name of the SeqDo operation.
  3589. // Unique across the workflow.
  3590. SystemName string `json:"systemName,omitempty"`
  3591. // UserFn: The user function to invoke.
  3592. UserFn googleapi.RawMessage `json:"userFn,omitempty"`
  3593. // ForceSendFields is a list of field names (e.g. "Inputs") to
  3594. // unconditionally include in API requests. By default, fields with
  3595. // empty values are omitted from API requests. However, any non-pointer,
  3596. // non-interface field appearing in ForceSendFields will be sent to the
  3597. // server regardless of whether the field is empty or not. This may be
  3598. // used to include empty fields in Patch requests.
  3599. ForceSendFields []string `json:"-"`
  3600. // NullFields is a list of field names (e.g. "Inputs") to include in API
  3601. // requests with the JSON null value. By default, fields with empty
  3602. // values are omitted from API requests. However, any field with an
  3603. // empty value appearing in NullFields will be sent to the server as
  3604. // null. It is an error if a field in this list has a non-empty value.
  3605. // This may be used to include null fields in Patch requests.
  3606. NullFields []string `json:"-"`
  3607. }
  3608. func (s *SeqMapTask) MarshalJSON() ([]byte, error) {
  3609. type NoMethod SeqMapTask
  3610. raw := NoMethod(*s)
  3611. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3612. }
  3613. // SeqMapTaskOutputInfo: Information about an output of a SeqMapTask.
  3614. type SeqMapTaskOutputInfo struct {
  3615. // Sink: The sink to write the output value to.
  3616. Sink *Sink `json:"sink,omitempty"`
  3617. // Tag: The id of the TupleTag the user code will tag the output value
  3618. // by.
  3619. Tag string `json:"tag,omitempty"`
  3620. // ForceSendFields is a list of field names (e.g. "Sink") to
  3621. // unconditionally include in API requests. By default, fields with
  3622. // empty values are omitted from API requests. However, any non-pointer,
  3623. // non-interface field appearing in ForceSendFields will be sent to the
  3624. // server regardless of whether the field is empty or not. This may be
  3625. // used to include empty fields in Patch requests.
  3626. ForceSendFields []string `json:"-"`
  3627. // NullFields is a list of field names (e.g. "Sink") to include in API
  3628. // requests with the JSON null value. By default, fields with empty
  3629. // values are omitted from API requests. However, any field with an
  3630. // empty value appearing in NullFields will be sent to the server as
  3631. // null. It is an error if a field in this list has a non-empty value.
  3632. // This may be used to include null fields in Patch requests.
  3633. NullFields []string `json:"-"`
  3634. }
  3635. func (s *SeqMapTaskOutputInfo) MarshalJSON() ([]byte, error) {
  3636. type NoMethod SeqMapTaskOutputInfo
  3637. raw := NoMethod(*s)
  3638. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3639. }
  3640. // ShellTask: A task which consists of a shell command for the worker to
  3641. // execute.
  3642. type ShellTask struct {
  3643. // Command: The shell command to run.
  3644. Command string `json:"command,omitempty"`
  3645. // ExitCode: Exit code for the task.
  3646. ExitCode int64 `json:"exitCode,omitempty"`
  3647. // ForceSendFields is a list of field names (e.g. "Command") to
  3648. // unconditionally include in API requests. By default, fields with
  3649. // empty values are omitted from API requests. However, any non-pointer,
  3650. // non-interface field appearing in ForceSendFields will be sent to the
  3651. // server regardless of whether the field is empty or not. This may be
  3652. // used to include empty fields in Patch requests.
  3653. ForceSendFields []string `json:"-"`
  3654. // NullFields is a list of field names (e.g. "Command") to include in
  3655. // API requests with the JSON null value. By default, fields with empty
  3656. // values are omitted from API requests. However, any field with an
  3657. // empty value appearing in NullFields will be sent to the server as
  3658. // null. It is an error if a field in this list has a non-empty value.
  3659. // This may be used to include null fields in Patch requests.
  3660. NullFields []string `json:"-"`
  3661. }
  3662. func (s *ShellTask) MarshalJSON() ([]byte, error) {
  3663. type NoMethod ShellTask
  3664. raw := NoMethod(*s)
  3665. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3666. }
  3667. // SideInputInfo: Information about a side input of a DoFn or an input
  3668. // of a SeqDoFn.
  3669. type SideInputInfo struct {
  3670. // Kind: How to interpret the source element(s) as a side input value.
  3671. Kind googleapi.RawMessage `json:"kind,omitempty"`
  3672. // Sources: The source(s) to read element(s) from to get the value of
  3673. // this side input.
  3674. // If more than one source, then the elements are taken from
  3675. // the
  3676. // sources, in the specified order if order matters.
  3677. // At least one source is required.
  3678. Sources []*Source `json:"sources,omitempty"`
  3679. // Tag: The id of the tag the user code will access this side input
  3680. // by;
  3681. // this should correspond to the tag of some MultiOutputInfo.
  3682. Tag string `json:"tag,omitempty"`
  3683. // ForceSendFields is a list of field names (e.g. "Kind") to
  3684. // unconditionally include in API requests. By default, fields with
  3685. // empty values are omitted from API requests. However, any non-pointer,
  3686. // non-interface field appearing in ForceSendFields will be sent to the
  3687. // server regardless of whether the field is empty or not. This may be
  3688. // used to include empty fields in Patch requests.
  3689. ForceSendFields []string `json:"-"`
  3690. // NullFields is a list of field names (e.g. "Kind") to include in API
  3691. // requests with the JSON null value. By default, fields with empty
  3692. // values are omitted from API requests. However, any field with an
  3693. // empty value appearing in NullFields will be sent to the server as
  3694. // null. It is an error if a field in this list has a non-empty value.
  3695. // This may be used to include null fields in Patch requests.
  3696. NullFields []string `json:"-"`
  3697. }
  3698. func (s *SideInputInfo) MarshalJSON() ([]byte, error) {
  3699. type NoMethod SideInputInfo
  3700. raw := NoMethod(*s)
  3701. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3702. }
  3703. // Sink: A sink that records can be encoded and written to.
  3704. type Sink struct {
  3705. // Codec: The codec to use to encode data written to the sink.
  3706. Codec googleapi.RawMessage `json:"codec,omitempty"`
  3707. // Spec: The sink to write to, plus its parameters.
  3708. Spec googleapi.RawMessage `json:"spec,omitempty"`
  3709. // ForceSendFields is a list of field names (e.g. "Codec") to
  3710. // unconditionally include in API requests. By default, fields with
  3711. // empty values are omitted from API requests. However, any non-pointer,
  3712. // non-interface field appearing in ForceSendFields will be sent to the
  3713. // server regardless of whether the field is empty or not. This may be
  3714. // used to include empty fields in Patch requests.
  3715. ForceSendFields []string `json:"-"`
  3716. // NullFields is a list of field names (e.g. "Codec") to include in API
  3717. // requests with the JSON null value. By default, fields with empty
  3718. // values are omitted from API requests. However, any field with an
  3719. // empty value appearing in NullFields will be sent to the server as
  3720. // null. It is an error if a field in this list has a non-empty value.
  3721. // This may be used to include null fields in Patch requests.
  3722. NullFields []string `json:"-"`
  3723. }
  3724. func (s *Sink) MarshalJSON() ([]byte, error) {
  3725. type NoMethod Sink
  3726. raw := NoMethod(*s)
  3727. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3728. }
  3729. // Source: A source that records can be read and decoded from.
  3730. type Source struct {
  3731. // BaseSpecs: While splitting, sources may specify the produced
  3732. // bundles
  3733. // as differences against another source, in order to save
  3734. // backend-side
  3735. // memory and allow bigger jobs. For details, see SourceSplitRequest.
  3736. // To support this use case, the full set of parameters of the source
  3737. // is logically obtained by taking the latest explicitly specified
  3738. // value
  3739. // of each parameter in the order:
  3740. // base_specs (later items win), spec (overrides anything in
  3741. // base_specs).
  3742. BaseSpecs []googleapi.RawMessage `json:"baseSpecs,omitempty"`
  3743. // Codec: The codec to use to decode data read from the source.
  3744. Codec googleapi.RawMessage `json:"codec,omitempty"`
  3745. // DoesNotNeedSplitting: Setting this value to true hints to the
  3746. // framework that the source
  3747. // doesn't need splitting, and using SourceSplitRequest on it
  3748. // would
  3749. // yield SOURCE_SPLIT_OUTCOME_USE_CURRENT.
  3750. //
  3751. // E.g. a file splitter may set this to true when splitting a single
  3752. // file
  3753. // into a set of byte ranges of appropriate size, and set this
  3754. // to false when splitting a filepattern into individual files.
  3755. // However, for efficiency, a file splitter may decide to produce
  3756. // file subranges directly from the filepattern to avoid a
  3757. // splitting
  3758. // round-trip.
  3759. //
  3760. // See SourceSplitRequest for an overview of the splitting
  3761. // process.
  3762. //
  3763. // This field is meaningful only in the Source objects populated
  3764. // by the user (e.g. when filling in a DerivedSource).
  3765. // Source objects supplied by the framework to the user don't have
  3766. // this field populated.
  3767. DoesNotNeedSplitting bool `json:"doesNotNeedSplitting,omitempty"`
  3768. // Metadata: Optionally, metadata for this source can be supplied right
  3769. // away,
  3770. // avoiding a SourceGetMetadataOperation roundtrip
  3771. // (see SourceOperationRequest).
  3772. //
  3773. // This field is meaningful only in the Source objects populated
  3774. // by the user (e.g. when filling in a DerivedSource).
  3775. // Source objects supplied by the framework to the user don't have
  3776. // this field populated.
  3777. Metadata *SourceMetadata `json:"metadata,omitempty"`
  3778. // Spec: The source to read from, plus its parameters.
  3779. Spec googleapi.RawMessage `json:"spec,omitempty"`
  3780. // ForceSendFields is a list of field names (e.g. "BaseSpecs") to
  3781. // unconditionally include in API requests. By default, fields with
  3782. // empty values are omitted from API requests. However, any non-pointer,
  3783. // non-interface field appearing in ForceSendFields will be sent to the
  3784. // server regardless of whether the field is empty or not. This may be
  3785. // used to include empty fields in Patch requests.
  3786. ForceSendFields []string `json:"-"`
  3787. // NullFields is a list of field names (e.g. "BaseSpecs") to include in
  3788. // API requests with the JSON null value. By default, fields with empty
  3789. // values are omitted from API requests. However, any field with an
  3790. // empty value appearing in NullFields will be sent to the server as
  3791. // null. It is an error if a field in this list has a non-empty value.
  3792. // This may be used to include null fields in Patch requests.
  3793. NullFields []string `json:"-"`
  3794. }
  3795. func (s *Source) MarshalJSON() ([]byte, error) {
  3796. type NoMethod Source
  3797. raw := NoMethod(*s)
  3798. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3799. }
  3800. // SourceFork: DEPRECATED in favor of DynamicSourceSplit.
  3801. type SourceFork struct {
  3802. // Primary: DEPRECATED
  3803. Primary *SourceSplitShard `json:"primary,omitempty"`
  3804. // PrimarySource: DEPRECATED
  3805. PrimarySource *DerivedSource `json:"primarySource,omitempty"`
  3806. // Residual: DEPRECATED
  3807. Residual *SourceSplitShard `json:"residual,omitempty"`
  3808. // ResidualSource: DEPRECATED
  3809. ResidualSource *DerivedSource `json:"residualSource,omitempty"`
  3810. // ForceSendFields is a list of field names (e.g. "Primary") to
  3811. // unconditionally include in API requests. By default, fields with
  3812. // empty values are omitted from API requests. However, any non-pointer,
  3813. // non-interface field appearing in ForceSendFields will be sent to the
  3814. // server regardless of whether the field is empty or not. This may be
  3815. // used to include empty fields in Patch requests.
  3816. ForceSendFields []string `json:"-"`
  3817. // NullFields is a list of field names (e.g. "Primary") to include in
  3818. // API requests with the JSON null value. By default, fields with empty
  3819. // values are omitted from API requests. However, any field with an
  3820. // empty value appearing in NullFields will be sent to the server as
  3821. // null. It is an error if a field in this list has a non-empty value.
  3822. // This may be used to include null fields in Patch requests.
  3823. NullFields []string `json:"-"`
  3824. }
  3825. func (s *SourceFork) MarshalJSON() ([]byte, error) {
  3826. type NoMethod SourceFork
  3827. raw := NoMethod(*s)
  3828. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3829. }
  3830. // SourceGetMetadataRequest: A request to compute the SourceMetadata of
  3831. // a Source.
  3832. type SourceGetMetadataRequest struct {
  3833. // Source: Specification of the source whose metadata should be
  3834. // computed.
  3835. Source *Source `json:"source,omitempty"`
  3836. // ForceSendFields is a list of field names (e.g. "Source") to
  3837. // unconditionally include in API requests. By default, fields with
  3838. // empty values are omitted from API requests. However, any non-pointer,
  3839. // non-interface field appearing in ForceSendFields will be sent to the
  3840. // server regardless of whether the field is empty or not. This may be
  3841. // used to include empty fields in Patch requests.
  3842. ForceSendFields []string `json:"-"`
  3843. // NullFields is a list of field names (e.g. "Source") to include in API
  3844. // requests with the JSON null value. By default, fields with empty
  3845. // values are omitted from API requests. However, any field with an
  3846. // empty value appearing in NullFields will be sent to the server as
  3847. // null. It is an error if a field in this list has a non-empty value.
  3848. // This may be used to include null fields in Patch requests.
  3849. NullFields []string `json:"-"`
  3850. }
  3851. func (s *SourceGetMetadataRequest) MarshalJSON() ([]byte, error) {
  3852. type NoMethod SourceGetMetadataRequest
  3853. raw := NoMethod(*s)
  3854. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3855. }
  3856. // SourceGetMetadataResponse: The result of a
  3857. // SourceGetMetadataOperation.
  3858. type SourceGetMetadataResponse struct {
  3859. // Metadata: The computed metadata.
  3860. Metadata *SourceMetadata `json:"metadata,omitempty"`
  3861. // ForceSendFields is a list of field names (e.g. "Metadata") to
  3862. // unconditionally include in API requests. By default, fields with
  3863. // empty values are omitted from API requests. However, any non-pointer,
  3864. // non-interface field appearing in ForceSendFields will be sent to the
  3865. // server regardless of whether the field is empty or not. This may be
  3866. // used to include empty fields in Patch requests.
  3867. ForceSendFields []string `json:"-"`
  3868. // NullFields is a list of field names (e.g. "Metadata") to include in
  3869. // API requests with the JSON null value. By default, fields with empty
  3870. // values are omitted from API requests. However, any field with an
  3871. // empty value appearing in NullFields will be sent to the server as
  3872. // null. It is an error if a field in this list has a non-empty value.
  3873. // This may be used to include null fields in Patch requests.
  3874. NullFields []string `json:"-"`
  3875. }
  3876. func (s *SourceGetMetadataResponse) MarshalJSON() ([]byte, error) {
  3877. type NoMethod SourceGetMetadataResponse
  3878. raw := NoMethod(*s)
  3879. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3880. }
  3881. // SourceMetadata: Metadata about a Source useful for automatically
  3882. // optimizing
  3883. // and tuning the pipeline, etc.
  3884. type SourceMetadata struct {
  3885. // EstimatedSizeBytes: An estimate of the total size (in bytes) of the
  3886. // data that would be
  3887. // read from this source. This estimate is in terms of external
  3888. // storage
  3889. // size, before any decompression or other processing done by the
  3890. // reader.
  3891. EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"`
  3892. // Infinite: Specifies that the size of this source is known to be
  3893. // infinite
  3894. // (this is a streaming source).
  3895. Infinite bool `json:"infinite,omitempty"`
  3896. // ProducesSortedKeys: Whether this source is known to produce key/value
  3897. // pairs with
  3898. // the (encoded) keys in lexicographically sorted order.
  3899. ProducesSortedKeys bool `json:"producesSortedKeys,omitempty"`
  3900. // ForceSendFields is a list of field names (e.g. "EstimatedSizeBytes")
  3901. // to unconditionally include in API requests. By default, fields with
  3902. // empty values are omitted from API requests. However, any non-pointer,
  3903. // non-interface field appearing in ForceSendFields will be sent to the
  3904. // server regardless of whether the field is empty or not. This may be
  3905. // used to include empty fields in Patch requests.
  3906. ForceSendFields []string `json:"-"`
  3907. // NullFields is a list of field names (e.g. "EstimatedSizeBytes") to
  3908. // include in API requests with the JSON null value. By default, fields
  3909. // with empty values are omitted from API requests. However, any field
  3910. // with an empty value appearing in NullFields will be sent to the
  3911. // server as null. It is an error if a field in this list has a
  3912. // non-empty value. This may be used to include null fields in Patch
  3913. // requests.
  3914. NullFields []string `json:"-"`
  3915. }
  3916. func (s *SourceMetadata) MarshalJSON() ([]byte, error) {
  3917. type NoMethod SourceMetadata
  3918. raw := NoMethod(*s)
  3919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3920. }
  3921. // SourceOperationRequest: A work item that represents the different
  3922. // operations that can be
  3923. // performed on a user-defined Source specification.
  3924. type SourceOperationRequest struct {
  3925. // GetMetadata: Information about a request to get metadata about a
  3926. // source.
  3927. GetMetadata *SourceGetMetadataRequest `json:"getMetadata,omitempty"`
  3928. // Name: User-provided name of the Read instruction for this source.
  3929. Name string `json:"name,omitempty"`
  3930. // OriginalName: System-defined name for the Read instruction for this
  3931. // source
  3932. // in the original workflow graph.
  3933. OriginalName string `json:"originalName,omitempty"`
  3934. // Split: Information about a request to split a source.
  3935. Split *SourceSplitRequest `json:"split,omitempty"`
  3936. // StageName: System-defined name of the stage containing the source
  3937. // operation.
  3938. // Unique across the workflow.
  3939. StageName string `json:"stageName,omitempty"`
  3940. // SystemName: System-defined name of the Read instruction for this
  3941. // source.
  3942. // Unique across the workflow.
  3943. SystemName string `json:"systemName,omitempty"`
  3944. // ForceSendFields is a list of field names (e.g. "GetMetadata") to
  3945. // unconditionally include in API requests. By default, fields with
  3946. // empty values are omitted from API requests. However, any non-pointer,
  3947. // non-interface field appearing in ForceSendFields will be sent to the
  3948. // server regardless of whether the field is empty or not. This may be
  3949. // used to include empty fields in Patch requests.
  3950. ForceSendFields []string `json:"-"`
  3951. // NullFields is a list of field names (e.g. "GetMetadata") to include
  3952. // in API requests with the JSON null value. By default, fields with
  3953. // empty values are omitted from API requests. However, any field with
  3954. // an empty value appearing in NullFields will be sent to the server as
  3955. // null. It is an error if a field in this list has a non-empty value.
  3956. // This may be used to include null fields in Patch requests.
  3957. NullFields []string `json:"-"`
  3958. }
  3959. func (s *SourceOperationRequest) MarshalJSON() ([]byte, error) {
  3960. type NoMethod SourceOperationRequest
  3961. raw := NoMethod(*s)
  3962. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3963. }
  3964. // SourceOperationResponse: The result of a SourceOperationRequest,
  3965. // specified in
  3966. // ReportWorkItemStatusRequest.source_operation when the work item
  3967. // is completed.
  3968. type SourceOperationResponse struct {
  3969. // GetMetadata: A response to a request to get metadata about a source.
  3970. GetMetadata *SourceGetMetadataResponse `json:"getMetadata,omitempty"`
  3971. // Split: A response to a request to split a source.
  3972. Split *SourceSplitResponse `json:"split,omitempty"`
  3973. // ForceSendFields is a list of field names (e.g. "GetMetadata") to
  3974. // unconditionally include in API requests. By default, fields with
  3975. // empty values are omitted from API requests. However, any non-pointer,
  3976. // non-interface field appearing in ForceSendFields will be sent to the
  3977. // server regardless of whether the field is empty or not. This may be
  3978. // used to include empty fields in Patch requests.
  3979. ForceSendFields []string `json:"-"`
  3980. // NullFields is a list of field names (e.g. "GetMetadata") to include
  3981. // in API requests with the JSON null value. By default, fields with
  3982. // empty values are omitted from API requests. However, any field with
  3983. // an empty value appearing in NullFields will be sent to the server as
  3984. // null. It is an error if a field in this list has a non-empty value.
  3985. // This may be used to include null fields in Patch requests.
  3986. NullFields []string `json:"-"`
  3987. }
  3988. func (s *SourceOperationResponse) MarshalJSON() ([]byte, error) {
  3989. type NoMethod SourceOperationResponse
  3990. raw := NoMethod(*s)
  3991. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3992. }
  3993. // SourceSplitOptions: Hints for splitting a Source into bundles (parts
  3994. // for parallel
  3995. // processing) using SourceSplitRequest.
  3996. type SourceSplitOptions struct {
  3997. // DesiredBundleSizeBytes: The source should be split into a set of
  3998. // bundles where the estimated size
  3999. // of each is approximately this many bytes.
  4000. DesiredBundleSizeBytes int64 `json:"desiredBundleSizeBytes,omitempty,string"`
  4001. // DesiredShardSizeBytes: DEPRECATED in favor of
  4002. // desired_bundle_size_bytes.
  4003. DesiredShardSizeBytes int64 `json:"desiredShardSizeBytes,omitempty,string"`
  4004. // ForceSendFields is a list of field names (e.g.
  4005. // "DesiredBundleSizeBytes") to unconditionally include in API requests.
  4006. // By default, fields with empty values are omitted from API requests.
  4007. // However, any non-pointer, non-interface field appearing in
  4008. // ForceSendFields will be sent to the server regardless of whether the
  4009. // field is empty or not. This may be used to include empty fields in
  4010. // Patch requests.
  4011. ForceSendFields []string `json:"-"`
  4012. // NullFields is a list of field names (e.g. "DesiredBundleSizeBytes")
  4013. // to include in API requests with the JSON null value. By default,
  4014. // fields with empty values are omitted from API requests. However, any
  4015. // field with an empty value appearing in NullFields will be sent to the
  4016. // server as null. It is an error if a field in this list has a
  4017. // non-empty value. This may be used to include null fields in Patch
  4018. // requests.
  4019. NullFields []string `json:"-"`
  4020. }
  4021. func (s *SourceSplitOptions) MarshalJSON() ([]byte, error) {
  4022. type NoMethod SourceSplitOptions
  4023. raw := NoMethod(*s)
  4024. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4025. }
  4026. // SourceSplitRequest: Represents the operation to split a high-level
  4027. // Source specification
  4028. // into bundles (parts for parallel processing).
  4029. //
  4030. // At a high level, splitting of a source into bundles happens as
  4031. // follows:
  4032. // SourceSplitRequest is applied to the source. If it
  4033. // returns
  4034. // SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and
  4035. // the source
  4036. // is used "as is". Otherwise, splitting is applied recursively to
  4037. // each
  4038. // produced DerivedSource.
  4039. //
  4040. // As an optimization, for any Source, if its does_not_need_splitting
  4041. // is
  4042. // true, the framework assumes that splitting this source would
  4043. // return
  4044. // SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a
  4045. // SourceSplitRequest.
  4046. // This applies both to the initial source being split and to
  4047. // bundles
  4048. // produced from it.
  4049. type SourceSplitRequest struct {
  4050. // Options: Hints for tuning the splitting process.
  4051. Options *SourceSplitOptions `json:"options,omitempty"`
  4052. // Source: Specification of the source to be split.
  4053. Source *Source `json:"source,omitempty"`
  4054. // ForceSendFields is a list of field names (e.g. "Options") to
  4055. // unconditionally include in API requests. By default, fields with
  4056. // empty values are omitted from API requests. However, any non-pointer,
  4057. // non-interface field appearing in ForceSendFields will be sent to the
  4058. // server regardless of whether the field is empty or not. This may be
  4059. // used to include empty fields in Patch requests.
  4060. ForceSendFields []string `json:"-"`
  4061. // NullFields is a list of field names (e.g. "Options") to include in
  4062. // API requests with the JSON null value. By default, fields with empty
  4063. // values are omitted from API requests. However, any field with an
  4064. // empty value appearing in NullFields will be sent to the server as
  4065. // null. It is an error if a field in this list has a non-empty value.
  4066. // This may be used to include null fields in Patch requests.
  4067. NullFields []string `json:"-"`
  4068. }
  4069. func (s *SourceSplitRequest) MarshalJSON() ([]byte, error) {
  4070. type NoMethod SourceSplitRequest
  4071. raw := NoMethod(*s)
  4072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4073. }
  4074. // SourceSplitResponse: The response to a SourceSplitRequest.
  4075. type SourceSplitResponse struct {
  4076. // Bundles: If outcome is SPLITTING_HAPPENED, then this is a list of
  4077. // bundles
  4078. // into which the source was split. Otherwise this field is
  4079. // ignored.
  4080. // This list can be empty, which means the source represents an empty
  4081. // input.
  4082. Bundles []*DerivedSource `json:"bundles,omitempty"`
  4083. // Outcome: Indicates whether splitting happened and produced a list of
  4084. // bundles.
  4085. // If this is USE_CURRENT_SOURCE_AS_IS, the current source should
  4086. // be processed "as is" without splitting. "bundles" is ignored in this
  4087. // case.
  4088. // If this is SPLITTING_HAPPENED, then "bundles" contains a list
  4089. // of
  4090. // bundles into which the source was split.
  4091. //
  4092. // Possible values:
  4093. // "SOURCE_SPLIT_OUTCOME_UNKNOWN" - The source split outcome is
  4094. // unknown, or unspecified.
  4095. // "SOURCE_SPLIT_OUTCOME_USE_CURRENT" - The current source should be
  4096. // processed "as is" without splitting.
  4097. // "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - Splitting produced a
  4098. // list of bundles.
  4099. Outcome string `json:"outcome,omitempty"`
  4100. // Shards: DEPRECATED in favor of bundles.
  4101. Shards []*SourceSplitShard `json:"shards,omitempty"`
  4102. // ForceSendFields is a list of field names (e.g. "Bundles") to
  4103. // unconditionally include in API requests. By default, fields with
  4104. // empty values are omitted from API requests. However, any non-pointer,
  4105. // non-interface field appearing in ForceSendFields will be sent to the
  4106. // server regardless of whether the field is empty or not. This may be
  4107. // used to include empty fields in Patch requests.
  4108. ForceSendFields []string `json:"-"`
  4109. // NullFields is a list of field names (e.g. "Bundles") to include in
  4110. // API requests with the JSON null value. By default, fields with empty
  4111. // values are omitted from API requests. However, any field with an
  4112. // empty value appearing in NullFields will be sent to the server as
  4113. // null. It is an error if a field in this list has a non-empty value.
  4114. // This may be used to include null fields in Patch requests.
  4115. NullFields []string `json:"-"`
  4116. }
  4117. func (s *SourceSplitResponse) MarshalJSON() ([]byte, error) {
  4118. type NoMethod SourceSplitResponse
  4119. raw := NoMethod(*s)
  4120. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4121. }
  4122. // SourceSplitShard: DEPRECATED in favor of DerivedSource.
  4123. type SourceSplitShard struct {
  4124. // DerivationMode: DEPRECATED
  4125. //
  4126. // Possible values:
  4127. // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is
  4128. // unknown, or unspecified.
  4129. // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely
  4130. // independent Source with no base.
  4131. // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based
  4132. // on the Source being split.
  4133. // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source
  4134. // based on the base of the Source being split.
  4135. DerivationMode string `json:"derivationMode,omitempty"`
  4136. // Source: DEPRECATED
  4137. Source *Source `json:"source,omitempty"`
  4138. // ForceSendFields is a list of field names (e.g. "DerivationMode") to
  4139. // unconditionally include in API requests. By default, fields with
  4140. // empty values are omitted from API requests. However, any non-pointer,
  4141. // non-interface field appearing in ForceSendFields will be sent to the
  4142. // server regardless of whether the field is empty or not. This may be
  4143. // used to include empty fields in Patch requests.
  4144. ForceSendFields []string `json:"-"`
  4145. // NullFields is a list of field names (e.g. "DerivationMode") to
  4146. // include in API requests with the JSON null value. By default, fields
  4147. // with empty values are omitted from API requests. However, any field
  4148. // with an empty value appearing in NullFields will be sent to the
  4149. // server as null. It is an error if a field in this list has a
  4150. // non-empty value. This may be used to include null fields in Patch
  4151. // requests.
  4152. NullFields []string `json:"-"`
  4153. }
  4154. func (s *SourceSplitShard) MarshalJSON() ([]byte, error) {
  4155. type NoMethod SourceSplitShard
  4156. raw := NoMethod(*s)
  4157. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4158. }
  4159. // SplitInt64: A representation of an int64, n, that is immune to
  4160. // precision loss when
  4161. // encoded in JSON.
  4162. type SplitInt64 struct {
  4163. // HighBits: The high order bits, including the sign: n >> 32.
  4164. HighBits int64 `json:"highBits,omitempty"`
  4165. // LowBits: The low order bits: n & 0xffffffff.
  4166. LowBits int64 `json:"lowBits,omitempty"`
  4167. // ForceSendFields is a list of field names (e.g. "HighBits") 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. "HighBits") 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 *SplitInt64) MarshalJSON() ([]byte, error) {
  4183. type NoMethod SplitInt64
  4184. raw := NoMethod(*s)
  4185. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4186. }
  4187. // StageSource: Description of an input or output of an execution stage.
  4188. type StageSource struct {
  4189. // Name: Dataflow service generated name for this source.
  4190. Name string `json:"name,omitempty"`
  4191. // OriginalTransformOrCollection: User name for the original user
  4192. // transform or collection with which this
  4193. // source is most closely associated.
  4194. OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"`
  4195. // SizeBytes: Size of the source, if measurable.
  4196. SizeBytes int64 `json:"sizeBytes,omitempty,string"`
  4197. // UserName: Human-readable name for this source; may be user or system
  4198. // generated.
  4199. UserName string `json:"userName,omitempty"`
  4200. // ForceSendFields is a list of field names (e.g. "Name") to
  4201. // unconditionally include in API requests. By default, fields with
  4202. // empty values are omitted from API requests. However, any non-pointer,
  4203. // non-interface field appearing in ForceSendFields will be sent to the
  4204. // server regardless of whether the field is empty or not. This may be
  4205. // used to include empty fields in Patch requests.
  4206. ForceSendFields []string `json:"-"`
  4207. // NullFields is a list of field names (e.g. "Name") to include in API
  4208. // requests with the JSON null value. By default, fields with empty
  4209. // values are omitted from API requests. However, any field with an
  4210. // empty value appearing in NullFields will be sent to the server as
  4211. // null. It is an error if a field in this list has a non-empty value.
  4212. // This may be used to include null fields in Patch requests.
  4213. NullFields []string `json:"-"`
  4214. }
  4215. func (s *StageSource) MarshalJSON() ([]byte, error) {
  4216. type NoMethod StageSource
  4217. raw := NoMethod(*s)
  4218. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4219. }
  4220. // StateFamilyConfig: State family configuration.
  4221. type StateFamilyConfig struct {
  4222. // IsRead: If true, this family corresponds to a read operation.
  4223. IsRead bool `json:"isRead,omitempty"`
  4224. // StateFamily: The state family value.
  4225. StateFamily string `json:"stateFamily,omitempty"`
  4226. // ForceSendFields is a list of field names (e.g. "IsRead") to
  4227. // unconditionally include in API requests. By default, fields with
  4228. // empty values are omitted from API requests. However, any non-pointer,
  4229. // non-interface field appearing in ForceSendFields will be sent to the
  4230. // server regardless of whether the field is empty or not. This may be
  4231. // used to include empty fields in Patch requests.
  4232. ForceSendFields []string `json:"-"`
  4233. // NullFields is a list of field names (e.g. "IsRead") to include in API
  4234. // requests with the JSON null value. By default, fields with empty
  4235. // values are omitted from API requests. However, any field with an
  4236. // empty value appearing in NullFields will be sent to the server as
  4237. // null. It is an error if a field in this list has a non-empty value.
  4238. // This may be used to include null fields in Patch requests.
  4239. NullFields []string `json:"-"`
  4240. }
  4241. func (s *StateFamilyConfig) MarshalJSON() ([]byte, error) {
  4242. type NoMethod StateFamilyConfig
  4243. raw := NoMethod(*s)
  4244. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4245. }
  4246. // Status: The `Status` type defines a logical error model that is
  4247. // suitable for different
  4248. // programming environments, including REST APIs and RPC APIs. It is
  4249. // used by
  4250. // [gRPC](https://github.com/grpc). The error model is designed to
  4251. // be:
  4252. //
  4253. // - Simple to use and understand for most users
  4254. // - Flexible enough to meet unexpected needs
  4255. //
  4256. // # Overview
  4257. //
  4258. // The `Status` message contains three pieces of data: error code, error
  4259. // message,
  4260. // and error details. The error code should be an enum value
  4261. // of
  4262. // google.rpc.Code, but it may accept additional error codes if needed.
  4263. // The
  4264. // error message should be a developer-facing English message that
  4265. // helps
  4266. // developers *understand* and *resolve* the error. If a localized
  4267. // user-facing
  4268. // error message is needed, put the localized message in the error
  4269. // details or
  4270. // localize it in the client. The optional error details may contain
  4271. // arbitrary
  4272. // information about the error. There is a predefined set of error
  4273. // detail types
  4274. // in the package `google.rpc` that can be used for common error
  4275. // conditions.
  4276. //
  4277. // # Language mapping
  4278. //
  4279. // The `Status` message is the logical representation of the error
  4280. // model, but it
  4281. // is not necessarily the actual wire format. When the `Status` message
  4282. // is
  4283. // exposed in different client libraries and different wire protocols,
  4284. // it can be
  4285. // mapped differently. For example, it will likely be mapped to some
  4286. // exceptions
  4287. // in Java, but more likely mapped to some error codes in C.
  4288. //
  4289. // # Other uses
  4290. //
  4291. // The error model and the `Status` message can be used in a variety
  4292. // of
  4293. // environments, either with or without APIs, to provide a
  4294. // consistent developer experience across different
  4295. // environments.
  4296. //
  4297. // Example uses of this error model include:
  4298. //
  4299. // - Partial errors. If a service needs to return partial errors to the
  4300. // client,
  4301. // it may embed the `Status` in the normal response to indicate the
  4302. // partial
  4303. // errors.
  4304. //
  4305. // - Workflow errors. A typical workflow has multiple steps. Each step
  4306. // may
  4307. // have a `Status` message for error reporting.
  4308. //
  4309. // - Batch operations. If a client uses batch request and batch
  4310. // response, the
  4311. // `Status` message should be used directly inside batch response,
  4312. // one for
  4313. // each error sub-response.
  4314. //
  4315. // - Asynchronous operations. If an API call embeds asynchronous
  4316. // operation
  4317. // results in its response, the status of those operations should
  4318. // be
  4319. // represented directly using the `Status` message.
  4320. //
  4321. // - Logging. If some API errors are stored in logs, the message
  4322. // `Status` could
  4323. // be used directly after any stripping needed for security/privacy
  4324. // reasons.
  4325. type Status struct {
  4326. // Code: The status code, which should be an enum value of
  4327. // google.rpc.Code.
  4328. Code int64 `json:"code,omitempty"`
  4329. // Details: A list of messages that carry the error details. There is a
  4330. // common set of
  4331. // message types for APIs to use.
  4332. Details []googleapi.RawMessage `json:"details,omitempty"`
  4333. // Message: A developer-facing error message, which should be in
  4334. // English. Any
  4335. // user-facing error message should be localized and sent in
  4336. // the
  4337. // google.rpc.Status.details field, or localized by the client.
  4338. Message string `json:"message,omitempty"`
  4339. // ForceSendFields is a list of field names (e.g. "Code") to
  4340. // unconditionally include in API requests. By default, fields with
  4341. // empty values are omitted from API requests. However, any non-pointer,
  4342. // non-interface field appearing in ForceSendFields will be sent to the
  4343. // server regardless of whether the field is empty or not. This may be
  4344. // used to include empty fields in Patch requests.
  4345. ForceSendFields []string `json:"-"`
  4346. // NullFields is a list of field names (e.g. "Code") to include in API
  4347. // requests with the JSON null value. By default, fields with empty
  4348. // values are omitted from API requests. However, any field with an
  4349. // empty value appearing in NullFields will be sent to the server as
  4350. // null. It is an error if a field in this list has a non-empty value.
  4351. // This may be used to include null fields in Patch requests.
  4352. NullFields []string `json:"-"`
  4353. }
  4354. func (s *Status) MarshalJSON() ([]byte, error) {
  4355. type NoMethod Status
  4356. raw := NoMethod(*s)
  4357. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4358. }
  4359. // Step: Defines a particular step within a Cloud Dataflow job.
  4360. //
  4361. // A job consists of multiple steps, each of which performs
  4362. // some
  4363. // specific operation as part of the overall job. Data is
  4364. // typically
  4365. // passed from one step to another as part of the job.
  4366. //
  4367. // Here's an example of a sequence of steps which together implement
  4368. // a
  4369. // Map-Reduce job:
  4370. //
  4371. // * Read a collection of data from some source, parsing the
  4372. // collection's elements.
  4373. //
  4374. // * Validate the elements.
  4375. //
  4376. // * Apply a user-defined function to map each element to some value
  4377. // and extract an element-specific key value.
  4378. //
  4379. // * Group elements with the same key into a single element with
  4380. // that key, transforming a multiply-keyed collection into a
  4381. // uniquely-keyed collection.
  4382. //
  4383. // * Write the elements out to some data sink.
  4384. //
  4385. // Note that the Cloud Dataflow service may be used to run many
  4386. // different
  4387. // types of jobs, not just Map-Reduce.
  4388. type Step struct {
  4389. // Kind: The kind of step in the Cloud Dataflow job.
  4390. Kind string `json:"kind,omitempty"`
  4391. // Name: The name that identifies the step. This must be unique for
  4392. // each
  4393. // step with respect to all other steps in the Cloud Dataflow job.
  4394. Name string `json:"name,omitempty"`
  4395. // Properties: Named properties associated with the step. Each kind
  4396. // of
  4397. // predefined step has its own required set of properties.
  4398. // Must be provided on Create. Only retrieved with JOB_VIEW_ALL.
  4399. Properties googleapi.RawMessage `json:"properties,omitempty"`
  4400. // ForceSendFields is a list of field names (e.g. "Kind") to
  4401. // unconditionally include in API requests. By default, fields with
  4402. // empty values are omitted from API requests. However, any non-pointer,
  4403. // non-interface field appearing in ForceSendFields will be sent to the
  4404. // server regardless of whether the field is empty or not. This may be
  4405. // used to include empty fields in Patch requests.
  4406. ForceSendFields []string `json:"-"`
  4407. // NullFields is a list of field names (e.g. "Kind") to include in API
  4408. // requests with the JSON null value. By default, fields with empty
  4409. // values are omitted from API requests. However, any field with an
  4410. // empty value appearing in NullFields will be sent to the server as
  4411. // null. It is an error if a field in this list has a non-empty value.
  4412. // This may be used to include null fields in Patch requests.
  4413. NullFields []string `json:"-"`
  4414. }
  4415. func (s *Step) MarshalJSON() ([]byte, error) {
  4416. type NoMethod Step
  4417. raw := NoMethod(*s)
  4418. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4419. }
  4420. // StreamLocation: Describes a stream of data, either as input to be
  4421. // processed or as
  4422. // output of a streaming Dataflow job.
  4423. type StreamLocation struct {
  4424. // CustomSourceLocation: The stream is a custom source.
  4425. CustomSourceLocation *CustomSourceLocation `json:"customSourceLocation,omitempty"`
  4426. // PubsubLocation: The stream is a pubsub stream.
  4427. PubsubLocation *PubsubLocation `json:"pubsubLocation,omitempty"`
  4428. // SideInputLocation: The stream is a streaming side input.
  4429. SideInputLocation *StreamingSideInputLocation `json:"sideInputLocation,omitempty"`
  4430. // StreamingStageLocation: The stream is part of another computation
  4431. // within the current
  4432. // streaming Dataflow job.
  4433. StreamingStageLocation *StreamingStageLocation `json:"streamingStageLocation,omitempty"`
  4434. // ForceSendFields is a list of field names (e.g.
  4435. // "CustomSourceLocation") to unconditionally include in API requests.
  4436. // By default, fields with empty values are omitted from API requests.
  4437. // However, any non-pointer, non-interface field appearing in
  4438. // ForceSendFields will be sent to the server regardless of whether the
  4439. // field is empty or not. This may be used to include empty fields in
  4440. // Patch requests.
  4441. ForceSendFields []string `json:"-"`
  4442. // NullFields is a list of field names (e.g. "CustomSourceLocation") to
  4443. // include in API requests with the JSON null value. By default, fields
  4444. // with empty values are omitted from API requests. However, any field
  4445. // with an empty value appearing in NullFields will be sent to the
  4446. // server as null. It is an error if a field in this list has a
  4447. // non-empty value. This may be used to include null fields in Patch
  4448. // requests.
  4449. NullFields []string `json:"-"`
  4450. }
  4451. func (s *StreamLocation) MarshalJSON() ([]byte, error) {
  4452. type NoMethod StreamLocation
  4453. raw := NoMethod(*s)
  4454. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4455. }
  4456. // StreamingComputationConfig: Configuration information for a single
  4457. // streaming computation.
  4458. type StreamingComputationConfig struct {
  4459. // ComputationId: Unique identifier for this computation.
  4460. ComputationId string `json:"computationId,omitempty"`
  4461. // Instructions: Instructions that comprise the computation.
  4462. Instructions []*ParallelInstruction `json:"instructions,omitempty"`
  4463. // StageName: Stage name of this computation.
  4464. StageName string `json:"stageName,omitempty"`
  4465. // SystemName: System defined name for this computation.
  4466. SystemName string `json:"systemName,omitempty"`
  4467. // ForceSendFields is a list of field names (e.g. "ComputationId") to
  4468. // unconditionally include in API requests. By default, fields with
  4469. // empty values are omitted from API requests. However, any non-pointer,
  4470. // non-interface field appearing in ForceSendFields will be sent to the
  4471. // server regardless of whether the field is empty or not. This may be
  4472. // used to include empty fields in Patch requests.
  4473. ForceSendFields []string `json:"-"`
  4474. // NullFields is a list of field names (e.g. "ComputationId") to include
  4475. // in API requests with the JSON null value. By default, fields with
  4476. // empty values are omitted from API requests. However, any field with
  4477. // an empty value appearing in NullFields will be sent to the server as
  4478. // null. It is an error if a field in this list has a non-empty value.
  4479. // This may be used to include null fields in Patch requests.
  4480. NullFields []string `json:"-"`
  4481. }
  4482. func (s *StreamingComputationConfig) MarshalJSON() ([]byte, error) {
  4483. type NoMethod StreamingComputationConfig
  4484. raw := NoMethod(*s)
  4485. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4486. }
  4487. // StreamingComputationRanges: Describes full or partial data disk
  4488. // assignment information of the computation
  4489. // ranges.
  4490. type StreamingComputationRanges struct {
  4491. // ComputationId: The ID of the computation.
  4492. ComputationId string `json:"computationId,omitempty"`
  4493. // RangeAssignments: Data disk assignments for ranges from this
  4494. // computation.
  4495. RangeAssignments []*KeyRangeDataDiskAssignment `json:"rangeAssignments,omitempty"`
  4496. // ForceSendFields is a list of field names (e.g. "ComputationId") to
  4497. // unconditionally include in API requests. By default, fields with
  4498. // empty values are omitted from API requests. However, any non-pointer,
  4499. // non-interface field appearing in ForceSendFields will be sent to the
  4500. // server regardless of whether the field is empty or not. This may be
  4501. // used to include empty fields in Patch requests.
  4502. ForceSendFields []string `json:"-"`
  4503. // NullFields is a list of field names (e.g. "ComputationId") to include
  4504. // in API requests with the JSON null value. By default, fields with
  4505. // empty values are omitted from API requests. However, any field with
  4506. // an empty value appearing in NullFields will be sent to the server as
  4507. // null. It is an error if a field in this list has a non-empty value.
  4508. // This may be used to include null fields in Patch requests.
  4509. NullFields []string `json:"-"`
  4510. }
  4511. func (s *StreamingComputationRanges) MarshalJSON() ([]byte, error) {
  4512. type NoMethod StreamingComputationRanges
  4513. raw := NoMethod(*s)
  4514. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4515. }
  4516. // StreamingComputationTask: A task which describes what action should
  4517. // be performed for the specified
  4518. // streaming computation ranges.
  4519. type StreamingComputationTask struct {
  4520. // ComputationRanges: Contains ranges of a streaming computation this
  4521. // task should apply to.
  4522. ComputationRanges []*StreamingComputationRanges `json:"computationRanges,omitempty"`
  4523. // DataDisks: Describes the set of data disks this task should apply to.
  4524. DataDisks []*MountedDataDisk `json:"dataDisks,omitempty"`
  4525. // TaskType: A type of streaming computation task.
  4526. //
  4527. // Possible values:
  4528. // "STREAMING_COMPUTATION_TASK_UNKNOWN" - The streaming computation
  4529. // task is unknown, or unspecified.
  4530. // "STREAMING_COMPUTATION_TASK_STOP" - Stop processing specified
  4531. // streaming computation range(s).
  4532. // "STREAMING_COMPUTATION_TASK_START" - Start processing specified
  4533. // streaming computation range(s).
  4534. TaskType string `json:"taskType,omitempty"`
  4535. // ForceSendFields is a list of field names (e.g. "ComputationRanges")
  4536. // to unconditionally include in API requests. By default, fields with
  4537. // empty values are omitted from API requests. However, any non-pointer,
  4538. // non-interface field appearing in ForceSendFields will be sent to the
  4539. // server regardless of whether the field is empty or not. This may be
  4540. // used to include empty fields in Patch requests.
  4541. ForceSendFields []string `json:"-"`
  4542. // NullFields is a list of field names (e.g. "ComputationRanges") to
  4543. // include in API requests with the JSON null value. By default, fields
  4544. // with empty values are omitted from API requests. However, any field
  4545. // with an empty value appearing in NullFields will be sent to the
  4546. // server as null. It is an error if a field in this list has a
  4547. // non-empty value. This may be used to include null fields in Patch
  4548. // requests.
  4549. NullFields []string `json:"-"`
  4550. }
  4551. func (s *StreamingComputationTask) MarshalJSON() ([]byte, error) {
  4552. type NoMethod StreamingComputationTask
  4553. raw := NoMethod(*s)
  4554. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4555. }
  4556. // StreamingConfigTask: A task that carries configuration information
  4557. // for streaming computations.
  4558. type StreamingConfigTask struct {
  4559. // StreamingComputationConfigs: Set of computation configuration
  4560. // information.
  4561. StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"`
  4562. // UserStepToStateFamilyNameMap: Map from user step names to state
  4563. // families.
  4564. UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"`
  4565. // WindmillServiceEndpoint: If present, the worker must use this
  4566. // endpoint to communicate with Windmill
  4567. // Service dispatchers, otherwise the worker must continue to use
  4568. // whatever
  4569. // endpoint it had been using.
  4570. WindmillServiceEndpoint string `json:"windmillServiceEndpoint,omitempty"`
  4571. // WindmillServicePort: If present, the worker must use this port to
  4572. // communicate with Windmill
  4573. // Service dispatchers. Only applicable when windmill_service_endpoint
  4574. // is
  4575. // specified.
  4576. WindmillServicePort int64 `json:"windmillServicePort,omitempty,string"`
  4577. // ForceSendFields is a list of field names (e.g.
  4578. // "StreamingComputationConfigs") to unconditionally include in API
  4579. // requests. By default, fields with empty values are omitted from API
  4580. // requests. However, any non-pointer, non-interface field appearing in
  4581. // ForceSendFields will be sent to the server regardless of whether the
  4582. // field is empty or not. This may be used to include empty fields in
  4583. // Patch requests.
  4584. ForceSendFields []string `json:"-"`
  4585. // NullFields is a list of field names (e.g.
  4586. // "StreamingComputationConfigs") to include in API requests with the
  4587. // JSON null value. By default, fields with empty values are omitted
  4588. // from API requests. However, any field with an empty value appearing
  4589. // in NullFields will be sent to the server as null. It is an error if a
  4590. // field in this list has a non-empty value. This may be used to include
  4591. // null fields in Patch requests.
  4592. NullFields []string `json:"-"`
  4593. }
  4594. func (s *StreamingConfigTask) MarshalJSON() ([]byte, error) {
  4595. type NoMethod StreamingConfigTask
  4596. raw := NoMethod(*s)
  4597. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4598. }
  4599. // StreamingSetupTask: A task which initializes part of a streaming
  4600. // Dataflow job.
  4601. type StreamingSetupTask struct {
  4602. // Drain: The user has requested drain.
  4603. Drain bool `json:"drain,omitempty"`
  4604. // ReceiveWorkPort: The TCP port on which the worker should listen for
  4605. // messages from
  4606. // other streaming computation workers.
  4607. ReceiveWorkPort int64 `json:"receiveWorkPort,omitempty"`
  4608. // StreamingComputationTopology: The global topology of the streaming
  4609. // Dataflow job.
  4610. StreamingComputationTopology *TopologyConfig `json:"streamingComputationTopology,omitempty"`
  4611. // WorkerHarnessPort: The TCP port used by the worker to communicate
  4612. // with the Dataflow
  4613. // worker harness.
  4614. WorkerHarnessPort int64 `json:"workerHarnessPort,omitempty"`
  4615. // ForceSendFields is a list of field names (e.g. "Drain") to
  4616. // unconditionally include in API requests. By default, fields with
  4617. // empty values are omitted from API requests. However, any non-pointer,
  4618. // non-interface field appearing in ForceSendFields will be sent to the
  4619. // server regardless of whether the field is empty or not. This may be
  4620. // used to include empty fields in Patch requests.
  4621. ForceSendFields []string `json:"-"`
  4622. // NullFields is a list of field names (e.g. "Drain") to include in API
  4623. // requests with the JSON null value. By default, fields with empty
  4624. // values are omitted from API requests. However, any field with an
  4625. // empty value appearing in NullFields will be sent to the server as
  4626. // null. It is an error if a field in this list has a non-empty value.
  4627. // This may be used to include null fields in Patch requests.
  4628. NullFields []string `json:"-"`
  4629. }
  4630. func (s *StreamingSetupTask) MarshalJSON() ([]byte, error) {
  4631. type NoMethod StreamingSetupTask
  4632. raw := NoMethod(*s)
  4633. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4634. }
  4635. // StreamingSideInputLocation: Identifies the location of a streaming
  4636. // side input.
  4637. type StreamingSideInputLocation struct {
  4638. // StateFamily: Identifies the state family where this side input is
  4639. // stored.
  4640. StateFamily string `json:"stateFamily,omitempty"`
  4641. // Tag: Identifies the particular side input within the streaming
  4642. // Dataflow job.
  4643. Tag string `json:"tag,omitempty"`
  4644. // ForceSendFields is a list of field names (e.g. "StateFamily") to
  4645. // unconditionally include in API requests. By default, fields with
  4646. // empty values are omitted from API requests. However, any non-pointer,
  4647. // non-interface field appearing in ForceSendFields will be sent to the
  4648. // server regardless of whether the field is empty or not. This may be
  4649. // used to include empty fields in Patch requests.
  4650. ForceSendFields []string `json:"-"`
  4651. // NullFields is a list of field names (e.g. "StateFamily") to include
  4652. // in API requests with the JSON null value. By default, fields with
  4653. // empty values are omitted from API requests. However, any field with
  4654. // an empty value appearing in NullFields will be sent to the server as
  4655. // null. It is an error if a field in this list has a non-empty value.
  4656. // This may be used to include null fields in Patch requests.
  4657. NullFields []string `json:"-"`
  4658. }
  4659. func (s *StreamingSideInputLocation) MarshalJSON() ([]byte, error) {
  4660. type NoMethod StreamingSideInputLocation
  4661. raw := NoMethod(*s)
  4662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4663. }
  4664. // StreamingStageLocation: Identifies the location of a streaming
  4665. // computation stage, for
  4666. // stage-to-stage communication.
  4667. type StreamingStageLocation struct {
  4668. // StreamId: Identifies the particular stream within the streaming
  4669. // Dataflow
  4670. // job.
  4671. StreamId string `json:"streamId,omitempty"`
  4672. // ForceSendFields is a list of field names (e.g. "StreamId") to
  4673. // unconditionally include in API requests. By default, fields with
  4674. // empty values are omitted from API requests. However, any non-pointer,
  4675. // non-interface field appearing in ForceSendFields will be sent to the
  4676. // server regardless of whether the field is empty or not. This may be
  4677. // used to include empty fields in Patch requests.
  4678. ForceSendFields []string `json:"-"`
  4679. // NullFields is a list of field names (e.g. "StreamId") to include in
  4680. // API requests with the JSON null value. By default, fields with empty
  4681. // values are omitted from API requests. However, any field with an
  4682. // empty value appearing in NullFields will be sent to the server as
  4683. // null. It is an error if a field in this list has a non-empty value.
  4684. // This may be used to include null fields in Patch requests.
  4685. NullFields []string `json:"-"`
  4686. }
  4687. func (s *StreamingStageLocation) MarshalJSON() ([]byte, error) {
  4688. type NoMethod StreamingStageLocation
  4689. raw := NoMethod(*s)
  4690. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4691. }
  4692. // StringList: A metric value representing a list of strings.
  4693. type StringList struct {
  4694. // Elements: Elements of the list.
  4695. Elements []string `json:"elements,omitempty"`
  4696. // ForceSendFields is a list of field names (e.g. "Elements") to
  4697. // unconditionally include in API requests. By default, fields with
  4698. // empty values are omitted from API requests. However, any non-pointer,
  4699. // non-interface field appearing in ForceSendFields will be sent to the
  4700. // server regardless of whether the field is empty or not. This may be
  4701. // used to include empty fields in Patch requests.
  4702. ForceSendFields []string `json:"-"`
  4703. // NullFields is a list of field names (e.g. "Elements") to include in
  4704. // API requests with the JSON null value. By default, fields with empty
  4705. // values are omitted from API requests. However, any field with an
  4706. // empty value appearing in NullFields will be sent to the server as
  4707. // null. It is an error if a field in this list has a non-empty value.
  4708. // This may be used to include null fields in Patch requests.
  4709. NullFields []string `json:"-"`
  4710. }
  4711. func (s *StringList) MarshalJSON() ([]byte, error) {
  4712. type NoMethod StringList
  4713. raw := NoMethod(*s)
  4714. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4715. }
  4716. // StructuredMessage: A rich message format, including a human readable
  4717. // string, a key for
  4718. // identifying the message, and structured data associated with the
  4719. // message for
  4720. // programmatic consumption.
  4721. type StructuredMessage struct {
  4722. // MessageKey: Idenfier for this message type. Used by external systems
  4723. // to
  4724. // internationalize or personalize message.
  4725. MessageKey string `json:"messageKey,omitempty"`
  4726. // MessageText: Human-readable version of message.
  4727. MessageText string `json:"messageText,omitempty"`
  4728. // Parameters: The structured data associated with this message.
  4729. Parameters []*Parameter `json:"parameters,omitempty"`
  4730. // ForceSendFields is a list of field names (e.g. "MessageKey") to
  4731. // unconditionally include in API requests. By default, fields with
  4732. // empty values are omitted from API requests. However, any non-pointer,
  4733. // non-interface field appearing in ForceSendFields will be sent to the
  4734. // server regardless of whether the field is empty or not. This may be
  4735. // used to include empty fields in Patch requests.
  4736. ForceSendFields []string `json:"-"`
  4737. // NullFields is a list of field names (e.g. "MessageKey") to include in
  4738. // API requests with the JSON null value. By default, fields with empty
  4739. // values are omitted from API requests. However, any field with an
  4740. // empty value appearing in NullFields will be sent to the server as
  4741. // null. It is an error if a field in this list has a non-empty value.
  4742. // This may be used to include null fields in Patch requests.
  4743. NullFields []string `json:"-"`
  4744. }
  4745. func (s *StructuredMessage) MarshalJSON() ([]byte, error) {
  4746. type NoMethod StructuredMessage
  4747. raw := NoMethod(*s)
  4748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4749. }
  4750. // TaskRunnerSettings: Taskrunner configuration settings.
  4751. type TaskRunnerSettings struct {
  4752. // Alsologtostderr: Whether to also send taskrunner log info to stderr.
  4753. Alsologtostderr bool `json:"alsologtostderr,omitempty"`
  4754. // BaseTaskDir: The location on the worker for task-specific
  4755. // subdirectories.
  4756. BaseTaskDir string `json:"baseTaskDir,omitempty"`
  4757. // BaseUrl: The base URL for the taskrunner to use when accessing Google
  4758. // Cloud APIs.
  4759. //
  4760. // When workers access Google Cloud APIs, they logically do so
  4761. // via
  4762. // relative URLs. If this field is specified, it supplies the base
  4763. // URL to use for resolving these relative URLs. The
  4764. // normative
  4765. // algorithm used is defined by RFC 1808, "Relative Uniform
  4766. // Resource
  4767. // Locators".
  4768. //
  4769. // If not specified, the default value is "http://www.googleapis.com/"
  4770. BaseUrl string `json:"baseUrl,omitempty"`
  4771. // CommandlinesFileName: The file to store preprocessing commands in.
  4772. CommandlinesFileName string `json:"commandlinesFileName,omitempty"`
  4773. // ContinueOnException: Whether to continue taskrunner if an exception
  4774. // is hit.
  4775. ContinueOnException bool `json:"continueOnException,omitempty"`
  4776. // DataflowApiVersion: The API version of endpoint, e.g. "v1b3"
  4777. DataflowApiVersion string `json:"dataflowApiVersion,omitempty"`
  4778. // HarnessCommand: The command to launch the worker harness.
  4779. HarnessCommand string `json:"harnessCommand,omitempty"`
  4780. // LanguageHint: The suggested backend language.
  4781. LanguageHint string `json:"languageHint,omitempty"`
  4782. // LogDir: The directory on the VM to store logs.
  4783. LogDir string `json:"logDir,omitempty"`
  4784. // LogToSerialconsole: Whether to send taskrunner log info to Google
  4785. // Compute Engine VM serial
  4786. // console.
  4787. LogToSerialconsole bool `json:"logToSerialconsole,omitempty"`
  4788. // LogUploadLocation: Indicates where to put logs. If this is not
  4789. // specified, the logs
  4790. // will not be uploaded.
  4791. //
  4792. // The supported resource type is:
  4793. //
  4794. // Google Cloud Storage:
  4795. // storage.googleapis.com/{bucket}/{object}
  4796. // bucket.storage.googleapis.com/{object}
  4797. LogUploadLocation string `json:"logUploadLocation,omitempty"`
  4798. // OauthScopes: The OAuth2 scopes to be requested by the taskrunner in
  4799. // order to
  4800. // access the Cloud Dataflow API.
  4801. OauthScopes []string `json:"oauthScopes,omitempty"`
  4802. // ParallelWorkerSettings: The settings to pass to the parallel worker
  4803. // harness.
  4804. ParallelWorkerSettings *WorkerSettings `json:"parallelWorkerSettings,omitempty"`
  4805. // StreamingWorkerMainClass: The streaming worker main class name.
  4806. StreamingWorkerMainClass string `json:"streamingWorkerMainClass,omitempty"`
  4807. // TaskGroup: The UNIX group ID on the worker VM to use for tasks
  4808. // launched by
  4809. // taskrunner; e.g. "wheel".
  4810. TaskGroup string `json:"taskGroup,omitempty"`
  4811. // TaskUser: The UNIX user ID on the worker VM to use for tasks launched
  4812. // by
  4813. // taskrunner; e.g. "root".
  4814. TaskUser string `json:"taskUser,omitempty"`
  4815. // TempStoragePrefix: The prefix of the resources the taskrunner should
  4816. // use for
  4817. // temporary storage.
  4818. //
  4819. // The supported resource type is:
  4820. //
  4821. // Google Cloud Storage:
  4822. // storage.googleapis.com/{bucket}/{object}
  4823. // bucket.storage.googleapis.com/{object}
  4824. TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
  4825. // VmId: The ID string of the VM.
  4826. VmId string `json:"vmId,omitempty"`
  4827. // WorkflowFileName: The file to store the workflow in.
  4828. WorkflowFileName string `json:"workflowFileName,omitempty"`
  4829. // ForceSendFields is a list of field names (e.g. "Alsologtostderr") to
  4830. // unconditionally include in API requests. By default, fields with
  4831. // empty values are omitted from API requests. However, any non-pointer,
  4832. // non-interface field appearing in ForceSendFields will be sent to the
  4833. // server regardless of whether the field is empty or not. This may be
  4834. // used to include empty fields in Patch requests.
  4835. ForceSendFields []string `json:"-"`
  4836. // NullFields is a list of field names (e.g. "Alsologtostderr") to
  4837. // include in API requests with the JSON null value. By default, fields
  4838. // with empty values are omitted from API requests. However, any field
  4839. // with an empty value appearing in NullFields will be sent to the
  4840. // server as null. It is an error if a field in this list has a
  4841. // non-empty value. This may be used to include null fields in Patch
  4842. // requests.
  4843. NullFields []string `json:"-"`
  4844. }
  4845. func (s *TaskRunnerSettings) MarshalJSON() ([]byte, error) {
  4846. type NoMethod TaskRunnerSettings
  4847. raw := NoMethod(*s)
  4848. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4849. }
  4850. // TemplateMetadata: Metadata describing a template.
  4851. type TemplateMetadata struct {
  4852. // Description: Optional. A description of the template.
  4853. Description string `json:"description,omitempty"`
  4854. // Name: Required. The name of the template.
  4855. Name string `json:"name,omitempty"`
  4856. // Parameters: The parameters for the template.
  4857. Parameters []*ParameterMetadata `json:"parameters,omitempty"`
  4858. // ForceSendFields is a list of field names (e.g. "Description") to
  4859. // unconditionally include in API requests. By default, fields with
  4860. // empty values are omitted from API requests. However, any non-pointer,
  4861. // non-interface field appearing in ForceSendFields will be sent to the
  4862. // server regardless of whether the field is empty or not. This may be
  4863. // used to include empty fields in Patch requests.
  4864. ForceSendFields []string `json:"-"`
  4865. // NullFields is a list of field names (e.g. "Description") to include
  4866. // in API requests with the JSON null value. By default, fields with
  4867. // empty values are omitted from API requests. However, any field with
  4868. // an empty value appearing in NullFields will be sent to the server as
  4869. // null. It is an error if a field in this list has a non-empty value.
  4870. // This may be used to include null fields in Patch requests.
  4871. NullFields []string `json:"-"`
  4872. }
  4873. func (s *TemplateMetadata) MarshalJSON() ([]byte, error) {
  4874. type NoMethod TemplateMetadata
  4875. raw := NoMethod(*s)
  4876. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4877. }
  4878. // TopologyConfig: Global topology of the streaming Dataflow job,
  4879. // including all
  4880. // computations and their sharded locations.
  4881. type TopologyConfig struct {
  4882. // Computations: The computations associated with a streaming Dataflow
  4883. // job.
  4884. Computations []*ComputationTopology `json:"computations,omitempty"`
  4885. // DataDiskAssignments: The disks assigned to a streaming Dataflow job.
  4886. DataDiskAssignments []*DataDiskAssignment `json:"dataDiskAssignments,omitempty"`
  4887. // ForwardingKeyBits: The size (in bits) of keys that will be assigned
  4888. // to source messages.
  4889. ForwardingKeyBits int64 `json:"forwardingKeyBits,omitempty"`
  4890. // PersistentStateVersion: Version number for persistent state.
  4891. PersistentStateVersion int64 `json:"persistentStateVersion,omitempty"`
  4892. // UserStageToComputationNameMap: Maps user stage names to stable
  4893. // computation names.
  4894. UserStageToComputationNameMap map[string]string `json:"userStageToComputationNameMap,omitempty"`
  4895. // ForceSendFields is a list of field names (e.g. "Computations") to
  4896. // unconditionally include in API requests. By default, fields with
  4897. // empty values are omitted from API requests. However, any non-pointer,
  4898. // non-interface field appearing in ForceSendFields will be sent to the
  4899. // server regardless of whether the field is empty or not. This may be
  4900. // used to include empty fields in Patch requests.
  4901. ForceSendFields []string `json:"-"`
  4902. // NullFields is a list of field names (e.g. "Computations") to include
  4903. // in API requests with the JSON null value. By default, fields with
  4904. // empty values are omitted from API requests. However, any field with
  4905. // an empty value appearing in NullFields will be sent to the server as
  4906. // null. It is an error if a field in this list has a non-empty value.
  4907. // This may be used to include null fields in Patch requests.
  4908. NullFields []string `json:"-"`
  4909. }
  4910. func (s *TopologyConfig) MarshalJSON() ([]byte, error) {
  4911. type NoMethod TopologyConfig
  4912. raw := NoMethod(*s)
  4913. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4914. }
  4915. // TransformSummary: Description of the type, names/ids, and
  4916. // input/outputs for a transform.
  4917. type TransformSummary struct {
  4918. // DisplayData: Transform-specific display data.
  4919. DisplayData []*DisplayData `json:"displayData,omitempty"`
  4920. // Id: SDK generated id of this transform instance.
  4921. Id string `json:"id,omitempty"`
  4922. // InputCollectionName: User names for all collection inputs to this
  4923. // transform.
  4924. InputCollectionName []string `json:"inputCollectionName,omitempty"`
  4925. // Kind: Type of transform.
  4926. //
  4927. // Possible values:
  4928. // "UNKNOWN_KIND" - Unrecognized transform type.
  4929. // "PAR_DO_KIND" - ParDo transform.
  4930. // "GROUP_BY_KEY_KIND" - Group By Key transform.
  4931. // "FLATTEN_KIND" - Flatten transform.
  4932. // "READ_KIND" - Read transform.
  4933. // "WRITE_KIND" - Write transform.
  4934. // "CONSTANT_KIND" - Constructs from a constant value, such as with
  4935. // Create.of.
  4936. // "SINGLETON_KIND" - Creates a Singleton view of a collection.
  4937. // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as
  4938. // part of a GroupByKey.
  4939. Kind string `json:"kind,omitempty"`
  4940. // Name: User provided name for this transform instance.
  4941. Name string `json:"name,omitempty"`
  4942. // OutputCollectionName: User names for all collection outputs to this
  4943. // transform.
  4944. OutputCollectionName []string `json:"outputCollectionName,omitempty"`
  4945. // ForceSendFields is a list of field names (e.g. "DisplayData") to
  4946. // unconditionally include in API requests. By default, fields with
  4947. // empty values are omitted from API requests. However, any non-pointer,
  4948. // non-interface field appearing in ForceSendFields will be sent to the
  4949. // server regardless of whether the field is empty or not. This may be
  4950. // used to include empty fields in Patch requests.
  4951. ForceSendFields []string `json:"-"`
  4952. // NullFields is a list of field names (e.g. "DisplayData") to include
  4953. // in API requests with the JSON null value. By default, fields with
  4954. // empty values are omitted from API requests. However, any field with
  4955. // an empty value appearing in NullFields will be sent to the server as
  4956. // null. It is an error if a field in this list has a non-empty value.
  4957. // This may be used to include null fields in Patch requests.
  4958. NullFields []string `json:"-"`
  4959. }
  4960. func (s *TransformSummary) MarshalJSON() ([]byte, error) {
  4961. type NoMethod TransformSummary
  4962. raw := NoMethod(*s)
  4963. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4964. }
  4965. // WorkItem: WorkItem represents basic information about a WorkItem to
  4966. // be executed
  4967. // in the cloud.
  4968. type WorkItem struct {
  4969. // Configuration: Work item-specific configuration as an opaque blob.
  4970. Configuration string `json:"configuration,omitempty"`
  4971. // Id: Identifies this WorkItem.
  4972. Id int64 `json:"id,omitempty,string"`
  4973. // InitialReportIndex: The initial index to use when reporting the
  4974. // status of the WorkItem.
  4975. InitialReportIndex int64 `json:"initialReportIndex,omitempty,string"`
  4976. // JobId: Identifies the workflow job this WorkItem belongs to.
  4977. JobId string `json:"jobId,omitempty"`
  4978. // LeaseExpireTime: Time when the lease on this Work will expire.
  4979. LeaseExpireTime string `json:"leaseExpireTime,omitempty"`
  4980. // MapTask: Additional information for MapTask WorkItems.
  4981. MapTask *MapTask `json:"mapTask,omitempty"`
  4982. // Packages: Any required packages that need to be fetched in order to
  4983. // execute
  4984. // this WorkItem.
  4985. Packages []*Package `json:"packages,omitempty"`
  4986. // ProjectId: Identifies the cloud project this WorkItem belongs to.
  4987. ProjectId string `json:"projectId,omitempty"`
  4988. // ReportStatusInterval: Recommended reporting interval.
  4989. ReportStatusInterval string `json:"reportStatusInterval,omitempty"`
  4990. // SeqMapTask: Additional information for SeqMapTask WorkItems.
  4991. SeqMapTask *SeqMapTask `json:"seqMapTask,omitempty"`
  4992. // ShellTask: Additional information for ShellTask WorkItems.
  4993. ShellTask *ShellTask `json:"shellTask,omitempty"`
  4994. // SourceOperationTask: Additional information for source operation
  4995. // WorkItems.
  4996. SourceOperationTask *SourceOperationRequest `json:"sourceOperationTask,omitempty"`
  4997. // StreamingComputationTask: Additional information for
  4998. // StreamingComputationTask WorkItems.
  4999. StreamingComputationTask *StreamingComputationTask `json:"streamingComputationTask,omitempty"`
  5000. // StreamingConfigTask: Additional information for StreamingConfigTask
  5001. // WorkItems.
  5002. StreamingConfigTask *StreamingConfigTask `json:"streamingConfigTask,omitempty"`
  5003. // StreamingSetupTask: Additional information for StreamingSetupTask
  5004. // WorkItems.
  5005. StreamingSetupTask *StreamingSetupTask `json:"streamingSetupTask,omitempty"`
  5006. // ForceSendFields is a list of field names (e.g. "Configuration") to
  5007. // unconditionally include in API requests. By default, fields with
  5008. // empty values are omitted from API requests. However, any non-pointer,
  5009. // non-interface field appearing in ForceSendFields will be sent to the
  5010. // server regardless of whether the field is empty or not. This may be
  5011. // used to include empty fields in Patch requests.
  5012. ForceSendFields []string `json:"-"`
  5013. // NullFields is a list of field names (e.g. "Configuration") to include
  5014. // in API requests with the JSON null value. By default, fields with
  5015. // empty values are omitted from API requests. However, any field with
  5016. // an empty value appearing in NullFields will be sent to the server as
  5017. // null. It is an error if a field in this list has a non-empty value.
  5018. // This may be used to include null fields in Patch requests.
  5019. NullFields []string `json:"-"`
  5020. }
  5021. func (s *WorkItem) MarshalJSON() ([]byte, error) {
  5022. type NoMethod WorkItem
  5023. raw := NoMethod(*s)
  5024. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5025. }
  5026. // WorkItemServiceState: The Dataflow service's idea of the current
  5027. // state of a WorkItem
  5028. // being processed by a worker.
  5029. type WorkItemServiceState struct {
  5030. // HarnessData: Other data returned by the service, specific to the
  5031. // particular
  5032. // worker harness.
  5033. HarnessData googleapi.RawMessage `json:"harnessData,omitempty"`
  5034. // LeaseExpireTime: Time at which the current lease will expire.
  5035. LeaseExpireTime string `json:"leaseExpireTime,omitempty"`
  5036. // MetricShortId: The short ids that workers should use in subsequent
  5037. // metric updates.
  5038. // Workers should strive to use short ids whenever possible, but it is
  5039. // ok
  5040. // to request the short_id again if a worker lost track of it
  5041. // (e.g. if the worker is recovering from a crash).
  5042. // NOTE: it is possible that the response may have short ids for a
  5043. // subset
  5044. // of the metrics.
  5045. MetricShortId []*MetricShortId `json:"metricShortId,omitempty"`
  5046. // NextReportIndex: The index value to use for the next report sent by
  5047. // the worker.
  5048. // Note: If the report call fails for whatever reason, the worker
  5049. // should
  5050. // reuse this index for subsequent report attempts.
  5051. NextReportIndex int64 `json:"nextReportIndex,omitempty,string"`
  5052. // ReportStatusInterval: New recommended reporting interval.
  5053. ReportStatusInterval string `json:"reportStatusInterval,omitempty"`
  5054. // SplitRequest: The progress point in the WorkItem where the Dataflow
  5055. // service
  5056. // suggests that the worker truncate the task.
  5057. SplitRequest *ApproximateSplitRequest `json:"splitRequest,omitempty"`
  5058. // SuggestedStopPoint: DEPRECATED in favor of split_request.
  5059. SuggestedStopPoint *ApproximateProgress `json:"suggestedStopPoint,omitempty"`
  5060. // SuggestedStopPosition: Obsolete, always empty.
  5061. SuggestedStopPosition *Position `json:"suggestedStopPosition,omitempty"`
  5062. // ForceSendFields is a list of field names (e.g. "HarnessData") to
  5063. // unconditionally include in API requests. By default, fields with
  5064. // empty values are omitted from API requests. However, any non-pointer,
  5065. // non-interface field appearing in ForceSendFields will be sent to the
  5066. // server regardless of whether the field is empty or not. This may be
  5067. // used to include empty fields in Patch requests.
  5068. ForceSendFields []string `json:"-"`
  5069. // NullFields is a list of field names (e.g. "HarnessData") to include
  5070. // in API requests with the JSON null value. By default, fields with
  5071. // empty values are omitted from API requests. However, any field with
  5072. // an empty value appearing in NullFields will be sent to the server as
  5073. // null. It is an error if a field in this list has a non-empty value.
  5074. // This may be used to include null fields in Patch requests.
  5075. NullFields []string `json:"-"`
  5076. }
  5077. func (s *WorkItemServiceState) MarshalJSON() ([]byte, error) {
  5078. type NoMethod WorkItemServiceState
  5079. raw := NoMethod(*s)
  5080. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5081. }
  5082. // WorkItemStatus: Conveys a worker's progress through the work
  5083. // described by a WorkItem.
  5084. type WorkItemStatus struct {
  5085. // Completed: True if the WorkItem was completed (successfully or
  5086. // unsuccessfully).
  5087. Completed bool `json:"completed,omitempty"`
  5088. // CounterUpdates: Worker output counters for this WorkItem.
  5089. CounterUpdates []*CounterUpdate `json:"counterUpdates,omitempty"`
  5090. // DynamicSourceSplit: See documentation of stop_position.
  5091. DynamicSourceSplit *DynamicSourceSplit `json:"dynamicSourceSplit,omitempty"`
  5092. // Errors: Specifies errors which occurred during processing. If errors
  5093. // are
  5094. // provided, and completed = true, then the WorkItem is considered
  5095. // to have failed.
  5096. Errors []*Status `json:"errors,omitempty"`
  5097. // MetricUpdates: DEPRECATED in favor of counter_updates.
  5098. MetricUpdates []*MetricUpdate `json:"metricUpdates,omitempty"`
  5099. // Progress: DEPRECATED in favor of reported_progress.
  5100. Progress *ApproximateProgress `json:"progress,omitempty"`
  5101. // ReportIndex: The report index. When a WorkItem is leased, the lease
  5102. // will
  5103. // contain an initial report index. When a WorkItem's status
  5104. // is
  5105. // reported to the system, the report should be sent with
  5106. // that report index, and the response will contain the index the
  5107. // worker should use for the next report. Reports received
  5108. // with
  5109. // unexpected index values will be rejected by the service.
  5110. //
  5111. // In order to preserve idempotency, the worker should not alter
  5112. // the
  5113. // contents of a report, even if the worker must submit the same
  5114. // report multiple times before getting back a response. The
  5115. // worker
  5116. // should not submit a subsequent report until the response for
  5117. // the
  5118. // previous report had been received from the service.
  5119. ReportIndex int64 `json:"reportIndex,omitempty,string"`
  5120. // ReportedProgress: The worker's progress through this WorkItem.
  5121. ReportedProgress *ApproximateReportedProgress `json:"reportedProgress,omitempty"`
  5122. // RequestedLeaseDuration: Amount of time the worker requests for its
  5123. // lease.
  5124. RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"`
  5125. // SourceFork: DEPRECATED in favor of dynamic_source_split.
  5126. SourceFork *SourceFork `json:"sourceFork,omitempty"`
  5127. // SourceOperationResponse: If the work item represented a
  5128. // SourceOperationRequest, and the work
  5129. // is completed, contains the result of the operation.
  5130. SourceOperationResponse *SourceOperationResponse `json:"sourceOperationResponse,omitempty"`
  5131. // StopPosition: A worker may split an active map task in two parts,
  5132. // "primary" and
  5133. // "residual", continuing to process the primary part and returning
  5134. // the
  5135. // residual part into the pool of available work.
  5136. // This event is called a "dynamic split" and is critical to the
  5137. // dynamic
  5138. // work rebalancing feature. The two obtained sub-tasks are
  5139. // called
  5140. // "parts" of the split.
  5141. // The parts, if concatenated, must represent the same input as would
  5142. // be read by the current task if the split did not happen.
  5143. // The exact way in which the original task is decomposed into the
  5144. // two
  5145. // parts is specified either as a position demarcating
  5146. // them
  5147. // (stop_position), or explicitly as two DerivedSources, if this
  5148. // task consumes a user-defined source type (dynamic_source_split).
  5149. //
  5150. // The "current" task is adjusted as a result of the split: after a
  5151. // task
  5152. // with range [A, B) sends a stop_position update at C, its range
  5153. // is
  5154. // considered to be [A, C), e.g.:
  5155. // * Progress should be interpreted relative to the new range, e.g.
  5156. // "75% completed" means "75% of [A, C) completed"
  5157. // * The worker should interpret proposed_stop_position relative to the
  5158. // new range, e.g. "split at 68%" should be interpreted as
  5159. // "split at 68% of [A, C)".
  5160. // * If the worker chooses to split again using stop_position, only
  5161. // stop_positions in [A, C) will be accepted.
  5162. // * Etc.
  5163. // dynamic_source_split has similar semantics: e.g., if a task
  5164. // with
  5165. // source S splits using dynamic_source_split into {P, R}
  5166. // (where P and R must be together equivalent to S), then
  5167. // subsequent
  5168. // progress and proposed_stop_position should be interpreted relative
  5169. // to P, and in a potential subsequent dynamic_source_split into {P',
  5170. // R'},
  5171. // P' and R' must be together equivalent to P, etc.
  5172. StopPosition *Position `json:"stopPosition,omitempty"`
  5173. // TotalThrottlerWaitTimeSeconds: Total time the worker spent being
  5174. // throttled by external systems.
  5175. TotalThrottlerWaitTimeSeconds float64 `json:"totalThrottlerWaitTimeSeconds,omitempty"`
  5176. // WorkItemId: Identifies the WorkItem.
  5177. WorkItemId string `json:"workItemId,omitempty"`
  5178. // ForceSendFields is a list of field names (e.g. "Completed") to
  5179. // unconditionally include in API requests. By default, fields with
  5180. // empty values are omitted from API requests. However, any non-pointer,
  5181. // non-interface field appearing in ForceSendFields will be sent to the
  5182. // server regardless of whether the field is empty or not. This may be
  5183. // used to include empty fields in Patch requests.
  5184. ForceSendFields []string `json:"-"`
  5185. // NullFields is a list of field names (e.g. "Completed") to include in
  5186. // API requests with the JSON null value. By default, fields with empty
  5187. // values are omitted from API requests. However, any field with an
  5188. // empty value appearing in NullFields will be sent to the server as
  5189. // null. It is an error if a field in this list has a non-empty value.
  5190. // This may be used to include null fields in Patch requests.
  5191. NullFields []string `json:"-"`
  5192. }
  5193. func (s *WorkItemStatus) MarshalJSON() ([]byte, error) {
  5194. type NoMethod WorkItemStatus
  5195. raw := NoMethod(*s)
  5196. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5197. }
  5198. func (s *WorkItemStatus) UnmarshalJSON(data []byte) error {
  5199. type NoMethod WorkItemStatus
  5200. var s1 struct {
  5201. TotalThrottlerWaitTimeSeconds gensupport.JSONFloat64 `json:"totalThrottlerWaitTimeSeconds"`
  5202. *NoMethod
  5203. }
  5204. s1.NoMethod = (*NoMethod)(s)
  5205. if err := json.Unmarshal(data, &s1); err != nil {
  5206. return err
  5207. }
  5208. s.TotalThrottlerWaitTimeSeconds = float64(s1.TotalThrottlerWaitTimeSeconds)
  5209. return nil
  5210. }
  5211. // WorkerHealthReport: WorkerHealthReport contains information about the
  5212. // health of a worker.
  5213. //
  5214. // The VM should be identified by the labels attached to the
  5215. // WorkerMessage that
  5216. // this health ping belongs to.
  5217. type WorkerHealthReport struct {
  5218. // Pods: The pods running on the worker.
  5219. // See:
  5220. // http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#
  5221. // _v1_pod
  5222. //
  5223. // This field is used by the worker to send the status of the
  5224. // indvidual
  5225. // containers running on each worker.
  5226. Pods []googleapi.RawMessage `json:"pods,omitempty"`
  5227. // ReportInterval: The interval at which the worker is sending health
  5228. // reports.
  5229. // The default value of 0 should be interpreted as the field is not
  5230. // being
  5231. // explicitly set by the worker.
  5232. ReportInterval string `json:"reportInterval,omitempty"`
  5233. // VmIsHealthy: Whether the VM is healthy.
  5234. VmIsHealthy bool `json:"vmIsHealthy,omitempty"`
  5235. // VmStartupTime: The time the VM was booted.
  5236. VmStartupTime string `json:"vmStartupTime,omitempty"`
  5237. // ForceSendFields is a list of field names (e.g. "Pods") to
  5238. // unconditionally include in API requests. By default, fields with
  5239. // empty values are omitted from API requests. However, any non-pointer,
  5240. // non-interface field appearing in ForceSendFields will be sent to the
  5241. // server regardless of whether the field is empty or not. This may be
  5242. // used to include empty fields in Patch requests.
  5243. ForceSendFields []string `json:"-"`
  5244. // NullFields is a list of field names (e.g. "Pods") to include in API
  5245. // requests with the JSON null value. By default, fields with empty
  5246. // values are omitted from API requests. However, any field with an
  5247. // empty value appearing in NullFields will be sent to the server as
  5248. // null. It is an error if a field in this list has a non-empty value.
  5249. // This may be used to include null fields in Patch requests.
  5250. NullFields []string `json:"-"`
  5251. }
  5252. func (s *WorkerHealthReport) MarshalJSON() ([]byte, error) {
  5253. type NoMethod WorkerHealthReport
  5254. raw := NoMethod(*s)
  5255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5256. }
  5257. // WorkerHealthReportResponse: WorkerHealthReportResponse contains
  5258. // information returned to the worker
  5259. // in response to a health ping.
  5260. type WorkerHealthReportResponse struct {
  5261. // ReportInterval: A positive value indicates the worker should change
  5262. // its reporting interval
  5263. // to the specified value.
  5264. //
  5265. // The default value of zero means no change in report rate is requested
  5266. // by
  5267. // the server.
  5268. ReportInterval string `json:"reportInterval,omitempty"`
  5269. // ForceSendFields is a list of field names (e.g. "ReportInterval") to
  5270. // unconditionally include in API requests. By default, fields with
  5271. // empty values are omitted from API requests. However, any non-pointer,
  5272. // non-interface field appearing in ForceSendFields will be sent to the
  5273. // server regardless of whether the field is empty or not. This may be
  5274. // used to include empty fields in Patch requests.
  5275. ForceSendFields []string `json:"-"`
  5276. // NullFields is a list of field names (e.g. "ReportInterval") to
  5277. // include in API requests with the JSON null value. By default, fields
  5278. // with empty values are omitted from API requests. However, any field
  5279. // with an empty value appearing in NullFields will be sent to the
  5280. // server as null. It is an error if a field in this list has a
  5281. // non-empty value. This may be used to include null fields in Patch
  5282. // requests.
  5283. NullFields []string `json:"-"`
  5284. }
  5285. func (s *WorkerHealthReportResponse) MarshalJSON() ([]byte, error) {
  5286. type NoMethod WorkerHealthReportResponse
  5287. raw := NoMethod(*s)
  5288. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5289. }
  5290. // WorkerLifecycleEvent: A report of an event in a worker's
  5291. // lifecycle.
  5292. // The proto contains one event, because the worker is expected
  5293. // to
  5294. // asynchronously send each message immediately after the event.
  5295. // Due to this asynchrony, messages may arrive out of order (or
  5296. // missing), and it
  5297. // is up to the consumer to interpret.
  5298. // The timestamp of the event is in the enclosing WorkerMessage proto.
  5299. type WorkerLifecycleEvent struct {
  5300. // ContainerStartTime: The start time of this container. All events will
  5301. // report this so that
  5302. // events can be grouped together across container/VM restarts.
  5303. ContainerStartTime string `json:"containerStartTime,omitempty"`
  5304. // Event: The event being reported.
  5305. //
  5306. // Possible values:
  5307. // "UNKNOWN_EVENT" - Invalid event.
  5308. // "OS_START" - The time the VM started.
  5309. // "CONTAINER_START" - Our container code starts running. Multiple
  5310. // containers could be
  5311. // distinguished with WorkerMessage.labels if desired.
  5312. // "NETWORK_UP" - The worker has a functional external network
  5313. // connection.
  5314. // "STAGING_FILES_DOWNLOAD_START" - Started downloading staging files.
  5315. // "STAGING_FILES_DOWNLOAD_FINISH" - Finished downloading all staging
  5316. // files.
  5317. // "SDK_INSTALL_START" - For applicable SDKs, started installation of
  5318. // SDK and worker packages.
  5319. // "SDK_INSTALL_FINISH" - Finished installing SDK.
  5320. Event string `json:"event,omitempty"`
  5321. // Metadata: Other stats that can accompany an event. E.g.
  5322. // { "downloaded_bytes" : "123456" }
  5323. Metadata map[string]string `json:"metadata,omitempty"`
  5324. // ForceSendFields is a list of field names (e.g. "ContainerStartTime")
  5325. // to unconditionally include in API requests. By default, fields with
  5326. // empty values are omitted from API requests. However, any non-pointer,
  5327. // non-interface field appearing in ForceSendFields will be sent to the
  5328. // server regardless of whether the field is empty or not. This may be
  5329. // used to include empty fields in Patch requests.
  5330. ForceSendFields []string `json:"-"`
  5331. // NullFields is a list of field names (e.g. "ContainerStartTime") to
  5332. // include in API requests with the JSON null value. By default, fields
  5333. // with empty values are omitted from API requests. However, any field
  5334. // with an empty value appearing in NullFields will be sent to the
  5335. // server as null. It is an error if a field in this list has a
  5336. // non-empty value. This may be used to include null fields in Patch
  5337. // requests.
  5338. NullFields []string `json:"-"`
  5339. }
  5340. func (s *WorkerLifecycleEvent) MarshalJSON() ([]byte, error) {
  5341. type NoMethod WorkerLifecycleEvent
  5342. raw := NoMethod(*s)
  5343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5344. }
  5345. // WorkerMessage: WorkerMessage provides information to the backend
  5346. // about a worker.
  5347. type WorkerMessage struct {
  5348. // Labels: Labels are used to group WorkerMessages.
  5349. // For example, a worker_message about a particular container
  5350. // might have the labels:
  5351. // { "JOB_ID": "2015-04-22",
  5352. // "WORKER_ID": "wordcount-vm-2015…"
  5353. // "CONTAINER_TYPE": "worker",
  5354. // "CONTAINER_ID": "ac1234def"}
  5355. // Label tags typically correspond to Label enum values. However, for
  5356. // ease
  5357. // of development other strings can be used as tags. LABEL_UNSPECIFIED
  5358. // should
  5359. // not be used here.
  5360. Labels map[string]string `json:"labels,omitempty"`
  5361. // Time: The timestamp of the worker_message.
  5362. Time string `json:"time,omitempty"`
  5363. // WorkerHealthReport: The health of a worker.
  5364. WorkerHealthReport *WorkerHealthReport `json:"workerHealthReport,omitempty"`
  5365. // WorkerLifecycleEvent: Record of worker lifecycle events.
  5366. WorkerLifecycleEvent *WorkerLifecycleEvent `json:"workerLifecycleEvent,omitempty"`
  5367. // WorkerMessageCode: A worker message code.
  5368. WorkerMessageCode *WorkerMessageCode `json:"workerMessageCode,omitempty"`
  5369. // WorkerMetrics: Resource metrics reported by workers.
  5370. WorkerMetrics *ResourceUtilizationReport `json:"workerMetrics,omitempty"`
  5371. // WorkerShutdownNotice: Shutdown notice by workers.
  5372. WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,omitempty"`
  5373. // ForceSendFields is a list of field names (e.g. "Labels") to
  5374. // unconditionally include in API requests. By default, fields with
  5375. // empty values are omitted from API requests. However, any non-pointer,
  5376. // non-interface field appearing in ForceSendFields will be sent to the
  5377. // server regardless of whether the field is empty or not. This may be
  5378. // used to include empty fields in Patch requests.
  5379. ForceSendFields []string `json:"-"`
  5380. // NullFields is a list of field names (e.g. "Labels") to include in API
  5381. // requests with the JSON null value. By default, fields with empty
  5382. // values are omitted from API requests. However, any field with an
  5383. // empty value appearing in NullFields will be sent to the server as
  5384. // null. It is an error if a field in this list has a non-empty value.
  5385. // This may be used to include null fields in Patch requests.
  5386. NullFields []string `json:"-"`
  5387. }
  5388. func (s *WorkerMessage) MarshalJSON() ([]byte, error) {
  5389. type NoMethod WorkerMessage
  5390. raw := NoMethod(*s)
  5391. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5392. }
  5393. // WorkerMessageCode: A message code is used to report status and error
  5394. // messages to the service.
  5395. // The message codes are intended to be machine readable. The service
  5396. // will
  5397. // take care of translating these into user understandable messages
  5398. // if
  5399. // necessary.
  5400. //
  5401. // Example use cases:
  5402. // 1. Worker processes reporting successful startup.
  5403. // 2. Worker processes reporting specific errors (e.g. package
  5404. // staging
  5405. // failure).
  5406. type WorkerMessageCode struct {
  5407. // Code: The code is a string intended for consumption by a machine that
  5408. // identifies
  5409. // the type of message being sent.
  5410. // Examples:
  5411. // 1. "HARNESS_STARTED" might be used to indicate the worker harness
  5412. // has
  5413. // started.
  5414. // 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error
  5415. // downloading
  5416. // a GCS file as part of the boot process of one of the worker
  5417. // containers.
  5418. //
  5419. // This is a string and not an enum to make it easy to add new codes
  5420. // without
  5421. // waiting for an API change.
  5422. Code string `json:"code,omitempty"`
  5423. // Parameters: Parameters contains specific information about the
  5424. // code.
  5425. //
  5426. // This is a struct to allow parameters of different types.
  5427. //
  5428. // Examples:
  5429. // 1. For a "HARNESS_STARTED" message parameters might provide the
  5430. // name
  5431. // of the worker and additional data like timing information.
  5432. // 2. For a "GCS_DOWNLOAD_ERROR" parameters might contain fields
  5433. // listing
  5434. // the GCS objects being downloaded and fields containing
  5435. // errors.
  5436. //
  5437. // In general complex data structures should be avoided. If a
  5438. // worker
  5439. // needs to send a specific and complicated data structure then
  5440. // please
  5441. // consider defining a new proto and adding it to the data oneof
  5442. // in
  5443. // WorkerMessageResponse.
  5444. //
  5445. // Conventions:
  5446. // Parameters should only be used for information that isn't typically
  5447. // passed
  5448. // as a label.
  5449. // hostname and other worker identifiers should almost always be
  5450. // passed
  5451. // as labels since they will be included on most messages.
  5452. Parameters googleapi.RawMessage `json:"parameters,omitempty"`
  5453. // ForceSendFields is a list of field names (e.g. "Code") to
  5454. // unconditionally include in API requests. By default, fields with
  5455. // empty values are omitted from API requests. However, any non-pointer,
  5456. // non-interface field appearing in ForceSendFields will be sent to the
  5457. // server regardless of whether the field is empty or not. This may be
  5458. // used to include empty fields in Patch requests.
  5459. ForceSendFields []string `json:"-"`
  5460. // NullFields is a list of field names (e.g. "Code") to include in API
  5461. // requests with the JSON null value. By default, fields with empty
  5462. // values are omitted from API requests. However, any field with an
  5463. // empty value appearing in NullFields will be sent to the server as
  5464. // null. It is an error if a field in this list has a non-empty value.
  5465. // This may be used to include null fields in Patch requests.
  5466. NullFields []string `json:"-"`
  5467. }
  5468. func (s *WorkerMessageCode) MarshalJSON() ([]byte, error) {
  5469. type NoMethod WorkerMessageCode
  5470. raw := NoMethod(*s)
  5471. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5472. }
  5473. // WorkerMessageResponse: A worker_message response allows the server to
  5474. // pass information to the
  5475. // sender.
  5476. type WorkerMessageResponse struct {
  5477. // WorkerHealthReportResponse: The service's response to a worker's
  5478. // health report.
  5479. WorkerHealthReportResponse *WorkerHealthReportResponse `json:"workerHealthReportResponse,omitempty"`
  5480. // WorkerMetricsResponse: Service's response to reporting worker metrics
  5481. // (currently empty).
  5482. WorkerMetricsResponse *ResourceUtilizationReportResponse `json:"workerMetricsResponse,omitempty"`
  5483. // WorkerShutdownNoticeResponse: Service's response to shutdown notice
  5484. // (currently empty).
  5485. WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"`
  5486. // ForceSendFields is a list of field names (e.g.
  5487. // "WorkerHealthReportResponse") to unconditionally include in API
  5488. // requests. By default, fields with empty values are omitted from API
  5489. // requests. However, any non-pointer, non-interface field appearing in
  5490. // ForceSendFields will be sent to the server regardless of whether the
  5491. // field is empty or not. This may be used to include empty fields in
  5492. // Patch requests.
  5493. ForceSendFields []string `json:"-"`
  5494. // NullFields is a list of field names (e.g.
  5495. // "WorkerHealthReportResponse") to include in API requests with the
  5496. // JSON null value. By default, fields with empty values are omitted
  5497. // from API requests. However, any field with an empty value appearing
  5498. // in NullFields will be sent to the server as null. It is an error if a
  5499. // field in this list has a non-empty value. This may be used to include
  5500. // null fields in Patch requests.
  5501. NullFields []string `json:"-"`
  5502. }
  5503. func (s *WorkerMessageResponse) MarshalJSON() ([]byte, error) {
  5504. type NoMethod WorkerMessageResponse
  5505. raw := NoMethod(*s)
  5506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5507. }
  5508. // WorkerPool: Describes one particular pool of Cloud Dataflow workers
  5509. // to be
  5510. // instantiated by the Cloud Dataflow service in order to perform
  5511. // the
  5512. // computations required by a job. Note that a workflow job may
  5513. // use
  5514. // multiple pools, in order to match the various
  5515. // computational
  5516. // requirements of the various stages of the job.
  5517. type WorkerPool struct {
  5518. // AutoscalingSettings: Settings for autoscaling of this WorkerPool.
  5519. AutoscalingSettings *AutoscalingSettings `json:"autoscalingSettings,omitempty"`
  5520. // DataDisks: Data disks that are used by a VM in this workflow.
  5521. DataDisks []*Disk `json:"dataDisks,omitempty"`
  5522. // DefaultPackageSet: The default package set to install. This allows
  5523. // the service to
  5524. // select a default set of packages which are useful to worker
  5525. // harnesses written in a particular language.
  5526. //
  5527. // Possible values:
  5528. // "DEFAULT_PACKAGE_SET_UNKNOWN" - The default set of packages to
  5529. // stage is unknown, or unspecified.
  5530. // "DEFAULT_PACKAGE_SET_NONE" - Indicates that no packages should be
  5531. // staged at the worker unless
  5532. // explicitly specified by the job.
  5533. // "DEFAULT_PACKAGE_SET_JAVA" - Stage packages typically useful to
  5534. // workers written in Java.
  5535. // "DEFAULT_PACKAGE_SET_PYTHON" - Stage pacakges typically useful to
  5536. // workers written in Python.
  5537. DefaultPackageSet string `json:"defaultPackageSet,omitempty"`
  5538. // DiskSizeGb: Size of root disk for VMs, in GB. If zero or
  5539. // unspecified, the service will
  5540. // attempt to choose a reasonable default.
  5541. DiskSizeGb int64 `json:"diskSizeGb,omitempty"`
  5542. // DiskSourceImage: Fully qualified source image for disks.
  5543. DiskSourceImage string `json:"diskSourceImage,omitempty"`
  5544. // DiskType: Type of root disk for VMs. If empty or unspecified, the
  5545. // service will
  5546. // attempt to choose a reasonable default.
  5547. DiskType string `json:"diskType,omitempty"`
  5548. // IpConfiguration: Configuration for VM IPs.
  5549. //
  5550. // Possible values:
  5551. // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or
  5552. // unspecified.
  5553. // "WORKER_IP_PUBLIC" - Workers should have public IP addresses.
  5554. // "WORKER_IP_PRIVATE" - Workers should have private IP addresses.
  5555. IpConfiguration string `json:"ipConfiguration,omitempty"`
  5556. // Kind: The kind of the worker pool; currently only `harness` and
  5557. // `shuffle`
  5558. // are supported.
  5559. Kind string `json:"kind,omitempty"`
  5560. // MachineType: Machine type (e.g. "n1-standard-1"). If empty or
  5561. // unspecified, the
  5562. // service will attempt to choose a reasonable default.
  5563. MachineType string `json:"machineType,omitempty"`
  5564. // Metadata: Metadata to set on the Google Compute Engine VMs.
  5565. Metadata map[string]string `json:"metadata,omitempty"`
  5566. // Network: Network to which VMs will be assigned. If empty or
  5567. // unspecified,
  5568. // the service will use the network "default".
  5569. Network string `json:"network,omitempty"`
  5570. // NumThreadsPerWorker: The number of threads per worker harness. If
  5571. // empty or unspecified, the
  5572. // service will choose a number of threads (according to the number of
  5573. // cores
  5574. // on the selected machine type for batch, or 1 by convention for
  5575. // streaming).
  5576. NumThreadsPerWorker int64 `json:"numThreadsPerWorker,omitempty"`
  5577. // NumWorkers: Number of Google Compute Engine workers in this pool
  5578. // needed to
  5579. // execute the job. If zero or unspecified, the service will
  5580. // attempt to choose a reasonable default.
  5581. NumWorkers int64 `json:"numWorkers,omitempty"`
  5582. // OnHostMaintenance: The action to take on host maintenance, as defined
  5583. // by the Google
  5584. // Compute Engine API.
  5585. OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
  5586. // Packages: Packages to be installed on workers.
  5587. Packages []*Package `json:"packages,omitempty"`
  5588. // PoolArgs: Extra arguments for this worker pool.
  5589. PoolArgs googleapi.RawMessage `json:"poolArgs,omitempty"`
  5590. // Subnetwork: Subnetwork to which VMs will be assigned, if desired.
  5591. // Expected to be of
  5592. // the form "regions/REGION/subnetworks/SUBNETWORK".
  5593. Subnetwork string `json:"subnetwork,omitempty"`
  5594. // TaskrunnerSettings: Settings passed through to Google Compute Engine
  5595. // workers when
  5596. // using the standard Dataflow task runner. Users should ignore
  5597. // this field.
  5598. TaskrunnerSettings *TaskRunnerSettings `json:"taskrunnerSettings,omitempty"`
  5599. // TeardownPolicy: Sets the policy for determining when to turndown
  5600. // worker pool.
  5601. // Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`,
  5602. // and
  5603. // `TEARDOWN_NEVER`.
  5604. // `TEARDOWN_ALWAYS` means workers are always torn down regardless of
  5605. // whether
  5606. // the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn
  5607. // down
  5608. // if the job succeeds. `TEARDOWN_NEVER` means the workers are never
  5609. // torn
  5610. // down.
  5611. //
  5612. // If the workers are not torn down by the service, they will
  5613. // continue to run and use Google Compute Engine VM resources in
  5614. // the
  5615. // user's project until they are explicitly terminated by the
  5616. // user.
  5617. // Because of this, Google recommends using the `TEARDOWN_ALWAYS`
  5618. // policy except for small, manually supervised test jobs.
  5619. //
  5620. // If unknown or unspecified, the service will attempt to choose a
  5621. // reasonable
  5622. // default.
  5623. //
  5624. // Possible values:
  5625. // "TEARDOWN_POLICY_UNKNOWN" - The teardown policy isn't specified, or
  5626. // is unknown.
  5627. // "TEARDOWN_ALWAYS" - Always teardown the resource.
  5628. // "TEARDOWN_ON_SUCCESS" - Teardown the resource on success. This is
  5629. // useful for debugging
  5630. // failures.
  5631. // "TEARDOWN_NEVER" - Never teardown the resource. This is useful for
  5632. // debugging and
  5633. // development.
  5634. TeardownPolicy string `json:"teardownPolicy,omitempty"`
  5635. // WorkerHarnessContainerImage: Required. Docker container image that
  5636. // executes the Cloud Dataflow worker
  5637. // harness, residing in Google Container Registry.
  5638. WorkerHarnessContainerImage string `json:"workerHarnessContainerImage,omitempty"`
  5639. // Zone: Zone to run the worker pools in. If empty or unspecified, the
  5640. // service
  5641. // will attempt to choose a reasonable default.
  5642. Zone string `json:"zone,omitempty"`
  5643. // ForceSendFields is a list of field names (e.g. "AutoscalingSettings")
  5644. // to unconditionally include in API requests. By default, fields with
  5645. // empty values are omitted from API requests. However, any non-pointer,
  5646. // non-interface field appearing in ForceSendFields will be sent to the
  5647. // server regardless of whether the field is empty or not. This may be
  5648. // used to include empty fields in Patch requests.
  5649. ForceSendFields []string `json:"-"`
  5650. // NullFields is a list of field names (e.g. "AutoscalingSettings") to
  5651. // include in API requests with the JSON null value. By default, fields
  5652. // with empty values are omitted from API requests. However, any field
  5653. // with an empty value appearing in NullFields will be sent to the
  5654. // server as null. It is an error if a field in this list has a
  5655. // non-empty value. This may be used to include null fields in Patch
  5656. // requests.
  5657. NullFields []string `json:"-"`
  5658. }
  5659. func (s *WorkerPool) MarshalJSON() ([]byte, error) {
  5660. type NoMethod WorkerPool
  5661. raw := NoMethod(*s)
  5662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5663. }
  5664. // WorkerSettings: Provides data to pass through to the worker harness.
  5665. type WorkerSettings struct {
  5666. // BaseUrl: The base URL for accessing Google Cloud APIs.
  5667. //
  5668. // When workers access Google Cloud APIs, they logically do so
  5669. // via
  5670. // relative URLs. If this field is specified, it supplies the base
  5671. // URL to use for resolving these relative URLs. The
  5672. // normative
  5673. // algorithm used is defined by RFC 1808, "Relative Uniform
  5674. // Resource
  5675. // Locators".
  5676. //
  5677. // If not specified, the default value is "http://www.googleapis.com/"
  5678. BaseUrl string `json:"baseUrl,omitempty"`
  5679. // ReportingEnabled: Whether to send work progress updates to the
  5680. // service.
  5681. ReportingEnabled bool `json:"reportingEnabled,omitempty"`
  5682. // ServicePath: The Cloud Dataflow service path relative to the root
  5683. // URL, for example,
  5684. // "dataflow/v1b3/projects".
  5685. ServicePath string `json:"servicePath,omitempty"`
  5686. // ShuffleServicePath: The Shuffle service path relative to the root
  5687. // URL, for example,
  5688. // "shuffle/v1beta1".
  5689. ShuffleServicePath string `json:"shuffleServicePath,omitempty"`
  5690. // TempStoragePrefix: The prefix of the resources the system should use
  5691. // for temporary
  5692. // storage.
  5693. //
  5694. // The supported resource type is:
  5695. //
  5696. // Google Cloud Storage:
  5697. //
  5698. // storage.googleapis.com/{bucket}/{object}
  5699. // bucket.storage.googleapis.com/{object}
  5700. TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
  5701. // WorkerId: The ID of the worker running this pipeline.
  5702. WorkerId string `json:"workerId,omitempty"`
  5703. // ForceSendFields is a list of field names (e.g. "BaseUrl") 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. "BaseUrl") 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 *WorkerSettings) MarshalJSON() ([]byte, error) {
  5719. type NoMethod WorkerSettings
  5720. raw := NoMethod(*s)
  5721. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5722. }
  5723. // WorkerShutdownNotice: Shutdown notification from workers. This is to
  5724. // be sent by the shutdown
  5725. // script of the worker VM so that the backend knows that the VM is
  5726. // being
  5727. // shut down.
  5728. type WorkerShutdownNotice struct {
  5729. // Reason: The reason for the worker shutdown.
  5730. // Current possible values are:
  5731. // "UNKNOWN": shutdown reason is unknown.
  5732. // "PREEMPTION": shutdown reason is preemption.
  5733. // Other possible reasons may be added in the future.
  5734. Reason string `json:"reason,omitempty"`
  5735. // ForceSendFields is a list of field names (e.g. "Reason") to
  5736. // unconditionally include in API requests. By default, fields with
  5737. // empty values are omitted from API requests. However, any non-pointer,
  5738. // non-interface field appearing in ForceSendFields will be sent to the
  5739. // server regardless of whether the field is empty or not. This may be
  5740. // used to include empty fields in Patch requests.
  5741. ForceSendFields []string `json:"-"`
  5742. // NullFields is a list of field names (e.g. "Reason") to include in API
  5743. // requests with the JSON null value. By default, fields with empty
  5744. // values are omitted from API requests. However, any field with an
  5745. // empty value appearing in NullFields will be sent to the server as
  5746. // null. It is an error if a field in this list has a non-empty value.
  5747. // This may be used to include null fields in Patch requests.
  5748. NullFields []string `json:"-"`
  5749. }
  5750. func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) {
  5751. type NoMethod WorkerShutdownNotice
  5752. raw := NoMethod(*s)
  5753. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5754. }
  5755. // WorkerShutdownNoticeResponse: Service-side response to WorkerMessage
  5756. // issuing shutdown notice.
  5757. type WorkerShutdownNoticeResponse struct {
  5758. }
  5759. // WriteInstruction: An instruction that writes records.
  5760. // Takes one input, produces no outputs.
  5761. type WriteInstruction struct {
  5762. // Input: The input.
  5763. Input *InstructionInput `json:"input,omitempty"`
  5764. // Sink: The sink to write to.
  5765. Sink *Sink `json:"sink,omitempty"`
  5766. // ForceSendFields is a list of field names (e.g. "Input") to
  5767. // unconditionally include in API requests. By default, fields with
  5768. // empty values are omitted from API requests. However, any non-pointer,
  5769. // non-interface field appearing in ForceSendFields will be sent to the
  5770. // server regardless of whether the field is empty or not. This may be
  5771. // used to include empty fields in Patch requests.
  5772. ForceSendFields []string `json:"-"`
  5773. // NullFields is a list of field names (e.g. "Input") to include in API
  5774. // requests with the JSON null value. By default, fields with empty
  5775. // values are omitted from API requests. However, any field with an
  5776. // empty value appearing in NullFields will be sent to the server as
  5777. // null. It is an error if a field in this list has a non-empty value.
  5778. // This may be used to include null fields in Patch requests.
  5779. NullFields []string `json:"-"`
  5780. }
  5781. func (s *WriteInstruction) MarshalJSON() ([]byte, error) {
  5782. type NoMethod WriteInstruction
  5783. raw := NoMethod(*s)
  5784. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5785. }
  5786. // method id "dataflow.projects.workerMessages":
  5787. type ProjectsWorkerMessagesCall struct {
  5788. s *Service
  5789. projectId string
  5790. sendworkermessagesrequest *SendWorkerMessagesRequest
  5791. urlParams_ gensupport.URLParams
  5792. ctx_ context.Context
  5793. header_ http.Header
  5794. }
  5795. // WorkerMessages: Send a worker_message to the service.
  5796. func (r *ProjectsService) WorkerMessages(projectId string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsWorkerMessagesCall {
  5797. c := &ProjectsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5798. c.projectId = projectId
  5799. c.sendworkermessagesrequest = sendworkermessagesrequest
  5800. return c
  5801. }
  5802. // Fields allows partial responses to be retrieved. See
  5803. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5804. // for more information.
  5805. func (c *ProjectsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsWorkerMessagesCall {
  5806. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5807. return c
  5808. }
  5809. // Context sets the context to be used in this call's Do method. Any
  5810. // pending HTTP request will be aborted if the provided context is
  5811. // canceled.
  5812. func (c *ProjectsWorkerMessagesCall) Context(ctx context.Context) *ProjectsWorkerMessagesCall {
  5813. c.ctx_ = ctx
  5814. return c
  5815. }
  5816. // Header returns an http.Header that can be modified by the caller to
  5817. // add HTTP headers to the request.
  5818. func (c *ProjectsWorkerMessagesCall) Header() http.Header {
  5819. if c.header_ == nil {
  5820. c.header_ = make(http.Header)
  5821. }
  5822. return c.header_
  5823. }
  5824. func (c *ProjectsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) {
  5825. reqHeaders := make(http.Header)
  5826. for k, v := range c.header_ {
  5827. reqHeaders[k] = v
  5828. }
  5829. reqHeaders.Set("User-Agent", c.s.userAgent())
  5830. var body io.Reader = nil
  5831. body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest)
  5832. if err != nil {
  5833. return nil, err
  5834. }
  5835. reqHeaders.Set("Content-Type", "application/json")
  5836. c.urlParams_.Set("alt", alt)
  5837. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/WorkerMessages")
  5838. urls += "?" + c.urlParams_.Encode()
  5839. req, _ := http.NewRequest("POST", urls, body)
  5840. req.Header = reqHeaders
  5841. googleapi.Expand(req.URL, map[string]string{
  5842. "projectId": c.projectId,
  5843. })
  5844. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5845. }
  5846. // Do executes the "dataflow.projects.workerMessages" call.
  5847. // Exactly one of *SendWorkerMessagesResponse or error will be non-nil.
  5848. // Any non-2xx status code is an error. Response headers are in either
  5849. // *SendWorkerMessagesResponse.ServerResponse.Header or (if a response
  5850. // was returned at all) in error.(*googleapi.Error).Header. Use
  5851. // googleapi.IsNotModified to check whether the returned error was
  5852. // because http.StatusNotModified was returned.
  5853. func (c *ProjectsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) {
  5854. gensupport.SetOptions(c.urlParams_, opts...)
  5855. res, err := c.doRequest("json")
  5856. if res != nil && res.StatusCode == http.StatusNotModified {
  5857. if res.Body != nil {
  5858. res.Body.Close()
  5859. }
  5860. return nil, &googleapi.Error{
  5861. Code: res.StatusCode,
  5862. Header: res.Header,
  5863. }
  5864. }
  5865. if err != nil {
  5866. return nil, err
  5867. }
  5868. defer googleapi.CloseBody(res)
  5869. if err := googleapi.CheckResponse(res); err != nil {
  5870. return nil, err
  5871. }
  5872. ret := &SendWorkerMessagesResponse{
  5873. ServerResponse: googleapi.ServerResponse{
  5874. Header: res.Header,
  5875. HTTPStatusCode: res.StatusCode,
  5876. },
  5877. }
  5878. target := &ret
  5879. if err := gensupport.DecodeResponse(target, res); err != nil {
  5880. return nil, err
  5881. }
  5882. return ret, nil
  5883. // {
  5884. // "description": "Send a worker_message to the service.",
  5885. // "flatPath": "v1b3/projects/{projectId}/WorkerMessages",
  5886. // "httpMethod": "POST",
  5887. // "id": "dataflow.projects.workerMessages",
  5888. // "parameterOrder": [
  5889. // "projectId"
  5890. // ],
  5891. // "parameters": {
  5892. // "projectId": {
  5893. // "description": "The project to send the WorkerMessages to.",
  5894. // "location": "path",
  5895. // "required": true,
  5896. // "type": "string"
  5897. // }
  5898. // },
  5899. // "path": "v1b3/projects/{projectId}/WorkerMessages",
  5900. // "request": {
  5901. // "$ref": "SendWorkerMessagesRequest"
  5902. // },
  5903. // "response": {
  5904. // "$ref": "SendWorkerMessagesResponse"
  5905. // },
  5906. // "scopes": [
  5907. // "https://www.googleapis.com/auth/cloud-platform",
  5908. // "https://www.googleapis.com/auth/compute",
  5909. // "https://www.googleapis.com/auth/compute.readonly",
  5910. // "https://www.googleapis.com/auth/userinfo.email"
  5911. // ]
  5912. // }
  5913. }
  5914. // method id "dataflow.projects.jobs.aggregated":
  5915. type ProjectsJobsAggregatedCall struct {
  5916. s *Service
  5917. projectId string
  5918. urlParams_ gensupport.URLParams
  5919. ifNoneMatch_ string
  5920. ctx_ context.Context
  5921. header_ http.Header
  5922. }
  5923. // Aggregated: List the jobs of a project across all regions.
  5924. func (r *ProjectsJobsService) Aggregated(projectId string) *ProjectsJobsAggregatedCall {
  5925. c := &ProjectsJobsAggregatedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5926. c.projectId = projectId
  5927. return c
  5928. }
  5929. // Filter sets the optional parameter "filter": The kind of filter to
  5930. // use.
  5931. //
  5932. // Possible values:
  5933. // "UNKNOWN"
  5934. // "ALL"
  5935. // "TERMINATED"
  5936. // "ACTIVE"
  5937. func (c *ProjectsJobsAggregatedCall) Filter(filter string) *ProjectsJobsAggregatedCall {
  5938. c.urlParams_.Set("filter", filter)
  5939. return c
  5940. }
  5941. // Location sets the optional parameter "location": The location that
  5942. // contains this job.
  5943. func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggregatedCall {
  5944. c.urlParams_.Set("location", location)
  5945. return c
  5946. }
  5947. // PageSize sets the optional parameter "pageSize": If there are many
  5948. // jobs, limit response to at most this many.
  5949. // The actual number of jobs returned will be the lesser of
  5950. // max_responses
  5951. // and an unspecified server-defined limit.
  5952. func (c *ProjectsJobsAggregatedCall) PageSize(pageSize int64) *ProjectsJobsAggregatedCall {
  5953. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5954. return c
  5955. }
  5956. // PageToken sets the optional parameter "pageToken": Set this to the
  5957. // 'next_page_token' field of a previous response
  5958. // to request additional results in a long list.
  5959. func (c *ProjectsJobsAggregatedCall) PageToken(pageToken string) *ProjectsJobsAggregatedCall {
  5960. c.urlParams_.Set("pageToken", pageToken)
  5961. return c
  5962. }
  5963. // View sets the optional parameter "view": Level of information
  5964. // requested in response. Default is `JOB_VIEW_SUMMARY`.
  5965. //
  5966. // Possible values:
  5967. // "JOB_VIEW_UNKNOWN"
  5968. // "JOB_VIEW_SUMMARY"
  5969. // "JOB_VIEW_ALL"
  5970. // "JOB_VIEW_DESCRIPTION"
  5971. func (c *ProjectsJobsAggregatedCall) View(view string) *ProjectsJobsAggregatedCall {
  5972. c.urlParams_.Set("view", view)
  5973. return c
  5974. }
  5975. // Fields allows partial responses to be retrieved. See
  5976. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5977. // for more information.
  5978. func (c *ProjectsJobsAggregatedCall) Fields(s ...googleapi.Field) *ProjectsJobsAggregatedCall {
  5979. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5980. return c
  5981. }
  5982. // IfNoneMatch sets the optional parameter which makes the operation
  5983. // fail if the object's ETag matches the given value. This is useful for
  5984. // getting updates only after the object has changed since the last
  5985. // request. Use googleapi.IsNotModified to check whether the response
  5986. // error from Do is the result of In-None-Match.
  5987. func (c *ProjectsJobsAggregatedCall) IfNoneMatch(entityTag string) *ProjectsJobsAggregatedCall {
  5988. c.ifNoneMatch_ = entityTag
  5989. return c
  5990. }
  5991. // Context sets the context to be used in this call's Do method. Any
  5992. // pending HTTP request will be aborted if the provided context is
  5993. // canceled.
  5994. func (c *ProjectsJobsAggregatedCall) Context(ctx context.Context) *ProjectsJobsAggregatedCall {
  5995. c.ctx_ = ctx
  5996. return c
  5997. }
  5998. // Header returns an http.Header that can be modified by the caller to
  5999. // add HTTP headers to the request.
  6000. func (c *ProjectsJobsAggregatedCall) Header() http.Header {
  6001. if c.header_ == nil {
  6002. c.header_ = make(http.Header)
  6003. }
  6004. return c.header_
  6005. }
  6006. func (c *ProjectsJobsAggregatedCall) doRequest(alt string) (*http.Response, error) {
  6007. reqHeaders := make(http.Header)
  6008. for k, v := range c.header_ {
  6009. reqHeaders[k] = v
  6010. }
  6011. reqHeaders.Set("User-Agent", c.s.userAgent())
  6012. if c.ifNoneMatch_ != "" {
  6013. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6014. }
  6015. var body io.Reader = nil
  6016. c.urlParams_.Set("alt", alt)
  6017. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs:aggregated")
  6018. urls += "?" + c.urlParams_.Encode()
  6019. req, _ := http.NewRequest("GET", urls, body)
  6020. req.Header = reqHeaders
  6021. googleapi.Expand(req.URL, map[string]string{
  6022. "projectId": c.projectId,
  6023. })
  6024. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6025. }
  6026. // Do executes the "dataflow.projects.jobs.aggregated" call.
  6027. // Exactly one of *ListJobsResponse or error will be non-nil. Any
  6028. // non-2xx status code is an error. Response headers are in either
  6029. // *ListJobsResponse.ServerResponse.Header or (if a response was
  6030. // returned at all) in error.(*googleapi.Error).Header. Use
  6031. // googleapi.IsNotModified to check whether the returned error was
  6032. // because http.StatusNotModified was returned.
  6033. func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  6034. gensupport.SetOptions(c.urlParams_, opts...)
  6035. res, err := c.doRequest("json")
  6036. if res != nil && res.StatusCode == http.StatusNotModified {
  6037. if res.Body != nil {
  6038. res.Body.Close()
  6039. }
  6040. return nil, &googleapi.Error{
  6041. Code: res.StatusCode,
  6042. Header: res.Header,
  6043. }
  6044. }
  6045. if err != nil {
  6046. return nil, err
  6047. }
  6048. defer googleapi.CloseBody(res)
  6049. if err := googleapi.CheckResponse(res); err != nil {
  6050. return nil, err
  6051. }
  6052. ret := &ListJobsResponse{
  6053. ServerResponse: googleapi.ServerResponse{
  6054. Header: res.Header,
  6055. HTTPStatusCode: res.StatusCode,
  6056. },
  6057. }
  6058. target := &ret
  6059. if err := gensupport.DecodeResponse(target, res); err != nil {
  6060. return nil, err
  6061. }
  6062. return ret, nil
  6063. // {
  6064. // "description": "List the jobs of a project across all regions.",
  6065. // "flatPath": "v1b3/projects/{projectId}/jobs:aggregated",
  6066. // "httpMethod": "GET",
  6067. // "id": "dataflow.projects.jobs.aggregated",
  6068. // "parameterOrder": [
  6069. // "projectId"
  6070. // ],
  6071. // "parameters": {
  6072. // "filter": {
  6073. // "description": "The kind of filter to use.",
  6074. // "enum": [
  6075. // "UNKNOWN",
  6076. // "ALL",
  6077. // "TERMINATED",
  6078. // "ACTIVE"
  6079. // ],
  6080. // "location": "query",
  6081. // "type": "string"
  6082. // },
  6083. // "location": {
  6084. // "description": "The location that contains this job.",
  6085. // "location": "query",
  6086. // "type": "string"
  6087. // },
  6088. // "pageSize": {
  6089. // "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.",
  6090. // "format": "int32",
  6091. // "location": "query",
  6092. // "type": "integer"
  6093. // },
  6094. // "pageToken": {
  6095. // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.",
  6096. // "location": "query",
  6097. // "type": "string"
  6098. // },
  6099. // "projectId": {
  6100. // "description": "The project which owns the jobs.",
  6101. // "location": "path",
  6102. // "required": true,
  6103. // "type": "string"
  6104. // },
  6105. // "view": {
  6106. // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.",
  6107. // "enum": [
  6108. // "JOB_VIEW_UNKNOWN",
  6109. // "JOB_VIEW_SUMMARY",
  6110. // "JOB_VIEW_ALL",
  6111. // "JOB_VIEW_DESCRIPTION"
  6112. // ],
  6113. // "location": "query",
  6114. // "type": "string"
  6115. // }
  6116. // },
  6117. // "path": "v1b3/projects/{projectId}/jobs:aggregated",
  6118. // "response": {
  6119. // "$ref": "ListJobsResponse"
  6120. // },
  6121. // "scopes": [
  6122. // "https://www.googleapis.com/auth/cloud-platform",
  6123. // "https://www.googleapis.com/auth/compute",
  6124. // "https://www.googleapis.com/auth/compute.readonly",
  6125. // "https://www.googleapis.com/auth/userinfo.email"
  6126. // ]
  6127. // }
  6128. }
  6129. // Pages invokes f for each page of results.
  6130. // A non-nil error returned from f will halt the iteration.
  6131. // The provided context supersedes any context provided to the Context method.
  6132. func (c *ProjectsJobsAggregatedCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  6133. c.ctx_ = ctx
  6134. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6135. for {
  6136. x, err := c.Do()
  6137. if err != nil {
  6138. return err
  6139. }
  6140. if err := f(x); err != nil {
  6141. return err
  6142. }
  6143. if x.NextPageToken == "" {
  6144. return nil
  6145. }
  6146. c.PageToken(x.NextPageToken)
  6147. }
  6148. }
  6149. // method id "dataflow.projects.jobs.create":
  6150. type ProjectsJobsCreateCall struct {
  6151. s *Service
  6152. projectId string
  6153. job *Job
  6154. urlParams_ gensupport.URLParams
  6155. ctx_ context.Context
  6156. header_ http.Header
  6157. }
  6158. // Create: Creates a Cloud Dataflow job.
  6159. func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCreateCall {
  6160. c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6161. c.projectId = projectId
  6162. c.job = job
  6163. return c
  6164. }
  6165. // Location sets the optional parameter "location": The location that
  6166. // contains this job.
  6167. func (c *ProjectsJobsCreateCall) Location(location string) *ProjectsJobsCreateCall {
  6168. c.urlParams_.Set("location", location)
  6169. return c
  6170. }
  6171. // ReplaceJobId sets the optional parameter "replaceJobId": Deprecated.
  6172. // This field is now in the Job message.
  6173. func (c *ProjectsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsJobsCreateCall {
  6174. c.urlParams_.Set("replaceJobId", replaceJobId)
  6175. return c
  6176. }
  6177. // View sets the optional parameter "view": The level of information
  6178. // requested in response.
  6179. //
  6180. // Possible values:
  6181. // "JOB_VIEW_UNKNOWN"
  6182. // "JOB_VIEW_SUMMARY"
  6183. // "JOB_VIEW_ALL"
  6184. // "JOB_VIEW_DESCRIPTION"
  6185. func (c *ProjectsJobsCreateCall) View(view string) *ProjectsJobsCreateCall {
  6186. c.urlParams_.Set("view", view)
  6187. return c
  6188. }
  6189. // Fields allows partial responses to be retrieved. See
  6190. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6191. // for more information.
  6192. func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall {
  6193. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6194. return c
  6195. }
  6196. // Context sets the context to be used in this call's Do method. Any
  6197. // pending HTTP request will be aborted if the provided context is
  6198. // canceled.
  6199. func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
  6200. c.ctx_ = ctx
  6201. return c
  6202. }
  6203. // Header returns an http.Header that can be modified by the caller to
  6204. // add HTTP headers to the request.
  6205. func (c *ProjectsJobsCreateCall) Header() http.Header {
  6206. if c.header_ == nil {
  6207. c.header_ = make(http.Header)
  6208. }
  6209. return c.header_
  6210. }
  6211. func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  6212. reqHeaders := make(http.Header)
  6213. for k, v := range c.header_ {
  6214. reqHeaders[k] = v
  6215. }
  6216. reqHeaders.Set("User-Agent", c.s.userAgent())
  6217. var body io.Reader = nil
  6218. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  6219. if err != nil {
  6220. return nil, err
  6221. }
  6222. reqHeaders.Set("Content-Type", "application/json")
  6223. c.urlParams_.Set("alt", alt)
  6224. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs")
  6225. urls += "?" + c.urlParams_.Encode()
  6226. req, _ := http.NewRequest("POST", urls, body)
  6227. req.Header = reqHeaders
  6228. googleapi.Expand(req.URL, map[string]string{
  6229. "projectId": c.projectId,
  6230. })
  6231. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6232. }
  6233. // Do executes the "dataflow.projects.jobs.create" call.
  6234. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  6235. // is an error. Response headers are in either
  6236. // *Job.ServerResponse.Header or (if a response was returned at all) in
  6237. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6238. // whether the returned error was because http.StatusNotModified was
  6239. // returned.
  6240. func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  6241. gensupport.SetOptions(c.urlParams_, opts...)
  6242. res, err := c.doRequest("json")
  6243. if res != nil && res.StatusCode == http.StatusNotModified {
  6244. if res.Body != nil {
  6245. res.Body.Close()
  6246. }
  6247. return nil, &googleapi.Error{
  6248. Code: res.StatusCode,
  6249. Header: res.Header,
  6250. }
  6251. }
  6252. if err != nil {
  6253. return nil, err
  6254. }
  6255. defer googleapi.CloseBody(res)
  6256. if err := googleapi.CheckResponse(res); err != nil {
  6257. return nil, err
  6258. }
  6259. ret := &Job{
  6260. ServerResponse: googleapi.ServerResponse{
  6261. Header: res.Header,
  6262. HTTPStatusCode: res.StatusCode,
  6263. },
  6264. }
  6265. target := &ret
  6266. if err := gensupport.DecodeResponse(target, res); err != nil {
  6267. return nil, err
  6268. }
  6269. return ret, nil
  6270. // {
  6271. // "description": "Creates a Cloud Dataflow job.",
  6272. // "flatPath": "v1b3/projects/{projectId}/jobs",
  6273. // "httpMethod": "POST",
  6274. // "id": "dataflow.projects.jobs.create",
  6275. // "parameterOrder": [
  6276. // "projectId"
  6277. // ],
  6278. // "parameters": {
  6279. // "location": {
  6280. // "description": "The location that contains this job.",
  6281. // "location": "query",
  6282. // "type": "string"
  6283. // },
  6284. // "projectId": {
  6285. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  6286. // "location": "path",
  6287. // "required": true,
  6288. // "type": "string"
  6289. // },
  6290. // "replaceJobId": {
  6291. // "description": "Deprecated. This field is now in the Job message.",
  6292. // "location": "query",
  6293. // "type": "string"
  6294. // },
  6295. // "view": {
  6296. // "description": "The level of information requested in response.",
  6297. // "enum": [
  6298. // "JOB_VIEW_UNKNOWN",
  6299. // "JOB_VIEW_SUMMARY",
  6300. // "JOB_VIEW_ALL",
  6301. // "JOB_VIEW_DESCRIPTION"
  6302. // ],
  6303. // "location": "query",
  6304. // "type": "string"
  6305. // }
  6306. // },
  6307. // "path": "v1b3/projects/{projectId}/jobs",
  6308. // "request": {
  6309. // "$ref": "Job"
  6310. // },
  6311. // "response": {
  6312. // "$ref": "Job"
  6313. // },
  6314. // "scopes": [
  6315. // "https://www.googleapis.com/auth/cloud-platform",
  6316. // "https://www.googleapis.com/auth/compute",
  6317. // "https://www.googleapis.com/auth/compute.readonly",
  6318. // "https://www.googleapis.com/auth/userinfo.email"
  6319. // ]
  6320. // }
  6321. }
  6322. // method id "dataflow.projects.jobs.get":
  6323. type ProjectsJobsGetCall struct {
  6324. s *Service
  6325. projectId string
  6326. jobId string
  6327. urlParams_ gensupport.URLParams
  6328. ifNoneMatch_ string
  6329. ctx_ context.Context
  6330. header_ http.Header
  6331. }
  6332. // Get: Gets the state of the specified Cloud Dataflow job.
  6333. func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall {
  6334. c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6335. c.projectId = projectId
  6336. c.jobId = jobId
  6337. return c
  6338. }
  6339. // Location sets the optional parameter "location": The location that
  6340. // contains this job.
  6341. func (c *ProjectsJobsGetCall) Location(location string) *ProjectsJobsGetCall {
  6342. c.urlParams_.Set("location", location)
  6343. return c
  6344. }
  6345. // View sets the optional parameter "view": The level of information
  6346. // requested in response.
  6347. //
  6348. // Possible values:
  6349. // "JOB_VIEW_UNKNOWN"
  6350. // "JOB_VIEW_SUMMARY"
  6351. // "JOB_VIEW_ALL"
  6352. // "JOB_VIEW_DESCRIPTION"
  6353. func (c *ProjectsJobsGetCall) View(view string) *ProjectsJobsGetCall {
  6354. c.urlParams_.Set("view", view)
  6355. return c
  6356. }
  6357. // Fields allows partial responses to be retrieved. See
  6358. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6359. // for more information.
  6360. func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall {
  6361. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6362. return c
  6363. }
  6364. // IfNoneMatch sets the optional parameter which makes the operation
  6365. // fail if the object's ETag matches the given value. This is useful for
  6366. // getting updates only after the object has changed since the last
  6367. // request. Use googleapi.IsNotModified to check whether the response
  6368. // error from Do is the result of In-None-Match.
  6369. func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall {
  6370. c.ifNoneMatch_ = entityTag
  6371. return c
  6372. }
  6373. // Context sets the context to be used in this call's Do method. Any
  6374. // pending HTTP request will be aborted if the provided context is
  6375. // canceled.
  6376. func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
  6377. c.ctx_ = ctx
  6378. return c
  6379. }
  6380. // Header returns an http.Header that can be modified by the caller to
  6381. // add HTTP headers to the request.
  6382. func (c *ProjectsJobsGetCall) Header() http.Header {
  6383. if c.header_ == nil {
  6384. c.header_ = make(http.Header)
  6385. }
  6386. return c.header_
  6387. }
  6388. func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  6389. reqHeaders := make(http.Header)
  6390. for k, v := range c.header_ {
  6391. reqHeaders[k] = v
  6392. }
  6393. reqHeaders.Set("User-Agent", c.s.userAgent())
  6394. if c.ifNoneMatch_ != "" {
  6395. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6396. }
  6397. var body io.Reader = nil
  6398. c.urlParams_.Set("alt", alt)
  6399. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}")
  6400. urls += "?" + c.urlParams_.Encode()
  6401. req, _ := http.NewRequest("GET", urls, body)
  6402. req.Header = reqHeaders
  6403. googleapi.Expand(req.URL, map[string]string{
  6404. "projectId": c.projectId,
  6405. "jobId": c.jobId,
  6406. })
  6407. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6408. }
  6409. // Do executes the "dataflow.projects.jobs.get" call.
  6410. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  6411. // is an error. Response headers are in either
  6412. // *Job.ServerResponse.Header or (if a response was returned at all) in
  6413. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6414. // whether the returned error was because http.StatusNotModified was
  6415. // returned.
  6416. func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  6417. gensupport.SetOptions(c.urlParams_, opts...)
  6418. res, err := c.doRequest("json")
  6419. if res != nil && res.StatusCode == http.StatusNotModified {
  6420. if res.Body != nil {
  6421. res.Body.Close()
  6422. }
  6423. return nil, &googleapi.Error{
  6424. Code: res.StatusCode,
  6425. Header: res.Header,
  6426. }
  6427. }
  6428. if err != nil {
  6429. return nil, err
  6430. }
  6431. defer googleapi.CloseBody(res)
  6432. if err := googleapi.CheckResponse(res); err != nil {
  6433. return nil, err
  6434. }
  6435. ret := &Job{
  6436. ServerResponse: googleapi.ServerResponse{
  6437. Header: res.Header,
  6438. HTTPStatusCode: res.StatusCode,
  6439. },
  6440. }
  6441. target := &ret
  6442. if err := gensupport.DecodeResponse(target, res); err != nil {
  6443. return nil, err
  6444. }
  6445. return ret, nil
  6446. // {
  6447. // "description": "Gets the state of the specified Cloud Dataflow job.",
  6448. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}",
  6449. // "httpMethod": "GET",
  6450. // "id": "dataflow.projects.jobs.get",
  6451. // "parameterOrder": [
  6452. // "projectId",
  6453. // "jobId"
  6454. // ],
  6455. // "parameters": {
  6456. // "jobId": {
  6457. // "description": "The job ID.",
  6458. // "location": "path",
  6459. // "required": true,
  6460. // "type": "string"
  6461. // },
  6462. // "location": {
  6463. // "description": "The location that contains this job.",
  6464. // "location": "query",
  6465. // "type": "string"
  6466. // },
  6467. // "projectId": {
  6468. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  6469. // "location": "path",
  6470. // "required": true,
  6471. // "type": "string"
  6472. // },
  6473. // "view": {
  6474. // "description": "The level of information requested in response.",
  6475. // "enum": [
  6476. // "JOB_VIEW_UNKNOWN",
  6477. // "JOB_VIEW_SUMMARY",
  6478. // "JOB_VIEW_ALL",
  6479. // "JOB_VIEW_DESCRIPTION"
  6480. // ],
  6481. // "location": "query",
  6482. // "type": "string"
  6483. // }
  6484. // },
  6485. // "path": "v1b3/projects/{projectId}/jobs/{jobId}",
  6486. // "response": {
  6487. // "$ref": "Job"
  6488. // },
  6489. // "scopes": [
  6490. // "https://www.googleapis.com/auth/cloud-platform",
  6491. // "https://www.googleapis.com/auth/compute",
  6492. // "https://www.googleapis.com/auth/compute.readonly",
  6493. // "https://www.googleapis.com/auth/userinfo.email"
  6494. // ]
  6495. // }
  6496. }
  6497. // method id "dataflow.projects.jobs.getMetrics":
  6498. type ProjectsJobsGetMetricsCall struct {
  6499. s *Service
  6500. projectId string
  6501. jobId string
  6502. urlParams_ gensupport.URLParams
  6503. ifNoneMatch_ string
  6504. ctx_ context.Context
  6505. header_ http.Header
  6506. }
  6507. // GetMetrics: Request the job status.
  6508. func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *ProjectsJobsGetMetricsCall {
  6509. c := &ProjectsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6510. c.projectId = projectId
  6511. c.jobId = jobId
  6512. return c
  6513. }
  6514. // Location sets the optional parameter "location": The location which
  6515. // contains the job specified by job_id.
  6516. func (c *ProjectsJobsGetMetricsCall) Location(location string) *ProjectsJobsGetMetricsCall {
  6517. c.urlParams_.Set("location", location)
  6518. return c
  6519. }
  6520. // StartTime sets the optional parameter "startTime": Return only metric
  6521. // data that has changed since this time.
  6522. // Default is to return all information about all metrics for the job.
  6523. func (c *ProjectsJobsGetMetricsCall) StartTime(startTime string) *ProjectsJobsGetMetricsCall {
  6524. c.urlParams_.Set("startTime", startTime)
  6525. return c
  6526. }
  6527. // Fields allows partial responses to be retrieved. See
  6528. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6529. // for more information.
  6530. func (c *ProjectsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsJobsGetMetricsCall {
  6531. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6532. return c
  6533. }
  6534. // IfNoneMatch sets the optional parameter which makes the operation
  6535. // fail if the object's ETag matches the given value. This is useful for
  6536. // getting updates only after the object has changed since the last
  6537. // request. Use googleapi.IsNotModified to check whether the response
  6538. // error from Do is the result of In-None-Match.
  6539. func (c *ProjectsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsJobsGetMetricsCall {
  6540. c.ifNoneMatch_ = entityTag
  6541. return c
  6542. }
  6543. // Context sets the context to be used in this call's Do method. Any
  6544. // pending HTTP request will be aborted if the provided context is
  6545. // canceled.
  6546. func (c *ProjectsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsJobsGetMetricsCall {
  6547. c.ctx_ = ctx
  6548. return c
  6549. }
  6550. // Header returns an http.Header that can be modified by the caller to
  6551. // add HTTP headers to the request.
  6552. func (c *ProjectsJobsGetMetricsCall) Header() http.Header {
  6553. if c.header_ == nil {
  6554. c.header_ = make(http.Header)
  6555. }
  6556. return c.header_
  6557. }
  6558. func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) {
  6559. reqHeaders := make(http.Header)
  6560. for k, v := range c.header_ {
  6561. reqHeaders[k] = v
  6562. }
  6563. reqHeaders.Set("User-Agent", c.s.userAgent())
  6564. if c.ifNoneMatch_ != "" {
  6565. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6566. }
  6567. var body io.Reader = nil
  6568. c.urlParams_.Set("alt", alt)
  6569. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/metrics")
  6570. urls += "?" + c.urlParams_.Encode()
  6571. req, _ := http.NewRequest("GET", urls, body)
  6572. req.Header = reqHeaders
  6573. googleapi.Expand(req.URL, map[string]string{
  6574. "projectId": c.projectId,
  6575. "jobId": c.jobId,
  6576. })
  6577. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6578. }
  6579. // Do executes the "dataflow.projects.jobs.getMetrics" call.
  6580. // Exactly one of *JobMetrics or error will be non-nil. Any non-2xx
  6581. // status code is an error. Response headers are in either
  6582. // *JobMetrics.ServerResponse.Header or (if a response was returned at
  6583. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6584. // to check whether the returned error was because
  6585. // http.StatusNotModified was returned.
  6586. func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) {
  6587. gensupport.SetOptions(c.urlParams_, opts...)
  6588. res, err := c.doRequest("json")
  6589. if res != nil && res.StatusCode == http.StatusNotModified {
  6590. if res.Body != nil {
  6591. res.Body.Close()
  6592. }
  6593. return nil, &googleapi.Error{
  6594. Code: res.StatusCode,
  6595. Header: res.Header,
  6596. }
  6597. }
  6598. if err != nil {
  6599. return nil, err
  6600. }
  6601. defer googleapi.CloseBody(res)
  6602. if err := googleapi.CheckResponse(res); err != nil {
  6603. return nil, err
  6604. }
  6605. ret := &JobMetrics{
  6606. ServerResponse: googleapi.ServerResponse{
  6607. Header: res.Header,
  6608. HTTPStatusCode: res.StatusCode,
  6609. },
  6610. }
  6611. target := &ret
  6612. if err := gensupport.DecodeResponse(target, res); err != nil {
  6613. return nil, err
  6614. }
  6615. return ret, nil
  6616. // {
  6617. // "description": "Request the job status.",
  6618. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics",
  6619. // "httpMethod": "GET",
  6620. // "id": "dataflow.projects.jobs.getMetrics",
  6621. // "parameterOrder": [
  6622. // "projectId",
  6623. // "jobId"
  6624. // ],
  6625. // "parameters": {
  6626. // "jobId": {
  6627. // "description": "The job to get messages for.",
  6628. // "location": "path",
  6629. // "required": true,
  6630. // "type": "string"
  6631. // },
  6632. // "location": {
  6633. // "description": "The location which contains the job specified by job_id.",
  6634. // "location": "query",
  6635. // "type": "string"
  6636. // },
  6637. // "projectId": {
  6638. // "description": "A project id.",
  6639. // "location": "path",
  6640. // "required": true,
  6641. // "type": "string"
  6642. // },
  6643. // "startTime": {
  6644. // "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.",
  6645. // "format": "google-datetime",
  6646. // "location": "query",
  6647. // "type": "string"
  6648. // }
  6649. // },
  6650. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics",
  6651. // "response": {
  6652. // "$ref": "JobMetrics"
  6653. // },
  6654. // "scopes": [
  6655. // "https://www.googleapis.com/auth/cloud-platform",
  6656. // "https://www.googleapis.com/auth/compute",
  6657. // "https://www.googleapis.com/auth/compute.readonly",
  6658. // "https://www.googleapis.com/auth/userinfo.email"
  6659. // ]
  6660. // }
  6661. }
  6662. // method id "dataflow.projects.jobs.list":
  6663. type ProjectsJobsListCall struct {
  6664. s *Service
  6665. projectId string
  6666. urlParams_ gensupport.URLParams
  6667. ifNoneMatch_ string
  6668. ctx_ context.Context
  6669. header_ http.Header
  6670. }
  6671. // List: List the jobs of a project in a given region.
  6672. func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall {
  6673. c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6674. c.projectId = projectId
  6675. return c
  6676. }
  6677. // Filter sets the optional parameter "filter": The kind of filter to
  6678. // use.
  6679. //
  6680. // Possible values:
  6681. // "UNKNOWN"
  6682. // "ALL"
  6683. // "TERMINATED"
  6684. // "ACTIVE"
  6685. func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall {
  6686. c.urlParams_.Set("filter", filter)
  6687. return c
  6688. }
  6689. // Location sets the optional parameter "location": The location that
  6690. // contains this job.
  6691. func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall {
  6692. c.urlParams_.Set("location", location)
  6693. return c
  6694. }
  6695. // PageSize sets the optional parameter "pageSize": If there are many
  6696. // jobs, limit response to at most this many.
  6697. // The actual number of jobs returned will be the lesser of
  6698. // max_responses
  6699. // and an unspecified server-defined limit.
  6700. func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall {
  6701. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6702. return c
  6703. }
  6704. // PageToken sets the optional parameter "pageToken": Set this to the
  6705. // 'next_page_token' field of a previous response
  6706. // to request additional results in a long list.
  6707. func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall {
  6708. c.urlParams_.Set("pageToken", pageToken)
  6709. return c
  6710. }
  6711. // View sets the optional parameter "view": Level of information
  6712. // requested in response. Default is `JOB_VIEW_SUMMARY`.
  6713. //
  6714. // Possible values:
  6715. // "JOB_VIEW_UNKNOWN"
  6716. // "JOB_VIEW_SUMMARY"
  6717. // "JOB_VIEW_ALL"
  6718. // "JOB_VIEW_DESCRIPTION"
  6719. func (c *ProjectsJobsListCall) View(view string) *ProjectsJobsListCall {
  6720. c.urlParams_.Set("view", view)
  6721. return c
  6722. }
  6723. // Fields allows partial responses to be retrieved. See
  6724. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6725. // for more information.
  6726. func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall {
  6727. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6728. return c
  6729. }
  6730. // IfNoneMatch sets the optional parameter which makes the operation
  6731. // fail if the object's ETag matches the given value. This is useful for
  6732. // getting updates only after the object has changed since the last
  6733. // request. Use googleapi.IsNotModified to check whether the response
  6734. // error from Do is the result of In-None-Match.
  6735. func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall {
  6736. c.ifNoneMatch_ = entityTag
  6737. return c
  6738. }
  6739. // Context sets the context to be used in this call's Do method. Any
  6740. // pending HTTP request will be aborted if the provided context is
  6741. // canceled.
  6742. func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
  6743. c.ctx_ = ctx
  6744. return c
  6745. }
  6746. // Header returns an http.Header that can be modified by the caller to
  6747. // add HTTP headers to the request.
  6748. func (c *ProjectsJobsListCall) Header() http.Header {
  6749. if c.header_ == nil {
  6750. c.header_ = make(http.Header)
  6751. }
  6752. return c.header_
  6753. }
  6754. func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
  6755. reqHeaders := make(http.Header)
  6756. for k, v := range c.header_ {
  6757. reqHeaders[k] = v
  6758. }
  6759. reqHeaders.Set("User-Agent", c.s.userAgent())
  6760. if c.ifNoneMatch_ != "" {
  6761. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6762. }
  6763. var body io.Reader = nil
  6764. c.urlParams_.Set("alt", alt)
  6765. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs")
  6766. urls += "?" + c.urlParams_.Encode()
  6767. req, _ := http.NewRequest("GET", urls, body)
  6768. req.Header = reqHeaders
  6769. googleapi.Expand(req.URL, map[string]string{
  6770. "projectId": c.projectId,
  6771. })
  6772. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6773. }
  6774. // Do executes the "dataflow.projects.jobs.list" call.
  6775. // Exactly one of *ListJobsResponse or error will be non-nil. Any
  6776. // non-2xx status code is an error. Response headers are in either
  6777. // *ListJobsResponse.ServerResponse.Header or (if a response was
  6778. // returned at all) in error.(*googleapi.Error).Header. Use
  6779. // googleapi.IsNotModified to check whether the returned error was
  6780. // because http.StatusNotModified was returned.
  6781. func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  6782. gensupport.SetOptions(c.urlParams_, opts...)
  6783. res, err := c.doRequest("json")
  6784. if res != nil && res.StatusCode == http.StatusNotModified {
  6785. if res.Body != nil {
  6786. res.Body.Close()
  6787. }
  6788. return nil, &googleapi.Error{
  6789. Code: res.StatusCode,
  6790. Header: res.Header,
  6791. }
  6792. }
  6793. if err != nil {
  6794. return nil, err
  6795. }
  6796. defer googleapi.CloseBody(res)
  6797. if err := googleapi.CheckResponse(res); err != nil {
  6798. return nil, err
  6799. }
  6800. ret := &ListJobsResponse{
  6801. ServerResponse: googleapi.ServerResponse{
  6802. Header: res.Header,
  6803. HTTPStatusCode: res.StatusCode,
  6804. },
  6805. }
  6806. target := &ret
  6807. if err := gensupport.DecodeResponse(target, res); err != nil {
  6808. return nil, err
  6809. }
  6810. return ret, nil
  6811. // {
  6812. // "description": "List the jobs of a project in a given region.",
  6813. // "flatPath": "v1b3/projects/{projectId}/jobs",
  6814. // "httpMethod": "GET",
  6815. // "id": "dataflow.projects.jobs.list",
  6816. // "parameterOrder": [
  6817. // "projectId"
  6818. // ],
  6819. // "parameters": {
  6820. // "filter": {
  6821. // "description": "The kind of filter to use.",
  6822. // "enum": [
  6823. // "UNKNOWN",
  6824. // "ALL",
  6825. // "TERMINATED",
  6826. // "ACTIVE"
  6827. // ],
  6828. // "location": "query",
  6829. // "type": "string"
  6830. // },
  6831. // "location": {
  6832. // "description": "The location that contains this job.",
  6833. // "location": "query",
  6834. // "type": "string"
  6835. // },
  6836. // "pageSize": {
  6837. // "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.",
  6838. // "format": "int32",
  6839. // "location": "query",
  6840. // "type": "integer"
  6841. // },
  6842. // "pageToken": {
  6843. // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.",
  6844. // "location": "query",
  6845. // "type": "string"
  6846. // },
  6847. // "projectId": {
  6848. // "description": "The project which owns the jobs.",
  6849. // "location": "path",
  6850. // "required": true,
  6851. // "type": "string"
  6852. // },
  6853. // "view": {
  6854. // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.",
  6855. // "enum": [
  6856. // "JOB_VIEW_UNKNOWN",
  6857. // "JOB_VIEW_SUMMARY",
  6858. // "JOB_VIEW_ALL",
  6859. // "JOB_VIEW_DESCRIPTION"
  6860. // ],
  6861. // "location": "query",
  6862. // "type": "string"
  6863. // }
  6864. // },
  6865. // "path": "v1b3/projects/{projectId}/jobs",
  6866. // "response": {
  6867. // "$ref": "ListJobsResponse"
  6868. // },
  6869. // "scopes": [
  6870. // "https://www.googleapis.com/auth/cloud-platform",
  6871. // "https://www.googleapis.com/auth/compute",
  6872. // "https://www.googleapis.com/auth/compute.readonly",
  6873. // "https://www.googleapis.com/auth/userinfo.email"
  6874. // ]
  6875. // }
  6876. }
  6877. // Pages invokes f for each page of results.
  6878. // A non-nil error returned from f will halt the iteration.
  6879. // The provided context supersedes any context provided to the Context method.
  6880. func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  6881. c.ctx_ = ctx
  6882. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6883. for {
  6884. x, err := c.Do()
  6885. if err != nil {
  6886. return err
  6887. }
  6888. if err := f(x); err != nil {
  6889. return err
  6890. }
  6891. if x.NextPageToken == "" {
  6892. return nil
  6893. }
  6894. c.PageToken(x.NextPageToken)
  6895. }
  6896. }
  6897. // method id "dataflow.projects.jobs.update":
  6898. type ProjectsJobsUpdateCall struct {
  6899. s *Service
  6900. projectId string
  6901. jobId string
  6902. job *Job
  6903. urlParams_ gensupport.URLParams
  6904. ctx_ context.Context
  6905. header_ http.Header
  6906. }
  6907. // Update: Updates the state of an existing Cloud Dataflow job.
  6908. func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) *ProjectsJobsUpdateCall {
  6909. c := &ProjectsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6910. c.projectId = projectId
  6911. c.jobId = jobId
  6912. c.job = job
  6913. return c
  6914. }
  6915. // Location sets the optional parameter "location": The location that
  6916. // contains this job.
  6917. func (c *ProjectsJobsUpdateCall) Location(location string) *ProjectsJobsUpdateCall {
  6918. c.urlParams_.Set("location", location)
  6919. return c
  6920. }
  6921. // Fields allows partial responses to be retrieved. See
  6922. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6923. // for more information.
  6924. func (c *ProjectsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsJobsUpdateCall {
  6925. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6926. return c
  6927. }
  6928. // Context sets the context to be used in this call's Do method. Any
  6929. // pending HTTP request will be aborted if the provided context is
  6930. // canceled.
  6931. func (c *ProjectsJobsUpdateCall) Context(ctx context.Context) *ProjectsJobsUpdateCall {
  6932. c.ctx_ = ctx
  6933. return c
  6934. }
  6935. // Header returns an http.Header that can be modified by the caller to
  6936. // add HTTP headers to the request.
  6937. func (c *ProjectsJobsUpdateCall) Header() http.Header {
  6938. if c.header_ == nil {
  6939. c.header_ = make(http.Header)
  6940. }
  6941. return c.header_
  6942. }
  6943. func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) {
  6944. reqHeaders := make(http.Header)
  6945. for k, v := range c.header_ {
  6946. reqHeaders[k] = v
  6947. }
  6948. reqHeaders.Set("User-Agent", c.s.userAgent())
  6949. var body io.Reader = nil
  6950. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  6951. if err != nil {
  6952. return nil, err
  6953. }
  6954. reqHeaders.Set("Content-Type", "application/json")
  6955. c.urlParams_.Set("alt", alt)
  6956. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}")
  6957. urls += "?" + c.urlParams_.Encode()
  6958. req, _ := http.NewRequest("PUT", urls, body)
  6959. req.Header = reqHeaders
  6960. googleapi.Expand(req.URL, map[string]string{
  6961. "projectId": c.projectId,
  6962. "jobId": c.jobId,
  6963. })
  6964. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6965. }
  6966. // Do executes the "dataflow.projects.jobs.update" call.
  6967. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  6968. // is an error. Response headers are in either
  6969. // *Job.ServerResponse.Header or (if a response was returned at all) in
  6970. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6971. // whether the returned error was because http.StatusNotModified was
  6972. // returned.
  6973. func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  6974. gensupport.SetOptions(c.urlParams_, opts...)
  6975. res, err := c.doRequest("json")
  6976. if res != nil && res.StatusCode == http.StatusNotModified {
  6977. if res.Body != nil {
  6978. res.Body.Close()
  6979. }
  6980. return nil, &googleapi.Error{
  6981. Code: res.StatusCode,
  6982. Header: res.Header,
  6983. }
  6984. }
  6985. if err != nil {
  6986. return nil, err
  6987. }
  6988. defer googleapi.CloseBody(res)
  6989. if err := googleapi.CheckResponse(res); err != nil {
  6990. return nil, err
  6991. }
  6992. ret := &Job{
  6993. ServerResponse: googleapi.ServerResponse{
  6994. Header: res.Header,
  6995. HTTPStatusCode: res.StatusCode,
  6996. },
  6997. }
  6998. target := &ret
  6999. if err := gensupport.DecodeResponse(target, res); err != nil {
  7000. return nil, err
  7001. }
  7002. return ret, nil
  7003. // {
  7004. // "description": "Updates the state of an existing Cloud Dataflow job.",
  7005. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}",
  7006. // "httpMethod": "PUT",
  7007. // "id": "dataflow.projects.jobs.update",
  7008. // "parameterOrder": [
  7009. // "projectId",
  7010. // "jobId"
  7011. // ],
  7012. // "parameters": {
  7013. // "jobId": {
  7014. // "description": "The job ID.",
  7015. // "location": "path",
  7016. // "required": true,
  7017. // "type": "string"
  7018. // },
  7019. // "location": {
  7020. // "description": "The location that contains this job.",
  7021. // "location": "query",
  7022. // "type": "string"
  7023. // },
  7024. // "projectId": {
  7025. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  7026. // "location": "path",
  7027. // "required": true,
  7028. // "type": "string"
  7029. // }
  7030. // },
  7031. // "path": "v1b3/projects/{projectId}/jobs/{jobId}",
  7032. // "request": {
  7033. // "$ref": "Job"
  7034. // },
  7035. // "response": {
  7036. // "$ref": "Job"
  7037. // },
  7038. // "scopes": [
  7039. // "https://www.googleapis.com/auth/cloud-platform",
  7040. // "https://www.googleapis.com/auth/compute",
  7041. // "https://www.googleapis.com/auth/compute.readonly",
  7042. // "https://www.googleapis.com/auth/userinfo.email"
  7043. // ]
  7044. // }
  7045. }
  7046. // method id "dataflow.projects.jobs.debug.getConfig":
  7047. type ProjectsJobsDebugGetConfigCall struct {
  7048. s *Service
  7049. projectId string
  7050. jobId string
  7051. getdebugconfigrequest *GetDebugConfigRequest
  7052. urlParams_ gensupport.URLParams
  7053. ctx_ context.Context
  7054. header_ http.Header
  7055. }
  7056. // GetConfig: Get encoded debug configuration for component. Not
  7057. // cacheable.
  7058. func (r *ProjectsJobsDebugService) GetConfig(projectId string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsJobsDebugGetConfigCall {
  7059. c := &ProjectsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7060. c.projectId = projectId
  7061. c.jobId = jobId
  7062. c.getdebugconfigrequest = getdebugconfigrequest
  7063. return c
  7064. }
  7065. // Fields allows partial responses to be retrieved. See
  7066. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7067. // for more information.
  7068. func (c *ProjectsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugGetConfigCall {
  7069. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7070. return c
  7071. }
  7072. // Context sets the context to be used in this call's Do method. Any
  7073. // pending HTTP request will be aborted if the provided context is
  7074. // canceled.
  7075. func (c *ProjectsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsJobsDebugGetConfigCall {
  7076. c.ctx_ = ctx
  7077. return c
  7078. }
  7079. // Header returns an http.Header that can be modified by the caller to
  7080. // add HTTP headers to the request.
  7081. func (c *ProjectsJobsDebugGetConfigCall) Header() http.Header {
  7082. if c.header_ == nil {
  7083. c.header_ = make(http.Header)
  7084. }
  7085. return c.header_
  7086. }
  7087. func (c *ProjectsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) {
  7088. reqHeaders := make(http.Header)
  7089. for k, v := range c.header_ {
  7090. reqHeaders[k] = v
  7091. }
  7092. reqHeaders.Set("User-Agent", c.s.userAgent())
  7093. var body io.Reader = nil
  7094. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest)
  7095. if err != nil {
  7096. return nil, err
  7097. }
  7098. reqHeaders.Set("Content-Type", "application/json")
  7099. c.urlParams_.Set("alt", alt)
  7100. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig")
  7101. urls += "?" + c.urlParams_.Encode()
  7102. req, _ := http.NewRequest("POST", urls, body)
  7103. req.Header = reqHeaders
  7104. googleapi.Expand(req.URL, map[string]string{
  7105. "projectId": c.projectId,
  7106. "jobId": c.jobId,
  7107. })
  7108. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7109. }
  7110. // Do executes the "dataflow.projects.jobs.debug.getConfig" call.
  7111. // Exactly one of *GetDebugConfigResponse or error will be non-nil. Any
  7112. // non-2xx status code is an error. Response headers are in either
  7113. // *GetDebugConfigResponse.ServerResponse.Header or (if a response was
  7114. // returned at all) in error.(*googleapi.Error).Header. Use
  7115. // googleapi.IsNotModified to check whether the returned error was
  7116. // because http.StatusNotModified was returned.
  7117. func (c *ProjectsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) {
  7118. gensupport.SetOptions(c.urlParams_, opts...)
  7119. res, err := c.doRequest("json")
  7120. if res != nil && res.StatusCode == http.StatusNotModified {
  7121. if res.Body != nil {
  7122. res.Body.Close()
  7123. }
  7124. return nil, &googleapi.Error{
  7125. Code: res.StatusCode,
  7126. Header: res.Header,
  7127. }
  7128. }
  7129. if err != nil {
  7130. return nil, err
  7131. }
  7132. defer googleapi.CloseBody(res)
  7133. if err := googleapi.CheckResponse(res); err != nil {
  7134. return nil, err
  7135. }
  7136. ret := &GetDebugConfigResponse{
  7137. ServerResponse: googleapi.ServerResponse{
  7138. Header: res.Header,
  7139. HTTPStatusCode: res.StatusCode,
  7140. },
  7141. }
  7142. target := &ret
  7143. if err := gensupport.DecodeResponse(target, res); err != nil {
  7144. return nil, err
  7145. }
  7146. return ret, nil
  7147. // {
  7148. // "description": "Get encoded debug configuration for component. Not cacheable.",
  7149. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig",
  7150. // "httpMethod": "POST",
  7151. // "id": "dataflow.projects.jobs.debug.getConfig",
  7152. // "parameterOrder": [
  7153. // "projectId",
  7154. // "jobId"
  7155. // ],
  7156. // "parameters": {
  7157. // "jobId": {
  7158. // "description": "The job id.",
  7159. // "location": "path",
  7160. // "required": true,
  7161. // "type": "string"
  7162. // },
  7163. // "projectId": {
  7164. // "description": "The project id.",
  7165. // "location": "path",
  7166. // "required": true,
  7167. // "type": "string"
  7168. // }
  7169. // },
  7170. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig",
  7171. // "request": {
  7172. // "$ref": "GetDebugConfigRequest"
  7173. // },
  7174. // "response": {
  7175. // "$ref": "GetDebugConfigResponse"
  7176. // },
  7177. // "scopes": [
  7178. // "https://www.googleapis.com/auth/cloud-platform",
  7179. // "https://www.googleapis.com/auth/compute",
  7180. // "https://www.googleapis.com/auth/compute.readonly",
  7181. // "https://www.googleapis.com/auth/userinfo.email"
  7182. // ]
  7183. // }
  7184. }
  7185. // method id "dataflow.projects.jobs.debug.sendCapture":
  7186. type ProjectsJobsDebugSendCaptureCall struct {
  7187. s *Service
  7188. projectId string
  7189. jobId string
  7190. senddebugcapturerequest *SendDebugCaptureRequest
  7191. urlParams_ gensupport.URLParams
  7192. ctx_ context.Context
  7193. header_ http.Header
  7194. }
  7195. // SendCapture: Send encoded debug capture data for component.
  7196. func (r *ProjectsJobsDebugService) SendCapture(projectId string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsJobsDebugSendCaptureCall {
  7197. c := &ProjectsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7198. c.projectId = projectId
  7199. c.jobId = jobId
  7200. c.senddebugcapturerequest = senddebugcapturerequest
  7201. return c
  7202. }
  7203. // Fields allows partial responses to be retrieved. See
  7204. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7205. // for more information.
  7206. func (c *ProjectsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugSendCaptureCall {
  7207. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7208. return c
  7209. }
  7210. // Context sets the context to be used in this call's Do method. Any
  7211. // pending HTTP request will be aborted if the provided context is
  7212. // canceled.
  7213. func (c *ProjectsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsJobsDebugSendCaptureCall {
  7214. c.ctx_ = ctx
  7215. return c
  7216. }
  7217. // Header returns an http.Header that can be modified by the caller to
  7218. // add HTTP headers to the request.
  7219. func (c *ProjectsJobsDebugSendCaptureCall) Header() http.Header {
  7220. if c.header_ == nil {
  7221. c.header_ = make(http.Header)
  7222. }
  7223. return c.header_
  7224. }
  7225. func (c *ProjectsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) {
  7226. reqHeaders := make(http.Header)
  7227. for k, v := range c.header_ {
  7228. reqHeaders[k] = v
  7229. }
  7230. reqHeaders.Set("User-Agent", c.s.userAgent())
  7231. var body io.Reader = nil
  7232. body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest)
  7233. if err != nil {
  7234. return nil, err
  7235. }
  7236. reqHeaders.Set("Content-Type", "application/json")
  7237. c.urlParams_.Set("alt", alt)
  7238. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture")
  7239. urls += "?" + c.urlParams_.Encode()
  7240. req, _ := http.NewRequest("POST", urls, body)
  7241. req.Header = reqHeaders
  7242. googleapi.Expand(req.URL, map[string]string{
  7243. "projectId": c.projectId,
  7244. "jobId": c.jobId,
  7245. })
  7246. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7247. }
  7248. // Do executes the "dataflow.projects.jobs.debug.sendCapture" call.
  7249. // Exactly one of *SendDebugCaptureResponse or error will be non-nil.
  7250. // Any non-2xx status code is an error. Response headers are in either
  7251. // *SendDebugCaptureResponse.ServerResponse.Header or (if a response was
  7252. // returned at all) in error.(*googleapi.Error).Header. Use
  7253. // googleapi.IsNotModified to check whether the returned error was
  7254. // because http.StatusNotModified was returned.
  7255. func (c *ProjectsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) {
  7256. gensupport.SetOptions(c.urlParams_, opts...)
  7257. res, err := c.doRequest("json")
  7258. if res != nil && res.StatusCode == http.StatusNotModified {
  7259. if res.Body != nil {
  7260. res.Body.Close()
  7261. }
  7262. return nil, &googleapi.Error{
  7263. Code: res.StatusCode,
  7264. Header: res.Header,
  7265. }
  7266. }
  7267. if err != nil {
  7268. return nil, err
  7269. }
  7270. defer googleapi.CloseBody(res)
  7271. if err := googleapi.CheckResponse(res); err != nil {
  7272. return nil, err
  7273. }
  7274. ret := &SendDebugCaptureResponse{
  7275. ServerResponse: googleapi.ServerResponse{
  7276. Header: res.Header,
  7277. HTTPStatusCode: res.StatusCode,
  7278. },
  7279. }
  7280. target := &ret
  7281. if err := gensupport.DecodeResponse(target, res); err != nil {
  7282. return nil, err
  7283. }
  7284. return ret, nil
  7285. // {
  7286. // "description": "Send encoded debug capture data for component.",
  7287. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture",
  7288. // "httpMethod": "POST",
  7289. // "id": "dataflow.projects.jobs.debug.sendCapture",
  7290. // "parameterOrder": [
  7291. // "projectId",
  7292. // "jobId"
  7293. // ],
  7294. // "parameters": {
  7295. // "jobId": {
  7296. // "description": "The job id.",
  7297. // "location": "path",
  7298. // "required": true,
  7299. // "type": "string"
  7300. // },
  7301. // "projectId": {
  7302. // "description": "The project id.",
  7303. // "location": "path",
  7304. // "required": true,
  7305. // "type": "string"
  7306. // }
  7307. // },
  7308. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture",
  7309. // "request": {
  7310. // "$ref": "SendDebugCaptureRequest"
  7311. // },
  7312. // "response": {
  7313. // "$ref": "SendDebugCaptureResponse"
  7314. // },
  7315. // "scopes": [
  7316. // "https://www.googleapis.com/auth/cloud-platform",
  7317. // "https://www.googleapis.com/auth/compute",
  7318. // "https://www.googleapis.com/auth/compute.readonly",
  7319. // "https://www.googleapis.com/auth/userinfo.email"
  7320. // ]
  7321. // }
  7322. }
  7323. // method id "dataflow.projects.jobs.messages.list":
  7324. type ProjectsJobsMessagesListCall struct {
  7325. s *Service
  7326. projectId string
  7327. jobId string
  7328. urlParams_ gensupport.URLParams
  7329. ifNoneMatch_ string
  7330. ctx_ context.Context
  7331. header_ http.Header
  7332. }
  7333. // List: Request the job status.
  7334. func (r *ProjectsJobsMessagesService) List(projectId string, jobId string) *ProjectsJobsMessagesListCall {
  7335. c := &ProjectsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7336. c.projectId = projectId
  7337. c.jobId = jobId
  7338. return c
  7339. }
  7340. // EndTime sets the optional parameter "endTime": Return only messages
  7341. // with timestamps < end_time. The default is now
  7342. // (i.e. return up to the latest messages available).
  7343. func (c *ProjectsJobsMessagesListCall) EndTime(endTime string) *ProjectsJobsMessagesListCall {
  7344. c.urlParams_.Set("endTime", endTime)
  7345. return c
  7346. }
  7347. // Location sets the optional parameter "location": The location which
  7348. // contains the job specified by job_id.
  7349. func (c *ProjectsJobsMessagesListCall) Location(location string) *ProjectsJobsMessagesListCall {
  7350. c.urlParams_.Set("location", location)
  7351. return c
  7352. }
  7353. // MinimumImportance sets the optional parameter "minimumImportance":
  7354. // Filter to only get messages with importance >= level
  7355. //
  7356. // Possible values:
  7357. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN"
  7358. // "JOB_MESSAGE_DEBUG"
  7359. // "JOB_MESSAGE_DETAILED"
  7360. // "JOB_MESSAGE_BASIC"
  7361. // "JOB_MESSAGE_WARNING"
  7362. // "JOB_MESSAGE_ERROR"
  7363. func (c *ProjectsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsJobsMessagesListCall {
  7364. c.urlParams_.Set("minimumImportance", minimumImportance)
  7365. return c
  7366. }
  7367. // PageSize sets the optional parameter "pageSize": If specified,
  7368. // determines the maximum number of messages to
  7369. // return. If unspecified, the service may choose an
  7370. // appropriate
  7371. // default, or may return an arbitrarily large number of results.
  7372. func (c *ProjectsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsJobsMessagesListCall {
  7373. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7374. return c
  7375. }
  7376. // PageToken sets the optional parameter "pageToken": If supplied, this
  7377. // should be the value of next_page_token returned
  7378. // by an earlier call. This will cause the next page of results to
  7379. // be returned.
  7380. func (c *ProjectsJobsMessagesListCall) PageToken(pageToken string) *ProjectsJobsMessagesListCall {
  7381. c.urlParams_.Set("pageToken", pageToken)
  7382. return c
  7383. }
  7384. // StartTime sets the optional parameter "startTime": If specified,
  7385. // return only messages with timestamps >= start_time.
  7386. // The default is the job creation time (i.e. beginning of messages).
  7387. func (c *ProjectsJobsMessagesListCall) StartTime(startTime string) *ProjectsJobsMessagesListCall {
  7388. c.urlParams_.Set("startTime", startTime)
  7389. return c
  7390. }
  7391. // Fields allows partial responses to be retrieved. See
  7392. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7393. // for more information.
  7394. func (c *ProjectsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsJobsMessagesListCall {
  7395. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7396. return c
  7397. }
  7398. // IfNoneMatch sets the optional parameter which makes the operation
  7399. // fail if the object's ETag matches the given value. This is useful for
  7400. // getting updates only after the object has changed since the last
  7401. // request. Use googleapi.IsNotModified to check whether the response
  7402. // error from Do is the result of In-None-Match.
  7403. func (c *ProjectsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsJobsMessagesListCall {
  7404. c.ifNoneMatch_ = entityTag
  7405. return c
  7406. }
  7407. // Context sets the context to be used in this call's Do method. Any
  7408. // pending HTTP request will be aborted if the provided context is
  7409. // canceled.
  7410. func (c *ProjectsJobsMessagesListCall) Context(ctx context.Context) *ProjectsJobsMessagesListCall {
  7411. c.ctx_ = ctx
  7412. return c
  7413. }
  7414. // Header returns an http.Header that can be modified by the caller to
  7415. // add HTTP headers to the request.
  7416. func (c *ProjectsJobsMessagesListCall) Header() http.Header {
  7417. if c.header_ == nil {
  7418. c.header_ = make(http.Header)
  7419. }
  7420. return c.header_
  7421. }
  7422. func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) {
  7423. reqHeaders := make(http.Header)
  7424. for k, v := range c.header_ {
  7425. reqHeaders[k] = v
  7426. }
  7427. reqHeaders.Set("User-Agent", c.s.userAgent())
  7428. if c.ifNoneMatch_ != "" {
  7429. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7430. }
  7431. var body io.Reader = nil
  7432. c.urlParams_.Set("alt", alt)
  7433. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/messages")
  7434. urls += "?" + c.urlParams_.Encode()
  7435. req, _ := http.NewRequest("GET", urls, body)
  7436. req.Header = reqHeaders
  7437. googleapi.Expand(req.URL, map[string]string{
  7438. "projectId": c.projectId,
  7439. "jobId": c.jobId,
  7440. })
  7441. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7442. }
  7443. // Do executes the "dataflow.projects.jobs.messages.list" call.
  7444. // Exactly one of *ListJobMessagesResponse or error will be non-nil. Any
  7445. // non-2xx status code is an error. Response headers are in either
  7446. // *ListJobMessagesResponse.ServerResponse.Header or (if a response was
  7447. // returned at all) in error.(*googleapi.Error).Header. Use
  7448. // googleapi.IsNotModified to check whether the returned error was
  7449. // because http.StatusNotModified was returned.
  7450. func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) {
  7451. gensupport.SetOptions(c.urlParams_, opts...)
  7452. res, err := c.doRequest("json")
  7453. if res != nil && res.StatusCode == http.StatusNotModified {
  7454. if res.Body != nil {
  7455. res.Body.Close()
  7456. }
  7457. return nil, &googleapi.Error{
  7458. Code: res.StatusCode,
  7459. Header: res.Header,
  7460. }
  7461. }
  7462. if err != nil {
  7463. return nil, err
  7464. }
  7465. defer googleapi.CloseBody(res)
  7466. if err := googleapi.CheckResponse(res); err != nil {
  7467. return nil, err
  7468. }
  7469. ret := &ListJobMessagesResponse{
  7470. ServerResponse: googleapi.ServerResponse{
  7471. Header: res.Header,
  7472. HTTPStatusCode: res.StatusCode,
  7473. },
  7474. }
  7475. target := &ret
  7476. if err := gensupport.DecodeResponse(target, res); err != nil {
  7477. return nil, err
  7478. }
  7479. return ret, nil
  7480. // {
  7481. // "description": "Request the job status.",
  7482. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages",
  7483. // "httpMethod": "GET",
  7484. // "id": "dataflow.projects.jobs.messages.list",
  7485. // "parameterOrder": [
  7486. // "projectId",
  7487. // "jobId"
  7488. // ],
  7489. // "parameters": {
  7490. // "endTime": {
  7491. // "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).",
  7492. // "format": "google-datetime",
  7493. // "location": "query",
  7494. // "type": "string"
  7495. // },
  7496. // "jobId": {
  7497. // "description": "The job to get messages about.",
  7498. // "location": "path",
  7499. // "required": true,
  7500. // "type": "string"
  7501. // },
  7502. // "location": {
  7503. // "description": "The location which contains the job specified by job_id.",
  7504. // "location": "query",
  7505. // "type": "string"
  7506. // },
  7507. // "minimumImportance": {
  7508. // "description": "Filter to only get messages with importance \u003e= level",
  7509. // "enum": [
  7510. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN",
  7511. // "JOB_MESSAGE_DEBUG",
  7512. // "JOB_MESSAGE_DETAILED",
  7513. // "JOB_MESSAGE_BASIC",
  7514. // "JOB_MESSAGE_WARNING",
  7515. // "JOB_MESSAGE_ERROR"
  7516. // ],
  7517. // "location": "query",
  7518. // "type": "string"
  7519. // },
  7520. // "pageSize": {
  7521. // "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.",
  7522. // "format": "int32",
  7523. // "location": "query",
  7524. // "type": "integer"
  7525. // },
  7526. // "pageToken": {
  7527. // "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.",
  7528. // "location": "query",
  7529. // "type": "string"
  7530. // },
  7531. // "projectId": {
  7532. // "description": "A project id.",
  7533. // "location": "path",
  7534. // "required": true,
  7535. // "type": "string"
  7536. // },
  7537. // "startTime": {
  7538. // "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).",
  7539. // "format": "google-datetime",
  7540. // "location": "query",
  7541. // "type": "string"
  7542. // }
  7543. // },
  7544. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages",
  7545. // "response": {
  7546. // "$ref": "ListJobMessagesResponse"
  7547. // },
  7548. // "scopes": [
  7549. // "https://www.googleapis.com/auth/cloud-platform",
  7550. // "https://www.googleapis.com/auth/compute",
  7551. // "https://www.googleapis.com/auth/compute.readonly",
  7552. // "https://www.googleapis.com/auth/userinfo.email"
  7553. // ]
  7554. // }
  7555. }
  7556. // Pages invokes f for each page of results.
  7557. // A non-nil error returned from f will halt the iteration.
  7558. // The provided context supersedes any context provided to the Context method.
  7559. func (c *ProjectsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error {
  7560. c.ctx_ = ctx
  7561. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7562. for {
  7563. x, err := c.Do()
  7564. if err != nil {
  7565. return err
  7566. }
  7567. if err := f(x); err != nil {
  7568. return err
  7569. }
  7570. if x.NextPageToken == "" {
  7571. return nil
  7572. }
  7573. c.PageToken(x.NextPageToken)
  7574. }
  7575. }
  7576. // method id "dataflow.projects.jobs.workItems.lease":
  7577. type ProjectsJobsWorkItemsLeaseCall struct {
  7578. s *Service
  7579. projectId string
  7580. jobId string
  7581. leaseworkitemrequest *LeaseWorkItemRequest
  7582. urlParams_ gensupport.URLParams
  7583. ctx_ context.Context
  7584. header_ http.Header
  7585. }
  7586. // Lease: Leases a dataflow WorkItem to run.
  7587. func (r *ProjectsJobsWorkItemsService) Lease(projectId string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsJobsWorkItemsLeaseCall {
  7588. c := &ProjectsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7589. c.projectId = projectId
  7590. c.jobId = jobId
  7591. c.leaseworkitemrequest = leaseworkitemrequest
  7592. return c
  7593. }
  7594. // Fields allows partial responses to be retrieved. See
  7595. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7596. // for more information.
  7597. func (c *ProjectsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsLeaseCall {
  7598. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7599. return c
  7600. }
  7601. // Context sets the context to be used in this call's Do method. Any
  7602. // pending HTTP request will be aborted if the provided context is
  7603. // canceled.
  7604. func (c *ProjectsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsJobsWorkItemsLeaseCall {
  7605. c.ctx_ = ctx
  7606. return c
  7607. }
  7608. // Header returns an http.Header that can be modified by the caller to
  7609. // add HTTP headers to the request.
  7610. func (c *ProjectsJobsWorkItemsLeaseCall) Header() http.Header {
  7611. if c.header_ == nil {
  7612. c.header_ = make(http.Header)
  7613. }
  7614. return c.header_
  7615. }
  7616. func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) {
  7617. reqHeaders := make(http.Header)
  7618. for k, v := range c.header_ {
  7619. reqHeaders[k] = v
  7620. }
  7621. reqHeaders.Set("User-Agent", c.s.userAgent())
  7622. var body io.Reader = nil
  7623. body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest)
  7624. if err != nil {
  7625. return nil, err
  7626. }
  7627. reqHeaders.Set("Content-Type", "application/json")
  7628. c.urlParams_.Set("alt", alt)
  7629. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease")
  7630. urls += "?" + c.urlParams_.Encode()
  7631. req, _ := http.NewRequest("POST", urls, body)
  7632. req.Header = reqHeaders
  7633. googleapi.Expand(req.URL, map[string]string{
  7634. "projectId": c.projectId,
  7635. "jobId": c.jobId,
  7636. })
  7637. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7638. }
  7639. // Do executes the "dataflow.projects.jobs.workItems.lease" call.
  7640. // Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any
  7641. // non-2xx status code is an error. Response headers are in either
  7642. // *LeaseWorkItemResponse.ServerResponse.Header or (if a response was
  7643. // returned at all) in error.(*googleapi.Error).Header. Use
  7644. // googleapi.IsNotModified to check whether the returned error was
  7645. // because http.StatusNotModified was returned.
  7646. func (c *ProjectsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) {
  7647. gensupport.SetOptions(c.urlParams_, opts...)
  7648. res, err := c.doRequest("json")
  7649. if res != nil && res.StatusCode == http.StatusNotModified {
  7650. if res.Body != nil {
  7651. res.Body.Close()
  7652. }
  7653. return nil, &googleapi.Error{
  7654. Code: res.StatusCode,
  7655. Header: res.Header,
  7656. }
  7657. }
  7658. if err != nil {
  7659. return nil, err
  7660. }
  7661. defer googleapi.CloseBody(res)
  7662. if err := googleapi.CheckResponse(res); err != nil {
  7663. return nil, err
  7664. }
  7665. ret := &LeaseWorkItemResponse{
  7666. ServerResponse: googleapi.ServerResponse{
  7667. Header: res.Header,
  7668. HTTPStatusCode: res.StatusCode,
  7669. },
  7670. }
  7671. target := &ret
  7672. if err := gensupport.DecodeResponse(target, res); err != nil {
  7673. return nil, err
  7674. }
  7675. return ret, nil
  7676. // {
  7677. // "description": "Leases a dataflow WorkItem to run.",
  7678. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease",
  7679. // "httpMethod": "POST",
  7680. // "id": "dataflow.projects.jobs.workItems.lease",
  7681. // "parameterOrder": [
  7682. // "projectId",
  7683. // "jobId"
  7684. // ],
  7685. // "parameters": {
  7686. // "jobId": {
  7687. // "description": "Identifies the workflow job this worker belongs to.",
  7688. // "location": "path",
  7689. // "required": true,
  7690. // "type": "string"
  7691. // },
  7692. // "projectId": {
  7693. // "description": "Identifies the project this worker belongs to.",
  7694. // "location": "path",
  7695. // "required": true,
  7696. // "type": "string"
  7697. // }
  7698. // },
  7699. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease",
  7700. // "request": {
  7701. // "$ref": "LeaseWorkItemRequest"
  7702. // },
  7703. // "response": {
  7704. // "$ref": "LeaseWorkItemResponse"
  7705. // },
  7706. // "scopes": [
  7707. // "https://www.googleapis.com/auth/cloud-platform",
  7708. // "https://www.googleapis.com/auth/compute",
  7709. // "https://www.googleapis.com/auth/compute.readonly",
  7710. // "https://www.googleapis.com/auth/userinfo.email"
  7711. // ]
  7712. // }
  7713. }
  7714. // method id "dataflow.projects.jobs.workItems.reportStatus":
  7715. type ProjectsJobsWorkItemsReportStatusCall struct {
  7716. s *Service
  7717. projectId string
  7718. jobId string
  7719. reportworkitemstatusrequest *ReportWorkItemStatusRequest
  7720. urlParams_ gensupport.URLParams
  7721. ctx_ context.Context
  7722. header_ http.Header
  7723. }
  7724. // ReportStatus: Reports the status of dataflow WorkItems leased by a
  7725. // worker.
  7726. func (r *ProjectsJobsWorkItemsService) ReportStatus(projectId string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsJobsWorkItemsReportStatusCall {
  7727. c := &ProjectsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7728. c.projectId = projectId
  7729. c.jobId = jobId
  7730. c.reportworkitemstatusrequest = reportworkitemstatusrequest
  7731. return c
  7732. }
  7733. // Fields allows partial responses to be retrieved. See
  7734. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7735. // for more information.
  7736. func (c *ProjectsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsReportStatusCall {
  7737. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7738. return c
  7739. }
  7740. // Context sets the context to be used in this call's Do method. Any
  7741. // pending HTTP request will be aborted if the provided context is
  7742. // canceled.
  7743. func (c *ProjectsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsJobsWorkItemsReportStatusCall {
  7744. c.ctx_ = ctx
  7745. return c
  7746. }
  7747. // Header returns an http.Header that can be modified by the caller to
  7748. // add HTTP headers to the request.
  7749. func (c *ProjectsJobsWorkItemsReportStatusCall) Header() http.Header {
  7750. if c.header_ == nil {
  7751. c.header_ = make(http.Header)
  7752. }
  7753. return c.header_
  7754. }
  7755. func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) {
  7756. reqHeaders := make(http.Header)
  7757. for k, v := range c.header_ {
  7758. reqHeaders[k] = v
  7759. }
  7760. reqHeaders.Set("User-Agent", c.s.userAgent())
  7761. var body io.Reader = nil
  7762. body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest)
  7763. if err != nil {
  7764. return nil, err
  7765. }
  7766. reqHeaders.Set("Content-Type", "application/json")
  7767. c.urlParams_.Set("alt", alt)
  7768. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus")
  7769. urls += "?" + c.urlParams_.Encode()
  7770. req, _ := http.NewRequest("POST", urls, body)
  7771. req.Header = reqHeaders
  7772. googleapi.Expand(req.URL, map[string]string{
  7773. "projectId": c.projectId,
  7774. "jobId": c.jobId,
  7775. })
  7776. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7777. }
  7778. // Do executes the "dataflow.projects.jobs.workItems.reportStatus" call.
  7779. // Exactly one of *ReportWorkItemStatusResponse or error will be
  7780. // non-nil. Any non-2xx status code is an error. Response headers are in
  7781. // either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a
  7782. // response was returned at all) in error.(*googleapi.Error).Header. Use
  7783. // googleapi.IsNotModified to check whether the returned error was
  7784. // because http.StatusNotModified was returned.
  7785. func (c *ProjectsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) {
  7786. gensupport.SetOptions(c.urlParams_, opts...)
  7787. res, err := c.doRequest("json")
  7788. if res != nil && res.StatusCode == http.StatusNotModified {
  7789. if res.Body != nil {
  7790. res.Body.Close()
  7791. }
  7792. return nil, &googleapi.Error{
  7793. Code: res.StatusCode,
  7794. Header: res.Header,
  7795. }
  7796. }
  7797. if err != nil {
  7798. return nil, err
  7799. }
  7800. defer googleapi.CloseBody(res)
  7801. if err := googleapi.CheckResponse(res); err != nil {
  7802. return nil, err
  7803. }
  7804. ret := &ReportWorkItemStatusResponse{
  7805. ServerResponse: googleapi.ServerResponse{
  7806. Header: res.Header,
  7807. HTTPStatusCode: res.StatusCode,
  7808. },
  7809. }
  7810. target := &ret
  7811. if err := gensupport.DecodeResponse(target, res); err != nil {
  7812. return nil, err
  7813. }
  7814. return ret, nil
  7815. // {
  7816. // "description": "Reports the status of dataflow WorkItems leased by a worker.",
  7817. // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus",
  7818. // "httpMethod": "POST",
  7819. // "id": "dataflow.projects.jobs.workItems.reportStatus",
  7820. // "parameterOrder": [
  7821. // "projectId",
  7822. // "jobId"
  7823. // ],
  7824. // "parameters": {
  7825. // "jobId": {
  7826. // "description": "The job which the WorkItem is part of.",
  7827. // "location": "path",
  7828. // "required": true,
  7829. // "type": "string"
  7830. // },
  7831. // "projectId": {
  7832. // "description": "The project which owns the WorkItem's job.",
  7833. // "location": "path",
  7834. // "required": true,
  7835. // "type": "string"
  7836. // }
  7837. // },
  7838. // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus",
  7839. // "request": {
  7840. // "$ref": "ReportWorkItemStatusRequest"
  7841. // },
  7842. // "response": {
  7843. // "$ref": "ReportWorkItemStatusResponse"
  7844. // },
  7845. // "scopes": [
  7846. // "https://www.googleapis.com/auth/cloud-platform",
  7847. // "https://www.googleapis.com/auth/compute",
  7848. // "https://www.googleapis.com/auth/compute.readonly",
  7849. // "https://www.googleapis.com/auth/userinfo.email"
  7850. // ]
  7851. // }
  7852. }
  7853. // method id "dataflow.projects.locations.workerMessages":
  7854. type ProjectsLocationsWorkerMessagesCall struct {
  7855. s *Service
  7856. projectId string
  7857. location string
  7858. sendworkermessagesrequest *SendWorkerMessagesRequest
  7859. urlParams_ gensupport.URLParams
  7860. ctx_ context.Context
  7861. header_ http.Header
  7862. }
  7863. // WorkerMessages: Send a worker_message to the service.
  7864. func (r *ProjectsLocationsService) WorkerMessages(projectId string, location string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsLocationsWorkerMessagesCall {
  7865. c := &ProjectsLocationsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7866. c.projectId = projectId
  7867. c.location = location
  7868. c.sendworkermessagesrequest = sendworkermessagesrequest
  7869. return c
  7870. }
  7871. // Fields allows partial responses to be retrieved. See
  7872. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7873. // for more information.
  7874. func (c *ProjectsLocationsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerMessagesCall {
  7875. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7876. return c
  7877. }
  7878. // Context sets the context to be used in this call's Do method. Any
  7879. // pending HTTP request will be aborted if the provided context is
  7880. // canceled.
  7881. func (c *ProjectsLocationsWorkerMessagesCall) Context(ctx context.Context) *ProjectsLocationsWorkerMessagesCall {
  7882. c.ctx_ = ctx
  7883. return c
  7884. }
  7885. // Header returns an http.Header that can be modified by the caller to
  7886. // add HTTP headers to the request.
  7887. func (c *ProjectsLocationsWorkerMessagesCall) Header() http.Header {
  7888. if c.header_ == nil {
  7889. c.header_ = make(http.Header)
  7890. }
  7891. return c.header_
  7892. }
  7893. func (c *ProjectsLocationsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) {
  7894. reqHeaders := make(http.Header)
  7895. for k, v := range c.header_ {
  7896. reqHeaders[k] = v
  7897. }
  7898. reqHeaders.Set("User-Agent", c.s.userAgent())
  7899. var body io.Reader = nil
  7900. body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest)
  7901. if err != nil {
  7902. return nil, err
  7903. }
  7904. reqHeaders.Set("Content-Type", "application/json")
  7905. c.urlParams_.Set("alt", alt)
  7906. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/WorkerMessages")
  7907. urls += "?" + c.urlParams_.Encode()
  7908. req, _ := http.NewRequest("POST", urls, body)
  7909. req.Header = reqHeaders
  7910. googleapi.Expand(req.URL, map[string]string{
  7911. "projectId": c.projectId,
  7912. "location": c.location,
  7913. })
  7914. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7915. }
  7916. // Do executes the "dataflow.projects.locations.workerMessages" call.
  7917. // Exactly one of *SendWorkerMessagesResponse or error will be non-nil.
  7918. // Any non-2xx status code is an error. Response headers are in either
  7919. // *SendWorkerMessagesResponse.ServerResponse.Header or (if a response
  7920. // was returned at all) in error.(*googleapi.Error).Header. Use
  7921. // googleapi.IsNotModified to check whether the returned error was
  7922. // because http.StatusNotModified was returned.
  7923. func (c *ProjectsLocationsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) {
  7924. gensupport.SetOptions(c.urlParams_, opts...)
  7925. res, err := c.doRequest("json")
  7926. if res != nil && res.StatusCode == http.StatusNotModified {
  7927. if res.Body != nil {
  7928. res.Body.Close()
  7929. }
  7930. return nil, &googleapi.Error{
  7931. Code: res.StatusCode,
  7932. Header: res.Header,
  7933. }
  7934. }
  7935. if err != nil {
  7936. return nil, err
  7937. }
  7938. defer googleapi.CloseBody(res)
  7939. if err := googleapi.CheckResponse(res); err != nil {
  7940. return nil, err
  7941. }
  7942. ret := &SendWorkerMessagesResponse{
  7943. ServerResponse: googleapi.ServerResponse{
  7944. Header: res.Header,
  7945. HTTPStatusCode: res.StatusCode,
  7946. },
  7947. }
  7948. target := &ret
  7949. if err := gensupport.DecodeResponse(target, res); err != nil {
  7950. return nil, err
  7951. }
  7952. return ret, nil
  7953. // {
  7954. // "description": "Send a worker_message to the service.",
  7955. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages",
  7956. // "httpMethod": "POST",
  7957. // "id": "dataflow.projects.locations.workerMessages",
  7958. // "parameterOrder": [
  7959. // "projectId",
  7960. // "location"
  7961. // ],
  7962. // "parameters": {
  7963. // "location": {
  7964. // "description": "The location which contains the job",
  7965. // "location": "path",
  7966. // "required": true,
  7967. // "type": "string"
  7968. // },
  7969. // "projectId": {
  7970. // "description": "The project to send the WorkerMessages to.",
  7971. // "location": "path",
  7972. // "required": true,
  7973. // "type": "string"
  7974. // }
  7975. // },
  7976. // "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages",
  7977. // "request": {
  7978. // "$ref": "SendWorkerMessagesRequest"
  7979. // },
  7980. // "response": {
  7981. // "$ref": "SendWorkerMessagesResponse"
  7982. // },
  7983. // "scopes": [
  7984. // "https://www.googleapis.com/auth/cloud-platform",
  7985. // "https://www.googleapis.com/auth/compute",
  7986. // "https://www.googleapis.com/auth/compute.readonly",
  7987. // "https://www.googleapis.com/auth/userinfo.email"
  7988. // ]
  7989. // }
  7990. }
  7991. // method id "dataflow.projects.locations.jobs.create":
  7992. type ProjectsLocationsJobsCreateCall struct {
  7993. s *Service
  7994. projectId string
  7995. location string
  7996. job *Job
  7997. urlParams_ gensupport.URLParams
  7998. ctx_ context.Context
  7999. header_ http.Header
  8000. }
  8001. // Create: Creates a Cloud Dataflow job.
  8002. func (r *ProjectsLocationsJobsService) Create(projectId string, location string, job *Job) *ProjectsLocationsJobsCreateCall {
  8003. c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8004. c.projectId = projectId
  8005. c.location = location
  8006. c.job = job
  8007. return c
  8008. }
  8009. // ReplaceJobId sets the optional parameter "replaceJobId": Deprecated.
  8010. // This field is now in the Job message.
  8011. func (c *ProjectsLocationsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsLocationsJobsCreateCall {
  8012. c.urlParams_.Set("replaceJobId", replaceJobId)
  8013. return c
  8014. }
  8015. // View sets the optional parameter "view": The level of information
  8016. // requested in response.
  8017. //
  8018. // Possible values:
  8019. // "JOB_VIEW_UNKNOWN"
  8020. // "JOB_VIEW_SUMMARY"
  8021. // "JOB_VIEW_ALL"
  8022. // "JOB_VIEW_DESCRIPTION"
  8023. func (c *ProjectsLocationsJobsCreateCall) View(view string) *ProjectsLocationsJobsCreateCall {
  8024. c.urlParams_.Set("view", view)
  8025. return c
  8026. }
  8027. // Fields allows partial responses to be retrieved. See
  8028. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8029. // for more information.
  8030. func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall {
  8031. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8032. return c
  8033. }
  8034. // Context sets the context to be used in this call's Do method. Any
  8035. // pending HTTP request will be aborted if the provided context is
  8036. // canceled.
  8037. func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall {
  8038. c.ctx_ = ctx
  8039. return c
  8040. }
  8041. // Header returns an http.Header that can be modified by the caller to
  8042. // add HTTP headers to the request.
  8043. func (c *ProjectsLocationsJobsCreateCall) Header() http.Header {
  8044. if c.header_ == nil {
  8045. c.header_ = make(http.Header)
  8046. }
  8047. return c.header_
  8048. }
  8049. func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  8050. reqHeaders := make(http.Header)
  8051. for k, v := range c.header_ {
  8052. reqHeaders[k] = v
  8053. }
  8054. reqHeaders.Set("User-Agent", c.s.userAgent())
  8055. var body io.Reader = nil
  8056. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  8057. if err != nil {
  8058. return nil, err
  8059. }
  8060. reqHeaders.Set("Content-Type", "application/json")
  8061. c.urlParams_.Set("alt", alt)
  8062. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs")
  8063. urls += "?" + c.urlParams_.Encode()
  8064. req, _ := http.NewRequest("POST", urls, body)
  8065. req.Header = reqHeaders
  8066. googleapi.Expand(req.URL, map[string]string{
  8067. "projectId": c.projectId,
  8068. "location": c.location,
  8069. })
  8070. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8071. }
  8072. // Do executes the "dataflow.projects.locations.jobs.create" call.
  8073. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  8074. // is an error. Response headers are in either
  8075. // *Job.ServerResponse.Header or (if a response was returned at all) in
  8076. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8077. // whether the returned error was because http.StatusNotModified was
  8078. // returned.
  8079. func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  8080. gensupport.SetOptions(c.urlParams_, opts...)
  8081. res, err := c.doRequest("json")
  8082. if res != nil && res.StatusCode == http.StatusNotModified {
  8083. if res.Body != nil {
  8084. res.Body.Close()
  8085. }
  8086. return nil, &googleapi.Error{
  8087. Code: res.StatusCode,
  8088. Header: res.Header,
  8089. }
  8090. }
  8091. if err != nil {
  8092. return nil, err
  8093. }
  8094. defer googleapi.CloseBody(res)
  8095. if err := googleapi.CheckResponse(res); err != nil {
  8096. return nil, err
  8097. }
  8098. ret := &Job{
  8099. ServerResponse: googleapi.ServerResponse{
  8100. Header: res.Header,
  8101. HTTPStatusCode: res.StatusCode,
  8102. },
  8103. }
  8104. target := &ret
  8105. if err := gensupport.DecodeResponse(target, res); err != nil {
  8106. return nil, err
  8107. }
  8108. return ret, nil
  8109. // {
  8110. // "description": "Creates a Cloud Dataflow job.",
  8111. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs",
  8112. // "httpMethod": "POST",
  8113. // "id": "dataflow.projects.locations.jobs.create",
  8114. // "parameterOrder": [
  8115. // "projectId",
  8116. // "location"
  8117. // ],
  8118. // "parameters": {
  8119. // "location": {
  8120. // "description": "The location that contains this job.",
  8121. // "location": "path",
  8122. // "required": true,
  8123. // "type": "string"
  8124. // },
  8125. // "projectId": {
  8126. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  8127. // "location": "path",
  8128. // "required": true,
  8129. // "type": "string"
  8130. // },
  8131. // "replaceJobId": {
  8132. // "description": "Deprecated. This field is now in the Job message.",
  8133. // "location": "query",
  8134. // "type": "string"
  8135. // },
  8136. // "view": {
  8137. // "description": "The level of information requested in response.",
  8138. // "enum": [
  8139. // "JOB_VIEW_UNKNOWN",
  8140. // "JOB_VIEW_SUMMARY",
  8141. // "JOB_VIEW_ALL",
  8142. // "JOB_VIEW_DESCRIPTION"
  8143. // ],
  8144. // "location": "query",
  8145. // "type": "string"
  8146. // }
  8147. // },
  8148. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs",
  8149. // "request": {
  8150. // "$ref": "Job"
  8151. // },
  8152. // "response": {
  8153. // "$ref": "Job"
  8154. // },
  8155. // "scopes": [
  8156. // "https://www.googleapis.com/auth/cloud-platform",
  8157. // "https://www.googleapis.com/auth/compute",
  8158. // "https://www.googleapis.com/auth/compute.readonly",
  8159. // "https://www.googleapis.com/auth/userinfo.email"
  8160. // ]
  8161. // }
  8162. }
  8163. // method id "dataflow.projects.locations.jobs.get":
  8164. type ProjectsLocationsJobsGetCall struct {
  8165. s *Service
  8166. projectId string
  8167. location string
  8168. jobId string
  8169. urlParams_ gensupport.URLParams
  8170. ifNoneMatch_ string
  8171. ctx_ context.Context
  8172. header_ http.Header
  8173. }
  8174. // Get: Gets the state of the specified Cloud Dataflow job.
  8175. func (r *ProjectsLocationsJobsService) Get(projectId string, location string, jobId string) *ProjectsLocationsJobsGetCall {
  8176. c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8177. c.projectId = projectId
  8178. c.location = location
  8179. c.jobId = jobId
  8180. return c
  8181. }
  8182. // View sets the optional parameter "view": The level of information
  8183. // requested in response.
  8184. //
  8185. // Possible values:
  8186. // "JOB_VIEW_UNKNOWN"
  8187. // "JOB_VIEW_SUMMARY"
  8188. // "JOB_VIEW_ALL"
  8189. // "JOB_VIEW_DESCRIPTION"
  8190. func (c *ProjectsLocationsJobsGetCall) View(view string) *ProjectsLocationsJobsGetCall {
  8191. c.urlParams_.Set("view", view)
  8192. return c
  8193. }
  8194. // Fields allows partial responses to be retrieved. See
  8195. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8196. // for more information.
  8197. func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall {
  8198. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8199. return c
  8200. }
  8201. // IfNoneMatch sets the optional parameter which makes the operation
  8202. // fail if the object's ETag matches the given value. This is useful for
  8203. // getting updates only after the object has changed since the last
  8204. // request. Use googleapi.IsNotModified to check whether the response
  8205. // error from Do is the result of In-None-Match.
  8206. func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall {
  8207. c.ifNoneMatch_ = entityTag
  8208. return c
  8209. }
  8210. // Context sets the context to be used in this call's Do method. Any
  8211. // pending HTTP request will be aborted if the provided context is
  8212. // canceled.
  8213. func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall {
  8214. c.ctx_ = ctx
  8215. return c
  8216. }
  8217. // Header returns an http.Header that can be modified by the caller to
  8218. // add HTTP headers to the request.
  8219. func (c *ProjectsLocationsJobsGetCall) Header() http.Header {
  8220. if c.header_ == nil {
  8221. c.header_ = make(http.Header)
  8222. }
  8223. return c.header_
  8224. }
  8225. func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) {
  8226. reqHeaders := make(http.Header)
  8227. for k, v := range c.header_ {
  8228. reqHeaders[k] = v
  8229. }
  8230. reqHeaders.Set("User-Agent", c.s.userAgent())
  8231. if c.ifNoneMatch_ != "" {
  8232. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8233. }
  8234. var body io.Reader = nil
  8235. c.urlParams_.Set("alt", alt)
  8236. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}")
  8237. urls += "?" + c.urlParams_.Encode()
  8238. req, _ := http.NewRequest("GET", urls, body)
  8239. req.Header = reqHeaders
  8240. googleapi.Expand(req.URL, map[string]string{
  8241. "projectId": c.projectId,
  8242. "location": c.location,
  8243. "jobId": c.jobId,
  8244. })
  8245. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8246. }
  8247. // Do executes the "dataflow.projects.locations.jobs.get" call.
  8248. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  8249. // is an error. Response headers are in either
  8250. // *Job.ServerResponse.Header or (if a response was returned at all) in
  8251. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8252. // whether the returned error was because http.StatusNotModified was
  8253. // returned.
  8254. func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  8255. gensupport.SetOptions(c.urlParams_, opts...)
  8256. res, err := c.doRequest("json")
  8257. if res != nil && res.StatusCode == http.StatusNotModified {
  8258. if res.Body != nil {
  8259. res.Body.Close()
  8260. }
  8261. return nil, &googleapi.Error{
  8262. Code: res.StatusCode,
  8263. Header: res.Header,
  8264. }
  8265. }
  8266. if err != nil {
  8267. return nil, err
  8268. }
  8269. defer googleapi.CloseBody(res)
  8270. if err := googleapi.CheckResponse(res); err != nil {
  8271. return nil, err
  8272. }
  8273. ret := &Job{
  8274. ServerResponse: googleapi.ServerResponse{
  8275. Header: res.Header,
  8276. HTTPStatusCode: res.StatusCode,
  8277. },
  8278. }
  8279. target := &ret
  8280. if err := gensupport.DecodeResponse(target, res); err != nil {
  8281. return nil, err
  8282. }
  8283. return ret, nil
  8284. // {
  8285. // "description": "Gets the state of the specified Cloud Dataflow job.",
  8286. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  8287. // "httpMethod": "GET",
  8288. // "id": "dataflow.projects.locations.jobs.get",
  8289. // "parameterOrder": [
  8290. // "projectId",
  8291. // "location",
  8292. // "jobId"
  8293. // ],
  8294. // "parameters": {
  8295. // "jobId": {
  8296. // "description": "The job ID.",
  8297. // "location": "path",
  8298. // "required": true,
  8299. // "type": "string"
  8300. // },
  8301. // "location": {
  8302. // "description": "The location that contains this job.",
  8303. // "location": "path",
  8304. // "required": true,
  8305. // "type": "string"
  8306. // },
  8307. // "projectId": {
  8308. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  8309. // "location": "path",
  8310. // "required": true,
  8311. // "type": "string"
  8312. // },
  8313. // "view": {
  8314. // "description": "The level of information requested in response.",
  8315. // "enum": [
  8316. // "JOB_VIEW_UNKNOWN",
  8317. // "JOB_VIEW_SUMMARY",
  8318. // "JOB_VIEW_ALL",
  8319. // "JOB_VIEW_DESCRIPTION"
  8320. // ],
  8321. // "location": "query",
  8322. // "type": "string"
  8323. // }
  8324. // },
  8325. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  8326. // "response": {
  8327. // "$ref": "Job"
  8328. // },
  8329. // "scopes": [
  8330. // "https://www.googleapis.com/auth/cloud-platform",
  8331. // "https://www.googleapis.com/auth/compute",
  8332. // "https://www.googleapis.com/auth/compute.readonly",
  8333. // "https://www.googleapis.com/auth/userinfo.email"
  8334. // ]
  8335. // }
  8336. }
  8337. // method id "dataflow.projects.locations.jobs.getMetrics":
  8338. type ProjectsLocationsJobsGetMetricsCall struct {
  8339. s *Service
  8340. projectId string
  8341. location string
  8342. jobId string
  8343. urlParams_ gensupport.URLParams
  8344. ifNoneMatch_ string
  8345. ctx_ context.Context
  8346. header_ http.Header
  8347. }
  8348. // GetMetrics: Request the job status.
  8349. func (r *ProjectsLocationsJobsService) GetMetrics(projectId string, location string, jobId string) *ProjectsLocationsJobsGetMetricsCall {
  8350. c := &ProjectsLocationsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8351. c.projectId = projectId
  8352. c.location = location
  8353. c.jobId = jobId
  8354. return c
  8355. }
  8356. // StartTime sets the optional parameter "startTime": Return only metric
  8357. // data that has changed since this time.
  8358. // Default is to return all information about all metrics for the job.
  8359. func (c *ProjectsLocationsJobsGetMetricsCall) StartTime(startTime string) *ProjectsLocationsJobsGetMetricsCall {
  8360. c.urlParams_.Set("startTime", startTime)
  8361. return c
  8362. }
  8363. // Fields allows partial responses to be retrieved. See
  8364. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8365. // for more information.
  8366. func (c *ProjectsLocationsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetMetricsCall {
  8367. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8368. return c
  8369. }
  8370. // IfNoneMatch sets the optional parameter which makes the operation
  8371. // fail if the object's ETag matches the given value. This is useful for
  8372. // getting updates only after the object has changed since the last
  8373. // request. Use googleapi.IsNotModified to check whether the response
  8374. // error from Do is the result of In-None-Match.
  8375. func (c *ProjectsLocationsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetMetricsCall {
  8376. c.ifNoneMatch_ = entityTag
  8377. return c
  8378. }
  8379. // Context sets the context to be used in this call's Do method. Any
  8380. // pending HTTP request will be aborted if the provided context is
  8381. // canceled.
  8382. func (c *ProjectsLocationsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetMetricsCall {
  8383. c.ctx_ = ctx
  8384. return c
  8385. }
  8386. // Header returns an http.Header that can be modified by the caller to
  8387. // add HTTP headers to the request.
  8388. func (c *ProjectsLocationsJobsGetMetricsCall) Header() http.Header {
  8389. if c.header_ == nil {
  8390. c.header_ = make(http.Header)
  8391. }
  8392. return c.header_
  8393. }
  8394. func (c *ProjectsLocationsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) {
  8395. reqHeaders := make(http.Header)
  8396. for k, v := range c.header_ {
  8397. reqHeaders[k] = v
  8398. }
  8399. reqHeaders.Set("User-Agent", c.s.userAgent())
  8400. if c.ifNoneMatch_ != "" {
  8401. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8402. }
  8403. var body io.Reader = nil
  8404. c.urlParams_.Set("alt", alt)
  8405. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics")
  8406. urls += "?" + c.urlParams_.Encode()
  8407. req, _ := http.NewRequest("GET", urls, body)
  8408. req.Header = reqHeaders
  8409. googleapi.Expand(req.URL, map[string]string{
  8410. "projectId": c.projectId,
  8411. "location": c.location,
  8412. "jobId": c.jobId,
  8413. })
  8414. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8415. }
  8416. // Do executes the "dataflow.projects.locations.jobs.getMetrics" call.
  8417. // Exactly one of *JobMetrics or error will be non-nil. Any non-2xx
  8418. // status code is an error. Response headers are in either
  8419. // *JobMetrics.ServerResponse.Header or (if a response was returned at
  8420. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8421. // to check whether the returned error was because
  8422. // http.StatusNotModified was returned.
  8423. func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) {
  8424. gensupport.SetOptions(c.urlParams_, opts...)
  8425. res, err := c.doRequest("json")
  8426. if res != nil && res.StatusCode == http.StatusNotModified {
  8427. if res.Body != nil {
  8428. res.Body.Close()
  8429. }
  8430. return nil, &googleapi.Error{
  8431. Code: res.StatusCode,
  8432. Header: res.Header,
  8433. }
  8434. }
  8435. if err != nil {
  8436. return nil, err
  8437. }
  8438. defer googleapi.CloseBody(res)
  8439. if err := googleapi.CheckResponse(res); err != nil {
  8440. return nil, err
  8441. }
  8442. ret := &JobMetrics{
  8443. ServerResponse: googleapi.ServerResponse{
  8444. Header: res.Header,
  8445. HTTPStatusCode: res.StatusCode,
  8446. },
  8447. }
  8448. target := &ret
  8449. if err := gensupport.DecodeResponse(target, res); err != nil {
  8450. return nil, err
  8451. }
  8452. return ret, nil
  8453. // {
  8454. // "description": "Request the job status.",
  8455. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics",
  8456. // "httpMethod": "GET",
  8457. // "id": "dataflow.projects.locations.jobs.getMetrics",
  8458. // "parameterOrder": [
  8459. // "projectId",
  8460. // "location",
  8461. // "jobId"
  8462. // ],
  8463. // "parameters": {
  8464. // "jobId": {
  8465. // "description": "The job to get messages for.",
  8466. // "location": "path",
  8467. // "required": true,
  8468. // "type": "string"
  8469. // },
  8470. // "location": {
  8471. // "description": "The location which contains the job specified by job_id.",
  8472. // "location": "path",
  8473. // "required": true,
  8474. // "type": "string"
  8475. // },
  8476. // "projectId": {
  8477. // "description": "A project id.",
  8478. // "location": "path",
  8479. // "required": true,
  8480. // "type": "string"
  8481. // },
  8482. // "startTime": {
  8483. // "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.",
  8484. // "format": "google-datetime",
  8485. // "location": "query",
  8486. // "type": "string"
  8487. // }
  8488. // },
  8489. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics",
  8490. // "response": {
  8491. // "$ref": "JobMetrics"
  8492. // },
  8493. // "scopes": [
  8494. // "https://www.googleapis.com/auth/cloud-platform",
  8495. // "https://www.googleapis.com/auth/compute",
  8496. // "https://www.googleapis.com/auth/compute.readonly",
  8497. // "https://www.googleapis.com/auth/userinfo.email"
  8498. // ]
  8499. // }
  8500. }
  8501. // method id "dataflow.projects.locations.jobs.list":
  8502. type ProjectsLocationsJobsListCall struct {
  8503. s *Service
  8504. projectId string
  8505. location string
  8506. urlParams_ gensupport.URLParams
  8507. ifNoneMatch_ string
  8508. ctx_ context.Context
  8509. header_ http.Header
  8510. }
  8511. // List: List the jobs of a project in a given region.
  8512. func (r *ProjectsLocationsJobsService) List(projectId string, location string) *ProjectsLocationsJobsListCall {
  8513. c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8514. c.projectId = projectId
  8515. c.location = location
  8516. return c
  8517. }
  8518. // Filter sets the optional parameter "filter": The kind of filter to
  8519. // use.
  8520. //
  8521. // Possible values:
  8522. // "UNKNOWN"
  8523. // "ALL"
  8524. // "TERMINATED"
  8525. // "ACTIVE"
  8526. func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall {
  8527. c.urlParams_.Set("filter", filter)
  8528. return c
  8529. }
  8530. // PageSize sets the optional parameter "pageSize": If there are many
  8531. // jobs, limit response to at most this many.
  8532. // The actual number of jobs returned will be the lesser of
  8533. // max_responses
  8534. // and an unspecified server-defined limit.
  8535. func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall {
  8536. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8537. return c
  8538. }
  8539. // PageToken sets the optional parameter "pageToken": Set this to the
  8540. // 'next_page_token' field of a previous response
  8541. // to request additional results in a long list.
  8542. func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall {
  8543. c.urlParams_.Set("pageToken", pageToken)
  8544. return c
  8545. }
  8546. // View sets the optional parameter "view": Level of information
  8547. // requested in response. Default is `JOB_VIEW_SUMMARY`.
  8548. //
  8549. // Possible values:
  8550. // "JOB_VIEW_UNKNOWN"
  8551. // "JOB_VIEW_SUMMARY"
  8552. // "JOB_VIEW_ALL"
  8553. // "JOB_VIEW_DESCRIPTION"
  8554. func (c *ProjectsLocationsJobsListCall) View(view string) *ProjectsLocationsJobsListCall {
  8555. c.urlParams_.Set("view", view)
  8556. return c
  8557. }
  8558. // Fields allows partial responses to be retrieved. See
  8559. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8560. // for more information.
  8561. func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall {
  8562. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8563. return c
  8564. }
  8565. // IfNoneMatch sets the optional parameter which makes the operation
  8566. // fail if the object's ETag matches the given value. This is useful for
  8567. // getting updates only after the object has changed since the last
  8568. // request. Use googleapi.IsNotModified to check whether the response
  8569. // error from Do is the result of In-None-Match.
  8570. func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall {
  8571. c.ifNoneMatch_ = entityTag
  8572. return c
  8573. }
  8574. // Context sets the context to be used in this call's Do method. Any
  8575. // pending HTTP request will be aborted if the provided context is
  8576. // canceled.
  8577. func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall {
  8578. c.ctx_ = ctx
  8579. return c
  8580. }
  8581. // Header returns an http.Header that can be modified by the caller to
  8582. // add HTTP headers to the request.
  8583. func (c *ProjectsLocationsJobsListCall) Header() http.Header {
  8584. if c.header_ == nil {
  8585. c.header_ = make(http.Header)
  8586. }
  8587. return c.header_
  8588. }
  8589. func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) {
  8590. reqHeaders := make(http.Header)
  8591. for k, v := range c.header_ {
  8592. reqHeaders[k] = v
  8593. }
  8594. reqHeaders.Set("User-Agent", c.s.userAgent())
  8595. if c.ifNoneMatch_ != "" {
  8596. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8597. }
  8598. var body io.Reader = nil
  8599. c.urlParams_.Set("alt", alt)
  8600. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs")
  8601. urls += "?" + c.urlParams_.Encode()
  8602. req, _ := http.NewRequest("GET", urls, body)
  8603. req.Header = reqHeaders
  8604. googleapi.Expand(req.URL, map[string]string{
  8605. "projectId": c.projectId,
  8606. "location": c.location,
  8607. })
  8608. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8609. }
  8610. // Do executes the "dataflow.projects.locations.jobs.list" call.
  8611. // Exactly one of *ListJobsResponse or error will be non-nil. Any
  8612. // non-2xx status code is an error. Response headers are in either
  8613. // *ListJobsResponse.ServerResponse.Header or (if a response was
  8614. // returned at all) in error.(*googleapi.Error).Header. Use
  8615. // googleapi.IsNotModified to check whether the returned error was
  8616. // because http.StatusNotModified was returned.
  8617. func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
  8618. gensupport.SetOptions(c.urlParams_, opts...)
  8619. res, err := c.doRequest("json")
  8620. if res != nil && res.StatusCode == http.StatusNotModified {
  8621. if res.Body != nil {
  8622. res.Body.Close()
  8623. }
  8624. return nil, &googleapi.Error{
  8625. Code: res.StatusCode,
  8626. Header: res.Header,
  8627. }
  8628. }
  8629. if err != nil {
  8630. return nil, err
  8631. }
  8632. defer googleapi.CloseBody(res)
  8633. if err := googleapi.CheckResponse(res); err != nil {
  8634. return nil, err
  8635. }
  8636. ret := &ListJobsResponse{
  8637. ServerResponse: googleapi.ServerResponse{
  8638. Header: res.Header,
  8639. HTTPStatusCode: res.StatusCode,
  8640. },
  8641. }
  8642. target := &ret
  8643. if err := gensupport.DecodeResponse(target, res); err != nil {
  8644. return nil, err
  8645. }
  8646. return ret, nil
  8647. // {
  8648. // "description": "List the jobs of a project in a given region.",
  8649. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs",
  8650. // "httpMethod": "GET",
  8651. // "id": "dataflow.projects.locations.jobs.list",
  8652. // "parameterOrder": [
  8653. // "projectId",
  8654. // "location"
  8655. // ],
  8656. // "parameters": {
  8657. // "filter": {
  8658. // "description": "The kind of filter to use.",
  8659. // "enum": [
  8660. // "UNKNOWN",
  8661. // "ALL",
  8662. // "TERMINATED",
  8663. // "ACTIVE"
  8664. // ],
  8665. // "location": "query",
  8666. // "type": "string"
  8667. // },
  8668. // "location": {
  8669. // "description": "The location that contains this job.",
  8670. // "location": "path",
  8671. // "required": true,
  8672. // "type": "string"
  8673. // },
  8674. // "pageSize": {
  8675. // "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.",
  8676. // "format": "int32",
  8677. // "location": "query",
  8678. // "type": "integer"
  8679. // },
  8680. // "pageToken": {
  8681. // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.",
  8682. // "location": "query",
  8683. // "type": "string"
  8684. // },
  8685. // "projectId": {
  8686. // "description": "The project which owns the jobs.",
  8687. // "location": "path",
  8688. // "required": true,
  8689. // "type": "string"
  8690. // },
  8691. // "view": {
  8692. // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.",
  8693. // "enum": [
  8694. // "JOB_VIEW_UNKNOWN",
  8695. // "JOB_VIEW_SUMMARY",
  8696. // "JOB_VIEW_ALL",
  8697. // "JOB_VIEW_DESCRIPTION"
  8698. // ],
  8699. // "location": "query",
  8700. // "type": "string"
  8701. // }
  8702. // },
  8703. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs",
  8704. // "response": {
  8705. // "$ref": "ListJobsResponse"
  8706. // },
  8707. // "scopes": [
  8708. // "https://www.googleapis.com/auth/cloud-platform",
  8709. // "https://www.googleapis.com/auth/compute",
  8710. // "https://www.googleapis.com/auth/compute.readonly",
  8711. // "https://www.googleapis.com/auth/userinfo.email"
  8712. // ]
  8713. // }
  8714. }
  8715. // Pages invokes f for each page of results.
  8716. // A non-nil error returned from f will halt the iteration.
  8717. // The provided context supersedes any context provided to the Context method.
  8718. func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
  8719. c.ctx_ = ctx
  8720. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8721. for {
  8722. x, err := c.Do()
  8723. if err != nil {
  8724. return err
  8725. }
  8726. if err := f(x); err != nil {
  8727. return err
  8728. }
  8729. if x.NextPageToken == "" {
  8730. return nil
  8731. }
  8732. c.PageToken(x.NextPageToken)
  8733. }
  8734. }
  8735. // method id "dataflow.projects.locations.jobs.update":
  8736. type ProjectsLocationsJobsUpdateCall struct {
  8737. s *Service
  8738. projectId string
  8739. location string
  8740. jobId string
  8741. job *Job
  8742. urlParams_ gensupport.URLParams
  8743. ctx_ context.Context
  8744. header_ http.Header
  8745. }
  8746. // Update: Updates the state of an existing Cloud Dataflow job.
  8747. func (r *ProjectsLocationsJobsService) Update(projectId string, location string, jobId string, job *Job) *ProjectsLocationsJobsUpdateCall {
  8748. c := &ProjectsLocationsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8749. c.projectId = projectId
  8750. c.location = location
  8751. c.jobId = jobId
  8752. c.job = job
  8753. return c
  8754. }
  8755. // Fields allows partial responses to be retrieved. See
  8756. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8757. // for more information.
  8758. func (c *ProjectsLocationsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsUpdateCall {
  8759. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8760. return c
  8761. }
  8762. // Context sets the context to be used in this call's Do method. Any
  8763. // pending HTTP request will be aborted if the provided context is
  8764. // canceled.
  8765. func (c *ProjectsLocationsJobsUpdateCall) Context(ctx context.Context) *ProjectsLocationsJobsUpdateCall {
  8766. c.ctx_ = ctx
  8767. return c
  8768. }
  8769. // Header returns an http.Header that can be modified by the caller to
  8770. // add HTTP headers to the request.
  8771. func (c *ProjectsLocationsJobsUpdateCall) Header() http.Header {
  8772. if c.header_ == nil {
  8773. c.header_ = make(http.Header)
  8774. }
  8775. return c.header_
  8776. }
  8777. func (c *ProjectsLocationsJobsUpdateCall) doRequest(alt string) (*http.Response, error) {
  8778. reqHeaders := make(http.Header)
  8779. for k, v := range c.header_ {
  8780. reqHeaders[k] = v
  8781. }
  8782. reqHeaders.Set("User-Agent", c.s.userAgent())
  8783. var body io.Reader = nil
  8784. body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
  8785. if err != nil {
  8786. return nil, err
  8787. }
  8788. reqHeaders.Set("Content-Type", "application/json")
  8789. c.urlParams_.Set("alt", alt)
  8790. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}")
  8791. urls += "?" + c.urlParams_.Encode()
  8792. req, _ := http.NewRequest("PUT", urls, body)
  8793. req.Header = reqHeaders
  8794. googleapi.Expand(req.URL, map[string]string{
  8795. "projectId": c.projectId,
  8796. "location": c.location,
  8797. "jobId": c.jobId,
  8798. })
  8799. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8800. }
  8801. // Do executes the "dataflow.projects.locations.jobs.update" call.
  8802. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  8803. // is an error. Response headers are in either
  8804. // *Job.ServerResponse.Header or (if a response was returned at all) in
  8805. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8806. // whether the returned error was because http.StatusNotModified was
  8807. // returned.
  8808. func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  8809. gensupport.SetOptions(c.urlParams_, opts...)
  8810. res, err := c.doRequest("json")
  8811. if res != nil && res.StatusCode == http.StatusNotModified {
  8812. if res.Body != nil {
  8813. res.Body.Close()
  8814. }
  8815. return nil, &googleapi.Error{
  8816. Code: res.StatusCode,
  8817. Header: res.Header,
  8818. }
  8819. }
  8820. if err != nil {
  8821. return nil, err
  8822. }
  8823. defer googleapi.CloseBody(res)
  8824. if err := googleapi.CheckResponse(res); err != nil {
  8825. return nil, err
  8826. }
  8827. ret := &Job{
  8828. ServerResponse: googleapi.ServerResponse{
  8829. Header: res.Header,
  8830. HTTPStatusCode: res.StatusCode,
  8831. },
  8832. }
  8833. target := &ret
  8834. if err := gensupport.DecodeResponse(target, res); err != nil {
  8835. return nil, err
  8836. }
  8837. return ret, nil
  8838. // {
  8839. // "description": "Updates the state of an existing Cloud Dataflow job.",
  8840. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  8841. // "httpMethod": "PUT",
  8842. // "id": "dataflow.projects.locations.jobs.update",
  8843. // "parameterOrder": [
  8844. // "projectId",
  8845. // "location",
  8846. // "jobId"
  8847. // ],
  8848. // "parameters": {
  8849. // "jobId": {
  8850. // "description": "The job ID.",
  8851. // "location": "path",
  8852. // "required": true,
  8853. // "type": "string"
  8854. // },
  8855. // "location": {
  8856. // "description": "The location that contains this job.",
  8857. // "location": "path",
  8858. // "required": true,
  8859. // "type": "string"
  8860. // },
  8861. // "projectId": {
  8862. // "description": "The ID of the Cloud Platform project that the job belongs to.",
  8863. // "location": "path",
  8864. // "required": true,
  8865. // "type": "string"
  8866. // }
  8867. // },
  8868. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}",
  8869. // "request": {
  8870. // "$ref": "Job"
  8871. // },
  8872. // "response": {
  8873. // "$ref": "Job"
  8874. // },
  8875. // "scopes": [
  8876. // "https://www.googleapis.com/auth/cloud-platform",
  8877. // "https://www.googleapis.com/auth/compute",
  8878. // "https://www.googleapis.com/auth/compute.readonly",
  8879. // "https://www.googleapis.com/auth/userinfo.email"
  8880. // ]
  8881. // }
  8882. }
  8883. // method id "dataflow.projects.locations.jobs.debug.getConfig":
  8884. type ProjectsLocationsJobsDebugGetConfigCall struct {
  8885. s *Service
  8886. projectId string
  8887. location string
  8888. jobId string
  8889. getdebugconfigrequest *GetDebugConfigRequest
  8890. urlParams_ gensupport.URLParams
  8891. ctx_ context.Context
  8892. header_ http.Header
  8893. }
  8894. // GetConfig: Get encoded debug configuration for component. Not
  8895. // cacheable.
  8896. func (r *ProjectsLocationsJobsDebugService) GetConfig(projectId string, location string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsLocationsJobsDebugGetConfigCall {
  8897. c := &ProjectsLocationsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8898. c.projectId = projectId
  8899. c.location = location
  8900. c.jobId = jobId
  8901. c.getdebugconfigrequest = getdebugconfigrequest
  8902. return c
  8903. }
  8904. // Fields allows partial responses to be retrieved. See
  8905. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8906. // for more information.
  8907. func (c *ProjectsLocationsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugGetConfigCall {
  8908. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8909. return c
  8910. }
  8911. // Context sets the context to be used in this call's Do method. Any
  8912. // pending HTTP request will be aborted if the provided context is
  8913. // canceled.
  8914. func (c *ProjectsLocationsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugGetConfigCall {
  8915. c.ctx_ = ctx
  8916. return c
  8917. }
  8918. // Header returns an http.Header that can be modified by the caller to
  8919. // add HTTP headers to the request.
  8920. func (c *ProjectsLocationsJobsDebugGetConfigCall) Header() http.Header {
  8921. if c.header_ == nil {
  8922. c.header_ = make(http.Header)
  8923. }
  8924. return c.header_
  8925. }
  8926. func (c *ProjectsLocationsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) {
  8927. reqHeaders := make(http.Header)
  8928. for k, v := range c.header_ {
  8929. reqHeaders[k] = v
  8930. }
  8931. reqHeaders.Set("User-Agent", c.s.userAgent())
  8932. var body io.Reader = nil
  8933. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest)
  8934. if err != nil {
  8935. return nil, err
  8936. }
  8937. reqHeaders.Set("Content-Type", "application/json")
  8938. c.urlParams_.Set("alt", alt)
  8939. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig")
  8940. urls += "?" + c.urlParams_.Encode()
  8941. req, _ := http.NewRequest("POST", urls, body)
  8942. req.Header = reqHeaders
  8943. googleapi.Expand(req.URL, map[string]string{
  8944. "projectId": c.projectId,
  8945. "location": c.location,
  8946. "jobId": c.jobId,
  8947. })
  8948. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8949. }
  8950. // Do executes the "dataflow.projects.locations.jobs.debug.getConfig" call.
  8951. // Exactly one of *GetDebugConfigResponse or error will be non-nil. Any
  8952. // non-2xx status code is an error. Response headers are in either
  8953. // *GetDebugConfigResponse.ServerResponse.Header or (if a response was
  8954. // returned at all) in error.(*googleapi.Error).Header. Use
  8955. // googleapi.IsNotModified to check whether the returned error was
  8956. // because http.StatusNotModified was returned.
  8957. func (c *ProjectsLocationsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) {
  8958. gensupport.SetOptions(c.urlParams_, opts...)
  8959. res, err := c.doRequest("json")
  8960. if res != nil && res.StatusCode == http.StatusNotModified {
  8961. if res.Body != nil {
  8962. res.Body.Close()
  8963. }
  8964. return nil, &googleapi.Error{
  8965. Code: res.StatusCode,
  8966. Header: res.Header,
  8967. }
  8968. }
  8969. if err != nil {
  8970. return nil, err
  8971. }
  8972. defer googleapi.CloseBody(res)
  8973. if err := googleapi.CheckResponse(res); err != nil {
  8974. return nil, err
  8975. }
  8976. ret := &GetDebugConfigResponse{
  8977. ServerResponse: googleapi.ServerResponse{
  8978. Header: res.Header,
  8979. HTTPStatusCode: res.StatusCode,
  8980. },
  8981. }
  8982. target := &ret
  8983. if err := gensupport.DecodeResponse(target, res); err != nil {
  8984. return nil, err
  8985. }
  8986. return ret, nil
  8987. // {
  8988. // "description": "Get encoded debug configuration for component. Not cacheable.",
  8989. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig",
  8990. // "httpMethod": "POST",
  8991. // "id": "dataflow.projects.locations.jobs.debug.getConfig",
  8992. // "parameterOrder": [
  8993. // "projectId",
  8994. // "location",
  8995. // "jobId"
  8996. // ],
  8997. // "parameters": {
  8998. // "jobId": {
  8999. // "description": "The job id.",
  9000. // "location": "path",
  9001. // "required": true,
  9002. // "type": "string"
  9003. // },
  9004. // "location": {
  9005. // "description": "The location which contains the job specified by job_id.",
  9006. // "location": "path",
  9007. // "required": true,
  9008. // "type": "string"
  9009. // },
  9010. // "projectId": {
  9011. // "description": "The project id.",
  9012. // "location": "path",
  9013. // "required": true,
  9014. // "type": "string"
  9015. // }
  9016. // },
  9017. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig",
  9018. // "request": {
  9019. // "$ref": "GetDebugConfigRequest"
  9020. // },
  9021. // "response": {
  9022. // "$ref": "GetDebugConfigResponse"
  9023. // },
  9024. // "scopes": [
  9025. // "https://www.googleapis.com/auth/cloud-platform",
  9026. // "https://www.googleapis.com/auth/compute",
  9027. // "https://www.googleapis.com/auth/compute.readonly",
  9028. // "https://www.googleapis.com/auth/userinfo.email"
  9029. // ]
  9030. // }
  9031. }
  9032. // method id "dataflow.projects.locations.jobs.debug.sendCapture":
  9033. type ProjectsLocationsJobsDebugSendCaptureCall struct {
  9034. s *Service
  9035. projectId string
  9036. location string
  9037. jobId string
  9038. senddebugcapturerequest *SendDebugCaptureRequest
  9039. urlParams_ gensupport.URLParams
  9040. ctx_ context.Context
  9041. header_ http.Header
  9042. }
  9043. // SendCapture: Send encoded debug capture data for component.
  9044. func (r *ProjectsLocationsJobsDebugService) SendCapture(projectId string, location string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsLocationsJobsDebugSendCaptureCall {
  9045. c := &ProjectsLocationsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9046. c.projectId = projectId
  9047. c.location = location
  9048. c.jobId = jobId
  9049. c.senddebugcapturerequest = senddebugcapturerequest
  9050. return c
  9051. }
  9052. // Fields allows partial responses to be retrieved. See
  9053. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9054. // for more information.
  9055. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugSendCaptureCall {
  9056. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9057. return c
  9058. }
  9059. // Context sets the context to be used in this call's Do method. Any
  9060. // pending HTTP request will be aborted if the provided context is
  9061. // canceled.
  9062. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugSendCaptureCall {
  9063. c.ctx_ = ctx
  9064. return c
  9065. }
  9066. // Header returns an http.Header that can be modified by the caller to
  9067. // add HTTP headers to the request.
  9068. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Header() http.Header {
  9069. if c.header_ == nil {
  9070. c.header_ = make(http.Header)
  9071. }
  9072. return c.header_
  9073. }
  9074. func (c *ProjectsLocationsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) {
  9075. reqHeaders := make(http.Header)
  9076. for k, v := range c.header_ {
  9077. reqHeaders[k] = v
  9078. }
  9079. reqHeaders.Set("User-Agent", c.s.userAgent())
  9080. var body io.Reader = nil
  9081. body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest)
  9082. if err != nil {
  9083. return nil, err
  9084. }
  9085. reqHeaders.Set("Content-Type", "application/json")
  9086. c.urlParams_.Set("alt", alt)
  9087. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture")
  9088. urls += "?" + c.urlParams_.Encode()
  9089. req, _ := http.NewRequest("POST", urls, body)
  9090. req.Header = reqHeaders
  9091. googleapi.Expand(req.URL, map[string]string{
  9092. "projectId": c.projectId,
  9093. "location": c.location,
  9094. "jobId": c.jobId,
  9095. })
  9096. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9097. }
  9098. // Do executes the "dataflow.projects.locations.jobs.debug.sendCapture" call.
  9099. // Exactly one of *SendDebugCaptureResponse or error will be non-nil.
  9100. // Any non-2xx status code is an error. Response headers are in either
  9101. // *SendDebugCaptureResponse.ServerResponse.Header or (if a response was
  9102. // returned at all) in error.(*googleapi.Error).Header. Use
  9103. // googleapi.IsNotModified to check whether the returned error was
  9104. // because http.StatusNotModified was returned.
  9105. func (c *ProjectsLocationsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) {
  9106. gensupport.SetOptions(c.urlParams_, opts...)
  9107. res, err := c.doRequest("json")
  9108. if res != nil && res.StatusCode == http.StatusNotModified {
  9109. if res.Body != nil {
  9110. res.Body.Close()
  9111. }
  9112. return nil, &googleapi.Error{
  9113. Code: res.StatusCode,
  9114. Header: res.Header,
  9115. }
  9116. }
  9117. if err != nil {
  9118. return nil, err
  9119. }
  9120. defer googleapi.CloseBody(res)
  9121. if err := googleapi.CheckResponse(res); err != nil {
  9122. return nil, err
  9123. }
  9124. ret := &SendDebugCaptureResponse{
  9125. ServerResponse: googleapi.ServerResponse{
  9126. Header: res.Header,
  9127. HTTPStatusCode: res.StatusCode,
  9128. },
  9129. }
  9130. target := &ret
  9131. if err := gensupport.DecodeResponse(target, res); err != nil {
  9132. return nil, err
  9133. }
  9134. return ret, nil
  9135. // {
  9136. // "description": "Send encoded debug capture data for component.",
  9137. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture",
  9138. // "httpMethod": "POST",
  9139. // "id": "dataflow.projects.locations.jobs.debug.sendCapture",
  9140. // "parameterOrder": [
  9141. // "projectId",
  9142. // "location",
  9143. // "jobId"
  9144. // ],
  9145. // "parameters": {
  9146. // "jobId": {
  9147. // "description": "The job id.",
  9148. // "location": "path",
  9149. // "required": true,
  9150. // "type": "string"
  9151. // },
  9152. // "location": {
  9153. // "description": "The location which contains the job specified by job_id.",
  9154. // "location": "path",
  9155. // "required": true,
  9156. // "type": "string"
  9157. // },
  9158. // "projectId": {
  9159. // "description": "The project id.",
  9160. // "location": "path",
  9161. // "required": true,
  9162. // "type": "string"
  9163. // }
  9164. // },
  9165. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture",
  9166. // "request": {
  9167. // "$ref": "SendDebugCaptureRequest"
  9168. // },
  9169. // "response": {
  9170. // "$ref": "SendDebugCaptureResponse"
  9171. // },
  9172. // "scopes": [
  9173. // "https://www.googleapis.com/auth/cloud-platform",
  9174. // "https://www.googleapis.com/auth/compute",
  9175. // "https://www.googleapis.com/auth/compute.readonly",
  9176. // "https://www.googleapis.com/auth/userinfo.email"
  9177. // ]
  9178. // }
  9179. }
  9180. // method id "dataflow.projects.locations.jobs.messages.list":
  9181. type ProjectsLocationsJobsMessagesListCall struct {
  9182. s *Service
  9183. projectId string
  9184. location string
  9185. jobId string
  9186. urlParams_ gensupport.URLParams
  9187. ifNoneMatch_ string
  9188. ctx_ context.Context
  9189. header_ http.Header
  9190. }
  9191. // List: Request the job status.
  9192. func (r *ProjectsLocationsJobsMessagesService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsMessagesListCall {
  9193. c := &ProjectsLocationsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9194. c.projectId = projectId
  9195. c.location = location
  9196. c.jobId = jobId
  9197. return c
  9198. }
  9199. // EndTime sets the optional parameter "endTime": Return only messages
  9200. // with timestamps < end_time. The default is now
  9201. // (i.e. return up to the latest messages available).
  9202. func (c *ProjectsLocationsJobsMessagesListCall) EndTime(endTime string) *ProjectsLocationsJobsMessagesListCall {
  9203. c.urlParams_.Set("endTime", endTime)
  9204. return c
  9205. }
  9206. // MinimumImportance sets the optional parameter "minimumImportance":
  9207. // Filter to only get messages with importance >= level
  9208. //
  9209. // Possible values:
  9210. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN"
  9211. // "JOB_MESSAGE_DEBUG"
  9212. // "JOB_MESSAGE_DETAILED"
  9213. // "JOB_MESSAGE_BASIC"
  9214. // "JOB_MESSAGE_WARNING"
  9215. // "JOB_MESSAGE_ERROR"
  9216. func (c *ProjectsLocationsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsLocationsJobsMessagesListCall {
  9217. c.urlParams_.Set("minimumImportance", minimumImportance)
  9218. return c
  9219. }
  9220. // PageSize sets the optional parameter "pageSize": If specified,
  9221. // determines the maximum number of messages to
  9222. // return. If unspecified, the service may choose an
  9223. // appropriate
  9224. // default, or may return an arbitrarily large number of results.
  9225. func (c *ProjectsLocationsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsJobsMessagesListCall {
  9226. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9227. return c
  9228. }
  9229. // PageToken sets the optional parameter "pageToken": If supplied, this
  9230. // should be the value of next_page_token returned
  9231. // by an earlier call. This will cause the next page of results to
  9232. // be returned.
  9233. func (c *ProjectsLocationsJobsMessagesListCall) PageToken(pageToken string) *ProjectsLocationsJobsMessagesListCall {
  9234. c.urlParams_.Set("pageToken", pageToken)
  9235. return c
  9236. }
  9237. // StartTime sets the optional parameter "startTime": If specified,
  9238. // return only messages with timestamps >= start_time.
  9239. // The default is the job creation time (i.e. beginning of messages).
  9240. func (c *ProjectsLocationsJobsMessagesListCall) StartTime(startTime string) *ProjectsLocationsJobsMessagesListCall {
  9241. c.urlParams_.Set("startTime", startTime)
  9242. return c
  9243. }
  9244. // Fields allows partial responses to be retrieved. See
  9245. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9246. // for more information.
  9247. func (c *ProjectsLocationsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsMessagesListCall {
  9248. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9249. return c
  9250. }
  9251. // IfNoneMatch sets the optional parameter which makes the operation
  9252. // fail if the object's ETag matches the given value. This is useful for
  9253. // getting updates only after the object has changed since the last
  9254. // request. Use googleapi.IsNotModified to check whether the response
  9255. // error from Do is the result of In-None-Match.
  9256. func (c *ProjectsLocationsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsMessagesListCall {
  9257. c.ifNoneMatch_ = entityTag
  9258. return c
  9259. }
  9260. // Context sets the context to be used in this call's Do method. Any
  9261. // pending HTTP request will be aborted if the provided context is
  9262. // canceled.
  9263. func (c *ProjectsLocationsJobsMessagesListCall) Context(ctx context.Context) *ProjectsLocationsJobsMessagesListCall {
  9264. c.ctx_ = ctx
  9265. return c
  9266. }
  9267. // Header returns an http.Header that can be modified by the caller to
  9268. // add HTTP headers to the request.
  9269. func (c *ProjectsLocationsJobsMessagesListCall) Header() http.Header {
  9270. if c.header_ == nil {
  9271. c.header_ = make(http.Header)
  9272. }
  9273. return c.header_
  9274. }
  9275. func (c *ProjectsLocationsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) {
  9276. reqHeaders := make(http.Header)
  9277. for k, v := range c.header_ {
  9278. reqHeaders[k] = v
  9279. }
  9280. reqHeaders.Set("User-Agent", c.s.userAgent())
  9281. if c.ifNoneMatch_ != "" {
  9282. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9283. }
  9284. var body io.Reader = nil
  9285. c.urlParams_.Set("alt", alt)
  9286. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages")
  9287. urls += "?" + c.urlParams_.Encode()
  9288. req, _ := http.NewRequest("GET", urls, body)
  9289. req.Header = reqHeaders
  9290. googleapi.Expand(req.URL, map[string]string{
  9291. "projectId": c.projectId,
  9292. "location": c.location,
  9293. "jobId": c.jobId,
  9294. })
  9295. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9296. }
  9297. // Do executes the "dataflow.projects.locations.jobs.messages.list" call.
  9298. // Exactly one of *ListJobMessagesResponse or error will be non-nil. Any
  9299. // non-2xx status code is an error. Response headers are in either
  9300. // *ListJobMessagesResponse.ServerResponse.Header or (if a response was
  9301. // returned at all) in error.(*googleapi.Error).Header. Use
  9302. // googleapi.IsNotModified to check whether the returned error was
  9303. // because http.StatusNotModified was returned.
  9304. func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) {
  9305. gensupport.SetOptions(c.urlParams_, opts...)
  9306. res, err := c.doRequest("json")
  9307. if res != nil && res.StatusCode == http.StatusNotModified {
  9308. if res.Body != nil {
  9309. res.Body.Close()
  9310. }
  9311. return nil, &googleapi.Error{
  9312. Code: res.StatusCode,
  9313. Header: res.Header,
  9314. }
  9315. }
  9316. if err != nil {
  9317. return nil, err
  9318. }
  9319. defer googleapi.CloseBody(res)
  9320. if err := googleapi.CheckResponse(res); err != nil {
  9321. return nil, err
  9322. }
  9323. ret := &ListJobMessagesResponse{
  9324. ServerResponse: googleapi.ServerResponse{
  9325. Header: res.Header,
  9326. HTTPStatusCode: res.StatusCode,
  9327. },
  9328. }
  9329. target := &ret
  9330. if err := gensupport.DecodeResponse(target, res); err != nil {
  9331. return nil, err
  9332. }
  9333. return ret, nil
  9334. // {
  9335. // "description": "Request the job status.",
  9336. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages",
  9337. // "httpMethod": "GET",
  9338. // "id": "dataflow.projects.locations.jobs.messages.list",
  9339. // "parameterOrder": [
  9340. // "projectId",
  9341. // "location",
  9342. // "jobId"
  9343. // ],
  9344. // "parameters": {
  9345. // "endTime": {
  9346. // "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).",
  9347. // "format": "google-datetime",
  9348. // "location": "query",
  9349. // "type": "string"
  9350. // },
  9351. // "jobId": {
  9352. // "description": "The job to get messages about.",
  9353. // "location": "path",
  9354. // "required": true,
  9355. // "type": "string"
  9356. // },
  9357. // "location": {
  9358. // "description": "The location which contains the job specified by job_id.",
  9359. // "location": "path",
  9360. // "required": true,
  9361. // "type": "string"
  9362. // },
  9363. // "minimumImportance": {
  9364. // "description": "Filter to only get messages with importance \u003e= level",
  9365. // "enum": [
  9366. // "JOB_MESSAGE_IMPORTANCE_UNKNOWN",
  9367. // "JOB_MESSAGE_DEBUG",
  9368. // "JOB_MESSAGE_DETAILED",
  9369. // "JOB_MESSAGE_BASIC",
  9370. // "JOB_MESSAGE_WARNING",
  9371. // "JOB_MESSAGE_ERROR"
  9372. // ],
  9373. // "location": "query",
  9374. // "type": "string"
  9375. // },
  9376. // "pageSize": {
  9377. // "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.",
  9378. // "format": "int32",
  9379. // "location": "query",
  9380. // "type": "integer"
  9381. // },
  9382. // "pageToken": {
  9383. // "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.",
  9384. // "location": "query",
  9385. // "type": "string"
  9386. // },
  9387. // "projectId": {
  9388. // "description": "A project id.",
  9389. // "location": "path",
  9390. // "required": true,
  9391. // "type": "string"
  9392. // },
  9393. // "startTime": {
  9394. // "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).",
  9395. // "format": "google-datetime",
  9396. // "location": "query",
  9397. // "type": "string"
  9398. // }
  9399. // },
  9400. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages",
  9401. // "response": {
  9402. // "$ref": "ListJobMessagesResponse"
  9403. // },
  9404. // "scopes": [
  9405. // "https://www.googleapis.com/auth/cloud-platform",
  9406. // "https://www.googleapis.com/auth/compute",
  9407. // "https://www.googleapis.com/auth/compute.readonly",
  9408. // "https://www.googleapis.com/auth/userinfo.email"
  9409. // ]
  9410. // }
  9411. }
  9412. // Pages invokes f for each page of results.
  9413. // A non-nil error returned from f will halt the iteration.
  9414. // The provided context supersedes any context provided to the Context method.
  9415. func (c *ProjectsLocationsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error {
  9416. c.ctx_ = ctx
  9417. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9418. for {
  9419. x, err := c.Do()
  9420. if err != nil {
  9421. return err
  9422. }
  9423. if err := f(x); err != nil {
  9424. return err
  9425. }
  9426. if x.NextPageToken == "" {
  9427. return nil
  9428. }
  9429. c.PageToken(x.NextPageToken)
  9430. }
  9431. }
  9432. // method id "dataflow.projects.locations.jobs.workItems.lease":
  9433. type ProjectsLocationsJobsWorkItemsLeaseCall struct {
  9434. s *Service
  9435. projectId string
  9436. location string
  9437. jobId string
  9438. leaseworkitemrequest *LeaseWorkItemRequest
  9439. urlParams_ gensupport.URLParams
  9440. ctx_ context.Context
  9441. header_ http.Header
  9442. }
  9443. // Lease: Leases a dataflow WorkItem to run.
  9444. func (r *ProjectsLocationsJobsWorkItemsService) Lease(projectId string, location string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsLocationsJobsWorkItemsLeaseCall {
  9445. c := &ProjectsLocationsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9446. c.projectId = projectId
  9447. c.location = location
  9448. c.jobId = jobId
  9449. c.leaseworkitemrequest = leaseworkitemrequest
  9450. return c
  9451. }
  9452. // Fields allows partial responses to be retrieved. See
  9453. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9454. // for more information.
  9455. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsLeaseCall {
  9456. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9457. return c
  9458. }
  9459. // Context sets the context to be used in this call's Do method. Any
  9460. // pending HTTP request will be aborted if the provided context is
  9461. // canceled.
  9462. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsLeaseCall {
  9463. c.ctx_ = ctx
  9464. return c
  9465. }
  9466. // Header returns an http.Header that can be modified by the caller to
  9467. // add HTTP headers to the request.
  9468. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Header() http.Header {
  9469. if c.header_ == nil {
  9470. c.header_ = make(http.Header)
  9471. }
  9472. return c.header_
  9473. }
  9474. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) {
  9475. reqHeaders := make(http.Header)
  9476. for k, v := range c.header_ {
  9477. reqHeaders[k] = v
  9478. }
  9479. reqHeaders.Set("User-Agent", c.s.userAgent())
  9480. var body io.Reader = nil
  9481. body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest)
  9482. if err != nil {
  9483. return nil, err
  9484. }
  9485. reqHeaders.Set("Content-Type", "application/json")
  9486. c.urlParams_.Set("alt", alt)
  9487. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease")
  9488. urls += "?" + c.urlParams_.Encode()
  9489. req, _ := http.NewRequest("POST", urls, body)
  9490. req.Header = reqHeaders
  9491. googleapi.Expand(req.URL, map[string]string{
  9492. "projectId": c.projectId,
  9493. "location": c.location,
  9494. "jobId": c.jobId,
  9495. })
  9496. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9497. }
  9498. // Do executes the "dataflow.projects.locations.jobs.workItems.lease" call.
  9499. // Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any
  9500. // non-2xx status code is an error. Response headers are in either
  9501. // *LeaseWorkItemResponse.ServerResponse.Header or (if a response was
  9502. // returned at all) in error.(*googleapi.Error).Header. Use
  9503. // googleapi.IsNotModified to check whether the returned error was
  9504. // because http.StatusNotModified was returned.
  9505. func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) {
  9506. gensupport.SetOptions(c.urlParams_, opts...)
  9507. res, err := c.doRequest("json")
  9508. if res != nil && res.StatusCode == http.StatusNotModified {
  9509. if res.Body != nil {
  9510. res.Body.Close()
  9511. }
  9512. return nil, &googleapi.Error{
  9513. Code: res.StatusCode,
  9514. Header: res.Header,
  9515. }
  9516. }
  9517. if err != nil {
  9518. return nil, err
  9519. }
  9520. defer googleapi.CloseBody(res)
  9521. if err := googleapi.CheckResponse(res); err != nil {
  9522. return nil, err
  9523. }
  9524. ret := &LeaseWorkItemResponse{
  9525. ServerResponse: googleapi.ServerResponse{
  9526. Header: res.Header,
  9527. HTTPStatusCode: res.StatusCode,
  9528. },
  9529. }
  9530. target := &ret
  9531. if err := gensupport.DecodeResponse(target, res); err != nil {
  9532. return nil, err
  9533. }
  9534. return ret, nil
  9535. // {
  9536. // "description": "Leases a dataflow WorkItem to run.",
  9537. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease",
  9538. // "httpMethod": "POST",
  9539. // "id": "dataflow.projects.locations.jobs.workItems.lease",
  9540. // "parameterOrder": [
  9541. // "projectId",
  9542. // "location",
  9543. // "jobId"
  9544. // ],
  9545. // "parameters": {
  9546. // "jobId": {
  9547. // "description": "Identifies the workflow job this worker belongs to.",
  9548. // "location": "path",
  9549. // "required": true,
  9550. // "type": "string"
  9551. // },
  9552. // "location": {
  9553. // "description": "The location which contains the WorkItem's job.",
  9554. // "location": "path",
  9555. // "required": true,
  9556. // "type": "string"
  9557. // },
  9558. // "projectId": {
  9559. // "description": "Identifies the project this worker belongs to.",
  9560. // "location": "path",
  9561. // "required": true,
  9562. // "type": "string"
  9563. // }
  9564. // },
  9565. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease",
  9566. // "request": {
  9567. // "$ref": "LeaseWorkItemRequest"
  9568. // },
  9569. // "response": {
  9570. // "$ref": "LeaseWorkItemResponse"
  9571. // },
  9572. // "scopes": [
  9573. // "https://www.googleapis.com/auth/cloud-platform",
  9574. // "https://www.googleapis.com/auth/compute",
  9575. // "https://www.googleapis.com/auth/compute.readonly",
  9576. // "https://www.googleapis.com/auth/userinfo.email"
  9577. // ]
  9578. // }
  9579. }
  9580. // method id "dataflow.projects.locations.jobs.workItems.reportStatus":
  9581. type ProjectsLocationsJobsWorkItemsReportStatusCall struct {
  9582. s *Service
  9583. projectId string
  9584. location string
  9585. jobId string
  9586. reportworkitemstatusrequest *ReportWorkItemStatusRequest
  9587. urlParams_ gensupport.URLParams
  9588. ctx_ context.Context
  9589. header_ http.Header
  9590. }
  9591. // ReportStatus: Reports the status of dataflow WorkItems leased by a
  9592. // worker.
  9593. func (r *ProjectsLocationsJobsWorkItemsService) ReportStatus(projectId string, location string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsLocationsJobsWorkItemsReportStatusCall {
  9594. c := &ProjectsLocationsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9595. c.projectId = projectId
  9596. c.location = location
  9597. c.jobId = jobId
  9598. c.reportworkitemstatusrequest = reportworkitemstatusrequest
  9599. return c
  9600. }
  9601. // Fields allows partial responses to be retrieved. See
  9602. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9603. // for more information.
  9604. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsReportStatusCall {
  9605. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9606. return c
  9607. }
  9608. // Context sets the context to be used in this call's Do method. Any
  9609. // pending HTTP request will be aborted if the provided context is
  9610. // canceled.
  9611. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsReportStatusCall {
  9612. c.ctx_ = ctx
  9613. return c
  9614. }
  9615. // Header returns an http.Header that can be modified by the caller to
  9616. // add HTTP headers to the request.
  9617. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Header() http.Header {
  9618. if c.header_ == nil {
  9619. c.header_ = make(http.Header)
  9620. }
  9621. return c.header_
  9622. }
  9623. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) {
  9624. reqHeaders := make(http.Header)
  9625. for k, v := range c.header_ {
  9626. reqHeaders[k] = v
  9627. }
  9628. reqHeaders.Set("User-Agent", c.s.userAgent())
  9629. var body io.Reader = nil
  9630. body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest)
  9631. if err != nil {
  9632. return nil, err
  9633. }
  9634. reqHeaders.Set("Content-Type", "application/json")
  9635. c.urlParams_.Set("alt", alt)
  9636. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus")
  9637. urls += "?" + c.urlParams_.Encode()
  9638. req, _ := http.NewRequest("POST", urls, body)
  9639. req.Header = reqHeaders
  9640. googleapi.Expand(req.URL, map[string]string{
  9641. "projectId": c.projectId,
  9642. "location": c.location,
  9643. "jobId": c.jobId,
  9644. })
  9645. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9646. }
  9647. // Do executes the "dataflow.projects.locations.jobs.workItems.reportStatus" call.
  9648. // Exactly one of *ReportWorkItemStatusResponse or error will be
  9649. // non-nil. Any non-2xx status code is an error. Response headers are in
  9650. // either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a
  9651. // response was returned at all) in error.(*googleapi.Error).Header. Use
  9652. // googleapi.IsNotModified to check whether the returned error was
  9653. // because http.StatusNotModified was returned.
  9654. func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) {
  9655. gensupport.SetOptions(c.urlParams_, opts...)
  9656. res, err := c.doRequest("json")
  9657. if res != nil && res.StatusCode == http.StatusNotModified {
  9658. if res.Body != nil {
  9659. res.Body.Close()
  9660. }
  9661. return nil, &googleapi.Error{
  9662. Code: res.StatusCode,
  9663. Header: res.Header,
  9664. }
  9665. }
  9666. if err != nil {
  9667. return nil, err
  9668. }
  9669. defer googleapi.CloseBody(res)
  9670. if err := googleapi.CheckResponse(res); err != nil {
  9671. return nil, err
  9672. }
  9673. ret := &ReportWorkItemStatusResponse{
  9674. ServerResponse: googleapi.ServerResponse{
  9675. Header: res.Header,
  9676. HTTPStatusCode: res.StatusCode,
  9677. },
  9678. }
  9679. target := &ret
  9680. if err := gensupport.DecodeResponse(target, res); err != nil {
  9681. return nil, err
  9682. }
  9683. return ret, nil
  9684. // {
  9685. // "description": "Reports the status of dataflow WorkItems leased by a worker.",
  9686. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus",
  9687. // "httpMethod": "POST",
  9688. // "id": "dataflow.projects.locations.jobs.workItems.reportStatus",
  9689. // "parameterOrder": [
  9690. // "projectId",
  9691. // "location",
  9692. // "jobId"
  9693. // ],
  9694. // "parameters": {
  9695. // "jobId": {
  9696. // "description": "The job which the WorkItem is part of.",
  9697. // "location": "path",
  9698. // "required": true,
  9699. // "type": "string"
  9700. // },
  9701. // "location": {
  9702. // "description": "The location which contains the WorkItem's job.",
  9703. // "location": "path",
  9704. // "required": true,
  9705. // "type": "string"
  9706. // },
  9707. // "projectId": {
  9708. // "description": "The project which owns the WorkItem's job.",
  9709. // "location": "path",
  9710. // "required": true,
  9711. // "type": "string"
  9712. // }
  9713. // },
  9714. // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus",
  9715. // "request": {
  9716. // "$ref": "ReportWorkItemStatusRequest"
  9717. // },
  9718. // "response": {
  9719. // "$ref": "ReportWorkItemStatusResponse"
  9720. // },
  9721. // "scopes": [
  9722. // "https://www.googleapis.com/auth/cloud-platform",
  9723. // "https://www.googleapis.com/auth/compute",
  9724. // "https://www.googleapis.com/auth/compute.readonly",
  9725. // "https://www.googleapis.com/auth/userinfo.email"
  9726. // ]
  9727. // }
  9728. }
  9729. // method id "dataflow.projects.locations.templates.create":
  9730. type ProjectsLocationsTemplatesCreateCall struct {
  9731. s *Service
  9732. projectId string
  9733. location string
  9734. createjobfromtemplaterequest *CreateJobFromTemplateRequest
  9735. urlParams_ gensupport.URLParams
  9736. ctx_ context.Context
  9737. header_ http.Header
  9738. }
  9739. // Create: Creates a Cloud Dataflow job from a template.
  9740. func (r *ProjectsLocationsTemplatesService) Create(projectId string, location string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsLocationsTemplatesCreateCall {
  9741. c := &ProjectsLocationsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9742. c.projectId = projectId
  9743. c.location = location
  9744. c.createjobfromtemplaterequest = createjobfromtemplaterequest
  9745. return c
  9746. }
  9747. // Fields allows partial responses to be retrieved. See
  9748. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9749. // for more information.
  9750. func (c *ProjectsLocationsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesCreateCall {
  9751. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9752. return c
  9753. }
  9754. // Context sets the context to be used in this call's Do method. Any
  9755. // pending HTTP request will be aborted if the provided context is
  9756. // canceled.
  9757. func (c *ProjectsLocationsTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTemplatesCreateCall {
  9758. c.ctx_ = ctx
  9759. return c
  9760. }
  9761. // Header returns an http.Header that can be modified by the caller to
  9762. // add HTTP headers to the request.
  9763. func (c *ProjectsLocationsTemplatesCreateCall) Header() http.Header {
  9764. if c.header_ == nil {
  9765. c.header_ = make(http.Header)
  9766. }
  9767. return c.header_
  9768. }
  9769. func (c *ProjectsLocationsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  9770. reqHeaders := make(http.Header)
  9771. for k, v := range c.header_ {
  9772. reqHeaders[k] = v
  9773. }
  9774. reqHeaders.Set("User-Agent", c.s.userAgent())
  9775. var body io.Reader = nil
  9776. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest)
  9777. if err != nil {
  9778. return nil, err
  9779. }
  9780. reqHeaders.Set("Content-Type", "application/json")
  9781. c.urlParams_.Set("alt", alt)
  9782. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates")
  9783. urls += "?" + c.urlParams_.Encode()
  9784. req, _ := http.NewRequest("POST", urls, body)
  9785. req.Header = reqHeaders
  9786. googleapi.Expand(req.URL, map[string]string{
  9787. "projectId": c.projectId,
  9788. "location": c.location,
  9789. })
  9790. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9791. }
  9792. // Do executes the "dataflow.projects.locations.templates.create" call.
  9793. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  9794. // is an error. Response headers are in either
  9795. // *Job.ServerResponse.Header or (if a response was returned at all) in
  9796. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9797. // whether the returned error was because http.StatusNotModified was
  9798. // returned.
  9799. func (c *ProjectsLocationsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  9800. gensupport.SetOptions(c.urlParams_, opts...)
  9801. res, err := c.doRequest("json")
  9802. if res != nil && res.StatusCode == http.StatusNotModified {
  9803. if res.Body != nil {
  9804. res.Body.Close()
  9805. }
  9806. return nil, &googleapi.Error{
  9807. Code: res.StatusCode,
  9808. Header: res.Header,
  9809. }
  9810. }
  9811. if err != nil {
  9812. return nil, err
  9813. }
  9814. defer googleapi.CloseBody(res)
  9815. if err := googleapi.CheckResponse(res); err != nil {
  9816. return nil, err
  9817. }
  9818. ret := &Job{
  9819. ServerResponse: googleapi.ServerResponse{
  9820. Header: res.Header,
  9821. HTTPStatusCode: res.StatusCode,
  9822. },
  9823. }
  9824. target := &ret
  9825. if err := gensupport.DecodeResponse(target, res); err != nil {
  9826. return nil, err
  9827. }
  9828. return ret, nil
  9829. // {
  9830. // "description": "Creates a Cloud Dataflow job from a template.",
  9831. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates",
  9832. // "httpMethod": "POST",
  9833. // "id": "dataflow.projects.locations.templates.create",
  9834. // "parameterOrder": [
  9835. // "projectId",
  9836. // "location"
  9837. // ],
  9838. // "parameters": {
  9839. // "location": {
  9840. // "description": "The location to which to direct the request.",
  9841. // "location": "path",
  9842. // "required": true,
  9843. // "type": "string"
  9844. // },
  9845. // "projectId": {
  9846. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  9847. // "location": "path",
  9848. // "required": true,
  9849. // "type": "string"
  9850. // }
  9851. // },
  9852. // "path": "v1b3/projects/{projectId}/locations/{location}/templates",
  9853. // "request": {
  9854. // "$ref": "CreateJobFromTemplateRequest"
  9855. // },
  9856. // "response": {
  9857. // "$ref": "Job"
  9858. // },
  9859. // "scopes": [
  9860. // "https://www.googleapis.com/auth/cloud-platform",
  9861. // "https://www.googleapis.com/auth/compute",
  9862. // "https://www.googleapis.com/auth/compute.readonly",
  9863. // "https://www.googleapis.com/auth/userinfo.email"
  9864. // ]
  9865. // }
  9866. }
  9867. // method id "dataflow.projects.locations.templates.get":
  9868. type ProjectsLocationsTemplatesGetCall struct {
  9869. s *Service
  9870. projectId string
  9871. location string
  9872. urlParams_ gensupport.URLParams
  9873. ifNoneMatch_ string
  9874. ctx_ context.Context
  9875. header_ http.Header
  9876. }
  9877. // Get: Get the template associated with a template.
  9878. func (r *ProjectsLocationsTemplatesService) Get(projectId string, location string) *ProjectsLocationsTemplatesGetCall {
  9879. c := &ProjectsLocationsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9880. c.projectId = projectId
  9881. c.location = location
  9882. return c
  9883. }
  9884. // GcsPath sets the optional parameter "gcsPath": Required. A Cloud
  9885. // Storage path to the template from which to
  9886. // create the job.
  9887. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  9888. func (c *ProjectsLocationsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesGetCall {
  9889. c.urlParams_.Set("gcsPath", gcsPath)
  9890. return c
  9891. }
  9892. // View sets the optional parameter "view": The view to retrieve.
  9893. // Defaults to METADATA_ONLY.
  9894. //
  9895. // Possible values:
  9896. // "METADATA_ONLY"
  9897. func (c *ProjectsLocationsTemplatesGetCall) View(view string) *ProjectsLocationsTemplatesGetCall {
  9898. c.urlParams_.Set("view", view)
  9899. return c
  9900. }
  9901. // Fields allows partial responses to be retrieved. See
  9902. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9903. // for more information.
  9904. func (c *ProjectsLocationsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesGetCall {
  9905. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9906. return c
  9907. }
  9908. // IfNoneMatch sets the optional parameter which makes the operation
  9909. // fail if the object's ETag matches the given value. This is useful for
  9910. // getting updates only after the object has changed since the last
  9911. // request. Use googleapi.IsNotModified to check whether the response
  9912. // error from Do is the result of In-None-Match.
  9913. func (c *ProjectsLocationsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTemplatesGetCall {
  9914. c.ifNoneMatch_ = entityTag
  9915. return c
  9916. }
  9917. // Context sets the context to be used in this call's Do method. Any
  9918. // pending HTTP request will be aborted if the provided context is
  9919. // canceled.
  9920. func (c *ProjectsLocationsTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTemplatesGetCall {
  9921. c.ctx_ = ctx
  9922. return c
  9923. }
  9924. // Header returns an http.Header that can be modified by the caller to
  9925. // add HTTP headers to the request.
  9926. func (c *ProjectsLocationsTemplatesGetCall) Header() http.Header {
  9927. if c.header_ == nil {
  9928. c.header_ = make(http.Header)
  9929. }
  9930. return c.header_
  9931. }
  9932. func (c *ProjectsLocationsTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  9933. reqHeaders := make(http.Header)
  9934. for k, v := range c.header_ {
  9935. reqHeaders[k] = v
  9936. }
  9937. reqHeaders.Set("User-Agent", c.s.userAgent())
  9938. if c.ifNoneMatch_ != "" {
  9939. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9940. }
  9941. var body io.Reader = nil
  9942. c.urlParams_.Set("alt", alt)
  9943. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:get")
  9944. urls += "?" + c.urlParams_.Encode()
  9945. req, _ := http.NewRequest("GET", urls, body)
  9946. req.Header = reqHeaders
  9947. googleapi.Expand(req.URL, map[string]string{
  9948. "projectId": c.projectId,
  9949. "location": c.location,
  9950. })
  9951. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9952. }
  9953. // Do executes the "dataflow.projects.locations.templates.get" call.
  9954. // Exactly one of *GetTemplateResponse or error will be non-nil. Any
  9955. // non-2xx status code is an error. Response headers are in either
  9956. // *GetTemplateResponse.ServerResponse.Header or (if a response was
  9957. // returned at all) in error.(*googleapi.Error).Header. Use
  9958. // googleapi.IsNotModified to check whether the returned error was
  9959. // because http.StatusNotModified was returned.
  9960. func (c *ProjectsLocationsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) {
  9961. gensupport.SetOptions(c.urlParams_, opts...)
  9962. res, err := c.doRequest("json")
  9963. if res != nil && res.StatusCode == http.StatusNotModified {
  9964. if res.Body != nil {
  9965. res.Body.Close()
  9966. }
  9967. return nil, &googleapi.Error{
  9968. Code: res.StatusCode,
  9969. Header: res.Header,
  9970. }
  9971. }
  9972. if err != nil {
  9973. return nil, err
  9974. }
  9975. defer googleapi.CloseBody(res)
  9976. if err := googleapi.CheckResponse(res); err != nil {
  9977. return nil, err
  9978. }
  9979. ret := &GetTemplateResponse{
  9980. ServerResponse: googleapi.ServerResponse{
  9981. Header: res.Header,
  9982. HTTPStatusCode: res.StatusCode,
  9983. },
  9984. }
  9985. target := &ret
  9986. if err := gensupport.DecodeResponse(target, res); err != nil {
  9987. return nil, err
  9988. }
  9989. return ret, nil
  9990. // {
  9991. // "description": "Get the template associated with a template.",
  9992. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get",
  9993. // "httpMethod": "GET",
  9994. // "id": "dataflow.projects.locations.templates.get",
  9995. // "parameterOrder": [
  9996. // "projectId",
  9997. // "location"
  9998. // ],
  9999. // "parameters": {
  10000. // "gcsPath": {
  10001. // "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.",
  10002. // "location": "query",
  10003. // "type": "string"
  10004. // },
  10005. // "location": {
  10006. // "description": "The location to which to direct the request.",
  10007. // "location": "path",
  10008. // "required": true,
  10009. // "type": "string"
  10010. // },
  10011. // "projectId": {
  10012. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  10013. // "location": "path",
  10014. // "required": true,
  10015. // "type": "string"
  10016. // },
  10017. // "view": {
  10018. // "description": "The view to retrieve. Defaults to METADATA_ONLY.",
  10019. // "enum": [
  10020. // "METADATA_ONLY"
  10021. // ],
  10022. // "location": "query",
  10023. // "type": "string"
  10024. // }
  10025. // },
  10026. // "path": "v1b3/projects/{projectId}/locations/{location}/templates:get",
  10027. // "response": {
  10028. // "$ref": "GetTemplateResponse"
  10029. // },
  10030. // "scopes": [
  10031. // "https://www.googleapis.com/auth/cloud-platform",
  10032. // "https://www.googleapis.com/auth/compute",
  10033. // "https://www.googleapis.com/auth/compute.readonly",
  10034. // "https://www.googleapis.com/auth/userinfo.email"
  10035. // ]
  10036. // }
  10037. }
  10038. // method id "dataflow.projects.locations.templates.launch":
  10039. type ProjectsLocationsTemplatesLaunchCall struct {
  10040. s *Service
  10041. projectId string
  10042. location string
  10043. launchtemplateparameters *LaunchTemplateParameters
  10044. urlParams_ gensupport.URLParams
  10045. ctx_ context.Context
  10046. header_ http.Header
  10047. }
  10048. // Launch: Launch a template.
  10049. func (r *ProjectsLocationsTemplatesService) Launch(projectId string, location string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsLocationsTemplatesLaunchCall {
  10050. c := &ProjectsLocationsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10051. c.projectId = projectId
  10052. c.location = location
  10053. c.launchtemplateparameters = launchtemplateparameters
  10054. return c
  10055. }
  10056. // GcsPath sets the optional parameter "gcsPath": Required. A Cloud
  10057. // Storage path to the template from which to create
  10058. // the job.
  10059. // Must be valid Cloud Storage URL, beginning with 'gs://'.
  10060. func (c *ProjectsLocationsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesLaunchCall {
  10061. c.urlParams_.Set("gcsPath", gcsPath)
  10062. return c
  10063. }
  10064. // ValidateOnly sets the optional parameter "validateOnly": If true, the
  10065. // request is validated but not actually executed.
  10066. // Defaults to false.
  10067. func (c *ProjectsLocationsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTemplatesLaunchCall {
  10068. c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  10069. return c
  10070. }
  10071. // Fields allows partial responses to be retrieved. See
  10072. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10073. // for more information.
  10074. func (c *ProjectsLocationsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesLaunchCall {
  10075. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10076. return c
  10077. }
  10078. // Context sets the context to be used in this call's Do method. Any
  10079. // pending HTTP request will be aborted if the provided context is
  10080. // canceled.
  10081. func (c *ProjectsLocationsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsTemplatesLaunchCall {
  10082. c.ctx_ = ctx
  10083. return c
  10084. }
  10085. // Header returns an http.Header that can be modified by the caller to
  10086. // add HTTP headers to the request.
  10087. func (c *ProjectsLocationsTemplatesLaunchCall) Header() http.Header {
  10088. if c.header_ == nil {
  10089. c.header_ = make(http.Header)
  10090. }
  10091. return c.header_
  10092. }
  10093. func (c *ProjectsLocationsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) {
  10094. reqHeaders := make(http.Header)
  10095. for k, v := range c.header_ {
  10096. reqHeaders[k] = v
  10097. }
  10098. reqHeaders.Set("User-Agent", c.s.userAgent())
  10099. var body io.Reader = nil
  10100. body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters)
  10101. if err != nil {
  10102. return nil, err
  10103. }
  10104. reqHeaders.Set("Content-Type", "application/json")
  10105. c.urlParams_.Set("alt", alt)
  10106. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:launch")
  10107. urls += "?" + c.urlParams_.Encode()
  10108. req, _ := http.NewRequest("POST", urls, body)
  10109. req.Header = reqHeaders
  10110. googleapi.Expand(req.URL, map[string]string{
  10111. "projectId": c.projectId,
  10112. "location": c.location,
  10113. })
  10114. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10115. }
  10116. // Do executes the "dataflow.projects.locations.templates.launch" call.
  10117. // Exactly one of *LaunchTemplateResponse or error will be non-nil. Any
  10118. // non-2xx status code is an error. Response headers are in either
  10119. // *LaunchTemplateResponse.ServerResponse.Header or (if a response was
  10120. // returned at all) in error.(*googleapi.Error).Header. Use
  10121. // googleapi.IsNotModified to check whether the returned error was
  10122. // because http.StatusNotModified was returned.
  10123. func (c *ProjectsLocationsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) {
  10124. gensupport.SetOptions(c.urlParams_, opts...)
  10125. res, err := c.doRequest("json")
  10126. if res != nil && res.StatusCode == http.StatusNotModified {
  10127. if res.Body != nil {
  10128. res.Body.Close()
  10129. }
  10130. return nil, &googleapi.Error{
  10131. Code: res.StatusCode,
  10132. Header: res.Header,
  10133. }
  10134. }
  10135. if err != nil {
  10136. return nil, err
  10137. }
  10138. defer googleapi.CloseBody(res)
  10139. if err := googleapi.CheckResponse(res); err != nil {
  10140. return nil, err
  10141. }
  10142. ret := &LaunchTemplateResponse{
  10143. ServerResponse: googleapi.ServerResponse{
  10144. Header: res.Header,
  10145. HTTPStatusCode: res.StatusCode,
  10146. },
  10147. }
  10148. target := &ret
  10149. if err := gensupport.DecodeResponse(target, res); err != nil {
  10150. return nil, err
  10151. }
  10152. return ret, nil
  10153. // {
  10154. // "description": "Launch a template.",
  10155. // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch",
  10156. // "httpMethod": "POST",
  10157. // "id": "dataflow.projects.locations.templates.launch",
  10158. // "parameterOrder": [
  10159. // "projectId",
  10160. // "location"
  10161. // ],
  10162. // "parameters": {
  10163. // "gcsPath": {
  10164. // "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.",
  10165. // "location": "query",
  10166. // "type": "string"
  10167. // },
  10168. // "location": {
  10169. // "description": "The location to which to direct the request.",
  10170. // "location": "path",
  10171. // "required": true,
  10172. // "type": "string"
  10173. // },
  10174. // "projectId": {
  10175. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  10176. // "location": "path",
  10177. // "required": true,
  10178. // "type": "string"
  10179. // },
  10180. // "validateOnly": {
  10181. // "description": "If true, the request is validated but not actually executed.\nDefaults to false.",
  10182. // "location": "query",
  10183. // "type": "boolean"
  10184. // }
  10185. // },
  10186. // "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch",
  10187. // "request": {
  10188. // "$ref": "LaunchTemplateParameters"
  10189. // },
  10190. // "response": {
  10191. // "$ref": "LaunchTemplateResponse"
  10192. // },
  10193. // "scopes": [
  10194. // "https://www.googleapis.com/auth/cloud-platform",
  10195. // "https://www.googleapis.com/auth/compute",
  10196. // "https://www.googleapis.com/auth/compute.readonly",
  10197. // "https://www.googleapis.com/auth/userinfo.email"
  10198. // ]
  10199. // }
  10200. }
  10201. // method id "dataflow.projects.templates.create":
  10202. type ProjectsTemplatesCreateCall struct {
  10203. s *Service
  10204. projectId string
  10205. createjobfromtemplaterequest *CreateJobFromTemplateRequest
  10206. urlParams_ gensupport.URLParams
  10207. ctx_ context.Context
  10208. header_ http.Header
  10209. }
  10210. // Create: Creates a Cloud Dataflow job from a template.
  10211. func (r *ProjectsTemplatesService) Create(projectId string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsTemplatesCreateCall {
  10212. c := &ProjectsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10213. c.projectId = projectId
  10214. c.createjobfromtemplaterequest = createjobfromtemplaterequest
  10215. return c
  10216. }
  10217. // Fields allows partial responses to be retrieved. See
  10218. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10219. // for more information.
  10220. func (c *ProjectsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsTemplatesCreateCall {
  10221. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10222. return c
  10223. }
  10224. // Context sets the context to be used in this call's Do method. Any
  10225. // pending HTTP request will be aborted if the provided context is
  10226. // canceled.
  10227. func (c *ProjectsTemplatesCreateCall) Context(ctx context.Context) *ProjectsTemplatesCreateCall {
  10228. c.ctx_ = ctx
  10229. return c
  10230. }
  10231. // Header returns an http.Header that can be modified by the caller to
  10232. // add HTTP headers to the request.
  10233. func (c *ProjectsTemplatesCreateCall) Header() http.Header {
  10234. if c.header_ == nil {
  10235. c.header_ = make(http.Header)
  10236. }
  10237. return c.header_
  10238. }
  10239. func (c *ProjectsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
  10240. reqHeaders := make(http.Header)
  10241. for k, v := range c.header_ {
  10242. reqHeaders[k] = v
  10243. }
  10244. reqHeaders.Set("User-Agent", c.s.userAgent())
  10245. var body io.Reader = nil
  10246. body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest)
  10247. if err != nil {
  10248. return nil, err
  10249. }
  10250. reqHeaders.Set("Content-Type", "application/json")
  10251. c.urlParams_.Set("alt", alt)
  10252. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates")
  10253. urls += "?" + c.urlParams_.Encode()
  10254. req, _ := http.NewRequest("POST", urls, body)
  10255. req.Header = reqHeaders
  10256. googleapi.Expand(req.URL, map[string]string{
  10257. "projectId": c.projectId,
  10258. })
  10259. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10260. }
  10261. // Do executes the "dataflow.projects.templates.create" call.
  10262. // Exactly one of *Job or error will be non-nil. Any non-2xx status code
  10263. // is an error. Response headers are in either
  10264. // *Job.ServerResponse.Header or (if a response was returned at all) in
  10265. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10266. // whether the returned error was because http.StatusNotModified was
  10267. // returned.
  10268. func (c *ProjectsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
  10269. gensupport.SetOptions(c.urlParams_, opts...)
  10270. res, err := c.doRequest("json")
  10271. if res != nil && res.StatusCode == http.StatusNotModified {
  10272. if res.Body != nil {
  10273. res.Body.Close()
  10274. }
  10275. return nil, &googleapi.Error{
  10276. Code: res.StatusCode,
  10277. Header: res.Header,
  10278. }
  10279. }
  10280. if err != nil {
  10281. return nil, err
  10282. }
  10283. defer googleapi.CloseBody(res)
  10284. if err := googleapi.CheckResponse(res); err != nil {
  10285. return nil, err
  10286. }
  10287. ret := &Job{
  10288. ServerResponse: googleapi.ServerResponse{
  10289. Header: res.Header,
  10290. HTTPStatusCode: res.StatusCode,
  10291. },
  10292. }
  10293. target := &ret
  10294. if err := gensupport.DecodeResponse(target, res); err != nil {
  10295. return nil, err
  10296. }
  10297. return ret, nil
  10298. // {
  10299. // "description": "Creates a Cloud Dataflow job from a template.",
  10300. // "flatPath": "v1b3/projects/{projectId}/templates",
  10301. // "httpMethod": "POST",
  10302. // "id": "dataflow.projects.templates.create",
  10303. // "parameterOrder": [
  10304. // "projectId"
  10305. // ],
  10306. // "parameters": {
  10307. // "projectId": {
  10308. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  10309. // "location": "path",
  10310. // "required": true,
  10311. // "type": "string"
  10312. // }
  10313. // },
  10314. // "path": "v1b3/projects/{projectId}/templates",
  10315. // "request": {
  10316. // "$ref": "CreateJobFromTemplateRequest"
  10317. // },
  10318. // "response": {
  10319. // "$ref": "Job"
  10320. // },
  10321. // "scopes": [
  10322. // "https://www.googleapis.com/auth/cloud-platform",
  10323. // "https://www.googleapis.com/auth/compute",
  10324. // "https://www.googleapis.com/auth/compute.readonly",
  10325. // "https://www.googleapis.com/auth/userinfo.email"
  10326. // ]
  10327. // }
  10328. }
  10329. // method id "dataflow.projects.templates.get":
  10330. type ProjectsTemplatesGetCall struct {
  10331. s *Service
  10332. projectId string
  10333. urlParams_ gensupport.URLParams
  10334. ifNoneMatch_ string
  10335. ctx_ context.Context
  10336. header_ http.Header
  10337. }
  10338. // Get: Get the template associated with a template.
  10339. func (r *ProjectsTemplatesService) Get(projectId string) *ProjectsTemplatesGetCall {
  10340. c := &ProjectsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10341. c.projectId = projectId
  10342. return c
  10343. }
  10344. // GcsPath sets the optional parameter "gcsPath": Required. A Cloud
  10345. // Storage path to the template from which to
  10346. // create the job.
  10347. // Must be a valid Cloud Storage URL, beginning with `gs://`.
  10348. func (c *ProjectsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsTemplatesGetCall {
  10349. c.urlParams_.Set("gcsPath", gcsPath)
  10350. return c
  10351. }
  10352. // Location sets the optional parameter "location": The location to
  10353. // which to direct the request.
  10354. func (c *ProjectsTemplatesGetCall) Location(location string) *ProjectsTemplatesGetCall {
  10355. c.urlParams_.Set("location", location)
  10356. return c
  10357. }
  10358. // View sets the optional parameter "view": The view to retrieve.
  10359. // Defaults to METADATA_ONLY.
  10360. //
  10361. // Possible values:
  10362. // "METADATA_ONLY"
  10363. func (c *ProjectsTemplatesGetCall) View(view string) *ProjectsTemplatesGetCall {
  10364. c.urlParams_.Set("view", view)
  10365. return c
  10366. }
  10367. // Fields allows partial responses to be retrieved. See
  10368. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10369. // for more information.
  10370. func (c *ProjectsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsTemplatesGetCall {
  10371. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10372. return c
  10373. }
  10374. // IfNoneMatch sets the optional parameter which makes the operation
  10375. // fail if the object's ETag matches the given value. This is useful for
  10376. // getting updates only after the object has changed since the last
  10377. // request. Use googleapi.IsNotModified to check whether the response
  10378. // error from Do is the result of In-None-Match.
  10379. func (c *ProjectsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsTemplatesGetCall {
  10380. c.ifNoneMatch_ = entityTag
  10381. return c
  10382. }
  10383. // Context sets the context to be used in this call's Do method. Any
  10384. // pending HTTP request will be aborted if the provided context is
  10385. // canceled.
  10386. func (c *ProjectsTemplatesGetCall) Context(ctx context.Context) *ProjectsTemplatesGetCall {
  10387. c.ctx_ = ctx
  10388. return c
  10389. }
  10390. // Header returns an http.Header that can be modified by the caller to
  10391. // add HTTP headers to the request.
  10392. func (c *ProjectsTemplatesGetCall) Header() http.Header {
  10393. if c.header_ == nil {
  10394. c.header_ = make(http.Header)
  10395. }
  10396. return c.header_
  10397. }
  10398. func (c *ProjectsTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
  10399. reqHeaders := make(http.Header)
  10400. for k, v := range c.header_ {
  10401. reqHeaders[k] = v
  10402. }
  10403. reqHeaders.Set("User-Agent", c.s.userAgent())
  10404. if c.ifNoneMatch_ != "" {
  10405. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10406. }
  10407. var body io.Reader = nil
  10408. c.urlParams_.Set("alt", alt)
  10409. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:get")
  10410. urls += "?" + c.urlParams_.Encode()
  10411. req, _ := http.NewRequest("GET", urls, body)
  10412. req.Header = reqHeaders
  10413. googleapi.Expand(req.URL, map[string]string{
  10414. "projectId": c.projectId,
  10415. })
  10416. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10417. }
  10418. // Do executes the "dataflow.projects.templates.get" call.
  10419. // Exactly one of *GetTemplateResponse or error will be non-nil. Any
  10420. // non-2xx status code is an error. Response headers are in either
  10421. // *GetTemplateResponse.ServerResponse.Header or (if a response was
  10422. // returned at all) in error.(*googleapi.Error).Header. Use
  10423. // googleapi.IsNotModified to check whether the returned error was
  10424. // because http.StatusNotModified was returned.
  10425. func (c *ProjectsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) {
  10426. gensupport.SetOptions(c.urlParams_, opts...)
  10427. res, err := c.doRequest("json")
  10428. if res != nil && res.StatusCode == http.StatusNotModified {
  10429. if res.Body != nil {
  10430. res.Body.Close()
  10431. }
  10432. return nil, &googleapi.Error{
  10433. Code: res.StatusCode,
  10434. Header: res.Header,
  10435. }
  10436. }
  10437. if err != nil {
  10438. return nil, err
  10439. }
  10440. defer googleapi.CloseBody(res)
  10441. if err := googleapi.CheckResponse(res); err != nil {
  10442. return nil, err
  10443. }
  10444. ret := &GetTemplateResponse{
  10445. ServerResponse: googleapi.ServerResponse{
  10446. Header: res.Header,
  10447. HTTPStatusCode: res.StatusCode,
  10448. },
  10449. }
  10450. target := &ret
  10451. if err := gensupport.DecodeResponse(target, res); err != nil {
  10452. return nil, err
  10453. }
  10454. return ret, nil
  10455. // {
  10456. // "description": "Get the template associated with a template.",
  10457. // "flatPath": "v1b3/projects/{projectId}/templates:get",
  10458. // "httpMethod": "GET",
  10459. // "id": "dataflow.projects.templates.get",
  10460. // "parameterOrder": [
  10461. // "projectId"
  10462. // ],
  10463. // "parameters": {
  10464. // "gcsPath": {
  10465. // "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.",
  10466. // "location": "query",
  10467. // "type": "string"
  10468. // },
  10469. // "location": {
  10470. // "description": "The location to which to direct the request.",
  10471. // "location": "query",
  10472. // "type": "string"
  10473. // },
  10474. // "projectId": {
  10475. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  10476. // "location": "path",
  10477. // "required": true,
  10478. // "type": "string"
  10479. // },
  10480. // "view": {
  10481. // "description": "The view to retrieve. Defaults to METADATA_ONLY.",
  10482. // "enum": [
  10483. // "METADATA_ONLY"
  10484. // ],
  10485. // "location": "query",
  10486. // "type": "string"
  10487. // }
  10488. // },
  10489. // "path": "v1b3/projects/{projectId}/templates:get",
  10490. // "response": {
  10491. // "$ref": "GetTemplateResponse"
  10492. // },
  10493. // "scopes": [
  10494. // "https://www.googleapis.com/auth/cloud-platform",
  10495. // "https://www.googleapis.com/auth/compute",
  10496. // "https://www.googleapis.com/auth/compute.readonly",
  10497. // "https://www.googleapis.com/auth/userinfo.email"
  10498. // ]
  10499. // }
  10500. }
  10501. // method id "dataflow.projects.templates.launch":
  10502. type ProjectsTemplatesLaunchCall struct {
  10503. s *Service
  10504. projectId string
  10505. launchtemplateparameters *LaunchTemplateParameters
  10506. urlParams_ gensupport.URLParams
  10507. ctx_ context.Context
  10508. header_ http.Header
  10509. }
  10510. // Launch: Launch a template.
  10511. func (r *ProjectsTemplatesService) Launch(projectId string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsTemplatesLaunchCall {
  10512. c := &ProjectsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10513. c.projectId = projectId
  10514. c.launchtemplateparameters = launchtemplateparameters
  10515. return c
  10516. }
  10517. // GcsPath sets the optional parameter "gcsPath": Required. A Cloud
  10518. // Storage path to the template from which to create
  10519. // the job.
  10520. // Must be valid Cloud Storage URL, beginning with 'gs://'.
  10521. func (c *ProjectsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsTemplatesLaunchCall {
  10522. c.urlParams_.Set("gcsPath", gcsPath)
  10523. return c
  10524. }
  10525. // Location sets the optional parameter "location": The location to
  10526. // which to direct the request.
  10527. func (c *ProjectsTemplatesLaunchCall) Location(location string) *ProjectsTemplatesLaunchCall {
  10528. c.urlParams_.Set("location", location)
  10529. return c
  10530. }
  10531. // ValidateOnly sets the optional parameter "validateOnly": If true, the
  10532. // request is validated but not actually executed.
  10533. // Defaults to false.
  10534. func (c *ProjectsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsTemplatesLaunchCall {
  10535. c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  10536. return c
  10537. }
  10538. // Fields allows partial responses to be retrieved. See
  10539. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10540. // for more information.
  10541. func (c *ProjectsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsTemplatesLaunchCall {
  10542. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10543. return c
  10544. }
  10545. // Context sets the context to be used in this call's Do method. Any
  10546. // pending HTTP request will be aborted if the provided context is
  10547. // canceled.
  10548. func (c *ProjectsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsTemplatesLaunchCall {
  10549. c.ctx_ = ctx
  10550. return c
  10551. }
  10552. // Header returns an http.Header that can be modified by the caller to
  10553. // add HTTP headers to the request.
  10554. func (c *ProjectsTemplatesLaunchCall) Header() http.Header {
  10555. if c.header_ == nil {
  10556. c.header_ = make(http.Header)
  10557. }
  10558. return c.header_
  10559. }
  10560. func (c *ProjectsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) {
  10561. reqHeaders := make(http.Header)
  10562. for k, v := range c.header_ {
  10563. reqHeaders[k] = v
  10564. }
  10565. reqHeaders.Set("User-Agent", c.s.userAgent())
  10566. var body io.Reader = nil
  10567. body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters)
  10568. if err != nil {
  10569. return nil, err
  10570. }
  10571. reqHeaders.Set("Content-Type", "application/json")
  10572. c.urlParams_.Set("alt", alt)
  10573. urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:launch")
  10574. urls += "?" + c.urlParams_.Encode()
  10575. req, _ := http.NewRequest("POST", urls, body)
  10576. req.Header = reqHeaders
  10577. googleapi.Expand(req.URL, map[string]string{
  10578. "projectId": c.projectId,
  10579. })
  10580. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10581. }
  10582. // Do executes the "dataflow.projects.templates.launch" call.
  10583. // Exactly one of *LaunchTemplateResponse or error will be non-nil. Any
  10584. // non-2xx status code is an error. Response headers are in either
  10585. // *LaunchTemplateResponse.ServerResponse.Header or (if a response was
  10586. // returned at all) in error.(*googleapi.Error).Header. Use
  10587. // googleapi.IsNotModified to check whether the returned error was
  10588. // because http.StatusNotModified was returned.
  10589. func (c *ProjectsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) {
  10590. gensupport.SetOptions(c.urlParams_, opts...)
  10591. res, err := c.doRequest("json")
  10592. if res != nil && res.StatusCode == http.StatusNotModified {
  10593. if res.Body != nil {
  10594. res.Body.Close()
  10595. }
  10596. return nil, &googleapi.Error{
  10597. Code: res.StatusCode,
  10598. Header: res.Header,
  10599. }
  10600. }
  10601. if err != nil {
  10602. return nil, err
  10603. }
  10604. defer googleapi.CloseBody(res)
  10605. if err := googleapi.CheckResponse(res); err != nil {
  10606. return nil, err
  10607. }
  10608. ret := &LaunchTemplateResponse{
  10609. ServerResponse: googleapi.ServerResponse{
  10610. Header: res.Header,
  10611. HTTPStatusCode: res.StatusCode,
  10612. },
  10613. }
  10614. target := &ret
  10615. if err := gensupport.DecodeResponse(target, res); err != nil {
  10616. return nil, err
  10617. }
  10618. return ret, nil
  10619. // {
  10620. // "description": "Launch a template.",
  10621. // "flatPath": "v1b3/projects/{projectId}/templates:launch",
  10622. // "httpMethod": "POST",
  10623. // "id": "dataflow.projects.templates.launch",
  10624. // "parameterOrder": [
  10625. // "projectId"
  10626. // ],
  10627. // "parameters": {
  10628. // "gcsPath": {
  10629. // "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.",
  10630. // "location": "query",
  10631. // "type": "string"
  10632. // },
  10633. // "location": {
  10634. // "description": "The location to which to direct the request.",
  10635. // "location": "query",
  10636. // "type": "string"
  10637. // },
  10638. // "projectId": {
  10639. // "description": "Required. The ID of the Cloud Platform project that the job belongs to.",
  10640. // "location": "path",
  10641. // "required": true,
  10642. // "type": "string"
  10643. // },
  10644. // "validateOnly": {
  10645. // "description": "If true, the request is validated but not actually executed.\nDefaults to false.",
  10646. // "location": "query",
  10647. // "type": "boolean"
  10648. // }
  10649. // },
  10650. // "path": "v1b3/projects/{projectId}/templates:launch",
  10651. // "request": {
  10652. // "$ref": "LaunchTemplateParameters"
  10653. // },
  10654. // "response": {
  10655. // "$ref": "LaunchTemplateResponse"
  10656. // },
  10657. // "scopes": [
  10658. // "https://www.googleapis.com/auth/cloud-platform",
  10659. // "https://www.googleapis.com/auth/compute",
  10660. // "https://www.googleapis.com/auth/compute.readonly",
  10661. // "https://www.googleapis.com/auth/userinfo.email"
  10662. // ]
  10663. // }
  10664. }