1// Copyright 2021 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package dataflow provides access to the Dataflow API. 8// 9// For product documentation, see: https://cloud.google.com/dataflow 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/dataflow/v1b3" 16// ... 17// ctx := context.Background() 18// dataflowService, err := dataflow.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// dataflowService, err := dataflow.NewService(ctx, option.WithScopes(dataflow.UserinfoEmailScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// dataflowService, err := dataflow.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// dataflowService, err := dataflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package dataflow // import "google.golang.org/api/dataflow/v1b3" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "dataflow:v1b3" 79const apiName = "dataflow" 80const apiVersion = "v1b3" 81const basePath = "https://dataflow.googleapis.com/" 82const mtlsBasePath = "https://dataflow.mtls.googleapis.com/" 83 84// OAuth2 scopes used by this API. 85const ( 86 // See, edit, configure, and delete your Google Cloud Platform data 87 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 88 89 // View and manage your Google Compute Engine resources 90 ComputeScope = "https://www.googleapis.com/auth/compute" 91 92 // View your Google Compute Engine resources 93 ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" 94 95 // View your email address 96 UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" 97) 98 99// NewService creates a new Service. 100func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 101 scopesOption := option.WithScopes( 102 "https://www.googleapis.com/auth/cloud-platform", 103 "https://www.googleapis.com/auth/compute", 104 "https://www.googleapis.com/auth/compute.readonly", 105 "https://www.googleapis.com/auth/userinfo.email", 106 ) 107 // NOTE: prepend, so we don't override user-specified scopes. 108 opts = append([]option.ClientOption{scopesOption}, opts...) 109 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 110 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 111 client, endpoint, err := htransport.NewClient(ctx, opts...) 112 if err != nil { 113 return nil, err 114 } 115 s, err := New(client) 116 if err != nil { 117 return nil, err 118 } 119 if endpoint != "" { 120 s.BasePath = endpoint 121 } 122 return s, nil 123} 124 125// New creates a new Service. It uses the provided http.Client for requests. 126// 127// Deprecated: please use NewService instead. 128// To provide a custom HTTP client, use option.WithHTTPClient. 129// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 130func New(client *http.Client) (*Service, error) { 131 if client == nil { 132 return nil, errors.New("client is nil") 133 } 134 s := &Service{client: client, BasePath: basePath} 135 s.Projects = NewProjectsService(s) 136 return s, nil 137} 138 139type Service struct { 140 client *http.Client 141 BasePath string // API endpoint base URL 142 UserAgent string // optional additional User-Agent fragment 143 144 Projects *ProjectsService 145} 146 147func (s *Service) userAgent() string { 148 if s.UserAgent == "" { 149 return googleapi.UserAgent 150 } 151 return googleapi.UserAgent + " " + s.UserAgent 152} 153 154func NewProjectsService(s *Service) *ProjectsService { 155 rs := &ProjectsService{s: s} 156 rs.Jobs = NewProjectsJobsService(s) 157 rs.Locations = NewProjectsLocationsService(s) 158 rs.Snapshots = NewProjectsSnapshotsService(s) 159 rs.Templates = NewProjectsTemplatesService(s) 160 return rs 161} 162 163type ProjectsService struct { 164 s *Service 165 166 Jobs *ProjectsJobsService 167 168 Locations *ProjectsLocationsService 169 170 Snapshots *ProjectsSnapshotsService 171 172 Templates *ProjectsTemplatesService 173} 174 175func NewProjectsJobsService(s *Service) *ProjectsJobsService { 176 rs := &ProjectsJobsService{s: s} 177 rs.Debug = NewProjectsJobsDebugService(s) 178 rs.Messages = NewProjectsJobsMessagesService(s) 179 rs.WorkItems = NewProjectsJobsWorkItemsService(s) 180 return rs 181} 182 183type ProjectsJobsService struct { 184 s *Service 185 186 Debug *ProjectsJobsDebugService 187 188 Messages *ProjectsJobsMessagesService 189 190 WorkItems *ProjectsJobsWorkItemsService 191} 192 193func NewProjectsJobsDebugService(s *Service) *ProjectsJobsDebugService { 194 rs := &ProjectsJobsDebugService{s: s} 195 return rs 196} 197 198type ProjectsJobsDebugService struct { 199 s *Service 200} 201 202func NewProjectsJobsMessagesService(s *Service) *ProjectsJobsMessagesService { 203 rs := &ProjectsJobsMessagesService{s: s} 204 return rs 205} 206 207type ProjectsJobsMessagesService struct { 208 s *Service 209} 210 211func NewProjectsJobsWorkItemsService(s *Service) *ProjectsJobsWorkItemsService { 212 rs := &ProjectsJobsWorkItemsService{s: s} 213 return rs 214} 215 216type ProjectsJobsWorkItemsService struct { 217 s *Service 218} 219 220func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 221 rs := &ProjectsLocationsService{s: s} 222 rs.FlexTemplates = NewProjectsLocationsFlexTemplatesService(s) 223 rs.Jobs = NewProjectsLocationsJobsService(s) 224 rs.Snapshots = NewProjectsLocationsSnapshotsService(s) 225 rs.Sql = NewProjectsLocationsSqlService(s) 226 rs.Templates = NewProjectsLocationsTemplatesService(s) 227 return rs 228} 229 230type ProjectsLocationsService struct { 231 s *Service 232 233 FlexTemplates *ProjectsLocationsFlexTemplatesService 234 235 Jobs *ProjectsLocationsJobsService 236 237 Snapshots *ProjectsLocationsSnapshotsService 238 239 Sql *ProjectsLocationsSqlService 240 241 Templates *ProjectsLocationsTemplatesService 242} 243 244func NewProjectsLocationsFlexTemplatesService(s *Service) *ProjectsLocationsFlexTemplatesService { 245 rs := &ProjectsLocationsFlexTemplatesService{s: s} 246 return rs 247} 248 249type ProjectsLocationsFlexTemplatesService struct { 250 s *Service 251} 252 253func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService { 254 rs := &ProjectsLocationsJobsService{s: s} 255 rs.Debug = NewProjectsLocationsJobsDebugService(s) 256 rs.Messages = NewProjectsLocationsJobsMessagesService(s) 257 rs.Snapshots = NewProjectsLocationsJobsSnapshotsService(s) 258 rs.Stages = NewProjectsLocationsJobsStagesService(s) 259 rs.WorkItems = NewProjectsLocationsJobsWorkItemsService(s) 260 return rs 261} 262 263type ProjectsLocationsJobsService struct { 264 s *Service 265 266 Debug *ProjectsLocationsJobsDebugService 267 268 Messages *ProjectsLocationsJobsMessagesService 269 270 Snapshots *ProjectsLocationsJobsSnapshotsService 271 272 Stages *ProjectsLocationsJobsStagesService 273 274 WorkItems *ProjectsLocationsJobsWorkItemsService 275} 276 277func NewProjectsLocationsJobsDebugService(s *Service) *ProjectsLocationsJobsDebugService { 278 rs := &ProjectsLocationsJobsDebugService{s: s} 279 return rs 280} 281 282type ProjectsLocationsJobsDebugService struct { 283 s *Service 284} 285 286func NewProjectsLocationsJobsMessagesService(s *Service) *ProjectsLocationsJobsMessagesService { 287 rs := &ProjectsLocationsJobsMessagesService{s: s} 288 return rs 289} 290 291type ProjectsLocationsJobsMessagesService struct { 292 s *Service 293} 294 295func NewProjectsLocationsJobsSnapshotsService(s *Service) *ProjectsLocationsJobsSnapshotsService { 296 rs := &ProjectsLocationsJobsSnapshotsService{s: s} 297 return rs 298} 299 300type ProjectsLocationsJobsSnapshotsService struct { 301 s *Service 302} 303 304func NewProjectsLocationsJobsStagesService(s *Service) *ProjectsLocationsJobsStagesService { 305 rs := &ProjectsLocationsJobsStagesService{s: s} 306 return rs 307} 308 309type ProjectsLocationsJobsStagesService struct { 310 s *Service 311} 312 313func NewProjectsLocationsJobsWorkItemsService(s *Service) *ProjectsLocationsJobsWorkItemsService { 314 rs := &ProjectsLocationsJobsWorkItemsService{s: s} 315 return rs 316} 317 318type ProjectsLocationsJobsWorkItemsService struct { 319 s *Service 320} 321 322func NewProjectsLocationsSnapshotsService(s *Service) *ProjectsLocationsSnapshotsService { 323 rs := &ProjectsLocationsSnapshotsService{s: s} 324 return rs 325} 326 327type ProjectsLocationsSnapshotsService struct { 328 s *Service 329} 330 331func NewProjectsLocationsSqlService(s *Service) *ProjectsLocationsSqlService { 332 rs := &ProjectsLocationsSqlService{s: s} 333 return rs 334} 335 336type ProjectsLocationsSqlService struct { 337 s *Service 338} 339 340func NewProjectsLocationsTemplatesService(s *Service) *ProjectsLocationsTemplatesService { 341 rs := &ProjectsLocationsTemplatesService{s: s} 342 return rs 343} 344 345type ProjectsLocationsTemplatesService struct { 346 s *Service 347} 348 349func NewProjectsSnapshotsService(s *Service) *ProjectsSnapshotsService { 350 rs := &ProjectsSnapshotsService{s: s} 351 return rs 352} 353 354type ProjectsSnapshotsService struct { 355 s *Service 356} 357 358func NewProjectsTemplatesService(s *Service) *ProjectsTemplatesService { 359 rs := &ProjectsTemplatesService{s: s} 360 return rs 361} 362 363type ProjectsTemplatesService struct { 364 s *Service 365} 366 367// ApproximateProgress: Obsolete in favor of ApproximateReportedProgress 368// and ApproximateSplitRequest. 369type ApproximateProgress struct { 370 // PercentComplete: Obsolete. 371 PercentComplete float64 `json:"percentComplete,omitempty"` 372 373 // Position: Obsolete. 374 Position *Position `json:"position,omitempty"` 375 376 // RemainingTime: Obsolete. 377 RemainingTime string `json:"remainingTime,omitempty"` 378 379 // ForceSendFields is a list of field names (e.g. "PercentComplete") to 380 // unconditionally include in API requests. By default, fields with 381 // empty values are omitted from API requests. However, any non-pointer, 382 // non-interface field appearing in ForceSendFields will be sent to the 383 // server regardless of whether the field is empty or not. This may be 384 // used to include empty fields in Patch requests. 385 ForceSendFields []string `json:"-"` 386 387 // NullFields is a list of field names (e.g. "PercentComplete") to 388 // include in API requests with the JSON null value. By default, fields 389 // with empty values are omitted from API requests. However, any field 390 // with an empty value appearing in NullFields will be sent to the 391 // server as null. It is an error if a field in this list has a 392 // non-empty value. This may be used to include null fields in Patch 393 // requests. 394 NullFields []string `json:"-"` 395} 396 397func (s *ApproximateProgress) MarshalJSON() ([]byte, error) { 398 type NoMethod ApproximateProgress 399 raw := NoMethod(*s) 400 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 401} 402 403func (s *ApproximateProgress) UnmarshalJSON(data []byte) error { 404 type NoMethod ApproximateProgress 405 var s1 struct { 406 PercentComplete gensupport.JSONFloat64 `json:"percentComplete"` 407 *NoMethod 408 } 409 s1.NoMethod = (*NoMethod)(s) 410 if err := json.Unmarshal(data, &s1); err != nil { 411 return err 412 } 413 s.PercentComplete = float64(s1.PercentComplete) 414 return nil 415} 416 417// ApproximateReportedProgress: A progress measurement of a WorkItem by 418// a worker. 419type ApproximateReportedProgress struct { 420 // ConsumedParallelism: Total amount of parallelism in the portion of 421 // input of this task that has already been consumed and is no longer 422 // active. In the first two examples above (see remaining_parallelism), 423 // the value should be 29 or 2 respectively. The sum of 424 // remaining_parallelism and consumed_parallelism should equal the total 425 // amount of parallelism in this work item. If specified, must be 426 // finite. 427 ConsumedParallelism *ReportedParallelism `json:"consumedParallelism,omitempty"` 428 429 // FractionConsumed: Completion as fraction of the input consumed, from 430 // 0.0 (beginning, nothing consumed), to 1.0 (end of the input, entire 431 // input consumed). 432 FractionConsumed float64 `json:"fractionConsumed,omitempty"` 433 434 // Position: A Position within the work to represent a progress. 435 Position *Position `json:"position,omitempty"` 436 437 // RemainingParallelism: Total amount of parallelism in the input of 438 // this task that remains, (i.e. can be delegated to this task and any 439 // new tasks via dynamic splitting). Always at least 1 for non-finished 440 // work items and 0 for finished. "Amount of parallelism" refers to how 441 // many non-empty parts of the input can be read in parallel. This does 442 // not necessarily equal number of records. An input that can be read in 443 // parallel down to the individual records is called "perfectly 444 // splittable". An example of non-perfectly parallelizable input is a 445 // block-compressed file format where a block of records has to be read 446 // as a whole, but different blocks can be read in parallel. Examples: * 447 // If we are processing record #30 (starting at 1) out of 50 in a 448 // perfectly splittable 50-record input, this value should be 21 (20 449 // remaining + 1 current). * If we are reading through block 3 in a 450 // block-compressed file consisting of 5 blocks, this value should be 3 451 // (since blocks 4 and 5 can be processed in parallel by new tasks via 452 // dynamic splitting and the current task remains processing block 3). * 453 // If we are reading through the last block in a block-compressed file, 454 // or reading or processing the last record in a perfectly splittable 455 // input, this value should be 1, because apart from the current task, 456 // no additional remainder can be split off. 457 RemainingParallelism *ReportedParallelism `json:"remainingParallelism,omitempty"` 458 459 // ForceSendFields is a list of field names (e.g. "ConsumedParallelism") 460 // to unconditionally include in API requests. By default, fields with 461 // empty values are omitted from API requests. However, any non-pointer, 462 // non-interface field appearing in ForceSendFields will be sent to the 463 // server regardless of whether the field is empty or not. This may be 464 // used to include empty fields in Patch requests. 465 ForceSendFields []string `json:"-"` 466 467 // NullFields is a list of field names (e.g. "ConsumedParallelism") to 468 // include in API requests with the JSON null value. By default, fields 469 // with empty values are omitted from API requests. However, any field 470 // with an empty value appearing in NullFields will be sent to the 471 // server as null. It is an error if a field in this list has a 472 // non-empty value. This may be used to include null fields in Patch 473 // requests. 474 NullFields []string `json:"-"` 475} 476 477func (s *ApproximateReportedProgress) MarshalJSON() ([]byte, error) { 478 type NoMethod ApproximateReportedProgress 479 raw := NoMethod(*s) 480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 481} 482 483func (s *ApproximateReportedProgress) UnmarshalJSON(data []byte) error { 484 type NoMethod ApproximateReportedProgress 485 var s1 struct { 486 FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"` 487 *NoMethod 488 } 489 s1.NoMethod = (*NoMethod)(s) 490 if err := json.Unmarshal(data, &s1); err != nil { 491 return err 492 } 493 s.FractionConsumed = float64(s1.FractionConsumed) 494 return nil 495} 496 497// ApproximateSplitRequest: A suggestion by the service to the worker to 498// dynamically split the WorkItem. 499type ApproximateSplitRequest struct { 500 // FractionConsumed: A fraction at which to split the work item, from 501 // 0.0 (beginning of the input) to 1.0 (end of the input). 502 FractionConsumed float64 `json:"fractionConsumed,omitempty"` 503 504 // FractionOfRemainder: The fraction of the remainder of work to split 505 // the work item at, from 0.0 (split at the current position) to 1.0 506 // (end of the input). 507 FractionOfRemainder float64 `json:"fractionOfRemainder,omitempty"` 508 509 // Position: A Position at which to split the work item. 510 Position *Position `json:"position,omitempty"` 511 512 // ForceSendFields is a list of field names (e.g. "FractionConsumed") to 513 // unconditionally include in API requests. By default, fields with 514 // empty values are omitted from API requests. However, any non-pointer, 515 // non-interface field appearing in ForceSendFields will be sent to the 516 // server regardless of whether the field is empty or not. This may be 517 // used to include empty fields in Patch requests. 518 ForceSendFields []string `json:"-"` 519 520 // NullFields is a list of field names (e.g. "FractionConsumed") to 521 // include in API requests with the JSON null value. By default, fields 522 // with empty values are omitted from API requests. However, any field 523 // with an empty value appearing in NullFields will be sent to the 524 // server as null. It is an error if a field in this list has a 525 // non-empty value. This may be used to include null fields in Patch 526 // requests. 527 NullFields []string `json:"-"` 528} 529 530func (s *ApproximateSplitRequest) MarshalJSON() ([]byte, error) { 531 type NoMethod ApproximateSplitRequest 532 raw := NoMethod(*s) 533 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 534} 535 536func (s *ApproximateSplitRequest) UnmarshalJSON(data []byte) error { 537 type NoMethod ApproximateSplitRequest 538 var s1 struct { 539 FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"` 540 FractionOfRemainder gensupport.JSONFloat64 `json:"fractionOfRemainder"` 541 *NoMethod 542 } 543 s1.NoMethod = (*NoMethod)(s) 544 if err := json.Unmarshal(data, &s1); err != nil { 545 return err 546 } 547 s.FractionConsumed = float64(s1.FractionConsumed) 548 s.FractionOfRemainder = float64(s1.FractionOfRemainder) 549 return nil 550} 551 552// AutoscalingEvent: A structured message reporting an autoscaling 553// decision made by the Dataflow service. 554type AutoscalingEvent struct { 555 // CurrentNumWorkers: The current number of workers the job has. 556 CurrentNumWorkers int64 `json:"currentNumWorkers,omitempty,string"` 557 558 // Description: A message describing why the system decided to adjust 559 // the current number of workers, why it failed, or why the system 560 // decided to not make any changes to the number of workers. 561 Description *StructuredMessage `json:"description,omitempty"` 562 563 // EventType: The type of autoscaling event to report. 564 // 565 // Possible values: 566 // "TYPE_UNKNOWN" - Default type for the enum. Value should never be 567 // returned. 568 // "TARGET_NUM_WORKERS_CHANGED" - The TARGET_NUM_WORKERS_CHANGED type 569 // should be used when the target worker pool size has changed at the 570 // start of an actuation. An event should always be specified as 571 // TARGET_NUM_WORKERS_CHANGED if it reflects a change in the 572 // target_num_workers. 573 // "CURRENT_NUM_WORKERS_CHANGED" - The CURRENT_NUM_WORKERS_CHANGED 574 // type should be used when actual worker pool size has been changed, 575 // but the target_num_workers has not changed. 576 // "ACTUATION_FAILURE" - The ACTUATION_FAILURE type should be used 577 // when we want to report an error to the user indicating why the 578 // current number of workers in the pool could not be changed. Displayed 579 // in the current status and history widgets. 580 // "NO_CHANGE" - Used when we want to report to the user a reason why 581 // we are not currently adjusting the number of workers. Should specify 582 // both target_num_workers, current_num_workers and a decision_message. 583 EventType string `json:"eventType,omitempty"` 584 585 // TargetNumWorkers: The target number of workers the worker pool wants 586 // to resize to use. 587 TargetNumWorkers int64 `json:"targetNumWorkers,omitempty,string"` 588 589 // Time: The time this event was emitted to indicate a new target or 590 // current num_workers value. 591 Time string `json:"time,omitempty"` 592 593 // WorkerPool: A short and friendly name for the worker pool this event 594 // refers to, populated from the value of 595 // PoolStageRelation::user_pool_name. 596 WorkerPool string `json:"workerPool,omitempty"` 597 598 // ForceSendFields is a list of field names (e.g. "CurrentNumWorkers") 599 // to unconditionally include in API requests. By default, fields with 600 // empty values are omitted from API requests. However, any non-pointer, 601 // non-interface field appearing in ForceSendFields will be sent to the 602 // server regardless of whether the field is empty or not. This may be 603 // used to include empty fields in Patch requests. 604 ForceSendFields []string `json:"-"` 605 606 // NullFields is a list of field names (e.g. "CurrentNumWorkers") to 607 // include in API requests with the JSON null value. By default, fields 608 // with empty values are omitted from API requests. However, any field 609 // with an empty value appearing in NullFields will be sent to the 610 // server as null. It is an error if a field in this list has a 611 // non-empty value. This may be used to include null fields in Patch 612 // requests. 613 NullFields []string `json:"-"` 614} 615 616func (s *AutoscalingEvent) MarshalJSON() ([]byte, error) { 617 type NoMethod AutoscalingEvent 618 raw := NoMethod(*s) 619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 620} 621 622// AutoscalingSettings: Settings for WorkerPool autoscaling. 623type AutoscalingSettings struct { 624 // Algorithm: The algorithm to use for autoscaling. 625 // 626 // Possible values: 627 // "AUTOSCALING_ALGORITHM_UNKNOWN" - The algorithm is unknown, or 628 // unspecified. 629 // "AUTOSCALING_ALGORITHM_NONE" - Disable autoscaling. 630 // "AUTOSCALING_ALGORITHM_BASIC" - Increase worker count over time to 631 // reduce job execution time. 632 Algorithm string `json:"algorithm,omitempty"` 633 634 // MaxNumWorkers: The maximum number of workers to cap scaling at. 635 MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"` 636 637 // ForceSendFields is a list of field names (e.g. "Algorithm") to 638 // unconditionally include in API requests. By default, fields with 639 // empty values are omitted from API requests. However, any non-pointer, 640 // non-interface field appearing in ForceSendFields will be sent to the 641 // server regardless of whether the field is empty or not. This may be 642 // used to include empty fields in Patch requests. 643 ForceSendFields []string `json:"-"` 644 645 // NullFields is a list of field names (e.g. "Algorithm") to include in 646 // API requests with the JSON null value. By default, fields with empty 647 // values are omitted from API requests. However, any field with an 648 // empty value appearing in NullFields will be sent to the server as 649 // null. It is an error if a field in this list has a non-empty value. 650 // This may be used to include null fields in Patch requests. 651 NullFields []string `json:"-"` 652} 653 654func (s *AutoscalingSettings) MarshalJSON() ([]byte, error) { 655 type NoMethod AutoscalingSettings 656 raw := NoMethod(*s) 657 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 658} 659 660// BigQueryIODetails: Metadata for a BigQuery connector used by the job. 661type BigQueryIODetails struct { 662 // Dataset: Dataset accessed in the connection. 663 Dataset string `json:"dataset,omitempty"` 664 665 // ProjectId: Project accessed in the connection. 666 ProjectId string `json:"projectId,omitempty"` 667 668 // Query: Query used to access data in the connection. 669 Query string `json:"query,omitempty"` 670 671 // Table: Table accessed in the connection. 672 Table string `json:"table,omitempty"` 673 674 // ForceSendFields is a list of field names (e.g. "Dataset") to 675 // unconditionally include in API requests. By default, fields with 676 // empty values are omitted from API requests. However, any non-pointer, 677 // non-interface field appearing in ForceSendFields will be sent to the 678 // server regardless of whether the field is empty or not. This may be 679 // used to include empty fields in Patch requests. 680 ForceSendFields []string `json:"-"` 681 682 // NullFields is a list of field names (e.g. "Dataset") to include in 683 // API requests with the JSON null value. By default, fields with empty 684 // values are omitted from API requests. However, any field with an 685 // empty value appearing in NullFields will be sent to the server as 686 // null. It is an error if a field in this list has a non-empty value. 687 // This may be used to include null fields in Patch requests. 688 NullFields []string `json:"-"` 689} 690 691func (s *BigQueryIODetails) MarshalJSON() ([]byte, error) { 692 type NoMethod BigQueryIODetails 693 raw := NoMethod(*s) 694 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 695} 696 697// BigTableIODetails: Metadata for a Cloud BigTable connector used by 698// the job. 699type BigTableIODetails struct { 700 // InstanceId: InstanceId accessed in the connection. 701 InstanceId string `json:"instanceId,omitempty"` 702 703 // ProjectId: ProjectId accessed in the connection. 704 ProjectId string `json:"projectId,omitempty"` 705 706 // TableId: TableId accessed in the connection. 707 TableId string `json:"tableId,omitempty"` 708 709 // ForceSendFields is a list of field names (e.g. "InstanceId") to 710 // unconditionally include in API requests. By default, fields with 711 // empty values are omitted from API requests. However, any non-pointer, 712 // non-interface field appearing in ForceSendFields will be sent to the 713 // server regardless of whether the field is empty or not. This may be 714 // used to include empty fields in Patch requests. 715 ForceSendFields []string `json:"-"` 716 717 // NullFields is a list of field names (e.g. "InstanceId") to include in 718 // API requests with the JSON null value. By default, fields with empty 719 // values are omitted from API requests. However, any field with an 720 // empty value appearing in NullFields will be sent to the server as 721 // null. It is an error if a field in this list has a non-empty value. 722 // This may be used to include null fields in Patch requests. 723 NullFields []string `json:"-"` 724} 725 726func (s *BigTableIODetails) MarshalJSON() ([]byte, error) { 727 type NoMethod BigTableIODetails 728 raw := NoMethod(*s) 729 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 730} 731 732// CPUTime: Modeled after information exposed by /proc/stat. 733type CPUTime struct { 734 // Rate: Average CPU utilization rate (% non-idle cpu / second) since 735 // previous sample. 736 Rate float64 `json:"rate,omitempty"` 737 738 // Timestamp: Timestamp of the measurement. 739 Timestamp string `json:"timestamp,omitempty"` 740 741 // TotalMs: Total active CPU time across all cores (ie., non-idle) in 742 // milliseconds since start-up. 743 TotalMs uint64 `json:"totalMs,omitempty,string"` 744 745 // ForceSendFields is a list of field names (e.g. "Rate") to 746 // unconditionally include in API requests. By default, fields with 747 // empty values are omitted from API requests. However, any non-pointer, 748 // non-interface field appearing in ForceSendFields will be sent to the 749 // server regardless of whether the field is empty or not. This may be 750 // used to include empty fields in Patch requests. 751 ForceSendFields []string `json:"-"` 752 753 // NullFields is a list of field names (e.g. "Rate") to include in API 754 // requests with the JSON null value. By default, fields with empty 755 // values are omitted from API requests. However, any field with an 756 // empty value appearing in NullFields will be sent to the server as 757 // null. It is an error if a field in this list has a non-empty value. 758 // This may be used to include null fields in Patch requests. 759 NullFields []string `json:"-"` 760} 761 762func (s *CPUTime) MarshalJSON() ([]byte, error) { 763 type NoMethod CPUTime 764 raw := NoMethod(*s) 765 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 766} 767 768func (s *CPUTime) UnmarshalJSON(data []byte) error { 769 type NoMethod CPUTime 770 var s1 struct { 771 Rate gensupport.JSONFloat64 `json:"rate"` 772 *NoMethod 773 } 774 s1.NoMethod = (*NoMethod)(s) 775 if err := json.Unmarshal(data, &s1); err != nil { 776 return err 777 } 778 s.Rate = float64(s1.Rate) 779 return nil 780} 781 782// ComponentSource: Description of an interstitial value between 783// transforms in an execution stage. 784type ComponentSource struct { 785 // Name: Dataflow service generated name for this source. 786 Name string `json:"name,omitempty"` 787 788 // OriginalTransformOrCollection: User name for the original user 789 // transform or collection with which this source is most closely 790 // associated. 791 OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"` 792 793 // UserName: Human-readable name for this transform; may be user or 794 // system generated. 795 UserName string `json:"userName,omitempty"` 796 797 // ForceSendFields is a list of field names (e.g. "Name") to 798 // unconditionally include in API requests. By default, fields with 799 // empty values are omitted from API requests. However, any non-pointer, 800 // non-interface field appearing in ForceSendFields will be sent to the 801 // server regardless of whether the field is empty or not. This may be 802 // used to include empty fields in Patch requests. 803 ForceSendFields []string `json:"-"` 804 805 // NullFields is a list of field names (e.g. "Name") to include in API 806 // requests with the JSON null value. By default, fields with empty 807 // values are omitted from API requests. However, any field with an 808 // empty value appearing in NullFields will be sent to the server as 809 // null. It is an error if a field in this list has a non-empty value. 810 // This may be used to include null fields in Patch requests. 811 NullFields []string `json:"-"` 812} 813 814func (s *ComponentSource) MarshalJSON() ([]byte, error) { 815 type NoMethod ComponentSource 816 raw := NoMethod(*s) 817 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 818} 819 820// ComponentTransform: Description of a transform executed as part of an 821// execution stage. 822type ComponentTransform struct { 823 // Name: Dataflow service generated name for this source. 824 Name string `json:"name,omitempty"` 825 826 // OriginalTransform: User name for the original user transform with 827 // which this transform is most closely associated. 828 OriginalTransform string `json:"originalTransform,omitempty"` 829 830 // UserName: Human-readable name for this transform; may be user or 831 // system generated. 832 UserName string `json:"userName,omitempty"` 833 834 // ForceSendFields is a list of field names (e.g. "Name") to 835 // unconditionally include in API requests. By default, fields with 836 // empty values are omitted from API requests. However, any non-pointer, 837 // non-interface field appearing in ForceSendFields will be sent to the 838 // server regardless of whether the field is empty or not. This may be 839 // used to include empty fields in Patch requests. 840 ForceSendFields []string `json:"-"` 841 842 // NullFields is a list of field names (e.g. "Name") to include in API 843 // requests with the JSON null value. By default, fields with empty 844 // values are omitted from API requests. However, any field with an 845 // empty value appearing in NullFields will be sent to the server as 846 // null. It is an error if a field in this list has a non-empty value. 847 // This may be used to include null fields in Patch requests. 848 NullFields []string `json:"-"` 849} 850 851func (s *ComponentTransform) MarshalJSON() ([]byte, error) { 852 type NoMethod ComponentTransform 853 raw := NoMethod(*s) 854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 855} 856 857// ComputationTopology: All configuration data for a particular 858// Computation. 859type ComputationTopology struct { 860 // ComputationId: The ID of the computation. 861 ComputationId string `json:"computationId,omitempty"` 862 863 // Inputs: The inputs to the computation. 864 Inputs []*StreamLocation `json:"inputs,omitempty"` 865 866 // KeyRanges: The key ranges processed by the computation. 867 KeyRanges []*KeyRangeLocation `json:"keyRanges,omitempty"` 868 869 // Outputs: The outputs from the computation. 870 Outputs []*StreamLocation `json:"outputs,omitempty"` 871 872 // StateFamilies: The state family values. 873 StateFamilies []*StateFamilyConfig `json:"stateFamilies,omitempty"` 874 875 // SystemStageName: The system stage name. 876 SystemStageName string `json:"systemStageName,omitempty"` 877 878 // ForceSendFields is a list of field names (e.g. "ComputationId") to 879 // unconditionally include in API requests. By default, fields with 880 // empty values are omitted from API requests. However, any non-pointer, 881 // non-interface field appearing in ForceSendFields will be sent to the 882 // server regardless of whether the field is empty or not. This may be 883 // used to include empty fields in Patch requests. 884 ForceSendFields []string `json:"-"` 885 886 // NullFields is a list of field names (e.g. "ComputationId") to include 887 // in API requests with the JSON null value. By default, fields with 888 // empty values are omitted from API requests. However, any field with 889 // an empty value appearing in NullFields will be sent to the server as 890 // null. It is an error if a field in this list has a non-empty value. 891 // This may be used to include null fields in Patch requests. 892 NullFields []string `json:"-"` 893} 894 895func (s *ComputationTopology) MarshalJSON() ([]byte, error) { 896 type NoMethod ComputationTopology 897 raw := NoMethod(*s) 898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 899} 900 901// ConcatPosition: A position that encapsulates an inner position and an 902// index for the inner position. A ConcatPosition can be used by a 903// reader of a source that encapsulates a set of other sources. 904type ConcatPosition struct { 905 // Index: Index of the inner source. 906 Index int64 `json:"index,omitempty"` 907 908 // Position: Position within the inner source. 909 Position *Position `json:"position,omitempty"` 910 911 // ForceSendFields is a list of field names (e.g. "Index") 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 919 // NullFields is a list of field names (e.g. "Index") to include in API 920 // requests with the JSON null value. By default, fields with empty 921 // values are omitted from API requests. However, any field with an 922 // empty value appearing in NullFields will be sent to the server as 923 // null. It is an error if a field in this list has a non-empty value. 924 // This may be used to include null fields in Patch requests. 925 NullFields []string `json:"-"` 926} 927 928func (s *ConcatPosition) MarshalJSON() ([]byte, error) { 929 type NoMethod ConcatPosition 930 raw := NoMethod(*s) 931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 932} 933 934// ContainerSpec: Container Spec. 935type ContainerSpec struct { 936 // DefaultEnvironment: Default runtime environment for the job. 937 DefaultEnvironment *FlexTemplateRuntimeEnvironment `json:"defaultEnvironment,omitempty"` 938 939 // Image: Name of the docker container image. E.g., 940 // gcr.io/project/some-image 941 Image string `json:"image,omitempty"` 942 943 // Metadata: Metadata describing a template including description and 944 // validation rules. 945 Metadata *TemplateMetadata `json:"metadata,omitempty"` 946 947 // SdkInfo: Required. SDK info of the Flex Template. 948 SdkInfo *SDKInfo `json:"sdkInfo,omitempty"` 949 950 // ForceSendFields is a list of field names (e.g. "DefaultEnvironment") 951 // to unconditionally include in API requests. By default, fields with 952 // empty values are omitted from API requests. However, any non-pointer, 953 // non-interface field appearing in ForceSendFields will be sent to the 954 // server regardless of whether the field is empty or not. This may be 955 // used to include empty fields in Patch requests. 956 ForceSendFields []string `json:"-"` 957 958 // NullFields is a list of field names (e.g. "DefaultEnvironment") to 959 // include in API requests with the JSON null value. By default, fields 960 // with empty values are omitted from API requests. However, any field 961 // with an empty value appearing in NullFields will be sent to the 962 // server as null. It is an error if a field in this list has a 963 // non-empty value. This may be used to include null fields in Patch 964 // requests. 965 NullFields []string `json:"-"` 966} 967 968func (s *ContainerSpec) MarshalJSON() ([]byte, error) { 969 type NoMethod ContainerSpec 970 raw := NoMethod(*s) 971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 972} 973 974// CounterMetadata: CounterMetadata includes all static non-name 975// non-value counter attributes. 976type CounterMetadata struct { 977 // Description: Human-readable description of the counter semantics. 978 Description string `json:"description,omitempty"` 979 980 // Kind: Counter aggregation kind. 981 // 982 // Possible values: 983 // "INVALID" - Counter aggregation kind was not set. 984 // "SUM" - Aggregated value is the sum of all contributed values. 985 // "MAX" - Aggregated value is the max of all contributed values. 986 // "MIN" - Aggregated value is the min of all contributed values. 987 // "MEAN" - Aggregated value is the mean of all contributed values. 988 // "OR" - Aggregated value represents the logical 'or' of all 989 // contributed values. 990 // "AND" - Aggregated value represents the logical 'and' of all 991 // contributed values. 992 // "SET" - Aggregated value is a set of unique contributed values. 993 // "DISTRIBUTION" - Aggregated value captures statistics about a 994 // distribution. 995 // "LATEST_VALUE" - Aggregated value tracks the latest value of a 996 // variable. 997 Kind string `json:"kind,omitempty"` 998 999 // OtherUnits: A string referring to the unit type. 1000 OtherUnits string `json:"otherUnits,omitempty"` 1001 1002 // StandardUnits: System defined Units, see above enum. 1003 // 1004 // Possible values: 1005 // "BYTES" - Counter returns a value in bytes. 1006 // "BYTES_PER_SEC" - Counter returns a value in bytes per second. 1007 // "MILLISECONDS" - Counter returns a value in milliseconds. 1008 // "MICROSECONDS" - Counter returns a value in microseconds. 1009 // "NANOSECONDS" - Counter returns a value in nanoseconds. 1010 // "TIMESTAMP_MSEC" - Counter returns a timestamp in milliseconds. 1011 // "TIMESTAMP_USEC" - Counter returns a timestamp in microseconds. 1012 // "TIMESTAMP_NSEC" - Counter returns a timestamp in nanoseconds. 1013 StandardUnits string `json:"standardUnits,omitempty"` 1014 1015 // ForceSendFields is a list of field names (e.g. "Description") to 1016 // unconditionally include in API requests. By default, fields with 1017 // empty values are omitted from API requests. However, any non-pointer, 1018 // non-interface field appearing in ForceSendFields will be sent to the 1019 // server regardless of whether the field is empty or not. This may be 1020 // used to include empty fields in Patch requests. 1021 ForceSendFields []string `json:"-"` 1022 1023 // NullFields is a list of field names (e.g. "Description") to include 1024 // in API requests with the JSON null value. By default, fields with 1025 // empty values are omitted from API requests. However, any field with 1026 // an empty value appearing in NullFields will be sent to the server as 1027 // null. It is an error if a field in this list has a non-empty value. 1028 // This may be used to include null fields in Patch requests. 1029 NullFields []string `json:"-"` 1030} 1031 1032func (s *CounterMetadata) MarshalJSON() ([]byte, error) { 1033 type NoMethod CounterMetadata 1034 raw := NoMethod(*s) 1035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1036} 1037 1038// CounterStructuredName: Identifies a counter within a per-job 1039// namespace. Counters whose structured names are the same get merged 1040// into a single value for the job. 1041type CounterStructuredName struct { 1042 // ComponentStepName: Name of the optimized step being executed by the 1043 // workers. 1044 ComponentStepName string `json:"componentStepName,omitempty"` 1045 1046 // ExecutionStepName: Name of the stage. An execution step contains 1047 // multiple component steps. 1048 ExecutionStepName string `json:"executionStepName,omitempty"` 1049 1050 // InputIndex: Index of an input collection that's being read 1051 // from/written to as a side input. The index identifies a step's side 1052 // inputs starting by 1 (e.g. the first side input has input_index 1, 1053 // the third has input_index 3). Side inputs are identified by a pair of 1054 // (original_step_name, input_index). This field helps uniquely identify 1055 // them. 1056 InputIndex int64 `json:"inputIndex,omitempty"` 1057 1058 // Name: Counter name. Not necessarily globally-unique, but unique 1059 // within the context of the other fields. Required. 1060 Name string `json:"name,omitempty"` 1061 1062 // Origin: One of the standard Origins defined above. 1063 // 1064 // Possible values: 1065 // "SYSTEM" - Counter was created by the Dataflow system. 1066 // "USER" - Counter was created by the user. 1067 Origin string `json:"origin,omitempty"` 1068 1069 // OriginNamespace: A string containing a more specific namespace of the 1070 // counter's origin. 1071 OriginNamespace string `json:"originNamespace,omitempty"` 1072 1073 // OriginalRequestingStepName: The step name requesting an operation, 1074 // such as GBK. I.e. the ParDo causing a read/write from shuffle to 1075 // occur, or a read from side inputs. 1076 OriginalRequestingStepName string `json:"originalRequestingStepName,omitempty"` 1077 1078 // OriginalStepName: System generated name of the original step in the 1079 // user's graph, before optimization. 1080 OriginalStepName string `json:"originalStepName,omitempty"` 1081 1082 // Portion: Portion of this counter, either key or value. 1083 // 1084 // Possible values: 1085 // "ALL" - Counter portion has not been set. 1086 // "KEY" - Counter reports a key. 1087 // "VALUE" - Counter reports a value. 1088 Portion string `json:"portion,omitempty"` 1089 1090 // WorkerId: ID of a particular worker. 1091 WorkerId string `json:"workerId,omitempty"` 1092 1093 // ForceSendFields is a list of field names (e.g. "ComponentStepName") 1094 // to unconditionally include in API requests. By default, fields with 1095 // empty values are omitted from API requests. However, any non-pointer, 1096 // non-interface field appearing in ForceSendFields will be sent to the 1097 // server regardless of whether the field is empty or not. This may be 1098 // used to include empty fields in Patch requests. 1099 ForceSendFields []string `json:"-"` 1100 1101 // NullFields is a list of field names (e.g. "ComponentStepName") to 1102 // include in API requests with the JSON null value. By default, fields 1103 // with empty values are omitted from API requests. However, any field 1104 // with an empty value appearing in NullFields will be sent to the 1105 // server as null. It is an error if a field in this list has a 1106 // non-empty value. This may be used to include null fields in Patch 1107 // requests. 1108 NullFields []string `json:"-"` 1109} 1110 1111func (s *CounterStructuredName) MarshalJSON() ([]byte, error) { 1112 type NoMethod CounterStructuredName 1113 raw := NoMethod(*s) 1114 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1115} 1116 1117// CounterStructuredNameAndMetadata: A single message which encapsulates 1118// structured name and metadata for a given counter. 1119type CounterStructuredNameAndMetadata struct { 1120 // Metadata: Metadata associated with a counter 1121 Metadata *CounterMetadata `json:"metadata,omitempty"` 1122 1123 // Name: Structured name of the counter. 1124 Name *CounterStructuredName `json:"name,omitempty"` 1125 1126 // ForceSendFields is a list of field names (e.g. "Metadata") to 1127 // unconditionally include in API requests. By default, fields with 1128 // empty values are omitted from API requests. However, any non-pointer, 1129 // non-interface field appearing in ForceSendFields will be sent to the 1130 // server regardless of whether the field is empty or not. This may be 1131 // used to include empty fields in Patch requests. 1132 ForceSendFields []string `json:"-"` 1133 1134 // NullFields is a list of field names (e.g. "Metadata") to include in 1135 // API requests with the JSON null value. By default, fields with empty 1136 // values are omitted from API requests. However, any field with an 1137 // empty value appearing in NullFields will be sent to the server as 1138 // null. It is an error if a field in this list has a non-empty value. 1139 // This may be used to include null fields in Patch requests. 1140 NullFields []string `json:"-"` 1141} 1142 1143func (s *CounterStructuredNameAndMetadata) MarshalJSON() ([]byte, error) { 1144 type NoMethod CounterStructuredNameAndMetadata 1145 raw := NoMethod(*s) 1146 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1147} 1148 1149// CounterUpdate: An update to a Counter sent from a worker. 1150type CounterUpdate struct { 1151 // Boolean: Boolean value for And, Or. 1152 Boolean bool `json:"boolean,omitempty"` 1153 1154 // Cumulative: True if this counter is reported as the total cumulative 1155 // aggregate value accumulated since the worker started working on this 1156 // WorkItem. By default this is false, indicating that this counter is 1157 // reported as a delta. 1158 Cumulative bool `json:"cumulative,omitempty"` 1159 1160 // Distribution: Distribution data 1161 Distribution *DistributionUpdate `json:"distribution,omitempty"` 1162 1163 // FloatingPoint: Floating point value for Sum, Max, Min. 1164 FloatingPoint float64 `json:"floatingPoint,omitempty"` 1165 1166 // FloatingPointList: List of floating point numbers, for Set. 1167 FloatingPointList *FloatingPointList `json:"floatingPointList,omitempty"` 1168 1169 // FloatingPointMean: Floating point mean aggregation value for Mean. 1170 FloatingPointMean *FloatingPointMean `json:"floatingPointMean,omitempty"` 1171 1172 // Integer: Integer value for Sum, Max, Min. 1173 Integer *SplitInt64 `json:"integer,omitempty"` 1174 1175 // IntegerGauge: Gauge data 1176 IntegerGauge *IntegerGauge `json:"integerGauge,omitempty"` 1177 1178 // IntegerList: List of integers, for Set. 1179 IntegerList *IntegerList `json:"integerList,omitempty"` 1180 1181 // IntegerMean: Integer mean aggregation value for Mean. 1182 IntegerMean *IntegerMean `json:"integerMean,omitempty"` 1183 1184 // Internal: Value for internally-defined counters used by the Dataflow 1185 // service. 1186 Internal interface{} `json:"internal,omitempty"` 1187 1188 // NameAndKind: Counter name and aggregation type. 1189 NameAndKind *NameAndKind `json:"nameAndKind,omitempty"` 1190 1191 // ShortId: The service-generated short identifier for this counter. The 1192 // short_id -> (name, metadata) mapping is constant for the lifetime of 1193 // a job. 1194 ShortId int64 `json:"shortId,omitempty,string"` 1195 1196 // StringList: List of strings, for Set. 1197 StringList *StringList `json:"stringList,omitempty"` 1198 1199 // StructuredNameAndMetadata: Counter structured name and metadata. 1200 StructuredNameAndMetadata *CounterStructuredNameAndMetadata `json:"structuredNameAndMetadata,omitempty"` 1201 1202 // ForceSendFields is a list of field names (e.g. "Boolean") to 1203 // unconditionally include in API requests. By default, fields with 1204 // empty values are omitted from API requests. However, any non-pointer, 1205 // non-interface field appearing in ForceSendFields will be sent to the 1206 // server regardless of whether the field is empty or not. This may be 1207 // used to include empty fields in Patch requests. 1208 ForceSendFields []string `json:"-"` 1209 1210 // NullFields is a list of field names (e.g. "Boolean") to include in 1211 // API requests with the JSON null value. By default, fields with empty 1212 // values are omitted from API requests. However, any field with an 1213 // empty value appearing in NullFields will be sent to the server as 1214 // null. It is an error if a field in this list has a non-empty value. 1215 // This may be used to include null fields in Patch requests. 1216 NullFields []string `json:"-"` 1217} 1218 1219func (s *CounterUpdate) MarshalJSON() ([]byte, error) { 1220 type NoMethod CounterUpdate 1221 raw := NoMethod(*s) 1222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1223} 1224 1225func (s *CounterUpdate) UnmarshalJSON(data []byte) error { 1226 type NoMethod CounterUpdate 1227 var s1 struct { 1228 FloatingPoint gensupport.JSONFloat64 `json:"floatingPoint"` 1229 *NoMethod 1230 } 1231 s1.NoMethod = (*NoMethod)(s) 1232 if err := json.Unmarshal(data, &s1); err != nil { 1233 return err 1234 } 1235 s.FloatingPoint = float64(s1.FloatingPoint) 1236 return nil 1237} 1238 1239// CreateJobFromTemplateRequest: A request to create a Cloud Dataflow 1240// job from a template. 1241type CreateJobFromTemplateRequest struct { 1242 // Environment: The runtime environment for the job. 1243 Environment *RuntimeEnvironment `json:"environment,omitempty"` 1244 1245 // GcsPath: Required. A Cloud Storage path to the template from which to 1246 // create the job. Must be a valid Cloud Storage URL, beginning with 1247 // `gs://`. 1248 GcsPath string `json:"gcsPath,omitempty"` 1249 1250 // JobName: Required. The job name to use for the created job. 1251 JobName string `json:"jobName,omitempty"` 1252 1253 // Location: The [regional endpoint] 1254 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 1255 // to which to direct the request. 1256 Location string `json:"location,omitempty"` 1257 1258 // Parameters: The runtime parameters to pass to the job. 1259 Parameters map[string]string `json:"parameters,omitempty"` 1260 1261 // ForceSendFields is a list of field names (e.g. "Environment") to 1262 // unconditionally include in API requests. By default, fields with 1263 // empty values are omitted from API requests. However, any non-pointer, 1264 // non-interface field appearing in ForceSendFields will be sent to the 1265 // server regardless of whether the field is empty or not. This may be 1266 // used to include empty fields in Patch requests. 1267 ForceSendFields []string `json:"-"` 1268 1269 // NullFields is a list of field names (e.g. "Environment") to include 1270 // in API requests with the JSON null value. By default, fields with 1271 // empty values are omitted from API requests. However, any field with 1272 // an empty value appearing in NullFields will be sent to the server as 1273 // null. It is an error if a field in this list has a non-empty value. 1274 // This may be used to include null fields in Patch requests. 1275 NullFields []string `json:"-"` 1276} 1277 1278func (s *CreateJobFromTemplateRequest) MarshalJSON() ([]byte, error) { 1279 type NoMethod CreateJobFromTemplateRequest 1280 raw := NoMethod(*s) 1281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1282} 1283 1284// CustomSourceLocation: Identifies the location of a custom souce. 1285type CustomSourceLocation struct { 1286 // Stateful: Whether this source is stateful. 1287 Stateful bool `json:"stateful,omitempty"` 1288 1289 // ForceSendFields is a list of field names (e.g. "Stateful") to 1290 // unconditionally include in API requests. By default, fields with 1291 // empty values are omitted from API requests. However, any non-pointer, 1292 // non-interface field appearing in ForceSendFields will be sent to the 1293 // server regardless of whether the field is empty or not. This may be 1294 // used to include empty fields in Patch requests. 1295 ForceSendFields []string `json:"-"` 1296 1297 // NullFields is a list of field names (e.g. "Stateful") to include in 1298 // API requests with the JSON null value. By default, fields with empty 1299 // values are omitted from API requests. However, any field with an 1300 // empty value appearing in NullFields will be sent to the server as 1301 // null. It is an error if a field in this list has a non-empty value. 1302 // This may be used to include null fields in Patch requests. 1303 NullFields []string `json:"-"` 1304} 1305 1306func (s *CustomSourceLocation) MarshalJSON() ([]byte, error) { 1307 type NoMethod CustomSourceLocation 1308 raw := NoMethod(*s) 1309 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1310} 1311 1312// DataDiskAssignment: Data disk assignment for a given VM instance. 1313type DataDiskAssignment struct { 1314 // DataDisks: Mounted data disks. The order is important a data disk's 1315 // 0-based index in this list defines which persistent directory the 1316 // disk is mounted to, for example the list of { 1317 // "myproject-1014-104817-4c2-harness-0-disk-0" }, { 1318 // "myproject-1014-104817-4c2-harness-0-disk-1" }. 1319 DataDisks []string `json:"dataDisks,omitempty"` 1320 1321 // VmInstance: VM instance name the data disks mounted to, for example 1322 // "myproject-1014-104817-4c2-harness-0". 1323 VmInstance string `json:"vmInstance,omitempty"` 1324 1325 // ForceSendFields is a list of field names (e.g. "DataDisks") to 1326 // unconditionally include in API requests. By default, fields with 1327 // empty values are omitted from API requests. However, any non-pointer, 1328 // non-interface field appearing in ForceSendFields will be sent to the 1329 // server regardless of whether the field is empty or not. This may be 1330 // used to include empty fields in Patch requests. 1331 ForceSendFields []string `json:"-"` 1332 1333 // NullFields is a list of field names (e.g. "DataDisks") to include in 1334 // API requests with the JSON null value. By default, fields with empty 1335 // values are omitted from API requests. However, any field with an 1336 // empty value appearing in NullFields will be sent to the server as 1337 // null. It is an error if a field in this list has a non-empty value. 1338 // This may be used to include null fields in Patch requests. 1339 NullFields []string `json:"-"` 1340} 1341 1342func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) { 1343 type NoMethod DataDiskAssignment 1344 raw := NoMethod(*s) 1345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1346} 1347 1348// DatastoreIODetails: Metadata for a Datastore connector used by the 1349// job. 1350type DatastoreIODetails struct { 1351 // Namespace: Namespace used in the connection. 1352 Namespace string `json:"namespace,omitempty"` 1353 1354 // ProjectId: ProjectId accessed in the connection. 1355 ProjectId string `json:"projectId,omitempty"` 1356 1357 // ForceSendFields is a list of field names (e.g. "Namespace") to 1358 // unconditionally include in API requests. By default, fields with 1359 // empty values are omitted from API requests. However, any non-pointer, 1360 // non-interface field appearing in ForceSendFields will be sent to the 1361 // server regardless of whether the field is empty or not. This may be 1362 // used to include empty fields in Patch requests. 1363 ForceSendFields []string `json:"-"` 1364 1365 // NullFields is a list of field names (e.g. "Namespace") to include in 1366 // API requests with the JSON null value. By default, fields with empty 1367 // values are omitted from API requests. However, any field with an 1368 // empty value appearing in NullFields will be sent to the server as 1369 // null. It is an error if a field in this list has a non-empty value. 1370 // This may be used to include null fields in Patch requests. 1371 NullFields []string `json:"-"` 1372} 1373 1374func (s *DatastoreIODetails) MarshalJSON() ([]byte, error) { 1375 type NoMethod DatastoreIODetails 1376 raw := NoMethod(*s) 1377 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1378} 1379 1380// DebugOptions: Describes any options that have an effect on the 1381// debugging of pipelines. 1382type DebugOptions struct { 1383 // EnableHotKeyLogging: When true, enables the logging of the literal 1384 // hot key to the user's Cloud Logging. 1385 EnableHotKeyLogging bool `json:"enableHotKeyLogging,omitempty"` 1386 1387 // ForceSendFields is a list of field names (e.g. "EnableHotKeyLogging") 1388 // to unconditionally include in API requests. By default, fields with 1389 // empty values are omitted from API requests. However, any non-pointer, 1390 // non-interface field appearing in ForceSendFields will be sent to the 1391 // server regardless of whether the field is empty or not. This may be 1392 // used to include empty fields in Patch requests. 1393 ForceSendFields []string `json:"-"` 1394 1395 // NullFields is a list of field names (e.g. "EnableHotKeyLogging") to 1396 // include in API requests with the JSON null value. By default, fields 1397 // with empty values are omitted from API requests. However, any field 1398 // with an empty value appearing in NullFields will be sent to the 1399 // server as null. It is an error if a field in this list has a 1400 // non-empty value. This may be used to include null fields in Patch 1401 // requests. 1402 NullFields []string `json:"-"` 1403} 1404 1405func (s *DebugOptions) MarshalJSON() ([]byte, error) { 1406 type NoMethod DebugOptions 1407 raw := NoMethod(*s) 1408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1409} 1410 1411// DeleteSnapshotResponse: Response from deleting a snapshot. 1412type DeleteSnapshotResponse struct { 1413 // ServerResponse contains the HTTP response code and headers from the 1414 // server. 1415 googleapi.ServerResponse `json:"-"` 1416} 1417 1418// DerivedSource: Specification of one of the bundles produced as a 1419// result of splitting a Source (e.g. when executing a 1420// SourceSplitRequest, or when splitting an active task using 1421// WorkItemStatus.dynamic_source_split), relative to the source being 1422// split. 1423type DerivedSource struct { 1424 // DerivationMode: What source to base the produced source on (if any). 1425 // 1426 // Possible values: 1427 // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is 1428 // unknown, or unspecified. 1429 // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely 1430 // independent Source with no base. 1431 // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based 1432 // on the Source being split. 1433 // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source 1434 // based on the base of the Source being split. 1435 DerivationMode string `json:"derivationMode,omitempty"` 1436 1437 // Source: Specification of the source. 1438 Source *Source `json:"source,omitempty"` 1439 1440 // ForceSendFields is a list of field names (e.g. "DerivationMode") to 1441 // unconditionally include in API requests. By default, fields with 1442 // empty values are omitted from API requests. However, any non-pointer, 1443 // non-interface field appearing in ForceSendFields will be sent to the 1444 // server regardless of whether the field is empty or not. This may be 1445 // used to include empty fields in Patch requests. 1446 ForceSendFields []string `json:"-"` 1447 1448 // NullFields is a list of field names (e.g. "DerivationMode") to 1449 // include in API requests with the JSON null value. By default, fields 1450 // with empty values are omitted from API requests. However, any field 1451 // with an empty value appearing in NullFields will be sent to the 1452 // server as null. It is an error if a field in this list has a 1453 // non-empty value. This may be used to include null fields in Patch 1454 // requests. 1455 NullFields []string `json:"-"` 1456} 1457 1458func (s *DerivedSource) MarshalJSON() ([]byte, error) { 1459 type NoMethod DerivedSource 1460 raw := NoMethod(*s) 1461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1462} 1463 1464// Disk: Describes the data disk used by a workflow job. 1465type Disk struct { 1466 // DiskType: Disk storage type, as defined by Google Compute Engine. 1467 // This must be a disk type appropriate to the project and zone in which 1468 // the workers will run. If unknown or unspecified, the service will 1469 // attempt to choose a reasonable default. For example, the standard 1470 // persistent disk type is a resource name typically ending in 1471 // "pd-standard". If SSD persistent disks are available, the resource 1472 // name typically ends with "pd-ssd". The actual valid values are 1473 // defined the Google Compute Engine API, not by the Cloud Dataflow API; 1474 // consult the Google Compute Engine documentation for more information 1475 // about determining the set of available disk types for a particular 1476 // project and zone. Google Compute Engine Disk types are local to a 1477 // particular project in a particular zone, and so the resource name 1478 // will typically look something like this: 1479 // compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-sta 1480 // ndard 1481 DiskType string `json:"diskType,omitempty"` 1482 1483 // MountPoint: Directory in a VM where disk is mounted. 1484 MountPoint string `json:"mountPoint,omitempty"` 1485 1486 // SizeGb: Size of disk in GB. If zero or unspecified, the service will 1487 // attempt to choose a reasonable default. 1488 SizeGb int64 `json:"sizeGb,omitempty"` 1489 1490 // ForceSendFields is a list of field names (e.g. "DiskType") to 1491 // unconditionally include in API requests. By default, fields with 1492 // empty values are omitted from API requests. However, any non-pointer, 1493 // non-interface field appearing in ForceSendFields will be sent to the 1494 // server regardless of whether the field is empty or not. This may be 1495 // used to include empty fields in Patch requests. 1496 ForceSendFields []string `json:"-"` 1497 1498 // NullFields is a list of field names (e.g. "DiskType") to include in 1499 // API requests with the JSON null value. By default, fields with empty 1500 // values are omitted from API requests. However, any field with an 1501 // empty value appearing in NullFields will be sent to the server as 1502 // null. It is an error if a field in this list has a non-empty value. 1503 // This may be used to include null fields in Patch requests. 1504 NullFields []string `json:"-"` 1505} 1506 1507func (s *Disk) MarshalJSON() ([]byte, error) { 1508 type NoMethod Disk 1509 raw := NoMethod(*s) 1510 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1511} 1512 1513// DisplayData: Data provided with a pipeline or transform to provide 1514// descriptive info. 1515type DisplayData struct { 1516 // BoolValue: Contains value if the data is of a boolean type. 1517 BoolValue bool `json:"boolValue,omitempty"` 1518 1519 // DurationValue: Contains value if the data is of duration type. 1520 DurationValue string `json:"durationValue,omitempty"` 1521 1522 // FloatValue: Contains value if the data is of float type. 1523 FloatValue float64 `json:"floatValue,omitempty"` 1524 1525 // Int64Value: Contains value if the data is of int64 type. 1526 Int64Value int64 `json:"int64Value,omitempty,string"` 1527 1528 // JavaClassValue: Contains value if the data is of java class type. 1529 JavaClassValue string `json:"javaClassValue,omitempty"` 1530 1531 // Key: The key identifying the display data. This is intended to be 1532 // used as a label for the display data when viewed in a dax monitoring 1533 // system. 1534 Key string `json:"key,omitempty"` 1535 1536 // Label: An optional label to display in a dax UI for the element. 1537 Label string `json:"label,omitempty"` 1538 1539 // Namespace: The namespace for the key. This is usually a class name or 1540 // programming language namespace (i.e. python module) which defines the 1541 // display data. This allows a dax monitoring system to specially handle 1542 // the data and perform custom rendering. 1543 Namespace string `json:"namespace,omitempty"` 1544 1545 // ShortStrValue: A possible additional shorter value to display. For 1546 // example a java_class_name_value of com.mypackage.MyDoFn will be 1547 // stored with MyDoFn as the short_str_value and com.mypackage.MyDoFn as 1548 // the java_class_name value. short_str_value can be displayed and 1549 // java_class_name_value will be displayed as a tooltip. 1550 ShortStrValue string `json:"shortStrValue,omitempty"` 1551 1552 // StrValue: Contains value if the data is of string type. 1553 StrValue string `json:"strValue,omitempty"` 1554 1555 // TimestampValue: Contains value if the data is of timestamp type. 1556 TimestampValue string `json:"timestampValue,omitempty"` 1557 1558 // Url: An optional full URL. 1559 Url string `json:"url,omitempty"` 1560 1561 // ForceSendFields is a list of field names (e.g. "BoolValue") to 1562 // unconditionally include in API requests. By default, fields with 1563 // empty values are omitted from API requests. However, any non-pointer, 1564 // non-interface field appearing in ForceSendFields will be sent to the 1565 // server regardless of whether the field is empty or not. This may be 1566 // used to include empty fields in Patch requests. 1567 ForceSendFields []string `json:"-"` 1568 1569 // NullFields is a list of field names (e.g. "BoolValue") to include in 1570 // API requests with the JSON null value. By default, fields with empty 1571 // values are omitted from API requests. However, any field with an 1572 // empty value appearing in NullFields will be sent to the server as 1573 // null. It is an error if a field in this list has a non-empty value. 1574 // This may be used to include null fields in Patch requests. 1575 NullFields []string `json:"-"` 1576} 1577 1578func (s *DisplayData) MarshalJSON() ([]byte, error) { 1579 type NoMethod DisplayData 1580 raw := NoMethod(*s) 1581 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1582} 1583 1584func (s *DisplayData) UnmarshalJSON(data []byte) error { 1585 type NoMethod DisplayData 1586 var s1 struct { 1587 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 1588 *NoMethod 1589 } 1590 s1.NoMethod = (*NoMethod)(s) 1591 if err := json.Unmarshal(data, &s1); err != nil { 1592 return err 1593 } 1594 s.FloatValue = float64(s1.FloatValue) 1595 return nil 1596} 1597 1598// DistributionUpdate: A metric value representing a distribution. 1599type DistributionUpdate struct { 1600 // Count: The count of the number of elements present in the 1601 // distribution. 1602 Count *SplitInt64 `json:"count,omitempty"` 1603 1604 // Histogram: (Optional) Histogram of value counts for the distribution. 1605 Histogram *Histogram `json:"histogram,omitempty"` 1606 1607 // Max: The maximum value present in the distribution. 1608 Max *SplitInt64 `json:"max,omitempty"` 1609 1610 // Min: The minimum value present in the distribution. 1611 Min *SplitInt64 `json:"min,omitempty"` 1612 1613 // Sum: Use an int64 since we'd prefer the added precision. If overflow 1614 // is a common problem we can detect it and use an additional int64 or a 1615 // double. 1616 Sum *SplitInt64 `json:"sum,omitempty"` 1617 1618 // SumOfSquares: Use a double since the sum of squares is likely to 1619 // overflow int64. 1620 SumOfSquares float64 `json:"sumOfSquares,omitempty"` 1621 1622 // ForceSendFields is a list of field names (e.g. "Count") to 1623 // unconditionally include in API requests. By default, fields with 1624 // empty values are omitted from API requests. However, any non-pointer, 1625 // non-interface field appearing in ForceSendFields will be sent to the 1626 // server regardless of whether the field is empty or not. This may be 1627 // used to include empty fields in Patch requests. 1628 ForceSendFields []string `json:"-"` 1629 1630 // NullFields is a list of field names (e.g. "Count") to include in API 1631 // requests with the JSON null value. By default, fields with empty 1632 // values are omitted from API requests. However, any field with an 1633 // empty value appearing in NullFields will be sent to the server as 1634 // null. It is an error if a field in this list has a non-empty value. 1635 // This may be used to include null fields in Patch requests. 1636 NullFields []string `json:"-"` 1637} 1638 1639func (s *DistributionUpdate) MarshalJSON() ([]byte, error) { 1640 type NoMethod DistributionUpdate 1641 raw := NoMethod(*s) 1642 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1643} 1644 1645func (s *DistributionUpdate) UnmarshalJSON(data []byte) error { 1646 type NoMethod DistributionUpdate 1647 var s1 struct { 1648 SumOfSquares gensupport.JSONFloat64 `json:"sumOfSquares"` 1649 *NoMethod 1650 } 1651 s1.NoMethod = (*NoMethod)(s) 1652 if err := json.Unmarshal(data, &s1); err != nil { 1653 return err 1654 } 1655 s.SumOfSquares = float64(s1.SumOfSquares) 1656 return nil 1657} 1658 1659// DynamicSourceSplit: When a task splits using 1660// WorkItemStatus.dynamic_source_split, this message describes the two 1661// parts of the split relative to the description of the current task's 1662// input. 1663type DynamicSourceSplit struct { 1664 // Primary: Primary part (continued to be processed by worker). 1665 // Specified relative to the previously-current source. Becomes current. 1666 Primary *DerivedSource `json:"primary,omitempty"` 1667 1668 // Residual: Residual part (returned to the pool of work). Specified 1669 // relative to the previously-current source. 1670 Residual *DerivedSource `json:"residual,omitempty"` 1671 1672 // ForceSendFields is a list of field names (e.g. "Primary") to 1673 // unconditionally include in API requests. By default, fields with 1674 // empty values are omitted from API requests. However, any non-pointer, 1675 // non-interface field appearing in ForceSendFields will be sent to the 1676 // server regardless of whether the field is empty or not. This may be 1677 // used to include empty fields in Patch requests. 1678 ForceSendFields []string `json:"-"` 1679 1680 // NullFields is a list of field names (e.g. "Primary") to include in 1681 // API requests with the JSON null value. By default, fields with empty 1682 // values are omitted from API requests. However, any field with an 1683 // empty value appearing in NullFields will be sent to the server as 1684 // null. It is an error if a field in this list has a non-empty value. 1685 // This may be used to include null fields in Patch requests. 1686 NullFields []string `json:"-"` 1687} 1688 1689func (s *DynamicSourceSplit) MarshalJSON() ([]byte, error) { 1690 type NoMethod DynamicSourceSplit 1691 raw := NoMethod(*s) 1692 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1693} 1694 1695// Environment: Describes the environment in which a Dataflow Job runs. 1696type Environment struct { 1697 // ClusterManagerApiService: The type of cluster manager API to use. If 1698 // unknown or unspecified, the service will attempt to choose a 1699 // reasonable default. This should be in the form of the API service 1700 // name, e.g. "compute.googleapis.com". 1701 ClusterManagerApiService string `json:"clusterManagerApiService,omitempty"` 1702 1703 // Dataset: The dataset for the current project where various workflow 1704 // related tables are stored. The supported resource type is: Google 1705 // BigQuery: bigquery.googleapis.com/{dataset} 1706 Dataset string `json:"dataset,omitempty"` 1707 1708 // DebugOptions: Any debugging options to be supplied to the job. 1709 DebugOptions *DebugOptions `json:"debugOptions,omitempty"` 1710 1711 // Experiments: The list of experiments to enable. This field should be 1712 // used for SDK related experiments and not for service related 1713 // experiments. The proper field for service related experiments is 1714 // service_options. For more details see the rationale at 1715 // go/user-specified-service-options. 1716 Experiments []string `json:"experiments,omitempty"` 1717 1718 // FlexResourceSchedulingGoal: Which Flexible Resource Scheduling mode 1719 // to run in. 1720 // 1721 // Possible values: 1722 // "FLEXRS_UNSPECIFIED" - Run in the default mode. 1723 // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time. 1724 // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost. 1725 FlexResourceSchedulingGoal string `json:"flexResourceSchedulingGoal,omitempty"` 1726 1727 // InternalExperiments: Experimental settings. 1728 InternalExperiments googleapi.RawMessage `json:"internalExperiments,omitempty"` 1729 1730 // SdkPipelineOptions: The Cloud Dataflow SDK pipeline options specified 1731 // by the user. These options are passed through the service and are 1732 // used to recreate the SDK pipeline options on the worker in a language 1733 // agnostic and platform independent way. 1734 SdkPipelineOptions googleapi.RawMessage `json:"sdkPipelineOptions,omitempty"` 1735 1736 // ServiceAccountEmail: Identity to run virtual machines as. Defaults to 1737 // the default account. 1738 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 1739 1740 // ServiceKmsKeyName: If set, contains the Cloud KMS key identifier used 1741 // to encrypt data at rest, AKA a Customer Managed Encryption Key 1742 // (CMEK). Format: 1743 // projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KE 1744 // Y 1745 ServiceKmsKeyName string `json:"serviceKmsKeyName,omitempty"` 1746 1747 // ServiceOptions: The list of service options to enable. This field 1748 // should be used for service related experiments only. These 1749 // experiments, when graduating to GA, should be replaced by dedicated 1750 // fields or become default (i.e. always on). For more details see the 1751 // rationale at go/user-specified-service-options. 1752 ServiceOptions []string `json:"serviceOptions,omitempty"` 1753 1754 // ShuffleMode: Output only. The shuffle mode used for the job. 1755 // 1756 // Possible values: 1757 // "SHUFFLE_MODE_UNSPECIFIED" - Shuffle mode information is not 1758 // available. 1759 // "VM_BASED" - Shuffle is done on the worker VMs. 1760 // "SERVICE_BASED" - Shuffle is done on the service side. 1761 ShuffleMode string `json:"shuffleMode,omitempty"` 1762 1763 // TempStoragePrefix: The prefix of the resources the system should use 1764 // for temporary storage. The system will append the suffix 1765 // "/temp-{JOBNAME} to this resource prefix, where {JOBNAME} is the 1766 // value of the job_name field. The resulting bucket and object prefix 1767 // is used as the prefix of the resources used to store temporary data 1768 // needed during the job execution. NOTE: This will override the value 1769 // in taskrunner_settings. The supported resource type is: Google Cloud 1770 // Storage: storage.googleapis.com/{bucket}/{object} 1771 // bucket.storage.googleapis.com/{object} 1772 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 1773 1774 // UserAgent: A description of the process that generated the request. 1775 UserAgent googleapi.RawMessage `json:"userAgent,omitempty"` 1776 1777 // Version: A structure describing which components and their versions 1778 // of the service are required in order to run the job. 1779 Version googleapi.RawMessage `json:"version,omitempty"` 1780 1781 // WorkerPools: The worker pools. At least one "harness" worker pool 1782 // must be specified in order for the job to have workers. 1783 WorkerPools []*WorkerPool `json:"workerPools,omitempty"` 1784 1785 // WorkerRegion: The Compute Engine region 1786 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 1787 // in which worker processing should occur, e.g. "us-west1". Mutually 1788 // exclusive with worker_zone. If neither worker_region nor worker_zone 1789 // is specified, default to the control plane's region. 1790 WorkerRegion string `json:"workerRegion,omitempty"` 1791 1792 // WorkerZone: The Compute Engine zone 1793 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 1794 // in which worker processing should occur, e.g. "us-west1-a". Mutually 1795 // exclusive with worker_region. If neither worker_region nor 1796 // worker_zone is specified, a zone in the control plane's region is 1797 // chosen based on available capacity. 1798 WorkerZone string `json:"workerZone,omitempty"` 1799 1800 // ForceSendFields is a list of field names (e.g. 1801 // "ClusterManagerApiService") to unconditionally include in API 1802 // requests. By default, fields with empty values are omitted from API 1803 // requests. However, any non-pointer, non-interface field appearing in 1804 // ForceSendFields will be sent to the server regardless of whether the 1805 // field is empty or not. This may be used to include empty fields in 1806 // Patch requests. 1807 ForceSendFields []string `json:"-"` 1808 1809 // NullFields is a list of field names (e.g. "ClusterManagerApiService") 1810 // to include in API requests with the JSON null value. By default, 1811 // fields with empty values are omitted from API requests. However, any 1812 // field with an empty value appearing in NullFields will be sent to the 1813 // server as null. It is an error if a field in this list has a 1814 // non-empty value. This may be used to include null fields in Patch 1815 // requests. 1816 NullFields []string `json:"-"` 1817} 1818 1819func (s *Environment) MarshalJSON() ([]byte, error) { 1820 type NoMethod Environment 1821 raw := NoMethod(*s) 1822 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1823} 1824 1825// ExecutionStageState: A message describing the state of a particular 1826// execution stage. 1827type ExecutionStageState struct { 1828 // CurrentStateTime: The time at which the stage transitioned to this 1829 // state. 1830 CurrentStateTime string `json:"currentStateTime,omitempty"` 1831 1832 // ExecutionStageName: The name of the execution stage. 1833 ExecutionStageName string `json:"executionStageName,omitempty"` 1834 1835 // ExecutionStageState: Executions stage states allow the same set of 1836 // values as JobState. 1837 // 1838 // Possible values: 1839 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 1840 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job 1841 // has not yet started to run. 1842 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 1843 // currently running. 1844 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 1845 // successfully completed. This is a terminal job state. This state may 1846 // be set by the Cloud Dataflow service, as a transition from 1847 // `JOB_STATE_RUNNING`. It may also be set via a Cloud Dataflow 1848 // `UpdateJob` call, if the job has not yet reached a terminal state. 1849 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has 1850 // failed. This is a terminal job state. This state may only be set by 1851 // the Cloud Dataflow service, and only as a transition from 1852 // `JOB_STATE_RUNNING`. 1853 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the 1854 // job has been explicitly cancelled. This is a terminal job state. This 1855 // state may only be set via a Cloud Dataflow `UpdateJob` call, and only 1856 // if the job has not yet reached another terminal state. 1857 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job 1858 // was successfully updated, meaning that this job was stopped and 1859 // another job was started, inheriting state from this one. This is a 1860 // terminal job state. This state may only be set by the Cloud Dataflow 1861 // service, and only as a transition from `JOB_STATE_RUNNING`. 1862 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job 1863 // is in the process of draining. A draining job has stopped pulling 1864 // from its input sources and is processing any data that remains 1865 // in-flight. This state may be set via a Cloud Dataflow `UpdateJob` 1866 // call, but only as a transition from `JOB_STATE_RUNNING`. Jobs that 1867 // are draining may only transition to `JOB_STATE_DRAINED`, 1868 // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 1869 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job 1870 // has been drained. A drained job terminated by stopping pulling from 1871 // its input sources and processing any data that remained in-flight 1872 // when draining was requested. This state is a terminal state, may only 1873 // be set by the Cloud Dataflow service, and only as a transition from 1874 // `JOB_STATE_DRAINING`. 1875 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job 1876 // has been created but is not yet running. Jobs that are pending may 1877 // only transition to `JOB_STATE_RUNNING`, or `JOB_STATE_FAILED`. 1878 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the 1879 // job has been explicitly cancelled and is in the process of stopping. 1880 // Jobs that are cancelling may only transition to `JOB_STATE_CANCELLED` 1881 // or `JOB_STATE_FAILED`. 1882 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has 1883 // been created but is being delayed until launch. Jobs that are queued 1884 // may only transition to `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 1885 // "JOB_STATE_RESOURCE_CLEANING_UP" - `JOB_STATE_RESOURCE_CLEANING_UP` 1886 // indicates that the batch job's associated resources are currently 1887 // being cleaned up after a successful run. Currently, this is an opt-in 1888 // feature, please reach out to Cloud support team if you are 1889 // interested. 1890 ExecutionStageState string `json:"executionStageState,omitempty"` 1891 1892 // ForceSendFields is a list of field names (e.g. "CurrentStateTime") to 1893 // unconditionally include in API requests. By default, fields with 1894 // empty values are omitted from API requests. However, any non-pointer, 1895 // non-interface field appearing in ForceSendFields will be sent to the 1896 // server regardless of whether the field is empty or not. This may be 1897 // used to include empty fields in Patch requests. 1898 ForceSendFields []string `json:"-"` 1899 1900 // NullFields is a list of field names (e.g. "CurrentStateTime") to 1901 // include in API requests with the JSON null value. By default, fields 1902 // with empty values are omitted from API requests. However, any field 1903 // with an empty value appearing in NullFields will be sent to the 1904 // server as null. It is an error if a field in this list has a 1905 // non-empty value. This may be used to include null fields in Patch 1906 // requests. 1907 NullFields []string `json:"-"` 1908} 1909 1910func (s *ExecutionStageState) MarshalJSON() ([]byte, error) { 1911 type NoMethod ExecutionStageState 1912 raw := NoMethod(*s) 1913 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1914} 1915 1916// ExecutionStageSummary: Description of the composing transforms, 1917// names/ids, and input/outputs of a stage of execution. Some composing 1918// transforms and sources may have been generated by the Dataflow 1919// service during execution planning. 1920type ExecutionStageSummary struct { 1921 // ComponentSource: Collections produced and consumed by component 1922 // transforms of this stage. 1923 ComponentSource []*ComponentSource `json:"componentSource,omitempty"` 1924 1925 // ComponentTransform: Transforms that comprise this execution stage. 1926 ComponentTransform []*ComponentTransform `json:"componentTransform,omitempty"` 1927 1928 // Id: Dataflow service generated id for this stage. 1929 Id string `json:"id,omitempty"` 1930 1931 // InputSource: Input sources for this stage. 1932 InputSource []*StageSource `json:"inputSource,omitempty"` 1933 1934 // Kind: Type of transform this stage is executing. 1935 // 1936 // Possible values: 1937 // "UNKNOWN_KIND" - Unrecognized transform type. 1938 // "PAR_DO_KIND" - ParDo transform. 1939 // "GROUP_BY_KEY_KIND" - Group By Key transform. 1940 // "FLATTEN_KIND" - Flatten transform. 1941 // "READ_KIND" - Read transform. 1942 // "WRITE_KIND" - Write transform. 1943 // "CONSTANT_KIND" - Constructs from a constant value, such as with 1944 // Create.of. 1945 // "SINGLETON_KIND" - Creates a Singleton view of a collection. 1946 // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as 1947 // part of a GroupByKey. 1948 Kind string `json:"kind,omitempty"` 1949 1950 // Name: Dataflow service generated name for this stage. 1951 Name string `json:"name,omitempty"` 1952 1953 // OutputSource: Output sources for this stage. 1954 OutputSource []*StageSource `json:"outputSource,omitempty"` 1955 1956 // PrerequisiteStage: Other stages that must complete before this stage 1957 // can run. 1958 PrerequisiteStage []string `json:"prerequisiteStage,omitempty"` 1959 1960 // ForceSendFields is a list of field names (e.g. "ComponentSource") to 1961 // unconditionally include in API requests. By default, fields with 1962 // empty values are omitted from API requests. However, any non-pointer, 1963 // non-interface field appearing in ForceSendFields will be sent to the 1964 // server regardless of whether the field is empty or not. This may be 1965 // used to include empty fields in Patch requests. 1966 ForceSendFields []string `json:"-"` 1967 1968 // NullFields is a list of field names (e.g. "ComponentSource") to 1969 // include in API requests with the JSON null value. By default, fields 1970 // with empty values are omitted from API requests. However, any field 1971 // with an empty value appearing in NullFields will be sent to the 1972 // server as null. It is an error if a field in this list has a 1973 // non-empty value. This may be used to include null fields in Patch 1974 // requests. 1975 NullFields []string `json:"-"` 1976} 1977 1978func (s *ExecutionStageSummary) MarshalJSON() ([]byte, error) { 1979 type NoMethod ExecutionStageSummary 1980 raw := NoMethod(*s) 1981 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1982} 1983 1984// FailedLocation: Indicates which [regional endpoint] 1985// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 1986// failed to respond to a request for data. 1987type FailedLocation struct { 1988 // Name: The name of the [regional endpoint] 1989 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 1990 // that failed to respond. 1991 Name string `json:"name,omitempty"` 1992 1993 // ForceSendFields is a list of field names (e.g. "Name") to 1994 // unconditionally include in API requests. By default, fields with 1995 // empty values are omitted from API requests. However, any non-pointer, 1996 // non-interface field appearing in ForceSendFields will be sent to the 1997 // server regardless of whether the field is empty or not. This may be 1998 // used to include empty fields in Patch requests. 1999 ForceSendFields []string `json:"-"` 2000 2001 // NullFields is a list of field names (e.g. "Name") to include in API 2002 // requests with the JSON null value. By default, fields with empty 2003 // values are omitted from API requests. However, any field with an 2004 // empty value appearing in NullFields will be sent to the server as 2005 // null. It is an error if a field in this list has a non-empty value. 2006 // This may be used to include null fields in Patch requests. 2007 NullFields []string `json:"-"` 2008} 2009 2010func (s *FailedLocation) MarshalJSON() ([]byte, error) { 2011 type NoMethod FailedLocation 2012 raw := NoMethod(*s) 2013 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2014} 2015 2016// FileIODetails: Metadata for a File connector used by the job. 2017type FileIODetails struct { 2018 // FilePattern: File Pattern used to access files by the connector. 2019 FilePattern string `json:"filePattern,omitempty"` 2020 2021 // ForceSendFields is a list of field names (e.g. "FilePattern") to 2022 // unconditionally include in API requests. By default, fields with 2023 // empty values are omitted from API requests. However, any non-pointer, 2024 // non-interface field appearing in ForceSendFields will be sent to the 2025 // server regardless of whether the field is empty or not. This may be 2026 // used to include empty fields in Patch requests. 2027 ForceSendFields []string `json:"-"` 2028 2029 // NullFields is a list of field names (e.g. "FilePattern") to include 2030 // in API requests with the JSON null value. By default, fields with 2031 // empty values are omitted from API requests. However, any field with 2032 // an empty value appearing in NullFields will be sent to the server as 2033 // null. It is an error if a field in this list has a non-empty value. 2034 // This may be used to include null fields in Patch requests. 2035 NullFields []string `json:"-"` 2036} 2037 2038func (s *FileIODetails) MarshalJSON() ([]byte, error) { 2039 type NoMethod FileIODetails 2040 raw := NoMethod(*s) 2041 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2042} 2043 2044// FlattenInstruction: An instruction that copies its inputs (zero or 2045// more) to its (single) output. 2046type FlattenInstruction struct { 2047 // Inputs: Describes the inputs to the flatten instruction. 2048 Inputs []*InstructionInput `json:"inputs,omitempty"` 2049 2050 // ForceSendFields is a list of field names (e.g. "Inputs") to 2051 // unconditionally include in API requests. By default, fields with 2052 // empty values are omitted from API requests. However, any non-pointer, 2053 // non-interface field appearing in ForceSendFields will be sent to the 2054 // server regardless of whether the field is empty or not. This may be 2055 // used to include empty fields in Patch requests. 2056 ForceSendFields []string `json:"-"` 2057 2058 // NullFields is a list of field names (e.g. "Inputs") to include in API 2059 // requests with the JSON null value. By default, fields with empty 2060 // values are omitted from API requests. However, any field with an 2061 // empty value appearing in NullFields will be sent to the server as 2062 // null. It is an error if a field in this list has a non-empty value. 2063 // This may be used to include null fields in Patch requests. 2064 NullFields []string `json:"-"` 2065} 2066 2067func (s *FlattenInstruction) MarshalJSON() ([]byte, error) { 2068 type NoMethod FlattenInstruction 2069 raw := NoMethod(*s) 2070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2071} 2072 2073// FlexTemplateRuntimeEnvironment: The environment values to be set at 2074// runtime for flex template. 2075type FlexTemplateRuntimeEnvironment struct { 2076 // AdditionalExperiments: Additional experiment flags for the job. 2077 AdditionalExperiments []string `json:"additionalExperiments,omitempty"` 2078 2079 // AdditionalUserLabels: Additional user labels to be specified for the 2080 // job. Keys and values must follow the restrictions specified in the 2081 // labeling restrictions 2082 // (https://cloud.google.com/compute/docs/labeling-resources#restrictions) 2083 // page. An object containing a list of "key": value pairs. Example: { 2084 // "name": "wrench", "mass": "1kg", "count": "3" }. 2085 AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"` 2086 2087 // EnableStreamingEngine: Whether to enable Streaming Engine for the 2088 // job. 2089 EnableStreamingEngine bool `json:"enableStreamingEngine,omitempty"` 2090 2091 // FlexrsGoal: Set FlexRS goal for the job. 2092 // https://cloud.google.com/dataflow/docs/guides/flexrs 2093 // 2094 // Possible values: 2095 // "FLEXRS_UNSPECIFIED" - Run in the default mode. 2096 // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time. 2097 // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost. 2098 FlexrsGoal string `json:"flexrsGoal,omitempty"` 2099 2100 // IpConfiguration: Configuration for VM IPs. 2101 // 2102 // Possible values: 2103 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or 2104 // unspecified. 2105 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 2106 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 2107 IpConfiguration string `json:"ipConfiguration,omitempty"` 2108 2109 // KmsKeyName: Name for the Cloud KMS key for the job. Key format is: 2110 // projects//locations//keyRings//cryptoKeys/ 2111 KmsKeyName string `json:"kmsKeyName,omitempty"` 2112 2113 // MachineType: The machine type to use for the job. Defaults to the 2114 // value from the template if not specified. 2115 MachineType string `json:"machineType,omitempty"` 2116 2117 // MaxWorkers: The maximum number of Google Compute Engine instances to 2118 // be made available to your pipeline during execution, from 1 to 1000. 2119 MaxWorkers int64 `json:"maxWorkers,omitempty"` 2120 2121 // Network: Network to which VMs will be assigned. If empty or 2122 // unspecified, the service will use the network "default". 2123 Network string `json:"network,omitempty"` 2124 2125 // NumWorkers: The initial number of Google Compute Engine instances for 2126 // the job. 2127 NumWorkers int64 `json:"numWorkers,omitempty"` 2128 2129 // ServiceAccountEmail: The email address of the service account to run 2130 // the job as. 2131 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 2132 2133 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. You 2134 // can specify a subnetwork using either a complete URL or an 2135 // abbreviated path. Expected to be of the form 2136 // "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/region 2137 // s/REGION/subnetworks/SUBNETWORK" or 2138 // "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located 2139 // in a Shared VPC network, you must use the complete URL. 2140 Subnetwork string `json:"subnetwork,omitempty"` 2141 2142 // TempLocation: The Cloud Storage path to use for temporary files. Must 2143 // be a valid Cloud Storage URL, beginning with `gs://`. 2144 TempLocation string `json:"tempLocation,omitempty"` 2145 2146 // WorkerRegion: The Compute Engine region 2147 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 2148 // in which worker processing should occur, e.g. "us-west1". Mutually 2149 // exclusive with worker_zone. If neither worker_region nor worker_zone 2150 // is specified, default to the control plane's region. 2151 WorkerRegion string `json:"workerRegion,omitempty"` 2152 2153 // WorkerZone: The Compute Engine zone 2154 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 2155 // in which worker processing should occur, e.g. "us-west1-a". Mutually 2156 // exclusive with worker_region. If neither worker_region nor 2157 // worker_zone is specified, a zone in the control plane's region is 2158 // chosen based on available capacity. If both `worker_zone` and `zone` 2159 // are set, `worker_zone` takes precedence. 2160 WorkerZone string `json:"workerZone,omitempty"` 2161 2162 // Zone: The Compute Engine availability zone 2163 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 2164 // for launching worker instances to run your pipeline. In the future, 2165 // worker_zone will take precedence. 2166 Zone string `json:"zone,omitempty"` 2167 2168 // ForceSendFields is a list of field names (e.g. 2169 // "AdditionalExperiments") to unconditionally include in API requests. 2170 // By default, fields with empty values are omitted from API requests. 2171 // However, any non-pointer, non-interface field appearing in 2172 // ForceSendFields will be sent to the server regardless of whether the 2173 // field is empty or not. This may be used to include empty fields in 2174 // Patch requests. 2175 ForceSendFields []string `json:"-"` 2176 2177 // NullFields is a list of field names (e.g. "AdditionalExperiments") to 2178 // include in API requests with the JSON null value. By default, fields 2179 // with empty values are omitted from API requests. However, any field 2180 // with an empty value appearing in NullFields will be sent to the 2181 // server as null. It is an error if a field in this list has a 2182 // non-empty value. This may be used to include null fields in Patch 2183 // requests. 2184 NullFields []string `json:"-"` 2185} 2186 2187func (s *FlexTemplateRuntimeEnvironment) MarshalJSON() ([]byte, error) { 2188 type NoMethod FlexTemplateRuntimeEnvironment 2189 raw := NoMethod(*s) 2190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2191} 2192 2193// FloatingPointList: A metric value representing a list of floating 2194// point numbers. 2195type FloatingPointList struct { 2196 // Elements: Elements of the list. 2197 Elements []float64 `json:"elements,omitempty"` 2198 2199 // ForceSendFields is a list of field names (e.g. "Elements") to 2200 // unconditionally include in API requests. By default, fields with 2201 // empty values are omitted from API requests. However, any non-pointer, 2202 // non-interface field appearing in ForceSendFields will be sent to the 2203 // server regardless of whether the field is empty or not. This may be 2204 // used to include empty fields in Patch requests. 2205 ForceSendFields []string `json:"-"` 2206 2207 // NullFields is a list of field names (e.g. "Elements") to include in 2208 // API requests with the JSON null value. By default, fields with empty 2209 // values are omitted from API requests. However, any field with an 2210 // empty value appearing in NullFields will be sent to the server as 2211 // null. It is an error if a field in this list has a non-empty value. 2212 // This may be used to include null fields in Patch requests. 2213 NullFields []string `json:"-"` 2214} 2215 2216func (s *FloatingPointList) MarshalJSON() ([]byte, error) { 2217 type NoMethod FloatingPointList 2218 raw := NoMethod(*s) 2219 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2220} 2221 2222// FloatingPointMean: A representation of a floating point mean metric 2223// contribution. 2224type FloatingPointMean struct { 2225 // Count: The number of values being aggregated. 2226 Count *SplitInt64 `json:"count,omitempty"` 2227 2228 // Sum: The sum of all values being aggregated. 2229 Sum float64 `json:"sum,omitempty"` 2230 2231 // ForceSendFields is a list of field names (e.g. "Count") to 2232 // unconditionally include in API requests. By default, fields with 2233 // empty values are omitted from API requests. However, any non-pointer, 2234 // non-interface field appearing in ForceSendFields will be sent to the 2235 // server regardless of whether the field is empty or not. This may be 2236 // used to include empty fields in Patch requests. 2237 ForceSendFields []string `json:"-"` 2238 2239 // NullFields is a list of field names (e.g. "Count") to include in API 2240 // requests with the JSON null value. By default, fields with empty 2241 // values are omitted from API requests. However, any field with an 2242 // empty value appearing in NullFields will be sent to the server as 2243 // null. It is an error if a field in this list has a non-empty value. 2244 // This may be used to include null fields in Patch requests. 2245 NullFields []string `json:"-"` 2246} 2247 2248func (s *FloatingPointMean) MarshalJSON() ([]byte, error) { 2249 type NoMethod FloatingPointMean 2250 raw := NoMethod(*s) 2251 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2252} 2253 2254func (s *FloatingPointMean) UnmarshalJSON(data []byte) error { 2255 type NoMethod FloatingPointMean 2256 var s1 struct { 2257 Sum gensupport.JSONFloat64 `json:"sum"` 2258 *NoMethod 2259 } 2260 s1.NoMethod = (*NoMethod)(s) 2261 if err := json.Unmarshal(data, &s1); err != nil { 2262 return err 2263 } 2264 s.Sum = float64(s1.Sum) 2265 return nil 2266} 2267 2268// GetDebugConfigRequest: Request to get updated debug configuration for 2269// component. 2270type GetDebugConfigRequest struct { 2271 // ComponentId: The internal component id for which debug configuration 2272 // is requested. 2273 ComponentId string `json:"componentId,omitempty"` 2274 2275 // Location: The [regional endpoint] 2276 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 2277 // that contains the job specified by job_id. 2278 Location string `json:"location,omitempty"` 2279 2280 // WorkerId: The worker id, i.e., VM hostname. 2281 WorkerId string `json:"workerId,omitempty"` 2282 2283 // ForceSendFields is a list of field names (e.g. "ComponentId") to 2284 // unconditionally include in API requests. By default, fields with 2285 // empty values are omitted from API requests. However, any non-pointer, 2286 // non-interface field appearing in ForceSendFields will be sent to the 2287 // server regardless of whether the field is empty or not. This may be 2288 // used to include empty fields in Patch requests. 2289 ForceSendFields []string `json:"-"` 2290 2291 // NullFields is a list of field names (e.g. "ComponentId") to include 2292 // in API requests with the JSON null value. By default, fields with 2293 // empty values are omitted from API requests. However, any field with 2294 // an empty value appearing in NullFields will be sent to the server as 2295 // null. It is an error if a field in this list has a non-empty value. 2296 // This may be used to include null fields in Patch requests. 2297 NullFields []string `json:"-"` 2298} 2299 2300func (s *GetDebugConfigRequest) MarshalJSON() ([]byte, error) { 2301 type NoMethod GetDebugConfigRequest 2302 raw := NoMethod(*s) 2303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2304} 2305 2306// GetDebugConfigResponse: Response to a get debug configuration 2307// request. 2308type GetDebugConfigResponse struct { 2309 // Config: The encoded debug configuration for the requested component. 2310 Config string `json:"config,omitempty"` 2311 2312 // ServerResponse contains the HTTP response code and headers from the 2313 // server. 2314 googleapi.ServerResponse `json:"-"` 2315 2316 // ForceSendFields is a list of field names (e.g. "Config") to 2317 // unconditionally include in API requests. By default, fields with 2318 // empty values are omitted from API requests. However, any non-pointer, 2319 // non-interface field appearing in ForceSendFields will be sent to the 2320 // server regardless of whether the field is empty or not. This may be 2321 // used to include empty fields in Patch requests. 2322 ForceSendFields []string `json:"-"` 2323 2324 // NullFields is a list of field names (e.g. "Config") to include in API 2325 // requests with the JSON null value. By default, fields with empty 2326 // values are omitted from API requests. However, any field with an 2327 // empty value appearing in NullFields will be sent to the server as 2328 // null. It is an error if a field in this list has a non-empty value. 2329 // This may be used to include null fields in Patch requests. 2330 NullFields []string `json:"-"` 2331} 2332 2333func (s *GetDebugConfigResponse) MarshalJSON() ([]byte, error) { 2334 type NoMethod GetDebugConfigResponse 2335 raw := NoMethod(*s) 2336 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2337} 2338 2339// GetTemplateResponse: The response to a GetTemplate request. 2340type GetTemplateResponse struct { 2341 // Metadata: The template metadata describing the template name, 2342 // available parameters, etc. 2343 Metadata *TemplateMetadata `json:"metadata,omitempty"` 2344 2345 // RuntimeMetadata: Describes the runtime metadata with SDKInfo and 2346 // available parameters. 2347 RuntimeMetadata *RuntimeMetadata `json:"runtimeMetadata,omitempty"` 2348 2349 // Status: The status of the get template request. Any problems with the 2350 // request will be indicated in the error_details. 2351 Status *Status `json:"status,omitempty"` 2352 2353 // TemplateType: Template Type. 2354 // 2355 // Possible values: 2356 // "UNKNOWN" - Unknown Template Type. 2357 // "LEGACY" - Legacy Template. 2358 // "FLEX" - Flex Template. 2359 TemplateType string `json:"templateType,omitempty"` 2360 2361 // ServerResponse contains the HTTP response code and headers from the 2362 // server. 2363 googleapi.ServerResponse `json:"-"` 2364 2365 // ForceSendFields is a list of field names (e.g. "Metadata") to 2366 // unconditionally include in API requests. By default, fields with 2367 // empty values are omitted from API requests. However, any non-pointer, 2368 // non-interface field appearing in ForceSendFields will be sent to the 2369 // server regardless of whether the field is empty or not. This may be 2370 // used to include empty fields in Patch requests. 2371 ForceSendFields []string `json:"-"` 2372 2373 // NullFields is a list of field names (e.g. "Metadata") to include in 2374 // API requests with the JSON null value. By default, fields with empty 2375 // values are omitted from API requests. However, any field with an 2376 // empty value appearing in NullFields will be sent to the server as 2377 // null. It is an error if a field in this list has a non-empty value. 2378 // This may be used to include null fields in Patch requests. 2379 NullFields []string `json:"-"` 2380} 2381 2382func (s *GetTemplateResponse) MarshalJSON() ([]byte, error) { 2383 type NoMethod GetTemplateResponse 2384 raw := NoMethod(*s) 2385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2386} 2387 2388// Histogram: Histogram of value counts for a distribution. Buckets have 2389// an inclusive lower bound and exclusive upper bound and use "1,2,5 2390// bucketing": The first bucket range is from [0,1) and all subsequent 2391// bucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus, 2392// bucket boundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2393// ... Negative values are not supported. 2394type Histogram struct { 2395 // BucketCounts: Counts of values in each bucket. For efficiency, prefix 2396 // and trailing buckets with count = 0 are elided. Buckets can store the 2397 // full range of values of an unsigned long, with ULLONG_MAX falling 2398 // into the 59th bucket with range [1e19, 2e19). 2399 BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` 2400 2401 // FirstBucketOffset: Starting index of first stored bucket. The 2402 // non-inclusive upper-bound of the ith bucket is given by: 2403 // pow(10,(i-first_bucket_offset)/3) * 2404 // (1,2,5)[(i-first_bucket_offset)%3] 2405 FirstBucketOffset int64 `json:"firstBucketOffset,omitempty"` 2406 2407 // ForceSendFields is a list of field names (e.g. "BucketCounts") to 2408 // unconditionally include in API requests. By default, fields with 2409 // empty values are omitted from API requests. However, any non-pointer, 2410 // non-interface field appearing in ForceSendFields will be sent to the 2411 // server regardless of whether the field is empty or not. This may be 2412 // used to include empty fields in Patch requests. 2413 ForceSendFields []string `json:"-"` 2414 2415 // NullFields is a list of field names (e.g. "BucketCounts") to include 2416 // in API requests with the JSON null value. By default, fields with 2417 // empty values are omitted from API requests. However, any field with 2418 // an empty value appearing in NullFields will be sent to the server as 2419 // null. It is an error if a field in this list has a non-empty value. 2420 // This may be used to include null fields in Patch requests. 2421 NullFields []string `json:"-"` 2422} 2423 2424func (s *Histogram) MarshalJSON() ([]byte, error) { 2425 type NoMethod Histogram 2426 raw := NoMethod(*s) 2427 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2428} 2429 2430// HotKeyDetection: Proto describing a hot key detected on a given 2431// WorkItem. 2432type HotKeyDetection struct { 2433 // HotKeyAge: The age of the hot key measured from when it was first 2434 // detected. 2435 HotKeyAge string `json:"hotKeyAge,omitempty"` 2436 2437 // SystemName: System-defined name of the step containing this hot key. 2438 // Unique across the workflow. 2439 SystemName string `json:"systemName,omitempty"` 2440 2441 // UserStepName: User-provided name of the step that contains this hot 2442 // key. 2443 UserStepName string `json:"userStepName,omitempty"` 2444 2445 // ForceSendFields is a list of field names (e.g. "HotKeyAge") to 2446 // unconditionally include in API requests. By default, fields with 2447 // empty values are omitted from API requests. However, any non-pointer, 2448 // non-interface field appearing in ForceSendFields will be sent to the 2449 // server regardless of whether the field is empty or not. This may be 2450 // used to include empty fields in Patch requests. 2451 ForceSendFields []string `json:"-"` 2452 2453 // NullFields is a list of field names (e.g. "HotKeyAge") to include in 2454 // API requests with the JSON null value. By default, fields with empty 2455 // values are omitted from API requests. However, any field with an 2456 // empty value appearing in NullFields will be sent to the server as 2457 // null. It is an error if a field in this list has a non-empty value. 2458 // This may be used to include null fields in Patch requests. 2459 NullFields []string `json:"-"` 2460} 2461 2462func (s *HotKeyDetection) MarshalJSON() ([]byte, error) { 2463 type NoMethod HotKeyDetection 2464 raw := NoMethod(*s) 2465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2466} 2467 2468// InstructionInput: An input of an instruction, as a reference to an 2469// output of a producer instruction. 2470type InstructionInput struct { 2471 // OutputNum: The output index (origin zero) within the producer. 2472 OutputNum int64 `json:"outputNum,omitempty"` 2473 2474 // ProducerInstructionIndex: The index (origin zero) of the parallel 2475 // instruction that produces the output to be consumed by this input. 2476 // This index is relative to the list of instructions in this input's 2477 // instruction's containing MapTask. 2478 ProducerInstructionIndex int64 `json:"producerInstructionIndex,omitempty"` 2479 2480 // ForceSendFields is a list of field names (e.g. "OutputNum") to 2481 // unconditionally include in API requests. By default, fields with 2482 // empty values are omitted from API requests. However, any non-pointer, 2483 // non-interface field appearing in ForceSendFields will be sent to the 2484 // server regardless of whether the field is empty or not. This may be 2485 // used to include empty fields in Patch requests. 2486 ForceSendFields []string `json:"-"` 2487 2488 // NullFields is a list of field names (e.g. "OutputNum") to include in 2489 // API requests with the JSON null value. By default, fields with empty 2490 // values are omitted from API requests. However, any field with an 2491 // empty value appearing in NullFields will be sent to the server as 2492 // null. It is an error if a field in this list has a non-empty value. 2493 // This may be used to include null fields in Patch requests. 2494 NullFields []string `json:"-"` 2495} 2496 2497func (s *InstructionInput) MarshalJSON() ([]byte, error) { 2498 type NoMethod InstructionInput 2499 raw := NoMethod(*s) 2500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2501} 2502 2503// InstructionOutput: An output of an instruction. 2504type InstructionOutput struct { 2505 // Codec: The codec to use to encode data being written via this output. 2506 Codec googleapi.RawMessage `json:"codec,omitempty"` 2507 2508 // Name: The user-provided name of this output. 2509 Name string `json:"name,omitempty"` 2510 2511 // OnlyCountKeyBytes: For system-generated byte and mean byte metrics, 2512 // certain instructions should only report the key size. 2513 OnlyCountKeyBytes bool `json:"onlyCountKeyBytes,omitempty"` 2514 2515 // OnlyCountValueBytes: For system-generated byte and mean byte metrics, 2516 // certain instructions should only report the value size. 2517 OnlyCountValueBytes bool `json:"onlyCountValueBytes,omitempty"` 2518 2519 // OriginalName: System-defined name for this output in the original 2520 // workflow graph. Outputs that do not contribute to an original 2521 // instruction do not set this. 2522 OriginalName string `json:"originalName,omitempty"` 2523 2524 // SystemName: System-defined name of this output. Unique across the 2525 // workflow. 2526 SystemName string `json:"systemName,omitempty"` 2527 2528 // ForceSendFields is a list of field names (e.g. "Codec") to 2529 // unconditionally include in API requests. By default, fields with 2530 // empty values are omitted from API requests. However, any non-pointer, 2531 // non-interface field appearing in ForceSendFields will be sent to the 2532 // server regardless of whether the field is empty or not. This may be 2533 // used to include empty fields in Patch requests. 2534 ForceSendFields []string `json:"-"` 2535 2536 // NullFields is a list of field names (e.g. "Codec") to include in API 2537 // requests with the JSON null value. By default, fields with empty 2538 // values are omitted from API requests. However, any field with an 2539 // empty value appearing in NullFields will be sent to the server as 2540 // null. It is an error if a field in this list has a non-empty value. 2541 // This may be used to include null fields in Patch requests. 2542 NullFields []string `json:"-"` 2543} 2544 2545func (s *InstructionOutput) MarshalJSON() ([]byte, error) { 2546 type NoMethod InstructionOutput 2547 raw := NoMethod(*s) 2548 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2549} 2550 2551// IntegerGauge: A metric value representing temporal values of a 2552// variable. 2553type IntegerGauge struct { 2554 // Timestamp: The time at which this value was measured. Measured as 2555 // msecs from epoch. 2556 Timestamp string `json:"timestamp,omitempty"` 2557 2558 // Value: The value of the variable represented by this gauge. 2559 Value *SplitInt64 `json:"value,omitempty"` 2560 2561 // ForceSendFields is a list of field names (e.g. "Timestamp") to 2562 // unconditionally include in API requests. By default, fields with 2563 // empty values are omitted from API requests. However, any non-pointer, 2564 // non-interface field appearing in ForceSendFields will be sent to the 2565 // server regardless of whether the field is empty or not. This may be 2566 // used to include empty fields in Patch requests. 2567 ForceSendFields []string `json:"-"` 2568 2569 // NullFields is a list of field names (e.g. "Timestamp") to include in 2570 // API requests with the JSON null value. By default, fields with empty 2571 // values are omitted from API requests. However, any field with an 2572 // empty value appearing in NullFields will be sent to the server as 2573 // null. It is an error if a field in this list has a non-empty value. 2574 // This may be used to include null fields in Patch requests. 2575 NullFields []string `json:"-"` 2576} 2577 2578func (s *IntegerGauge) MarshalJSON() ([]byte, error) { 2579 type NoMethod IntegerGauge 2580 raw := NoMethod(*s) 2581 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2582} 2583 2584// IntegerList: A metric value representing a list of integers. 2585type IntegerList struct { 2586 // Elements: Elements of the list. 2587 Elements []*SplitInt64 `json:"elements,omitempty"` 2588 2589 // ForceSendFields is a list of field names (e.g. "Elements") to 2590 // unconditionally include in API requests. By default, fields with 2591 // empty values are omitted from API requests. However, any non-pointer, 2592 // non-interface field appearing in ForceSendFields will be sent to the 2593 // server regardless of whether the field is empty or not. This may be 2594 // used to include empty fields in Patch requests. 2595 ForceSendFields []string `json:"-"` 2596 2597 // NullFields is a list of field names (e.g. "Elements") to include in 2598 // API requests with the JSON null value. By default, fields with empty 2599 // values are omitted from API requests. However, any field with an 2600 // empty value appearing in NullFields will be sent to the server as 2601 // null. It is an error if a field in this list has a non-empty value. 2602 // This may be used to include null fields in Patch requests. 2603 NullFields []string `json:"-"` 2604} 2605 2606func (s *IntegerList) MarshalJSON() ([]byte, error) { 2607 type NoMethod IntegerList 2608 raw := NoMethod(*s) 2609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2610} 2611 2612// IntegerMean: A representation of an integer mean metric contribution. 2613type IntegerMean struct { 2614 // Count: The number of values being aggregated. 2615 Count *SplitInt64 `json:"count,omitempty"` 2616 2617 // Sum: The sum of all values being aggregated. 2618 Sum *SplitInt64 `json:"sum,omitempty"` 2619 2620 // ForceSendFields is a list of field names (e.g. "Count") to 2621 // unconditionally include in API requests. By default, fields with 2622 // empty values are omitted from API requests. However, any non-pointer, 2623 // non-interface field appearing in ForceSendFields will be sent to the 2624 // server regardless of whether the field is empty or not. This may be 2625 // used to include empty fields in Patch requests. 2626 ForceSendFields []string `json:"-"` 2627 2628 // NullFields is a list of field names (e.g. "Count") to include in API 2629 // requests with the JSON null value. By default, fields with empty 2630 // values are omitted from API requests. However, any field with an 2631 // empty value appearing in NullFields will be sent to the server as 2632 // null. It is an error if a field in this list has a non-empty value. 2633 // This may be used to include null fields in Patch requests. 2634 NullFields []string `json:"-"` 2635} 2636 2637func (s *IntegerMean) MarshalJSON() ([]byte, error) { 2638 type NoMethod IntegerMean 2639 raw := NoMethod(*s) 2640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2641} 2642 2643// Job: Defines a job to be run by the Cloud Dataflow service. nextID: 2644// 26 2645type Job struct { 2646 // ClientRequestId: The client's unique identifier of the job, re-used 2647 // across retried attempts. If this field is set, the service will 2648 // ensure its uniqueness. The request to create a job will fail if the 2649 // service has knowledge of a previously submitted job with the same 2650 // client's ID and job name. The caller may use this field to ensure 2651 // idempotence of job creation across retried attempts to create a job. 2652 // By default, the field is empty and, in that case, the service ignores 2653 // it. 2654 ClientRequestId string `json:"clientRequestId,omitempty"` 2655 2656 // CreateTime: The timestamp when the job was initially created. 2657 // Immutable and set by the Cloud Dataflow service. 2658 CreateTime string `json:"createTime,omitempty"` 2659 2660 // CreatedFromSnapshotId: If this is specified, the job's initial state 2661 // is populated from the given snapshot. 2662 CreatedFromSnapshotId string `json:"createdFromSnapshotId,omitempty"` 2663 2664 // CurrentState: The current state of the job. Jobs are created in the 2665 // `JOB_STATE_STOPPED` state unless otherwise specified. A job in the 2666 // `JOB_STATE_RUNNING` state may asynchronously enter a terminal state. 2667 // After a job has reached a terminal state, no further state updates 2668 // may be made. This field may be mutated by the Cloud Dataflow service; 2669 // callers cannot mutate it. 2670 // 2671 // Possible values: 2672 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 2673 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job 2674 // has not yet started to run. 2675 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 2676 // currently running. 2677 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 2678 // successfully completed. This is a terminal job state. This state may 2679 // be set by the Cloud Dataflow service, as a transition from 2680 // `JOB_STATE_RUNNING`. It may also be set via a Cloud Dataflow 2681 // `UpdateJob` call, if the job has not yet reached a terminal state. 2682 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has 2683 // failed. This is a terminal job state. This state may only be set by 2684 // the Cloud Dataflow service, and only as a transition from 2685 // `JOB_STATE_RUNNING`. 2686 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the 2687 // job has been explicitly cancelled. This is a terminal job state. This 2688 // state may only be set via a Cloud Dataflow `UpdateJob` call, and only 2689 // if the job has not yet reached another terminal state. 2690 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job 2691 // was successfully updated, meaning that this job was stopped and 2692 // another job was started, inheriting state from this one. This is a 2693 // terminal job state. This state may only be set by the Cloud Dataflow 2694 // service, and only as a transition from `JOB_STATE_RUNNING`. 2695 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job 2696 // is in the process of draining. A draining job has stopped pulling 2697 // from its input sources and is processing any data that remains 2698 // in-flight. This state may be set via a Cloud Dataflow `UpdateJob` 2699 // call, but only as a transition from `JOB_STATE_RUNNING`. Jobs that 2700 // are draining may only transition to `JOB_STATE_DRAINED`, 2701 // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 2702 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job 2703 // has been drained. A drained job terminated by stopping pulling from 2704 // its input sources and processing any data that remained in-flight 2705 // when draining was requested. This state is a terminal state, may only 2706 // be set by the Cloud Dataflow service, and only as a transition from 2707 // `JOB_STATE_DRAINING`. 2708 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job 2709 // has been created but is not yet running. Jobs that are pending may 2710 // only transition to `JOB_STATE_RUNNING`, or `JOB_STATE_FAILED`. 2711 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the 2712 // job has been explicitly cancelled and is in the process of stopping. 2713 // Jobs that are cancelling may only transition to `JOB_STATE_CANCELLED` 2714 // or `JOB_STATE_FAILED`. 2715 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has 2716 // been created but is being delayed until launch. Jobs that are queued 2717 // may only transition to `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 2718 // "JOB_STATE_RESOURCE_CLEANING_UP" - `JOB_STATE_RESOURCE_CLEANING_UP` 2719 // indicates that the batch job's associated resources are currently 2720 // being cleaned up after a successful run. Currently, this is an opt-in 2721 // feature, please reach out to Cloud support team if you are 2722 // interested. 2723 CurrentState string `json:"currentState,omitempty"` 2724 2725 // CurrentStateTime: The timestamp associated with the current state. 2726 CurrentStateTime string `json:"currentStateTime,omitempty"` 2727 2728 // Environment: The environment for the job. 2729 Environment *Environment `json:"environment,omitempty"` 2730 2731 // ExecutionInfo: Deprecated. 2732 ExecutionInfo *JobExecutionInfo `json:"executionInfo,omitempty"` 2733 2734 // Id: The unique ID of this job. This field is set by the Cloud 2735 // Dataflow service when the Job is created, and is immutable for the 2736 // life of the job. 2737 Id string `json:"id,omitempty"` 2738 2739 // JobMetadata: This field is populated by the Dataflow service to 2740 // support filtering jobs by the metadata values provided here. 2741 // Populated for ListJobs and all GetJob views SUMMARY and higher. 2742 JobMetadata *JobMetadata `json:"jobMetadata,omitempty"` 2743 2744 // Labels: User-defined labels for this job. The labels map can contain 2745 // no more than 64 entries. Entries of the labels map are UTF8 strings 2746 // that comply with the following restrictions: * Keys must conform to 2747 // regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: 2748 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally 2749 // constrained to be <= 128 bytes in size. 2750 Labels map[string]string `json:"labels,omitempty"` 2751 2752 // Location: The [regional endpoint] 2753 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 2754 // that contains this job. 2755 Location string `json:"location,omitempty"` 2756 2757 // Name: The user-specified Cloud Dataflow job name. Only one Job with a 2758 // given name may exist in a project at any given time. If a caller 2759 // attempts to create a Job with the same name as an already-existing 2760 // Job, the attempt returns the existing Job. The name must match the 2761 // regular expression `[a-z]([-a-z0-9]{0,38}[a-z0-9])?` 2762 Name string `json:"name,omitempty"` 2763 2764 // PipelineDescription: Preliminary field: The format of this data may 2765 // change at any time. A description of the user pipeline and stages 2766 // through which it is executed. Created by Cloud Dataflow service. Only 2767 // retrieved with JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. 2768 PipelineDescription *PipelineDescription `json:"pipelineDescription,omitempty"` 2769 2770 // ProjectId: The ID of the Cloud Platform project that the job belongs 2771 // to. 2772 ProjectId string `json:"projectId,omitempty"` 2773 2774 // ReplaceJobId: If this job is an update of an existing job, this field 2775 // is the job ID of the job it replaced. When sending a 2776 // `CreateJobRequest`, you can update a job by specifying it here. The 2777 // job named here is stopped, and its intermediate state is transferred 2778 // to this job. 2779 ReplaceJobId string `json:"replaceJobId,omitempty"` 2780 2781 // ReplacedByJobId: If another job is an update of this job (and thus, 2782 // this job is in `JOB_STATE_UPDATED`), this field contains the ID of 2783 // that job. 2784 ReplacedByJobId string `json:"replacedByJobId,omitempty"` 2785 2786 // RequestedState: The job's requested state. `UpdateJob` may be used to 2787 // switch between the `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING` 2788 // states, by setting requested_state. `UpdateJob` may also be used to 2789 // directly set a job's requested state to `JOB_STATE_CANCELLED` or 2790 // `JOB_STATE_DONE`, irrevocably terminating the job if it has not 2791 // already reached a terminal state. 2792 // 2793 // Possible values: 2794 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 2795 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job 2796 // has not yet started to run. 2797 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 2798 // currently running. 2799 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 2800 // successfully completed. This is a terminal job state. This state may 2801 // be set by the Cloud Dataflow service, as a transition from 2802 // `JOB_STATE_RUNNING`. It may also be set via a Cloud Dataflow 2803 // `UpdateJob` call, if the job has not yet reached a terminal state. 2804 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has 2805 // failed. This is a terminal job state. This state may only be set by 2806 // the Cloud Dataflow service, and only as a transition from 2807 // `JOB_STATE_RUNNING`. 2808 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the 2809 // job has been explicitly cancelled. This is a terminal job state. This 2810 // state may only be set via a Cloud Dataflow `UpdateJob` call, and only 2811 // if the job has not yet reached another terminal state. 2812 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job 2813 // was successfully updated, meaning that this job was stopped and 2814 // another job was started, inheriting state from this one. This is a 2815 // terminal job state. This state may only be set by the Cloud Dataflow 2816 // service, and only as a transition from `JOB_STATE_RUNNING`. 2817 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job 2818 // is in the process of draining. A draining job has stopped pulling 2819 // from its input sources and is processing any data that remains 2820 // in-flight. This state may be set via a Cloud Dataflow `UpdateJob` 2821 // call, but only as a transition from `JOB_STATE_RUNNING`. Jobs that 2822 // are draining may only transition to `JOB_STATE_DRAINED`, 2823 // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 2824 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job 2825 // has been drained. A drained job terminated by stopping pulling from 2826 // its input sources and processing any data that remained in-flight 2827 // when draining was requested. This state is a terminal state, may only 2828 // be set by the Cloud Dataflow service, and only as a transition from 2829 // `JOB_STATE_DRAINING`. 2830 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job 2831 // has been created but is not yet running. Jobs that are pending may 2832 // only transition to `JOB_STATE_RUNNING`, or `JOB_STATE_FAILED`. 2833 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the 2834 // job has been explicitly cancelled and is in the process of stopping. 2835 // Jobs that are cancelling may only transition to `JOB_STATE_CANCELLED` 2836 // or `JOB_STATE_FAILED`. 2837 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has 2838 // been created but is being delayed until launch. Jobs that are queued 2839 // may only transition to `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 2840 // "JOB_STATE_RESOURCE_CLEANING_UP" - `JOB_STATE_RESOURCE_CLEANING_UP` 2841 // indicates that the batch job's associated resources are currently 2842 // being cleaned up after a successful run. Currently, this is an opt-in 2843 // feature, please reach out to Cloud support team if you are 2844 // interested. 2845 RequestedState string `json:"requestedState,omitempty"` 2846 2847 // SatisfiesPzs: Reserved for future use. This field is set only in 2848 // responses from the server; it is ignored if it is set in any 2849 // requests. 2850 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` 2851 2852 // StageStates: This field may be mutated by the Cloud Dataflow service; 2853 // callers cannot mutate it. 2854 StageStates []*ExecutionStageState `json:"stageStates,omitempty"` 2855 2856 // StartTime: The timestamp when the job was started (transitioned to 2857 // JOB_STATE_PENDING). Flexible resource scheduling jobs are started 2858 // with some delay after job creation, so start_time is unset before 2859 // start and is updated when the job is started by the Cloud Dataflow 2860 // service. For other jobs, start_time always equals to create_time and 2861 // is immutable and set by the Cloud Dataflow service. 2862 StartTime string `json:"startTime,omitempty"` 2863 2864 // Steps: Exactly one of step or steps_location should be specified. The 2865 // top-level steps that constitute the entire job. Only retrieved with 2866 // JOB_VIEW_ALL. 2867 Steps []*Step `json:"steps,omitempty"` 2868 2869 // StepsLocation: The Cloud Storage location where the steps are stored. 2870 StepsLocation string `json:"stepsLocation,omitempty"` 2871 2872 // TempFiles: A set of files the system should be aware of that are used 2873 // for temporary storage. These temporary files will be removed on job 2874 // completion. No duplicates are allowed. No file patterns are 2875 // supported. The supported files are: Google Cloud Storage: 2876 // storage.googleapis.com/{bucket}/{object} 2877 // bucket.storage.googleapis.com/{object} 2878 TempFiles []string `json:"tempFiles,omitempty"` 2879 2880 // TransformNameMapping: The map of transform name prefixes of the job 2881 // to be replaced to the corresponding name prefixes of the new job. 2882 TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"` 2883 2884 // Type: The type of Cloud Dataflow job. 2885 // 2886 // Possible values: 2887 // "JOB_TYPE_UNKNOWN" - The type of the job is unspecified, or 2888 // unknown. 2889 // "JOB_TYPE_BATCH" - A batch job with a well-defined end point: data 2890 // is read, data is processed, data is written, and the job is done. 2891 // "JOB_TYPE_STREAMING" - A continuously streaming job with no end: 2892 // data is read, processed, and written continuously. 2893 Type string `json:"type,omitempty"` 2894 2895 // ServerResponse contains the HTTP response code and headers from the 2896 // server. 2897 googleapi.ServerResponse `json:"-"` 2898 2899 // ForceSendFields is a list of field names (e.g. "ClientRequestId") to 2900 // unconditionally include in API requests. By default, fields with 2901 // empty values are omitted from API requests. However, any non-pointer, 2902 // non-interface field appearing in ForceSendFields will be sent to the 2903 // server regardless of whether the field is empty or not. This may be 2904 // used to include empty fields in Patch requests. 2905 ForceSendFields []string `json:"-"` 2906 2907 // NullFields is a list of field names (e.g. "ClientRequestId") to 2908 // include in API requests with the JSON null value. By default, fields 2909 // with empty values are omitted from API requests. However, any field 2910 // with an empty value appearing in NullFields will be sent to the 2911 // server as null. It is an error if a field in this list has a 2912 // non-empty value. This may be used to include null fields in Patch 2913 // requests. 2914 NullFields []string `json:"-"` 2915} 2916 2917func (s *Job) MarshalJSON() ([]byte, error) { 2918 type NoMethod Job 2919 raw := NoMethod(*s) 2920 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2921} 2922 2923// JobExecutionDetails: Information about the execution of a job. 2924type JobExecutionDetails struct { 2925 // NextPageToken: If present, this response does not contain all 2926 // requested tasks. To obtain the next page of results, repeat the 2927 // request with page_token set to this value. 2928 NextPageToken string `json:"nextPageToken,omitempty"` 2929 2930 // Stages: The stages of the job execution. 2931 Stages []*StageSummary `json:"stages,omitempty"` 2932 2933 // ServerResponse contains the HTTP response code and headers from the 2934 // server. 2935 googleapi.ServerResponse `json:"-"` 2936 2937 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2938 // unconditionally include in API requests. By default, fields with 2939 // empty values are omitted from API requests. However, any non-pointer, 2940 // non-interface field appearing in ForceSendFields will be sent to the 2941 // server regardless of whether the field is empty or not. This may be 2942 // used to include empty fields in Patch requests. 2943 ForceSendFields []string `json:"-"` 2944 2945 // NullFields is a list of field names (e.g. "NextPageToken") to include 2946 // in API requests with the JSON null value. By default, fields with 2947 // empty values are omitted from API requests. However, any field with 2948 // an empty value appearing in NullFields will be sent to the server as 2949 // null. It is an error if a field in this list has a non-empty value. 2950 // This may be used to include null fields in Patch requests. 2951 NullFields []string `json:"-"` 2952} 2953 2954func (s *JobExecutionDetails) MarshalJSON() ([]byte, error) { 2955 type NoMethod JobExecutionDetails 2956 raw := NoMethod(*s) 2957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2958} 2959 2960// JobExecutionInfo: Additional information about how a Cloud Dataflow 2961// job will be executed that isn't contained in the submitted job. 2962type JobExecutionInfo struct { 2963 // Stages: A mapping from each stage to the information about that 2964 // stage. 2965 Stages map[string]JobExecutionStageInfo `json:"stages,omitempty"` 2966 2967 // ForceSendFields is a list of field names (e.g. "Stages") to 2968 // unconditionally include in API requests. By default, fields with 2969 // empty values are omitted from API requests. However, any non-pointer, 2970 // non-interface field appearing in ForceSendFields will be sent to the 2971 // server regardless of whether the field is empty or not. This may be 2972 // used to include empty fields in Patch requests. 2973 ForceSendFields []string `json:"-"` 2974 2975 // NullFields is a list of field names (e.g. "Stages") to include in API 2976 // requests with the JSON null value. By default, fields with empty 2977 // values are omitted from API requests. However, any field with an 2978 // empty value appearing in NullFields will be sent to the server as 2979 // null. It is an error if a field in this list has a non-empty value. 2980 // This may be used to include null fields in Patch requests. 2981 NullFields []string `json:"-"` 2982} 2983 2984func (s *JobExecutionInfo) MarshalJSON() ([]byte, error) { 2985 type NoMethod JobExecutionInfo 2986 raw := NoMethod(*s) 2987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2988} 2989 2990// JobExecutionStageInfo: Contains information about how a particular 2991// google.dataflow.v1beta3.Step will be executed. 2992type JobExecutionStageInfo struct { 2993 // StepName: The steps associated with the execution stage. Note that 2994 // stages may have several steps, and that a given step might be run by 2995 // more than one stage. 2996 StepName []string `json:"stepName,omitempty"` 2997 2998 // ForceSendFields is a list of field names (e.g. "StepName") to 2999 // unconditionally include in API requests. By default, fields with 3000 // empty values are omitted from API requests. However, any non-pointer, 3001 // non-interface field appearing in ForceSendFields will be sent to the 3002 // server regardless of whether the field is empty or not. This may be 3003 // used to include empty fields in Patch requests. 3004 ForceSendFields []string `json:"-"` 3005 3006 // NullFields is a list of field names (e.g. "StepName") to include in 3007 // API requests with the JSON null value. By default, fields with empty 3008 // values are omitted from API requests. However, any field with an 3009 // empty value appearing in NullFields will be sent to the server as 3010 // null. It is an error if a field in this list has a non-empty value. 3011 // This may be used to include null fields in Patch requests. 3012 NullFields []string `json:"-"` 3013} 3014 3015func (s *JobExecutionStageInfo) MarshalJSON() ([]byte, error) { 3016 type NoMethod JobExecutionStageInfo 3017 raw := NoMethod(*s) 3018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3019} 3020 3021// JobMessage: A particular message pertaining to a Dataflow job. 3022type JobMessage struct { 3023 // Id: Deprecated. 3024 Id string `json:"id,omitempty"` 3025 3026 // MessageImportance: Importance level of the message. 3027 // 3028 // Possible values: 3029 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't 3030 // specified, or is unknown. 3031 // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: 3032 // typically only useful for software engineers working on the code the 3033 // job is running. Typically, Dataflow pipeline runners do not display 3034 // log messages at this level by default. 3035 // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: 3036 // somewhat verbose, but potentially useful to users. Typically, 3037 // Dataflow pipeline runners do not display log messages at this level 3038 // by default. These messages are displayed by default in the Dataflow 3039 // monitoring UI. 3040 // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful 3041 // for keeping track of the execution of a Dataflow pipeline. Typically, 3042 // Dataflow pipeline runners display log messages at this level by 3043 // default, and these messages are displayed by default in the Dataflow 3044 // monitoring UI. 3045 // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: 3046 // indicating a condition pertaining to a job which may require human 3047 // intervention. Typically, Dataflow pipeline runners display log 3048 // messages at this level by default, and these messages are displayed 3049 // by default in the Dataflow monitoring UI. 3050 // "JOB_MESSAGE_ERROR" - The message is at the 'error' level: 3051 // indicating a condition preventing a job from succeeding. Typically, 3052 // Dataflow pipeline runners display log messages at this level by 3053 // default, and these messages are displayed by default in the Dataflow 3054 // monitoring UI. 3055 MessageImportance string `json:"messageImportance,omitempty"` 3056 3057 // MessageText: The text of the message. 3058 MessageText string `json:"messageText,omitempty"` 3059 3060 // Time: The timestamp of the message. 3061 Time string `json:"time,omitempty"` 3062 3063 // ForceSendFields is a list of field names (e.g. "Id") to 3064 // unconditionally include in API requests. By default, fields with 3065 // empty values are omitted from API requests. However, any non-pointer, 3066 // non-interface field appearing in ForceSendFields will be sent to the 3067 // server regardless of whether the field is empty or not. This may be 3068 // used to include empty fields in Patch requests. 3069 ForceSendFields []string `json:"-"` 3070 3071 // NullFields is a list of field names (e.g. "Id") to include in API 3072 // requests with the JSON null value. By default, fields with empty 3073 // values are omitted from API requests. However, any field with an 3074 // empty value appearing in NullFields will be sent to the server as 3075 // null. It is an error if a field in this list has a non-empty value. 3076 // This may be used to include null fields in Patch requests. 3077 NullFields []string `json:"-"` 3078} 3079 3080func (s *JobMessage) MarshalJSON() ([]byte, error) { 3081 type NoMethod JobMessage 3082 raw := NoMethod(*s) 3083 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3084} 3085 3086// JobMetadata: Metadata available primarily for filtering jobs. Will be 3087// included in the ListJob response and Job SUMMARY view. 3088type JobMetadata struct { 3089 // BigTableDetails: Identification of a Cloud BigTable source used in 3090 // the Dataflow job. 3091 BigTableDetails []*BigTableIODetails `json:"bigTableDetails,omitempty"` 3092 3093 // BigqueryDetails: Identification of a BigQuery source used in the 3094 // Dataflow job. 3095 BigqueryDetails []*BigQueryIODetails `json:"bigqueryDetails,omitempty"` 3096 3097 // DatastoreDetails: Identification of a Datastore source used in the 3098 // Dataflow job. 3099 DatastoreDetails []*DatastoreIODetails `json:"datastoreDetails,omitempty"` 3100 3101 // FileDetails: Identification of a File source used in the Dataflow 3102 // job. 3103 FileDetails []*FileIODetails `json:"fileDetails,omitempty"` 3104 3105 // PubsubDetails: Identification of a PubSub source used in the Dataflow 3106 // job. 3107 PubsubDetails []*PubSubIODetails `json:"pubsubDetails,omitempty"` 3108 3109 // SdkVersion: The SDK version used to run the job. 3110 SdkVersion *SdkVersion `json:"sdkVersion,omitempty"` 3111 3112 // SpannerDetails: Identification of a Spanner source used in the 3113 // Dataflow job. 3114 SpannerDetails []*SpannerIODetails `json:"spannerDetails,omitempty"` 3115 3116 // ForceSendFields is a list of field names (e.g. "BigTableDetails") to 3117 // unconditionally include in API requests. By default, fields with 3118 // empty values are omitted from API requests. However, any non-pointer, 3119 // non-interface field appearing in ForceSendFields will be sent to the 3120 // server regardless of whether the field is empty or not. This may be 3121 // used to include empty fields in Patch requests. 3122 ForceSendFields []string `json:"-"` 3123 3124 // NullFields is a list of field names (e.g. "BigTableDetails") to 3125 // include in API requests with the JSON null value. By default, fields 3126 // with empty values are omitted from API requests. However, any field 3127 // with an empty value appearing in NullFields will be sent to the 3128 // server as null. It is an error if a field in this list has a 3129 // non-empty value. This may be used to include null fields in Patch 3130 // requests. 3131 NullFields []string `json:"-"` 3132} 3133 3134func (s *JobMetadata) MarshalJSON() ([]byte, error) { 3135 type NoMethod JobMetadata 3136 raw := NoMethod(*s) 3137 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3138} 3139 3140// JobMetrics: JobMetrics contains a collection of metrics describing 3141// the detailed progress of a Dataflow job. Metrics correspond to 3142// user-defined and system-defined metrics in the job. This resource 3143// captures only the most recent values of each metric; time-series data 3144// can be queried for them (under the same metric names) from Cloud 3145// Monitoring. 3146type JobMetrics struct { 3147 // MetricTime: Timestamp as of which metric values are current. 3148 MetricTime string `json:"metricTime,omitempty"` 3149 3150 // Metrics: All metrics for this job. 3151 Metrics []*MetricUpdate `json:"metrics,omitempty"` 3152 3153 // ServerResponse contains the HTTP response code and headers from the 3154 // server. 3155 googleapi.ServerResponse `json:"-"` 3156 3157 // ForceSendFields is a list of field names (e.g. "MetricTime") to 3158 // unconditionally include in API requests. By default, fields with 3159 // empty values are omitted from API requests. However, any non-pointer, 3160 // non-interface field appearing in ForceSendFields will be sent to the 3161 // server regardless of whether the field is empty or not. This may be 3162 // used to include empty fields in Patch requests. 3163 ForceSendFields []string `json:"-"` 3164 3165 // NullFields is a list of field names (e.g. "MetricTime") to include in 3166 // API requests with the JSON null value. By default, fields with empty 3167 // values are omitted from API requests. However, any field with an 3168 // empty value appearing in NullFields will be sent to the server as 3169 // null. It is an error if a field in this list has a non-empty value. 3170 // This may be used to include null fields in Patch requests. 3171 NullFields []string `json:"-"` 3172} 3173 3174func (s *JobMetrics) MarshalJSON() ([]byte, error) { 3175 type NoMethod JobMetrics 3176 raw := NoMethod(*s) 3177 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3178} 3179 3180// KeyRangeDataDiskAssignment: Data disk assignment information for a 3181// specific key-range of a sharded computation. Currently we only 3182// support UTF-8 character splits to simplify encoding into JSON. 3183type KeyRangeDataDiskAssignment struct { 3184 // DataDisk: The name of the data disk where data for this range is 3185 // stored. This name is local to the Google Cloud Platform project and 3186 // uniquely identifies the disk within that project, for example 3187 // "myproject-1014-104817-4c2-harness-0-disk-1". 3188 DataDisk string `json:"dataDisk,omitempty"` 3189 3190 // End: The end (exclusive) of the key range. 3191 End string `json:"end,omitempty"` 3192 3193 // Start: The start (inclusive) of the key range. 3194 Start string `json:"start,omitempty"` 3195 3196 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3197 // unconditionally include in API requests. By default, fields with 3198 // empty values are omitted from API requests. However, any non-pointer, 3199 // non-interface field appearing in ForceSendFields will be sent to the 3200 // server regardless of whether the field is empty or not. This may be 3201 // used to include empty fields in Patch requests. 3202 ForceSendFields []string `json:"-"` 3203 3204 // NullFields is a list of field names (e.g. "DataDisk") to include in 3205 // API requests with the JSON null value. By default, fields with empty 3206 // values are omitted from API requests. However, any field with an 3207 // empty value appearing in NullFields will be sent to the server as 3208 // null. It is an error if a field in this list has a non-empty value. 3209 // This may be used to include null fields in Patch requests. 3210 NullFields []string `json:"-"` 3211} 3212 3213func (s *KeyRangeDataDiskAssignment) MarshalJSON() ([]byte, error) { 3214 type NoMethod KeyRangeDataDiskAssignment 3215 raw := NoMethod(*s) 3216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3217} 3218 3219// KeyRangeLocation: Location information for a specific key-range of a 3220// sharded computation. Currently we only support UTF-8 character splits 3221// to simplify encoding into JSON. 3222type KeyRangeLocation struct { 3223 // DataDisk: The name of the data disk where data for this range is 3224 // stored. This name is local to the Google Cloud Platform project and 3225 // uniquely identifies the disk within that project, for example 3226 // "myproject-1014-104817-4c2-harness-0-disk-1". 3227 DataDisk string `json:"dataDisk,omitempty"` 3228 3229 // DeliveryEndpoint: The physical location of this range assignment to 3230 // be used for streaming computation cross-worker message delivery. 3231 DeliveryEndpoint string `json:"deliveryEndpoint,omitempty"` 3232 3233 // DeprecatedPersistentDirectory: DEPRECATED. The location of the 3234 // persistent state for this range, as a persistent directory in the 3235 // worker local filesystem. 3236 DeprecatedPersistentDirectory string `json:"deprecatedPersistentDirectory,omitempty"` 3237 3238 // End: The end (exclusive) of the key range. 3239 End string `json:"end,omitempty"` 3240 3241 // Start: The start (inclusive) of the key range. 3242 Start string `json:"start,omitempty"` 3243 3244 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3245 // unconditionally include in API requests. By default, fields with 3246 // empty values are omitted from API requests. However, any non-pointer, 3247 // non-interface field appearing in ForceSendFields will be sent to the 3248 // server regardless of whether the field is empty or not. This may be 3249 // used to include empty fields in Patch requests. 3250 ForceSendFields []string `json:"-"` 3251 3252 // NullFields is a list of field names (e.g. "DataDisk") to include in 3253 // API 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 3261func (s *KeyRangeLocation) MarshalJSON() ([]byte, error) { 3262 type NoMethod KeyRangeLocation 3263 raw := NoMethod(*s) 3264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3265} 3266 3267// LaunchFlexTemplateParameter: Launch FlexTemplate Parameter. 3268type LaunchFlexTemplateParameter struct { 3269 // ContainerSpec: Spec about the container image to launch. 3270 ContainerSpec *ContainerSpec `json:"containerSpec,omitempty"` 3271 3272 // ContainerSpecGcsPath: Cloud Storage path to a file with json 3273 // serialized ContainerSpec as content. 3274 ContainerSpecGcsPath string `json:"containerSpecGcsPath,omitempty"` 3275 3276 // Environment: The runtime environment for the FlexTemplate job 3277 Environment *FlexTemplateRuntimeEnvironment `json:"environment,omitempty"` 3278 3279 // JobName: Required. The job name to use for the created job. For 3280 // update job request, job name should be same as the existing running 3281 // job. 3282 JobName string `json:"jobName,omitempty"` 3283 3284 // LaunchOptions: Launch options for this flex template job. This is a 3285 // common set of options across languages and templates. This should not 3286 // be used to pass job parameters. 3287 LaunchOptions map[string]string `json:"launchOptions,omitempty"` 3288 3289 // Parameters: The parameters for FlexTemplate. Ex. {"num_workers":"5"} 3290 Parameters map[string]string `json:"parameters,omitempty"` 3291 3292 // TransformNameMappings: Use this to pass transform_name_mappings for 3293 // streaming update jobs. 3294 // Ex:{"oldTransformName":"newTransformName",...}' 3295 TransformNameMappings map[string]string `json:"transformNameMappings,omitempty"` 3296 3297 // Update: Set this to true if you are sending a request to update a 3298 // running streaming job. When set, the job name should be the same as 3299 // the running job. 3300 Update bool `json:"update,omitempty"` 3301 3302 // ForceSendFields is a list of field names (e.g. "ContainerSpec") to 3303 // unconditionally include in API requests. By default, fields with 3304 // empty values are omitted from API requests. However, any non-pointer, 3305 // non-interface field appearing in ForceSendFields will be sent to the 3306 // server regardless of whether the field is empty or not. This may be 3307 // used to include empty fields in Patch requests. 3308 ForceSendFields []string `json:"-"` 3309 3310 // NullFields is a list of field names (e.g. "ContainerSpec") to include 3311 // in API requests with the JSON null value. By default, fields with 3312 // empty values are omitted from API requests. However, any field with 3313 // an empty value appearing in NullFields will be sent to the server as 3314 // null. It is an error if a field in this list has a non-empty value. 3315 // This may be used to include null fields in Patch requests. 3316 NullFields []string `json:"-"` 3317} 3318 3319func (s *LaunchFlexTemplateParameter) MarshalJSON() ([]byte, error) { 3320 type NoMethod LaunchFlexTemplateParameter 3321 raw := NoMethod(*s) 3322 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3323} 3324 3325// LaunchFlexTemplateRequest: A request to launch a Cloud Dataflow job 3326// from a FlexTemplate. 3327type LaunchFlexTemplateRequest struct { 3328 // LaunchParameter: Required. Parameter to launch a job form Flex 3329 // Template. 3330 LaunchParameter *LaunchFlexTemplateParameter `json:"launchParameter,omitempty"` 3331 3332 // ValidateOnly: If true, the request is validated but not actually 3333 // executed. Defaults to false. 3334 ValidateOnly bool `json:"validateOnly,omitempty"` 3335 3336 // ForceSendFields is a list of field names (e.g. "LaunchParameter") to 3337 // unconditionally include in API requests. By default, fields with 3338 // empty values are omitted from API requests. However, any non-pointer, 3339 // non-interface field appearing in ForceSendFields will be sent to the 3340 // server regardless of whether the field is empty or not. This may be 3341 // used to include empty fields in Patch requests. 3342 ForceSendFields []string `json:"-"` 3343 3344 // NullFields is a list of field names (e.g. "LaunchParameter") to 3345 // include in API requests with the JSON null value. By default, fields 3346 // with empty values are omitted from API requests. However, any field 3347 // with an empty value appearing in NullFields will be sent to the 3348 // server as null. It is an error if a field in this list has a 3349 // non-empty value. This may be used to include null fields in Patch 3350 // requests. 3351 NullFields []string `json:"-"` 3352} 3353 3354func (s *LaunchFlexTemplateRequest) MarshalJSON() ([]byte, error) { 3355 type NoMethod LaunchFlexTemplateRequest 3356 raw := NoMethod(*s) 3357 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3358} 3359 3360// LaunchFlexTemplateResponse: Response to the request to launch a job 3361// from Flex Template. 3362type LaunchFlexTemplateResponse struct { 3363 // Job: The job that was launched, if the request was not a dry run and 3364 // the job was successfully launched. 3365 Job *Job `json:"job,omitempty"` 3366 3367 // ServerResponse contains the HTTP response code and headers from the 3368 // server. 3369 googleapi.ServerResponse `json:"-"` 3370 3371 // ForceSendFields is a list of field names (e.g. "Job") to 3372 // unconditionally include in API requests. By default, fields with 3373 // empty values are omitted from API requests. However, any non-pointer, 3374 // non-interface field appearing in ForceSendFields will be sent to the 3375 // server regardless of whether the field is empty or not. This may be 3376 // used to include empty fields in Patch requests. 3377 ForceSendFields []string `json:"-"` 3378 3379 // NullFields is a list of field names (e.g. "Job") to include in API 3380 // requests with the JSON null value. By default, fields with empty 3381 // values are omitted from API requests. However, any field with an 3382 // empty value appearing in NullFields will be sent to the server as 3383 // null. It is an error if a field in this list has a non-empty value. 3384 // This may be used to include null fields in Patch requests. 3385 NullFields []string `json:"-"` 3386} 3387 3388func (s *LaunchFlexTemplateResponse) MarshalJSON() ([]byte, error) { 3389 type NoMethod LaunchFlexTemplateResponse 3390 raw := NoMethod(*s) 3391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3392} 3393 3394// LaunchTemplateParameters: Parameters to provide to the template being 3395// launched. 3396type LaunchTemplateParameters struct { 3397 // Environment: The runtime environment for the job. 3398 Environment *RuntimeEnvironment `json:"environment,omitempty"` 3399 3400 // JobName: Required. The job name to use for the created job. 3401 JobName string `json:"jobName,omitempty"` 3402 3403 // Parameters: The runtime parameters to pass to the job. 3404 Parameters map[string]string `json:"parameters,omitempty"` 3405 3406 // TransformNameMapping: Only applicable when updating a pipeline. Map 3407 // of transform name prefixes of the job to be replaced to the 3408 // corresponding name prefixes of the new job. 3409 TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"` 3410 3411 // Update: If set, replace the existing pipeline with the name specified 3412 // by jobName with this pipeline, preserving state. 3413 Update bool `json:"update,omitempty"` 3414 3415 // ForceSendFields is a list of field names (e.g. "Environment") to 3416 // unconditionally include in API requests. By default, fields with 3417 // empty values are omitted from API requests. However, any non-pointer, 3418 // non-interface field appearing in ForceSendFields will be sent to the 3419 // server regardless of whether the field is empty or not. This may be 3420 // used to include empty fields in Patch requests. 3421 ForceSendFields []string `json:"-"` 3422 3423 // NullFields is a list of field names (e.g. "Environment") to include 3424 // in API requests with the JSON null value. By default, fields with 3425 // empty values are omitted from API requests. However, any field with 3426 // an empty value appearing in NullFields will be sent to the server as 3427 // null. It is an error if a field in this list has a non-empty value. 3428 // This may be used to include null fields in Patch requests. 3429 NullFields []string `json:"-"` 3430} 3431 3432func (s *LaunchTemplateParameters) MarshalJSON() ([]byte, error) { 3433 type NoMethod LaunchTemplateParameters 3434 raw := NoMethod(*s) 3435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3436} 3437 3438// LaunchTemplateResponse: Response to the request to launch a template. 3439type LaunchTemplateResponse struct { 3440 // Job: The job that was launched, if the request was not a dry run and 3441 // the job was successfully launched. 3442 Job *Job `json:"job,omitempty"` 3443 3444 // ServerResponse contains the HTTP response code and headers from the 3445 // server. 3446 googleapi.ServerResponse `json:"-"` 3447 3448 // ForceSendFields is a list of field names (e.g. "Job") to 3449 // unconditionally include in API requests. By default, fields with 3450 // empty values are omitted from API requests. However, any non-pointer, 3451 // non-interface field appearing in ForceSendFields will be sent to the 3452 // server regardless of whether the field is empty or not. This may be 3453 // used to include empty fields in Patch requests. 3454 ForceSendFields []string `json:"-"` 3455 3456 // NullFields is a list of field names (e.g. "Job") to include in API 3457 // requests with the JSON null value. By default, fields with empty 3458 // values are omitted from API requests. However, any field with an 3459 // empty value appearing in NullFields will be sent to the server as 3460 // null. It is an error if a field in this list has a non-empty value. 3461 // This may be used to include null fields in Patch requests. 3462 NullFields []string `json:"-"` 3463} 3464 3465func (s *LaunchTemplateResponse) MarshalJSON() ([]byte, error) { 3466 type NoMethod LaunchTemplateResponse 3467 raw := NoMethod(*s) 3468 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3469} 3470 3471// LeaseWorkItemRequest: Request to lease WorkItems. 3472type LeaseWorkItemRequest struct { 3473 // CurrentWorkerTime: The current timestamp at the worker. 3474 CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` 3475 3476 // Location: The [regional endpoint] 3477 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 3478 // that contains the WorkItem's job. 3479 Location string `json:"location,omitempty"` 3480 3481 // RequestedLeaseDuration: The initial lease period. 3482 RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` 3483 3484 // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkRequest from 3485 // UnifiedWorker. 3486 UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` 3487 3488 // WorkItemTypes: Filter for WorkItem type. 3489 WorkItemTypes []string `json:"workItemTypes,omitempty"` 3490 3491 // WorkerCapabilities: Worker capabilities. WorkItems might be limited 3492 // to workers with specific capabilities. 3493 WorkerCapabilities []string `json:"workerCapabilities,omitempty"` 3494 3495 // WorkerId: Identifies the worker leasing work -- typically the ID of 3496 // the virtual machine running the worker. 3497 WorkerId string `json:"workerId,omitempty"` 3498 3499 // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime") 3500 // to unconditionally include in API requests. By default, fields with 3501 // empty values are omitted from API requests. However, any non-pointer, 3502 // non-interface field appearing in ForceSendFields will be sent to the 3503 // server regardless of whether the field is empty or not. This may be 3504 // used to include empty fields in Patch requests. 3505 ForceSendFields []string `json:"-"` 3506 3507 // NullFields is a list of field names (e.g. "CurrentWorkerTime") to 3508 // include in API requests with the JSON null value. By default, fields 3509 // with empty values are omitted from API requests. However, any field 3510 // with an empty value appearing in NullFields will be sent to the 3511 // server as null. It is an error if a field in this list has a 3512 // non-empty value. This may be used to include null fields in Patch 3513 // requests. 3514 NullFields []string `json:"-"` 3515} 3516 3517func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) { 3518 type NoMethod LeaseWorkItemRequest 3519 raw := NoMethod(*s) 3520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3521} 3522 3523// LeaseWorkItemResponse: Response to a request to lease WorkItems. 3524type LeaseWorkItemResponse struct { 3525 // UnifiedWorkerResponse: Untranslated bag-of-bytes WorkResponse for 3526 // UnifiedWorker. 3527 UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` 3528 3529 // WorkItems: A list of the leased WorkItems. 3530 WorkItems []*WorkItem `json:"workItems,omitempty"` 3531 3532 // ServerResponse contains the HTTP response code and headers from the 3533 // server. 3534 googleapi.ServerResponse `json:"-"` 3535 3536 // ForceSendFields is a list of field names (e.g. 3537 // "UnifiedWorkerResponse") to unconditionally include in API requests. 3538 // By default, fields with empty values are omitted from API requests. 3539 // However, any non-pointer, non-interface field appearing in 3540 // ForceSendFields will be sent to the server regardless of whether the 3541 // field is empty or not. This may be used to include empty fields in 3542 // Patch requests. 3543 ForceSendFields []string `json:"-"` 3544 3545 // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to 3546 // include in API requests with the JSON null value. By default, fields 3547 // with empty values are omitted from API requests. However, any field 3548 // with an empty value appearing in NullFields will be sent to the 3549 // server as null. It is an error if a field in this list has a 3550 // non-empty value. This may be used to include null fields in Patch 3551 // requests. 3552 NullFields []string `json:"-"` 3553} 3554 3555func (s *LeaseWorkItemResponse) MarshalJSON() ([]byte, error) { 3556 type NoMethod LeaseWorkItemResponse 3557 raw := NoMethod(*s) 3558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3559} 3560 3561// ListJobMessagesResponse: Response to a request to list job messages. 3562type ListJobMessagesResponse struct { 3563 // AutoscalingEvents: Autoscaling events in ascending timestamp order. 3564 AutoscalingEvents []*AutoscalingEvent `json:"autoscalingEvents,omitempty"` 3565 3566 // JobMessages: Messages in ascending timestamp order. 3567 JobMessages []*JobMessage `json:"jobMessages,omitempty"` 3568 3569 // NextPageToken: The token to obtain the next page of results if there 3570 // are more. 3571 NextPageToken string `json:"nextPageToken,omitempty"` 3572 3573 // ServerResponse contains the HTTP response code and headers from the 3574 // server. 3575 googleapi.ServerResponse `json:"-"` 3576 3577 // ForceSendFields is a list of field names (e.g. "AutoscalingEvents") 3578 // to unconditionally include in API requests. By default, fields with 3579 // empty values are omitted from API requests. However, any non-pointer, 3580 // non-interface field appearing in ForceSendFields will be sent to the 3581 // server regardless of whether the field is empty or not. This may be 3582 // used to include empty fields in Patch requests. 3583 ForceSendFields []string `json:"-"` 3584 3585 // NullFields is a list of field names (e.g. "AutoscalingEvents") to 3586 // include in API requests with the JSON null value. By default, fields 3587 // with empty values are omitted from API requests. However, any field 3588 // with an empty value appearing in NullFields will be sent to the 3589 // server as null. It is an error if a field in this list has a 3590 // non-empty value. This may be used to include null fields in Patch 3591 // requests. 3592 NullFields []string `json:"-"` 3593} 3594 3595func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) { 3596 type NoMethod ListJobMessagesResponse 3597 raw := NoMethod(*s) 3598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3599} 3600 3601// ListJobsResponse: Response to a request to list Cloud Dataflow jobs 3602// in a project. This might be a partial response, depending on the page 3603// size in the ListJobsRequest. However, if the project does not have 3604// any jobs, an instance of ListJobsResponse is not returned and the 3605// requests's response body is empty {}. 3606type ListJobsResponse struct { 3607 // FailedLocation: Zero or more messages describing the [regional 3608 // endpoints] 3609 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 3610 // that failed to respond. 3611 FailedLocation []*FailedLocation `json:"failedLocation,omitempty"` 3612 3613 // Jobs: A subset of the requested job information. 3614 Jobs []*Job `json:"jobs,omitempty"` 3615 3616 // NextPageToken: Set if there may be more results than fit in this 3617 // response. 3618 NextPageToken string `json:"nextPageToken,omitempty"` 3619 3620 // ServerResponse contains the HTTP response code and headers from the 3621 // server. 3622 googleapi.ServerResponse `json:"-"` 3623 3624 // ForceSendFields is a list of field names (e.g. "FailedLocation") to 3625 // unconditionally include in API requests. By default, fields with 3626 // empty values are omitted from API requests. However, any non-pointer, 3627 // non-interface field appearing in ForceSendFields will be sent to the 3628 // server regardless of whether the field is empty or not. This may be 3629 // used to include empty fields in Patch requests. 3630 ForceSendFields []string `json:"-"` 3631 3632 // NullFields is a list of field names (e.g. "FailedLocation") to 3633 // include in API requests with the JSON null value. By default, fields 3634 // with empty values are omitted from API requests. However, any field 3635 // with an empty value appearing in NullFields will be sent to the 3636 // server as null. It is an error if a field in this list has a 3637 // non-empty value. This may be used to include null fields in Patch 3638 // requests. 3639 NullFields []string `json:"-"` 3640} 3641 3642func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { 3643 type NoMethod ListJobsResponse 3644 raw := NoMethod(*s) 3645 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3646} 3647 3648// ListSnapshotsResponse: List of snapshots. 3649type ListSnapshotsResponse struct { 3650 // Snapshots: Returned snapshots. 3651 Snapshots []*Snapshot `json:"snapshots,omitempty"` 3652 3653 // ServerResponse contains the HTTP response code and headers from the 3654 // server. 3655 googleapi.ServerResponse `json:"-"` 3656 3657 // ForceSendFields is a list of field names (e.g. "Snapshots") to 3658 // unconditionally include in API requests. By default, fields with 3659 // empty values are omitted from API requests. However, any non-pointer, 3660 // non-interface field appearing in ForceSendFields will be sent to the 3661 // server regardless of whether the field is empty or not. This may be 3662 // used to include empty fields in Patch requests. 3663 ForceSendFields []string `json:"-"` 3664 3665 // NullFields is a list of field names (e.g. "Snapshots") to include in 3666 // API requests with the JSON null value. By default, fields with empty 3667 // values are omitted from API requests. However, any field with an 3668 // empty value appearing in NullFields will be sent to the server as 3669 // null. It is an error if a field in this list has a non-empty value. 3670 // This may be used to include null fields in Patch requests. 3671 NullFields []string `json:"-"` 3672} 3673 3674func (s *ListSnapshotsResponse) MarshalJSON() ([]byte, error) { 3675 type NoMethod ListSnapshotsResponse 3676 raw := NoMethod(*s) 3677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3678} 3679 3680// MapTask: MapTask consists of an ordered set of instructions, each of 3681// which describes one particular low-level operation for the worker to 3682// perform in order to accomplish the MapTask's WorkItem. Each 3683// instruction must appear in the list before any instructions which 3684// depends on its output. 3685type MapTask struct { 3686 // CounterPrefix: Counter prefix that can be used to prefix counters. 3687 // Not currently used in Dataflow. 3688 CounterPrefix string `json:"counterPrefix,omitempty"` 3689 3690 // Instructions: The instructions in the MapTask. 3691 Instructions []*ParallelInstruction `json:"instructions,omitempty"` 3692 3693 // StageName: System-defined name of the stage containing this MapTask. 3694 // Unique across the workflow. 3695 StageName string `json:"stageName,omitempty"` 3696 3697 // SystemName: System-defined name of this MapTask. Unique across the 3698 // workflow. 3699 SystemName string `json:"systemName,omitempty"` 3700 3701 // ForceSendFields is a list of field names (e.g. "CounterPrefix") to 3702 // unconditionally include in API requests. By default, fields with 3703 // empty values are omitted from API requests. However, any non-pointer, 3704 // non-interface field appearing in ForceSendFields will be sent to the 3705 // server regardless of whether the field is empty or not. This may be 3706 // used to include empty fields in Patch requests. 3707 ForceSendFields []string `json:"-"` 3708 3709 // NullFields is a list of field names (e.g. "CounterPrefix") to include 3710 // in API requests with the JSON null value. By default, fields with 3711 // empty values are omitted from API requests. However, any field with 3712 // an empty value appearing in NullFields will be sent to the server as 3713 // null. It is an error if a field in this list has a non-empty value. 3714 // This may be used to include null fields in Patch requests. 3715 NullFields []string `json:"-"` 3716} 3717 3718func (s *MapTask) MarshalJSON() ([]byte, error) { 3719 type NoMethod MapTask 3720 raw := NoMethod(*s) 3721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3722} 3723 3724// MemInfo: Information about the memory usage of a worker or a 3725// container within a worker. 3726type MemInfo struct { 3727 // CurrentLimitBytes: Instantenous memory limit in bytes. 3728 CurrentLimitBytes uint64 `json:"currentLimitBytes,omitempty,string"` 3729 3730 // CurrentRssBytes: Instantenous memory (RSS) size in bytes. 3731 CurrentRssBytes uint64 `json:"currentRssBytes,omitempty,string"` 3732 3733 // Timestamp: Timestamp of the measurement. 3734 Timestamp string `json:"timestamp,omitempty"` 3735 3736 // TotalGbMs: Total memory (RSS) usage since start up in GB * ms. 3737 TotalGbMs uint64 `json:"totalGbMs,omitempty,string"` 3738 3739 // ForceSendFields is a list of field names (e.g. "CurrentLimitBytes") 3740 // to unconditionally include in API requests. By default, fields with 3741 // empty values are omitted from API requests. However, any non-pointer, 3742 // non-interface field appearing in ForceSendFields will be sent to the 3743 // server regardless of whether the field is empty or not. This may be 3744 // used to include empty fields in Patch requests. 3745 ForceSendFields []string `json:"-"` 3746 3747 // NullFields is a list of field names (e.g. "CurrentLimitBytes") to 3748 // include in API requests with the JSON null value. By default, fields 3749 // with empty values are omitted from API requests. However, any field 3750 // with an empty value appearing in NullFields will be sent to the 3751 // server as null. It is an error if a field in this list has a 3752 // non-empty value. This may be used to include null fields in Patch 3753 // requests. 3754 NullFields []string `json:"-"` 3755} 3756 3757func (s *MemInfo) MarshalJSON() ([]byte, error) { 3758 type NoMethod MemInfo 3759 raw := NoMethod(*s) 3760 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3761} 3762 3763// MetricShortId: The metric short id is returned to the user alongside 3764// an offset into ReportWorkItemStatusRequest 3765type MetricShortId struct { 3766 // MetricIndex: The index of the corresponding metric in the 3767 // ReportWorkItemStatusRequest. Required. 3768 MetricIndex int64 `json:"metricIndex,omitempty"` 3769 3770 // ShortId: The service-generated short identifier for the metric. 3771 ShortId int64 `json:"shortId,omitempty,string"` 3772 3773 // ForceSendFields is a list of field names (e.g. "MetricIndex") to 3774 // unconditionally include in API requests. By default, fields with 3775 // empty values are omitted from API requests. However, any non-pointer, 3776 // non-interface field appearing in ForceSendFields will be sent to the 3777 // server regardless of whether the field is empty or not. This may be 3778 // used to include empty fields in Patch requests. 3779 ForceSendFields []string `json:"-"` 3780 3781 // NullFields is a list of field names (e.g. "MetricIndex") to include 3782 // in API requests with the JSON null value. By default, fields with 3783 // empty values are omitted from API requests. However, any field with 3784 // an empty value appearing in NullFields will be sent to the server as 3785 // null. It is an error if a field in this list has a non-empty value. 3786 // This may be used to include null fields in Patch requests. 3787 NullFields []string `json:"-"` 3788} 3789 3790func (s *MetricShortId) MarshalJSON() ([]byte, error) { 3791 type NoMethod MetricShortId 3792 raw := NoMethod(*s) 3793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3794} 3795 3796// MetricStructuredName: Identifies a metric, by describing the source 3797// which generated the metric. 3798type MetricStructuredName struct { 3799 // Context: Zero or more labeled fields which identify the part of the 3800 // job this metric is associated with, such as the name of a step or 3801 // collection. For example, built-in counters associated with steps will 3802 // have context['step'] = . Counters associated with PCollections in the 3803 // SDK will have context['pcollection'] = . 3804 Context map[string]string `json:"context,omitempty"` 3805 3806 // Name: Worker-defined metric name. 3807 Name string `json:"name,omitempty"` 3808 3809 // Origin: Origin (namespace) of metric name. May be blank for 3810 // user-define metrics; will be "dataflow" for metrics defined by the 3811 // Dataflow service or SDK. 3812 Origin string `json:"origin,omitempty"` 3813 3814 // ForceSendFields is a list of field names (e.g. "Context") to 3815 // unconditionally include in API requests. By default, fields with 3816 // empty values are omitted from API requests. However, any non-pointer, 3817 // non-interface field appearing in ForceSendFields will be sent to the 3818 // server regardless of whether the field is empty or not. This may be 3819 // used to include empty fields in Patch requests. 3820 ForceSendFields []string `json:"-"` 3821 3822 // NullFields is a list of field names (e.g. "Context") to include in 3823 // API requests with the JSON null value. By default, fields with empty 3824 // values are omitted from API requests. However, any field with an 3825 // empty value appearing in NullFields will be sent to the server as 3826 // null. It is an error if a field in this list has a non-empty value. 3827 // This may be used to include null fields in Patch requests. 3828 NullFields []string `json:"-"` 3829} 3830 3831func (s *MetricStructuredName) MarshalJSON() ([]byte, error) { 3832 type NoMethod MetricStructuredName 3833 raw := NoMethod(*s) 3834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3835} 3836 3837// MetricUpdate: Describes the state of a metric. 3838type MetricUpdate struct { 3839 // Cumulative: True if this metric is reported as the total cumulative 3840 // aggregate value accumulated since the worker started working on this 3841 // WorkItem. By default this is false, indicating that this metric is 3842 // reported as a delta that is not associated with any WorkItem. 3843 Cumulative bool `json:"cumulative,omitempty"` 3844 3845 // Distribution: A struct value describing properties of a distribution 3846 // of numeric values. 3847 Distribution interface{} `json:"distribution,omitempty"` 3848 3849 // Gauge: A struct value describing properties of a Gauge. Metrics of 3850 // gauge type show the value of a metric across time, and is aggregated 3851 // based on the newest value. 3852 Gauge interface{} `json:"gauge,omitempty"` 3853 3854 // Internal: Worker-computed aggregate value for internal use by the 3855 // Dataflow service. 3856 Internal interface{} `json:"internal,omitempty"` 3857 3858 // Kind: Metric aggregation kind. The possible metric aggregation kinds 3859 // are "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and 3860 // "Distribution". The specified aggregation kind is case-insensitive. 3861 // If omitted, this is not an aggregated value but instead a single 3862 // metric sample value. 3863 Kind string `json:"kind,omitempty"` 3864 3865 // MeanCount: Worker-computed aggregate value for the "Mean" aggregation 3866 // kind. This holds the count of the aggregated values and is used in 3867 // combination with mean_sum above to obtain the actual mean aggregate 3868 // value. The only possible value type is Long. 3869 MeanCount interface{} `json:"meanCount,omitempty"` 3870 3871 // MeanSum: Worker-computed aggregate value for the "Mean" aggregation 3872 // kind. This holds the sum of the aggregated values and is used in 3873 // combination with mean_count below to obtain the actual mean aggregate 3874 // value. The only possible value types are Long and Double. 3875 MeanSum interface{} `json:"meanSum,omitempty"` 3876 3877 // Name: Name of the metric. 3878 Name *MetricStructuredName `json:"name,omitempty"` 3879 3880 // Scalar: Worker-computed aggregate value for aggregation kinds "Sum", 3881 // "Max", "Min", "And", and "Or". The possible value types are Long, 3882 // Double, and Boolean. 3883 Scalar interface{} `json:"scalar,omitempty"` 3884 3885 // Set: Worker-computed aggregate value for the "Set" aggregation kind. 3886 // The only possible value type is a list of Values whose type can be 3887 // Long, Double, or String, according to the metric's type. All Values 3888 // in the list must be of the same type. 3889 Set interface{} `json:"set,omitempty"` 3890 3891 // UpdateTime: Timestamp associated with the metric value. Optional when 3892 // workers are reporting work progress; it will be filled in responses 3893 // from the metrics API. 3894 UpdateTime string `json:"updateTime,omitempty"` 3895 3896 // ForceSendFields is a list of field names (e.g. "Cumulative") to 3897 // unconditionally include in API requests. By default, fields with 3898 // empty values are omitted from API requests. However, any non-pointer, 3899 // non-interface field appearing in ForceSendFields will be sent to the 3900 // server regardless of whether the field is empty or not. This may be 3901 // used to include empty fields in Patch requests. 3902 ForceSendFields []string `json:"-"` 3903 3904 // NullFields is a list of field names (e.g. "Cumulative") to include in 3905 // API requests with the JSON null value. By default, fields with empty 3906 // values are omitted from API requests. However, any field with an 3907 // empty value appearing in NullFields will be sent to the server as 3908 // null. It is an error if a field in this list has a non-empty value. 3909 // This may be used to include null fields in Patch requests. 3910 NullFields []string `json:"-"` 3911} 3912 3913func (s *MetricUpdate) MarshalJSON() ([]byte, error) { 3914 type NoMethod MetricUpdate 3915 raw := NoMethod(*s) 3916 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3917} 3918 3919// MountedDataDisk: Describes mounted data disk. 3920type MountedDataDisk struct { 3921 // DataDisk: The name of the data disk. This name is local to the Google 3922 // Cloud Platform project and uniquely identifies the disk within that 3923 // project, for example "myproject-1014-104817-4c2-harness-0-disk-1". 3924 DataDisk string `json:"dataDisk,omitempty"` 3925 3926 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3927 // unconditionally include in API requests. By default, fields with 3928 // empty values are omitted from API requests. However, any non-pointer, 3929 // non-interface field appearing in ForceSendFields will be sent to the 3930 // server regardless of whether the field is empty or not. This may be 3931 // used to include empty fields in Patch requests. 3932 ForceSendFields []string `json:"-"` 3933 3934 // NullFields is a list of field names (e.g. "DataDisk") to include in 3935 // API requests with the JSON null value. By default, fields with empty 3936 // values are omitted from API requests. However, any field with an 3937 // empty value appearing in NullFields will be sent to the server as 3938 // null. It is an error if a field in this list has a non-empty value. 3939 // This may be used to include null fields in Patch requests. 3940 NullFields []string `json:"-"` 3941} 3942 3943func (s *MountedDataDisk) MarshalJSON() ([]byte, error) { 3944 type NoMethod MountedDataDisk 3945 raw := NoMethod(*s) 3946 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3947} 3948 3949// MultiOutputInfo: Information about an output of a multi-output DoFn. 3950type MultiOutputInfo struct { 3951 // Tag: The id of the tag the user code will emit to this output by; 3952 // this should correspond to the tag of some SideInputInfo. 3953 Tag string `json:"tag,omitempty"` 3954 3955 // ForceSendFields is a list of field names (e.g. "Tag") to 3956 // unconditionally include in API requests. By default, fields with 3957 // empty values are omitted from API requests. However, any non-pointer, 3958 // non-interface field appearing in ForceSendFields will be sent to the 3959 // server regardless of whether the field is empty or not. This may be 3960 // used to include empty fields in Patch requests. 3961 ForceSendFields []string `json:"-"` 3962 3963 // NullFields is a list of field names (e.g. "Tag") to include in API 3964 // requests with the JSON null value. By default, fields with empty 3965 // values are omitted from API requests. However, any field with an 3966 // empty value appearing in NullFields will be sent to the server as 3967 // null. It is an error if a field in this list has a non-empty value. 3968 // This may be used to include null fields in Patch requests. 3969 NullFields []string `json:"-"` 3970} 3971 3972func (s *MultiOutputInfo) MarshalJSON() ([]byte, error) { 3973 type NoMethod MultiOutputInfo 3974 raw := NoMethod(*s) 3975 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3976} 3977 3978// NameAndKind: Basic metadata about a counter. 3979type NameAndKind struct { 3980 // Kind: Counter aggregation kind. 3981 // 3982 // Possible values: 3983 // "INVALID" - Counter aggregation kind was not set. 3984 // "SUM" - Aggregated value is the sum of all contributed values. 3985 // "MAX" - Aggregated value is the max of all contributed values. 3986 // "MIN" - Aggregated value is the min of all contributed values. 3987 // "MEAN" - Aggregated value is the mean of all contributed values. 3988 // "OR" - Aggregated value represents the logical 'or' of all 3989 // contributed values. 3990 // "AND" - Aggregated value represents the logical 'and' of all 3991 // contributed values. 3992 // "SET" - Aggregated value is a set of unique contributed values. 3993 // "DISTRIBUTION" - Aggregated value captures statistics about a 3994 // distribution. 3995 // "LATEST_VALUE" - Aggregated value tracks the latest value of a 3996 // variable. 3997 Kind string `json:"kind,omitempty"` 3998 3999 // Name: Name of the counter. 4000 Name string `json:"name,omitempty"` 4001 4002 // ForceSendFields is a list of field names (e.g. "Kind") to 4003 // unconditionally include in API requests. By default, fields with 4004 // empty values are omitted from API requests. However, any non-pointer, 4005 // non-interface field appearing in ForceSendFields will be sent to the 4006 // server regardless of whether the field is empty or not. This may be 4007 // used to include empty fields in Patch requests. 4008 ForceSendFields []string `json:"-"` 4009 4010 // NullFields is a list of field names (e.g. "Kind") to include in API 4011 // requests with the JSON null value. By default, fields with empty 4012 // values are omitted from API requests. However, any field with an 4013 // empty value appearing in NullFields will be sent to the server as 4014 // null. It is an error if a field in this list has a non-empty value. 4015 // This may be used to include null fields in Patch requests. 4016 NullFields []string `json:"-"` 4017} 4018 4019func (s *NameAndKind) MarshalJSON() ([]byte, error) { 4020 type NoMethod NameAndKind 4021 raw := NoMethod(*s) 4022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4023} 4024 4025// Package: The packages that must be installed in order for a worker to 4026// run the steps of the Cloud Dataflow job that will be assigned to its 4027// worker pool. This is the mechanism by which the Cloud Dataflow SDK 4028// causes code to be loaded onto the workers. For example, the Cloud 4029// Dataflow Java SDK might use this to install jars containing the 4030// user's code and all of the various dependencies (libraries, data 4031// files, etc.) required in order for that code to run. 4032type Package struct { 4033 // Location: The resource to read the package from. The supported 4034 // resource type is: Google Cloud Storage: 4035 // storage.googleapis.com/{bucket} bucket.storage.googleapis.com/ 4036 Location string `json:"location,omitempty"` 4037 4038 // Name: The name of the package. 4039 Name string `json:"name,omitempty"` 4040 4041 // ForceSendFields is a list of field names (e.g. "Location") to 4042 // unconditionally include in API requests. By default, fields with 4043 // empty values are omitted from API requests. However, any non-pointer, 4044 // non-interface field appearing in ForceSendFields will be sent to the 4045 // server regardless of whether the field is empty or not. This may be 4046 // used to include empty fields in Patch requests. 4047 ForceSendFields []string `json:"-"` 4048 4049 // NullFields is a list of field names (e.g. "Location") to include in 4050 // API requests with the JSON null value. By default, fields with empty 4051 // values are omitted from API requests. However, any field with an 4052 // empty value appearing in NullFields will be sent to the server as 4053 // null. It is an error if a field in this list has a non-empty value. 4054 // This may be used to include null fields in Patch requests. 4055 NullFields []string `json:"-"` 4056} 4057 4058func (s *Package) MarshalJSON() ([]byte, error) { 4059 type NoMethod Package 4060 raw := NoMethod(*s) 4061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4062} 4063 4064// ParDoInstruction: An instruction that does a ParDo operation. Takes 4065// one main input and zero or more side inputs, and produces zero or 4066// more outputs. Runs user code. 4067type ParDoInstruction struct { 4068 // Input: The input. 4069 Input *InstructionInput `json:"input,omitempty"` 4070 4071 // MultiOutputInfos: Information about each of the outputs, if user_fn 4072 // is a MultiDoFn. 4073 MultiOutputInfos []*MultiOutputInfo `json:"multiOutputInfos,omitempty"` 4074 4075 // NumOutputs: The number of outputs. 4076 NumOutputs int64 `json:"numOutputs,omitempty"` 4077 4078 // SideInputs: Zero or more side inputs. 4079 SideInputs []*SideInputInfo `json:"sideInputs,omitempty"` 4080 4081 // UserFn: The user function to invoke. 4082 UserFn googleapi.RawMessage `json:"userFn,omitempty"` 4083 4084 // ForceSendFields is a list of field names (e.g. "Input") to 4085 // unconditionally include in API requests. By default, fields with 4086 // empty values are omitted from API requests. However, any non-pointer, 4087 // non-interface field appearing in ForceSendFields will be sent to the 4088 // server regardless of whether the field is empty or not. This may be 4089 // used to include empty fields in Patch requests. 4090 ForceSendFields []string `json:"-"` 4091 4092 // NullFields is a list of field names (e.g. "Input") to include in API 4093 // requests with the JSON null value. By default, fields with empty 4094 // values are omitted from API requests. However, any field with an 4095 // empty value appearing in NullFields will be sent to the server as 4096 // null. It is an error if a field in this list has a non-empty value. 4097 // This may be used to include null fields in Patch requests. 4098 NullFields []string `json:"-"` 4099} 4100 4101func (s *ParDoInstruction) MarshalJSON() ([]byte, error) { 4102 type NoMethod ParDoInstruction 4103 raw := NoMethod(*s) 4104 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4105} 4106 4107// ParallelInstruction: Describes a particular operation comprising a 4108// MapTask. 4109type ParallelInstruction struct { 4110 // Flatten: Additional information for Flatten instructions. 4111 Flatten *FlattenInstruction `json:"flatten,omitempty"` 4112 4113 // Name: User-provided name of this operation. 4114 Name string `json:"name,omitempty"` 4115 4116 // OriginalName: System-defined name for the operation in the original 4117 // workflow graph. 4118 OriginalName string `json:"originalName,omitempty"` 4119 4120 // Outputs: Describes the outputs of the instruction. 4121 Outputs []*InstructionOutput `json:"outputs,omitempty"` 4122 4123 // ParDo: Additional information for ParDo instructions. 4124 ParDo *ParDoInstruction `json:"parDo,omitempty"` 4125 4126 // PartialGroupByKey: Additional information for PartialGroupByKey 4127 // instructions. 4128 PartialGroupByKey *PartialGroupByKeyInstruction `json:"partialGroupByKey,omitempty"` 4129 4130 // Read: Additional information for Read instructions. 4131 Read *ReadInstruction `json:"read,omitempty"` 4132 4133 // SystemName: System-defined name of this operation. Unique across the 4134 // workflow. 4135 SystemName string `json:"systemName,omitempty"` 4136 4137 // Write: Additional information for Write instructions. 4138 Write *WriteInstruction `json:"write,omitempty"` 4139 4140 // ForceSendFields is a list of field names (e.g. "Flatten") to 4141 // unconditionally include in API requests. By default, fields with 4142 // empty values are omitted from API requests. However, any non-pointer, 4143 // non-interface field appearing in ForceSendFields will be sent to the 4144 // server regardless of whether the field is empty or not. This may be 4145 // used to include empty fields in Patch requests. 4146 ForceSendFields []string `json:"-"` 4147 4148 // NullFields is a list of field names (e.g. "Flatten") to include in 4149 // API requests with the JSON null value. By default, fields with empty 4150 // values are omitted from API requests. However, any field with an 4151 // empty value appearing in NullFields will be sent to the server as 4152 // null. It is an error if a field in this list has a non-empty value. 4153 // This may be used to include null fields in Patch requests. 4154 NullFields []string `json:"-"` 4155} 4156 4157func (s *ParallelInstruction) MarshalJSON() ([]byte, error) { 4158 type NoMethod ParallelInstruction 4159 raw := NoMethod(*s) 4160 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4161} 4162 4163// Parameter: Structured data associated with this message. 4164type Parameter struct { 4165 // Key: Key or name for this parameter. 4166 Key string `json:"key,omitempty"` 4167 4168 // Value: Value for this parameter. 4169 Value interface{} `json:"value,omitempty"` 4170 4171 // ForceSendFields is a list of field names (e.g. "Key") to 4172 // unconditionally include in API requests. By default, fields with 4173 // empty values are omitted from API requests. However, any non-pointer, 4174 // non-interface field appearing in ForceSendFields will be sent to the 4175 // server regardless of whether the field is empty or not. This may be 4176 // used to include empty fields in Patch requests. 4177 ForceSendFields []string `json:"-"` 4178 4179 // NullFields is a list of field names (e.g. "Key") to include in API 4180 // requests with the JSON null value. By default, fields with empty 4181 // values are omitted from API requests. However, any field with an 4182 // empty value appearing in NullFields will be sent to the server as 4183 // null. It is an error if a field in this list has a non-empty value. 4184 // This may be used to include null fields in Patch requests. 4185 NullFields []string `json:"-"` 4186} 4187 4188func (s *Parameter) MarshalJSON() ([]byte, error) { 4189 type NoMethod Parameter 4190 raw := NoMethod(*s) 4191 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4192} 4193 4194// ParameterMetadata: Metadata for a specific parameter. 4195type ParameterMetadata struct { 4196 // HelpText: Required. The help text to display for the parameter. 4197 HelpText string `json:"helpText,omitempty"` 4198 4199 // IsOptional: Optional. Whether the parameter is optional. Defaults to 4200 // false. 4201 IsOptional bool `json:"isOptional,omitempty"` 4202 4203 // Label: Required. The label to display for the parameter. 4204 Label string `json:"label,omitempty"` 4205 4206 // Name: Required. The name of the parameter. 4207 Name string `json:"name,omitempty"` 4208 4209 // ParamType: Optional. The type of the parameter. Used for selecting 4210 // input picker. 4211 // 4212 // Possible values: 4213 // "DEFAULT" - Default input type. 4214 // "TEXT" - The parameter specifies generic text input. 4215 // "GCS_READ_BUCKET" - The parameter specifies a Cloud Storage Bucket 4216 // to read from. 4217 // "GCS_WRITE_BUCKET" - The parameter specifies a Cloud Storage Bucket 4218 // to write to. 4219 // "GCS_READ_FILE" - The parameter specifies a Cloud Storage file path 4220 // to read from. 4221 // "GCS_WRITE_FILE" - The parameter specifies a Cloud Storage file 4222 // path to write to. 4223 // "GCS_READ_FOLDER" - The parameter specifies a Cloud Storage folder 4224 // path to read from. 4225 // "GCS_WRITE_FOLDER" - The parameter specifies a Cloud Storage folder 4226 // to write to. 4227 // "PUBSUB_TOPIC" - The parameter specifies a Pub/Sub Topic. 4228 // "PUBSUB_SUBSCRIPTION" - The parameter specifies a Pub/Sub 4229 // Subscription. 4230 ParamType string `json:"paramType,omitempty"` 4231 4232 // Regexes: Optional. Regexes that the parameter must match. 4233 Regexes []string `json:"regexes,omitempty"` 4234 4235 // ForceSendFields is a list of field names (e.g. "HelpText") to 4236 // unconditionally include in API requests. By default, fields with 4237 // empty values are omitted from API requests. However, any non-pointer, 4238 // non-interface field appearing in ForceSendFields will be sent to the 4239 // server regardless of whether the field is empty or not. This may be 4240 // used to include empty fields in Patch requests. 4241 ForceSendFields []string `json:"-"` 4242 4243 // NullFields is a list of field names (e.g. "HelpText") to include in 4244 // API requests with the JSON null value. By default, fields with empty 4245 // values are omitted from API requests. However, any field with an 4246 // empty value appearing in NullFields will be sent to the server as 4247 // null. It is an error if a field in this list has a non-empty value. 4248 // This may be used to include null fields in Patch requests. 4249 NullFields []string `json:"-"` 4250} 4251 4252func (s *ParameterMetadata) MarshalJSON() ([]byte, error) { 4253 type NoMethod ParameterMetadata 4254 raw := NoMethod(*s) 4255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4256} 4257 4258// PartialGroupByKeyInstruction: An instruction that does a partial 4259// group-by-key. One input and one output. 4260type PartialGroupByKeyInstruction struct { 4261 // Input: Describes the input to the partial group-by-key instruction. 4262 Input *InstructionInput `json:"input,omitempty"` 4263 4264 // InputElementCodec: The codec to use for interpreting an element in 4265 // the input PTable. 4266 InputElementCodec googleapi.RawMessage `json:"inputElementCodec,omitempty"` 4267 4268 // OriginalCombineValuesInputStoreName: If this instruction includes a 4269 // combining function this is the name of the intermediate store between 4270 // the GBK and the CombineValues. 4271 OriginalCombineValuesInputStoreName string `json:"originalCombineValuesInputStoreName,omitempty"` 4272 4273 // OriginalCombineValuesStepName: If this instruction includes a 4274 // combining function, this is the name of the CombineValues instruction 4275 // lifted into this instruction. 4276 OriginalCombineValuesStepName string `json:"originalCombineValuesStepName,omitempty"` 4277 4278 // SideInputs: Zero or more side inputs. 4279 SideInputs []*SideInputInfo `json:"sideInputs,omitempty"` 4280 4281 // ValueCombiningFn: The value combining function to invoke. 4282 ValueCombiningFn googleapi.RawMessage `json:"valueCombiningFn,omitempty"` 4283 4284 // ForceSendFields is a list of field names (e.g. "Input") to 4285 // unconditionally include in API requests. By default, fields with 4286 // empty values are omitted from API requests. However, any non-pointer, 4287 // non-interface field appearing in ForceSendFields will be sent to the 4288 // server regardless of whether the field is empty or not. This may be 4289 // used to include empty fields in Patch requests. 4290 ForceSendFields []string `json:"-"` 4291 4292 // NullFields is a list of field names (e.g. "Input") to include in API 4293 // requests with the JSON null value. By default, fields with empty 4294 // values are omitted from API requests. However, any field with an 4295 // empty value appearing in NullFields will be sent to the server as 4296 // null. It is an error if a field in this list has a non-empty value. 4297 // This may be used to include null fields in Patch requests. 4298 NullFields []string `json:"-"` 4299} 4300 4301func (s *PartialGroupByKeyInstruction) MarshalJSON() ([]byte, error) { 4302 type NoMethod PartialGroupByKeyInstruction 4303 raw := NoMethod(*s) 4304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4305} 4306 4307// PipelineDescription: A descriptive representation of submitted 4308// pipeline as well as the executed form. This data is provided by the 4309// Dataflow service for ease of visualizing the pipeline and 4310// interpreting Dataflow provided metrics. 4311type PipelineDescription struct { 4312 // DisplayData: Pipeline level display data. 4313 DisplayData []*DisplayData `json:"displayData,omitempty"` 4314 4315 // ExecutionPipelineStage: Description of each stage of execution of the 4316 // pipeline. 4317 ExecutionPipelineStage []*ExecutionStageSummary `json:"executionPipelineStage,omitempty"` 4318 4319 // OriginalPipelineTransform: Description of each transform in the 4320 // pipeline and collections between them. 4321 OriginalPipelineTransform []*TransformSummary `json:"originalPipelineTransform,omitempty"` 4322 4323 // ForceSendFields is a list of field names (e.g. "DisplayData") to 4324 // unconditionally include in API requests. By default, fields with 4325 // empty values are omitted from API requests. However, any non-pointer, 4326 // non-interface field appearing in ForceSendFields will be sent to the 4327 // server regardless of whether the field is empty or not. This may be 4328 // used to include empty fields in Patch requests. 4329 ForceSendFields []string `json:"-"` 4330 4331 // NullFields is a list of field names (e.g. "DisplayData") to include 4332 // in API requests with the JSON null value. By default, fields with 4333 // empty values are omitted from API requests. However, any field with 4334 // an empty value appearing in NullFields will be sent to the server as 4335 // null. It is an error if a field in this list has a non-empty value. 4336 // This may be used to include null fields in Patch requests. 4337 NullFields []string `json:"-"` 4338} 4339 4340func (s *PipelineDescription) MarshalJSON() ([]byte, error) { 4341 type NoMethod PipelineDescription 4342 raw := NoMethod(*s) 4343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4344} 4345 4346// Point: A point in the timeseries. 4347type Point struct { 4348 // Time: The timestamp of the point. 4349 Time string `json:"time,omitempty"` 4350 4351 // Value: The value of the point. 4352 Value float64 `json:"value,omitempty"` 4353 4354 // ForceSendFields is a list of field names (e.g. "Time") to 4355 // unconditionally include in API requests. By default, fields with 4356 // empty values are omitted from API requests. However, any non-pointer, 4357 // non-interface field appearing in ForceSendFields will be sent to the 4358 // server regardless of whether the field is empty or not. This may be 4359 // used to include empty fields in Patch requests. 4360 ForceSendFields []string `json:"-"` 4361 4362 // NullFields is a list of field names (e.g. "Time") to include in API 4363 // requests with the JSON null value. By default, fields with empty 4364 // values are omitted from API requests. However, any field with an 4365 // empty value appearing in NullFields will be sent to the server as 4366 // null. It is an error if a field in this list has a non-empty value. 4367 // This may be used to include null fields in Patch requests. 4368 NullFields []string `json:"-"` 4369} 4370 4371func (s *Point) MarshalJSON() ([]byte, error) { 4372 type NoMethod Point 4373 raw := NoMethod(*s) 4374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4375} 4376 4377func (s *Point) UnmarshalJSON(data []byte) error { 4378 type NoMethod Point 4379 var s1 struct { 4380 Value gensupport.JSONFloat64 `json:"value"` 4381 *NoMethod 4382 } 4383 s1.NoMethod = (*NoMethod)(s) 4384 if err := json.Unmarshal(data, &s1); err != nil { 4385 return err 4386 } 4387 s.Value = float64(s1.Value) 4388 return nil 4389} 4390 4391// Position: Position defines a position within a collection of data. 4392// The value can be either the end position, a key (used with ordered 4393// collections), a byte offset, or a record index. 4394type Position struct { 4395 // ByteOffset: Position is a byte offset. 4396 ByteOffset int64 `json:"byteOffset,omitempty,string"` 4397 4398 // ConcatPosition: CloudPosition is a concat position. 4399 ConcatPosition *ConcatPosition `json:"concatPosition,omitempty"` 4400 4401 // End: Position is past all other positions. Also useful for the end 4402 // position of an unbounded range. 4403 End bool `json:"end,omitempty"` 4404 4405 // Key: Position is a string key, ordered lexicographically. 4406 Key string `json:"key,omitempty"` 4407 4408 // RecordIndex: Position is a record index. 4409 RecordIndex int64 `json:"recordIndex,omitempty,string"` 4410 4411 // ShufflePosition: CloudPosition is a base64 encoded 4412 // BatchShufflePosition (with FIXED sharding). 4413 ShufflePosition string `json:"shufflePosition,omitempty"` 4414 4415 // ForceSendFields is a list of field names (e.g. "ByteOffset") to 4416 // unconditionally include in API requests. By default, fields with 4417 // empty values are omitted from API requests. However, any non-pointer, 4418 // non-interface field appearing in ForceSendFields will be sent to the 4419 // server regardless of whether the field is empty or not. This may be 4420 // used to include empty fields in Patch requests. 4421 ForceSendFields []string `json:"-"` 4422 4423 // NullFields is a list of field names (e.g. "ByteOffset") to include in 4424 // API requests with the JSON null value. By default, fields with empty 4425 // values are omitted from API requests. However, any field with an 4426 // empty value appearing in NullFields will be sent to the server as 4427 // null. It is an error if a field in this list has a non-empty value. 4428 // This may be used to include null fields in Patch requests. 4429 NullFields []string `json:"-"` 4430} 4431 4432func (s *Position) MarshalJSON() ([]byte, error) { 4433 type NoMethod Position 4434 raw := NoMethod(*s) 4435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4436} 4437 4438// ProgressTimeseries: Information about the progress of some component 4439// of job execution. 4440type ProgressTimeseries struct { 4441 // CurrentProgress: The current progress of the component, in the range 4442 // [0,1]. 4443 CurrentProgress float64 `json:"currentProgress,omitempty"` 4444 4445 // DataPoints: History of progress for the component. Points are sorted 4446 // by time. 4447 DataPoints []*Point `json:"dataPoints,omitempty"` 4448 4449 // ForceSendFields is a list of field names (e.g. "CurrentProgress") to 4450 // unconditionally include in API requests. By default, fields with 4451 // empty values are omitted from API requests. However, any non-pointer, 4452 // non-interface field appearing in ForceSendFields will be sent to the 4453 // server regardless of whether the field is empty or not. This may be 4454 // used to include empty fields in Patch requests. 4455 ForceSendFields []string `json:"-"` 4456 4457 // NullFields is a list of field names (e.g. "CurrentProgress") to 4458 // include in API requests with the JSON null value. By default, fields 4459 // with empty values are omitted from API requests. However, any field 4460 // with an empty value appearing in NullFields will be sent to the 4461 // server as null. It is an error if a field in this list has a 4462 // non-empty value. This may be used to include null fields in Patch 4463 // requests. 4464 NullFields []string `json:"-"` 4465} 4466 4467func (s *ProgressTimeseries) MarshalJSON() ([]byte, error) { 4468 type NoMethod ProgressTimeseries 4469 raw := NoMethod(*s) 4470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4471} 4472 4473func (s *ProgressTimeseries) UnmarshalJSON(data []byte) error { 4474 type NoMethod ProgressTimeseries 4475 var s1 struct { 4476 CurrentProgress gensupport.JSONFloat64 `json:"currentProgress"` 4477 *NoMethod 4478 } 4479 s1.NoMethod = (*NoMethod)(s) 4480 if err := json.Unmarshal(data, &s1); err != nil { 4481 return err 4482 } 4483 s.CurrentProgress = float64(s1.CurrentProgress) 4484 return nil 4485} 4486 4487// PubSubIODetails: Metadata for a Pub/Sub connector used by the job. 4488type PubSubIODetails struct { 4489 // Subscription: Subscription used in the connection. 4490 Subscription string `json:"subscription,omitempty"` 4491 4492 // Topic: Topic accessed in the connection. 4493 Topic string `json:"topic,omitempty"` 4494 4495 // ForceSendFields is a list of field names (e.g. "Subscription") to 4496 // unconditionally include in API requests. By default, fields with 4497 // empty values are omitted from API requests. However, any non-pointer, 4498 // non-interface field appearing in ForceSendFields will be sent to the 4499 // server regardless of whether the field is empty or not. This may be 4500 // used to include empty fields in Patch requests. 4501 ForceSendFields []string `json:"-"` 4502 4503 // NullFields is a list of field names (e.g. "Subscription") 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 4512func (s *PubSubIODetails) MarshalJSON() ([]byte, error) { 4513 type NoMethod PubSubIODetails 4514 raw := NoMethod(*s) 4515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4516} 4517 4518// PubsubLocation: Identifies a pubsub location to use for transferring 4519// data into or out of a streaming Dataflow job. 4520type PubsubLocation struct { 4521 // DropLateData: Indicates whether the pipeline allows late-arriving 4522 // data. 4523 DropLateData bool `json:"dropLateData,omitempty"` 4524 4525 // IdLabel: If set, contains a pubsub label from which to extract record 4526 // ids. If left empty, record deduplication will be strictly best 4527 // effort. 4528 IdLabel string `json:"idLabel,omitempty"` 4529 4530 // Subscription: A pubsub subscription, in the form of 4531 // "pubsub.googleapis.com/subscriptions//" 4532 Subscription string `json:"subscription,omitempty"` 4533 4534 // TimestampLabel: If set, contains a pubsub label from which to extract 4535 // record timestamps. If left empty, record timestamps will be generated 4536 // upon arrival. 4537 TimestampLabel string `json:"timestampLabel,omitempty"` 4538 4539 // Topic: A pubsub topic, in the form of 4540 // "pubsub.googleapis.com/topics//" 4541 Topic string `json:"topic,omitempty"` 4542 4543 // TrackingSubscription: If set, specifies the pubsub subscription that 4544 // will be used for tracking custom time timestamps for watermark 4545 // estimation. 4546 TrackingSubscription string `json:"trackingSubscription,omitempty"` 4547 4548 // WithAttributes: If true, then the client has requested to get pubsub 4549 // attributes. 4550 WithAttributes bool `json:"withAttributes,omitempty"` 4551 4552 // ForceSendFields is a list of field names (e.g. "DropLateData") to 4553 // unconditionally include in API requests. By default, fields with 4554 // empty values are omitted from API requests. However, any non-pointer, 4555 // non-interface field appearing in ForceSendFields will be sent to the 4556 // server regardless of whether the field is empty or not. This may be 4557 // used to include empty fields in Patch requests. 4558 ForceSendFields []string `json:"-"` 4559 4560 // NullFields is a list of field names (e.g. "DropLateData") to include 4561 // in API requests with the JSON null value. By default, fields with 4562 // empty values are omitted from API requests. However, any field with 4563 // an empty value appearing in NullFields will be sent to the server as 4564 // null. It is an error if a field in this list has a non-empty value. 4565 // This may be used to include null fields in Patch requests. 4566 NullFields []string `json:"-"` 4567} 4568 4569func (s *PubsubLocation) MarshalJSON() ([]byte, error) { 4570 type NoMethod PubsubLocation 4571 raw := NoMethod(*s) 4572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4573} 4574 4575// PubsubSnapshotMetadata: Represents a Pubsub snapshot. 4576type PubsubSnapshotMetadata struct { 4577 // ExpireTime: The expire time of the Pubsub snapshot. 4578 ExpireTime string `json:"expireTime,omitempty"` 4579 4580 // SnapshotName: The name of the Pubsub snapshot. 4581 SnapshotName string `json:"snapshotName,omitempty"` 4582 4583 // TopicName: The name of the Pubsub topic. 4584 TopicName string `json:"topicName,omitempty"` 4585 4586 // ForceSendFields is a list of field names (e.g. "ExpireTime") to 4587 // unconditionally include in API requests. By default, fields with 4588 // empty values are omitted from API requests. However, any non-pointer, 4589 // non-interface field appearing in ForceSendFields will be sent to the 4590 // server regardless of whether the field is empty or not. This may be 4591 // used to include empty fields in Patch requests. 4592 ForceSendFields []string `json:"-"` 4593 4594 // NullFields is a list of field names (e.g. "ExpireTime") to include in 4595 // API requests with the JSON null value. By default, fields with empty 4596 // values are omitted from API requests. However, any field with an 4597 // empty value appearing in NullFields will be sent to the server as 4598 // null. It is an error if a field in this list has a non-empty value. 4599 // This may be used to include null fields in Patch requests. 4600 NullFields []string `json:"-"` 4601} 4602 4603func (s *PubsubSnapshotMetadata) MarshalJSON() ([]byte, error) { 4604 type NoMethod PubsubSnapshotMetadata 4605 raw := NoMethod(*s) 4606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4607} 4608 4609// QueryInfo: Information about a validated query. 4610type QueryInfo struct { 4611 // QueryProperty: Includes an entry for each satisfied QueryProperty. 4612 // 4613 // Possible values: 4614 // "QUERY_PROPERTY_UNSPECIFIED" - The query property is unknown or 4615 // unspecified. 4616 // "HAS_UNBOUNDED_SOURCE" - Indicates this query reads from >= 1 4617 // unbounded source. 4618 QueryProperty []string `json:"queryProperty,omitempty"` 4619 4620 // ForceSendFields is a list of field names (e.g. "QueryProperty") to 4621 // unconditionally include in API requests. By default, fields with 4622 // empty values are omitted from API requests. However, any non-pointer, 4623 // non-interface field appearing in ForceSendFields will be sent to the 4624 // server regardless of whether the field is empty or not. This may be 4625 // used to include empty fields in Patch requests. 4626 ForceSendFields []string `json:"-"` 4627 4628 // NullFields is a list of field names (e.g. "QueryProperty") to include 4629 // in API requests with the JSON null value. By default, fields with 4630 // empty values are omitted from API requests. However, any field with 4631 // an empty value appearing in NullFields will be sent to the server as 4632 // null. It is an error if a field in this list has a non-empty value. 4633 // This may be used to include null fields in Patch requests. 4634 NullFields []string `json:"-"` 4635} 4636 4637func (s *QueryInfo) MarshalJSON() ([]byte, error) { 4638 type NoMethod QueryInfo 4639 raw := NoMethod(*s) 4640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4641} 4642 4643// ReadInstruction: An instruction that reads records. Takes no inputs, 4644// produces one output. 4645type ReadInstruction struct { 4646 // Source: The source to read from. 4647 Source *Source `json:"source,omitempty"` 4648 4649 // ForceSendFields is a list of field names (e.g. "Source") to 4650 // unconditionally include in API requests. By default, fields with 4651 // empty values are omitted from API requests. However, any non-pointer, 4652 // non-interface field appearing in ForceSendFields will be sent to the 4653 // server regardless of whether the field is empty or not. This may be 4654 // used to include empty fields in Patch requests. 4655 ForceSendFields []string `json:"-"` 4656 4657 // NullFields is a list of field names (e.g. "Source") to include in API 4658 // requests with the JSON null value. By default, fields with empty 4659 // values are omitted from API requests. However, any field with an 4660 // empty value appearing in NullFields will be sent to the server as 4661 // null. It is an error if a field in this list has a non-empty value. 4662 // This may be used to include null fields in Patch requests. 4663 NullFields []string `json:"-"` 4664} 4665 4666func (s *ReadInstruction) MarshalJSON() ([]byte, error) { 4667 type NoMethod ReadInstruction 4668 raw := NoMethod(*s) 4669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4670} 4671 4672// ReportWorkItemStatusRequest: Request to report the status of 4673// WorkItems. 4674type ReportWorkItemStatusRequest struct { 4675 // CurrentWorkerTime: The current timestamp at the worker. 4676 CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` 4677 4678 // Location: The [regional endpoint] 4679 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 4680 // that contains the WorkItem's job. 4681 Location string `json:"location,omitempty"` 4682 4683 // UnifiedWorkerRequest: Untranslated bag-of-bytes 4684 // WorkProgressUpdateRequest from UnifiedWorker. 4685 UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` 4686 4687 // WorkItemStatuses: The order is unimportant, except that the order of 4688 // the WorkItemServiceState messages in the ReportWorkItemStatusResponse 4689 // corresponds to the order of WorkItemStatus messages here. 4690 WorkItemStatuses []*WorkItemStatus `json:"workItemStatuses,omitempty"` 4691 4692 // WorkerId: The ID of the worker reporting the WorkItem status. If this 4693 // does not match the ID of the worker which the Dataflow service 4694 // believes currently has the lease on the WorkItem, the report will be 4695 // dropped (with an error response). 4696 WorkerId string `json:"workerId,omitempty"` 4697 4698 // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime") 4699 // to unconditionally include in API requests. By default, fields with 4700 // empty values are omitted from API requests. However, any non-pointer, 4701 // non-interface field appearing in ForceSendFields will be sent to the 4702 // server regardless of whether the field is empty or not. This may be 4703 // used to include empty fields in Patch requests. 4704 ForceSendFields []string `json:"-"` 4705 4706 // NullFields is a list of field names (e.g. "CurrentWorkerTime") to 4707 // include in API requests with the JSON null value. By default, fields 4708 // with empty values are omitted from API requests. However, any field 4709 // with an empty value appearing in NullFields will be sent to the 4710 // server as null. It is an error if a field in this list has a 4711 // non-empty value. This may be used to include null fields in Patch 4712 // requests. 4713 NullFields []string `json:"-"` 4714} 4715 4716func (s *ReportWorkItemStatusRequest) MarshalJSON() ([]byte, error) { 4717 type NoMethod ReportWorkItemStatusRequest 4718 raw := NoMethod(*s) 4719 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4720} 4721 4722// ReportWorkItemStatusResponse: Response from a request to report the 4723// status of WorkItems. 4724type ReportWorkItemStatusResponse struct { 4725 // UnifiedWorkerResponse: Untranslated bag-of-bytes 4726 // WorkProgressUpdateResponse for UnifiedWorker. 4727 UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` 4728 4729 // WorkItemServiceStates: A set of messages indicating the service-side 4730 // state for each WorkItem whose status was reported, in the same order 4731 // as the WorkItemStatus messages in the ReportWorkItemStatusRequest 4732 // which resulting in this response. 4733 WorkItemServiceStates []*WorkItemServiceState `json:"workItemServiceStates,omitempty"` 4734 4735 // ServerResponse contains the HTTP response code and headers from the 4736 // server. 4737 googleapi.ServerResponse `json:"-"` 4738 4739 // ForceSendFields is a list of field names (e.g. 4740 // "UnifiedWorkerResponse") to unconditionally include in API requests. 4741 // By default, fields with empty values are omitted from API requests. 4742 // However, any non-pointer, non-interface field appearing in 4743 // ForceSendFields will be sent to the server regardless of whether the 4744 // field is empty or not. This may be used to include empty fields in 4745 // Patch requests. 4746 ForceSendFields []string `json:"-"` 4747 4748 // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to 4749 // include in API requests with the JSON null value. By default, fields 4750 // with empty values are omitted from API requests. However, any field 4751 // with an empty value appearing in NullFields will be sent to the 4752 // server as null. It is an error if a field in this list has a 4753 // non-empty value. This may be used to include null fields in Patch 4754 // requests. 4755 NullFields []string `json:"-"` 4756} 4757 4758func (s *ReportWorkItemStatusResponse) MarshalJSON() ([]byte, error) { 4759 type NoMethod ReportWorkItemStatusResponse 4760 raw := NoMethod(*s) 4761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4762} 4763 4764// ReportedParallelism: Represents the level of parallelism in a 4765// WorkItem's input, reported by the worker. 4766type ReportedParallelism struct { 4767 // IsInfinite: Specifies whether the parallelism is infinite. If true, 4768 // "value" is ignored. Infinite parallelism means the service will 4769 // assume that the work item can always be split into more non-empty 4770 // work items by dynamic splitting. This is a work-around for lack of 4771 // support for infinity by the current JSON-based Java RPC stack. 4772 IsInfinite bool `json:"isInfinite,omitempty"` 4773 4774 // Value: Specifies the level of parallelism in case it is finite. 4775 Value float64 `json:"value,omitempty"` 4776 4777 // ForceSendFields is a list of field names (e.g. "IsInfinite") to 4778 // unconditionally include in API requests. By default, fields with 4779 // empty values are omitted from API requests. However, any non-pointer, 4780 // non-interface field appearing in ForceSendFields will be sent to the 4781 // server regardless of whether the field is empty or not. This may be 4782 // used to include empty fields in Patch requests. 4783 ForceSendFields []string `json:"-"` 4784 4785 // NullFields is a list of field names (e.g. "IsInfinite") to include in 4786 // API requests with the JSON null value. By default, fields with empty 4787 // values are omitted from API requests. However, any field with an 4788 // empty value appearing in NullFields will be sent to the server as 4789 // null. It is an error if a field in this list has a non-empty value. 4790 // This may be used to include null fields in Patch requests. 4791 NullFields []string `json:"-"` 4792} 4793 4794func (s *ReportedParallelism) MarshalJSON() ([]byte, error) { 4795 type NoMethod ReportedParallelism 4796 raw := NoMethod(*s) 4797 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4798} 4799 4800func (s *ReportedParallelism) UnmarshalJSON(data []byte) error { 4801 type NoMethod ReportedParallelism 4802 var s1 struct { 4803 Value gensupport.JSONFloat64 `json:"value"` 4804 *NoMethod 4805 } 4806 s1.NoMethod = (*NoMethod)(s) 4807 if err := json.Unmarshal(data, &s1); err != nil { 4808 return err 4809 } 4810 s.Value = float64(s1.Value) 4811 return nil 4812} 4813 4814// ResourceUtilizationReport: Worker metrics exported from workers. This 4815// contains resource utilization metrics accumulated from a variety of 4816// sources. For more information, see go/df-resource-signals. 4817type ResourceUtilizationReport struct { 4818 // Containers: Per container information. Key: container name. 4819 Containers map[string]ResourceUtilizationReport `json:"containers,omitempty"` 4820 4821 // CpuTime: CPU utilization samples. 4822 CpuTime []*CPUTime `json:"cpuTime,omitempty"` 4823 4824 // MemoryInfo: Memory utilization samples. 4825 MemoryInfo []*MemInfo `json:"memoryInfo,omitempty"` 4826 4827 // ForceSendFields is a list of field names (e.g. "Containers") to 4828 // unconditionally include in API requests. By default, fields with 4829 // empty values are omitted from API requests. However, any non-pointer, 4830 // non-interface field appearing in ForceSendFields will be sent to the 4831 // server regardless of whether the field is empty or not. This may be 4832 // used to include empty fields in Patch requests. 4833 ForceSendFields []string `json:"-"` 4834 4835 // NullFields is a list of field names (e.g. "Containers") to include in 4836 // API requests with the JSON null value. By default, fields with empty 4837 // values are omitted from API requests. However, any field with an 4838 // empty value appearing in NullFields will be sent to the server as 4839 // null. It is an error if a field in this list has a non-empty value. 4840 // This may be used to include null fields in Patch requests. 4841 NullFields []string `json:"-"` 4842} 4843 4844func (s *ResourceUtilizationReport) MarshalJSON() ([]byte, error) { 4845 type NoMethod ResourceUtilizationReport 4846 raw := NoMethod(*s) 4847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4848} 4849 4850// ResourceUtilizationReportResponse: Service-side response to 4851// WorkerMessage reporting resource utilization. 4852type ResourceUtilizationReportResponse struct { 4853} 4854 4855// RuntimeEnvironment: The environment values to set at runtime. 4856type RuntimeEnvironment struct { 4857 // AdditionalExperiments: Additional experiment flags for the job. 4858 AdditionalExperiments []string `json:"additionalExperiments,omitempty"` 4859 4860 // AdditionalUserLabels: Additional user labels to be specified for the 4861 // job. Keys and values should follow the restrictions specified in the 4862 // labeling restrictions 4863 // (https://cloud.google.com/compute/docs/labeling-resources#restrictions) 4864 // page. An object containing a list of "key": value pairs. Example: { 4865 // "name": "wrench", "mass": "1kg", "count": "3" }. 4866 AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"` 4867 4868 // BypassTempDirValidation: Whether to bypass the safety checks for the 4869 // job's temporary directory. Use with caution. 4870 BypassTempDirValidation bool `json:"bypassTempDirValidation,omitempty"` 4871 4872 // EnableStreamingEngine: Whether to enable Streaming Engine for the 4873 // job. 4874 EnableStreamingEngine bool `json:"enableStreamingEngine,omitempty"` 4875 4876 // IpConfiguration: Configuration for VM IPs. 4877 // 4878 // Possible values: 4879 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or 4880 // unspecified. 4881 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 4882 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 4883 IpConfiguration string `json:"ipConfiguration,omitempty"` 4884 4885 // KmsKeyName: Name for the Cloud KMS key for the job. Key format is: 4886 // projects//locations//keyRings//cryptoKeys/ 4887 KmsKeyName string `json:"kmsKeyName,omitempty"` 4888 4889 // MachineType: The machine type to use for the job. Defaults to the 4890 // value from the template if not specified. 4891 MachineType string `json:"machineType,omitempty"` 4892 4893 // MaxWorkers: The maximum number of Google Compute Engine instances to 4894 // be made available to your pipeline during execution, from 1 to 1000. 4895 MaxWorkers int64 `json:"maxWorkers,omitempty"` 4896 4897 // Network: Network to which VMs will be assigned. If empty or 4898 // unspecified, the service will use the network "default". 4899 Network string `json:"network,omitempty"` 4900 4901 // NumWorkers: The initial number of Google Compute Engine instnaces for 4902 // the job. 4903 NumWorkers int64 `json:"numWorkers,omitempty"` 4904 4905 // ServiceAccountEmail: The email address of the service account to run 4906 // the job as. 4907 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 4908 4909 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. You 4910 // can specify a subnetwork using either a complete URL or an 4911 // abbreviated path. Expected to be of the form 4912 // "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/region 4913 // s/REGION/subnetworks/SUBNETWORK" or 4914 // "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located 4915 // in a Shared VPC network, you must use the complete URL. 4916 Subnetwork string `json:"subnetwork,omitempty"` 4917 4918 // TempLocation: The Cloud Storage path to use for temporary files. Must 4919 // be a valid Cloud Storage URL, beginning with `gs://`. 4920 TempLocation string `json:"tempLocation,omitempty"` 4921 4922 // WorkerRegion: The Compute Engine region 4923 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 4924 // in which worker processing should occur, e.g. "us-west1". Mutually 4925 // exclusive with worker_zone. If neither worker_region nor worker_zone 4926 // is specified, default to the control plane's region. 4927 WorkerRegion string `json:"workerRegion,omitempty"` 4928 4929 // WorkerZone: The Compute Engine zone 4930 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 4931 // in which worker processing should occur, e.g. "us-west1-a". Mutually 4932 // exclusive with worker_region. If neither worker_region nor 4933 // worker_zone is specified, a zone in the control plane's region is 4934 // chosen based on available capacity. If both `worker_zone` and `zone` 4935 // are set, `worker_zone` takes precedence. 4936 WorkerZone string `json:"workerZone,omitempty"` 4937 4938 // Zone: The Compute Engine availability zone 4939 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) 4940 // for launching worker instances to run your pipeline. In the future, 4941 // worker_zone will take precedence. 4942 Zone string `json:"zone,omitempty"` 4943 4944 // ForceSendFields is a list of field names (e.g. 4945 // "AdditionalExperiments") to unconditionally include in API requests. 4946 // By default, fields with empty values are omitted from API requests. 4947 // However, any non-pointer, non-interface field appearing in 4948 // ForceSendFields will be sent to the server regardless of whether the 4949 // field is empty or not. This may be used to include empty fields in 4950 // Patch requests. 4951 ForceSendFields []string `json:"-"` 4952 4953 // NullFields is a list of field names (e.g. "AdditionalExperiments") to 4954 // include in API requests with the JSON null value. By default, fields 4955 // with empty values are omitted from API requests. However, any field 4956 // with an empty value appearing in NullFields will be sent to the 4957 // server as null. It is an error if a field in this list has a 4958 // non-empty value. This may be used to include null fields in Patch 4959 // requests. 4960 NullFields []string `json:"-"` 4961} 4962 4963func (s *RuntimeEnvironment) MarshalJSON() ([]byte, error) { 4964 type NoMethod RuntimeEnvironment 4965 raw := NoMethod(*s) 4966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4967} 4968 4969// RuntimeMetadata: RuntimeMetadata describing a runtime environment. 4970type RuntimeMetadata struct { 4971 // Parameters: The parameters for the template. 4972 Parameters []*ParameterMetadata `json:"parameters,omitempty"` 4973 4974 // SdkInfo: SDK Info for the template. 4975 SdkInfo *SDKInfo `json:"sdkInfo,omitempty"` 4976 4977 // ForceSendFields is a list of field names (e.g. "Parameters") to 4978 // unconditionally include in API requests. By default, fields with 4979 // empty values are omitted from API requests. However, any non-pointer, 4980 // non-interface field appearing in ForceSendFields will be sent to the 4981 // server regardless of whether the field is empty or not. This may be 4982 // used to include empty fields in Patch requests. 4983 ForceSendFields []string `json:"-"` 4984 4985 // NullFields is a list of field names (e.g. "Parameters") to include in 4986 // API requests with the JSON null value. By default, fields with empty 4987 // values are omitted from API requests. However, any field with an 4988 // empty value appearing in NullFields will be sent to the server as 4989 // null. It is an error if a field in this list has a non-empty value. 4990 // This may be used to include null fields in Patch requests. 4991 NullFields []string `json:"-"` 4992} 4993 4994func (s *RuntimeMetadata) MarshalJSON() ([]byte, error) { 4995 type NoMethod RuntimeMetadata 4996 raw := NoMethod(*s) 4997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4998} 4999 5000// SDKInfo: SDK Information. 5001type SDKInfo struct { 5002 // Language: Required. The SDK Language. 5003 // 5004 // Possible values: 5005 // "UNKNOWN" - UNKNOWN Language. 5006 // "JAVA" - Java. 5007 // "PYTHON" - Python. 5008 Language string `json:"language,omitempty"` 5009 5010 // Version: Optional. The SDK version. 5011 Version string `json:"version,omitempty"` 5012 5013 // ForceSendFields is a list of field names (e.g. "Language") to 5014 // unconditionally include in API requests. By default, fields with 5015 // empty values are omitted from API requests. However, any non-pointer, 5016 // non-interface field appearing in ForceSendFields will be sent to the 5017 // server regardless of whether the field is empty or not. This may be 5018 // used to include empty fields in Patch requests. 5019 ForceSendFields []string `json:"-"` 5020 5021 // NullFields is a list of field names (e.g. "Language") to include in 5022 // API requests with the JSON null value. By default, fields with empty 5023 // values are omitted from API requests. However, any field with an 5024 // empty value appearing in NullFields will be sent to the server as 5025 // null. It is an error if a field in this list has a non-empty value. 5026 // This may be used to include null fields in Patch requests. 5027 NullFields []string `json:"-"` 5028} 5029 5030func (s *SDKInfo) MarshalJSON() ([]byte, error) { 5031 type NoMethod SDKInfo 5032 raw := NoMethod(*s) 5033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5034} 5035 5036// SdkHarnessContainerImage: Defines a SDK harness container for 5037// executing Dataflow pipelines. 5038type SdkHarnessContainerImage struct { 5039 // ContainerImage: A docker container image that resides in Google 5040 // Container Registry. 5041 ContainerImage string `json:"containerImage,omitempty"` 5042 5043 // EnvironmentId: Environment ID for the Beam runner API proto 5044 // Environment that corresponds to the current SDK Harness. 5045 EnvironmentId string `json:"environmentId,omitempty"` 5046 5047 // UseSingleCorePerContainer: If true, recommends the Dataflow service 5048 // to use only one core per SDK container instance with this image. If 5049 // false (or unset) recommends using more than one core per SDK 5050 // container instance with this image for efficiency. Note that Dataflow 5051 // service may choose to override this property if needed. 5052 UseSingleCorePerContainer bool `json:"useSingleCorePerContainer,omitempty"` 5053 5054 // ForceSendFields is a list of field names (e.g. "ContainerImage") to 5055 // unconditionally include in API requests. By default, fields with 5056 // empty values are omitted from API requests. However, any non-pointer, 5057 // non-interface field appearing in ForceSendFields will be sent to the 5058 // server regardless of whether the field is empty or not. This may be 5059 // used to include empty fields in Patch requests. 5060 ForceSendFields []string `json:"-"` 5061 5062 // NullFields is a list of field names (e.g. "ContainerImage") to 5063 // include in API requests with the JSON null value. By default, fields 5064 // with empty values are omitted from API requests. However, any field 5065 // with an empty value appearing in NullFields will be sent to the 5066 // server as null. It is an error if a field in this list has a 5067 // non-empty value. This may be used to include null fields in Patch 5068 // requests. 5069 NullFields []string `json:"-"` 5070} 5071 5072func (s *SdkHarnessContainerImage) MarshalJSON() ([]byte, error) { 5073 type NoMethod SdkHarnessContainerImage 5074 raw := NoMethod(*s) 5075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5076} 5077 5078// SdkVersion: The version of the SDK used to run the job. 5079type SdkVersion struct { 5080 // SdkSupportStatus: The support status for this SDK version. 5081 // 5082 // Possible values: 5083 // "UNKNOWN" - Cloud Dataflow is unaware of this version. 5084 // "SUPPORTED" - This is a known version of an SDK, and is supported. 5085 // "STALE" - A newer version of the SDK family exists, and an update 5086 // is recommended. 5087 // "DEPRECATED" - This version of the SDK is deprecated and will 5088 // eventually be no longer supported. 5089 // "UNSUPPORTED" - Support for this SDK version has ended and it 5090 // should no longer be used. 5091 SdkSupportStatus string `json:"sdkSupportStatus,omitempty"` 5092 5093 // Version: The version of the SDK used to run the job. 5094 Version string `json:"version,omitempty"` 5095 5096 // VersionDisplayName: A readable string describing the version of the 5097 // SDK. 5098 VersionDisplayName string `json:"versionDisplayName,omitempty"` 5099 5100 // ForceSendFields is a list of field names (e.g. "SdkSupportStatus") to 5101 // unconditionally include in API requests. By default, fields with 5102 // empty values are omitted from API requests. However, any non-pointer, 5103 // non-interface field appearing in ForceSendFields will be sent to the 5104 // server regardless of whether the field is empty or not. This may be 5105 // used to include empty fields in Patch requests. 5106 ForceSendFields []string `json:"-"` 5107 5108 // NullFields is a list of field names (e.g. "SdkSupportStatus") to 5109 // include in API requests with the JSON null value. By default, fields 5110 // with empty values are omitted from API requests. However, any field 5111 // with an empty value appearing in NullFields will be sent to the 5112 // server as null. It is an error if a field in this list has a 5113 // non-empty value. This may be used to include null fields in Patch 5114 // requests. 5115 NullFields []string `json:"-"` 5116} 5117 5118func (s *SdkVersion) MarshalJSON() ([]byte, error) { 5119 type NoMethod SdkVersion 5120 raw := NoMethod(*s) 5121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5122} 5123 5124// SendDebugCaptureRequest: Request to send encoded debug information. 5125type SendDebugCaptureRequest struct { 5126 // ComponentId: The internal component id for which debug information is 5127 // sent. 5128 ComponentId string `json:"componentId,omitempty"` 5129 5130 // Data: The encoded debug information. 5131 Data string `json:"data,omitempty"` 5132 5133 // Location: The [regional endpoint] 5134 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 5135 // that contains the job specified by job_id. 5136 Location string `json:"location,omitempty"` 5137 5138 // WorkerId: The worker id, i.e., VM hostname. 5139 WorkerId string `json:"workerId,omitempty"` 5140 5141 // ForceSendFields is a list of field names (e.g. "ComponentId") to 5142 // unconditionally include in API requests. By default, fields with 5143 // empty values are omitted from API requests. However, any non-pointer, 5144 // non-interface field appearing in ForceSendFields will be sent to the 5145 // server regardless of whether the field is empty or not. This may be 5146 // used to include empty fields in Patch requests. 5147 ForceSendFields []string `json:"-"` 5148 5149 // NullFields is a list of field names (e.g. "ComponentId") to include 5150 // in API requests with the JSON null value. By default, fields with 5151 // empty values are omitted from API requests. However, any field with 5152 // an empty value appearing in NullFields will be sent to the server as 5153 // null. It is an error if a field in this list has a non-empty value. 5154 // This may be used to include null fields in Patch requests. 5155 NullFields []string `json:"-"` 5156} 5157 5158func (s *SendDebugCaptureRequest) MarshalJSON() ([]byte, error) { 5159 type NoMethod SendDebugCaptureRequest 5160 raw := NoMethod(*s) 5161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5162} 5163 5164// SendDebugCaptureResponse: Response to a send capture request. nothing 5165type SendDebugCaptureResponse struct { 5166 // ServerResponse contains the HTTP response code and headers from the 5167 // server. 5168 googleapi.ServerResponse `json:"-"` 5169} 5170 5171// SendWorkerMessagesRequest: A request for sending worker messages to 5172// the service. 5173type SendWorkerMessagesRequest struct { 5174 // Location: The [regional endpoint] 5175 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 5176 // that contains the job. 5177 Location string `json:"location,omitempty"` 5178 5179 // WorkerMessages: The WorkerMessages to send. 5180 WorkerMessages []*WorkerMessage `json:"workerMessages,omitempty"` 5181 5182 // ForceSendFields is a list of field names (e.g. "Location") to 5183 // unconditionally include in API requests. By default, fields with 5184 // empty values are omitted from API requests. However, any non-pointer, 5185 // non-interface field appearing in ForceSendFields will be sent to the 5186 // server regardless of whether the field is empty or not. This may be 5187 // used to include empty fields in Patch requests. 5188 ForceSendFields []string `json:"-"` 5189 5190 // NullFields is a list of field names (e.g. "Location") to include in 5191 // API requests with the JSON null value. By default, fields with empty 5192 // values are omitted from API requests. However, any field with an 5193 // empty value appearing in NullFields will be sent to the server as 5194 // null. It is an error if a field in this list has a non-empty value. 5195 // This may be used to include null fields in Patch requests. 5196 NullFields []string `json:"-"` 5197} 5198 5199func (s *SendWorkerMessagesRequest) MarshalJSON() ([]byte, error) { 5200 type NoMethod SendWorkerMessagesRequest 5201 raw := NoMethod(*s) 5202 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5203} 5204 5205// SendWorkerMessagesResponse: The response to the worker messages. 5206type SendWorkerMessagesResponse struct { 5207 // WorkerMessageResponses: The servers response to the worker messages. 5208 WorkerMessageResponses []*WorkerMessageResponse `json:"workerMessageResponses,omitempty"` 5209 5210 // ServerResponse contains the HTTP response code and headers from the 5211 // server. 5212 googleapi.ServerResponse `json:"-"` 5213 5214 // ForceSendFields is a list of field names (e.g. 5215 // "WorkerMessageResponses") to unconditionally include in API requests. 5216 // By default, fields with empty values are omitted from API requests. 5217 // However, any non-pointer, non-interface field appearing in 5218 // ForceSendFields will be sent to the server regardless of whether the 5219 // field is empty or not. This may be used to include empty fields in 5220 // Patch requests. 5221 ForceSendFields []string `json:"-"` 5222 5223 // NullFields is a list of field names (e.g. "WorkerMessageResponses") 5224 // to include in API requests with the JSON null value. By default, 5225 // fields with empty values are omitted from API requests. However, any 5226 // field with an empty value appearing in NullFields will be sent to the 5227 // server as null. It is an error if a field in this list has a 5228 // non-empty value. This may be used to include null fields in Patch 5229 // requests. 5230 NullFields []string `json:"-"` 5231} 5232 5233func (s *SendWorkerMessagesResponse) MarshalJSON() ([]byte, error) { 5234 type NoMethod SendWorkerMessagesResponse 5235 raw := NoMethod(*s) 5236 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5237} 5238 5239// SeqMapTask: Describes a particular function to invoke. 5240type SeqMapTask struct { 5241 // Inputs: Information about each of the inputs. 5242 Inputs []*SideInputInfo `json:"inputs,omitempty"` 5243 5244 // Name: The user-provided name of the SeqDo operation. 5245 Name string `json:"name,omitempty"` 5246 5247 // OutputInfos: Information about each of the outputs. 5248 OutputInfos []*SeqMapTaskOutputInfo `json:"outputInfos,omitempty"` 5249 5250 // StageName: System-defined name of the stage containing the SeqDo 5251 // operation. Unique across the workflow. 5252 StageName string `json:"stageName,omitempty"` 5253 5254 // SystemName: System-defined name of the SeqDo operation. Unique across 5255 // the workflow. 5256 SystemName string `json:"systemName,omitempty"` 5257 5258 // UserFn: The user function to invoke. 5259 UserFn googleapi.RawMessage `json:"userFn,omitempty"` 5260 5261 // ForceSendFields is a list of field names (e.g. "Inputs") to 5262 // unconditionally include in API requests. By default, fields with 5263 // empty values are omitted from API requests. However, any non-pointer, 5264 // non-interface field appearing in ForceSendFields will be sent to the 5265 // server regardless of whether the field is empty or not. This may be 5266 // used to include empty fields in Patch requests. 5267 ForceSendFields []string `json:"-"` 5268 5269 // NullFields is a list of field names (e.g. "Inputs") to include in API 5270 // requests with the JSON null value. By default, fields with empty 5271 // values are omitted from API requests. However, any field with an 5272 // empty value appearing in NullFields will be sent to the server as 5273 // null. It is an error if a field in this list has a non-empty value. 5274 // This may be used to include null fields in Patch requests. 5275 NullFields []string `json:"-"` 5276} 5277 5278func (s *SeqMapTask) MarshalJSON() ([]byte, error) { 5279 type NoMethod SeqMapTask 5280 raw := NoMethod(*s) 5281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5282} 5283 5284// SeqMapTaskOutputInfo: Information about an output of a SeqMapTask. 5285type SeqMapTaskOutputInfo struct { 5286 // Sink: The sink to write the output value to. 5287 Sink *Sink `json:"sink,omitempty"` 5288 5289 // Tag: The id of the TupleTag the user code will tag the output value 5290 // by. 5291 Tag string `json:"tag,omitempty"` 5292 5293 // ForceSendFields is a list of field names (e.g. "Sink") to 5294 // unconditionally include in API requests. By default, fields with 5295 // empty values are omitted from API requests. However, any non-pointer, 5296 // non-interface field appearing in ForceSendFields will be sent to the 5297 // server regardless of whether the field is empty or not. This may be 5298 // used to include empty fields in Patch requests. 5299 ForceSendFields []string `json:"-"` 5300 5301 // NullFields is a list of field names (e.g. "Sink") to include in API 5302 // requests with the JSON null value. By default, fields with empty 5303 // values are omitted from API requests. However, any field with an 5304 // empty value appearing in NullFields will be sent to the server as 5305 // null. It is an error if a field in this list has a non-empty value. 5306 // This may be used to include null fields in Patch requests. 5307 NullFields []string `json:"-"` 5308} 5309 5310func (s *SeqMapTaskOutputInfo) MarshalJSON() ([]byte, error) { 5311 type NoMethod SeqMapTaskOutputInfo 5312 raw := NoMethod(*s) 5313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5314} 5315 5316// ShellTask: A task which consists of a shell command for the worker to 5317// execute. 5318type ShellTask struct { 5319 // Command: The shell command to run. 5320 Command string `json:"command,omitempty"` 5321 5322 // ExitCode: Exit code for the task. 5323 ExitCode int64 `json:"exitCode,omitempty"` 5324 5325 // ForceSendFields is a list of field names (e.g. "Command") to 5326 // unconditionally include in API requests. By default, fields with 5327 // empty values are omitted from API requests. However, any non-pointer, 5328 // non-interface field appearing in ForceSendFields will be sent to the 5329 // server regardless of whether the field is empty or not. This may be 5330 // used to include empty fields in Patch requests. 5331 ForceSendFields []string `json:"-"` 5332 5333 // NullFields is a list of field names (e.g. "Command") to include in 5334 // API requests with the JSON null value. By default, fields with empty 5335 // values are omitted from API requests. However, any field with an 5336 // empty value appearing in NullFields will be sent to the server as 5337 // null. It is an error if a field in this list has a non-empty value. 5338 // This may be used to include null fields in Patch requests. 5339 NullFields []string `json:"-"` 5340} 5341 5342func (s *ShellTask) MarshalJSON() ([]byte, error) { 5343 type NoMethod ShellTask 5344 raw := NoMethod(*s) 5345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5346} 5347 5348// SideInputInfo: Information about a side input of a DoFn or an input 5349// of a SeqDoFn. 5350type SideInputInfo struct { 5351 // Kind: How to interpret the source element(s) as a side input value. 5352 Kind googleapi.RawMessage `json:"kind,omitempty"` 5353 5354 // Sources: The source(s) to read element(s) from to get the value of 5355 // this side input. If more than one source, then the elements are taken 5356 // from the sources, in the specified order if order matters. At least 5357 // one source is required. 5358 Sources []*Source `json:"sources,omitempty"` 5359 5360 // Tag: The id of the tag the user code will access this side input by; 5361 // this should correspond to the tag of some MultiOutputInfo. 5362 Tag string `json:"tag,omitempty"` 5363 5364 // ForceSendFields is a list of field names (e.g. "Kind") to 5365 // unconditionally include in API requests. By default, fields with 5366 // empty values are omitted from API requests. However, any non-pointer, 5367 // non-interface field appearing in ForceSendFields will be sent to the 5368 // server regardless of whether the field is empty or not. This may be 5369 // used to include empty fields in Patch requests. 5370 ForceSendFields []string `json:"-"` 5371 5372 // NullFields is a list of field names (e.g. "Kind") to include in API 5373 // requests with the JSON null value. By default, fields with empty 5374 // values are omitted from API requests. However, any field with an 5375 // empty value appearing in NullFields will be sent to the server as 5376 // null. It is an error if a field in this list has a non-empty value. 5377 // This may be used to include null fields in Patch requests. 5378 NullFields []string `json:"-"` 5379} 5380 5381func (s *SideInputInfo) MarshalJSON() ([]byte, error) { 5382 type NoMethod SideInputInfo 5383 raw := NoMethod(*s) 5384 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5385} 5386 5387// Sink: A sink that records can be encoded and written to. 5388type Sink struct { 5389 // Codec: The codec to use to encode data written to the sink. 5390 Codec googleapi.RawMessage `json:"codec,omitempty"` 5391 5392 // Spec: The sink to write to, plus its parameters. 5393 Spec googleapi.RawMessage `json:"spec,omitempty"` 5394 5395 // ForceSendFields is a list of field names (e.g. "Codec") to 5396 // unconditionally include in API requests. By default, fields with 5397 // empty values are omitted from API requests. However, any non-pointer, 5398 // non-interface field appearing in ForceSendFields will be sent to the 5399 // server regardless of whether the field is empty or not. This may be 5400 // used to include empty fields in Patch requests. 5401 ForceSendFields []string `json:"-"` 5402 5403 // NullFields is a list of field names (e.g. "Codec") to include in API 5404 // requests with the JSON null value. By default, fields with empty 5405 // values are omitted from API requests. However, any field with an 5406 // empty value appearing in NullFields will be sent to the server as 5407 // null. It is an error if a field in this list has a non-empty value. 5408 // This may be used to include null fields in Patch requests. 5409 NullFields []string `json:"-"` 5410} 5411 5412func (s *Sink) MarshalJSON() ([]byte, error) { 5413 type NoMethod Sink 5414 raw := NoMethod(*s) 5415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5416} 5417 5418// Snapshot: Represents a snapshot of a job. 5419type Snapshot struct { 5420 // CreationTime: The time this snapshot was created. 5421 CreationTime string `json:"creationTime,omitempty"` 5422 5423 // Description: User specified description of the snapshot. Maybe empty. 5424 Description string `json:"description,omitempty"` 5425 5426 // DiskSizeBytes: The disk byte size of the snapshot. Only available for 5427 // snapshots in READY state. 5428 DiskSizeBytes int64 `json:"diskSizeBytes,omitempty,string"` 5429 5430 // Id: The unique ID of this snapshot. 5431 Id string `json:"id,omitempty"` 5432 5433 // ProjectId: The project this snapshot belongs to. 5434 ProjectId string `json:"projectId,omitempty"` 5435 5436 // PubsubMetadata: PubSub snapshot metadata. 5437 PubsubMetadata []*PubsubSnapshotMetadata `json:"pubsubMetadata,omitempty"` 5438 5439 // SourceJobId: The job this snapshot was created from. 5440 SourceJobId string `json:"sourceJobId,omitempty"` 5441 5442 // State: State of the snapshot. 5443 // 5444 // Possible values: 5445 // "UNKNOWN_SNAPSHOT_STATE" - Unknown state. 5446 // "PENDING" - Snapshot intent to create has been persisted, 5447 // snapshotting of state has not yet started. 5448 // "RUNNING" - Snapshotting is being performed. 5449 // "READY" - Snapshot has been created and is ready to be used. 5450 // "FAILED" - Snapshot failed to be created. 5451 // "DELETED" - Snapshot has been deleted. 5452 State string `json:"state,omitempty"` 5453 5454 // Ttl: The time after which this snapshot will be automatically 5455 // deleted. 5456 Ttl string `json:"ttl,omitempty"` 5457 5458 // ServerResponse contains the HTTP response code and headers from the 5459 // server. 5460 googleapi.ServerResponse `json:"-"` 5461 5462 // ForceSendFields is a list of field names (e.g. "CreationTime") to 5463 // unconditionally include in API requests. By default, fields with 5464 // empty values are omitted from API requests. However, any non-pointer, 5465 // non-interface field appearing in ForceSendFields will be sent to the 5466 // server regardless of whether the field is empty or not. This may be 5467 // used to include empty fields in Patch requests. 5468 ForceSendFields []string `json:"-"` 5469 5470 // NullFields is a list of field names (e.g. "CreationTime") to include 5471 // in API requests with the JSON null value. By default, fields with 5472 // empty values are omitted from API requests. However, any field with 5473 // an empty value appearing in NullFields will be sent to the server as 5474 // null. It is an error if a field in this list has a non-empty value. 5475 // This may be used to include null fields in Patch requests. 5476 NullFields []string `json:"-"` 5477} 5478 5479func (s *Snapshot) MarshalJSON() ([]byte, error) { 5480 type NoMethod Snapshot 5481 raw := NoMethod(*s) 5482 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5483} 5484 5485// SnapshotJobRequest: Request to create a snapshot of a job. 5486type SnapshotJobRequest struct { 5487 // Description: User specified description of the snapshot. Maybe empty. 5488 Description string `json:"description,omitempty"` 5489 5490 // Location: The location that contains this job. 5491 Location string `json:"location,omitempty"` 5492 5493 // SnapshotSources: If true, perform snapshots for sources which support 5494 // this. 5495 SnapshotSources bool `json:"snapshotSources,omitempty"` 5496 5497 // Ttl: TTL for the snapshot. 5498 Ttl string `json:"ttl,omitempty"` 5499 5500 // ForceSendFields is a list of field names (e.g. "Description") to 5501 // unconditionally include in API requests. By default, fields with 5502 // empty values are omitted from API requests. However, any non-pointer, 5503 // non-interface field appearing in ForceSendFields will be sent to the 5504 // server regardless of whether the field is empty or not. This may be 5505 // used to include empty fields in Patch requests. 5506 ForceSendFields []string `json:"-"` 5507 5508 // NullFields is a list of field names (e.g. "Description") to include 5509 // in API requests with the JSON null value. By default, fields with 5510 // empty values are omitted from API requests. However, any field with 5511 // an empty value appearing in NullFields will be sent to the server as 5512 // null. It is an error if a field in this list has a non-empty value. 5513 // This may be used to include null fields in Patch requests. 5514 NullFields []string `json:"-"` 5515} 5516 5517func (s *SnapshotJobRequest) MarshalJSON() ([]byte, error) { 5518 type NoMethod SnapshotJobRequest 5519 raw := NoMethod(*s) 5520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5521} 5522 5523// Source: A source that records can be read and decoded from. 5524type Source struct { 5525 // BaseSpecs: While splitting, sources may specify the produced bundles 5526 // as differences against another source, in order to save backend-side 5527 // memory and allow bigger jobs. For details, see SourceSplitRequest. To 5528 // support this use case, the full set of parameters of the source is 5529 // logically obtained by taking the latest explicitly specified value of 5530 // each parameter in the order: base_specs (later items win), spec 5531 // (overrides anything in base_specs). 5532 BaseSpecs []googleapi.RawMessage `json:"baseSpecs,omitempty"` 5533 5534 // Codec: The codec to use to decode data read from the source. 5535 Codec googleapi.RawMessage `json:"codec,omitempty"` 5536 5537 // DoesNotNeedSplitting: Setting this value to true hints to the 5538 // framework that the source doesn't need splitting, and using 5539 // SourceSplitRequest on it would yield 5540 // SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this 5541 // to true when splitting a single file into a set of byte ranges of 5542 // appropriate size, and set this to false when splitting a filepattern 5543 // into individual files. However, for efficiency, a file splitter may 5544 // decide to produce file subranges directly from the filepattern to 5545 // avoid a splitting round-trip. See SourceSplitRequest for an overview 5546 // of the splitting process. This field is meaningful only in the Source 5547 // objects populated by the user (e.g. when filling in a DerivedSource). 5548 // Source objects supplied by the framework to the user don't have this 5549 // field populated. 5550 DoesNotNeedSplitting bool `json:"doesNotNeedSplitting,omitempty"` 5551 5552 // Metadata: Optionally, metadata for this source can be supplied right 5553 // away, avoiding a SourceGetMetadataOperation roundtrip (see 5554 // SourceOperationRequest). This field is meaningful only in the Source 5555 // objects populated by the user (e.g. when filling in a DerivedSource). 5556 // Source objects supplied by the framework to the user don't have this 5557 // field populated. 5558 Metadata *SourceMetadata `json:"metadata,omitempty"` 5559 5560 // Spec: The source to read from, plus its parameters. 5561 Spec googleapi.RawMessage `json:"spec,omitempty"` 5562 5563 // ForceSendFields is a list of field names (e.g. "BaseSpecs") to 5564 // unconditionally include in API requests. By default, fields with 5565 // empty values are omitted from API requests. However, any non-pointer, 5566 // non-interface field appearing in ForceSendFields will be sent to the 5567 // server regardless of whether the field is empty or not. This may be 5568 // used to include empty fields in Patch requests. 5569 ForceSendFields []string `json:"-"` 5570 5571 // NullFields is a list of field names (e.g. "BaseSpecs") to include in 5572 // API requests with the JSON null value. By default, fields with empty 5573 // values are omitted from API requests. However, any field with an 5574 // empty value appearing in NullFields will be sent to the server as 5575 // null. It is an error if a field in this list has a non-empty value. 5576 // This may be used to include null fields in Patch requests. 5577 NullFields []string `json:"-"` 5578} 5579 5580func (s *Source) MarshalJSON() ([]byte, error) { 5581 type NoMethod Source 5582 raw := NoMethod(*s) 5583 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5584} 5585 5586// SourceFork: DEPRECATED in favor of DynamicSourceSplit. 5587type SourceFork struct { 5588 // Primary: DEPRECATED 5589 Primary *SourceSplitShard `json:"primary,omitempty"` 5590 5591 // PrimarySource: DEPRECATED 5592 PrimarySource *DerivedSource `json:"primarySource,omitempty"` 5593 5594 // Residual: DEPRECATED 5595 Residual *SourceSplitShard `json:"residual,omitempty"` 5596 5597 // ResidualSource: DEPRECATED 5598 ResidualSource *DerivedSource `json:"residualSource,omitempty"` 5599 5600 // ForceSendFields is a list of field names (e.g. "Primary") to 5601 // unconditionally include in API requests. By default, fields with 5602 // empty values are omitted from API requests. However, any non-pointer, 5603 // non-interface field appearing in ForceSendFields will be sent to the 5604 // server regardless of whether the field is empty or not. This may be 5605 // used to include empty fields in Patch requests. 5606 ForceSendFields []string `json:"-"` 5607 5608 // NullFields is a list of field names (e.g. "Primary") to include in 5609 // API requests with the JSON null value. By default, fields with empty 5610 // values are omitted from API requests. However, any field with an 5611 // empty value appearing in NullFields will be sent to the server as 5612 // null. It is an error if a field in this list has a non-empty value. 5613 // This may be used to include null fields in Patch requests. 5614 NullFields []string `json:"-"` 5615} 5616 5617func (s *SourceFork) MarshalJSON() ([]byte, error) { 5618 type NoMethod SourceFork 5619 raw := NoMethod(*s) 5620 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5621} 5622 5623// SourceGetMetadataRequest: A request to compute the SourceMetadata of 5624// a Source. 5625type SourceGetMetadataRequest struct { 5626 // Source: Specification of the source whose metadata should be 5627 // computed. 5628 Source *Source `json:"source,omitempty"` 5629 5630 // ForceSendFields is a list of field names (e.g. "Source") to 5631 // unconditionally include in API requests. By default, fields with 5632 // empty values are omitted from API requests. However, any non-pointer, 5633 // non-interface field appearing in ForceSendFields will be sent to the 5634 // server regardless of whether the field is empty or not. This may be 5635 // used to include empty fields in Patch requests. 5636 ForceSendFields []string `json:"-"` 5637 5638 // NullFields is a list of field names (e.g. "Source") to include in API 5639 // requests with the JSON null value. By default, fields with empty 5640 // values are omitted from API requests. However, any field with an 5641 // empty value appearing in NullFields will be sent to the server as 5642 // null. It is an error if a field in this list has a non-empty value. 5643 // This may be used to include null fields in Patch requests. 5644 NullFields []string `json:"-"` 5645} 5646 5647func (s *SourceGetMetadataRequest) MarshalJSON() ([]byte, error) { 5648 type NoMethod SourceGetMetadataRequest 5649 raw := NoMethod(*s) 5650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5651} 5652 5653// SourceGetMetadataResponse: The result of a 5654// SourceGetMetadataOperation. 5655type SourceGetMetadataResponse struct { 5656 // Metadata: The computed metadata. 5657 Metadata *SourceMetadata `json:"metadata,omitempty"` 5658 5659 // ForceSendFields is a list of field names (e.g. "Metadata") to 5660 // unconditionally include in API requests. By default, fields with 5661 // empty values are omitted from API requests. However, any non-pointer, 5662 // non-interface field appearing in ForceSendFields will be sent to the 5663 // server regardless of whether the field is empty or not. This may be 5664 // used to include empty fields in Patch requests. 5665 ForceSendFields []string `json:"-"` 5666 5667 // NullFields is a list of field names (e.g. "Metadata") to include in 5668 // API requests with the JSON null value. By default, fields with empty 5669 // values are omitted from API requests. However, any field with an 5670 // empty value appearing in NullFields will be sent to the server as 5671 // null. It is an error if a field in this list has a non-empty value. 5672 // This may be used to include null fields in Patch requests. 5673 NullFields []string `json:"-"` 5674} 5675 5676func (s *SourceGetMetadataResponse) MarshalJSON() ([]byte, error) { 5677 type NoMethod SourceGetMetadataResponse 5678 raw := NoMethod(*s) 5679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5680} 5681 5682// SourceMetadata: Metadata about a Source useful for automatically 5683// optimizing and tuning the pipeline, etc. 5684type SourceMetadata struct { 5685 // EstimatedSizeBytes: An estimate of the total size (in bytes) of the 5686 // data that would be read from this source. This estimate is in terms 5687 // of external storage size, before any decompression or other 5688 // processing done by the reader. 5689 EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"` 5690 5691 // Infinite: Specifies that the size of this source is known to be 5692 // infinite (this is a streaming source). 5693 Infinite bool `json:"infinite,omitempty"` 5694 5695 // ProducesSortedKeys: Whether this source is known to produce key/value 5696 // pairs with the (encoded) keys in lexicographically sorted order. 5697 ProducesSortedKeys bool `json:"producesSortedKeys,omitempty"` 5698 5699 // ForceSendFields is a list of field names (e.g. "EstimatedSizeBytes") 5700 // to unconditionally include in API requests. By default, fields with 5701 // empty values are omitted from API requests. However, any non-pointer, 5702 // non-interface field appearing in ForceSendFields will be sent to the 5703 // server regardless of whether the field is empty or not. This may be 5704 // used to include empty fields in Patch requests. 5705 ForceSendFields []string `json:"-"` 5706 5707 // NullFields is a list of field names (e.g. "EstimatedSizeBytes") to 5708 // include in API requests with the JSON null value. By default, fields 5709 // with empty values are omitted from API requests. However, any field 5710 // with an empty value appearing in NullFields will be sent to the 5711 // server as null. It is an error if a field in this list has a 5712 // non-empty value. This may be used to include null fields in Patch 5713 // requests. 5714 NullFields []string `json:"-"` 5715} 5716 5717func (s *SourceMetadata) MarshalJSON() ([]byte, error) { 5718 type NoMethod SourceMetadata 5719 raw := NoMethod(*s) 5720 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5721} 5722 5723// SourceOperationRequest: A work item that represents the different 5724// operations that can be performed on a user-defined Source 5725// specification. 5726type SourceOperationRequest struct { 5727 // GetMetadata: Information about a request to get metadata about a 5728 // source. 5729 GetMetadata *SourceGetMetadataRequest `json:"getMetadata,omitempty"` 5730 5731 // Name: User-provided name of the Read instruction for this source. 5732 Name string `json:"name,omitempty"` 5733 5734 // OriginalName: System-defined name for the Read instruction for this 5735 // source in the original workflow graph. 5736 OriginalName string `json:"originalName,omitempty"` 5737 5738 // Split: Information about a request to split a source. 5739 Split *SourceSplitRequest `json:"split,omitempty"` 5740 5741 // StageName: System-defined name of the stage containing the source 5742 // operation. Unique across the workflow. 5743 StageName string `json:"stageName,omitempty"` 5744 5745 // SystemName: System-defined name of the Read instruction for this 5746 // source. Unique across the workflow. 5747 SystemName string `json:"systemName,omitempty"` 5748 5749 // ForceSendFields is a list of field names (e.g. "GetMetadata") to 5750 // unconditionally include in API requests. By default, fields with 5751 // empty values are omitted from API requests. However, any non-pointer, 5752 // non-interface field appearing in ForceSendFields will be sent to the 5753 // server regardless of whether the field is empty or not. This may be 5754 // used to include empty fields in Patch requests. 5755 ForceSendFields []string `json:"-"` 5756 5757 // NullFields is a list of field names (e.g. "GetMetadata") to include 5758 // in API requests with the JSON null value. By default, fields with 5759 // empty values are omitted from API requests. However, any field with 5760 // an empty value appearing in NullFields will be sent to the server as 5761 // null. It is an error if a field in this list has a non-empty value. 5762 // This may be used to include null fields in Patch requests. 5763 NullFields []string `json:"-"` 5764} 5765 5766func (s *SourceOperationRequest) MarshalJSON() ([]byte, error) { 5767 type NoMethod SourceOperationRequest 5768 raw := NoMethod(*s) 5769 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5770} 5771 5772// SourceOperationResponse: The result of a SourceOperationRequest, 5773// specified in ReportWorkItemStatusRequest.source_operation when the 5774// work item is completed. 5775type SourceOperationResponse struct { 5776 // GetMetadata: A response to a request to get metadata about a source. 5777 GetMetadata *SourceGetMetadataResponse `json:"getMetadata,omitempty"` 5778 5779 // Split: A response to a request to split a source. 5780 Split *SourceSplitResponse `json:"split,omitempty"` 5781 5782 // ForceSendFields is a list of field names (e.g. "GetMetadata") to 5783 // unconditionally include in API requests. By default, fields with 5784 // empty values are omitted from API requests. However, any non-pointer, 5785 // non-interface field appearing in ForceSendFields will be sent to the 5786 // server regardless of whether the field is empty or not. This may be 5787 // used to include empty fields in Patch requests. 5788 ForceSendFields []string `json:"-"` 5789 5790 // NullFields is a list of field names (e.g. "GetMetadata") to include 5791 // in API requests with the JSON null value. By default, fields with 5792 // empty values are omitted from API requests. However, any field with 5793 // an empty value appearing in NullFields will be sent to the server as 5794 // null. It is an error if a field in this list has a non-empty value. 5795 // This may be used to include null fields in Patch requests. 5796 NullFields []string `json:"-"` 5797} 5798 5799func (s *SourceOperationResponse) MarshalJSON() ([]byte, error) { 5800 type NoMethod SourceOperationResponse 5801 raw := NoMethod(*s) 5802 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5803} 5804 5805// SourceSplitOptions: Hints for splitting a Source into bundles (parts 5806// for parallel processing) using SourceSplitRequest. 5807type SourceSplitOptions struct { 5808 // DesiredBundleSizeBytes: The source should be split into a set of 5809 // bundles where the estimated size of each is approximately this many 5810 // bytes. 5811 DesiredBundleSizeBytes int64 `json:"desiredBundleSizeBytes,omitempty,string"` 5812 5813 // DesiredShardSizeBytes: DEPRECATED in favor of 5814 // desired_bundle_size_bytes. 5815 DesiredShardSizeBytes int64 `json:"desiredShardSizeBytes,omitempty,string"` 5816 5817 // ForceSendFields is a list of field names (e.g. 5818 // "DesiredBundleSizeBytes") to unconditionally include in API requests. 5819 // By default, fields with empty values are omitted from API requests. 5820 // However, any non-pointer, non-interface field appearing in 5821 // ForceSendFields will be sent to the server regardless of whether the 5822 // field is empty or not. This may be used to include empty fields in 5823 // Patch requests. 5824 ForceSendFields []string `json:"-"` 5825 5826 // NullFields is a list of field names (e.g. "DesiredBundleSizeBytes") 5827 // to include in API requests with the JSON null value. By default, 5828 // fields with empty values are omitted from API requests. However, any 5829 // field with an empty value appearing in NullFields will be sent to the 5830 // server as null. It is an error if a field in this list has a 5831 // non-empty value. This may be used to include null fields in Patch 5832 // requests. 5833 NullFields []string `json:"-"` 5834} 5835 5836func (s *SourceSplitOptions) MarshalJSON() ([]byte, error) { 5837 type NoMethod SourceSplitOptions 5838 raw := NoMethod(*s) 5839 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5840} 5841 5842// SourceSplitRequest: Represents the operation to split a high-level 5843// Source specification into bundles (parts for parallel processing). At 5844// a high level, splitting of a source into bundles happens as follows: 5845// SourceSplitRequest is applied to the source. If it returns 5846// SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and 5847// the source is used "as is". Otherwise, splitting is applied 5848// recursively to each produced DerivedSource. As an optimization, for 5849// any Source, if its does_not_need_splitting is true, the framework 5850// assumes that splitting this source would return 5851// SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a 5852// SourceSplitRequest. This applies both to the initial source being 5853// split and to bundles produced from it. 5854type SourceSplitRequest struct { 5855 // Options: Hints for tuning the splitting process. 5856 Options *SourceSplitOptions `json:"options,omitempty"` 5857 5858 // Source: Specification of the source to be split. 5859 Source *Source `json:"source,omitempty"` 5860 5861 // ForceSendFields is a list of field names (e.g. "Options") to 5862 // unconditionally include in API requests. By default, fields with 5863 // empty values are omitted from API requests. However, any non-pointer, 5864 // non-interface field appearing in ForceSendFields will be sent to the 5865 // server regardless of whether the field is empty or not. This may be 5866 // used to include empty fields in Patch requests. 5867 ForceSendFields []string `json:"-"` 5868 5869 // NullFields is a list of field names (e.g. "Options") to include in 5870 // API requests with the JSON null value. By default, fields with empty 5871 // values are omitted from API requests. However, any field with an 5872 // empty value appearing in NullFields will be sent to the server as 5873 // null. It is an error if a field in this list has a non-empty value. 5874 // This may be used to include null fields in Patch requests. 5875 NullFields []string `json:"-"` 5876} 5877 5878func (s *SourceSplitRequest) MarshalJSON() ([]byte, error) { 5879 type NoMethod SourceSplitRequest 5880 raw := NoMethod(*s) 5881 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5882} 5883 5884// SourceSplitResponse: The response to a SourceSplitRequest. 5885type SourceSplitResponse struct { 5886 // Bundles: If outcome is SPLITTING_HAPPENED, then this is a list of 5887 // bundles into which the source was split. Otherwise this field is 5888 // ignored. This list can be empty, which means the source represents an 5889 // empty input. 5890 Bundles []*DerivedSource `json:"bundles,omitempty"` 5891 5892 // Outcome: Indicates whether splitting happened and produced a list of 5893 // bundles. If this is USE_CURRENT_SOURCE_AS_IS, the current source 5894 // should be processed "as is" without splitting. "bundles" is ignored 5895 // in this case. If this is SPLITTING_HAPPENED, then "bundles" contains 5896 // a list of bundles into which the source was split. 5897 // 5898 // Possible values: 5899 // "SOURCE_SPLIT_OUTCOME_UNKNOWN" - The source split outcome is 5900 // unknown, or unspecified. 5901 // "SOURCE_SPLIT_OUTCOME_USE_CURRENT" - The current source should be 5902 // processed "as is" without splitting. 5903 // "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - Splitting produced a 5904 // list of bundles. 5905 Outcome string `json:"outcome,omitempty"` 5906 5907 // Shards: DEPRECATED in favor of bundles. 5908 Shards []*SourceSplitShard `json:"shards,omitempty"` 5909 5910 // ForceSendFields is a list of field names (e.g. "Bundles") to 5911 // unconditionally include in API requests. By default, fields with 5912 // empty values are omitted from API requests. However, any non-pointer, 5913 // non-interface field appearing in ForceSendFields will be sent to the 5914 // server regardless of whether the field is empty or not. This may be 5915 // used to include empty fields in Patch requests. 5916 ForceSendFields []string `json:"-"` 5917 5918 // NullFields is a list of field names (e.g. "Bundles") to include in 5919 // API requests with the JSON null value. By default, fields with empty 5920 // values are omitted from API requests. However, any field with an 5921 // empty value appearing in NullFields will be sent to the server as 5922 // null. It is an error if a field in this list has a non-empty value. 5923 // This may be used to include null fields in Patch requests. 5924 NullFields []string `json:"-"` 5925} 5926 5927func (s *SourceSplitResponse) MarshalJSON() ([]byte, error) { 5928 type NoMethod SourceSplitResponse 5929 raw := NoMethod(*s) 5930 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5931} 5932 5933// SourceSplitShard: DEPRECATED in favor of DerivedSource. 5934type SourceSplitShard struct { 5935 // DerivationMode: DEPRECATED 5936 // 5937 // Possible values: 5938 // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is 5939 // unknown, or unspecified. 5940 // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely 5941 // independent Source with no base. 5942 // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based 5943 // on the Source being split. 5944 // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source 5945 // based on the base of the Source being split. 5946 DerivationMode string `json:"derivationMode,omitempty"` 5947 5948 // Source: DEPRECATED 5949 Source *Source `json:"source,omitempty"` 5950 5951 // ForceSendFields is a list of field names (e.g. "DerivationMode") to 5952 // unconditionally include in API requests. By default, fields with 5953 // empty values are omitted from API requests. However, any non-pointer, 5954 // non-interface field appearing in ForceSendFields will be sent to the 5955 // server regardless of whether the field is empty or not. This may be 5956 // used to include empty fields in Patch requests. 5957 ForceSendFields []string `json:"-"` 5958 5959 // NullFields is a list of field names (e.g. "DerivationMode") to 5960 // include in API requests with the JSON null value. By default, fields 5961 // with empty values are omitted from API requests. However, any field 5962 // with an empty value appearing in NullFields will be sent to the 5963 // server as null. It is an error if a field in this list has a 5964 // non-empty value. This may be used to include null fields in Patch 5965 // requests. 5966 NullFields []string `json:"-"` 5967} 5968 5969func (s *SourceSplitShard) MarshalJSON() ([]byte, error) { 5970 type NoMethod SourceSplitShard 5971 raw := NoMethod(*s) 5972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5973} 5974 5975// SpannerIODetails: Metadata for a Spanner connector used by the job. 5976type SpannerIODetails struct { 5977 // DatabaseId: DatabaseId accessed in the connection. 5978 DatabaseId string `json:"databaseId,omitempty"` 5979 5980 // InstanceId: InstanceId accessed in the connection. 5981 InstanceId string `json:"instanceId,omitempty"` 5982 5983 // ProjectId: ProjectId accessed in the connection. 5984 ProjectId string `json:"projectId,omitempty"` 5985 5986 // ForceSendFields is a list of field names (e.g. "DatabaseId") to 5987 // unconditionally include in API requests. By default, fields with 5988 // empty values are omitted from API requests. However, any non-pointer, 5989 // non-interface field appearing in ForceSendFields will be sent to the 5990 // server regardless of whether the field is empty or not. This may be 5991 // used to include empty fields in Patch requests. 5992 ForceSendFields []string `json:"-"` 5993 5994 // NullFields is a list of field names (e.g. "DatabaseId") to include in 5995 // API requests with the JSON null value. By default, fields with empty 5996 // values are omitted from API requests. However, any field with an 5997 // empty value appearing in NullFields will be sent to the server as 5998 // null. It is an error if a field in this list has a non-empty value. 5999 // This may be used to include null fields in Patch requests. 6000 NullFields []string `json:"-"` 6001} 6002 6003func (s *SpannerIODetails) MarshalJSON() ([]byte, error) { 6004 type NoMethod SpannerIODetails 6005 raw := NoMethod(*s) 6006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6007} 6008 6009// SplitInt64: A representation of an int64, n, that is immune to 6010// precision loss when encoded in JSON. 6011type SplitInt64 struct { 6012 // HighBits: The high order bits, including the sign: n >> 32. 6013 HighBits int64 `json:"highBits,omitempty"` 6014 6015 // LowBits: The low order bits: n & 0xffffffff. 6016 LowBits int64 `json:"lowBits,omitempty"` 6017 6018 // ForceSendFields is a list of field names (e.g. "HighBits") to 6019 // unconditionally include in API requests. By default, fields with 6020 // empty values are omitted from API requests. However, any non-pointer, 6021 // non-interface field appearing in ForceSendFields will be sent to the 6022 // server regardless of whether the field is empty or not. This may be 6023 // used to include empty fields in Patch requests. 6024 ForceSendFields []string `json:"-"` 6025 6026 // NullFields is a list of field names (e.g. "HighBits") to include in 6027 // API requests with the JSON null value. By default, fields with empty 6028 // values are omitted from API requests. However, any field with an 6029 // empty value appearing in NullFields will be sent to the server as 6030 // null. It is an error if a field in this list has a non-empty value. 6031 // This may be used to include null fields in Patch requests. 6032 NullFields []string `json:"-"` 6033} 6034 6035func (s *SplitInt64) MarshalJSON() ([]byte, error) { 6036 type NoMethod SplitInt64 6037 raw := NoMethod(*s) 6038 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6039} 6040 6041// StageExecutionDetails: Information about the workers and work items 6042// within a stage. 6043type StageExecutionDetails struct { 6044 // NextPageToken: If present, this response does not contain all 6045 // requested tasks. To obtain the next page of results, repeat the 6046 // request with page_token set to this value. 6047 NextPageToken string `json:"nextPageToken,omitempty"` 6048 6049 // Workers: Workers that have done work on the stage. 6050 Workers []*WorkerDetails `json:"workers,omitempty"` 6051 6052 // ServerResponse contains the HTTP response code and headers from the 6053 // server. 6054 googleapi.ServerResponse `json:"-"` 6055 6056 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 6057 // unconditionally include in API requests. By default, fields with 6058 // empty values are omitted from API requests. However, any non-pointer, 6059 // non-interface field appearing in ForceSendFields will be sent to the 6060 // server regardless of whether the field is empty or not. This may be 6061 // used to include empty fields in Patch requests. 6062 ForceSendFields []string `json:"-"` 6063 6064 // NullFields is a list of field names (e.g. "NextPageToken") to include 6065 // in API requests with the JSON null value. By default, fields with 6066 // empty values are omitted from API requests. However, any field with 6067 // an empty value appearing in NullFields will be sent to the server as 6068 // null. It is an error if a field in this list has a non-empty value. 6069 // This may be used to include null fields in Patch requests. 6070 NullFields []string `json:"-"` 6071} 6072 6073func (s *StageExecutionDetails) MarshalJSON() ([]byte, error) { 6074 type NoMethod StageExecutionDetails 6075 raw := NoMethod(*s) 6076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6077} 6078 6079// StageSource: Description of an input or output of an execution stage. 6080type StageSource struct { 6081 // Name: Dataflow service generated name for this source. 6082 Name string `json:"name,omitempty"` 6083 6084 // OriginalTransformOrCollection: User name for the original user 6085 // transform or collection with which this source is most closely 6086 // associated. 6087 OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"` 6088 6089 // SizeBytes: Size of the source, if measurable. 6090 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 6091 6092 // UserName: Human-readable name for this source; may be user or system 6093 // generated. 6094 UserName string `json:"userName,omitempty"` 6095 6096 // ForceSendFields is a list of field names (e.g. "Name") to 6097 // unconditionally include in API requests. By default, fields with 6098 // empty values are omitted from API requests. However, any non-pointer, 6099 // non-interface field appearing in ForceSendFields will be sent to the 6100 // server regardless of whether the field is empty or not. This may be 6101 // used to include empty fields in Patch requests. 6102 ForceSendFields []string `json:"-"` 6103 6104 // NullFields is a list of field names (e.g. "Name") to include in API 6105 // requests with the JSON null value. By default, fields with empty 6106 // values are omitted from API requests. However, any field with an 6107 // empty value appearing in NullFields will be sent to the server as 6108 // null. It is an error if a field in this list has a non-empty value. 6109 // This may be used to include null fields in Patch requests. 6110 NullFields []string `json:"-"` 6111} 6112 6113func (s *StageSource) MarshalJSON() ([]byte, error) { 6114 type NoMethod StageSource 6115 raw := NoMethod(*s) 6116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6117} 6118 6119// StageSummary: Information about a particular execution stage of a 6120// job. 6121type StageSummary struct { 6122 // EndTime: End time of this stage. If the work item is completed, this 6123 // is the actual end time of the stage. Otherwise, it is the predicted 6124 // end time. 6125 EndTime string `json:"endTime,omitempty"` 6126 6127 // Metrics: Metrics for this stage. 6128 Metrics []*MetricUpdate `json:"metrics,omitempty"` 6129 6130 // Progress: Progress for this stage. Only applicable to Batch jobs. 6131 Progress *ProgressTimeseries `json:"progress,omitempty"` 6132 6133 // StageId: ID of this stage 6134 StageId string `json:"stageId,omitempty"` 6135 6136 // StartTime: Start time of this stage. 6137 StartTime string `json:"startTime,omitempty"` 6138 6139 // State: State of this stage. 6140 // 6141 // Possible values: 6142 // "EXECUTION_STATE_UNKNOWN" - The component state is unknown or 6143 // unspecified. 6144 // "EXECUTION_STATE_NOT_STARTED" - The component is not yet running. 6145 // "EXECUTION_STATE_RUNNING" - The component is currently running. 6146 // "EXECUTION_STATE_SUCCEEDED" - The component succeeded. 6147 // "EXECUTION_STATE_FAILED" - The component failed. 6148 // "EXECUTION_STATE_CANCELLED" - Execution of the component was 6149 // cancelled. 6150 State string `json:"state,omitempty"` 6151 6152 // ForceSendFields is a list of field names (e.g. "EndTime") to 6153 // unconditionally include in API requests. By default, fields with 6154 // empty values are omitted from API requests. However, any non-pointer, 6155 // non-interface field appearing in ForceSendFields will be sent to the 6156 // server regardless of whether the field is empty or not. This may be 6157 // used to include empty fields in Patch requests. 6158 ForceSendFields []string `json:"-"` 6159 6160 // NullFields is a list of field names (e.g. "EndTime") to include in 6161 // API requests with the JSON null value. By default, fields with empty 6162 // values are omitted from API requests. However, any field with an 6163 // empty value appearing in NullFields will be sent to the server as 6164 // null. It is an error if a field in this list has a non-empty value. 6165 // This may be used to include null fields in Patch requests. 6166 NullFields []string `json:"-"` 6167} 6168 6169func (s *StageSummary) MarshalJSON() ([]byte, error) { 6170 type NoMethod StageSummary 6171 raw := NoMethod(*s) 6172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6173} 6174 6175// StateFamilyConfig: State family configuration. 6176type StateFamilyConfig struct { 6177 // IsRead: If true, this family corresponds to a read operation. 6178 IsRead bool `json:"isRead,omitempty"` 6179 6180 // StateFamily: The state family value. 6181 StateFamily string `json:"stateFamily,omitempty"` 6182 6183 // ForceSendFields is a list of field names (e.g. "IsRead") to 6184 // unconditionally include in API requests. By default, fields with 6185 // empty values are omitted from API requests. However, any non-pointer, 6186 // non-interface field appearing in ForceSendFields will be sent to the 6187 // server regardless of whether the field is empty or not. This may be 6188 // used to include empty fields in Patch requests. 6189 ForceSendFields []string `json:"-"` 6190 6191 // NullFields is a list of field names (e.g. "IsRead") to include in API 6192 // requests with the JSON null value. By default, fields with empty 6193 // values are omitted from API requests. However, any field with an 6194 // empty value appearing in NullFields will be sent to the server as 6195 // null. It is an error if a field in this list has a non-empty value. 6196 // This may be used to include null fields in Patch requests. 6197 NullFields []string `json:"-"` 6198} 6199 6200func (s *StateFamilyConfig) MarshalJSON() ([]byte, error) { 6201 type NoMethod StateFamilyConfig 6202 raw := NoMethod(*s) 6203 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6204} 6205 6206// Status: The `Status` type defines a logical error model that is 6207// suitable for different programming environments, including REST APIs 6208// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 6209// `Status` message contains three pieces of data: error code, error 6210// message, and error details. You can find out more about this error 6211// model and how to work with it in the API Design Guide 6212// (https://cloud.google.com/apis/design/errors). 6213type Status struct { 6214 // Code: The status code, which should be an enum value of 6215 // google.rpc.Code. 6216 Code int64 `json:"code,omitempty"` 6217 6218 // Details: A list of messages that carry the error details. There is a 6219 // common set of message types for APIs to use. 6220 Details []googleapi.RawMessage `json:"details,omitempty"` 6221 6222 // Message: A developer-facing error message, which should be in 6223 // English. Any user-facing error message should be localized and sent 6224 // in the google.rpc.Status.details field, or localized by the client. 6225 Message string `json:"message,omitempty"` 6226 6227 // ForceSendFields is a list of field names (e.g. "Code") to 6228 // unconditionally include in API requests. By default, fields with 6229 // empty values are omitted from API requests. However, any non-pointer, 6230 // non-interface field appearing in ForceSendFields will be sent to the 6231 // server regardless of whether the field is empty or not. This may be 6232 // used to include empty fields in Patch requests. 6233 ForceSendFields []string `json:"-"` 6234 6235 // NullFields is a list of field names (e.g. "Code") to include in API 6236 // requests with the JSON null value. By default, fields with empty 6237 // values are omitted from API requests. However, any field with an 6238 // empty value appearing in NullFields will be sent to the server as 6239 // null. It is an error if a field in this list has a non-empty value. 6240 // This may be used to include null fields in Patch requests. 6241 NullFields []string `json:"-"` 6242} 6243 6244func (s *Status) MarshalJSON() ([]byte, error) { 6245 type NoMethod Status 6246 raw := NoMethod(*s) 6247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6248} 6249 6250// Step: Defines a particular step within a Cloud Dataflow job. A job 6251// consists of multiple steps, each of which performs some specific 6252// operation as part of the overall job. Data is typically passed from 6253// one step to another as part of the job. Here's an example of a 6254// sequence of steps which together implement a Map-Reduce job: * Read a 6255// collection of data from some source, parsing the collection's 6256// elements. * Validate the elements. * Apply a user-defined function to 6257// map each element to some value and extract an element-specific key 6258// value. * Group elements with the same key into a single element with 6259// that key, transforming a multiply-keyed collection into a 6260// uniquely-keyed collection. * Write the elements out to some data 6261// sink. Note that the Cloud Dataflow service may be used to run many 6262// different types of jobs, not just Map-Reduce. 6263type Step struct { 6264 // Kind: The kind of step in the Cloud Dataflow job. 6265 Kind string `json:"kind,omitempty"` 6266 6267 // Name: The name that identifies the step. This must be unique for each 6268 // step with respect to all other steps in the Cloud Dataflow job. 6269 Name string `json:"name,omitempty"` 6270 6271 // Properties: Named properties associated with the step. Each kind of 6272 // predefined step has its own required set of properties. Must be 6273 // provided on Create. Only retrieved with JOB_VIEW_ALL. 6274 Properties googleapi.RawMessage `json:"properties,omitempty"` 6275 6276 // ForceSendFields is a list of field names (e.g. "Kind") to 6277 // unconditionally include in API requests. By default, fields with 6278 // empty values are omitted from API requests. However, any non-pointer, 6279 // non-interface field appearing in ForceSendFields will be sent to the 6280 // server regardless of whether the field is empty or not. This may be 6281 // used to include empty fields in Patch requests. 6282 ForceSendFields []string `json:"-"` 6283 6284 // NullFields is a list of field names (e.g. "Kind") to include in API 6285 // requests with the JSON null value. By default, fields with empty 6286 // values are omitted from API requests. However, any field with an 6287 // empty value appearing in NullFields will be sent to the server as 6288 // null. It is an error if a field in this list has a non-empty value. 6289 // This may be used to include null fields in Patch requests. 6290 NullFields []string `json:"-"` 6291} 6292 6293func (s *Step) MarshalJSON() ([]byte, error) { 6294 type NoMethod Step 6295 raw := NoMethod(*s) 6296 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6297} 6298 6299// StreamLocation: Describes a stream of data, either as input to be 6300// processed or as output of a streaming Dataflow job. 6301type StreamLocation struct { 6302 // CustomSourceLocation: The stream is a custom source. 6303 CustomSourceLocation *CustomSourceLocation `json:"customSourceLocation,omitempty"` 6304 6305 // PubsubLocation: The stream is a pubsub stream. 6306 PubsubLocation *PubsubLocation `json:"pubsubLocation,omitempty"` 6307 6308 // SideInputLocation: The stream is a streaming side input. 6309 SideInputLocation *StreamingSideInputLocation `json:"sideInputLocation,omitempty"` 6310 6311 // StreamingStageLocation: The stream is part of another computation 6312 // within the current streaming Dataflow job. 6313 StreamingStageLocation *StreamingStageLocation `json:"streamingStageLocation,omitempty"` 6314 6315 // ForceSendFields is a list of field names (e.g. 6316 // "CustomSourceLocation") to unconditionally include in API requests. 6317 // By default, fields with empty values are omitted from API requests. 6318 // However, any non-pointer, non-interface field appearing in 6319 // ForceSendFields will be sent to the server regardless of whether the 6320 // field is empty or not. This may be used to include empty fields in 6321 // Patch requests. 6322 ForceSendFields []string `json:"-"` 6323 6324 // NullFields is a list of field names (e.g. "CustomSourceLocation") to 6325 // include in API requests with the JSON null value. By default, fields 6326 // with empty values are omitted from API requests. However, any field 6327 // with an empty value appearing in NullFields will be sent to the 6328 // server as null. It is an error if a field in this list has a 6329 // non-empty value. This may be used to include null fields in Patch 6330 // requests. 6331 NullFields []string `json:"-"` 6332} 6333 6334func (s *StreamLocation) MarshalJSON() ([]byte, error) { 6335 type NoMethod StreamLocation 6336 raw := NoMethod(*s) 6337 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6338} 6339 6340// StreamingApplianceSnapshotConfig: Streaming appliance snapshot 6341// configuration. 6342type StreamingApplianceSnapshotConfig struct { 6343 // ImportStateEndpoint: Indicates which endpoint is used to import 6344 // appliance state. 6345 ImportStateEndpoint string `json:"importStateEndpoint,omitempty"` 6346 6347 // SnapshotId: If set, indicates the snapshot id for the snapshot being 6348 // performed. 6349 SnapshotId string `json:"snapshotId,omitempty"` 6350 6351 // ForceSendFields is a list of field names (e.g. "ImportStateEndpoint") 6352 // to unconditionally include in API requests. By default, fields with 6353 // empty values are omitted from API requests. However, any non-pointer, 6354 // non-interface field appearing in ForceSendFields will be sent to the 6355 // server regardless of whether the field is empty or not. This may be 6356 // used to include empty fields in Patch requests. 6357 ForceSendFields []string `json:"-"` 6358 6359 // NullFields is a list of field names (e.g. "ImportStateEndpoint") to 6360 // include in API requests with the JSON null value. By default, fields 6361 // with empty values are omitted from API requests. However, any field 6362 // with an empty value appearing in NullFields will be sent to the 6363 // server as null. It is an error if a field in this list has a 6364 // non-empty value. This may be used to include null fields in Patch 6365 // requests. 6366 NullFields []string `json:"-"` 6367} 6368 6369func (s *StreamingApplianceSnapshotConfig) MarshalJSON() ([]byte, error) { 6370 type NoMethod StreamingApplianceSnapshotConfig 6371 raw := NoMethod(*s) 6372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6373} 6374 6375// StreamingComputationConfig: Configuration information for a single 6376// streaming computation. 6377type StreamingComputationConfig struct { 6378 // ComputationId: Unique identifier for this computation. 6379 ComputationId string `json:"computationId,omitempty"` 6380 6381 // Instructions: Instructions that comprise the computation. 6382 Instructions []*ParallelInstruction `json:"instructions,omitempty"` 6383 6384 // StageName: Stage name of this computation. 6385 StageName string `json:"stageName,omitempty"` 6386 6387 // SystemName: System defined name for this computation. 6388 SystemName string `json:"systemName,omitempty"` 6389 6390 // TransformUserNameToStateFamily: Map from user name of stateful 6391 // transforms in this stage to their state family. 6392 TransformUserNameToStateFamily map[string]string `json:"transformUserNameToStateFamily,omitempty"` 6393 6394 // ForceSendFields is a list of field names (e.g. "ComputationId") to 6395 // unconditionally include in API requests. By default, fields with 6396 // empty values are omitted from API requests. However, any non-pointer, 6397 // non-interface field appearing in ForceSendFields will be sent to the 6398 // server regardless of whether the field is empty or not. This may be 6399 // used to include empty fields in Patch requests. 6400 ForceSendFields []string `json:"-"` 6401 6402 // NullFields is a list of field names (e.g. "ComputationId") to include 6403 // in API requests with the JSON null value. By default, fields with 6404 // empty values are omitted from API requests. However, any field with 6405 // an empty value appearing in NullFields will be sent to the server as 6406 // null. It is an error if a field in this list has a non-empty value. 6407 // This may be used to include null fields in Patch requests. 6408 NullFields []string `json:"-"` 6409} 6410 6411func (s *StreamingComputationConfig) MarshalJSON() ([]byte, error) { 6412 type NoMethod StreamingComputationConfig 6413 raw := NoMethod(*s) 6414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6415} 6416 6417// StreamingComputationRanges: Describes full or partial data disk 6418// assignment information of the computation ranges. 6419type StreamingComputationRanges struct { 6420 // ComputationId: The ID of the computation. 6421 ComputationId string `json:"computationId,omitempty"` 6422 6423 // RangeAssignments: Data disk assignments for ranges from this 6424 // computation. 6425 RangeAssignments []*KeyRangeDataDiskAssignment `json:"rangeAssignments,omitempty"` 6426 6427 // ForceSendFields is a list of field names (e.g. "ComputationId") to 6428 // unconditionally include in API requests. By default, fields with 6429 // empty values are omitted from API requests. However, any non-pointer, 6430 // non-interface field appearing in ForceSendFields will be sent to the 6431 // server regardless of whether the field is empty or not. This may be 6432 // used to include empty fields in Patch requests. 6433 ForceSendFields []string `json:"-"` 6434 6435 // NullFields is a list of field names (e.g. "ComputationId") to include 6436 // in API requests with the JSON null value. By default, fields with 6437 // empty values are omitted from API requests. However, any field with 6438 // an empty value appearing in NullFields will be sent to the server as 6439 // null. It is an error if a field in this list has a non-empty value. 6440 // This may be used to include null fields in Patch requests. 6441 NullFields []string `json:"-"` 6442} 6443 6444func (s *StreamingComputationRanges) MarshalJSON() ([]byte, error) { 6445 type NoMethod StreamingComputationRanges 6446 raw := NoMethod(*s) 6447 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6448} 6449 6450// StreamingComputationTask: A task which describes what action should 6451// be performed for the specified streaming computation ranges. 6452type StreamingComputationTask struct { 6453 // ComputationRanges: Contains ranges of a streaming computation this 6454 // task should apply to. 6455 ComputationRanges []*StreamingComputationRanges `json:"computationRanges,omitempty"` 6456 6457 // DataDisks: Describes the set of data disks this task should apply to. 6458 DataDisks []*MountedDataDisk `json:"dataDisks,omitempty"` 6459 6460 // TaskType: A type of streaming computation task. 6461 // 6462 // Possible values: 6463 // "STREAMING_COMPUTATION_TASK_UNKNOWN" - The streaming computation 6464 // task is unknown, or unspecified. 6465 // "STREAMING_COMPUTATION_TASK_STOP" - Stop processing specified 6466 // streaming computation range(s). 6467 // "STREAMING_COMPUTATION_TASK_START" - Start processing specified 6468 // streaming computation range(s). 6469 TaskType string `json:"taskType,omitempty"` 6470 6471 // ForceSendFields is a list of field names (e.g. "ComputationRanges") 6472 // to unconditionally include in API requests. By default, fields with 6473 // empty values are omitted from API requests. However, any non-pointer, 6474 // non-interface field appearing in ForceSendFields will be sent to the 6475 // server regardless of whether the field is empty or not. This may be 6476 // used to include empty fields in Patch requests. 6477 ForceSendFields []string `json:"-"` 6478 6479 // NullFields is a list of field names (e.g. "ComputationRanges") to 6480 // include in API requests with the JSON null value. By default, fields 6481 // with empty values are omitted from API requests. However, any field 6482 // with an empty value appearing in NullFields will be sent to the 6483 // server as null. It is an error if a field in this list has a 6484 // non-empty value. This may be used to include null fields in Patch 6485 // requests. 6486 NullFields []string `json:"-"` 6487} 6488 6489func (s *StreamingComputationTask) MarshalJSON() ([]byte, error) { 6490 type NoMethod StreamingComputationTask 6491 raw := NoMethod(*s) 6492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6493} 6494 6495// StreamingConfigTask: A task that carries configuration information 6496// for streaming computations. 6497type StreamingConfigTask struct { 6498 // CommitStreamChunkSizeBytes: Chunk size for commit streams from the 6499 // harness to windmill. 6500 CommitStreamChunkSizeBytes int64 `json:"commitStreamChunkSizeBytes,omitempty,string"` 6501 6502 // GetDataStreamChunkSizeBytes: Chunk size for get data streams from the 6503 // harness to windmill. 6504 GetDataStreamChunkSizeBytes int64 `json:"getDataStreamChunkSizeBytes,omitempty,string"` 6505 6506 // MaxWorkItemCommitBytes: Maximum size for work item commit supported 6507 // windmill storage layer. 6508 MaxWorkItemCommitBytes int64 `json:"maxWorkItemCommitBytes,omitempty,string"` 6509 6510 // StreamingComputationConfigs: Set of computation configuration 6511 // information. 6512 StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"` 6513 6514 // UserStepToStateFamilyNameMap: Map from user step names to state 6515 // families. 6516 UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"` 6517 6518 // WindmillServiceEndpoint: If present, the worker must use this 6519 // endpoint to communicate with Windmill Service dispatchers, otherwise 6520 // the worker must continue to use whatever endpoint it had been using. 6521 WindmillServiceEndpoint string `json:"windmillServiceEndpoint,omitempty"` 6522 6523 // WindmillServicePort: If present, the worker must use this port to 6524 // communicate with Windmill Service dispatchers. Only applicable when 6525 // windmill_service_endpoint is specified. 6526 WindmillServicePort int64 `json:"windmillServicePort,omitempty,string"` 6527 6528 // ForceSendFields is a list of field names (e.g. 6529 // "CommitStreamChunkSizeBytes") to unconditionally include in API 6530 // requests. By default, fields with empty values are omitted from API 6531 // requests. However, any non-pointer, non-interface field appearing in 6532 // ForceSendFields will be sent to the server regardless of whether the 6533 // field is empty or not. This may be used to include empty fields in 6534 // Patch requests. 6535 ForceSendFields []string `json:"-"` 6536 6537 // NullFields is a list of field names (e.g. 6538 // "CommitStreamChunkSizeBytes") to include in API requests with the 6539 // JSON null value. By default, fields with empty values are omitted 6540 // from API requests. However, any field with an empty value appearing 6541 // in NullFields will be sent to the server as null. It is an error if a 6542 // field in this list has a non-empty value. This may be used to include 6543 // null fields in Patch requests. 6544 NullFields []string `json:"-"` 6545} 6546 6547func (s *StreamingConfigTask) MarshalJSON() ([]byte, error) { 6548 type NoMethod StreamingConfigTask 6549 raw := NoMethod(*s) 6550 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6551} 6552 6553// StreamingSetupTask: A task which initializes part of a streaming 6554// Dataflow job. 6555type StreamingSetupTask struct { 6556 // Drain: The user has requested drain. 6557 Drain bool `json:"drain,omitempty"` 6558 6559 // ReceiveWorkPort: The TCP port on which the worker should listen for 6560 // messages from other streaming computation workers. 6561 ReceiveWorkPort int64 `json:"receiveWorkPort,omitempty"` 6562 6563 // SnapshotConfig: Configures streaming appliance snapshot. 6564 SnapshotConfig *StreamingApplianceSnapshotConfig `json:"snapshotConfig,omitempty"` 6565 6566 // StreamingComputationTopology: The global topology of the streaming 6567 // Dataflow job. 6568 StreamingComputationTopology *TopologyConfig `json:"streamingComputationTopology,omitempty"` 6569 6570 // WorkerHarnessPort: The TCP port used by the worker to communicate 6571 // with the Dataflow worker harness. 6572 WorkerHarnessPort int64 `json:"workerHarnessPort,omitempty"` 6573 6574 // ForceSendFields is a list of field names (e.g. "Drain") to 6575 // unconditionally include in API requests. By default, fields with 6576 // empty values are omitted from API requests. However, any non-pointer, 6577 // non-interface field appearing in ForceSendFields will be sent to the 6578 // server regardless of whether the field is empty or not. This may be 6579 // used to include empty fields in Patch requests. 6580 ForceSendFields []string `json:"-"` 6581 6582 // NullFields is a list of field names (e.g. "Drain") to include in API 6583 // requests with the JSON null value. By default, fields with empty 6584 // values are omitted from API requests. However, any field with an 6585 // empty value appearing in NullFields will be sent to the server as 6586 // null. It is an error if a field in this list has a non-empty value. 6587 // This may be used to include null fields in Patch requests. 6588 NullFields []string `json:"-"` 6589} 6590 6591func (s *StreamingSetupTask) MarshalJSON() ([]byte, error) { 6592 type NoMethod StreamingSetupTask 6593 raw := NoMethod(*s) 6594 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6595} 6596 6597// StreamingSideInputLocation: Identifies the location of a streaming 6598// side input. 6599type StreamingSideInputLocation struct { 6600 // StateFamily: Identifies the state family where this side input is 6601 // stored. 6602 StateFamily string `json:"stateFamily,omitempty"` 6603 6604 // Tag: Identifies the particular side input within the streaming 6605 // Dataflow job. 6606 Tag string `json:"tag,omitempty"` 6607 6608 // ForceSendFields is a list of field names (e.g. "StateFamily") to 6609 // unconditionally include in API requests. By default, fields with 6610 // empty values are omitted from API requests. However, any non-pointer, 6611 // non-interface field appearing in ForceSendFields will be sent to the 6612 // server regardless of whether the field is empty or not. This may be 6613 // used to include empty fields in Patch requests. 6614 ForceSendFields []string `json:"-"` 6615 6616 // NullFields is a list of field names (e.g. "StateFamily") to include 6617 // in API requests with the JSON null value. By default, fields with 6618 // empty values are omitted from API requests. However, any field with 6619 // an empty value appearing in NullFields will be sent to the server as 6620 // null. It is an error if a field in this list has a non-empty value. 6621 // This may be used to include null fields in Patch requests. 6622 NullFields []string `json:"-"` 6623} 6624 6625func (s *StreamingSideInputLocation) MarshalJSON() ([]byte, error) { 6626 type NoMethod StreamingSideInputLocation 6627 raw := NoMethod(*s) 6628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6629} 6630 6631// StreamingStageLocation: Identifies the location of a streaming 6632// computation stage, for stage-to-stage communication. 6633type StreamingStageLocation struct { 6634 // StreamId: Identifies the particular stream within the streaming 6635 // Dataflow job. 6636 StreamId string `json:"streamId,omitempty"` 6637 6638 // ForceSendFields is a list of field names (e.g. "StreamId") to 6639 // unconditionally include in API requests. By default, fields with 6640 // empty values are omitted from API requests. However, any non-pointer, 6641 // non-interface field appearing in ForceSendFields will be sent to the 6642 // server regardless of whether the field is empty or not. This may be 6643 // used to include empty fields in Patch requests. 6644 ForceSendFields []string `json:"-"` 6645 6646 // NullFields is a list of field names (e.g. "StreamId") to include in 6647 // API requests with the JSON null value. By default, fields with empty 6648 // values are omitted from API requests. However, any field with an 6649 // empty value appearing in NullFields will be sent to the server as 6650 // null. It is an error if a field in this list has a non-empty value. 6651 // This may be used to include null fields in Patch requests. 6652 NullFields []string `json:"-"` 6653} 6654 6655func (s *StreamingStageLocation) MarshalJSON() ([]byte, error) { 6656 type NoMethod StreamingStageLocation 6657 raw := NoMethod(*s) 6658 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6659} 6660 6661// StringList: A metric value representing a list of strings. 6662type StringList struct { 6663 // Elements: Elements of the list. 6664 Elements []string `json:"elements,omitempty"` 6665 6666 // ForceSendFields is a list of field names (e.g. "Elements") to 6667 // unconditionally include in API requests. By default, fields with 6668 // empty values are omitted from API requests. However, any non-pointer, 6669 // non-interface field appearing in ForceSendFields will be sent to the 6670 // server regardless of whether the field is empty or not. This may be 6671 // used to include empty fields in Patch requests. 6672 ForceSendFields []string `json:"-"` 6673 6674 // NullFields is a list of field names (e.g. "Elements") to include in 6675 // API requests with the JSON null value. By default, fields with empty 6676 // values are omitted from API requests. However, any field with an 6677 // empty value appearing in NullFields will be sent to the server as 6678 // null. It is an error if a field in this list has a non-empty value. 6679 // This may be used to include null fields in Patch requests. 6680 NullFields []string `json:"-"` 6681} 6682 6683func (s *StringList) MarshalJSON() ([]byte, error) { 6684 type NoMethod StringList 6685 raw := NoMethod(*s) 6686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6687} 6688 6689// StructuredMessage: A rich message format, including a human readable 6690// string, a key for identifying the message, and structured data 6691// associated with the message for programmatic consumption. 6692type StructuredMessage struct { 6693 // MessageKey: Identifier for this message type. Used by external 6694 // systems to internationalize or personalize message. 6695 MessageKey string `json:"messageKey,omitempty"` 6696 6697 // MessageText: Human-readable version of message. 6698 MessageText string `json:"messageText,omitempty"` 6699 6700 // Parameters: The structured data associated with this message. 6701 Parameters []*Parameter `json:"parameters,omitempty"` 6702 6703 // ForceSendFields is a list of field names (e.g. "MessageKey") to 6704 // unconditionally include in API requests. By default, fields with 6705 // empty values are omitted from API requests. However, any non-pointer, 6706 // non-interface field appearing in ForceSendFields will be sent to the 6707 // server regardless of whether the field is empty or not. This may be 6708 // used to include empty fields in Patch requests. 6709 ForceSendFields []string `json:"-"` 6710 6711 // NullFields is a list of field names (e.g. "MessageKey") to include in 6712 // API requests with the JSON null value. By default, fields with empty 6713 // values are omitted from API requests. However, any field with an 6714 // empty value appearing in NullFields will be sent to the server as 6715 // null. It is an error if a field in this list has a non-empty value. 6716 // This may be used to include null fields in Patch requests. 6717 NullFields []string `json:"-"` 6718} 6719 6720func (s *StructuredMessage) MarshalJSON() ([]byte, error) { 6721 type NoMethod StructuredMessage 6722 raw := NoMethod(*s) 6723 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6724} 6725 6726// TaskRunnerSettings: Taskrunner configuration settings. 6727type TaskRunnerSettings struct { 6728 // Alsologtostderr: Whether to also send taskrunner log info to stderr. 6729 Alsologtostderr bool `json:"alsologtostderr,omitempty"` 6730 6731 // BaseTaskDir: The location on the worker for task-specific 6732 // subdirectories. 6733 BaseTaskDir string `json:"baseTaskDir,omitempty"` 6734 6735 // BaseUrl: The base URL for the taskrunner to use when accessing Google 6736 // Cloud APIs. When workers access Google Cloud APIs, they logically do 6737 // so via relative URLs. If this field is specified, it supplies the 6738 // base URL to use for resolving these relative URLs. The normative 6739 // algorithm used is defined by RFC 1808, "Relative Uniform Resource 6740 // Locators". If not specified, the default value is 6741 // "http://www.googleapis.com/" 6742 BaseUrl string `json:"baseUrl,omitempty"` 6743 6744 // CommandlinesFileName: The file to store preprocessing commands in. 6745 CommandlinesFileName string `json:"commandlinesFileName,omitempty"` 6746 6747 // ContinueOnException: Whether to continue taskrunner if an exception 6748 // is hit. 6749 ContinueOnException bool `json:"continueOnException,omitempty"` 6750 6751 // DataflowApiVersion: The API version of endpoint, e.g. "v1b3" 6752 DataflowApiVersion string `json:"dataflowApiVersion,omitempty"` 6753 6754 // HarnessCommand: The command to launch the worker harness. 6755 HarnessCommand string `json:"harnessCommand,omitempty"` 6756 6757 // LanguageHint: The suggested backend language. 6758 LanguageHint string `json:"languageHint,omitempty"` 6759 6760 // LogDir: The directory on the VM to store logs. 6761 LogDir string `json:"logDir,omitempty"` 6762 6763 // LogToSerialconsole: Whether to send taskrunner log info to Google 6764 // Compute Engine VM serial console. 6765 LogToSerialconsole bool `json:"logToSerialconsole,omitempty"` 6766 6767 // LogUploadLocation: Indicates where to put logs. If this is not 6768 // specified, the logs will not be uploaded. The supported resource type 6769 // is: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} 6770 // bucket.storage.googleapis.com/{object} 6771 LogUploadLocation string `json:"logUploadLocation,omitempty"` 6772 6773 // OauthScopes: The OAuth2 scopes to be requested by the taskrunner in 6774 // order to access the Cloud Dataflow API. 6775 OauthScopes []string `json:"oauthScopes,omitempty"` 6776 6777 // ParallelWorkerSettings: The settings to pass to the parallel worker 6778 // harness. 6779 ParallelWorkerSettings *WorkerSettings `json:"parallelWorkerSettings,omitempty"` 6780 6781 // StreamingWorkerMainClass: The streaming worker main class name. 6782 StreamingWorkerMainClass string `json:"streamingWorkerMainClass,omitempty"` 6783 6784 // TaskGroup: The UNIX group ID on the worker VM to use for tasks 6785 // launched by taskrunner; e.g. "wheel". 6786 TaskGroup string `json:"taskGroup,omitempty"` 6787 6788 // TaskUser: The UNIX user ID on the worker VM to use for tasks launched 6789 // by taskrunner; e.g. "root". 6790 TaskUser string `json:"taskUser,omitempty"` 6791 6792 // TempStoragePrefix: The prefix of the resources the taskrunner should 6793 // use for temporary storage. The supported resource type is: Google 6794 // Cloud Storage: storage.googleapis.com/{bucket}/{object} 6795 // bucket.storage.googleapis.com/{object} 6796 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 6797 6798 // VmId: The ID string of the VM. 6799 VmId string `json:"vmId,omitempty"` 6800 6801 // WorkflowFileName: The file to store the workflow in. 6802 WorkflowFileName string `json:"workflowFileName,omitempty"` 6803 6804 // ForceSendFields is a list of field names (e.g. "Alsologtostderr") to 6805 // unconditionally include in API requests. By default, fields with 6806 // empty values are omitted from API requests. However, any non-pointer, 6807 // non-interface field appearing in ForceSendFields will be sent to the 6808 // server regardless of whether the field is empty or not. This may be 6809 // used to include empty fields in Patch requests. 6810 ForceSendFields []string `json:"-"` 6811 6812 // NullFields is a list of field names (e.g. "Alsologtostderr") to 6813 // include in API requests with the JSON null value. By default, fields 6814 // with empty values are omitted from API requests. However, any field 6815 // with an empty value appearing in NullFields will be sent to the 6816 // server as null. It is an error if a field in this list has a 6817 // non-empty value. This may be used to include null fields in Patch 6818 // requests. 6819 NullFields []string `json:"-"` 6820} 6821 6822func (s *TaskRunnerSettings) MarshalJSON() ([]byte, error) { 6823 type NoMethod TaskRunnerSettings 6824 raw := NoMethod(*s) 6825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6826} 6827 6828// TemplateMetadata: Metadata describing a template. 6829type TemplateMetadata struct { 6830 // Description: Optional. A description of the template. 6831 Description string `json:"description,omitempty"` 6832 6833 // Name: Required. The name of the template. 6834 Name string `json:"name,omitempty"` 6835 6836 // Parameters: The parameters for the template. 6837 Parameters []*ParameterMetadata `json:"parameters,omitempty"` 6838 6839 // ForceSendFields is a list of field names (e.g. "Description") to 6840 // unconditionally include in API requests. By default, fields with 6841 // empty values are omitted from API requests. However, any non-pointer, 6842 // non-interface field appearing in ForceSendFields will be sent to the 6843 // server regardless of whether the field is empty or not. This may be 6844 // used to include empty fields in Patch requests. 6845 ForceSendFields []string `json:"-"` 6846 6847 // NullFields is a list of field names (e.g. "Description") to include 6848 // in API requests with the JSON null value. By default, fields with 6849 // empty values are omitted from API requests. However, any field with 6850 // an empty value appearing in NullFields will be sent to the server as 6851 // null. It is an error if a field in this list has a non-empty value. 6852 // This may be used to include null fields in Patch requests. 6853 NullFields []string `json:"-"` 6854} 6855 6856func (s *TemplateMetadata) MarshalJSON() ([]byte, error) { 6857 type NoMethod TemplateMetadata 6858 raw := NoMethod(*s) 6859 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6860} 6861 6862// TopologyConfig: Global topology of the streaming Dataflow job, 6863// including all computations and their sharded locations. 6864type TopologyConfig struct { 6865 // Computations: The computations associated with a streaming Dataflow 6866 // job. 6867 Computations []*ComputationTopology `json:"computations,omitempty"` 6868 6869 // DataDiskAssignments: The disks assigned to a streaming Dataflow job. 6870 DataDiskAssignments []*DataDiskAssignment `json:"dataDiskAssignments,omitempty"` 6871 6872 // ForwardingKeyBits: The size (in bits) of keys that will be assigned 6873 // to source messages. 6874 ForwardingKeyBits int64 `json:"forwardingKeyBits,omitempty"` 6875 6876 // PersistentStateVersion: Version number for persistent state. 6877 PersistentStateVersion int64 `json:"persistentStateVersion,omitempty"` 6878 6879 // UserStageToComputationNameMap: Maps user stage names to stable 6880 // computation names. 6881 UserStageToComputationNameMap map[string]string `json:"userStageToComputationNameMap,omitempty"` 6882 6883 // ForceSendFields is a list of field names (e.g. "Computations") to 6884 // unconditionally include in API requests. By default, fields with 6885 // empty values are omitted from API requests. However, any non-pointer, 6886 // non-interface field appearing in ForceSendFields will be sent to the 6887 // server regardless of whether the field is empty or not. This may be 6888 // used to include empty fields in Patch requests. 6889 ForceSendFields []string `json:"-"` 6890 6891 // NullFields is a list of field names (e.g. "Computations") to include 6892 // in API requests with the JSON null value. By default, fields with 6893 // empty values are omitted from API requests. However, any field with 6894 // an empty value appearing in NullFields will be sent to the server as 6895 // null. It is an error if a field in this list has a non-empty value. 6896 // This may be used to include null fields in Patch requests. 6897 NullFields []string `json:"-"` 6898} 6899 6900func (s *TopologyConfig) MarshalJSON() ([]byte, error) { 6901 type NoMethod TopologyConfig 6902 raw := NoMethod(*s) 6903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6904} 6905 6906// TransformSummary: Description of the type, names/ids, and 6907// input/outputs for a transform. 6908type TransformSummary struct { 6909 // DisplayData: Transform-specific display data. 6910 DisplayData []*DisplayData `json:"displayData,omitempty"` 6911 6912 // Id: SDK generated id of this transform instance. 6913 Id string `json:"id,omitempty"` 6914 6915 // InputCollectionName: User names for all collection inputs to this 6916 // transform. 6917 InputCollectionName []string `json:"inputCollectionName,omitempty"` 6918 6919 // Kind: Type of transform. 6920 // 6921 // Possible values: 6922 // "UNKNOWN_KIND" - Unrecognized transform type. 6923 // "PAR_DO_KIND" - ParDo transform. 6924 // "GROUP_BY_KEY_KIND" - Group By Key transform. 6925 // "FLATTEN_KIND" - Flatten transform. 6926 // "READ_KIND" - Read transform. 6927 // "WRITE_KIND" - Write transform. 6928 // "CONSTANT_KIND" - Constructs from a constant value, such as with 6929 // Create.of. 6930 // "SINGLETON_KIND" - Creates a Singleton view of a collection. 6931 // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as 6932 // part of a GroupByKey. 6933 Kind string `json:"kind,omitempty"` 6934 6935 // Name: User provided name for this transform instance. 6936 Name string `json:"name,omitempty"` 6937 6938 // OutputCollectionName: User names for all collection outputs to this 6939 // transform. 6940 OutputCollectionName []string `json:"outputCollectionName,omitempty"` 6941 6942 // ForceSendFields is a list of field names (e.g. "DisplayData") to 6943 // unconditionally include in API requests. By default, fields with 6944 // empty values are omitted from API requests. However, any non-pointer, 6945 // non-interface field appearing in ForceSendFields will be sent to the 6946 // server regardless of whether the field is empty or not. This may be 6947 // used to include empty fields in Patch requests. 6948 ForceSendFields []string `json:"-"` 6949 6950 // NullFields is a list of field names (e.g. "DisplayData") to include 6951 // in API requests with the JSON null value. By default, fields with 6952 // empty values are omitted from API requests. However, any field with 6953 // an empty value appearing in NullFields will be sent to the server as 6954 // null. It is an error if a field in this list has a non-empty value. 6955 // This may be used to include null fields in Patch requests. 6956 NullFields []string `json:"-"` 6957} 6958 6959func (s *TransformSummary) MarshalJSON() ([]byte, error) { 6960 type NoMethod TransformSummary 6961 raw := NoMethod(*s) 6962 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6963} 6964 6965// ValidateResponse: Response to the validation request. 6966type ValidateResponse struct { 6967 // ErrorMessage: Will be empty if validation succeeds. 6968 ErrorMessage string `json:"errorMessage,omitempty"` 6969 6970 // QueryInfo: Information about the validated query. Not defined if 6971 // validation fails. 6972 QueryInfo *QueryInfo `json:"queryInfo,omitempty"` 6973 6974 // ServerResponse contains the HTTP response code and headers from the 6975 // server. 6976 googleapi.ServerResponse `json:"-"` 6977 6978 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to 6979 // unconditionally include in API requests. By default, fields with 6980 // empty values are omitted from API requests. However, any non-pointer, 6981 // non-interface field appearing in ForceSendFields will be sent to the 6982 // server regardless of whether the field is empty or not. This may be 6983 // used to include empty fields in Patch requests. 6984 ForceSendFields []string `json:"-"` 6985 6986 // NullFields is a list of field names (e.g. "ErrorMessage") to include 6987 // in API requests with the JSON null value. By default, fields with 6988 // empty values are omitted from API requests. However, any field with 6989 // an empty value appearing in NullFields will be sent to the server as 6990 // null. It is an error if a field in this list has a non-empty value. 6991 // This may be used to include null fields in Patch requests. 6992 NullFields []string `json:"-"` 6993} 6994 6995func (s *ValidateResponse) MarshalJSON() ([]byte, error) { 6996 type NoMethod ValidateResponse 6997 raw := NoMethod(*s) 6998 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6999} 7000 7001// WorkItem: WorkItem represents basic information about a WorkItem to 7002// be executed in the cloud. 7003type WorkItem struct { 7004 // Configuration: Work item-specific configuration as an opaque blob. 7005 Configuration string `json:"configuration,omitempty"` 7006 7007 // Id: Identifies this WorkItem. 7008 Id int64 `json:"id,omitempty,string"` 7009 7010 // InitialReportIndex: The initial index to use when reporting the 7011 // status of the WorkItem. 7012 InitialReportIndex int64 `json:"initialReportIndex,omitempty,string"` 7013 7014 // JobId: Identifies the workflow job this WorkItem belongs to. 7015 JobId string `json:"jobId,omitempty"` 7016 7017 // LeaseExpireTime: Time when the lease on this Work will expire. 7018 LeaseExpireTime string `json:"leaseExpireTime,omitempty"` 7019 7020 // MapTask: Additional information for MapTask WorkItems. 7021 MapTask *MapTask `json:"mapTask,omitempty"` 7022 7023 // Packages: Any required packages that need to be fetched in order to 7024 // execute this WorkItem. 7025 Packages []*Package `json:"packages,omitempty"` 7026 7027 // ProjectId: Identifies the cloud project this WorkItem belongs to. 7028 ProjectId string `json:"projectId,omitempty"` 7029 7030 // ReportStatusInterval: Recommended reporting interval. 7031 ReportStatusInterval string `json:"reportStatusInterval,omitempty"` 7032 7033 // SeqMapTask: Additional information for SeqMapTask WorkItems. 7034 SeqMapTask *SeqMapTask `json:"seqMapTask,omitempty"` 7035 7036 // ShellTask: Additional information for ShellTask WorkItems. 7037 ShellTask *ShellTask `json:"shellTask,omitempty"` 7038 7039 // SourceOperationTask: Additional information for source operation 7040 // WorkItems. 7041 SourceOperationTask *SourceOperationRequest `json:"sourceOperationTask,omitempty"` 7042 7043 // StreamingComputationTask: Additional information for 7044 // StreamingComputationTask WorkItems. 7045 StreamingComputationTask *StreamingComputationTask `json:"streamingComputationTask,omitempty"` 7046 7047 // StreamingConfigTask: Additional information for StreamingConfigTask 7048 // WorkItems. 7049 StreamingConfigTask *StreamingConfigTask `json:"streamingConfigTask,omitempty"` 7050 7051 // StreamingSetupTask: Additional information for StreamingSetupTask 7052 // WorkItems. 7053 StreamingSetupTask *StreamingSetupTask `json:"streamingSetupTask,omitempty"` 7054 7055 // ForceSendFields is a list of field names (e.g. "Configuration") to 7056 // unconditionally include in API requests. By default, fields with 7057 // empty values are omitted from API requests. However, any non-pointer, 7058 // non-interface field appearing in ForceSendFields will be sent to the 7059 // server regardless of whether the field is empty or not. This may be 7060 // used to include empty fields in Patch requests. 7061 ForceSendFields []string `json:"-"` 7062 7063 // NullFields is a list of field names (e.g. "Configuration") to include 7064 // in API requests with the JSON null value. By default, fields with 7065 // empty values are omitted from API requests. However, any field with 7066 // an empty value appearing in NullFields will be sent to the server as 7067 // null. It is an error if a field in this list has a non-empty value. 7068 // This may be used to include null fields in Patch requests. 7069 NullFields []string `json:"-"` 7070} 7071 7072func (s *WorkItem) MarshalJSON() ([]byte, error) { 7073 type NoMethod WorkItem 7074 raw := NoMethod(*s) 7075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7076} 7077 7078// WorkItemDetails: Information about an individual work item execution. 7079type WorkItemDetails struct { 7080 // AttemptId: Attempt ID of this work item 7081 AttemptId string `json:"attemptId,omitempty"` 7082 7083 // EndTime: End time of this work item attempt. If the work item is 7084 // completed, this is the actual end time of the work item. Otherwise, 7085 // it is the predicted end time. 7086 EndTime string `json:"endTime,omitempty"` 7087 7088 // Metrics: Metrics for this work item. 7089 Metrics []*MetricUpdate `json:"metrics,omitempty"` 7090 7091 // Progress: Progress of this work item. 7092 Progress *ProgressTimeseries `json:"progress,omitempty"` 7093 7094 // StartTime: Start time of this work item attempt. 7095 StartTime string `json:"startTime,omitempty"` 7096 7097 // State: State of this work item. 7098 // 7099 // Possible values: 7100 // "EXECUTION_STATE_UNKNOWN" - The component state is unknown or 7101 // unspecified. 7102 // "EXECUTION_STATE_NOT_STARTED" - The component is not yet running. 7103 // "EXECUTION_STATE_RUNNING" - The component is currently running. 7104 // "EXECUTION_STATE_SUCCEEDED" - The component succeeded. 7105 // "EXECUTION_STATE_FAILED" - The component failed. 7106 // "EXECUTION_STATE_CANCELLED" - Execution of the component was 7107 // cancelled. 7108 State string `json:"state,omitempty"` 7109 7110 // TaskId: Name of this work item. 7111 TaskId string `json:"taskId,omitempty"` 7112 7113 // ForceSendFields is a list of field names (e.g. "AttemptId") to 7114 // unconditionally include in API requests. By default, fields with 7115 // empty values are omitted from API requests. However, any non-pointer, 7116 // non-interface field appearing in ForceSendFields will be sent to the 7117 // server regardless of whether the field is empty or not. This may be 7118 // used to include empty fields in Patch requests. 7119 ForceSendFields []string `json:"-"` 7120 7121 // NullFields is a list of field names (e.g. "AttemptId") to include in 7122 // API requests with the JSON null value. By default, fields with empty 7123 // values are omitted from API requests. However, any field with an 7124 // empty value appearing in NullFields will be sent to the server as 7125 // null. It is an error if a field in this list has a non-empty value. 7126 // This may be used to include null fields in Patch requests. 7127 NullFields []string `json:"-"` 7128} 7129 7130func (s *WorkItemDetails) MarshalJSON() ([]byte, error) { 7131 type NoMethod WorkItemDetails 7132 raw := NoMethod(*s) 7133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7134} 7135 7136// WorkItemServiceState: The Dataflow service's idea of the current 7137// state of a WorkItem being processed by a worker. 7138type WorkItemServiceState struct { 7139 // CompleteWorkStatus: If set, a request to complete the work item with 7140 // the given status. This will not be set to OK, unless supported by the 7141 // specific kind of WorkItem. It can be used for the backend to indicate 7142 // a WorkItem must terminate, e.g., for aborting work. 7143 CompleteWorkStatus *Status `json:"completeWorkStatus,omitempty"` 7144 7145 // HarnessData: Other data returned by the service, specific to the 7146 // particular worker harness. 7147 HarnessData googleapi.RawMessage `json:"harnessData,omitempty"` 7148 7149 // HotKeyDetection: A hot key is a symptom of poor data distribution in 7150 // which there are enough elements mapped to a single key to impact 7151 // pipeline performance. When present, this field includes metadata 7152 // associated with any hot key. 7153 HotKeyDetection *HotKeyDetection `json:"hotKeyDetection,omitempty"` 7154 7155 // LeaseExpireTime: Time at which the current lease will expire. 7156 LeaseExpireTime string `json:"leaseExpireTime,omitempty"` 7157 7158 // MetricShortId: The short ids that workers should use in subsequent 7159 // metric updates. Workers should strive to use short ids whenever 7160 // possible, but it is ok to request the short_id again if a worker lost 7161 // track of it (e.g. if the worker is recovering from a crash). NOTE: it 7162 // is possible that the response may have short ids for a subset of the 7163 // metrics. 7164 MetricShortId []*MetricShortId `json:"metricShortId,omitempty"` 7165 7166 // NextReportIndex: The index value to use for the next report sent by 7167 // the worker. Note: If the report call fails for whatever reason, the 7168 // worker should reuse this index for subsequent report attempts. 7169 NextReportIndex int64 `json:"nextReportIndex,omitempty,string"` 7170 7171 // ReportStatusInterval: New recommended reporting interval. 7172 ReportStatusInterval string `json:"reportStatusInterval,omitempty"` 7173 7174 // SplitRequest: The progress point in the WorkItem where the Dataflow 7175 // service suggests that the worker truncate the task. 7176 SplitRequest *ApproximateSplitRequest `json:"splitRequest,omitempty"` 7177 7178 // SuggestedStopPoint: DEPRECATED in favor of split_request. 7179 SuggestedStopPoint *ApproximateProgress `json:"suggestedStopPoint,omitempty"` 7180 7181 // SuggestedStopPosition: Obsolete, always empty. 7182 SuggestedStopPosition *Position `json:"suggestedStopPosition,omitempty"` 7183 7184 // ForceSendFields is a list of field names (e.g. "CompleteWorkStatus") 7185 // to unconditionally include in API requests. By default, fields with 7186 // empty values are omitted from API requests. However, any non-pointer, 7187 // non-interface field appearing in ForceSendFields will be sent to the 7188 // server regardless of whether the field is empty or not. This may be 7189 // used to include empty fields in Patch requests. 7190 ForceSendFields []string `json:"-"` 7191 7192 // NullFields is a list of field names (e.g. "CompleteWorkStatus") to 7193 // include in API requests with the JSON null value. By default, fields 7194 // with empty values are omitted from API requests. However, any field 7195 // with an empty value appearing in NullFields will be sent to the 7196 // server as null. It is an error if a field in this list has a 7197 // non-empty value. This may be used to include null fields in Patch 7198 // requests. 7199 NullFields []string `json:"-"` 7200} 7201 7202func (s *WorkItemServiceState) MarshalJSON() ([]byte, error) { 7203 type NoMethod WorkItemServiceState 7204 raw := NoMethod(*s) 7205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7206} 7207 7208// WorkItemStatus: Conveys a worker's progress through the work 7209// described by a WorkItem. 7210type WorkItemStatus struct { 7211 // Completed: True if the WorkItem was completed (successfully or 7212 // unsuccessfully). 7213 Completed bool `json:"completed,omitempty"` 7214 7215 // CounterUpdates: Worker output counters for this WorkItem. 7216 CounterUpdates []*CounterUpdate `json:"counterUpdates,omitempty"` 7217 7218 // DynamicSourceSplit: See documentation of stop_position. 7219 DynamicSourceSplit *DynamicSourceSplit `json:"dynamicSourceSplit,omitempty"` 7220 7221 // Errors: Specifies errors which occurred during processing. If errors 7222 // are provided, and completed = true, then the WorkItem is considered 7223 // to have failed. 7224 Errors []*Status `json:"errors,omitempty"` 7225 7226 // MetricUpdates: DEPRECATED in favor of counter_updates. 7227 MetricUpdates []*MetricUpdate `json:"metricUpdates,omitempty"` 7228 7229 // Progress: DEPRECATED in favor of reported_progress. 7230 Progress *ApproximateProgress `json:"progress,omitempty"` 7231 7232 // ReportIndex: The report index. When a WorkItem is leased, the lease 7233 // will contain an initial report index. When a WorkItem's status is 7234 // reported to the system, the report should be sent with that report 7235 // index, and the response will contain the index the worker should use 7236 // for the next report. Reports received with unexpected index values 7237 // will be rejected by the service. In order to preserve idempotency, 7238 // the worker should not alter the contents of a report, even if the 7239 // worker must submit the same report multiple times before getting back 7240 // a response. The worker should not submit a subsequent report until 7241 // the response for the previous report had been received from the 7242 // service. 7243 ReportIndex int64 `json:"reportIndex,omitempty,string"` 7244 7245 // ReportedProgress: The worker's progress through this WorkItem. 7246 ReportedProgress *ApproximateReportedProgress `json:"reportedProgress,omitempty"` 7247 7248 // RequestedLeaseDuration: Amount of time the worker requests for its 7249 // lease. 7250 RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` 7251 7252 // SourceFork: DEPRECATED in favor of dynamic_source_split. 7253 SourceFork *SourceFork `json:"sourceFork,omitempty"` 7254 7255 // SourceOperationResponse: If the work item represented a 7256 // SourceOperationRequest, and the work is completed, contains the 7257 // result of the operation. 7258 SourceOperationResponse *SourceOperationResponse `json:"sourceOperationResponse,omitempty"` 7259 7260 // StopPosition: A worker may split an active map task in two parts, 7261 // "primary" and "residual", continuing to process the primary part and 7262 // returning the residual part into the pool of available work. This 7263 // event is called a "dynamic split" and is critical to the dynamic work 7264 // rebalancing feature. The two obtained sub-tasks are called "parts" of 7265 // the split. The parts, if concatenated, must represent the same input 7266 // as would be read by the current task if the split did not happen. The 7267 // exact way in which the original task is decomposed into the two parts 7268 // is specified either as a position demarcating them (stop_position), 7269 // or explicitly as two DerivedSources, if this task consumes a 7270 // user-defined source type (dynamic_source_split). The "current" task 7271 // is adjusted as a result of the split: after a task with range [A, B) 7272 // sends a stop_position update at C, its range is considered to be [A, 7273 // C), e.g.: * Progress should be interpreted relative to the new range, 7274 // e.g. "75% completed" means "75% of [A, C) completed" * The worker 7275 // should interpret proposed_stop_position relative to the new range, 7276 // e.g. "split at 68%" should be interpreted as "split at 68% of [A, 7277 // C)". * If the worker chooses to split again using stop_position, only 7278 // stop_positions in [A, C) will be accepted. * Etc. 7279 // dynamic_source_split has similar semantics: e.g., if a task with 7280 // source S splits using dynamic_source_split into {P, R} (where P and R 7281 // must be together equivalent to S), then subsequent progress and 7282 // proposed_stop_position should be interpreted relative to P, and in a 7283 // potential subsequent dynamic_source_split into {P', R'}, P' and R' 7284 // must be together equivalent to P, etc. 7285 StopPosition *Position `json:"stopPosition,omitempty"` 7286 7287 // TotalThrottlerWaitTimeSeconds: Total time the worker spent being 7288 // throttled by external systems. 7289 TotalThrottlerWaitTimeSeconds float64 `json:"totalThrottlerWaitTimeSeconds,omitempty"` 7290 7291 // WorkItemId: Identifies the WorkItem. 7292 WorkItemId string `json:"workItemId,omitempty"` 7293 7294 // ForceSendFields is a list of field names (e.g. "Completed") to 7295 // unconditionally include in API requests. By default, fields with 7296 // empty values are omitted from API requests. However, any non-pointer, 7297 // non-interface field appearing in ForceSendFields will be sent to the 7298 // server regardless of whether the field is empty or not. This may be 7299 // used to include empty fields in Patch requests. 7300 ForceSendFields []string `json:"-"` 7301 7302 // NullFields is a list of field names (e.g. "Completed") to include in 7303 // API requests with the JSON null value. By default, fields with empty 7304 // values are omitted from API requests. However, any field with an 7305 // empty value appearing in NullFields will be sent to the server as 7306 // null. It is an error if a field in this list has a non-empty value. 7307 // This may be used to include null fields in Patch requests. 7308 NullFields []string `json:"-"` 7309} 7310 7311func (s *WorkItemStatus) MarshalJSON() ([]byte, error) { 7312 type NoMethod WorkItemStatus 7313 raw := NoMethod(*s) 7314 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7315} 7316 7317func (s *WorkItemStatus) UnmarshalJSON(data []byte) error { 7318 type NoMethod WorkItemStatus 7319 var s1 struct { 7320 TotalThrottlerWaitTimeSeconds gensupport.JSONFloat64 `json:"totalThrottlerWaitTimeSeconds"` 7321 *NoMethod 7322 } 7323 s1.NoMethod = (*NoMethod)(s) 7324 if err := json.Unmarshal(data, &s1); err != nil { 7325 return err 7326 } 7327 s.TotalThrottlerWaitTimeSeconds = float64(s1.TotalThrottlerWaitTimeSeconds) 7328 return nil 7329} 7330 7331// WorkerDetails: Information about a worker 7332type WorkerDetails struct { 7333 // WorkItems: Work items processed by this worker, sorted by time. 7334 WorkItems []*WorkItemDetails `json:"workItems,omitempty"` 7335 7336 // WorkerName: Name of this worker 7337 WorkerName string `json:"workerName,omitempty"` 7338 7339 // ForceSendFields is a list of field names (e.g. "WorkItems") to 7340 // unconditionally include in API requests. By default, fields with 7341 // empty values are omitted from API requests. However, any non-pointer, 7342 // non-interface field appearing in ForceSendFields will be sent to the 7343 // server regardless of whether the field is empty or not. This may be 7344 // used to include empty fields in Patch requests. 7345 ForceSendFields []string `json:"-"` 7346 7347 // NullFields is a list of field names (e.g. "WorkItems") to include in 7348 // API requests with the JSON null value. By default, fields with empty 7349 // values are omitted from API requests. However, any field with an 7350 // empty value appearing in NullFields will be sent to the server as 7351 // null. It is an error if a field in this list has a non-empty value. 7352 // This may be used to include null fields in Patch requests. 7353 NullFields []string `json:"-"` 7354} 7355 7356func (s *WorkerDetails) MarshalJSON() ([]byte, error) { 7357 type NoMethod WorkerDetails 7358 raw := NoMethod(*s) 7359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7360} 7361 7362// WorkerHealthReport: WorkerHealthReport contains information about the 7363// health of a worker. The VM should be identified by the labels 7364// attached to the WorkerMessage that this health ping belongs to. 7365type WorkerHealthReport struct { 7366 // Msg: Message describing any unusual health reports. 7367 Msg string `json:"msg,omitempty"` 7368 7369 // Pods: The pods running on the worker. See: 7370 // http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod 7371 // This field is used by the worker to send the status of the indvidual 7372 // containers running on each worker. 7373 Pods []googleapi.RawMessage `json:"pods,omitempty"` 7374 7375 // ReportInterval: The interval at which the worker is sending health 7376 // reports. The default value of 0 should be interpreted as the field is 7377 // not being explicitly set by the worker. 7378 ReportInterval string `json:"reportInterval,omitempty"` 7379 7380 // VmBrokenCode: Code to describe a specific reason, if known, that a VM 7381 // has reported broken state. 7382 VmBrokenCode string `json:"vmBrokenCode,omitempty"` 7383 7384 // VmIsBroken: Whether the VM is in a permanently broken state. Broken 7385 // VMs should be abandoned or deleted ASAP to avoid assigning or 7386 // completing any work. 7387 VmIsBroken bool `json:"vmIsBroken,omitempty"` 7388 7389 // VmIsHealthy: Whether the VM is currently healthy. 7390 VmIsHealthy bool `json:"vmIsHealthy,omitempty"` 7391 7392 // VmStartupTime: The time the VM was booted. 7393 VmStartupTime string `json:"vmStartupTime,omitempty"` 7394 7395 // ForceSendFields is a list of field names (e.g. "Msg") to 7396 // unconditionally include in API requests. By default, fields with 7397 // empty values are omitted from API requests. However, any non-pointer, 7398 // non-interface field appearing in ForceSendFields will be sent to the 7399 // server regardless of whether the field is empty or not. This may be 7400 // used to include empty fields in Patch requests. 7401 ForceSendFields []string `json:"-"` 7402 7403 // NullFields is a list of field names (e.g. "Msg") to include in API 7404 // requests with the JSON null value. By default, fields with empty 7405 // values are omitted from API requests. However, any field with an 7406 // empty value appearing in NullFields will be sent to the server as 7407 // null. It is an error if a field in this list has a non-empty value. 7408 // This may be used to include null fields in Patch requests. 7409 NullFields []string `json:"-"` 7410} 7411 7412func (s *WorkerHealthReport) MarshalJSON() ([]byte, error) { 7413 type NoMethod WorkerHealthReport 7414 raw := NoMethod(*s) 7415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7416} 7417 7418// WorkerHealthReportResponse: WorkerHealthReportResponse contains 7419// information returned to the worker in response to a health ping. 7420type WorkerHealthReportResponse struct { 7421 // ReportInterval: A positive value indicates the worker should change 7422 // its reporting interval to the specified value. The default value of 7423 // zero means no change in report rate is requested by the server. 7424 ReportInterval string `json:"reportInterval,omitempty"` 7425 7426 // ForceSendFields is a list of field names (e.g. "ReportInterval") to 7427 // unconditionally include in API requests. By default, fields with 7428 // empty values are omitted from API requests. However, any non-pointer, 7429 // non-interface field appearing in ForceSendFields will be sent to the 7430 // server regardless of whether the field is empty or not. This may be 7431 // used to include empty fields in Patch requests. 7432 ForceSendFields []string `json:"-"` 7433 7434 // NullFields is a list of field names (e.g. "ReportInterval") to 7435 // include in API requests with the JSON null value. By default, fields 7436 // with empty values are omitted from API requests. However, any field 7437 // with an empty value appearing in NullFields will be sent to the 7438 // server as null. It is an error if a field in this list has a 7439 // non-empty value. This may be used to include null fields in Patch 7440 // requests. 7441 NullFields []string `json:"-"` 7442} 7443 7444func (s *WorkerHealthReportResponse) MarshalJSON() ([]byte, error) { 7445 type NoMethod WorkerHealthReportResponse 7446 raw := NoMethod(*s) 7447 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7448} 7449 7450// WorkerLifecycleEvent: A report of an event in a worker's lifecycle. 7451// The proto contains one event, because the worker is expected to 7452// asynchronously send each message immediately after the event. Due to 7453// this asynchrony, messages may arrive out of order (or missing), and 7454// it is up to the consumer to interpret. The timestamp of the event is 7455// in the enclosing WorkerMessage proto. 7456type WorkerLifecycleEvent struct { 7457 // ContainerStartTime: The start time of this container. All events will 7458 // report this so that events can be grouped together across 7459 // container/VM restarts. 7460 ContainerStartTime string `json:"containerStartTime,omitempty"` 7461 7462 // Event: The event being reported. 7463 // 7464 // Possible values: 7465 // "UNKNOWN_EVENT" - Invalid event. 7466 // "OS_START" - The time the VM started. 7467 // "CONTAINER_START" - Our container code starts running. Multiple 7468 // containers could be distinguished with WorkerMessage.labels if 7469 // desired. 7470 // "NETWORK_UP" - The worker has a functional external network 7471 // connection. 7472 // "STAGING_FILES_DOWNLOAD_START" - Started downloading staging files. 7473 // "STAGING_FILES_DOWNLOAD_FINISH" - Finished downloading all staging 7474 // files. 7475 // "SDK_INSTALL_START" - For applicable SDKs, started installation of 7476 // SDK and worker packages. 7477 // "SDK_INSTALL_FINISH" - Finished installing SDK. 7478 Event string `json:"event,omitempty"` 7479 7480 // Metadata: Other stats that can accompany an event. E.g. { 7481 // "downloaded_bytes" : "123456" } 7482 Metadata map[string]string `json:"metadata,omitempty"` 7483 7484 // ForceSendFields is a list of field names (e.g. "ContainerStartTime") 7485 // to unconditionally include in API requests. By default, fields with 7486 // empty values are omitted from API requests. However, any non-pointer, 7487 // non-interface field appearing in ForceSendFields will be sent to the 7488 // server regardless of whether the field is empty or not. This may be 7489 // used to include empty fields in Patch requests. 7490 ForceSendFields []string `json:"-"` 7491 7492 // NullFields is a list of field names (e.g. "ContainerStartTime") to 7493 // include in API requests with the JSON null value. By default, fields 7494 // with empty values are omitted from API requests. However, any field 7495 // with an empty value appearing in NullFields will be sent to the 7496 // server as null. It is an error if a field in this list has a 7497 // non-empty value. This may be used to include null fields in Patch 7498 // requests. 7499 NullFields []string `json:"-"` 7500} 7501 7502func (s *WorkerLifecycleEvent) MarshalJSON() ([]byte, error) { 7503 type NoMethod WorkerLifecycleEvent 7504 raw := NoMethod(*s) 7505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7506} 7507 7508// WorkerMessage: WorkerMessage provides information to the backend 7509// about a worker. 7510type WorkerMessage struct { 7511 // Labels: Labels are used to group WorkerMessages. For example, a 7512 // worker_message about a particular container might have the labels: { 7513 // "JOB_ID": "2015-04-22", "WORKER_ID": "wordcount-vm-2015…" 7514 // "CONTAINER_TYPE": "worker", "CONTAINER_ID": "ac1234def"} Label tags 7515 // typically correspond to Label enum values. However, for ease of 7516 // development other strings can be used as tags. LABEL_UNSPECIFIED 7517 // should not be used here. 7518 Labels map[string]string `json:"labels,omitempty"` 7519 7520 // Time: The timestamp of the worker_message. 7521 Time string `json:"time,omitempty"` 7522 7523 // WorkerHealthReport: The health of a worker. 7524 WorkerHealthReport *WorkerHealthReport `json:"workerHealthReport,omitempty"` 7525 7526 // WorkerLifecycleEvent: Record of worker lifecycle events. 7527 WorkerLifecycleEvent *WorkerLifecycleEvent `json:"workerLifecycleEvent,omitempty"` 7528 7529 // WorkerMessageCode: A worker message code. 7530 WorkerMessageCode *WorkerMessageCode `json:"workerMessageCode,omitempty"` 7531 7532 // WorkerMetrics: Resource metrics reported by workers. 7533 WorkerMetrics *ResourceUtilizationReport `json:"workerMetrics,omitempty"` 7534 7535 // WorkerShutdownNotice: Shutdown notice by workers. 7536 WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,omitempty"` 7537 7538 // ForceSendFields is a list of field names (e.g. "Labels") to 7539 // unconditionally include in API requests. By default, fields with 7540 // empty values are omitted from API requests. However, any non-pointer, 7541 // non-interface field appearing in ForceSendFields will be sent to the 7542 // server regardless of whether the field is empty or not. This may be 7543 // used to include empty fields in Patch requests. 7544 ForceSendFields []string `json:"-"` 7545 7546 // NullFields is a list of field names (e.g. "Labels") to include in API 7547 // requests with the JSON null value. By default, fields with empty 7548 // values are omitted from API requests. However, any field with an 7549 // empty value appearing in NullFields will be sent to the server as 7550 // null. It is an error if a field in this list has a non-empty value. 7551 // This may be used to include null fields in Patch requests. 7552 NullFields []string `json:"-"` 7553} 7554 7555func (s *WorkerMessage) MarshalJSON() ([]byte, error) { 7556 type NoMethod WorkerMessage 7557 raw := NoMethod(*s) 7558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7559} 7560 7561// WorkerMessageCode: A message code is used to report status and error 7562// messages to the service. The message codes are intended to be machine 7563// readable. The service will take care of translating these into user 7564// understandable messages if necessary. Example use cases: 1. Worker 7565// processes reporting successful startup. 2. Worker processes reporting 7566// specific errors (e.g. package staging failure). 7567type WorkerMessageCode struct { 7568 // Code: The code is a string intended for consumption by a machine that 7569 // identifies the type of message being sent. Examples: 1. 7570 // "HARNESS_STARTED" might be used to indicate the worker harness has 7571 // started. 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error 7572 // downloading a Cloud Storage file as part of the boot process of one 7573 // of the worker containers. This is a string and not an enum to make it 7574 // easy to add new codes without waiting for an API change. 7575 Code string `json:"code,omitempty"` 7576 7577 // Parameters: Parameters contains specific information about the code. 7578 // This is a struct to allow parameters of different types. Examples: 1. 7579 // For a "HARNESS_STARTED" message parameters might provide the name of 7580 // the worker and additional data like timing information. 2. For a 7581 // "GCS_DOWNLOAD_ERROR" parameters might contain fields listing the 7582 // Cloud Storage objects being downloaded and fields containing errors. 7583 // In general complex data structures should be avoided. If a worker 7584 // needs to send a specific and complicated data structure then please 7585 // consider defining a new proto and adding it to the data oneof in 7586 // WorkerMessageResponse. Conventions: Parameters should only be used 7587 // for information that isn't typically passed as a label. hostname and 7588 // other worker identifiers should almost always be passed as labels 7589 // since they will be included on most messages. 7590 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 7591 7592 // ForceSendFields is a list of field names (e.g. "Code") to 7593 // unconditionally include in API requests. By default, fields with 7594 // empty values are omitted from API requests. However, any non-pointer, 7595 // non-interface field appearing in ForceSendFields will be sent to the 7596 // server regardless of whether the field is empty or not. This may be 7597 // used to include empty fields in Patch requests. 7598 ForceSendFields []string `json:"-"` 7599 7600 // NullFields is a list of field names (e.g. "Code") to include in API 7601 // requests with the JSON null value. By default, fields with empty 7602 // values are omitted from API requests. However, any field with an 7603 // empty value appearing in NullFields will be sent to the server as 7604 // null. It is an error if a field in this list has a non-empty value. 7605 // This may be used to include null fields in Patch requests. 7606 NullFields []string `json:"-"` 7607} 7608 7609func (s *WorkerMessageCode) MarshalJSON() ([]byte, error) { 7610 type NoMethod WorkerMessageCode 7611 raw := NoMethod(*s) 7612 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7613} 7614 7615// WorkerMessageResponse: A worker_message response allows the server to 7616// pass information to the sender. 7617type WorkerMessageResponse struct { 7618 // WorkerHealthReportResponse: The service's response to a worker's 7619 // health report. 7620 WorkerHealthReportResponse *WorkerHealthReportResponse `json:"workerHealthReportResponse,omitempty"` 7621 7622 // WorkerMetricsResponse: Service's response to reporting worker metrics 7623 // (currently empty). 7624 WorkerMetricsResponse *ResourceUtilizationReportResponse `json:"workerMetricsResponse,omitempty"` 7625 7626 // WorkerShutdownNoticeResponse: Service's response to shutdown notice 7627 // (currently empty). 7628 WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"` 7629 7630 // ForceSendFields is a list of field names (e.g. 7631 // "WorkerHealthReportResponse") to unconditionally include in API 7632 // requests. By default, fields with empty values are omitted from API 7633 // requests. However, any non-pointer, non-interface field appearing in 7634 // ForceSendFields will be sent to the server regardless of whether the 7635 // field is empty or not. This may be used to include empty fields in 7636 // Patch requests. 7637 ForceSendFields []string `json:"-"` 7638 7639 // NullFields is a list of field names (e.g. 7640 // "WorkerHealthReportResponse") to include in API requests with the 7641 // JSON null value. By default, fields with empty values are omitted 7642 // from API requests. However, any field with an empty value appearing 7643 // in NullFields will be sent to the server as null. It is an error if a 7644 // field in this list has a non-empty value. This may be used to include 7645 // null fields in Patch requests. 7646 NullFields []string `json:"-"` 7647} 7648 7649func (s *WorkerMessageResponse) MarshalJSON() ([]byte, error) { 7650 type NoMethod WorkerMessageResponse 7651 raw := NoMethod(*s) 7652 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7653} 7654 7655// WorkerPool: Describes one particular pool of Cloud Dataflow workers 7656// to be instantiated by the Cloud Dataflow service in order to perform 7657// the computations required by a job. Note that a workflow job may use 7658// multiple pools, in order to match the various computational 7659// requirements of the various stages of the job. 7660type WorkerPool struct { 7661 // AutoscalingSettings: Settings for autoscaling of this WorkerPool. 7662 AutoscalingSettings *AutoscalingSettings `json:"autoscalingSettings,omitempty"` 7663 7664 // DataDisks: Data disks that are used by a VM in this workflow. 7665 DataDisks []*Disk `json:"dataDisks,omitempty"` 7666 7667 // DefaultPackageSet: The default package set to install. This allows 7668 // the service to select a default set of packages which are useful to 7669 // worker harnesses written in a particular language. 7670 // 7671 // Possible values: 7672 // "DEFAULT_PACKAGE_SET_UNKNOWN" - The default set of packages to 7673 // stage is unknown, or unspecified. 7674 // "DEFAULT_PACKAGE_SET_NONE" - Indicates that no packages should be 7675 // staged at the worker unless explicitly specified by the job. 7676 // "DEFAULT_PACKAGE_SET_JAVA" - Stage packages typically useful to 7677 // workers written in Java. 7678 // "DEFAULT_PACKAGE_SET_PYTHON" - Stage pacakges typically useful to 7679 // workers written in Python. 7680 DefaultPackageSet string `json:"defaultPackageSet,omitempty"` 7681 7682 // DiskSizeGb: Size of root disk for VMs, in GB. If zero or unspecified, 7683 // the service will attempt to choose a reasonable default. 7684 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 7685 7686 // DiskSourceImage: Fully qualified source image for disks. 7687 DiskSourceImage string `json:"diskSourceImage,omitempty"` 7688 7689 // DiskType: Type of root disk for VMs. If empty or unspecified, the 7690 // service will attempt to choose a reasonable default. 7691 DiskType string `json:"diskType,omitempty"` 7692 7693 // IpConfiguration: Configuration for VM IPs. 7694 // 7695 // Possible values: 7696 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or 7697 // unspecified. 7698 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 7699 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 7700 IpConfiguration string `json:"ipConfiguration,omitempty"` 7701 7702 // Kind: The kind of the worker pool; currently only `harness` and 7703 // `shuffle` are supported. 7704 Kind string `json:"kind,omitempty"` 7705 7706 // MachineType: Machine type (e.g. "n1-standard-1"). If empty or 7707 // unspecified, the service will attempt to choose a reasonable default. 7708 MachineType string `json:"machineType,omitempty"` 7709 7710 // Metadata: Metadata to set on the Google Compute Engine VMs. 7711 Metadata map[string]string `json:"metadata,omitempty"` 7712 7713 // Network: Network to which VMs will be assigned. If empty or 7714 // unspecified, the service will use the network "default". 7715 Network string `json:"network,omitempty"` 7716 7717 // NumThreadsPerWorker: The number of threads per worker harness. If 7718 // empty or unspecified, the service will choose a number of threads 7719 // (according to the number of cores on the selected machine type for 7720 // batch, or 1 by convention for streaming). 7721 NumThreadsPerWorker int64 `json:"numThreadsPerWorker,omitempty"` 7722 7723 // NumWorkers: Number of Google Compute Engine workers in this pool 7724 // needed to execute the job. If zero or unspecified, the service will 7725 // attempt to choose a reasonable default. 7726 NumWorkers int64 `json:"numWorkers,omitempty"` 7727 7728 // OnHostMaintenance: The action to take on host maintenance, as defined 7729 // by the Google Compute Engine API. 7730 OnHostMaintenance string `json:"onHostMaintenance,omitempty"` 7731 7732 // Packages: Packages to be installed on workers. 7733 Packages []*Package `json:"packages,omitempty"` 7734 7735 // PoolArgs: Extra arguments for this worker pool. 7736 PoolArgs googleapi.RawMessage `json:"poolArgs,omitempty"` 7737 7738 // SdkHarnessContainerImages: Set of SDK harness containers needed to 7739 // execute this pipeline. This will only be set in the Fn API path. For 7740 // non-cross-language pipelines this should have only one entry. 7741 // Cross-language pipelines will have two or more entries. 7742 SdkHarnessContainerImages []*SdkHarnessContainerImage `json:"sdkHarnessContainerImages,omitempty"` 7743 7744 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. 7745 // Expected to be of the form "regions/REGION/subnetworks/SUBNETWORK". 7746 Subnetwork string `json:"subnetwork,omitempty"` 7747 7748 // TaskrunnerSettings: Settings passed through to Google Compute Engine 7749 // workers when using the standard Dataflow task runner. Users should 7750 // ignore this field. 7751 TaskrunnerSettings *TaskRunnerSettings `json:"taskrunnerSettings,omitempty"` 7752 7753 // TeardownPolicy: Sets the policy for determining when to turndown 7754 // worker pool. Allowed values are: `TEARDOWN_ALWAYS`, 7755 // `TEARDOWN_ON_SUCCESS`, and `TEARDOWN_NEVER`. `TEARDOWN_ALWAYS` means 7756 // workers are always torn down regardless of whether the job succeeds. 7757 // `TEARDOWN_ON_SUCCESS` means workers are torn down if the job 7758 // succeeds. `TEARDOWN_NEVER` means the workers are never torn down. If 7759 // the workers are not torn down by the service, they will continue to 7760 // run and use Google Compute Engine VM resources in the user's project 7761 // until they are explicitly terminated by the user. Because of this, 7762 // Google recommends using the `TEARDOWN_ALWAYS` policy except for 7763 // small, manually supervised test jobs. If unknown or unspecified, the 7764 // service will attempt to choose a reasonable default. 7765 // 7766 // Possible values: 7767 // "TEARDOWN_POLICY_UNKNOWN" - The teardown policy isn't specified, or 7768 // is unknown. 7769 // "TEARDOWN_ALWAYS" - Always teardown the resource. 7770 // "TEARDOWN_ON_SUCCESS" - Teardown the resource on success. This is 7771 // useful for debugging failures. 7772 // "TEARDOWN_NEVER" - Never teardown the resource. This is useful for 7773 // debugging and development. 7774 TeardownPolicy string `json:"teardownPolicy,omitempty"` 7775 7776 // WorkerHarnessContainerImage: Required. Docker container image that 7777 // executes the Cloud Dataflow worker harness, residing in Google 7778 // Container Registry. Deprecated for the Fn API path. Use 7779 // sdk_harness_container_images instead. 7780 WorkerHarnessContainerImage string `json:"workerHarnessContainerImage,omitempty"` 7781 7782 // Zone: Zone to run the worker pools in. If empty or unspecified, the 7783 // service will attempt to choose a reasonable default. 7784 Zone string `json:"zone,omitempty"` 7785 7786 // ForceSendFields is a list of field names (e.g. "AutoscalingSettings") 7787 // to unconditionally include in API requests. By default, fields with 7788 // empty values are omitted from API requests. However, any non-pointer, 7789 // non-interface field appearing in ForceSendFields will be sent to the 7790 // server regardless of whether the field is empty or not. This may be 7791 // used to include empty fields in Patch requests. 7792 ForceSendFields []string `json:"-"` 7793 7794 // NullFields is a list of field names (e.g. "AutoscalingSettings") to 7795 // include in API requests with the JSON null value. By default, fields 7796 // with empty values are omitted from API requests. However, any field 7797 // with an empty value appearing in NullFields will be sent to the 7798 // server as null. It is an error if a field in this list has a 7799 // non-empty value. This may be used to include null fields in Patch 7800 // requests. 7801 NullFields []string `json:"-"` 7802} 7803 7804func (s *WorkerPool) MarshalJSON() ([]byte, error) { 7805 type NoMethod WorkerPool 7806 raw := NoMethod(*s) 7807 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7808} 7809 7810// WorkerSettings: Provides data to pass through to the worker harness. 7811type WorkerSettings struct { 7812 // BaseUrl: The base URL for accessing Google Cloud APIs. When workers 7813 // access Google Cloud APIs, they logically do so via relative URLs. If 7814 // this field is specified, it supplies the base URL to use for 7815 // resolving these relative URLs. The normative algorithm used is 7816 // defined by RFC 1808, "Relative Uniform Resource Locators". If not 7817 // specified, the default value is "http://www.googleapis.com/" 7818 BaseUrl string `json:"baseUrl,omitempty"` 7819 7820 // ReportingEnabled: Whether to send work progress updates to the 7821 // service. 7822 ReportingEnabled bool `json:"reportingEnabled,omitempty"` 7823 7824 // ServicePath: The Cloud Dataflow service path relative to the root 7825 // URL, for example, "dataflow/v1b3/projects". 7826 ServicePath string `json:"servicePath,omitempty"` 7827 7828 // ShuffleServicePath: The Shuffle service path relative to the root 7829 // URL, for example, "shuffle/v1beta1". 7830 ShuffleServicePath string `json:"shuffleServicePath,omitempty"` 7831 7832 // TempStoragePrefix: The prefix of the resources the system should use 7833 // for temporary storage. The supported resource type is: Google Cloud 7834 // Storage: storage.googleapis.com/{bucket}/{object} 7835 // bucket.storage.googleapis.com/{object} 7836 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 7837 7838 // WorkerId: The ID of the worker running this pipeline. 7839 WorkerId string `json:"workerId,omitempty"` 7840 7841 // ForceSendFields is a list of field names (e.g. "BaseUrl") to 7842 // unconditionally include in API requests. By default, fields with 7843 // empty values are omitted from API requests. However, any non-pointer, 7844 // non-interface field appearing in ForceSendFields will be sent to the 7845 // server regardless of whether the field is empty or not. This may be 7846 // used to include empty fields in Patch requests. 7847 ForceSendFields []string `json:"-"` 7848 7849 // NullFields is a list of field names (e.g. "BaseUrl") to include in 7850 // API requests with the JSON null value. By default, fields with empty 7851 // values are omitted from API requests. However, any field with an 7852 // empty value appearing in NullFields will be sent to the server as 7853 // null. It is an error if a field in this list has a non-empty value. 7854 // This may be used to include null fields in Patch requests. 7855 NullFields []string `json:"-"` 7856} 7857 7858func (s *WorkerSettings) MarshalJSON() ([]byte, error) { 7859 type NoMethod WorkerSettings 7860 raw := NoMethod(*s) 7861 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7862} 7863 7864// WorkerShutdownNotice: Shutdown notification from workers. This is to 7865// be sent by the shutdown script of the worker VM so that the backend 7866// knows that the VM is being shut down. 7867type WorkerShutdownNotice struct { 7868 // Reason: The reason for the worker shutdown. Current possible values 7869 // are: "UNKNOWN": shutdown reason is unknown. "PREEMPTION": shutdown 7870 // reason is preemption. Other possible reasons may be added in the 7871 // future. 7872 Reason string `json:"reason,omitempty"` 7873 7874 // ForceSendFields is a list of field names (e.g. "Reason") to 7875 // unconditionally include in API requests. By default, fields with 7876 // empty values are omitted from API requests. However, any non-pointer, 7877 // non-interface field appearing in ForceSendFields will be sent to the 7878 // server regardless of whether the field is empty or not. This may be 7879 // used to include empty fields in Patch requests. 7880 ForceSendFields []string `json:"-"` 7881 7882 // NullFields is a list of field names (e.g. "Reason") to include in API 7883 // requests with the JSON null value. By default, fields with empty 7884 // values are omitted from API requests. However, any field with an 7885 // empty value appearing in NullFields will be sent to the server as 7886 // null. It is an error if a field in this list has a non-empty value. 7887 // This may be used to include null fields in Patch requests. 7888 NullFields []string `json:"-"` 7889} 7890 7891func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) { 7892 type NoMethod WorkerShutdownNotice 7893 raw := NoMethod(*s) 7894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7895} 7896 7897// WorkerShutdownNoticeResponse: Service-side response to WorkerMessage 7898// issuing shutdown notice. 7899type WorkerShutdownNoticeResponse struct { 7900} 7901 7902// WriteInstruction: An instruction that writes records. Takes one 7903// input, produces no outputs. 7904type WriteInstruction struct { 7905 // Input: The input. 7906 Input *InstructionInput `json:"input,omitempty"` 7907 7908 // Sink: The sink to write to. 7909 Sink *Sink `json:"sink,omitempty"` 7910 7911 // ForceSendFields is a list of field names (e.g. "Input") to 7912 // unconditionally include in API requests. By default, fields with 7913 // empty values are omitted from API requests. However, any non-pointer, 7914 // non-interface field appearing in ForceSendFields will be sent to the 7915 // server regardless of whether the field is empty or not. This may be 7916 // used to include empty fields in Patch requests. 7917 ForceSendFields []string `json:"-"` 7918 7919 // NullFields is a list of field names (e.g. "Input") to include in API 7920 // requests with the JSON null value. By default, fields with empty 7921 // values are omitted from API requests. However, any field with an 7922 // empty value appearing in NullFields will be sent to the server as 7923 // null. It is an error if a field in this list has a non-empty value. 7924 // This may be used to include null fields in Patch requests. 7925 NullFields []string `json:"-"` 7926} 7927 7928func (s *WriteInstruction) MarshalJSON() ([]byte, error) { 7929 type NoMethod WriteInstruction 7930 raw := NoMethod(*s) 7931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7932} 7933 7934// method id "dataflow.projects.deleteSnapshots": 7935 7936type ProjectsDeleteSnapshotsCall struct { 7937 s *Service 7938 projectId string 7939 urlParams_ gensupport.URLParams 7940 ctx_ context.Context 7941 header_ http.Header 7942} 7943 7944// DeleteSnapshots: Deletes a snapshot. 7945// 7946// - projectId: The ID of the Cloud Platform project that the snapshot 7947// belongs to. 7948func (r *ProjectsService) DeleteSnapshots(projectId string) *ProjectsDeleteSnapshotsCall { 7949 c := &ProjectsDeleteSnapshotsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7950 c.projectId = projectId 7951 return c 7952} 7953 7954// Location sets the optional parameter "location": The location that 7955// contains this snapshot. 7956func (c *ProjectsDeleteSnapshotsCall) Location(location string) *ProjectsDeleteSnapshotsCall { 7957 c.urlParams_.Set("location", location) 7958 return c 7959} 7960 7961// SnapshotId sets the optional parameter "snapshotId": The ID of the 7962// snapshot. 7963func (c *ProjectsDeleteSnapshotsCall) SnapshotId(snapshotId string) *ProjectsDeleteSnapshotsCall { 7964 c.urlParams_.Set("snapshotId", snapshotId) 7965 return c 7966} 7967 7968// Fields allows partial responses to be retrieved. See 7969// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7970// for more information. 7971func (c *ProjectsDeleteSnapshotsCall) Fields(s ...googleapi.Field) *ProjectsDeleteSnapshotsCall { 7972 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7973 return c 7974} 7975 7976// Context sets the context to be used in this call's Do method. Any 7977// pending HTTP request will be aborted if the provided context is 7978// canceled. 7979func (c *ProjectsDeleteSnapshotsCall) Context(ctx context.Context) *ProjectsDeleteSnapshotsCall { 7980 c.ctx_ = ctx 7981 return c 7982} 7983 7984// Header returns an http.Header that can be modified by the caller to 7985// add HTTP headers to the request. 7986func (c *ProjectsDeleteSnapshotsCall) Header() http.Header { 7987 if c.header_ == nil { 7988 c.header_ = make(http.Header) 7989 } 7990 return c.header_ 7991} 7992 7993func (c *ProjectsDeleteSnapshotsCall) doRequest(alt string) (*http.Response, error) { 7994 reqHeaders := make(http.Header) 7995 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 7996 for k, v := range c.header_ { 7997 reqHeaders[k] = v 7998 } 7999 reqHeaders.Set("User-Agent", c.s.userAgent()) 8000 var body io.Reader = nil 8001 c.urlParams_.Set("alt", alt) 8002 c.urlParams_.Set("prettyPrint", "false") 8003 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/snapshots") 8004 urls += "?" + c.urlParams_.Encode() 8005 req, err := http.NewRequest("DELETE", urls, body) 8006 if err != nil { 8007 return nil, err 8008 } 8009 req.Header = reqHeaders 8010 googleapi.Expand(req.URL, map[string]string{ 8011 "projectId": c.projectId, 8012 }) 8013 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8014} 8015 8016// Do executes the "dataflow.projects.deleteSnapshots" call. 8017// Exactly one of *DeleteSnapshotResponse or error will be non-nil. Any 8018// non-2xx status code is an error. Response headers are in either 8019// *DeleteSnapshotResponse.ServerResponse.Header or (if a response was 8020// returned at all) in error.(*googleapi.Error).Header. Use 8021// googleapi.IsNotModified to check whether the returned error was 8022// because http.StatusNotModified was returned. 8023func (c *ProjectsDeleteSnapshotsCall) Do(opts ...googleapi.CallOption) (*DeleteSnapshotResponse, error) { 8024 gensupport.SetOptions(c.urlParams_, opts...) 8025 res, err := c.doRequest("json") 8026 if res != nil && res.StatusCode == http.StatusNotModified { 8027 if res.Body != nil { 8028 res.Body.Close() 8029 } 8030 return nil, &googleapi.Error{ 8031 Code: res.StatusCode, 8032 Header: res.Header, 8033 } 8034 } 8035 if err != nil { 8036 return nil, err 8037 } 8038 defer googleapi.CloseBody(res) 8039 if err := googleapi.CheckResponse(res); err != nil { 8040 return nil, err 8041 } 8042 ret := &DeleteSnapshotResponse{ 8043 ServerResponse: googleapi.ServerResponse{ 8044 Header: res.Header, 8045 HTTPStatusCode: res.StatusCode, 8046 }, 8047 } 8048 target := &ret 8049 if err := gensupport.DecodeResponse(target, res); err != nil { 8050 return nil, err 8051 } 8052 return ret, nil 8053 // { 8054 // "description": "Deletes a snapshot.", 8055 // "flatPath": "v1b3/projects/{projectId}/snapshots", 8056 // "httpMethod": "DELETE", 8057 // "id": "dataflow.projects.deleteSnapshots", 8058 // "parameterOrder": [ 8059 // "projectId" 8060 // ], 8061 // "parameters": { 8062 // "location": { 8063 // "description": "The location that contains this snapshot.", 8064 // "location": "query", 8065 // "type": "string" 8066 // }, 8067 // "projectId": { 8068 // "description": "The ID of the Cloud Platform project that the snapshot belongs to.", 8069 // "location": "path", 8070 // "required": true, 8071 // "type": "string" 8072 // }, 8073 // "snapshotId": { 8074 // "description": "The ID of the snapshot.", 8075 // "location": "query", 8076 // "type": "string" 8077 // } 8078 // }, 8079 // "path": "v1b3/projects/{projectId}/snapshots", 8080 // "response": { 8081 // "$ref": "DeleteSnapshotResponse" 8082 // }, 8083 // "scopes": [ 8084 // "https://www.googleapis.com/auth/cloud-platform", 8085 // "https://www.googleapis.com/auth/compute", 8086 // "https://www.googleapis.com/auth/compute.readonly", 8087 // "https://www.googleapis.com/auth/userinfo.email" 8088 // ] 8089 // } 8090 8091} 8092 8093// method id "dataflow.projects.workerMessages": 8094 8095type ProjectsWorkerMessagesCall struct { 8096 s *Service 8097 projectId string 8098 sendworkermessagesrequest *SendWorkerMessagesRequest 8099 urlParams_ gensupport.URLParams 8100 ctx_ context.Context 8101 header_ http.Header 8102} 8103 8104// WorkerMessages: Send a worker_message to the service. 8105// 8106// - projectId: The project to send the WorkerMessages to. 8107func (r *ProjectsService) WorkerMessages(projectId string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsWorkerMessagesCall { 8108 c := &ProjectsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8109 c.projectId = projectId 8110 c.sendworkermessagesrequest = sendworkermessagesrequest 8111 return c 8112} 8113 8114// Fields allows partial responses to be retrieved. See 8115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8116// for more information. 8117func (c *ProjectsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsWorkerMessagesCall { 8118 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8119 return c 8120} 8121 8122// Context sets the context to be used in this call's Do method. Any 8123// pending HTTP request will be aborted if the provided context is 8124// canceled. 8125func (c *ProjectsWorkerMessagesCall) Context(ctx context.Context) *ProjectsWorkerMessagesCall { 8126 c.ctx_ = ctx 8127 return c 8128} 8129 8130// Header returns an http.Header that can be modified by the caller to 8131// add HTTP headers to the request. 8132func (c *ProjectsWorkerMessagesCall) Header() http.Header { 8133 if c.header_ == nil { 8134 c.header_ = make(http.Header) 8135 } 8136 return c.header_ 8137} 8138 8139func (c *ProjectsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) { 8140 reqHeaders := make(http.Header) 8141 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8142 for k, v := range c.header_ { 8143 reqHeaders[k] = v 8144 } 8145 reqHeaders.Set("User-Agent", c.s.userAgent()) 8146 var body io.Reader = nil 8147 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest) 8148 if err != nil { 8149 return nil, err 8150 } 8151 reqHeaders.Set("Content-Type", "application/json") 8152 c.urlParams_.Set("alt", alt) 8153 c.urlParams_.Set("prettyPrint", "false") 8154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/WorkerMessages") 8155 urls += "?" + c.urlParams_.Encode() 8156 req, err := http.NewRequest("POST", urls, body) 8157 if err != nil { 8158 return nil, err 8159 } 8160 req.Header = reqHeaders 8161 googleapi.Expand(req.URL, map[string]string{ 8162 "projectId": c.projectId, 8163 }) 8164 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8165} 8166 8167// Do executes the "dataflow.projects.workerMessages" call. 8168// Exactly one of *SendWorkerMessagesResponse or error will be non-nil. 8169// Any non-2xx status code is an error. Response headers are in either 8170// *SendWorkerMessagesResponse.ServerResponse.Header or (if a response 8171// was returned at all) in error.(*googleapi.Error).Header. Use 8172// googleapi.IsNotModified to check whether the returned error was 8173// because http.StatusNotModified was returned. 8174func (c *ProjectsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) { 8175 gensupport.SetOptions(c.urlParams_, opts...) 8176 res, err := c.doRequest("json") 8177 if res != nil && res.StatusCode == http.StatusNotModified { 8178 if res.Body != nil { 8179 res.Body.Close() 8180 } 8181 return nil, &googleapi.Error{ 8182 Code: res.StatusCode, 8183 Header: res.Header, 8184 } 8185 } 8186 if err != nil { 8187 return nil, err 8188 } 8189 defer googleapi.CloseBody(res) 8190 if err := googleapi.CheckResponse(res); err != nil { 8191 return nil, err 8192 } 8193 ret := &SendWorkerMessagesResponse{ 8194 ServerResponse: googleapi.ServerResponse{ 8195 Header: res.Header, 8196 HTTPStatusCode: res.StatusCode, 8197 }, 8198 } 8199 target := &ret 8200 if err := gensupport.DecodeResponse(target, res); err != nil { 8201 return nil, err 8202 } 8203 return ret, nil 8204 // { 8205 // "description": "Send a worker_message to the service.", 8206 // "flatPath": "v1b3/projects/{projectId}/WorkerMessages", 8207 // "httpMethod": "POST", 8208 // "id": "dataflow.projects.workerMessages", 8209 // "parameterOrder": [ 8210 // "projectId" 8211 // ], 8212 // "parameters": { 8213 // "projectId": { 8214 // "description": "The project to send the WorkerMessages to.", 8215 // "location": "path", 8216 // "required": true, 8217 // "type": "string" 8218 // } 8219 // }, 8220 // "path": "v1b3/projects/{projectId}/WorkerMessages", 8221 // "request": { 8222 // "$ref": "SendWorkerMessagesRequest" 8223 // }, 8224 // "response": { 8225 // "$ref": "SendWorkerMessagesResponse" 8226 // }, 8227 // "scopes": [ 8228 // "https://www.googleapis.com/auth/cloud-platform", 8229 // "https://www.googleapis.com/auth/compute", 8230 // "https://www.googleapis.com/auth/compute.readonly", 8231 // "https://www.googleapis.com/auth/userinfo.email" 8232 // ] 8233 // } 8234 8235} 8236 8237// method id "dataflow.projects.jobs.aggregated": 8238 8239type ProjectsJobsAggregatedCall struct { 8240 s *Service 8241 projectId string 8242 urlParams_ gensupport.URLParams 8243 ifNoneMatch_ string 8244 ctx_ context.Context 8245 header_ http.Header 8246} 8247 8248// Aggregated: List the jobs of a project across all regions. 8249// 8250// - projectId: The project which owns the jobs. 8251func (r *ProjectsJobsService) Aggregated(projectId string) *ProjectsJobsAggregatedCall { 8252 c := &ProjectsJobsAggregatedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8253 c.projectId = projectId 8254 return c 8255} 8256 8257// Filter sets the optional parameter "filter": The kind of filter to 8258// use. 8259// 8260// Possible values: 8261// "UNKNOWN" - The filter isn't specified, or is unknown. This returns 8262// all jobs ordered on descending `JobUuid`. 8263// "ALL" - Returns all running jobs first ordered on creation 8264// timestamp, then returns all terminated jobs ordered on the 8265// termination timestamp. 8266// "TERMINATED" - Filters the jobs that have a terminated state, 8267// ordered on the termination timestamp. Example terminated states: 8268// `JOB_STATE_STOPPED`, `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. 8269// "ACTIVE" - Filters the jobs that are running ordered on the 8270// creation timestamp. 8271func (c *ProjectsJobsAggregatedCall) Filter(filter string) *ProjectsJobsAggregatedCall { 8272 c.urlParams_.Set("filter", filter) 8273 return c 8274} 8275 8276// Location sets the optional parameter "location": The [regional 8277// endpoint] 8278// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 8279// that contains this job. 8280func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggregatedCall { 8281 c.urlParams_.Set("location", location) 8282 return c 8283} 8284 8285// PageSize sets the optional parameter "pageSize": If there are many 8286// jobs, limit response to at most this many. The actual number of jobs 8287// returned will be the lesser of max_responses and an unspecified 8288// server-defined limit. 8289func (c *ProjectsJobsAggregatedCall) PageSize(pageSize int64) *ProjectsJobsAggregatedCall { 8290 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8291 return c 8292} 8293 8294// PageToken sets the optional parameter "pageToken": Set this to the 8295// 'next_page_token' field of a previous response to request additional 8296// results in a long list. 8297func (c *ProjectsJobsAggregatedCall) PageToken(pageToken string) *ProjectsJobsAggregatedCall { 8298 c.urlParams_.Set("pageToken", pageToken) 8299 return c 8300} 8301 8302// View sets the optional parameter "view": Deprecated. ListJobs always 8303// returns summaries now. Use GetJob for other JobViews. 8304// 8305// Possible values: 8306// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 8307// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 8308// information, and may contain additional information. 8309// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 8310// Job ID, job name, job type, job status, start/end time, and Cloud SDK 8311// version details. 8312// "JOB_VIEW_ALL" - Request all information available for this job. 8313// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 8314// description data for steps, labels and environment. 8315func (c *ProjectsJobsAggregatedCall) View(view string) *ProjectsJobsAggregatedCall { 8316 c.urlParams_.Set("view", view) 8317 return c 8318} 8319 8320// Fields allows partial responses to be retrieved. See 8321// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8322// for more information. 8323func (c *ProjectsJobsAggregatedCall) Fields(s ...googleapi.Field) *ProjectsJobsAggregatedCall { 8324 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8325 return c 8326} 8327 8328// IfNoneMatch sets the optional parameter which makes the operation 8329// fail if the object's ETag matches the given value. This is useful for 8330// getting updates only after the object has changed since the last 8331// request. Use googleapi.IsNotModified to check whether the response 8332// error from Do is the result of In-None-Match. 8333func (c *ProjectsJobsAggregatedCall) IfNoneMatch(entityTag string) *ProjectsJobsAggregatedCall { 8334 c.ifNoneMatch_ = entityTag 8335 return c 8336} 8337 8338// Context sets the context to be used in this call's Do method. Any 8339// pending HTTP request will be aborted if the provided context is 8340// canceled. 8341func (c *ProjectsJobsAggregatedCall) Context(ctx context.Context) *ProjectsJobsAggregatedCall { 8342 c.ctx_ = ctx 8343 return c 8344} 8345 8346// Header returns an http.Header that can be modified by the caller to 8347// add HTTP headers to the request. 8348func (c *ProjectsJobsAggregatedCall) Header() http.Header { 8349 if c.header_ == nil { 8350 c.header_ = make(http.Header) 8351 } 8352 return c.header_ 8353} 8354 8355func (c *ProjectsJobsAggregatedCall) doRequest(alt string) (*http.Response, error) { 8356 reqHeaders := make(http.Header) 8357 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8358 for k, v := range c.header_ { 8359 reqHeaders[k] = v 8360 } 8361 reqHeaders.Set("User-Agent", c.s.userAgent()) 8362 if c.ifNoneMatch_ != "" { 8363 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8364 } 8365 var body io.Reader = nil 8366 c.urlParams_.Set("alt", alt) 8367 c.urlParams_.Set("prettyPrint", "false") 8368 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs:aggregated") 8369 urls += "?" + c.urlParams_.Encode() 8370 req, err := http.NewRequest("GET", urls, body) 8371 if err != nil { 8372 return nil, err 8373 } 8374 req.Header = reqHeaders 8375 googleapi.Expand(req.URL, map[string]string{ 8376 "projectId": c.projectId, 8377 }) 8378 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8379} 8380 8381// Do executes the "dataflow.projects.jobs.aggregated" call. 8382// Exactly one of *ListJobsResponse or error will be non-nil. Any 8383// non-2xx status code is an error. Response headers are in either 8384// *ListJobsResponse.ServerResponse.Header or (if a response was 8385// returned at all) in error.(*googleapi.Error).Header. Use 8386// googleapi.IsNotModified to check whether the returned error was 8387// because http.StatusNotModified was returned. 8388func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 8389 gensupport.SetOptions(c.urlParams_, opts...) 8390 res, err := c.doRequest("json") 8391 if res != nil && res.StatusCode == http.StatusNotModified { 8392 if res.Body != nil { 8393 res.Body.Close() 8394 } 8395 return nil, &googleapi.Error{ 8396 Code: res.StatusCode, 8397 Header: res.Header, 8398 } 8399 } 8400 if err != nil { 8401 return nil, err 8402 } 8403 defer googleapi.CloseBody(res) 8404 if err := googleapi.CheckResponse(res); err != nil { 8405 return nil, err 8406 } 8407 ret := &ListJobsResponse{ 8408 ServerResponse: googleapi.ServerResponse{ 8409 Header: res.Header, 8410 HTTPStatusCode: res.StatusCode, 8411 }, 8412 } 8413 target := &ret 8414 if err := gensupport.DecodeResponse(target, res); err != nil { 8415 return nil, err 8416 } 8417 return ret, nil 8418 // { 8419 // "description": "List the jobs of a project across all regions.", 8420 // "flatPath": "v1b3/projects/{projectId}/jobs:aggregated", 8421 // "httpMethod": "GET", 8422 // "id": "dataflow.projects.jobs.aggregated", 8423 // "parameterOrder": [ 8424 // "projectId" 8425 // ], 8426 // "parameters": { 8427 // "filter": { 8428 // "description": "The kind of filter to use.", 8429 // "enum": [ 8430 // "UNKNOWN", 8431 // "ALL", 8432 // "TERMINATED", 8433 // "ACTIVE" 8434 // ], 8435 // "enumDescriptions": [ 8436 // "The filter isn't specified, or is unknown. This returns all jobs ordered on descending `JobUuid`.", 8437 // "Returns all running jobs first ordered on creation timestamp, then returns all terminated jobs ordered on the termination timestamp.", 8438 // "Filters the jobs that have a terminated state, ordered on the termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc.", 8439 // "Filters the jobs that are running ordered on the creation timestamp." 8440 // ], 8441 // "location": "query", 8442 // "type": "string" 8443 // }, 8444 // "location": { 8445 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 8446 // "location": "query", 8447 // "type": "string" 8448 // }, 8449 // "pageSize": { 8450 // "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", 8451 // "format": "int32", 8452 // "location": "query", 8453 // "type": "integer" 8454 // }, 8455 // "pageToken": { 8456 // "description": "Set this to the 'next_page_token' field of a previous response to request additional results in a long list.", 8457 // "location": "query", 8458 // "type": "string" 8459 // }, 8460 // "projectId": { 8461 // "description": "The project which owns the jobs.", 8462 // "location": "path", 8463 // "required": true, 8464 // "type": "string" 8465 // }, 8466 // "view": { 8467 // "description": "Deprecated. ListJobs always returns summaries now. Use GetJob for other JobViews.", 8468 // "enum": [ 8469 // "JOB_VIEW_UNKNOWN", 8470 // "JOB_VIEW_SUMMARY", 8471 // "JOB_VIEW_ALL", 8472 // "JOB_VIEW_DESCRIPTION" 8473 // ], 8474 // "enumDescriptions": [ 8475 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 8476 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 8477 // "Request all information available for this job.", 8478 // "Request summary info and limited job description data for steps, labels and environment." 8479 // ], 8480 // "location": "query", 8481 // "type": "string" 8482 // } 8483 // }, 8484 // "path": "v1b3/projects/{projectId}/jobs:aggregated", 8485 // "response": { 8486 // "$ref": "ListJobsResponse" 8487 // }, 8488 // "scopes": [ 8489 // "https://www.googleapis.com/auth/cloud-platform", 8490 // "https://www.googleapis.com/auth/compute", 8491 // "https://www.googleapis.com/auth/compute.readonly", 8492 // "https://www.googleapis.com/auth/userinfo.email" 8493 // ] 8494 // } 8495 8496} 8497 8498// Pages invokes f for each page of results. 8499// A non-nil error returned from f will halt the iteration. 8500// The provided context supersedes any context provided to the Context method. 8501func (c *ProjectsJobsAggregatedCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 8502 c.ctx_ = ctx 8503 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8504 for { 8505 x, err := c.Do() 8506 if err != nil { 8507 return err 8508 } 8509 if err := f(x); err != nil { 8510 return err 8511 } 8512 if x.NextPageToken == "" { 8513 return nil 8514 } 8515 c.PageToken(x.NextPageToken) 8516 } 8517} 8518 8519// method id "dataflow.projects.jobs.create": 8520 8521type ProjectsJobsCreateCall struct { 8522 s *Service 8523 projectId string 8524 job *Job 8525 urlParams_ gensupport.URLParams 8526 ctx_ context.Context 8527 header_ http.Header 8528} 8529 8530// Create: Creates a Cloud Dataflow job. To create a job, we recommend 8531// using `projects.locations.jobs.create` with a [regional endpoint] 8532// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 8533// Using `projects.jobs.create` is not recommended, as your job will 8534// always start in `us-central1`. 8535// 8536// - projectId: The ID of the Cloud Platform project that the job 8537// belongs to. 8538func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCreateCall { 8539 c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8540 c.projectId = projectId 8541 c.job = job 8542 return c 8543} 8544 8545// Location sets the optional parameter "location": The [regional 8546// endpoint] 8547// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 8548// that contains this job. 8549func (c *ProjectsJobsCreateCall) Location(location string) *ProjectsJobsCreateCall { 8550 c.urlParams_.Set("location", location) 8551 return c 8552} 8553 8554// ReplaceJobId sets the optional parameter "replaceJobId": Deprecated. 8555// This field is now in the Job message. 8556func (c *ProjectsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsJobsCreateCall { 8557 c.urlParams_.Set("replaceJobId", replaceJobId) 8558 return c 8559} 8560 8561// View sets the optional parameter "view": The level of information 8562// requested in response. 8563// 8564// Possible values: 8565// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 8566// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 8567// information, and may contain additional information. 8568// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 8569// Job ID, job name, job type, job status, start/end time, and Cloud SDK 8570// version details. 8571// "JOB_VIEW_ALL" - Request all information available for this job. 8572// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 8573// description data for steps, labels and environment. 8574func (c *ProjectsJobsCreateCall) View(view string) *ProjectsJobsCreateCall { 8575 c.urlParams_.Set("view", view) 8576 return c 8577} 8578 8579// Fields allows partial responses to be retrieved. See 8580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8581// for more information. 8582func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall { 8583 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8584 return c 8585} 8586 8587// Context sets the context to be used in this call's Do method. Any 8588// pending HTTP request will be aborted if the provided context is 8589// canceled. 8590func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall { 8591 c.ctx_ = ctx 8592 return c 8593} 8594 8595// Header returns an http.Header that can be modified by the caller to 8596// add HTTP headers to the request. 8597func (c *ProjectsJobsCreateCall) Header() http.Header { 8598 if c.header_ == nil { 8599 c.header_ = make(http.Header) 8600 } 8601 return c.header_ 8602} 8603 8604func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) { 8605 reqHeaders := make(http.Header) 8606 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8607 for k, v := range c.header_ { 8608 reqHeaders[k] = v 8609 } 8610 reqHeaders.Set("User-Agent", c.s.userAgent()) 8611 var body io.Reader = nil 8612 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 8613 if err != nil { 8614 return nil, err 8615 } 8616 reqHeaders.Set("Content-Type", "application/json") 8617 c.urlParams_.Set("alt", alt) 8618 c.urlParams_.Set("prettyPrint", "false") 8619 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") 8620 urls += "?" + c.urlParams_.Encode() 8621 req, err := http.NewRequest("POST", urls, body) 8622 if err != nil { 8623 return nil, err 8624 } 8625 req.Header = reqHeaders 8626 googleapi.Expand(req.URL, map[string]string{ 8627 "projectId": c.projectId, 8628 }) 8629 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8630} 8631 8632// Do executes the "dataflow.projects.jobs.create" call. 8633// Exactly one of *Job or error will be non-nil. Any non-2xx status code 8634// is an error. Response headers are in either 8635// *Job.ServerResponse.Header or (if a response was returned at all) in 8636// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8637// whether the returned error was because http.StatusNotModified was 8638// returned. 8639func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 8640 gensupport.SetOptions(c.urlParams_, opts...) 8641 res, err := c.doRequest("json") 8642 if res != nil && res.StatusCode == http.StatusNotModified { 8643 if res.Body != nil { 8644 res.Body.Close() 8645 } 8646 return nil, &googleapi.Error{ 8647 Code: res.StatusCode, 8648 Header: res.Header, 8649 } 8650 } 8651 if err != nil { 8652 return nil, err 8653 } 8654 defer googleapi.CloseBody(res) 8655 if err := googleapi.CheckResponse(res); err != nil { 8656 return nil, err 8657 } 8658 ret := &Job{ 8659 ServerResponse: googleapi.ServerResponse{ 8660 Header: res.Header, 8661 HTTPStatusCode: res.StatusCode, 8662 }, 8663 } 8664 target := &ret 8665 if err := gensupport.DecodeResponse(target, res); err != nil { 8666 return nil, err 8667 } 8668 return ret, nil 8669 // { 8670 // "description": "Creates a Cloud Dataflow job. To create a job, we recommend using `projects.locations.jobs.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.create` is not recommended, as your job will always start in `us-central1`.", 8671 // "flatPath": "v1b3/projects/{projectId}/jobs", 8672 // "httpMethod": "POST", 8673 // "id": "dataflow.projects.jobs.create", 8674 // "parameterOrder": [ 8675 // "projectId" 8676 // ], 8677 // "parameters": { 8678 // "location": { 8679 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 8680 // "location": "query", 8681 // "type": "string" 8682 // }, 8683 // "projectId": { 8684 // "description": "The ID of the Cloud Platform project that the job belongs to.", 8685 // "location": "path", 8686 // "required": true, 8687 // "type": "string" 8688 // }, 8689 // "replaceJobId": { 8690 // "description": "Deprecated. This field is now in the Job message.", 8691 // "location": "query", 8692 // "type": "string" 8693 // }, 8694 // "view": { 8695 // "description": "The level of information requested in response.", 8696 // "enum": [ 8697 // "JOB_VIEW_UNKNOWN", 8698 // "JOB_VIEW_SUMMARY", 8699 // "JOB_VIEW_ALL", 8700 // "JOB_VIEW_DESCRIPTION" 8701 // ], 8702 // "enumDescriptions": [ 8703 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 8704 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 8705 // "Request all information available for this job.", 8706 // "Request summary info and limited job description data for steps, labels and environment." 8707 // ], 8708 // "location": "query", 8709 // "type": "string" 8710 // } 8711 // }, 8712 // "path": "v1b3/projects/{projectId}/jobs", 8713 // "request": { 8714 // "$ref": "Job" 8715 // }, 8716 // "response": { 8717 // "$ref": "Job" 8718 // }, 8719 // "scopes": [ 8720 // "https://www.googleapis.com/auth/cloud-platform", 8721 // "https://www.googleapis.com/auth/compute", 8722 // "https://www.googleapis.com/auth/compute.readonly", 8723 // "https://www.googleapis.com/auth/userinfo.email" 8724 // ] 8725 // } 8726 8727} 8728 8729// method id "dataflow.projects.jobs.get": 8730 8731type ProjectsJobsGetCall struct { 8732 s *Service 8733 projectId string 8734 jobId string 8735 urlParams_ gensupport.URLParams 8736 ifNoneMatch_ string 8737 ctx_ context.Context 8738 header_ http.Header 8739} 8740 8741// Get: Gets the state of the specified Cloud Dataflow job. To get the 8742// state of a job, we recommend using `projects.locations.jobs.get` with 8743// a [regional endpoint] 8744// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 8745// Using `projects.jobs.get` is not recommended, as you can only get the 8746// state of jobs that are running in `us-central1`. 8747// 8748// - jobId: The job ID. 8749// - projectId: The ID of the Cloud Platform project that the job 8750// belongs to. 8751func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall { 8752 c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8753 c.projectId = projectId 8754 c.jobId = jobId 8755 return c 8756} 8757 8758// Location sets the optional parameter "location": The [regional 8759// endpoint] 8760// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 8761// that contains this job. 8762func (c *ProjectsJobsGetCall) Location(location string) *ProjectsJobsGetCall { 8763 c.urlParams_.Set("location", location) 8764 return c 8765} 8766 8767// View sets the optional parameter "view": The level of information 8768// requested in response. 8769// 8770// Possible values: 8771// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 8772// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 8773// information, and may contain additional information. 8774// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 8775// Job ID, job name, job type, job status, start/end time, and Cloud SDK 8776// version details. 8777// "JOB_VIEW_ALL" - Request all information available for this job. 8778// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 8779// description data for steps, labels and environment. 8780func (c *ProjectsJobsGetCall) View(view string) *ProjectsJobsGetCall { 8781 c.urlParams_.Set("view", view) 8782 return c 8783} 8784 8785// Fields allows partial responses to be retrieved. See 8786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8787// for more information. 8788func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall { 8789 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8790 return c 8791} 8792 8793// IfNoneMatch sets the optional parameter which makes the operation 8794// fail if the object's ETag matches the given value. This is useful for 8795// getting updates only after the object has changed since the last 8796// request. Use googleapi.IsNotModified to check whether the response 8797// error from Do is the result of In-None-Match. 8798func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall { 8799 c.ifNoneMatch_ = entityTag 8800 return c 8801} 8802 8803// Context sets the context to be used in this call's Do method. Any 8804// pending HTTP request will be aborted if the provided context is 8805// canceled. 8806func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall { 8807 c.ctx_ = ctx 8808 return c 8809} 8810 8811// Header returns an http.Header that can be modified by the caller to 8812// add HTTP headers to the request. 8813func (c *ProjectsJobsGetCall) Header() http.Header { 8814 if c.header_ == nil { 8815 c.header_ = make(http.Header) 8816 } 8817 return c.header_ 8818} 8819 8820func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) { 8821 reqHeaders := make(http.Header) 8822 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 8823 for k, v := range c.header_ { 8824 reqHeaders[k] = v 8825 } 8826 reqHeaders.Set("User-Agent", c.s.userAgent()) 8827 if c.ifNoneMatch_ != "" { 8828 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8829 } 8830 var body io.Reader = nil 8831 c.urlParams_.Set("alt", alt) 8832 c.urlParams_.Set("prettyPrint", "false") 8833 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") 8834 urls += "?" + c.urlParams_.Encode() 8835 req, err := http.NewRequest("GET", urls, body) 8836 if err != nil { 8837 return nil, err 8838 } 8839 req.Header = reqHeaders 8840 googleapi.Expand(req.URL, map[string]string{ 8841 "projectId": c.projectId, 8842 "jobId": c.jobId, 8843 }) 8844 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8845} 8846 8847// Do executes the "dataflow.projects.jobs.get" call. 8848// Exactly one of *Job or error will be non-nil. Any non-2xx status code 8849// is an error. Response headers are in either 8850// *Job.ServerResponse.Header or (if a response was returned at all) in 8851// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8852// whether the returned error was because http.StatusNotModified was 8853// returned. 8854func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 8855 gensupport.SetOptions(c.urlParams_, opts...) 8856 res, err := c.doRequest("json") 8857 if res != nil && res.StatusCode == http.StatusNotModified { 8858 if res.Body != nil { 8859 res.Body.Close() 8860 } 8861 return nil, &googleapi.Error{ 8862 Code: res.StatusCode, 8863 Header: res.Header, 8864 } 8865 } 8866 if err != nil { 8867 return nil, err 8868 } 8869 defer googleapi.CloseBody(res) 8870 if err := googleapi.CheckResponse(res); err != nil { 8871 return nil, err 8872 } 8873 ret := &Job{ 8874 ServerResponse: googleapi.ServerResponse{ 8875 Header: res.Header, 8876 HTTPStatusCode: res.StatusCode, 8877 }, 8878 } 8879 target := &ret 8880 if err := gensupport.DecodeResponse(target, res); err != nil { 8881 return nil, err 8882 } 8883 return ret, nil 8884 // { 8885 // "description": "Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using `projects.locations.jobs.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.get` is not recommended, as you can only get the state of jobs that are running in `us-central1`.", 8886 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", 8887 // "httpMethod": "GET", 8888 // "id": "dataflow.projects.jobs.get", 8889 // "parameterOrder": [ 8890 // "projectId", 8891 // "jobId" 8892 // ], 8893 // "parameters": { 8894 // "jobId": { 8895 // "description": "The job ID.", 8896 // "location": "path", 8897 // "required": true, 8898 // "type": "string" 8899 // }, 8900 // "location": { 8901 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 8902 // "location": "query", 8903 // "type": "string" 8904 // }, 8905 // "projectId": { 8906 // "description": "The ID of the Cloud Platform project that the job belongs to.", 8907 // "location": "path", 8908 // "required": true, 8909 // "type": "string" 8910 // }, 8911 // "view": { 8912 // "description": "The level of information requested in response.", 8913 // "enum": [ 8914 // "JOB_VIEW_UNKNOWN", 8915 // "JOB_VIEW_SUMMARY", 8916 // "JOB_VIEW_ALL", 8917 // "JOB_VIEW_DESCRIPTION" 8918 // ], 8919 // "enumDescriptions": [ 8920 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 8921 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 8922 // "Request all information available for this job.", 8923 // "Request summary info and limited job description data for steps, labels and environment." 8924 // ], 8925 // "location": "query", 8926 // "type": "string" 8927 // } 8928 // }, 8929 // "path": "v1b3/projects/{projectId}/jobs/{jobId}", 8930 // "response": { 8931 // "$ref": "Job" 8932 // }, 8933 // "scopes": [ 8934 // "https://www.googleapis.com/auth/cloud-platform", 8935 // "https://www.googleapis.com/auth/compute", 8936 // "https://www.googleapis.com/auth/compute.readonly", 8937 // "https://www.googleapis.com/auth/userinfo.email" 8938 // ] 8939 // } 8940 8941} 8942 8943// method id "dataflow.projects.jobs.getMetrics": 8944 8945type ProjectsJobsGetMetricsCall struct { 8946 s *Service 8947 projectId string 8948 jobId string 8949 urlParams_ gensupport.URLParams 8950 ifNoneMatch_ string 8951 ctx_ context.Context 8952 header_ http.Header 8953} 8954 8955// GetMetrics: Request the job status. To request the status of a job, 8956// we recommend using `projects.locations.jobs.getMetrics` with a 8957// [regional endpoint] 8958// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 8959// Using `projects.jobs.getMetrics` is not recommended, as you can only 8960// request the status of jobs that are running in `us-central1`. 8961// 8962// - jobId: The job to get metrics for. 8963// - projectId: A project id. 8964func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *ProjectsJobsGetMetricsCall { 8965 c := &ProjectsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8966 c.projectId = projectId 8967 c.jobId = jobId 8968 return c 8969} 8970 8971// Location sets the optional parameter "location": The [regional 8972// endpoint] 8973// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 8974// that contains the job specified by job_id. 8975func (c *ProjectsJobsGetMetricsCall) Location(location string) *ProjectsJobsGetMetricsCall { 8976 c.urlParams_.Set("location", location) 8977 return c 8978} 8979 8980// StartTime sets the optional parameter "startTime": Return only metric 8981// data that has changed since this time. Default is to return all 8982// information about all metrics for the job. 8983func (c *ProjectsJobsGetMetricsCall) StartTime(startTime string) *ProjectsJobsGetMetricsCall { 8984 c.urlParams_.Set("startTime", startTime) 8985 return c 8986} 8987 8988// Fields allows partial responses to be retrieved. See 8989// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8990// for more information. 8991func (c *ProjectsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsJobsGetMetricsCall { 8992 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8993 return c 8994} 8995 8996// IfNoneMatch sets the optional parameter which makes the operation 8997// fail if the object's ETag matches the given value. This is useful for 8998// getting updates only after the object has changed since the last 8999// request. Use googleapi.IsNotModified to check whether the response 9000// error from Do is the result of In-None-Match. 9001func (c *ProjectsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsJobsGetMetricsCall { 9002 c.ifNoneMatch_ = entityTag 9003 return c 9004} 9005 9006// Context sets the context to be used in this call's Do method. Any 9007// pending HTTP request will be aborted if the provided context is 9008// canceled. 9009func (c *ProjectsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsJobsGetMetricsCall { 9010 c.ctx_ = ctx 9011 return c 9012} 9013 9014// Header returns an http.Header that can be modified by the caller to 9015// add HTTP headers to the request. 9016func (c *ProjectsJobsGetMetricsCall) Header() http.Header { 9017 if c.header_ == nil { 9018 c.header_ = make(http.Header) 9019 } 9020 return c.header_ 9021} 9022 9023func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) { 9024 reqHeaders := make(http.Header) 9025 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9026 for k, v := range c.header_ { 9027 reqHeaders[k] = v 9028 } 9029 reqHeaders.Set("User-Agent", c.s.userAgent()) 9030 if c.ifNoneMatch_ != "" { 9031 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9032 } 9033 var body io.Reader = nil 9034 c.urlParams_.Set("alt", alt) 9035 c.urlParams_.Set("prettyPrint", "false") 9036 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/metrics") 9037 urls += "?" + c.urlParams_.Encode() 9038 req, err := http.NewRequest("GET", urls, body) 9039 if err != nil { 9040 return nil, err 9041 } 9042 req.Header = reqHeaders 9043 googleapi.Expand(req.URL, map[string]string{ 9044 "projectId": c.projectId, 9045 "jobId": c.jobId, 9046 }) 9047 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9048} 9049 9050// Do executes the "dataflow.projects.jobs.getMetrics" call. 9051// Exactly one of *JobMetrics or error will be non-nil. Any non-2xx 9052// status code is an error. Response headers are in either 9053// *JobMetrics.ServerResponse.Header or (if a response was returned at 9054// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9055// to check whether the returned error was because 9056// http.StatusNotModified was returned. 9057func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) { 9058 gensupport.SetOptions(c.urlParams_, opts...) 9059 res, err := c.doRequest("json") 9060 if res != nil && res.StatusCode == http.StatusNotModified { 9061 if res.Body != nil { 9062 res.Body.Close() 9063 } 9064 return nil, &googleapi.Error{ 9065 Code: res.StatusCode, 9066 Header: res.Header, 9067 } 9068 } 9069 if err != nil { 9070 return nil, err 9071 } 9072 defer googleapi.CloseBody(res) 9073 if err := googleapi.CheckResponse(res); err != nil { 9074 return nil, err 9075 } 9076 ret := &JobMetrics{ 9077 ServerResponse: googleapi.ServerResponse{ 9078 Header: res.Header, 9079 HTTPStatusCode: res.StatusCode, 9080 }, 9081 } 9082 target := &ret 9083 if err := gensupport.DecodeResponse(target, res); err != nil { 9084 return nil, err 9085 } 9086 return ret, nil 9087 // { 9088 // "description": "Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.getMetrics` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.getMetrics` is not recommended, as you can only request the status of jobs that are running in `us-central1`.", 9089 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", 9090 // "httpMethod": "GET", 9091 // "id": "dataflow.projects.jobs.getMetrics", 9092 // "parameterOrder": [ 9093 // "projectId", 9094 // "jobId" 9095 // ], 9096 // "parameters": { 9097 // "jobId": { 9098 // "description": "The job to get metrics for.", 9099 // "location": "path", 9100 // "required": true, 9101 // "type": "string" 9102 // }, 9103 // "location": { 9104 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 9105 // "location": "query", 9106 // "type": "string" 9107 // }, 9108 // "projectId": { 9109 // "description": "A project id.", 9110 // "location": "path", 9111 // "required": true, 9112 // "type": "string" 9113 // }, 9114 // "startTime": { 9115 // "description": "Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.", 9116 // "format": "google-datetime", 9117 // "location": "query", 9118 // "type": "string" 9119 // } 9120 // }, 9121 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", 9122 // "response": { 9123 // "$ref": "JobMetrics" 9124 // }, 9125 // "scopes": [ 9126 // "https://www.googleapis.com/auth/cloud-platform", 9127 // "https://www.googleapis.com/auth/compute", 9128 // "https://www.googleapis.com/auth/compute.readonly", 9129 // "https://www.googleapis.com/auth/userinfo.email" 9130 // ] 9131 // } 9132 9133} 9134 9135// method id "dataflow.projects.jobs.list": 9136 9137type ProjectsJobsListCall struct { 9138 s *Service 9139 projectId string 9140 urlParams_ gensupport.URLParams 9141 ifNoneMatch_ string 9142 ctx_ context.Context 9143 header_ http.Header 9144} 9145 9146// List: List the jobs of a project. To list the jobs of a project in a 9147// region, we recommend using `projects.locations.jobs.list` with a 9148// [regional endpoint] 9149// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 9150// To list the all jobs across all regions, use 9151// `projects.jobs.aggregated`. Using `projects.jobs.list` is not 9152// recommended, as you can only get the list of jobs that are running in 9153// `us-central1`. 9154// 9155// - projectId: The project which owns the jobs. 9156func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall { 9157 c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9158 c.projectId = projectId 9159 return c 9160} 9161 9162// Filter sets the optional parameter "filter": The kind of filter to 9163// use. 9164// 9165// Possible values: 9166// "UNKNOWN" - The filter isn't specified, or is unknown. This returns 9167// all jobs ordered on descending `JobUuid`. 9168// "ALL" - Returns all running jobs first ordered on creation 9169// timestamp, then returns all terminated jobs ordered on the 9170// termination timestamp. 9171// "TERMINATED" - Filters the jobs that have a terminated state, 9172// ordered on the termination timestamp. Example terminated states: 9173// `JOB_STATE_STOPPED`, `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. 9174// "ACTIVE" - Filters the jobs that are running ordered on the 9175// creation timestamp. 9176func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall { 9177 c.urlParams_.Set("filter", filter) 9178 return c 9179} 9180 9181// Location sets the optional parameter "location": The [regional 9182// endpoint] 9183// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 9184// that contains this job. 9185func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall { 9186 c.urlParams_.Set("location", location) 9187 return c 9188} 9189 9190// PageSize sets the optional parameter "pageSize": If there are many 9191// jobs, limit response to at most this many. The actual number of jobs 9192// returned will be the lesser of max_responses and an unspecified 9193// server-defined limit. 9194func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall { 9195 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9196 return c 9197} 9198 9199// PageToken sets the optional parameter "pageToken": Set this to the 9200// 'next_page_token' field of a previous response to request additional 9201// results in a long list. 9202func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall { 9203 c.urlParams_.Set("pageToken", pageToken) 9204 return c 9205} 9206 9207// View sets the optional parameter "view": Deprecated. ListJobs always 9208// returns summaries now. Use GetJob for other JobViews. 9209// 9210// Possible values: 9211// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 9212// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 9213// information, and may contain additional information. 9214// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 9215// Job ID, job name, job type, job status, start/end time, and Cloud SDK 9216// version details. 9217// "JOB_VIEW_ALL" - Request all information available for this job. 9218// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 9219// description data for steps, labels and environment. 9220func (c *ProjectsJobsListCall) View(view string) *ProjectsJobsListCall { 9221 c.urlParams_.Set("view", view) 9222 return c 9223} 9224 9225// Fields allows partial responses to be retrieved. See 9226// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9227// for more information. 9228func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall { 9229 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9230 return c 9231} 9232 9233// IfNoneMatch sets the optional parameter which makes the operation 9234// fail if the object's ETag matches the given value. This is useful for 9235// getting updates only after the object has changed since the last 9236// request. Use googleapi.IsNotModified to check whether the response 9237// error from Do is the result of In-None-Match. 9238func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall { 9239 c.ifNoneMatch_ = entityTag 9240 return c 9241} 9242 9243// Context sets the context to be used in this call's Do method. Any 9244// pending HTTP request will be aborted if the provided context is 9245// canceled. 9246func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall { 9247 c.ctx_ = ctx 9248 return c 9249} 9250 9251// Header returns an http.Header that can be modified by the caller to 9252// add HTTP headers to the request. 9253func (c *ProjectsJobsListCall) Header() http.Header { 9254 if c.header_ == nil { 9255 c.header_ = make(http.Header) 9256 } 9257 return c.header_ 9258} 9259 9260func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) { 9261 reqHeaders := make(http.Header) 9262 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9263 for k, v := range c.header_ { 9264 reqHeaders[k] = v 9265 } 9266 reqHeaders.Set("User-Agent", c.s.userAgent()) 9267 if c.ifNoneMatch_ != "" { 9268 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9269 } 9270 var body io.Reader = nil 9271 c.urlParams_.Set("alt", alt) 9272 c.urlParams_.Set("prettyPrint", "false") 9273 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") 9274 urls += "?" + c.urlParams_.Encode() 9275 req, err := http.NewRequest("GET", urls, body) 9276 if err != nil { 9277 return nil, err 9278 } 9279 req.Header = reqHeaders 9280 googleapi.Expand(req.URL, map[string]string{ 9281 "projectId": c.projectId, 9282 }) 9283 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9284} 9285 9286// Do executes the "dataflow.projects.jobs.list" call. 9287// Exactly one of *ListJobsResponse or error will be non-nil. Any 9288// non-2xx status code is an error. Response headers are in either 9289// *ListJobsResponse.ServerResponse.Header or (if a response was 9290// returned at all) in error.(*googleapi.Error).Header. Use 9291// googleapi.IsNotModified to check whether the returned error was 9292// because http.StatusNotModified was returned. 9293func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 9294 gensupport.SetOptions(c.urlParams_, opts...) 9295 res, err := c.doRequest("json") 9296 if res != nil && res.StatusCode == http.StatusNotModified { 9297 if res.Body != nil { 9298 res.Body.Close() 9299 } 9300 return nil, &googleapi.Error{ 9301 Code: res.StatusCode, 9302 Header: res.Header, 9303 } 9304 } 9305 if err != nil { 9306 return nil, err 9307 } 9308 defer googleapi.CloseBody(res) 9309 if err := googleapi.CheckResponse(res); err != nil { 9310 return nil, err 9311 } 9312 ret := &ListJobsResponse{ 9313 ServerResponse: googleapi.ServerResponse{ 9314 Header: res.Header, 9315 HTTPStatusCode: res.StatusCode, 9316 }, 9317 } 9318 target := &ret 9319 if err := gensupport.DecodeResponse(target, res); err != nil { 9320 return nil, err 9321 } 9322 return ret, nil 9323 // { 9324 // "description": "List the jobs of a project. To list the jobs of a project in a region, we recommend using `projects.locations.jobs.list` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use `projects.jobs.aggregated`. Using `projects.jobs.list` is not recommended, as you can only get the list of jobs that are running in `us-central1`.", 9325 // "flatPath": "v1b3/projects/{projectId}/jobs", 9326 // "httpMethod": "GET", 9327 // "id": "dataflow.projects.jobs.list", 9328 // "parameterOrder": [ 9329 // "projectId" 9330 // ], 9331 // "parameters": { 9332 // "filter": { 9333 // "description": "The kind of filter to use.", 9334 // "enum": [ 9335 // "UNKNOWN", 9336 // "ALL", 9337 // "TERMINATED", 9338 // "ACTIVE" 9339 // ], 9340 // "enumDescriptions": [ 9341 // "The filter isn't specified, or is unknown. This returns all jobs ordered on descending `JobUuid`.", 9342 // "Returns all running jobs first ordered on creation timestamp, then returns all terminated jobs ordered on the termination timestamp.", 9343 // "Filters the jobs that have a terminated state, ordered on the termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc.", 9344 // "Filters the jobs that are running ordered on the creation timestamp." 9345 // ], 9346 // "location": "query", 9347 // "type": "string" 9348 // }, 9349 // "location": { 9350 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 9351 // "location": "query", 9352 // "type": "string" 9353 // }, 9354 // "pageSize": { 9355 // "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", 9356 // "format": "int32", 9357 // "location": "query", 9358 // "type": "integer" 9359 // }, 9360 // "pageToken": { 9361 // "description": "Set this to the 'next_page_token' field of a previous response to request additional results in a long list.", 9362 // "location": "query", 9363 // "type": "string" 9364 // }, 9365 // "projectId": { 9366 // "description": "The project which owns the jobs.", 9367 // "location": "path", 9368 // "required": true, 9369 // "type": "string" 9370 // }, 9371 // "view": { 9372 // "description": "Deprecated. ListJobs always returns summaries now. Use GetJob for other JobViews.", 9373 // "enum": [ 9374 // "JOB_VIEW_UNKNOWN", 9375 // "JOB_VIEW_SUMMARY", 9376 // "JOB_VIEW_ALL", 9377 // "JOB_VIEW_DESCRIPTION" 9378 // ], 9379 // "enumDescriptions": [ 9380 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 9381 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 9382 // "Request all information available for this job.", 9383 // "Request summary info and limited job description data for steps, labels and environment." 9384 // ], 9385 // "location": "query", 9386 // "type": "string" 9387 // } 9388 // }, 9389 // "path": "v1b3/projects/{projectId}/jobs", 9390 // "response": { 9391 // "$ref": "ListJobsResponse" 9392 // }, 9393 // "scopes": [ 9394 // "https://www.googleapis.com/auth/cloud-platform", 9395 // "https://www.googleapis.com/auth/compute", 9396 // "https://www.googleapis.com/auth/compute.readonly", 9397 // "https://www.googleapis.com/auth/userinfo.email" 9398 // ] 9399 // } 9400 9401} 9402 9403// Pages invokes f for each page of results. 9404// A non-nil error returned from f will halt the iteration. 9405// The provided context supersedes any context provided to the Context method. 9406func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 9407 c.ctx_ = ctx 9408 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9409 for { 9410 x, err := c.Do() 9411 if err != nil { 9412 return err 9413 } 9414 if err := f(x); err != nil { 9415 return err 9416 } 9417 if x.NextPageToken == "" { 9418 return nil 9419 } 9420 c.PageToken(x.NextPageToken) 9421 } 9422} 9423 9424// method id "dataflow.projects.jobs.snapshot": 9425 9426type ProjectsJobsSnapshotCall struct { 9427 s *Service 9428 projectId string 9429 jobId string 9430 snapshotjobrequest *SnapshotJobRequest 9431 urlParams_ gensupport.URLParams 9432 ctx_ context.Context 9433 header_ http.Header 9434} 9435 9436// Snapshot: Snapshot the state of a streaming job. 9437// 9438// - jobId: The job to be snapshotted. 9439// - projectId: The project which owns the job to be snapshotted. 9440func (r *ProjectsJobsService) Snapshot(projectId string, jobId string, snapshotjobrequest *SnapshotJobRequest) *ProjectsJobsSnapshotCall { 9441 c := &ProjectsJobsSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9442 c.projectId = projectId 9443 c.jobId = jobId 9444 c.snapshotjobrequest = snapshotjobrequest 9445 return c 9446} 9447 9448// Fields allows partial responses to be retrieved. See 9449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9450// for more information. 9451func (c *ProjectsJobsSnapshotCall) Fields(s ...googleapi.Field) *ProjectsJobsSnapshotCall { 9452 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9453 return c 9454} 9455 9456// Context sets the context to be used in this call's Do method. Any 9457// pending HTTP request will be aborted if the provided context is 9458// canceled. 9459func (c *ProjectsJobsSnapshotCall) Context(ctx context.Context) *ProjectsJobsSnapshotCall { 9460 c.ctx_ = ctx 9461 return c 9462} 9463 9464// Header returns an http.Header that can be modified by the caller to 9465// add HTTP headers to the request. 9466func (c *ProjectsJobsSnapshotCall) Header() http.Header { 9467 if c.header_ == nil { 9468 c.header_ = make(http.Header) 9469 } 9470 return c.header_ 9471} 9472 9473func (c *ProjectsJobsSnapshotCall) doRequest(alt string) (*http.Response, error) { 9474 reqHeaders := make(http.Header) 9475 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 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.snapshotjobrequest) 9482 if err != nil { 9483 return nil, err 9484 } 9485 reqHeaders.Set("Content-Type", "application/json") 9486 c.urlParams_.Set("alt", alt) 9487 c.urlParams_.Set("prettyPrint", "false") 9488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}:snapshot") 9489 urls += "?" + c.urlParams_.Encode() 9490 req, err := http.NewRequest("POST", urls, body) 9491 if err != nil { 9492 return nil, err 9493 } 9494 req.Header = reqHeaders 9495 googleapi.Expand(req.URL, map[string]string{ 9496 "projectId": c.projectId, 9497 "jobId": c.jobId, 9498 }) 9499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9500} 9501 9502// Do executes the "dataflow.projects.jobs.snapshot" call. 9503// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status 9504// code is an error. Response headers are in either 9505// *Snapshot.ServerResponse.Header or (if a response was returned at 9506// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9507// to check whether the returned error was because 9508// http.StatusNotModified was returned. 9509func (c *ProjectsJobsSnapshotCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 9510 gensupport.SetOptions(c.urlParams_, opts...) 9511 res, err := c.doRequest("json") 9512 if res != nil && res.StatusCode == http.StatusNotModified { 9513 if res.Body != nil { 9514 res.Body.Close() 9515 } 9516 return nil, &googleapi.Error{ 9517 Code: res.StatusCode, 9518 Header: res.Header, 9519 } 9520 } 9521 if err != nil { 9522 return nil, err 9523 } 9524 defer googleapi.CloseBody(res) 9525 if err := googleapi.CheckResponse(res); err != nil { 9526 return nil, err 9527 } 9528 ret := &Snapshot{ 9529 ServerResponse: googleapi.ServerResponse{ 9530 Header: res.Header, 9531 HTTPStatusCode: res.StatusCode, 9532 }, 9533 } 9534 target := &ret 9535 if err := gensupport.DecodeResponse(target, res); err != nil { 9536 return nil, err 9537 } 9538 return ret, nil 9539 // { 9540 // "description": "Snapshot the state of a streaming job.", 9541 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}:snapshot", 9542 // "httpMethod": "POST", 9543 // "id": "dataflow.projects.jobs.snapshot", 9544 // "parameterOrder": [ 9545 // "projectId", 9546 // "jobId" 9547 // ], 9548 // "parameters": { 9549 // "jobId": { 9550 // "description": "The job to be snapshotted.", 9551 // "location": "path", 9552 // "required": true, 9553 // "type": "string" 9554 // }, 9555 // "projectId": { 9556 // "description": "The project which owns the job to be snapshotted.", 9557 // "location": "path", 9558 // "required": true, 9559 // "type": "string" 9560 // } 9561 // }, 9562 // "path": "v1b3/projects/{projectId}/jobs/{jobId}:snapshot", 9563 // "request": { 9564 // "$ref": "SnapshotJobRequest" 9565 // }, 9566 // "response": { 9567 // "$ref": "Snapshot" 9568 // }, 9569 // "scopes": [ 9570 // "https://www.googleapis.com/auth/cloud-platform", 9571 // "https://www.googleapis.com/auth/compute", 9572 // "https://www.googleapis.com/auth/compute.readonly", 9573 // "https://www.googleapis.com/auth/userinfo.email" 9574 // ] 9575 // } 9576 9577} 9578 9579// method id "dataflow.projects.jobs.update": 9580 9581type ProjectsJobsUpdateCall struct { 9582 s *Service 9583 projectId string 9584 jobId string 9585 job *Job 9586 urlParams_ gensupport.URLParams 9587 ctx_ context.Context 9588 header_ http.Header 9589} 9590 9591// Update: Updates the state of an existing Cloud Dataflow job. To 9592// update the state of an existing job, we recommend using 9593// `projects.locations.jobs.update` with a [regional endpoint] 9594// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 9595// Using `projects.jobs.update` is not recommended, as you can only 9596// update the state of jobs that are running in `us-central1`. 9597// 9598// - jobId: The job ID. 9599// - projectId: The ID of the Cloud Platform project that the job 9600// belongs to. 9601func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) *ProjectsJobsUpdateCall { 9602 c := &ProjectsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9603 c.projectId = projectId 9604 c.jobId = jobId 9605 c.job = job 9606 return c 9607} 9608 9609// Location sets the optional parameter "location": The [regional 9610// endpoint] 9611// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 9612// that contains this job. 9613func (c *ProjectsJobsUpdateCall) Location(location string) *ProjectsJobsUpdateCall { 9614 c.urlParams_.Set("location", location) 9615 return c 9616} 9617 9618// Fields allows partial responses to be retrieved. See 9619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9620// for more information. 9621func (c *ProjectsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsJobsUpdateCall { 9622 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9623 return c 9624} 9625 9626// Context sets the context to be used in this call's Do method. Any 9627// pending HTTP request will be aborted if the provided context is 9628// canceled. 9629func (c *ProjectsJobsUpdateCall) Context(ctx context.Context) *ProjectsJobsUpdateCall { 9630 c.ctx_ = ctx 9631 return c 9632} 9633 9634// Header returns an http.Header that can be modified by the caller to 9635// add HTTP headers to the request. 9636func (c *ProjectsJobsUpdateCall) Header() http.Header { 9637 if c.header_ == nil { 9638 c.header_ = make(http.Header) 9639 } 9640 return c.header_ 9641} 9642 9643func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { 9644 reqHeaders := make(http.Header) 9645 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9646 for k, v := range c.header_ { 9647 reqHeaders[k] = v 9648 } 9649 reqHeaders.Set("User-Agent", c.s.userAgent()) 9650 var body io.Reader = nil 9651 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 9652 if err != nil { 9653 return nil, err 9654 } 9655 reqHeaders.Set("Content-Type", "application/json") 9656 c.urlParams_.Set("alt", alt) 9657 c.urlParams_.Set("prettyPrint", "false") 9658 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") 9659 urls += "?" + c.urlParams_.Encode() 9660 req, err := http.NewRequest("PUT", urls, body) 9661 if err != nil { 9662 return nil, err 9663 } 9664 req.Header = reqHeaders 9665 googleapi.Expand(req.URL, map[string]string{ 9666 "projectId": c.projectId, 9667 "jobId": c.jobId, 9668 }) 9669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9670} 9671 9672// Do executes the "dataflow.projects.jobs.update" call. 9673// Exactly one of *Job or error will be non-nil. Any non-2xx status code 9674// is an error. Response headers are in either 9675// *Job.ServerResponse.Header or (if a response was returned at all) in 9676// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9677// whether the returned error was because http.StatusNotModified was 9678// returned. 9679func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 9680 gensupport.SetOptions(c.urlParams_, opts...) 9681 res, err := c.doRequest("json") 9682 if res != nil && res.StatusCode == http.StatusNotModified { 9683 if res.Body != nil { 9684 res.Body.Close() 9685 } 9686 return nil, &googleapi.Error{ 9687 Code: res.StatusCode, 9688 Header: res.Header, 9689 } 9690 } 9691 if err != nil { 9692 return nil, err 9693 } 9694 defer googleapi.CloseBody(res) 9695 if err := googleapi.CheckResponse(res); err != nil { 9696 return nil, err 9697 } 9698 ret := &Job{ 9699 ServerResponse: googleapi.ServerResponse{ 9700 Header: res.Header, 9701 HTTPStatusCode: res.StatusCode, 9702 }, 9703 } 9704 target := &ret 9705 if err := gensupport.DecodeResponse(target, res); err != nil { 9706 return nil, err 9707 } 9708 return ret, nil 9709 // { 9710 // "description": "Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using `projects.locations.jobs.update` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.update` is not recommended, as you can only update the state of jobs that are running in `us-central1`.", 9711 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", 9712 // "httpMethod": "PUT", 9713 // "id": "dataflow.projects.jobs.update", 9714 // "parameterOrder": [ 9715 // "projectId", 9716 // "jobId" 9717 // ], 9718 // "parameters": { 9719 // "jobId": { 9720 // "description": "The job ID.", 9721 // "location": "path", 9722 // "required": true, 9723 // "type": "string" 9724 // }, 9725 // "location": { 9726 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 9727 // "location": "query", 9728 // "type": "string" 9729 // }, 9730 // "projectId": { 9731 // "description": "The ID of the Cloud Platform project that the job belongs to.", 9732 // "location": "path", 9733 // "required": true, 9734 // "type": "string" 9735 // } 9736 // }, 9737 // "path": "v1b3/projects/{projectId}/jobs/{jobId}", 9738 // "request": { 9739 // "$ref": "Job" 9740 // }, 9741 // "response": { 9742 // "$ref": "Job" 9743 // }, 9744 // "scopes": [ 9745 // "https://www.googleapis.com/auth/cloud-platform", 9746 // "https://www.googleapis.com/auth/compute", 9747 // "https://www.googleapis.com/auth/compute.readonly", 9748 // "https://www.googleapis.com/auth/userinfo.email" 9749 // ] 9750 // } 9751 9752} 9753 9754// method id "dataflow.projects.jobs.debug.getConfig": 9755 9756type ProjectsJobsDebugGetConfigCall struct { 9757 s *Service 9758 projectId string 9759 jobId string 9760 getdebugconfigrequest *GetDebugConfigRequest 9761 urlParams_ gensupport.URLParams 9762 ctx_ context.Context 9763 header_ http.Header 9764} 9765 9766// GetConfig: Get encoded debug configuration for component. Not 9767// cacheable. 9768// 9769// - jobId: The job id. 9770// - projectId: The project id. 9771func (r *ProjectsJobsDebugService) GetConfig(projectId string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsJobsDebugGetConfigCall { 9772 c := &ProjectsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9773 c.projectId = projectId 9774 c.jobId = jobId 9775 c.getdebugconfigrequest = getdebugconfigrequest 9776 return c 9777} 9778 9779// Fields allows partial responses to be retrieved. See 9780// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9781// for more information. 9782func (c *ProjectsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugGetConfigCall { 9783 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9784 return c 9785} 9786 9787// Context sets the context to be used in this call's Do method. Any 9788// pending HTTP request will be aborted if the provided context is 9789// canceled. 9790func (c *ProjectsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsJobsDebugGetConfigCall { 9791 c.ctx_ = ctx 9792 return c 9793} 9794 9795// Header returns an http.Header that can be modified by the caller to 9796// add HTTP headers to the request. 9797func (c *ProjectsJobsDebugGetConfigCall) Header() http.Header { 9798 if c.header_ == nil { 9799 c.header_ = make(http.Header) 9800 } 9801 return c.header_ 9802} 9803 9804func (c *ProjectsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) { 9805 reqHeaders := make(http.Header) 9806 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9807 for k, v := range c.header_ { 9808 reqHeaders[k] = v 9809 } 9810 reqHeaders.Set("User-Agent", c.s.userAgent()) 9811 var body io.Reader = nil 9812 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest) 9813 if err != nil { 9814 return nil, err 9815 } 9816 reqHeaders.Set("Content-Type", "application/json") 9817 c.urlParams_.Set("alt", alt) 9818 c.urlParams_.Set("prettyPrint", "false") 9819 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig") 9820 urls += "?" + c.urlParams_.Encode() 9821 req, err := http.NewRequest("POST", urls, body) 9822 if err != nil { 9823 return nil, err 9824 } 9825 req.Header = reqHeaders 9826 googleapi.Expand(req.URL, map[string]string{ 9827 "projectId": c.projectId, 9828 "jobId": c.jobId, 9829 }) 9830 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9831} 9832 9833// Do executes the "dataflow.projects.jobs.debug.getConfig" call. 9834// Exactly one of *GetDebugConfigResponse or error will be non-nil. Any 9835// non-2xx status code is an error. Response headers are in either 9836// *GetDebugConfigResponse.ServerResponse.Header or (if a response was 9837// returned at all) in error.(*googleapi.Error).Header. Use 9838// googleapi.IsNotModified to check whether the returned error was 9839// because http.StatusNotModified was returned. 9840func (c *ProjectsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) { 9841 gensupport.SetOptions(c.urlParams_, opts...) 9842 res, err := c.doRequest("json") 9843 if res != nil && res.StatusCode == http.StatusNotModified { 9844 if res.Body != nil { 9845 res.Body.Close() 9846 } 9847 return nil, &googleapi.Error{ 9848 Code: res.StatusCode, 9849 Header: res.Header, 9850 } 9851 } 9852 if err != nil { 9853 return nil, err 9854 } 9855 defer googleapi.CloseBody(res) 9856 if err := googleapi.CheckResponse(res); err != nil { 9857 return nil, err 9858 } 9859 ret := &GetDebugConfigResponse{ 9860 ServerResponse: googleapi.ServerResponse{ 9861 Header: res.Header, 9862 HTTPStatusCode: res.StatusCode, 9863 }, 9864 } 9865 target := &ret 9866 if err := gensupport.DecodeResponse(target, res); err != nil { 9867 return nil, err 9868 } 9869 return ret, nil 9870 // { 9871 // "description": "Get encoded debug configuration for component. Not cacheable.", 9872 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", 9873 // "httpMethod": "POST", 9874 // "id": "dataflow.projects.jobs.debug.getConfig", 9875 // "parameterOrder": [ 9876 // "projectId", 9877 // "jobId" 9878 // ], 9879 // "parameters": { 9880 // "jobId": { 9881 // "description": "The job id.", 9882 // "location": "path", 9883 // "required": true, 9884 // "type": "string" 9885 // }, 9886 // "projectId": { 9887 // "description": "The project id.", 9888 // "location": "path", 9889 // "required": true, 9890 // "type": "string" 9891 // } 9892 // }, 9893 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", 9894 // "request": { 9895 // "$ref": "GetDebugConfigRequest" 9896 // }, 9897 // "response": { 9898 // "$ref": "GetDebugConfigResponse" 9899 // }, 9900 // "scopes": [ 9901 // "https://www.googleapis.com/auth/cloud-platform", 9902 // "https://www.googleapis.com/auth/compute", 9903 // "https://www.googleapis.com/auth/compute.readonly", 9904 // "https://www.googleapis.com/auth/userinfo.email" 9905 // ] 9906 // } 9907 9908} 9909 9910// method id "dataflow.projects.jobs.debug.sendCapture": 9911 9912type ProjectsJobsDebugSendCaptureCall struct { 9913 s *Service 9914 projectId string 9915 jobId string 9916 senddebugcapturerequest *SendDebugCaptureRequest 9917 urlParams_ gensupport.URLParams 9918 ctx_ context.Context 9919 header_ http.Header 9920} 9921 9922// SendCapture: Send encoded debug capture data for component. 9923// 9924// - jobId: The job id. 9925// - projectId: The project id. 9926func (r *ProjectsJobsDebugService) SendCapture(projectId string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsJobsDebugSendCaptureCall { 9927 c := &ProjectsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9928 c.projectId = projectId 9929 c.jobId = jobId 9930 c.senddebugcapturerequest = senddebugcapturerequest 9931 return c 9932} 9933 9934// Fields allows partial responses to be retrieved. See 9935// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9936// for more information. 9937func (c *ProjectsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugSendCaptureCall { 9938 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9939 return c 9940} 9941 9942// Context sets the context to be used in this call's Do method. Any 9943// pending HTTP request will be aborted if the provided context is 9944// canceled. 9945func (c *ProjectsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsJobsDebugSendCaptureCall { 9946 c.ctx_ = ctx 9947 return c 9948} 9949 9950// Header returns an http.Header that can be modified by the caller to 9951// add HTTP headers to the request. 9952func (c *ProjectsJobsDebugSendCaptureCall) Header() http.Header { 9953 if c.header_ == nil { 9954 c.header_ = make(http.Header) 9955 } 9956 return c.header_ 9957} 9958 9959func (c *ProjectsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) { 9960 reqHeaders := make(http.Header) 9961 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 9962 for k, v := range c.header_ { 9963 reqHeaders[k] = v 9964 } 9965 reqHeaders.Set("User-Agent", c.s.userAgent()) 9966 var body io.Reader = nil 9967 body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest) 9968 if err != nil { 9969 return nil, err 9970 } 9971 reqHeaders.Set("Content-Type", "application/json") 9972 c.urlParams_.Set("alt", alt) 9973 c.urlParams_.Set("prettyPrint", "false") 9974 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture") 9975 urls += "?" + c.urlParams_.Encode() 9976 req, err := http.NewRequest("POST", urls, body) 9977 if err != nil { 9978 return nil, err 9979 } 9980 req.Header = reqHeaders 9981 googleapi.Expand(req.URL, map[string]string{ 9982 "projectId": c.projectId, 9983 "jobId": c.jobId, 9984 }) 9985 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9986} 9987 9988// Do executes the "dataflow.projects.jobs.debug.sendCapture" call. 9989// Exactly one of *SendDebugCaptureResponse or error will be non-nil. 9990// Any non-2xx status code is an error. Response headers are in either 9991// *SendDebugCaptureResponse.ServerResponse.Header or (if a response was 9992// returned at all) in error.(*googleapi.Error).Header. Use 9993// googleapi.IsNotModified to check whether the returned error was 9994// because http.StatusNotModified was returned. 9995func (c *ProjectsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) { 9996 gensupport.SetOptions(c.urlParams_, opts...) 9997 res, err := c.doRequest("json") 9998 if res != nil && res.StatusCode == http.StatusNotModified { 9999 if res.Body != nil { 10000 res.Body.Close() 10001 } 10002 return nil, &googleapi.Error{ 10003 Code: res.StatusCode, 10004 Header: res.Header, 10005 } 10006 } 10007 if err != nil { 10008 return nil, err 10009 } 10010 defer googleapi.CloseBody(res) 10011 if err := googleapi.CheckResponse(res); err != nil { 10012 return nil, err 10013 } 10014 ret := &SendDebugCaptureResponse{ 10015 ServerResponse: googleapi.ServerResponse{ 10016 Header: res.Header, 10017 HTTPStatusCode: res.StatusCode, 10018 }, 10019 } 10020 target := &ret 10021 if err := gensupport.DecodeResponse(target, res); err != nil { 10022 return nil, err 10023 } 10024 return ret, nil 10025 // { 10026 // "description": "Send encoded debug capture data for component.", 10027 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", 10028 // "httpMethod": "POST", 10029 // "id": "dataflow.projects.jobs.debug.sendCapture", 10030 // "parameterOrder": [ 10031 // "projectId", 10032 // "jobId" 10033 // ], 10034 // "parameters": { 10035 // "jobId": { 10036 // "description": "The job id.", 10037 // "location": "path", 10038 // "required": true, 10039 // "type": "string" 10040 // }, 10041 // "projectId": { 10042 // "description": "The project id.", 10043 // "location": "path", 10044 // "required": true, 10045 // "type": "string" 10046 // } 10047 // }, 10048 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", 10049 // "request": { 10050 // "$ref": "SendDebugCaptureRequest" 10051 // }, 10052 // "response": { 10053 // "$ref": "SendDebugCaptureResponse" 10054 // }, 10055 // "scopes": [ 10056 // "https://www.googleapis.com/auth/cloud-platform", 10057 // "https://www.googleapis.com/auth/compute", 10058 // "https://www.googleapis.com/auth/compute.readonly", 10059 // "https://www.googleapis.com/auth/userinfo.email" 10060 // ] 10061 // } 10062 10063} 10064 10065// method id "dataflow.projects.jobs.messages.list": 10066 10067type ProjectsJobsMessagesListCall struct { 10068 s *Service 10069 projectId string 10070 jobId string 10071 urlParams_ gensupport.URLParams 10072 ifNoneMatch_ string 10073 ctx_ context.Context 10074 header_ http.Header 10075} 10076 10077// List: Request the job status. To request the status of a job, we 10078// recommend using `projects.locations.jobs.messages.list` with a 10079// [regional endpoint] 10080// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 10081// Using `projects.jobs.messages.list` is not recommended, as you can 10082// only request the status of jobs that are running in `us-central1`. 10083// 10084// - jobId: The job to get messages about. 10085// - projectId: A project id. 10086func (r *ProjectsJobsMessagesService) List(projectId string, jobId string) *ProjectsJobsMessagesListCall { 10087 c := &ProjectsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10088 c.projectId = projectId 10089 c.jobId = jobId 10090 return c 10091} 10092 10093// EndTime sets the optional parameter "endTime": Return only messages 10094// with timestamps < end_time. The default is now (i.e. return up to the 10095// latest messages available). 10096func (c *ProjectsJobsMessagesListCall) EndTime(endTime string) *ProjectsJobsMessagesListCall { 10097 c.urlParams_.Set("endTime", endTime) 10098 return c 10099} 10100 10101// Location sets the optional parameter "location": The [regional 10102// endpoint] 10103// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 10104// that contains the job specified by job_id. 10105func (c *ProjectsJobsMessagesListCall) Location(location string) *ProjectsJobsMessagesListCall { 10106 c.urlParams_.Set("location", location) 10107 return c 10108} 10109 10110// MinimumImportance sets the optional parameter "minimumImportance": 10111// Filter to only get messages with importance >= level 10112// 10113// Possible values: 10114// "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't 10115// specified, or is unknown. 10116// "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: 10117// typically only useful for software engineers working on the code the 10118// job is running. Typically, Dataflow pipeline runners do not display 10119// log messages at this level by default. 10120// "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: 10121// somewhat verbose, but potentially useful to users. Typically, 10122// Dataflow pipeline runners do not display log messages at this level 10123// by default. These messages are displayed by default in the Dataflow 10124// monitoring UI. 10125// "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful 10126// for keeping track of the execution of a Dataflow pipeline. Typically, 10127// Dataflow pipeline runners display log messages at this level by 10128// default, and these messages are displayed by default in the Dataflow 10129// monitoring UI. 10130// "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: 10131// indicating a condition pertaining to a job which may require human 10132// intervention. Typically, Dataflow pipeline runners display log 10133// messages at this level by default, and these messages are displayed 10134// by default in the Dataflow monitoring UI. 10135// "JOB_MESSAGE_ERROR" - The message is at the 'error' level: 10136// indicating a condition preventing a job from succeeding. Typically, 10137// Dataflow pipeline runners display log messages at this level by 10138// default, and these messages are displayed by default in the Dataflow 10139// monitoring UI. 10140func (c *ProjectsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsJobsMessagesListCall { 10141 c.urlParams_.Set("minimumImportance", minimumImportance) 10142 return c 10143} 10144 10145// PageSize sets the optional parameter "pageSize": If specified, 10146// determines the maximum number of messages to return. If unspecified, 10147// the service may choose an appropriate default, or may return an 10148// arbitrarily large number of results. 10149func (c *ProjectsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsJobsMessagesListCall { 10150 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10151 return c 10152} 10153 10154// PageToken sets the optional parameter "pageToken": If supplied, this 10155// should be the value of next_page_token returned by an earlier call. 10156// This will cause the next page of results to be returned. 10157func (c *ProjectsJobsMessagesListCall) PageToken(pageToken string) *ProjectsJobsMessagesListCall { 10158 c.urlParams_.Set("pageToken", pageToken) 10159 return c 10160} 10161 10162// StartTime sets the optional parameter "startTime": If specified, 10163// return only messages with timestamps >= start_time. The default is 10164// the job creation time (i.e. beginning of messages). 10165func (c *ProjectsJobsMessagesListCall) StartTime(startTime string) *ProjectsJobsMessagesListCall { 10166 c.urlParams_.Set("startTime", startTime) 10167 return c 10168} 10169 10170// Fields allows partial responses to be retrieved. See 10171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10172// for more information. 10173func (c *ProjectsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsJobsMessagesListCall { 10174 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10175 return c 10176} 10177 10178// IfNoneMatch sets the optional parameter which makes the operation 10179// fail if the object's ETag matches the given value. This is useful for 10180// getting updates only after the object has changed since the last 10181// request. Use googleapi.IsNotModified to check whether the response 10182// error from Do is the result of In-None-Match. 10183func (c *ProjectsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsJobsMessagesListCall { 10184 c.ifNoneMatch_ = entityTag 10185 return c 10186} 10187 10188// Context sets the context to be used in this call's Do method. Any 10189// pending HTTP request will be aborted if the provided context is 10190// canceled. 10191func (c *ProjectsJobsMessagesListCall) Context(ctx context.Context) *ProjectsJobsMessagesListCall { 10192 c.ctx_ = ctx 10193 return c 10194} 10195 10196// Header returns an http.Header that can be modified by the caller to 10197// add HTTP headers to the request. 10198func (c *ProjectsJobsMessagesListCall) Header() http.Header { 10199 if c.header_ == nil { 10200 c.header_ = make(http.Header) 10201 } 10202 return c.header_ 10203} 10204 10205func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) { 10206 reqHeaders := make(http.Header) 10207 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10208 for k, v := range c.header_ { 10209 reqHeaders[k] = v 10210 } 10211 reqHeaders.Set("User-Agent", c.s.userAgent()) 10212 if c.ifNoneMatch_ != "" { 10213 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10214 } 10215 var body io.Reader = nil 10216 c.urlParams_.Set("alt", alt) 10217 c.urlParams_.Set("prettyPrint", "false") 10218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/messages") 10219 urls += "?" + c.urlParams_.Encode() 10220 req, err := http.NewRequest("GET", urls, body) 10221 if err != nil { 10222 return nil, err 10223 } 10224 req.Header = reqHeaders 10225 googleapi.Expand(req.URL, map[string]string{ 10226 "projectId": c.projectId, 10227 "jobId": c.jobId, 10228 }) 10229 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10230} 10231 10232// Do executes the "dataflow.projects.jobs.messages.list" call. 10233// Exactly one of *ListJobMessagesResponse or error will be non-nil. Any 10234// non-2xx status code is an error. Response headers are in either 10235// *ListJobMessagesResponse.ServerResponse.Header or (if a response was 10236// returned at all) in error.(*googleapi.Error).Header. Use 10237// googleapi.IsNotModified to check whether the returned error was 10238// because http.StatusNotModified was returned. 10239func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) { 10240 gensupport.SetOptions(c.urlParams_, opts...) 10241 res, err := c.doRequest("json") 10242 if res != nil && res.StatusCode == http.StatusNotModified { 10243 if res.Body != nil { 10244 res.Body.Close() 10245 } 10246 return nil, &googleapi.Error{ 10247 Code: res.StatusCode, 10248 Header: res.Header, 10249 } 10250 } 10251 if err != nil { 10252 return nil, err 10253 } 10254 defer googleapi.CloseBody(res) 10255 if err := googleapi.CheckResponse(res); err != nil { 10256 return nil, err 10257 } 10258 ret := &ListJobMessagesResponse{ 10259 ServerResponse: googleapi.ServerResponse{ 10260 Header: res.Header, 10261 HTTPStatusCode: res.StatusCode, 10262 }, 10263 } 10264 target := &ret 10265 if err := gensupport.DecodeResponse(target, res); err != nil { 10266 return nil, err 10267 } 10268 return ret, nil 10269 // { 10270 // "description": "Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.messages.list` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.messages.list` is not recommended, as you can only request the status of jobs that are running in `us-central1`.", 10271 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", 10272 // "httpMethod": "GET", 10273 // "id": "dataflow.projects.jobs.messages.list", 10274 // "parameterOrder": [ 10275 // "projectId", 10276 // "jobId" 10277 // ], 10278 // "parameters": { 10279 // "endTime": { 10280 // "description": "Return only messages with timestamps \u003c end_time. The default is now (i.e. return up to the latest messages available).", 10281 // "format": "google-datetime", 10282 // "location": "query", 10283 // "type": "string" 10284 // }, 10285 // "jobId": { 10286 // "description": "The job to get messages about.", 10287 // "location": "path", 10288 // "required": true, 10289 // "type": "string" 10290 // }, 10291 // "location": { 10292 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 10293 // "location": "query", 10294 // "type": "string" 10295 // }, 10296 // "minimumImportance": { 10297 // "description": "Filter to only get messages with importance \u003e= level", 10298 // "enum": [ 10299 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN", 10300 // "JOB_MESSAGE_DEBUG", 10301 // "JOB_MESSAGE_DETAILED", 10302 // "JOB_MESSAGE_BASIC", 10303 // "JOB_MESSAGE_WARNING", 10304 // "JOB_MESSAGE_ERROR" 10305 // ], 10306 // "enumDescriptions": [ 10307 // "The message importance isn't specified, or is unknown.", 10308 // "The message is at the 'debug' level: typically only useful for software engineers working on the code the job is running. Typically, Dataflow pipeline runners do not display log messages at this level by default.", 10309 // "The message is at the 'detailed' level: somewhat verbose, but potentially useful to users. Typically, Dataflow pipeline runners do not display log messages at this level by default. These messages are displayed by default in the Dataflow monitoring UI.", 10310 // "The message is at the 'basic' level: useful for keeping track of the execution of a Dataflow pipeline. Typically, Dataflow pipeline runners display log messages at this level by default, and these messages are displayed by default in the Dataflow monitoring UI.", 10311 // "The message is at the 'warning' level: indicating a condition pertaining to a job which may require human intervention. Typically, Dataflow pipeline runners display log messages at this level by default, and these messages are displayed by default in the Dataflow monitoring UI.", 10312 // "The message is at the 'error' level: indicating a condition preventing a job from succeeding. Typically, Dataflow pipeline runners display log messages at this level by default, and these messages are displayed by default in the Dataflow monitoring UI." 10313 // ], 10314 // "location": "query", 10315 // "type": "string" 10316 // }, 10317 // "pageSize": { 10318 // "description": "If specified, determines the maximum number of messages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.", 10319 // "format": "int32", 10320 // "location": "query", 10321 // "type": "integer" 10322 // }, 10323 // "pageToken": { 10324 // "description": "If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.", 10325 // "location": "query", 10326 // "type": "string" 10327 // }, 10328 // "projectId": { 10329 // "description": "A project id.", 10330 // "location": "path", 10331 // "required": true, 10332 // "type": "string" 10333 // }, 10334 // "startTime": { 10335 // "description": "If specified, return only messages with timestamps \u003e= start_time. The default is the job creation time (i.e. beginning of messages).", 10336 // "format": "google-datetime", 10337 // "location": "query", 10338 // "type": "string" 10339 // } 10340 // }, 10341 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", 10342 // "response": { 10343 // "$ref": "ListJobMessagesResponse" 10344 // }, 10345 // "scopes": [ 10346 // "https://www.googleapis.com/auth/cloud-platform", 10347 // "https://www.googleapis.com/auth/compute", 10348 // "https://www.googleapis.com/auth/compute.readonly", 10349 // "https://www.googleapis.com/auth/userinfo.email" 10350 // ] 10351 // } 10352 10353} 10354 10355// Pages invokes f for each page of results. 10356// A non-nil error returned from f will halt the iteration. 10357// The provided context supersedes any context provided to the Context method. 10358func (c *ProjectsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error { 10359 c.ctx_ = ctx 10360 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10361 for { 10362 x, err := c.Do() 10363 if err != nil { 10364 return err 10365 } 10366 if err := f(x); err != nil { 10367 return err 10368 } 10369 if x.NextPageToken == "" { 10370 return nil 10371 } 10372 c.PageToken(x.NextPageToken) 10373 } 10374} 10375 10376// method id "dataflow.projects.jobs.workItems.lease": 10377 10378type ProjectsJobsWorkItemsLeaseCall struct { 10379 s *Service 10380 projectId string 10381 jobId string 10382 leaseworkitemrequest *LeaseWorkItemRequest 10383 urlParams_ gensupport.URLParams 10384 ctx_ context.Context 10385 header_ http.Header 10386} 10387 10388// Lease: Leases a dataflow WorkItem to run. 10389// 10390// - jobId: Identifies the workflow job this worker belongs to. 10391// - projectId: Identifies the project this worker belongs to. 10392func (r *ProjectsJobsWorkItemsService) Lease(projectId string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsJobsWorkItemsLeaseCall { 10393 c := &ProjectsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10394 c.projectId = projectId 10395 c.jobId = jobId 10396 c.leaseworkitemrequest = leaseworkitemrequest 10397 return c 10398} 10399 10400// Fields allows partial responses to be retrieved. See 10401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10402// for more information. 10403func (c *ProjectsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsLeaseCall { 10404 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10405 return c 10406} 10407 10408// Context sets the context to be used in this call's Do method. Any 10409// pending HTTP request will be aborted if the provided context is 10410// canceled. 10411func (c *ProjectsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsJobsWorkItemsLeaseCall { 10412 c.ctx_ = ctx 10413 return c 10414} 10415 10416// Header returns an http.Header that can be modified by the caller to 10417// add HTTP headers to the request. 10418func (c *ProjectsJobsWorkItemsLeaseCall) Header() http.Header { 10419 if c.header_ == nil { 10420 c.header_ = make(http.Header) 10421 } 10422 return c.header_ 10423} 10424 10425func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) { 10426 reqHeaders := make(http.Header) 10427 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10428 for k, v := range c.header_ { 10429 reqHeaders[k] = v 10430 } 10431 reqHeaders.Set("User-Agent", c.s.userAgent()) 10432 var body io.Reader = nil 10433 body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest) 10434 if err != nil { 10435 return nil, err 10436 } 10437 reqHeaders.Set("Content-Type", "application/json") 10438 c.urlParams_.Set("alt", alt) 10439 c.urlParams_.Set("prettyPrint", "false") 10440 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease") 10441 urls += "?" + c.urlParams_.Encode() 10442 req, err := http.NewRequest("POST", urls, body) 10443 if err != nil { 10444 return nil, err 10445 } 10446 req.Header = reqHeaders 10447 googleapi.Expand(req.URL, map[string]string{ 10448 "projectId": c.projectId, 10449 "jobId": c.jobId, 10450 }) 10451 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10452} 10453 10454// Do executes the "dataflow.projects.jobs.workItems.lease" call. 10455// Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any 10456// non-2xx status code is an error. Response headers are in either 10457// *LeaseWorkItemResponse.ServerResponse.Header or (if a response was 10458// returned at all) in error.(*googleapi.Error).Header. Use 10459// googleapi.IsNotModified to check whether the returned error was 10460// because http.StatusNotModified was returned. 10461func (c *ProjectsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) { 10462 gensupport.SetOptions(c.urlParams_, opts...) 10463 res, err := c.doRequest("json") 10464 if res != nil && res.StatusCode == http.StatusNotModified { 10465 if res.Body != nil { 10466 res.Body.Close() 10467 } 10468 return nil, &googleapi.Error{ 10469 Code: res.StatusCode, 10470 Header: res.Header, 10471 } 10472 } 10473 if err != nil { 10474 return nil, err 10475 } 10476 defer googleapi.CloseBody(res) 10477 if err := googleapi.CheckResponse(res); err != nil { 10478 return nil, err 10479 } 10480 ret := &LeaseWorkItemResponse{ 10481 ServerResponse: googleapi.ServerResponse{ 10482 Header: res.Header, 10483 HTTPStatusCode: res.StatusCode, 10484 }, 10485 } 10486 target := &ret 10487 if err := gensupport.DecodeResponse(target, res); err != nil { 10488 return nil, err 10489 } 10490 return ret, nil 10491 // { 10492 // "description": "Leases a dataflow WorkItem to run.", 10493 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", 10494 // "httpMethod": "POST", 10495 // "id": "dataflow.projects.jobs.workItems.lease", 10496 // "parameterOrder": [ 10497 // "projectId", 10498 // "jobId" 10499 // ], 10500 // "parameters": { 10501 // "jobId": { 10502 // "description": "Identifies the workflow job this worker belongs to.", 10503 // "location": "path", 10504 // "required": true, 10505 // "type": "string" 10506 // }, 10507 // "projectId": { 10508 // "description": "Identifies the project this worker belongs to.", 10509 // "location": "path", 10510 // "required": true, 10511 // "type": "string" 10512 // } 10513 // }, 10514 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", 10515 // "request": { 10516 // "$ref": "LeaseWorkItemRequest" 10517 // }, 10518 // "response": { 10519 // "$ref": "LeaseWorkItemResponse" 10520 // }, 10521 // "scopes": [ 10522 // "https://www.googleapis.com/auth/cloud-platform", 10523 // "https://www.googleapis.com/auth/compute", 10524 // "https://www.googleapis.com/auth/compute.readonly", 10525 // "https://www.googleapis.com/auth/userinfo.email" 10526 // ] 10527 // } 10528 10529} 10530 10531// method id "dataflow.projects.jobs.workItems.reportStatus": 10532 10533type ProjectsJobsWorkItemsReportStatusCall struct { 10534 s *Service 10535 projectId string 10536 jobId string 10537 reportworkitemstatusrequest *ReportWorkItemStatusRequest 10538 urlParams_ gensupport.URLParams 10539 ctx_ context.Context 10540 header_ http.Header 10541} 10542 10543// ReportStatus: Reports the status of dataflow WorkItems leased by a 10544// worker. 10545// 10546// - jobId: The job which the WorkItem is part of. 10547// - projectId: The project which owns the WorkItem's job. 10548func (r *ProjectsJobsWorkItemsService) ReportStatus(projectId string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsJobsWorkItemsReportStatusCall { 10549 c := &ProjectsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10550 c.projectId = projectId 10551 c.jobId = jobId 10552 c.reportworkitemstatusrequest = reportworkitemstatusrequest 10553 return c 10554} 10555 10556// Fields allows partial responses to be retrieved. See 10557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10558// for more information. 10559func (c *ProjectsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsReportStatusCall { 10560 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10561 return c 10562} 10563 10564// Context sets the context to be used in this call's Do method. Any 10565// pending HTTP request will be aborted if the provided context is 10566// canceled. 10567func (c *ProjectsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsJobsWorkItemsReportStatusCall { 10568 c.ctx_ = ctx 10569 return c 10570} 10571 10572// Header returns an http.Header that can be modified by the caller to 10573// add HTTP headers to the request. 10574func (c *ProjectsJobsWorkItemsReportStatusCall) Header() http.Header { 10575 if c.header_ == nil { 10576 c.header_ = make(http.Header) 10577 } 10578 return c.header_ 10579} 10580 10581func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) { 10582 reqHeaders := make(http.Header) 10583 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10584 for k, v := range c.header_ { 10585 reqHeaders[k] = v 10586 } 10587 reqHeaders.Set("User-Agent", c.s.userAgent()) 10588 var body io.Reader = nil 10589 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest) 10590 if err != nil { 10591 return nil, err 10592 } 10593 reqHeaders.Set("Content-Type", "application/json") 10594 c.urlParams_.Set("alt", alt) 10595 c.urlParams_.Set("prettyPrint", "false") 10596 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus") 10597 urls += "?" + c.urlParams_.Encode() 10598 req, err := http.NewRequest("POST", urls, body) 10599 if err != nil { 10600 return nil, err 10601 } 10602 req.Header = reqHeaders 10603 googleapi.Expand(req.URL, map[string]string{ 10604 "projectId": c.projectId, 10605 "jobId": c.jobId, 10606 }) 10607 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10608} 10609 10610// Do executes the "dataflow.projects.jobs.workItems.reportStatus" call. 10611// Exactly one of *ReportWorkItemStatusResponse or error will be 10612// non-nil. Any non-2xx status code is an error. Response headers are in 10613// either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a 10614// response was returned at all) in error.(*googleapi.Error).Header. Use 10615// googleapi.IsNotModified to check whether the returned error was 10616// because http.StatusNotModified was returned. 10617func (c *ProjectsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) { 10618 gensupport.SetOptions(c.urlParams_, opts...) 10619 res, err := c.doRequest("json") 10620 if res != nil && res.StatusCode == http.StatusNotModified { 10621 if res.Body != nil { 10622 res.Body.Close() 10623 } 10624 return nil, &googleapi.Error{ 10625 Code: res.StatusCode, 10626 Header: res.Header, 10627 } 10628 } 10629 if err != nil { 10630 return nil, err 10631 } 10632 defer googleapi.CloseBody(res) 10633 if err := googleapi.CheckResponse(res); err != nil { 10634 return nil, err 10635 } 10636 ret := &ReportWorkItemStatusResponse{ 10637 ServerResponse: googleapi.ServerResponse{ 10638 Header: res.Header, 10639 HTTPStatusCode: res.StatusCode, 10640 }, 10641 } 10642 target := &ret 10643 if err := gensupport.DecodeResponse(target, res); err != nil { 10644 return nil, err 10645 } 10646 return ret, nil 10647 // { 10648 // "description": "Reports the status of dataflow WorkItems leased by a worker.", 10649 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", 10650 // "httpMethod": "POST", 10651 // "id": "dataflow.projects.jobs.workItems.reportStatus", 10652 // "parameterOrder": [ 10653 // "projectId", 10654 // "jobId" 10655 // ], 10656 // "parameters": { 10657 // "jobId": { 10658 // "description": "The job which the WorkItem is part of.", 10659 // "location": "path", 10660 // "required": true, 10661 // "type": "string" 10662 // }, 10663 // "projectId": { 10664 // "description": "The project which owns the WorkItem's job.", 10665 // "location": "path", 10666 // "required": true, 10667 // "type": "string" 10668 // } 10669 // }, 10670 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", 10671 // "request": { 10672 // "$ref": "ReportWorkItemStatusRequest" 10673 // }, 10674 // "response": { 10675 // "$ref": "ReportWorkItemStatusResponse" 10676 // }, 10677 // "scopes": [ 10678 // "https://www.googleapis.com/auth/cloud-platform", 10679 // "https://www.googleapis.com/auth/compute", 10680 // "https://www.googleapis.com/auth/compute.readonly", 10681 // "https://www.googleapis.com/auth/userinfo.email" 10682 // ] 10683 // } 10684 10685} 10686 10687// method id "dataflow.projects.locations.workerMessages": 10688 10689type ProjectsLocationsWorkerMessagesCall struct { 10690 s *Service 10691 projectId string 10692 location string 10693 sendworkermessagesrequest *SendWorkerMessagesRequest 10694 urlParams_ gensupport.URLParams 10695 ctx_ context.Context 10696 header_ http.Header 10697} 10698 10699// WorkerMessages: Send a worker_message to the service. 10700// 10701// - location: The [regional endpoint] 10702// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 10703// that contains the job. 10704// - projectId: The project to send the WorkerMessages to. 10705func (r *ProjectsLocationsService) WorkerMessages(projectId string, location string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsLocationsWorkerMessagesCall { 10706 c := &ProjectsLocationsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10707 c.projectId = projectId 10708 c.location = location 10709 c.sendworkermessagesrequest = sendworkermessagesrequest 10710 return c 10711} 10712 10713// Fields allows partial responses to be retrieved. See 10714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10715// for more information. 10716func (c *ProjectsLocationsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerMessagesCall { 10717 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10718 return c 10719} 10720 10721// Context sets the context to be used in this call's Do method. Any 10722// pending HTTP request will be aborted if the provided context is 10723// canceled. 10724func (c *ProjectsLocationsWorkerMessagesCall) Context(ctx context.Context) *ProjectsLocationsWorkerMessagesCall { 10725 c.ctx_ = ctx 10726 return c 10727} 10728 10729// Header returns an http.Header that can be modified by the caller to 10730// add HTTP headers to the request. 10731func (c *ProjectsLocationsWorkerMessagesCall) Header() http.Header { 10732 if c.header_ == nil { 10733 c.header_ = make(http.Header) 10734 } 10735 return c.header_ 10736} 10737 10738func (c *ProjectsLocationsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) { 10739 reqHeaders := make(http.Header) 10740 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10741 for k, v := range c.header_ { 10742 reqHeaders[k] = v 10743 } 10744 reqHeaders.Set("User-Agent", c.s.userAgent()) 10745 var body io.Reader = nil 10746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest) 10747 if err != nil { 10748 return nil, err 10749 } 10750 reqHeaders.Set("Content-Type", "application/json") 10751 c.urlParams_.Set("alt", alt) 10752 c.urlParams_.Set("prettyPrint", "false") 10753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/WorkerMessages") 10754 urls += "?" + c.urlParams_.Encode() 10755 req, err := http.NewRequest("POST", urls, body) 10756 if err != nil { 10757 return nil, err 10758 } 10759 req.Header = reqHeaders 10760 googleapi.Expand(req.URL, map[string]string{ 10761 "projectId": c.projectId, 10762 "location": c.location, 10763 }) 10764 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10765} 10766 10767// Do executes the "dataflow.projects.locations.workerMessages" call. 10768// Exactly one of *SendWorkerMessagesResponse or error will be non-nil. 10769// Any non-2xx status code is an error. Response headers are in either 10770// *SendWorkerMessagesResponse.ServerResponse.Header or (if a response 10771// was returned at all) in error.(*googleapi.Error).Header. Use 10772// googleapi.IsNotModified to check whether the returned error was 10773// because http.StatusNotModified was returned. 10774func (c *ProjectsLocationsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) { 10775 gensupport.SetOptions(c.urlParams_, opts...) 10776 res, err := c.doRequest("json") 10777 if res != nil && res.StatusCode == http.StatusNotModified { 10778 if res.Body != nil { 10779 res.Body.Close() 10780 } 10781 return nil, &googleapi.Error{ 10782 Code: res.StatusCode, 10783 Header: res.Header, 10784 } 10785 } 10786 if err != nil { 10787 return nil, err 10788 } 10789 defer googleapi.CloseBody(res) 10790 if err := googleapi.CheckResponse(res); err != nil { 10791 return nil, err 10792 } 10793 ret := &SendWorkerMessagesResponse{ 10794 ServerResponse: googleapi.ServerResponse{ 10795 Header: res.Header, 10796 HTTPStatusCode: res.StatusCode, 10797 }, 10798 } 10799 target := &ret 10800 if err := gensupport.DecodeResponse(target, res); err != nil { 10801 return nil, err 10802 } 10803 return ret, nil 10804 // { 10805 // "description": "Send a worker_message to the service.", 10806 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", 10807 // "httpMethod": "POST", 10808 // "id": "dataflow.projects.locations.workerMessages", 10809 // "parameterOrder": [ 10810 // "projectId", 10811 // "location" 10812 // ], 10813 // "parameters": { 10814 // "location": { 10815 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job.", 10816 // "location": "path", 10817 // "required": true, 10818 // "type": "string" 10819 // }, 10820 // "projectId": { 10821 // "description": "The project to send the WorkerMessages to.", 10822 // "location": "path", 10823 // "required": true, 10824 // "type": "string" 10825 // } 10826 // }, 10827 // "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", 10828 // "request": { 10829 // "$ref": "SendWorkerMessagesRequest" 10830 // }, 10831 // "response": { 10832 // "$ref": "SendWorkerMessagesResponse" 10833 // }, 10834 // "scopes": [ 10835 // "https://www.googleapis.com/auth/cloud-platform", 10836 // "https://www.googleapis.com/auth/compute", 10837 // "https://www.googleapis.com/auth/compute.readonly", 10838 // "https://www.googleapis.com/auth/userinfo.email" 10839 // ] 10840 // } 10841 10842} 10843 10844// method id "dataflow.projects.locations.flexTemplates.launch": 10845 10846type ProjectsLocationsFlexTemplatesLaunchCall struct { 10847 s *Service 10848 projectId string 10849 location string 10850 launchflextemplaterequest *LaunchFlexTemplateRequest 10851 urlParams_ gensupport.URLParams 10852 ctx_ context.Context 10853 header_ http.Header 10854} 10855 10856// Launch: Launch a job with a FlexTemplate. 10857// 10858// - location: The [regional endpoint] 10859// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 10860// to which to direct the request. E.g., us-central1, us-west1. 10861// - projectId: The ID of the Cloud Platform project that the job 10862// belongs to. 10863func (r *ProjectsLocationsFlexTemplatesService) Launch(projectId string, location string, launchflextemplaterequest *LaunchFlexTemplateRequest) *ProjectsLocationsFlexTemplatesLaunchCall { 10864 c := &ProjectsLocationsFlexTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10865 c.projectId = projectId 10866 c.location = location 10867 c.launchflextemplaterequest = launchflextemplaterequest 10868 return c 10869} 10870 10871// Fields allows partial responses to be retrieved. See 10872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10873// for more information. 10874func (c *ProjectsLocationsFlexTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlexTemplatesLaunchCall { 10875 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10876 return c 10877} 10878 10879// Context sets the context to be used in this call's Do method. Any 10880// pending HTTP request will be aborted if the provided context is 10881// canceled. 10882func (c *ProjectsLocationsFlexTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsFlexTemplatesLaunchCall { 10883 c.ctx_ = ctx 10884 return c 10885} 10886 10887// Header returns an http.Header that can be modified by the caller to 10888// add HTTP headers to the request. 10889func (c *ProjectsLocationsFlexTemplatesLaunchCall) Header() http.Header { 10890 if c.header_ == nil { 10891 c.header_ = make(http.Header) 10892 } 10893 return c.header_ 10894} 10895 10896func (c *ProjectsLocationsFlexTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 10897 reqHeaders := make(http.Header) 10898 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 10899 for k, v := range c.header_ { 10900 reqHeaders[k] = v 10901 } 10902 reqHeaders.Set("User-Agent", c.s.userAgent()) 10903 var body io.Reader = nil 10904 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchflextemplaterequest) 10905 if err != nil { 10906 return nil, err 10907 } 10908 reqHeaders.Set("Content-Type", "application/json") 10909 c.urlParams_.Set("alt", alt) 10910 c.urlParams_.Set("prettyPrint", "false") 10911 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/flexTemplates:launch") 10912 urls += "?" + c.urlParams_.Encode() 10913 req, err := http.NewRequest("POST", urls, body) 10914 if err != nil { 10915 return nil, err 10916 } 10917 req.Header = reqHeaders 10918 googleapi.Expand(req.URL, map[string]string{ 10919 "projectId": c.projectId, 10920 "location": c.location, 10921 }) 10922 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10923} 10924 10925// Do executes the "dataflow.projects.locations.flexTemplates.launch" call. 10926// Exactly one of *LaunchFlexTemplateResponse or error will be non-nil. 10927// Any non-2xx status code is an error. Response headers are in either 10928// *LaunchFlexTemplateResponse.ServerResponse.Header or (if a response 10929// was returned at all) in error.(*googleapi.Error).Header. Use 10930// googleapi.IsNotModified to check whether the returned error was 10931// because http.StatusNotModified was returned. 10932func (c *ProjectsLocationsFlexTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchFlexTemplateResponse, error) { 10933 gensupport.SetOptions(c.urlParams_, opts...) 10934 res, err := c.doRequest("json") 10935 if res != nil && res.StatusCode == http.StatusNotModified { 10936 if res.Body != nil { 10937 res.Body.Close() 10938 } 10939 return nil, &googleapi.Error{ 10940 Code: res.StatusCode, 10941 Header: res.Header, 10942 } 10943 } 10944 if err != nil { 10945 return nil, err 10946 } 10947 defer googleapi.CloseBody(res) 10948 if err := googleapi.CheckResponse(res); err != nil { 10949 return nil, err 10950 } 10951 ret := &LaunchFlexTemplateResponse{ 10952 ServerResponse: googleapi.ServerResponse{ 10953 Header: res.Header, 10954 HTTPStatusCode: res.StatusCode, 10955 }, 10956 } 10957 target := &ret 10958 if err := gensupport.DecodeResponse(target, res); err != nil { 10959 return nil, err 10960 } 10961 return ret, nil 10962 // { 10963 // "description": "Launch a job with a FlexTemplate.", 10964 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/flexTemplates:launch", 10965 // "httpMethod": "POST", 10966 // "id": "dataflow.projects.locations.flexTemplates.launch", 10967 // "parameterOrder": [ 10968 // "projectId", 10969 // "location" 10970 // ], 10971 // "parameters": { 10972 // "location": { 10973 // "description": "Required. The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request. E.g., us-central1, us-west1.", 10974 // "location": "path", 10975 // "required": true, 10976 // "type": "string" 10977 // }, 10978 // "projectId": { 10979 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 10980 // "location": "path", 10981 // "required": true, 10982 // "type": "string" 10983 // } 10984 // }, 10985 // "path": "v1b3/projects/{projectId}/locations/{location}/flexTemplates:launch", 10986 // "request": { 10987 // "$ref": "LaunchFlexTemplateRequest" 10988 // }, 10989 // "response": { 10990 // "$ref": "LaunchFlexTemplateResponse" 10991 // }, 10992 // "scopes": [ 10993 // "https://www.googleapis.com/auth/cloud-platform", 10994 // "https://www.googleapis.com/auth/compute", 10995 // "https://www.googleapis.com/auth/compute.readonly", 10996 // "https://www.googleapis.com/auth/userinfo.email" 10997 // ] 10998 // } 10999 11000} 11001 11002// method id "dataflow.projects.locations.jobs.create": 11003 11004type ProjectsLocationsJobsCreateCall struct { 11005 s *Service 11006 projectId string 11007 location string 11008 job *Job 11009 urlParams_ gensupport.URLParams 11010 ctx_ context.Context 11011 header_ http.Header 11012} 11013 11014// Create: Creates a Cloud Dataflow job. To create a job, we recommend 11015// using `projects.locations.jobs.create` with a [regional endpoint] 11016// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 11017// Using `projects.jobs.create` is not recommended, as your job will 11018// always start in `us-central1`. 11019// 11020// - location: The [regional endpoint] 11021// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 11022// that contains this job. 11023// - projectId: The ID of the Cloud Platform project that the job 11024// belongs to. 11025func (r *ProjectsLocationsJobsService) Create(projectId string, location string, job *Job) *ProjectsLocationsJobsCreateCall { 11026 c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11027 c.projectId = projectId 11028 c.location = location 11029 c.job = job 11030 return c 11031} 11032 11033// ReplaceJobId sets the optional parameter "replaceJobId": Deprecated. 11034// This field is now in the Job message. 11035func (c *ProjectsLocationsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsLocationsJobsCreateCall { 11036 c.urlParams_.Set("replaceJobId", replaceJobId) 11037 return c 11038} 11039 11040// View sets the optional parameter "view": The level of information 11041// requested in response. 11042// 11043// Possible values: 11044// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 11045// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 11046// information, and may contain additional information. 11047// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 11048// Job ID, job name, job type, job status, start/end time, and Cloud SDK 11049// version details. 11050// "JOB_VIEW_ALL" - Request all information available for this job. 11051// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 11052// description data for steps, labels and environment. 11053func (c *ProjectsLocationsJobsCreateCall) View(view string) *ProjectsLocationsJobsCreateCall { 11054 c.urlParams_.Set("view", view) 11055 return c 11056} 11057 11058// Fields allows partial responses to be retrieved. See 11059// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11060// for more information. 11061func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall { 11062 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11063 return c 11064} 11065 11066// Context sets the context to be used in this call's Do method. Any 11067// pending HTTP request will be aborted if the provided context is 11068// canceled. 11069func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall { 11070 c.ctx_ = ctx 11071 return c 11072} 11073 11074// Header returns an http.Header that can be modified by the caller to 11075// add HTTP headers to the request. 11076func (c *ProjectsLocationsJobsCreateCall) Header() http.Header { 11077 if c.header_ == nil { 11078 c.header_ = make(http.Header) 11079 } 11080 return c.header_ 11081} 11082 11083func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) { 11084 reqHeaders := make(http.Header) 11085 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11086 for k, v := range c.header_ { 11087 reqHeaders[k] = v 11088 } 11089 reqHeaders.Set("User-Agent", c.s.userAgent()) 11090 var body io.Reader = nil 11091 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 11092 if err != nil { 11093 return nil, err 11094 } 11095 reqHeaders.Set("Content-Type", "application/json") 11096 c.urlParams_.Set("alt", alt) 11097 c.urlParams_.Set("prettyPrint", "false") 11098 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") 11099 urls += "?" + c.urlParams_.Encode() 11100 req, err := http.NewRequest("POST", urls, body) 11101 if err != nil { 11102 return nil, err 11103 } 11104 req.Header = reqHeaders 11105 googleapi.Expand(req.URL, map[string]string{ 11106 "projectId": c.projectId, 11107 "location": c.location, 11108 }) 11109 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11110} 11111 11112// Do executes the "dataflow.projects.locations.jobs.create" call. 11113// Exactly one of *Job or error will be non-nil. Any non-2xx status code 11114// is an error. Response headers are in either 11115// *Job.ServerResponse.Header or (if a response was returned at all) in 11116// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11117// whether the returned error was because http.StatusNotModified was 11118// returned. 11119func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 11120 gensupport.SetOptions(c.urlParams_, opts...) 11121 res, err := c.doRequest("json") 11122 if res != nil && res.StatusCode == http.StatusNotModified { 11123 if res.Body != nil { 11124 res.Body.Close() 11125 } 11126 return nil, &googleapi.Error{ 11127 Code: res.StatusCode, 11128 Header: res.Header, 11129 } 11130 } 11131 if err != nil { 11132 return nil, err 11133 } 11134 defer googleapi.CloseBody(res) 11135 if err := googleapi.CheckResponse(res); err != nil { 11136 return nil, err 11137 } 11138 ret := &Job{ 11139 ServerResponse: googleapi.ServerResponse{ 11140 Header: res.Header, 11141 HTTPStatusCode: res.StatusCode, 11142 }, 11143 } 11144 target := &ret 11145 if err := gensupport.DecodeResponse(target, res); err != nil { 11146 return nil, err 11147 } 11148 return ret, nil 11149 // { 11150 // "description": "Creates a Cloud Dataflow job. To create a job, we recommend using `projects.locations.jobs.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.create` is not recommended, as your job will always start in `us-central1`.", 11151 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", 11152 // "httpMethod": "POST", 11153 // "id": "dataflow.projects.locations.jobs.create", 11154 // "parameterOrder": [ 11155 // "projectId", 11156 // "location" 11157 // ], 11158 // "parameters": { 11159 // "location": { 11160 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 11161 // "location": "path", 11162 // "required": true, 11163 // "type": "string" 11164 // }, 11165 // "projectId": { 11166 // "description": "The ID of the Cloud Platform project that the job belongs to.", 11167 // "location": "path", 11168 // "required": true, 11169 // "type": "string" 11170 // }, 11171 // "replaceJobId": { 11172 // "description": "Deprecated. This field is now in the Job message.", 11173 // "location": "query", 11174 // "type": "string" 11175 // }, 11176 // "view": { 11177 // "description": "The level of information requested in response.", 11178 // "enum": [ 11179 // "JOB_VIEW_UNKNOWN", 11180 // "JOB_VIEW_SUMMARY", 11181 // "JOB_VIEW_ALL", 11182 // "JOB_VIEW_DESCRIPTION" 11183 // ], 11184 // "enumDescriptions": [ 11185 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 11186 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 11187 // "Request all information available for this job.", 11188 // "Request summary info and limited job description data for steps, labels and environment." 11189 // ], 11190 // "location": "query", 11191 // "type": "string" 11192 // } 11193 // }, 11194 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs", 11195 // "request": { 11196 // "$ref": "Job" 11197 // }, 11198 // "response": { 11199 // "$ref": "Job" 11200 // }, 11201 // "scopes": [ 11202 // "https://www.googleapis.com/auth/cloud-platform", 11203 // "https://www.googleapis.com/auth/compute", 11204 // "https://www.googleapis.com/auth/compute.readonly", 11205 // "https://www.googleapis.com/auth/userinfo.email" 11206 // ] 11207 // } 11208 11209} 11210 11211// method id "dataflow.projects.locations.jobs.get": 11212 11213type ProjectsLocationsJobsGetCall struct { 11214 s *Service 11215 projectId string 11216 location string 11217 jobId string 11218 urlParams_ gensupport.URLParams 11219 ifNoneMatch_ string 11220 ctx_ context.Context 11221 header_ http.Header 11222} 11223 11224// Get: Gets the state of the specified Cloud Dataflow job. To get the 11225// state of a job, we recommend using `projects.locations.jobs.get` with 11226// a [regional endpoint] 11227// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 11228// Using `projects.jobs.get` is not recommended, as you can only get the 11229// state of jobs that are running in `us-central1`. 11230// 11231// - jobId: The job ID. 11232// - location: The [regional endpoint] 11233// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 11234// that contains this job. 11235// - projectId: The ID of the Cloud Platform project that the job 11236// belongs to. 11237func (r *ProjectsLocationsJobsService) Get(projectId string, location string, jobId string) *ProjectsLocationsJobsGetCall { 11238 c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11239 c.projectId = projectId 11240 c.location = location 11241 c.jobId = jobId 11242 return c 11243} 11244 11245// View sets the optional parameter "view": The level of information 11246// requested in response. 11247// 11248// Possible values: 11249// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 11250// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 11251// information, and may contain additional information. 11252// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 11253// Job ID, job name, job type, job status, start/end time, and Cloud SDK 11254// version details. 11255// "JOB_VIEW_ALL" - Request all information available for this job. 11256// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 11257// description data for steps, labels and environment. 11258func (c *ProjectsLocationsJobsGetCall) View(view string) *ProjectsLocationsJobsGetCall { 11259 c.urlParams_.Set("view", view) 11260 return c 11261} 11262 11263// Fields allows partial responses to be retrieved. See 11264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11265// for more information. 11266func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall { 11267 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11268 return c 11269} 11270 11271// IfNoneMatch sets the optional parameter which makes the operation 11272// fail if the object's ETag matches the given value. This is useful for 11273// getting updates only after the object has changed since the last 11274// request. Use googleapi.IsNotModified to check whether the response 11275// error from Do is the result of In-None-Match. 11276func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall { 11277 c.ifNoneMatch_ = entityTag 11278 return c 11279} 11280 11281// Context sets the context to be used in this call's Do method. Any 11282// pending HTTP request will be aborted if the provided context is 11283// canceled. 11284func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall { 11285 c.ctx_ = ctx 11286 return c 11287} 11288 11289// Header returns an http.Header that can be modified by the caller to 11290// add HTTP headers to the request. 11291func (c *ProjectsLocationsJobsGetCall) Header() http.Header { 11292 if c.header_ == nil { 11293 c.header_ = make(http.Header) 11294 } 11295 return c.header_ 11296} 11297 11298func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) { 11299 reqHeaders := make(http.Header) 11300 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11301 for k, v := range c.header_ { 11302 reqHeaders[k] = v 11303 } 11304 reqHeaders.Set("User-Agent", c.s.userAgent()) 11305 if c.ifNoneMatch_ != "" { 11306 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11307 } 11308 var body io.Reader = nil 11309 c.urlParams_.Set("alt", alt) 11310 c.urlParams_.Set("prettyPrint", "false") 11311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") 11312 urls += "?" + c.urlParams_.Encode() 11313 req, err := http.NewRequest("GET", urls, body) 11314 if err != nil { 11315 return nil, err 11316 } 11317 req.Header = reqHeaders 11318 googleapi.Expand(req.URL, map[string]string{ 11319 "projectId": c.projectId, 11320 "location": c.location, 11321 "jobId": c.jobId, 11322 }) 11323 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11324} 11325 11326// Do executes the "dataflow.projects.locations.jobs.get" call. 11327// Exactly one of *Job or error will be non-nil. Any non-2xx status code 11328// is an error. Response headers are in either 11329// *Job.ServerResponse.Header or (if a response was returned at all) in 11330// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11331// whether the returned error was because http.StatusNotModified was 11332// returned. 11333func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 11334 gensupport.SetOptions(c.urlParams_, opts...) 11335 res, err := c.doRequest("json") 11336 if res != nil && res.StatusCode == http.StatusNotModified { 11337 if res.Body != nil { 11338 res.Body.Close() 11339 } 11340 return nil, &googleapi.Error{ 11341 Code: res.StatusCode, 11342 Header: res.Header, 11343 } 11344 } 11345 if err != nil { 11346 return nil, err 11347 } 11348 defer googleapi.CloseBody(res) 11349 if err := googleapi.CheckResponse(res); err != nil { 11350 return nil, err 11351 } 11352 ret := &Job{ 11353 ServerResponse: googleapi.ServerResponse{ 11354 Header: res.Header, 11355 HTTPStatusCode: res.StatusCode, 11356 }, 11357 } 11358 target := &ret 11359 if err := gensupport.DecodeResponse(target, res); err != nil { 11360 return nil, err 11361 } 11362 return ret, nil 11363 // { 11364 // "description": "Gets the state of the specified Cloud Dataflow job. To get the state of a job, we recommend using `projects.locations.jobs.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.get` is not recommended, as you can only get the state of jobs that are running in `us-central1`.", 11365 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 11366 // "httpMethod": "GET", 11367 // "id": "dataflow.projects.locations.jobs.get", 11368 // "parameterOrder": [ 11369 // "projectId", 11370 // "location", 11371 // "jobId" 11372 // ], 11373 // "parameters": { 11374 // "jobId": { 11375 // "description": "The job ID.", 11376 // "location": "path", 11377 // "required": true, 11378 // "type": "string" 11379 // }, 11380 // "location": { 11381 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 11382 // "location": "path", 11383 // "required": true, 11384 // "type": "string" 11385 // }, 11386 // "projectId": { 11387 // "description": "The ID of the Cloud Platform project that the job belongs to.", 11388 // "location": "path", 11389 // "required": true, 11390 // "type": "string" 11391 // }, 11392 // "view": { 11393 // "description": "The level of information requested in response.", 11394 // "enum": [ 11395 // "JOB_VIEW_UNKNOWN", 11396 // "JOB_VIEW_SUMMARY", 11397 // "JOB_VIEW_ALL", 11398 // "JOB_VIEW_DESCRIPTION" 11399 // ], 11400 // "enumDescriptions": [ 11401 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 11402 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 11403 // "Request all information available for this job.", 11404 // "Request summary info and limited job description data for steps, labels and environment." 11405 // ], 11406 // "location": "query", 11407 // "type": "string" 11408 // } 11409 // }, 11410 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 11411 // "response": { 11412 // "$ref": "Job" 11413 // }, 11414 // "scopes": [ 11415 // "https://www.googleapis.com/auth/cloud-platform", 11416 // "https://www.googleapis.com/auth/compute", 11417 // "https://www.googleapis.com/auth/compute.readonly", 11418 // "https://www.googleapis.com/auth/userinfo.email" 11419 // ] 11420 // } 11421 11422} 11423 11424// method id "dataflow.projects.locations.jobs.getExecutionDetails": 11425 11426type ProjectsLocationsJobsGetExecutionDetailsCall struct { 11427 s *Service 11428 projectId string 11429 location string 11430 jobId string 11431 urlParams_ gensupport.URLParams 11432 ifNoneMatch_ string 11433 ctx_ context.Context 11434 header_ http.Header 11435} 11436 11437// GetExecutionDetails: Request detailed information about the execution 11438// status of the job. EXPERIMENTAL. This API is subject to change or 11439// removal without notice. 11440// 11441// - jobId: The job to get execution details for. 11442// - location: The [regional endpoint] 11443// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 11444// that contains the job specified by job_id. 11445// - projectId: A project id. 11446func (r *ProjectsLocationsJobsService) GetExecutionDetails(projectId string, location string, jobId string) *ProjectsLocationsJobsGetExecutionDetailsCall { 11447 c := &ProjectsLocationsJobsGetExecutionDetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11448 c.projectId = projectId 11449 c.location = location 11450 c.jobId = jobId 11451 return c 11452} 11453 11454// PageSize sets the optional parameter "pageSize": If specified, 11455// determines the maximum number of stages to return. If unspecified, 11456// the service may choose an appropriate default, or may return an 11457// arbitrarily large number of results. 11458func (c *ProjectsLocationsJobsGetExecutionDetailsCall) PageSize(pageSize int64) *ProjectsLocationsJobsGetExecutionDetailsCall { 11459 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11460 return c 11461} 11462 11463// PageToken sets the optional parameter "pageToken": If supplied, this 11464// should be the value of next_page_token returned by an earlier call. 11465// This will cause the next page of results to be returned. 11466func (c *ProjectsLocationsJobsGetExecutionDetailsCall) PageToken(pageToken string) *ProjectsLocationsJobsGetExecutionDetailsCall { 11467 c.urlParams_.Set("pageToken", pageToken) 11468 return c 11469} 11470 11471// Fields allows partial responses to be retrieved. See 11472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11473// for more information. 11474func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetExecutionDetailsCall { 11475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11476 return c 11477} 11478 11479// IfNoneMatch sets the optional parameter which makes the operation 11480// fail if the object's ETag matches the given value. This is useful for 11481// getting updates only after the object has changed since the last 11482// request. Use googleapi.IsNotModified to check whether the response 11483// error from Do is the result of In-None-Match. 11484func (c *ProjectsLocationsJobsGetExecutionDetailsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetExecutionDetailsCall { 11485 c.ifNoneMatch_ = entityTag 11486 return c 11487} 11488 11489// Context sets the context to be used in this call's Do method. Any 11490// pending HTTP request will be aborted if the provided context is 11491// canceled. 11492func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetExecutionDetailsCall { 11493 c.ctx_ = ctx 11494 return c 11495} 11496 11497// Header returns an http.Header that can be modified by the caller to 11498// add HTTP headers to the request. 11499func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Header() http.Header { 11500 if c.header_ == nil { 11501 c.header_ = make(http.Header) 11502 } 11503 return c.header_ 11504} 11505 11506func (c *ProjectsLocationsJobsGetExecutionDetailsCall) doRequest(alt string) (*http.Response, error) { 11507 reqHeaders := make(http.Header) 11508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11509 for k, v := range c.header_ { 11510 reqHeaders[k] = v 11511 } 11512 reqHeaders.Set("User-Agent", c.s.userAgent()) 11513 if c.ifNoneMatch_ != "" { 11514 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11515 } 11516 var body io.Reader = nil 11517 c.urlParams_.Set("alt", alt) 11518 c.urlParams_.Set("prettyPrint", "false") 11519 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/executionDetails") 11520 urls += "?" + c.urlParams_.Encode() 11521 req, err := http.NewRequest("GET", urls, body) 11522 if err != nil { 11523 return nil, err 11524 } 11525 req.Header = reqHeaders 11526 googleapi.Expand(req.URL, map[string]string{ 11527 "projectId": c.projectId, 11528 "location": c.location, 11529 "jobId": c.jobId, 11530 }) 11531 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11532} 11533 11534// Do executes the "dataflow.projects.locations.jobs.getExecutionDetails" call. 11535// Exactly one of *JobExecutionDetails or error will be non-nil. Any 11536// non-2xx status code is an error. Response headers are in either 11537// *JobExecutionDetails.ServerResponse.Header or (if a response was 11538// returned at all) in error.(*googleapi.Error).Header. Use 11539// googleapi.IsNotModified to check whether the returned error was 11540// because http.StatusNotModified was returned. 11541func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Do(opts ...googleapi.CallOption) (*JobExecutionDetails, error) { 11542 gensupport.SetOptions(c.urlParams_, opts...) 11543 res, err := c.doRequest("json") 11544 if res != nil && res.StatusCode == http.StatusNotModified { 11545 if res.Body != nil { 11546 res.Body.Close() 11547 } 11548 return nil, &googleapi.Error{ 11549 Code: res.StatusCode, 11550 Header: res.Header, 11551 } 11552 } 11553 if err != nil { 11554 return nil, err 11555 } 11556 defer googleapi.CloseBody(res) 11557 if err := googleapi.CheckResponse(res); err != nil { 11558 return nil, err 11559 } 11560 ret := &JobExecutionDetails{ 11561 ServerResponse: googleapi.ServerResponse{ 11562 Header: res.Header, 11563 HTTPStatusCode: res.StatusCode, 11564 }, 11565 } 11566 target := &ret 11567 if err := gensupport.DecodeResponse(target, res); err != nil { 11568 return nil, err 11569 } 11570 return ret, nil 11571 // { 11572 // "description": "Request detailed information about the execution status of the job. EXPERIMENTAL. This API is subject to change or removal without notice.", 11573 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/executionDetails", 11574 // "httpMethod": "GET", 11575 // "id": "dataflow.projects.locations.jobs.getExecutionDetails", 11576 // "parameterOrder": [ 11577 // "projectId", 11578 // "location", 11579 // "jobId" 11580 // ], 11581 // "parameters": { 11582 // "jobId": { 11583 // "description": "The job to get execution details for.", 11584 // "location": "path", 11585 // "required": true, 11586 // "type": "string" 11587 // }, 11588 // "location": { 11589 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 11590 // "location": "path", 11591 // "required": true, 11592 // "type": "string" 11593 // }, 11594 // "pageSize": { 11595 // "description": "If specified, determines the maximum number of stages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.", 11596 // "format": "int32", 11597 // "location": "query", 11598 // "type": "integer" 11599 // }, 11600 // "pageToken": { 11601 // "description": "If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.", 11602 // "location": "query", 11603 // "type": "string" 11604 // }, 11605 // "projectId": { 11606 // "description": "A project id.", 11607 // "location": "path", 11608 // "required": true, 11609 // "type": "string" 11610 // } 11611 // }, 11612 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/executionDetails", 11613 // "response": { 11614 // "$ref": "JobExecutionDetails" 11615 // }, 11616 // "scopes": [ 11617 // "https://www.googleapis.com/auth/cloud-platform", 11618 // "https://www.googleapis.com/auth/compute", 11619 // "https://www.googleapis.com/auth/compute.readonly", 11620 // "https://www.googleapis.com/auth/userinfo.email" 11621 // ] 11622 // } 11623 11624} 11625 11626// Pages invokes f for each page of results. 11627// A non-nil error returned from f will halt the iteration. 11628// The provided context supersedes any context provided to the Context method. 11629func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Pages(ctx context.Context, f func(*JobExecutionDetails) error) error { 11630 c.ctx_ = ctx 11631 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11632 for { 11633 x, err := c.Do() 11634 if err != nil { 11635 return err 11636 } 11637 if err := f(x); err != nil { 11638 return err 11639 } 11640 if x.NextPageToken == "" { 11641 return nil 11642 } 11643 c.PageToken(x.NextPageToken) 11644 } 11645} 11646 11647// method id "dataflow.projects.locations.jobs.getMetrics": 11648 11649type ProjectsLocationsJobsGetMetricsCall struct { 11650 s *Service 11651 projectId string 11652 location string 11653 jobId string 11654 urlParams_ gensupport.URLParams 11655 ifNoneMatch_ string 11656 ctx_ context.Context 11657 header_ http.Header 11658} 11659 11660// GetMetrics: Request the job status. To request the status of a job, 11661// we recommend using `projects.locations.jobs.getMetrics` with a 11662// [regional endpoint] 11663// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 11664// Using `projects.jobs.getMetrics` is not recommended, as you can only 11665// request the status of jobs that are running in `us-central1`. 11666// 11667// - jobId: The job to get metrics for. 11668// - location: The [regional endpoint] 11669// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 11670// that contains the job specified by job_id. 11671// - projectId: A project id. 11672func (r *ProjectsLocationsJobsService) GetMetrics(projectId string, location string, jobId string) *ProjectsLocationsJobsGetMetricsCall { 11673 c := &ProjectsLocationsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11674 c.projectId = projectId 11675 c.location = location 11676 c.jobId = jobId 11677 return c 11678} 11679 11680// StartTime sets the optional parameter "startTime": Return only metric 11681// data that has changed since this time. Default is to return all 11682// information about all metrics for the job. 11683func (c *ProjectsLocationsJobsGetMetricsCall) StartTime(startTime string) *ProjectsLocationsJobsGetMetricsCall { 11684 c.urlParams_.Set("startTime", startTime) 11685 return c 11686} 11687 11688// Fields allows partial responses to be retrieved. See 11689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11690// for more information. 11691func (c *ProjectsLocationsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetMetricsCall { 11692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11693 return c 11694} 11695 11696// IfNoneMatch sets the optional parameter which makes the operation 11697// fail if the object's ETag matches the given value. This is useful for 11698// getting updates only after the object has changed since the last 11699// request. Use googleapi.IsNotModified to check whether the response 11700// error from Do is the result of In-None-Match. 11701func (c *ProjectsLocationsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetMetricsCall { 11702 c.ifNoneMatch_ = entityTag 11703 return c 11704} 11705 11706// Context sets the context to be used in this call's Do method. Any 11707// pending HTTP request will be aborted if the provided context is 11708// canceled. 11709func (c *ProjectsLocationsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetMetricsCall { 11710 c.ctx_ = ctx 11711 return c 11712} 11713 11714// Header returns an http.Header that can be modified by the caller to 11715// add HTTP headers to the request. 11716func (c *ProjectsLocationsJobsGetMetricsCall) Header() http.Header { 11717 if c.header_ == nil { 11718 c.header_ = make(http.Header) 11719 } 11720 return c.header_ 11721} 11722 11723func (c *ProjectsLocationsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) { 11724 reqHeaders := make(http.Header) 11725 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11726 for k, v := range c.header_ { 11727 reqHeaders[k] = v 11728 } 11729 reqHeaders.Set("User-Agent", c.s.userAgent()) 11730 if c.ifNoneMatch_ != "" { 11731 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11732 } 11733 var body io.Reader = nil 11734 c.urlParams_.Set("alt", alt) 11735 c.urlParams_.Set("prettyPrint", "false") 11736 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics") 11737 urls += "?" + c.urlParams_.Encode() 11738 req, err := http.NewRequest("GET", urls, body) 11739 if err != nil { 11740 return nil, err 11741 } 11742 req.Header = reqHeaders 11743 googleapi.Expand(req.URL, map[string]string{ 11744 "projectId": c.projectId, 11745 "location": c.location, 11746 "jobId": c.jobId, 11747 }) 11748 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11749} 11750 11751// Do executes the "dataflow.projects.locations.jobs.getMetrics" call. 11752// Exactly one of *JobMetrics or error will be non-nil. Any non-2xx 11753// status code is an error. Response headers are in either 11754// *JobMetrics.ServerResponse.Header or (if a response was returned at 11755// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11756// to check whether the returned error was because 11757// http.StatusNotModified was returned. 11758func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) { 11759 gensupport.SetOptions(c.urlParams_, opts...) 11760 res, err := c.doRequest("json") 11761 if res != nil && res.StatusCode == http.StatusNotModified { 11762 if res.Body != nil { 11763 res.Body.Close() 11764 } 11765 return nil, &googleapi.Error{ 11766 Code: res.StatusCode, 11767 Header: res.Header, 11768 } 11769 } 11770 if err != nil { 11771 return nil, err 11772 } 11773 defer googleapi.CloseBody(res) 11774 if err := googleapi.CheckResponse(res); err != nil { 11775 return nil, err 11776 } 11777 ret := &JobMetrics{ 11778 ServerResponse: googleapi.ServerResponse{ 11779 Header: res.Header, 11780 HTTPStatusCode: res.StatusCode, 11781 }, 11782 } 11783 target := &ret 11784 if err := gensupport.DecodeResponse(target, res); err != nil { 11785 return nil, err 11786 } 11787 return ret, nil 11788 // { 11789 // "description": "Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.getMetrics` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.getMetrics` is not recommended, as you can only request the status of jobs that are running in `us-central1`.", 11790 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", 11791 // "httpMethod": "GET", 11792 // "id": "dataflow.projects.locations.jobs.getMetrics", 11793 // "parameterOrder": [ 11794 // "projectId", 11795 // "location", 11796 // "jobId" 11797 // ], 11798 // "parameters": { 11799 // "jobId": { 11800 // "description": "The job to get metrics for.", 11801 // "location": "path", 11802 // "required": true, 11803 // "type": "string" 11804 // }, 11805 // "location": { 11806 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 11807 // "location": "path", 11808 // "required": true, 11809 // "type": "string" 11810 // }, 11811 // "projectId": { 11812 // "description": "A project id.", 11813 // "location": "path", 11814 // "required": true, 11815 // "type": "string" 11816 // }, 11817 // "startTime": { 11818 // "description": "Return only metric data that has changed since this time. Default is to return all information about all metrics for the job.", 11819 // "format": "google-datetime", 11820 // "location": "query", 11821 // "type": "string" 11822 // } 11823 // }, 11824 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", 11825 // "response": { 11826 // "$ref": "JobMetrics" 11827 // }, 11828 // "scopes": [ 11829 // "https://www.googleapis.com/auth/cloud-platform", 11830 // "https://www.googleapis.com/auth/compute", 11831 // "https://www.googleapis.com/auth/compute.readonly", 11832 // "https://www.googleapis.com/auth/userinfo.email" 11833 // ] 11834 // } 11835 11836} 11837 11838// method id "dataflow.projects.locations.jobs.list": 11839 11840type ProjectsLocationsJobsListCall struct { 11841 s *Service 11842 projectId string 11843 location string 11844 urlParams_ gensupport.URLParams 11845 ifNoneMatch_ string 11846 ctx_ context.Context 11847 header_ http.Header 11848} 11849 11850// List: List the jobs of a project. To list the jobs of a project in a 11851// region, we recommend using `projects.locations.jobs.list` with a 11852// [regional endpoint] 11853// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 11854// To list the all jobs across all regions, use 11855// `projects.jobs.aggregated`. Using `projects.jobs.list` is not 11856// recommended, as you can only get the list of jobs that are running in 11857// `us-central1`. 11858// 11859// - location: The [regional endpoint] 11860// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 11861// that contains this job. 11862// - projectId: The project which owns the jobs. 11863func (r *ProjectsLocationsJobsService) List(projectId string, location string) *ProjectsLocationsJobsListCall { 11864 c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11865 c.projectId = projectId 11866 c.location = location 11867 return c 11868} 11869 11870// Filter sets the optional parameter "filter": The kind of filter to 11871// use. 11872// 11873// Possible values: 11874// "UNKNOWN" - The filter isn't specified, or is unknown. This returns 11875// all jobs ordered on descending `JobUuid`. 11876// "ALL" - Returns all running jobs first ordered on creation 11877// timestamp, then returns all terminated jobs ordered on the 11878// termination timestamp. 11879// "TERMINATED" - Filters the jobs that have a terminated state, 11880// ordered on the termination timestamp. Example terminated states: 11881// `JOB_STATE_STOPPED`, `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. 11882// "ACTIVE" - Filters the jobs that are running ordered on the 11883// creation timestamp. 11884func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall { 11885 c.urlParams_.Set("filter", filter) 11886 return c 11887} 11888 11889// PageSize sets the optional parameter "pageSize": If there are many 11890// jobs, limit response to at most this many. The actual number of jobs 11891// returned will be the lesser of max_responses and an unspecified 11892// server-defined limit. 11893func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall { 11894 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11895 return c 11896} 11897 11898// PageToken sets the optional parameter "pageToken": Set this to the 11899// 'next_page_token' field of a previous response to request additional 11900// results in a long list. 11901func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall { 11902 c.urlParams_.Set("pageToken", pageToken) 11903 return c 11904} 11905 11906// View sets the optional parameter "view": Deprecated. ListJobs always 11907// returns summaries now. Use GetJob for other JobViews. 11908// 11909// Possible values: 11910// "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 11911// unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` 11912// information, and may contain additional information. 11913// "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, 11914// Job ID, job name, job type, job status, start/end time, and Cloud SDK 11915// version details. 11916// "JOB_VIEW_ALL" - Request all information available for this job. 11917// "JOB_VIEW_DESCRIPTION" - Request summary info and limited job 11918// description data for steps, labels and environment. 11919func (c *ProjectsLocationsJobsListCall) View(view string) *ProjectsLocationsJobsListCall { 11920 c.urlParams_.Set("view", view) 11921 return c 11922} 11923 11924// Fields allows partial responses to be retrieved. See 11925// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11926// for more information. 11927func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall { 11928 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11929 return c 11930} 11931 11932// IfNoneMatch sets the optional parameter which makes the operation 11933// fail if the object's ETag matches the given value. This is useful for 11934// getting updates only after the object has changed since the last 11935// request. Use googleapi.IsNotModified to check whether the response 11936// error from Do is the result of In-None-Match. 11937func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall { 11938 c.ifNoneMatch_ = entityTag 11939 return c 11940} 11941 11942// Context sets the context to be used in this call's Do method. Any 11943// pending HTTP request will be aborted if the provided context is 11944// canceled. 11945func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall { 11946 c.ctx_ = ctx 11947 return c 11948} 11949 11950// Header returns an http.Header that can be modified by the caller to 11951// add HTTP headers to the request. 11952func (c *ProjectsLocationsJobsListCall) Header() http.Header { 11953 if c.header_ == nil { 11954 c.header_ = make(http.Header) 11955 } 11956 return c.header_ 11957} 11958 11959func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) { 11960 reqHeaders := make(http.Header) 11961 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 11962 for k, v := range c.header_ { 11963 reqHeaders[k] = v 11964 } 11965 reqHeaders.Set("User-Agent", c.s.userAgent()) 11966 if c.ifNoneMatch_ != "" { 11967 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11968 } 11969 var body io.Reader = nil 11970 c.urlParams_.Set("alt", alt) 11971 c.urlParams_.Set("prettyPrint", "false") 11972 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") 11973 urls += "?" + c.urlParams_.Encode() 11974 req, err := http.NewRequest("GET", urls, body) 11975 if err != nil { 11976 return nil, err 11977 } 11978 req.Header = reqHeaders 11979 googleapi.Expand(req.URL, map[string]string{ 11980 "projectId": c.projectId, 11981 "location": c.location, 11982 }) 11983 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11984} 11985 11986// Do executes the "dataflow.projects.locations.jobs.list" call. 11987// Exactly one of *ListJobsResponse or error will be non-nil. Any 11988// non-2xx status code is an error. Response headers are in either 11989// *ListJobsResponse.ServerResponse.Header or (if a response was 11990// returned at all) in error.(*googleapi.Error).Header. Use 11991// googleapi.IsNotModified to check whether the returned error was 11992// because http.StatusNotModified was returned. 11993func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 11994 gensupport.SetOptions(c.urlParams_, opts...) 11995 res, err := c.doRequest("json") 11996 if res != nil && res.StatusCode == http.StatusNotModified { 11997 if res.Body != nil { 11998 res.Body.Close() 11999 } 12000 return nil, &googleapi.Error{ 12001 Code: res.StatusCode, 12002 Header: res.Header, 12003 } 12004 } 12005 if err != nil { 12006 return nil, err 12007 } 12008 defer googleapi.CloseBody(res) 12009 if err := googleapi.CheckResponse(res); err != nil { 12010 return nil, err 12011 } 12012 ret := &ListJobsResponse{ 12013 ServerResponse: googleapi.ServerResponse{ 12014 Header: res.Header, 12015 HTTPStatusCode: res.StatusCode, 12016 }, 12017 } 12018 target := &ret 12019 if err := gensupport.DecodeResponse(target, res); err != nil { 12020 return nil, err 12021 } 12022 return ret, nil 12023 // { 12024 // "description": "List the jobs of a project. To list the jobs of a project in a region, we recommend using `projects.locations.jobs.list` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To list the all jobs across all regions, use `projects.jobs.aggregated`. Using `projects.jobs.list` is not recommended, as you can only get the list of jobs that are running in `us-central1`.", 12025 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", 12026 // "httpMethod": "GET", 12027 // "id": "dataflow.projects.locations.jobs.list", 12028 // "parameterOrder": [ 12029 // "projectId", 12030 // "location" 12031 // ], 12032 // "parameters": { 12033 // "filter": { 12034 // "description": "The kind of filter to use.", 12035 // "enum": [ 12036 // "UNKNOWN", 12037 // "ALL", 12038 // "TERMINATED", 12039 // "ACTIVE" 12040 // ], 12041 // "enumDescriptions": [ 12042 // "The filter isn't specified, or is unknown. This returns all jobs ordered on descending `JobUuid`.", 12043 // "Returns all running jobs first ordered on creation timestamp, then returns all terminated jobs ordered on the termination timestamp.", 12044 // "Filters the jobs that have a terminated state, ordered on the termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc.", 12045 // "Filters the jobs that are running ordered on the creation timestamp." 12046 // ], 12047 // "location": "query", 12048 // "type": "string" 12049 // }, 12050 // "location": { 12051 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 12052 // "location": "path", 12053 // "required": true, 12054 // "type": "string" 12055 // }, 12056 // "pageSize": { 12057 // "description": "If there are many jobs, limit response to at most this many. The actual number of jobs returned will be the lesser of max_responses and an unspecified server-defined limit.", 12058 // "format": "int32", 12059 // "location": "query", 12060 // "type": "integer" 12061 // }, 12062 // "pageToken": { 12063 // "description": "Set this to the 'next_page_token' field of a previous response to request additional results in a long list.", 12064 // "location": "query", 12065 // "type": "string" 12066 // }, 12067 // "projectId": { 12068 // "description": "The project which owns the jobs.", 12069 // "location": "path", 12070 // "required": true, 12071 // "type": "string" 12072 // }, 12073 // "view": { 12074 // "description": "Deprecated. ListJobs always returns summaries now. Use GetJob for other JobViews.", 12075 // "enum": [ 12076 // "JOB_VIEW_UNKNOWN", 12077 // "JOB_VIEW_SUMMARY", 12078 // "JOB_VIEW_ALL", 12079 // "JOB_VIEW_DESCRIPTION" 12080 // ], 12081 // "enumDescriptions": [ 12082 // "The job view to return isn't specified, or is unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, and may contain additional information.", 12083 // "Request summary information only: Project ID, Job ID, job name, job type, job status, start/end time, and Cloud SDK version details.", 12084 // "Request all information available for this job.", 12085 // "Request summary info and limited job description data for steps, labels and environment." 12086 // ], 12087 // "location": "query", 12088 // "type": "string" 12089 // } 12090 // }, 12091 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs", 12092 // "response": { 12093 // "$ref": "ListJobsResponse" 12094 // }, 12095 // "scopes": [ 12096 // "https://www.googleapis.com/auth/cloud-platform", 12097 // "https://www.googleapis.com/auth/compute", 12098 // "https://www.googleapis.com/auth/compute.readonly", 12099 // "https://www.googleapis.com/auth/userinfo.email" 12100 // ] 12101 // } 12102 12103} 12104 12105// Pages invokes f for each page of results. 12106// A non-nil error returned from f will halt the iteration. 12107// The provided context supersedes any context provided to the Context method. 12108func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 12109 c.ctx_ = ctx 12110 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12111 for { 12112 x, err := c.Do() 12113 if err != nil { 12114 return err 12115 } 12116 if err := f(x); err != nil { 12117 return err 12118 } 12119 if x.NextPageToken == "" { 12120 return nil 12121 } 12122 c.PageToken(x.NextPageToken) 12123 } 12124} 12125 12126// method id "dataflow.projects.locations.jobs.snapshot": 12127 12128type ProjectsLocationsJobsSnapshotCall struct { 12129 s *Service 12130 projectId string 12131 location string 12132 jobId string 12133 snapshotjobrequest *SnapshotJobRequest 12134 urlParams_ gensupport.URLParams 12135 ctx_ context.Context 12136 header_ http.Header 12137} 12138 12139// Snapshot: Snapshot the state of a streaming job. 12140// 12141// - jobId: The job to be snapshotted. 12142// - location: The location that contains this job. 12143// - projectId: The project which owns the job to be snapshotted. 12144func (r *ProjectsLocationsJobsService) Snapshot(projectId string, location string, jobId string, snapshotjobrequest *SnapshotJobRequest) *ProjectsLocationsJobsSnapshotCall { 12145 c := &ProjectsLocationsJobsSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12146 c.projectId = projectId 12147 c.location = location 12148 c.jobId = jobId 12149 c.snapshotjobrequest = snapshotjobrequest 12150 return c 12151} 12152 12153// Fields allows partial responses to be retrieved. See 12154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12155// for more information. 12156func (c *ProjectsLocationsJobsSnapshotCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsSnapshotCall { 12157 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12158 return c 12159} 12160 12161// Context sets the context to be used in this call's Do method. Any 12162// pending HTTP request will be aborted if the provided context is 12163// canceled. 12164func (c *ProjectsLocationsJobsSnapshotCall) Context(ctx context.Context) *ProjectsLocationsJobsSnapshotCall { 12165 c.ctx_ = ctx 12166 return c 12167} 12168 12169// Header returns an http.Header that can be modified by the caller to 12170// add HTTP headers to the request. 12171func (c *ProjectsLocationsJobsSnapshotCall) Header() http.Header { 12172 if c.header_ == nil { 12173 c.header_ = make(http.Header) 12174 } 12175 return c.header_ 12176} 12177 12178func (c *ProjectsLocationsJobsSnapshotCall) doRequest(alt string) (*http.Response, error) { 12179 reqHeaders := make(http.Header) 12180 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12181 for k, v := range c.header_ { 12182 reqHeaders[k] = v 12183 } 12184 reqHeaders.Set("User-Agent", c.s.userAgent()) 12185 var body io.Reader = nil 12186 body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotjobrequest) 12187 if err != nil { 12188 return nil, err 12189 } 12190 reqHeaders.Set("Content-Type", "application/json") 12191 c.urlParams_.Set("alt", alt) 12192 c.urlParams_.Set("prettyPrint", "false") 12193 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot") 12194 urls += "?" + c.urlParams_.Encode() 12195 req, err := http.NewRequest("POST", urls, body) 12196 if err != nil { 12197 return nil, err 12198 } 12199 req.Header = reqHeaders 12200 googleapi.Expand(req.URL, map[string]string{ 12201 "projectId": c.projectId, 12202 "location": c.location, 12203 "jobId": c.jobId, 12204 }) 12205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12206} 12207 12208// Do executes the "dataflow.projects.locations.jobs.snapshot" call. 12209// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status 12210// code is an error. Response headers are in either 12211// *Snapshot.ServerResponse.Header or (if a response was returned at 12212// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12213// to check whether the returned error was because 12214// http.StatusNotModified was returned. 12215func (c *ProjectsLocationsJobsSnapshotCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 12216 gensupport.SetOptions(c.urlParams_, opts...) 12217 res, err := c.doRequest("json") 12218 if res != nil && res.StatusCode == http.StatusNotModified { 12219 if res.Body != nil { 12220 res.Body.Close() 12221 } 12222 return nil, &googleapi.Error{ 12223 Code: res.StatusCode, 12224 Header: res.Header, 12225 } 12226 } 12227 if err != nil { 12228 return nil, err 12229 } 12230 defer googleapi.CloseBody(res) 12231 if err := googleapi.CheckResponse(res); err != nil { 12232 return nil, err 12233 } 12234 ret := &Snapshot{ 12235 ServerResponse: googleapi.ServerResponse{ 12236 Header: res.Header, 12237 HTTPStatusCode: res.StatusCode, 12238 }, 12239 } 12240 target := &ret 12241 if err := gensupport.DecodeResponse(target, res); err != nil { 12242 return nil, err 12243 } 12244 return ret, nil 12245 // { 12246 // "description": "Snapshot the state of a streaming job.", 12247 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot", 12248 // "httpMethod": "POST", 12249 // "id": "dataflow.projects.locations.jobs.snapshot", 12250 // "parameterOrder": [ 12251 // "projectId", 12252 // "location", 12253 // "jobId" 12254 // ], 12255 // "parameters": { 12256 // "jobId": { 12257 // "description": "The job to be snapshotted.", 12258 // "location": "path", 12259 // "required": true, 12260 // "type": "string" 12261 // }, 12262 // "location": { 12263 // "description": "The location that contains this job.", 12264 // "location": "path", 12265 // "required": true, 12266 // "type": "string" 12267 // }, 12268 // "projectId": { 12269 // "description": "The project which owns the job to be snapshotted.", 12270 // "location": "path", 12271 // "required": true, 12272 // "type": "string" 12273 // } 12274 // }, 12275 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot", 12276 // "request": { 12277 // "$ref": "SnapshotJobRequest" 12278 // }, 12279 // "response": { 12280 // "$ref": "Snapshot" 12281 // }, 12282 // "scopes": [ 12283 // "https://www.googleapis.com/auth/cloud-platform", 12284 // "https://www.googleapis.com/auth/compute", 12285 // "https://www.googleapis.com/auth/compute.readonly", 12286 // "https://www.googleapis.com/auth/userinfo.email" 12287 // ] 12288 // } 12289 12290} 12291 12292// method id "dataflow.projects.locations.jobs.update": 12293 12294type ProjectsLocationsJobsUpdateCall struct { 12295 s *Service 12296 projectId string 12297 location string 12298 jobId string 12299 job *Job 12300 urlParams_ gensupport.URLParams 12301 ctx_ context.Context 12302 header_ http.Header 12303} 12304 12305// Update: Updates the state of an existing Cloud Dataflow job. To 12306// update the state of an existing job, we recommend using 12307// `projects.locations.jobs.update` with a [regional endpoint] 12308// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 12309// Using `projects.jobs.update` is not recommended, as you can only 12310// update the state of jobs that are running in `us-central1`. 12311// 12312// - jobId: The job ID. 12313// - location: The [regional endpoint] 12314// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 12315// that contains this job. 12316// - projectId: The ID of the Cloud Platform project that the job 12317// belongs to. 12318func (r *ProjectsLocationsJobsService) Update(projectId string, location string, jobId string, job *Job) *ProjectsLocationsJobsUpdateCall { 12319 c := &ProjectsLocationsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12320 c.projectId = projectId 12321 c.location = location 12322 c.jobId = jobId 12323 c.job = job 12324 return c 12325} 12326 12327// Fields allows partial responses to be retrieved. See 12328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12329// for more information. 12330func (c *ProjectsLocationsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsUpdateCall { 12331 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12332 return c 12333} 12334 12335// Context sets the context to be used in this call's Do method. Any 12336// pending HTTP request will be aborted if the provided context is 12337// canceled. 12338func (c *ProjectsLocationsJobsUpdateCall) Context(ctx context.Context) *ProjectsLocationsJobsUpdateCall { 12339 c.ctx_ = ctx 12340 return c 12341} 12342 12343// Header returns an http.Header that can be modified by the caller to 12344// add HTTP headers to the request. 12345func (c *ProjectsLocationsJobsUpdateCall) Header() http.Header { 12346 if c.header_ == nil { 12347 c.header_ = make(http.Header) 12348 } 12349 return c.header_ 12350} 12351 12352func (c *ProjectsLocationsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { 12353 reqHeaders := make(http.Header) 12354 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12355 for k, v := range c.header_ { 12356 reqHeaders[k] = v 12357 } 12358 reqHeaders.Set("User-Agent", c.s.userAgent()) 12359 var body io.Reader = nil 12360 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 12361 if err != nil { 12362 return nil, err 12363 } 12364 reqHeaders.Set("Content-Type", "application/json") 12365 c.urlParams_.Set("alt", alt) 12366 c.urlParams_.Set("prettyPrint", "false") 12367 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") 12368 urls += "?" + c.urlParams_.Encode() 12369 req, err := http.NewRequest("PUT", urls, body) 12370 if err != nil { 12371 return nil, err 12372 } 12373 req.Header = reqHeaders 12374 googleapi.Expand(req.URL, map[string]string{ 12375 "projectId": c.projectId, 12376 "location": c.location, 12377 "jobId": c.jobId, 12378 }) 12379 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12380} 12381 12382// Do executes the "dataflow.projects.locations.jobs.update" call. 12383// Exactly one of *Job or error will be non-nil. Any non-2xx status code 12384// is an error. Response headers are in either 12385// *Job.ServerResponse.Header or (if a response was returned at all) in 12386// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12387// whether the returned error was because http.StatusNotModified was 12388// returned. 12389func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 12390 gensupport.SetOptions(c.urlParams_, opts...) 12391 res, err := c.doRequest("json") 12392 if res != nil && res.StatusCode == http.StatusNotModified { 12393 if res.Body != nil { 12394 res.Body.Close() 12395 } 12396 return nil, &googleapi.Error{ 12397 Code: res.StatusCode, 12398 Header: res.Header, 12399 } 12400 } 12401 if err != nil { 12402 return nil, err 12403 } 12404 defer googleapi.CloseBody(res) 12405 if err := googleapi.CheckResponse(res); err != nil { 12406 return nil, err 12407 } 12408 ret := &Job{ 12409 ServerResponse: googleapi.ServerResponse{ 12410 Header: res.Header, 12411 HTTPStatusCode: res.StatusCode, 12412 }, 12413 } 12414 target := &ret 12415 if err := gensupport.DecodeResponse(target, res); err != nil { 12416 return nil, err 12417 } 12418 return ret, nil 12419 // { 12420 // "description": "Updates the state of an existing Cloud Dataflow job. To update the state of an existing job, we recommend using `projects.locations.jobs.update` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.update` is not recommended, as you can only update the state of jobs that are running in `us-central1`.", 12421 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 12422 // "httpMethod": "PUT", 12423 // "id": "dataflow.projects.locations.jobs.update", 12424 // "parameterOrder": [ 12425 // "projectId", 12426 // "location", 12427 // "jobId" 12428 // ], 12429 // "parameters": { 12430 // "jobId": { 12431 // "description": "The job ID.", 12432 // "location": "path", 12433 // "required": true, 12434 // "type": "string" 12435 // }, 12436 // "location": { 12437 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains this job.", 12438 // "location": "path", 12439 // "required": true, 12440 // "type": "string" 12441 // }, 12442 // "projectId": { 12443 // "description": "The ID of the Cloud Platform project that the job belongs to.", 12444 // "location": "path", 12445 // "required": true, 12446 // "type": "string" 12447 // } 12448 // }, 12449 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 12450 // "request": { 12451 // "$ref": "Job" 12452 // }, 12453 // "response": { 12454 // "$ref": "Job" 12455 // }, 12456 // "scopes": [ 12457 // "https://www.googleapis.com/auth/cloud-platform", 12458 // "https://www.googleapis.com/auth/compute", 12459 // "https://www.googleapis.com/auth/compute.readonly", 12460 // "https://www.googleapis.com/auth/userinfo.email" 12461 // ] 12462 // } 12463 12464} 12465 12466// method id "dataflow.projects.locations.jobs.debug.getConfig": 12467 12468type ProjectsLocationsJobsDebugGetConfigCall struct { 12469 s *Service 12470 projectId string 12471 location string 12472 jobId string 12473 getdebugconfigrequest *GetDebugConfigRequest 12474 urlParams_ gensupport.URLParams 12475 ctx_ context.Context 12476 header_ http.Header 12477} 12478 12479// GetConfig: Get encoded debug configuration for component. Not 12480// cacheable. 12481// 12482// - jobId: The job id. 12483// - location: The [regional endpoint] 12484// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 12485// that contains the job specified by job_id. 12486// - projectId: The project id. 12487func (r *ProjectsLocationsJobsDebugService) GetConfig(projectId string, location string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsLocationsJobsDebugGetConfigCall { 12488 c := &ProjectsLocationsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12489 c.projectId = projectId 12490 c.location = location 12491 c.jobId = jobId 12492 c.getdebugconfigrequest = getdebugconfigrequest 12493 return c 12494} 12495 12496// Fields allows partial responses to be retrieved. See 12497// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12498// for more information. 12499func (c *ProjectsLocationsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugGetConfigCall { 12500 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12501 return c 12502} 12503 12504// Context sets the context to be used in this call's Do method. Any 12505// pending HTTP request will be aborted if the provided context is 12506// canceled. 12507func (c *ProjectsLocationsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugGetConfigCall { 12508 c.ctx_ = ctx 12509 return c 12510} 12511 12512// Header returns an http.Header that can be modified by the caller to 12513// add HTTP headers to the request. 12514func (c *ProjectsLocationsJobsDebugGetConfigCall) Header() http.Header { 12515 if c.header_ == nil { 12516 c.header_ = make(http.Header) 12517 } 12518 return c.header_ 12519} 12520 12521func (c *ProjectsLocationsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) { 12522 reqHeaders := make(http.Header) 12523 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12524 for k, v := range c.header_ { 12525 reqHeaders[k] = v 12526 } 12527 reqHeaders.Set("User-Agent", c.s.userAgent()) 12528 var body io.Reader = nil 12529 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest) 12530 if err != nil { 12531 return nil, err 12532 } 12533 reqHeaders.Set("Content-Type", "application/json") 12534 c.urlParams_.Set("alt", alt) 12535 c.urlParams_.Set("prettyPrint", "false") 12536 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig") 12537 urls += "?" + c.urlParams_.Encode() 12538 req, err := http.NewRequest("POST", urls, body) 12539 if err != nil { 12540 return nil, err 12541 } 12542 req.Header = reqHeaders 12543 googleapi.Expand(req.URL, map[string]string{ 12544 "projectId": c.projectId, 12545 "location": c.location, 12546 "jobId": c.jobId, 12547 }) 12548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12549} 12550 12551// Do executes the "dataflow.projects.locations.jobs.debug.getConfig" call. 12552// Exactly one of *GetDebugConfigResponse or error will be non-nil. Any 12553// non-2xx status code is an error. Response headers are in either 12554// *GetDebugConfigResponse.ServerResponse.Header or (if a response was 12555// returned at all) in error.(*googleapi.Error).Header. Use 12556// googleapi.IsNotModified to check whether the returned error was 12557// because http.StatusNotModified was returned. 12558func (c *ProjectsLocationsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) { 12559 gensupport.SetOptions(c.urlParams_, opts...) 12560 res, err := c.doRequest("json") 12561 if res != nil && res.StatusCode == http.StatusNotModified { 12562 if res.Body != nil { 12563 res.Body.Close() 12564 } 12565 return nil, &googleapi.Error{ 12566 Code: res.StatusCode, 12567 Header: res.Header, 12568 } 12569 } 12570 if err != nil { 12571 return nil, err 12572 } 12573 defer googleapi.CloseBody(res) 12574 if err := googleapi.CheckResponse(res); err != nil { 12575 return nil, err 12576 } 12577 ret := &GetDebugConfigResponse{ 12578 ServerResponse: googleapi.ServerResponse{ 12579 Header: res.Header, 12580 HTTPStatusCode: res.StatusCode, 12581 }, 12582 } 12583 target := &ret 12584 if err := gensupport.DecodeResponse(target, res); err != nil { 12585 return nil, err 12586 } 12587 return ret, nil 12588 // { 12589 // "description": "Get encoded debug configuration for component. Not cacheable.", 12590 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", 12591 // "httpMethod": "POST", 12592 // "id": "dataflow.projects.locations.jobs.debug.getConfig", 12593 // "parameterOrder": [ 12594 // "projectId", 12595 // "location", 12596 // "jobId" 12597 // ], 12598 // "parameters": { 12599 // "jobId": { 12600 // "description": "The job id.", 12601 // "location": "path", 12602 // "required": true, 12603 // "type": "string" 12604 // }, 12605 // "location": { 12606 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 12607 // "location": "path", 12608 // "required": true, 12609 // "type": "string" 12610 // }, 12611 // "projectId": { 12612 // "description": "The project id.", 12613 // "location": "path", 12614 // "required": true, 12615 // "type": "string" 12616 // } 12617 // }, 12618 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", 12619 // "request": { 12620 // "$ref": "GetDebugConfigRequest" 12621 // }, 12622 // "response": { 12623 // "$ref": "GetDebugConfigResponse" 12624 // }, 12625 // "scopes": [ 12626 // "https://www.googleapis.com/auth/cloud-platform", 12627 // "https://www.googleapis.com/auth/compute", 12628 // "https://www.googleapis.com/auth/compute.readonly", 12629 // "https://www.googleapis.com/auth/userinfo.email" 12630 // ] 12631 // } 12632 12633} 12634 12635// method id "dataflow.projects.locations.jobs.debug.sendCapture": 12636 12637type ProjectsLocationsJobsDebugSendCaptureCall struct { 12638 s *Service 12639 projectId string 12640 location string 12641 jobId string 12642 senddebugcapturerequest *SendDebugCaptureRequest 12643 urlParams_ gensupport.URLParams 12644 ctx_ context.Context 12645 header_ http.Header 12646} 12647 12648// SendCapture: Send encoded debug capture data for component. 12649// 12650// - jobId: The job id. 12651// - location: The [regional endpoint] 12652// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 12653// that contains the job specified by job_id. 12654// - projectId: The project id. 12655func (r *ProjectsLocationsJobsDebugService) SendCapture(projectId string, location string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsLocationsJobsDebugSendCaptureCall { 12656 c := &ProjectsLocationsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12657 c.projectId = projectId 12658 c.location = location 12659 c.jobId = jobId 12660 c.senddebugcapturerequest = senddebugcapturerequest 12661 return c 12662} 12663 12664// Fields allows partial responses to be retrieved. See 12665// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12666// for more information. 12667func (c *ProjectsLocationsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugSendCaptureCall { 12668 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12669 return c 12670} 12671 12672// Context sets the context to be used in this call's Do method. Any 12673// pending HTTP request will be aborted if the provided context is 12674// canceled. 12675func (c *ProjectsLocationsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugSendCaptureCall { 12676 c.ctx_ = ctx 12677 return c 12678} 12679 12680// Header returns an http.Header that can be modified by the caller to 12681// add HTTP headers to the request. 12682func (c *ProjectsLocationsJobsDebugSendCaptureCall) Header() http.Header { 12683 if c.header_ == nil { 12684 c.header_ = make(http.Header) 12685 } 12686 return c.header_ 12687} 12688 12689func (c *ProjectsLocationsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) { 12690 reqHeaders := make(http.Header) 12691 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12692 for k, v := range c.header_ { 12693 reqHeaders[k] = v 12694 } 12695 reqHeaders.Set("User-Agent", c.s.userAgent()) 12696 var body io.Reader = nil 12697 body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest) 12698 if err != nil { 12699 return nil, err 12700 } 12701 reqHeaders.Set("Content-Type", "application/json") 12702 c.urlParams_.Set("alt", alt) 12703 c.urlParams_.Set("prettyPrint", "false") 12704 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture") 12705 urls += "?" + c.urlParams_.Encode() 12706 req, err := http.NewRequest("POST", urls, body) 12707 if err != nil { 12708 return nil, err 12709 } 12710 req.Header = reqHeaders 12711 googleapi.Expand(req.URL, map[string]string{ 12712 "projectId": c.projectId, 12713 "location": c.location, 12714 "jobId": c.jobId, 12715 }) 12716 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12717} 12718 12719// Do executes the "dataflow.projects.locations.jobs.debug.sendCapture" call. 12720// Exactly one of *SendDebugCaptureResponse or error will be non-nil. 12721// Any non-2xx status code is an error. Response headers are in either 12722// *SendDebugCaptureResponse.ServerResponse.Header or (if a response was 12723// returned at all) in error.(*googleapi.Error).Header. Use 12724// googleapi.IsNotModified to check whether the returned error was 12725// because http.StatusNotModified was returned. 12726func (c *ProjectsLocationsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) { 12727 gensupport.SetOptions(c.urlParams_, opts...) 12728 res, err := c.doRequest("json") 12729 if res != nil && res.StatusCode == http.StatusNotModified { 12730 if res.Body != nil { 12731 res.Body.Close() 12732 } 12733 return nil, &googleapi.Error{ 12734 Code: res.StatusCode, 12735 Header: res.Header, 12736 } 12737 } 12738 if err != nil { 12739 return nil, err 12740 } 12741 defer googleapi.CloseBody(res) 12742 if err := googleapi.CheckResponse(res); err != nil { 12743 return nil, err 12744 } 12745 ret := &SendDebugCaptureResponse{ 12746 ServerResponse: googleapi.ServerResponse{ 12747 Header: res.Header, 12748 HTTPStatusCode: res.StatusCode, 12749 }, 12750 } 12751 target := &ret 12752 if err := gensupport.DecodeResponse(target, res); err != nil { 12753 return nil, err 12754 } 12755 return ret, nil 12756 // { 12757 // "description": "Send encoded debug capture data for component.", 12758 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", 12759 // "httpMethod": "POST", 12760 // "id": "dataflow.projects.locations.jobs.debug.sendCapture", 12761 // "parameterOrder": [ 12762 // "projectId", 12763 // "location", 12764 // "jobId" 12765 // ], 12766 // "parameters": { 12767 // "jobId": { 12768 // "description": "The job id.", 12769 // "location": "path", 12770 // "required": true, 12771 // "type": "string" 12772 // }, 12773 // "location": { 12774 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 12775 // "location": "path", 12776 // "required": true, 12777 // "type": "string" 12778 // }, 12779 // "projectId": { 12780 // "description": "The project id.", 12781 // "location": "path", 12782 // "required": true, 12783 // "type": "string" 12784 // } 12785 // }, 12786 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", 12787 // "request": { 12788 // "$ref": "SendDebugCaptureRequest" 12789 // }, 12790 // "response": { 12791 // "$ref": "SendDebugCaptureResponse" 12792 // }, 12793 // "scopes": [ 12794 // "https://www.googleapis.com/auth/cloud-platform", 12795 // "https://www.googleapis.com/auth/compute", 12796 // "https://www.googleapis.com/auth/compute.readonly", 12797 // "https://www.googleapis.com/auth/userinfo.email" 12798 // ] 12799 // } 12800 12801} 12802 12803// method id "dataflow.projects.locations.jobs.messages.list": 12804 12805type ProjectsLocationsJobsMessagesListCall struct { 12806 s *Service 12807 projectId string 12808 location string 12809 jobId string 12810 urlParams_ gensupport.URLParams 12811 ifNoneMatch_ string 12812 ctx_ context.Context 12813 header_ http.Header 12814} 12815 12816// List: Request the job status. To request the status of a job, we 12817// recommend using `projects.locations.jobs.messages.list` with a 12818// [regional endpoint] 12819// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). 12820// Using `projects.jobs.messages.list` is not recommended, as you can 12821// only request the status of jobs that are running in `us-central1`. 12822// 12823// - jobId: The job to get messages about. 12824// - location: The [regional endpoint] 12825// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 12826// that contains the job specified by job_id. 12827// - projectId: A project id. 12828func (r *ProjectsLocationsJobsMessagesService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsMessagesListCall { 12829 c := &ProjectsLocationsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12830 c.projectId = projectId 12831 c.location = location 12832 c.jobId = jobId 12833 return c 12834} 12835 12836// EndTime sets the optional parameter "endTime": Return only messages 12837// with timestamps < end_time. The default is now (i.e. return up to the 12838// latest messages available). 12839func (c *ProjectsLocationsJobsMessagesListCall) EndTime(endTime string) *ProjectsLocationsJobsMessagesListCall { 12840 c.urlParams_.Set("endTime", endTime) 12841 return c 12842} 12843 12844// MinimumImportance sets the optional parameter "minimumImportance": 12845// Filter to only get messages with importance >= level 12846// 12847// Possible values: 12848// "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't 12849// specified, or is unknown. 12850// "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: 12851// typically only useful for software engineers working on the code the 12852// job is running. Typically, Dataflow pipeline runners do not display 12853// log messages at this level by default. 12854// "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: 12855// somewhat verbose, but potentially useful to users. Typically, 12856// Dataflow pipeline runners do not display log messages at this level 12857// by default. These messages are displayed by default in the Dataflow 12858// monitoring UI. 12859// "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful 12860// for keeping track of the execution of a Dataflow pipeline. Typically, 12861// Dataflow pipeline runners display log messages at this level by 12862// default, and these messages are displayed by default in the Dataflow 12863// monitoring UI. 12864// "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: 12865// indicating a condition pertaining to a job which may require human 12866// intervention. Typically, Dataflow pipeline runners display log 12867// messages at this level by default, and these messages are displayed 12868// by default in the Dataflow monitoring UI. 12869// "JOB_MESSAGE_ERROR" - The message is at the 'error' level: 12870// indicating a condition preventing a job from succeeding. Typically, 12871// Dataflow pipeline runners display log messages at this level by 12872// default, and these messages are displayed by default in the Dataflow 12873// monitoring UI. 12874func (c *ProjectsLocationsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsLocationsJobsMessagesListCall { 12875 c.urlParams_.Set("minimumImportance", minimumImportance) 12876 return c 12877} 12878 12879// PageSize sets the optional parameter "pageSize": If specified, 12880// determines the maximum number of messages to return. If unspecified, 12881// the service may choose an appropriate default, or may return an 12882// arbitrarily large number of results. 12883func (c *ProjectsLocationsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsJobsMessagesListCall { 12884 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12885 return c 12886} 12887 12888// PageToken sets the optional parameter "pageToken": If supplied, this 12889// should be the value of next_page_token returned by an earlier call. 12890// This will cause the next page of results to be returned. 12891func (c *ProjectsLocationsJobsMessagesListCall) PageToken(pageToken string) *ProjectsLocationsJobsMessagesListCall { 12892 c.urlParams_.Set("pageToken", pageToken) 12893 return c 12894} 12895 12896// StartTime sets the optional parameter "startTime": If specified, 12897// return only messages with timestamps >= start_time. The default is 12898// the job creation time (i.e. beginning of messages). 12899func (c *ProjectsLocationsJobsMessagesListCall) StartTime(startTime string) *ProjectsLocationsJobsMessagesListCall { 12900 c.urlParams_.Set("startTime", startTime) 12901 return c 12902} 12903 12904// Fields allows partial responses to be retrieved. See 12905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12906// for more information. 12907func (c *ProjectsLocationsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsMessagesListCall { 12908 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12909 return c 12910} 12911 12912// IfNoneMatch sets the optional parameter which makes the operation 12913// fail if the object's ETag matches the given value. This is useful for 12914// getting updates only after the object has changed since the last 12915// request. Use googleapi.IsNotModified to check whether the response 12916// error from Do is the result of In-None-Match. 12917func (c *ProjectsLocationsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsMessagesListCall { 12918 c.ifNoneMatch_ = entityTag 12919 return c 12920} 12921 12922// Context sets the context to be used in this call's Do method. Any 12923// pending HTTP request will be aborted if the provided context is 12924// canceled. 12925func (c *ProjectsLocationsJobsMessagesListCall) Context(ctx context.Context) *ProjectsLocationsJobsMessagesListCall { 12926 c.ctx_ = ctx 12927 return c 12928} 12929 12930// Header returns an http.Header that can be modified by the caller to 12931// add HTTP headers to the request. 12932func (c *ProjectsLocationsJobsMessagesListCall) Header() http.Header { 12933 if c.header_ == nil { 12934 c.header_ = make(http.Header) 12935 } 12936 return c.header_ 12937} 12938 12939func (c *ProjectsLocationsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) { 12940 reqHeaders := make(http.Header) 12941 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 12942 for k, v := range c.header_ { 12943 reqHeaders[k] = v 12944 } 12945 reqHeaders.Set("User-Agent", c.s.userAgent()) 12946 if c.ifNoneMatch_ != "" { 12947 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12948 } 12949 var body io.Reader = nil 12950 c.urlParams_.Set("alt", alt) 12951 c.urlParams_.Set("prettyPrint", "false") 12952 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages") 12953 urls += "?" + c.urlParams_.Encode() 12954 req, err := http.NewRequest("GET", urls, body) 12955 if err != nil { 12956 return nil, err 12957 } 12958 req.Header = reqHeaders 12959 googleapi.Expand(req.URL, map[string]string{ 12960 "projectId": c.projectId, 12961 "location": c.location, 12962 "jobId": c.jobId, 12963 }) 12964 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12965} 12966 12967// Do executes the "dataflow.projects.locations.jobs.messages.list" call. 12968// Exactly one of *ListJobMessagesResponse or error will be non-nil. Any 12969// non-2xx status code is an error. Response headers are in either 12970// *ListJobMessagesResponse.ServerResponse.Header or (if a response was 12971// returned at all) in error.(*googleapi.Error).Header. Use 12972// googleapi.IsNotModified to check whether the returned error was 12973// because http.StatusNotModified was returned. 12974func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) { 12975 gensupport.SetOptions(c.urlParams_, opts...) 12976 res, err := c.doRequest("json") 12977 if res != nil && res.StatusCode == http.StatusNotModified { 12978 if res.Body != nil { 12979 res.Body.Close() 12980 } 12981 return nil, &googleapi.Error{ 12982 Code: res.StatusCode, 12983 Header: res.Header, 12984 } 12985 } 12986 if err != nil { 12987 return nil, err 12988 } 12989 defer googleapi.CloseBody(res) 12990 if err := googleapi.CheckResponse(res); err != nil { 12991 return nil, err 12992 } 12993 ret := &ListJobMessagesResponse{ 12994 ServerResponse: googleapi.ServerResponse{ 12995 Header: res.Header, 12996 HTTPStatusCode: res.StatusCode, 12997 }, 12998 } 12999 target := &ret 13000 if err := gensupport.DecodeResponse(target, res); err != nil { 13001 return nil, err 13002 } 13003 return ret, nil 13004 // { 13005 // "description": "Request the job status. To request the status of a job, we recommend using `projects.locations.jobs.messages.list` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.jobs.messages.list` is not recommended, as you can only request the status of jobs that are running in `us-central1`.", 13006 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", 13007 // "httpMethod": "GET", 13008 // "id": "dataflow.projects.locations.jobs.messages.list", 13009 // "parameterOrder": [ 13010 // "projectId", 13011 // "location", 13012 // "jobId" 13013 // ], 13014 // "parameters": { 13015 // "endTime": { 13016 // "description": "Return only messages with timestamps \u003c end_time. The default is now (i.e. return up to the latest messages available).", 13017 // "format": "google-datetime", 13018 // "location": "query", 13019 // "type": "string" 13020 // }, 13021 // "jobId": { 13022 // "description": "The job to get messages about.", 13023 // "location": "path", 13024 // "required": true, 13025 // "type": "string" 13026 // }, 13027 // "location": { 13028 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 13029 // "location": "path", 13030 // "required": true, 13031 // "type": "string" 13032 // }, 13033 // "minimumImportance": { 13034 // "description": "Filter to only get messages with importance \u003e= level", 13035 // "enum": [ 13036 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN", 13037 // "JOB_MESSAGE_DEBUG", 13038 // "JOB_MESSAGE_DETAILED", 13039 // "JOB_MESSAGE_BASIC", 13040 // "JOB_MESSAGE_WARNING", 13041 // "JOB_MESSAGE_ERROR" 13042 // ], 13043 // "enumDescriptions": [ 13044 // "The message importance isn't specified, or is unknown.", 13045 // "The message is at the 'debug' level: typically only useful for software engineers working on the code the job is running. Typically, Dataflow pipeline runners do not display log messages at this level by default.", 13046 // "The message is at the 'detailed' level: somewhat verbose, but potentially useful to users. Typically, Dataflow pipeline runners do not display log messages at this level by default. These messages are displayed by default in the Dataflow monitoring UI.", 13047 // "The message is at the 'basic' level: useful for keeping track of the execution of a Dataflow pipeline. Typically, Dataflow pipeline runners display log messages at this level by default, and these messages are displayed by default in the Dataflow monitoring UI.", 13048 // "The message is at the 'warning' level: indicating a condition pertaining to a job which may require human intervention. Typically, Dataflow pipeline runners display log messages at this level by default, and these messages are displayed by default in the Dataflow monitoring UI.", 13049 // "The message is at the 'error' level: indicating a condition preventing a job from succeeding. Typically, Dataflow pipeline runners display log messages at this level by default, and these messages are displayed by default in the Dataflow monitoring UI." 13050 // ], 13051 // "location": "query", 13052 // "type": "string" 13053 // }, 13054 // "pageSize": { 13055 // "description": "If specified, determines the maximum number of messages to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.", 13056 // "format": "int32", 13057 // "location": "query", 13058 // "type": "integer" 13059 // }, 13060 // "pageToken": { 13061 // "description": "If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.", 13062 // "location": "query", 13063 // "type": "string" 13064 // }, 13065 // "projectId": { 13066 // "description": "A project id.", 13067 // "location": "path", 13068 // "required": true, 13069 // "type": "string" 13070 // }, 13071 // "startTime": { 13072 // "description": "If specified, return only messages with timestamps \u003e= start_time. The default is the job creation time (i.e. beginning of messages).", 13073 // "format": "google-datetime", 13074 // "location": "query", 13075 // "type": "string" 13076 // } 13077 // }, 13078 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", 13079 // "response": { 13080 // "$ref": "ListJobMessagesResponse" 13081 // }, 13082 // "scopes": [ 13083 // "https://www.googleapis.com/auth/cloud-platform", 13084 // "https://www.googleapis.com/auth/compute", 13085 // "https://www.googleapis.com/auth/compute.readonly", 13086 // "https://www.googleapis.com/auth/userinfo.email" 13087 // ] 13088 // } 13089 13090} 13091 13092// Pages invokes f for each page of results. 13093// A non-nil error returned from f will halt the iteration. 13094// The provided context supersedes any context provided to the Context method. 13095func (c *ProjectsLocationsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error { 13096 c.ctx_ = ctx 13097 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13098 for { 13099 x, err := c.Do() 13100 if err != nil { 13101 return err 13102 } 13103 if err := f(x); err != nil { 13104 return err 13105 } 13106 if x.NextPageToken == "" { 13107 return nil 13108 } 13109 c.PageToken(x.NextPageToken) 13110 } 13111} 13112 13113// method id "dataflow.projects.locations.jobs.snapshots.list": 13114 13115type ProjectsLocationsJobsSnapshotsListCall struct { 13116 s *Service 13117 projectId string 13118 location string 13119 jobId string 13120 urlParams_ gensupport.URLParams 13121 ifNoneMatch_ string 13122 ctx_ context.Context 13123 header_ http.Header 13124} 13125 13126// List: Lists snapshots. 13127// 13128// - jobId: If specified, list snapshots created from this job. 13129// - location: The location to list snapshots in. 13130// - projectId: The project ID to list snapshots for. 13131func (r *ProjectsLocationsJobsSnapshotsService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsSnapshotsListCall { 13132 c := &ProjectsLocationsJobsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13133 c.projectId = projectId 13134 c.location = location 13135 c.jobId = jobId 13136 return c 13137} 13138 13139// Fields allows partial responses to be retrieved. See 13140// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13141// for more information. 13142func (c *ProjectsLocationsJobsSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsSnapshotsListCall { 13143 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13144 return c 13145} 13146 13147// IfNoneMatch sets the optional parameter which makes the operation 13148// fail if the object's ETag matches the given value. This is useful for 13149// getting updates only after the object has changed since the last 13150// request. Use googleapi.IsNotModified to check whether the response 13151// error from Do is the result of In-None-Match. 13152func (c *ProjectsLocationsJobsSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsSnapshotsListCall { 13153 c.ifNoneMatch_ = entityTag 13154 return c 13155} 13156 13157// Context sets the context to be used in this call's Do method. Any 13158// pending HTTP request will be aborted if the provided context is 13159// canceled. 13160func (c *ProjectsLocationsJobsSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsJobsSnapshotsListCall { 13161 c.ctx_ = ctx 13162 return c 13163} 13164 13165// Header returns an http.Header that can be modified by the caller to 13166// add HTTP headers to the request. 13167func (c *ProjectsLocationsJobsSnapshotsListCall) Header() http.Header { 13168 if c.header_ == nil { 13169 c.header_ = make(http.Header) 13170 } 13171 return c.header_ 13172} 13173 13174func (c *ProjectsLocationsJobsSnapshotsListCall) doRequest(alt string) (*http.Response, error) { 13175 reqHeaders := make(http.Header) 13176 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13177 for k, v := range c.header_ { 13178 reqHeaders[k] = v 13179 } 13180 reqHeaders.Set("User-Agent", c.s.userAgent()) 13181 if c.ifNoneMatch_ != "" { 13182 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13183 } 13184 var body io.Reader = nil 13185 c.urlParams_.Set("alt", alt) 13186 c.urlParams_.Set("prettyPrint", "false") 13187 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/snapshots") 13188 urls += "?" + c.urlParams_.Encode() 13189 req, err := http.NewRequest("GET", urls, body) 13190 if err != nil { 13191 return nil, err 13192 } 13193 req.Header = reqHeaders 13194 googleapi.Expand(req.URL, map[string]string{ 13195 "projectId": c.projectId, 13196 "location": c.location, 13197 "jobId": c.jobId, 13198 }) 13199 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13200} 13201 13202// Do executes the "dataflow.projects.locations.jobs.snapshots.list" call. 13203// Exactly one of *ListSnapshotsResponse or error will be non-nil. Any 13204// non-2xx status code is an error. Response headers are in either 13205// *ListSnapshotsResponse.ServerResponse.Header or (if a response was 13206// returned at all) in error.(*googleapi.Error).Header. Use 13207// googleapi.IsNotModified to check whether the returned error was 13208// because http.StatusNotModified was returned. 13209func (c *ProjectsLocationsJobsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) { 13210 gensupport.SetOptions(c.urlParams_, opts...) 13211 res, err := c.doRequest("json") 13212 if res != nil && res.StatusCode == http.StatusNotModified { 13213 if res.Body != nil { 13214 res.Body.Close() 13215 } 13216 return nil, &googleapi.Error{ 13217 Code: res.StatusCode, 13218 Header: res.Header, 13219 } 13220 } 13221 if err != nil { 13222 return nil, err 13223 } 13224 defer googleapi.CloseBody(res) 13225 if err := googleapi.CheckResponse(res); err != nil { 13226 return nil, err 13227 } 13228 ret := &ListSnapshotsResponse{ 13229 ServerResponse: googleapi.ServerResponse{ 13230 Header: res.Header, 13231 HTTPStatusCode: res.StatusCode, 13232 }, 13233 } 13234 target := &ret 13235 if err := gensupport.DecodeResponse(target, res); err != nil { 13236 return nil, err 13237 } 13238 return ret, nil 13239 // { 13240 // "description": "Lists snapshots.", 13241 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/snapshots", 13242 // "httpMethod": "GET", 13243 // "id": "dataflow.projects.locations.jobs.snapshots.list", 13244 // "parameterOrder": [ 13245 // "projectId", 13246 // "location", 13247 // "jobId" 13248 // ], 13249 // "parameters": { 13250 // "jobId": { 13251 // "description": "If specified, list snapshots created from this job.", 13252 // "location": "path", 13253 // "required": true, 13254 // "type": "string" 13255 // }, 13256 // "location": { 13257 // "description": "The location to list snapshots in.", 13258 // "location": "path", 13259 // "required": true, 13260 // "type": "string" 13261 // }, 13262 // "projectId": { 13263 // "description": "The project ID to list snapshots for.", 13264 // "location": "path", 13265 // "required": true, 13266 // "type": "string" 13267 // } 13268 // }, 13269 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/snapshots", 13270 // "response": { 13271 // "$ref": "ListSnapshotsResponse" 13272 // }, 13273 // "scopes": [ 13274 // "https://www.googleapis.com/auth/cloud-platform", 13275 // "https://www.googleapis.com/auth/compute", 13276 // "https://www.googleapis.com/auth/compute.readonly", 13277 // "https://www.googleapis.com/auth/userinfo.email" 13278 // ] 13279 // } 13280 13281} 13282 13283// method id "dataflow.projects.locations.jobs.stages.getExecutionDetails": 13284 13285type ProjectsLocationsJobsStagesGetExecutionDetailsCall struct { 13286 s *Service 13287 projectId string 13288 location string 13289 jobId string 13290 stageId string 13291 urlParams_ gensupport.URLParams 13292 ifNoneMatch_ string 13293 ctx_ context.Context 13294 header_ http.Header 13295} 13296 13297// GetExecutionDetails: Request detailed information about the execution 13298// status of a stage of the job. EXPERIMENTAL. This API is subject to 13299// change or removal without notice. 13300// 13301// - jobId: The job to get execution details for. 13302// - location: The [regional endpoint] 13303// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 13304// that contains the job specified by job_id. 13305// - projectId: A project id. 13306// - stageId: The stage for which to fetch information. 13307func (r *ProjectsLocationsJobsStagesService) GetExecutionDetails(projectId string, location string, jobId string, stageId string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13308 c := &ProjectsLocationsJobsStagesGetExecutionDetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13309 c.projectId = projectId 13310 c.location = location 13311 c.jobId = jobId 13312 c.stageId = stageId 13313 return c 13314} 13315 13316// EndTime sets the optional parameter "endTime": Upper time bound of 13317// work items to include, by start time. 13318func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) EndTime(endTime string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13319 c.urlParams_.Set("endTime", endTime) 13320 return c 13321} 13322 13323// PageSize sets the optional parameter "pageSize": If specified, 13324// determines the maximum number of work items to return. If 13325// unspecified, the service may choose an appropriate default, or may 13326// return an arbitrarily large number of results. 13327func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) PageSize(pageSize int64) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13328 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13329 return c 13330} 13331 13332// PageToken sets the optional parameter "pageToken": If supplied, this 13333// should be the value of next_page_token returned by an earlier call. 13334// This will cause the next page of results to be returned. 13335func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) PageToken(pageToken string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13336 c.urlParams_.Set("pageToken", pageToken) 13337 return c 13338} 13339 13340// StartTime sets the optional parameter "startTime": Lower time bound 13341// of work items to include, by start time. 13342func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) StartTime(startTime string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13343 c.urlParams_.Set("startTime", startTime) 13344 return c 13345} 13346 13347// Fields allows partial responses to be retrieved. See 13348// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13349// for more information. 13350func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13352 return c 13353} 13354 13355// IfNoneMatch sets the optional parameter which makes the operation 13356// fail if the object's ETag matches the given value. This is useful for 13357// getting updates only after the object has changed since the last 13358// request. Use googleapi.IsNotModified to check whether the response 13359// error from Do is the result of In-None-Match. 13360func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13361 c.ifNoneMatch_ = entityTag 13362 return c 13363} 13364 13365// Context sets the context to be used in this call's Do method. Any 13366// pending HTTP request will be aborted if the provided context is 13367// canceled. 13368func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Context(ctx context.Context) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 13369 c.ctx_ = ctx 13370 return c 13371} 13372 13373// Header returns an http.Header that can be modified by the caller to 13374// add HTTP headers to the request. 13375func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Header() http.Header { 13376 if c.header_ == nil { 13377 c.header_ = make(http.Header) 13378 } 13379 return c.header_ 13380} 13381 13382func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) doRequest(alt string) (*http.Response, error) { 13383 reqHeaders := make(http.Header) 13384 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13385 for k, v := range c.header_ { 13386 reqHeaders[k] = v 13387 } 13388 reqHeaders.Set("User-Agent", c.s.userAgent()) 13389 if c.ifNoneMatch_ != "" { 13390 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13391 } 13392 var body io.Reader = nil 13393 c.urlParams_.Set("alt", alt) 13394 c.urlParams_.Set("prettyPrint", "false") 13395 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/stages/{stageId}/executionDetails") 13396 urls += "?" + c.urlParams_.Encode() 13397 req, err := http.NewRequest("GET", urls, body) 13398 if err != nil { 13399 return nil, err 13400 } 13401 req.Header = reqHeaders 13402 googleapi.Expand(req.URL, map[string]string{ 13403 "projectId": c.projectId, 13404 "location": c.location, 13405 "jobId": c.jobId, 13406 "stageId": c.stageId, 13407 }) 13408 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13409} 13410 13411// Do executes the "dataflow.projects.locations.jobs.stages.getExecutionDetails" call. 13412// Exactly one of *StageExecutionDetails or error will be non-nil. Any 13413// non-2xx status code is an error. Response headers are in either 13414// *StageExecutionDetails.ServerResponse.Header or (if a response was 13415// returned at all) in error.(*googleapi.Error).Header. Use 13416// googleapi.IsNotModified to check whether the returned error was 13417// because http.StatusNotModified was returned. 13418func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Do(opts ...googleapi.CallOption) (*StageExecutionDetails, error) { 13419 gensupport.SetOptions(c.urlParams_, opts...) 13420 res, err := c.doRequest("json") 13421 if res != nil && res.StatusCode == http.StatusNotModified { 13422 if res.Body != nil { 13423 res.Body.Close() 13424 } 13425 return nil, &googleapi.Error{ 13426 Code: res.StatusCode, 13427 Header: res.Header, 13428 } 13429 } 13430 if err != nil { 13431 return nil, err 13432 } 13433 defer googleapi.CloseBody(res) 13434 if err := googleapi.CheckResponse(res); err != nil { 13435 return nil, err 13436 } 13437 ret := &StageExecutionDetails{ 13438 ServerResponse: googleapi.ServerResponse{ 13439 Header: res.Header, 13440 HTTPStatusCode: res.StatusCode, 13441 }, 13442 } 13443 target := &ret 13444 if err := gensupport.DecodeResponse(target, res); err != nil { 13445 return nil, err 13446 } 13447 return ret, nil 13448 // { 13449 // "description": "Request detailed information about the execution status of a stage of the job. EXPERIMENTAL. This API is subject to change or removal without notice.", 13450 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/stages/{stageId}/executionDetails", 13451 // "httpMethod": "GET", 13452 // "id": "dataflow.projects.locations.jobs.stages.getExecutionDetails", 13453 // "parameterOrder": [ 13454 // "projectId", 13455 // "location", 13456 // "jobId", 13457 // "stageId" 13458 // ], 13459 // "parameters": { 13460 // "endTime": { 13461 // "description": "Upper time bound of work items to include, by start time.", 13462 // "format": "google-datetime", 13463 // "location": "query", 13464 // "type": "string" 13465 // }, 13466 // "jobId": { 13467 // "description": "The job to get execution details for.", 13468 // "location": "path", 13469 // "required": true, 13470 // "type": "string" 13471 // }, 13472 // "location": { 13473 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the job specified by job_id.", 13474 // "location": "path", 13475 // "required": true, 13476 // "type": "string" 13477 // }, 13478 // "pageSize": { 13479 // "description": "If specified, determines the maximum number of work items to return. If unspecified, the service may choose an appropriate default, or may return an arbitrarily large number of results.", 13480 // "format": "int32", 13481 // "location": "query", 13482 // "type": "integer" 13483 // }, 13484 // "pageToken": { 13485 // "description": "If supplied, this should be the value of next_page_token returned by an earlier call. This will cause the next page of results to be returned.", 13486 // "location": "query", 13487 // "type": "string" 13488 // }, 13489 // "projectId": { 13490 // "description": "A project id.", 13491 // "location": "path", 13492 // "required": true, 13493 // "type": "string" 13494 // }, 13495 // "stageId": { 13496 // "description": "The stage for which to fetch information.", 13497 // "location": "path", 13498 // "required": true, 13499 // "type": "string" 13500 // }, 13501 // "startTime": { 13502 // "description": "Lower time bound of work items to include, by start time.", 13503 // "format": "google-datetime", 13504 // "location": "query", 13505 // "type": "string" 13506 // } 13507 // }, 13508 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/stages/{stageId}/executionDetails", 13509 // "response": { 13510 // "$ref": "StageExecutionDetails" 13511 // }, 13512 // "scopes": [ 13513 // "https://www.googleapis.com/auth/cloud-platform", 13514 // "https://www.googleapis.com/auth/compute", 13515 // "https://www.googleapis.com/auth/compute.readonly", 13516 // "https://www.googleapis.com/auth/userinfo.email" 13517 // ] 13518 // } 13519 13520} 13521 13522// Pages invokes f for each page of results. 13523// A non-nil error returned from f will halt the iteration. 13524// The provided context supersedes any context provided to the Context method. 13525func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Pages(ctx context.Context, f func(*StageExecutionDetails) error) error { 13526 c.ctx_ = ctx 13527 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13528 for { 13529 x, err := c.Do() 13530 if err != nil { 13531 return err 13532 } 13533 if err := f(x); err != nil { 13534 return err 13535 } 13536 if x.NextPageToken == "" { 13537 return nil 13538 } 13539 c.PageToken(x.NextPageToken) 13540 } 13541} 13542 13543// method id "dataflow.projects.locations.jobs.workItems.lease": 13544 13545type ProjectsLocationsJobsWorkItemsLeaseCall struct { 13546 s *Service 13547 projectId string 13548 location string 13549 jobId string 13550 leaseworkitemrequest *LeaseWorkItemRequest 13551 urlParams_ gensupport.URLParams 13552 ctx_ context.Context 13553 header_ http.Header 13554} 13555 13556// Lease: Leases a dataflow WorkItem to run. 13557// 13558// - jobId: Identifies the workflow job this worker belongs to. 13559// - location: The [regional endpoint] 13560// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 13561// that contains the WorkItem's job. 13562// - projectId: Identifies the project this worker belongs to. 13563func (r *ProjectsLocationsJobsWorkItemsService) Lease(projectId string, location string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsLocationsJobsWorkItemsLeaseCall { 13564 c := &ProjectsLocationsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13565 c.projectId = projectId 13566 c.location = location 13567 c.jobId = jobId 13568 c.leaseworkitemrequest = leaseworkitemrequest 13569 return c 13570} 13571 13572// Fields allows partial responses to be retrieved. See 13573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13574// for more information. 13575func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsLeaseCall { 13576 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13577 return c 13578} 13579 13580// Context sets the context to be used in this call's Do method. Any 13581// pending HTTP request will be aborted if the provided context is 13582// canceled. 13583func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsLeaseCall { 13584 c.ctx_ = ctx 13585 return c 13586} 13587 13588// Header returns an http.Header that can be modified by the caller to 13589// add HTTP headers to the request. 13590func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Header() http.Header { 13591 if c.header_ == nil { 13592 c.header_ = make(http.Header) 13593 } 13594 return c.header_ 13595} 13596 13597func (c *ProjectsLocationsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) { 13598 reqHeaders := make(http.Header) 13599 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13600 for k, v := range c.header_ { 13601 reqHeaders[k] = v 13602 } 13603 reqHeaders.Set("User-Agent", c.s.userAgent()) 13604 var body io.Reader = nil 13605 body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest) 13606 if err != nil { 13607 return nil, err 13608 } 13609 reqHeaders.Set("Content-Type", "application/json") 13610 c.urlParams_.Set("alt", alt) 13611 c.urlParams_.Set("prettyPrint", "false") 13612 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease") 13613 urls += "?" + c.urlParams_.Encode() 13614 req, err := http.NewRequest("POST", urls, body) 13615 if err != nil { 13616 return nil, err 13617 } 13618 req.Header = reqHeaders 13619 googleapi.Expand(req.URL, map[string]string{ 13620 "projectId": c.projectId, 13621 "location": c.location, 13622 "jobId": c.jobId, 13623 }) 13624 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13625} 13626 13627// Do executes the "dataflow.projects.locations.jobs.workItems.lease" call. 13628// Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any 13629// non-2xx status code is an error. Response headers are in either 13630// *LeaseWorkItemResponse.ServerResponse.Header or (if a response was 13631// returned at all) in error.(*googleapi.Error).Header. Use 13632// googleapi.IsNotModified to check whether the returned error was 13633// because http.StatusNotModified was returned. 13634func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) { 13635 gensupport.SetOptions(c.urlParams_, opts...) 13636 res, err := c.doRequest("json") 13637 if res != nil && res.StatusCode == http.StatusNotModified { 13638 if res.Body != nil { 13639 res.Body.Close() 13640 } 13641 return nil, &googleapi.Error{ 13642 Code: res.StatusCode, 13643 Header: res.Header, 13644 } 13645 } 13646 if err != nil { 13647 return nil, err 13648 } 13649 defer googleapi.CloseBody(res) 13650 if err := googleapi.CheckResponse(res); err != nil { 13651 return nil, err 13652 } 13653 ret := &LeaseWorkItemResponse{ 13654 ServerResponse: googleapi.ServerResponse{ 13655 Header: res.Header, 13656 HTTPStatusCode: res.StatusCode, 13657 }, 13658 } 13659 target := &ret 13660 if err := gensupport.DecodeResponse(target, res); err != nil { 13661 return nil, err 13662 } 13663 return ret, nil 13664 // { 13665 // "description": "Leases a dataflow WorkItem to run.", 13666 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", 13667 // "httpMethod": "POST", 13668 // "id": "dataflow.projects.locations.jobs.workItems.lease", 13669 // "parameterOrder": [ 13670 // "projectId", 13671 // "location", 13672 // "jobId" 13673 // ], 13674 // "parameters": { 13675 // "jobId": { 13676 // "description": "Identifies the workflow job this worker belongs to.", 13677 // "location": "path", 13678 // "required": true, 13679 // "type": "string" 13680 // }, 13681 // "location": { 13682 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the WorkItem's job.", 13683 // "location": "path", 13684 // "required": true, 13685 // "type": "string" 13686 // }, 13687 // "projectId": { 13688 // "description": "Identifies the project this worker belongs to.", 13689 // "location": "path", 13690 // "required": true, 13691 // "type": "string" 13692 // } 13693 // }, 13694 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", 13695 // "request": { 13696 // "$ref": "LeaseWorkItemRequest" 13697 // }, 13698 // "response": { 13699 // "$ref": "LeaseWorkItemResponse" 13700 // }, 13701 // "scopes": [ 13702 // "https://www.googleapis.com/auth/cloud-platform", 13703 // "https://www.googleapis.com/auth/compute", 13704 // "https://www.googleapis.com/auth/compute.readonly", 13705 // "https://www.googleapis.com/auth/userinfo.email" 13706 // ] 13707 // } 13708 13709} 13710 13711// method id "dataflow.projects.locations.jobs.workItems.reportStatus": 13712 13713type ProjectsLocationsJobsWorkItemsReportStatusCall struct { 13714 s *Service 13715 projectId string 13716 location string 13717 jobId string 13718 reportworkitemstatusrequest *ReportWorkItemStatusRequest 13719 urlParams_ gensupport.URLParams 13720 ctx_ context.Context 13721 header_ http.Header 13722} 13723 13724// ReportStatus: Reports the status of dataflow WorkItems leased by a 13725// worker. 13726// 13727// - jobId: The job which the WorkItem is part of. 13728// - location: The [regional endpoint] 13729// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 13730// that contains the WorkItem's job. 13731// - projectId: The project which owns the WorkItem's job. 13732func (r *ProjectsLocationsJobsWorkItemsService) ReportStatus(projectId string, location string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsLocationsJobsWorkItemsReportStatusCall { 13733 c := &ProjectsLocationsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13734 c.projectId = projectId 13735 c.location = location 13736 c.jobId = jobId 13737 c.reportworkitemstatusrequest = reportworkitemstatusrequest 13738 return c 13739} 13740 13741// Fields allows partial responses to be retrieved. See 13742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13743// for more information. 13744func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsReportStatusCall { 13745 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13746 return c 13747} 13748 13749// Context sets the context to be used in this call's Do method. Any 13750// pending HTTP request will be aborted if the provided context is 13751// canceled. 13752func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsReportStatusCall { 13753 c.ctx_ = ctx 13754 return c 13755} 13756 13757// Header returns an http.Header that can be modified by the caller to 13758// add HTTP headers to the request. 13759func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Header() http.Header { 13760 if c.header_ == nil { 13761 c.header_ = make(http.Header) 13762 } 13763 return c.header_ 13764} 13765 13766func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) { 13767 reqHeaders := make(http.Header) 13768 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13769 for k, v := range c.header_ { 13770 reqHeaders[k] = v 13771 } 13772 reqHeaders.Set("User-Agent", c.s.userAgent()) 13773 var body io.Reader = nil 13774 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest) 13775 if err != nil { 13776 return nil, err 13777 } 13778 reqHeaders.Set("Content-Type", "application/json") 13779 c.urlParams_.Set("alt", alt) 13780 c.urlParams_.Set("prettyPrint", "false") 13781 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus") 13782 urls += "?" + c.urlParams_.Encode() 13783 req, err := http.NewRequest("POST", urls, body) 13784 if err != nil { 13785 return nil, err 13786 } 13787 req.Header = reqHeaders 13788 googleapi.Expand(req.URL, map[string]string{ 13789 "projectId": c.projectId, 13790 "location": c.location, 13791 "jobId": c.jobId, 13792 }) 13793 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13794} 13795 13796// Do executes the "dataflow.projects.locations.jobs.workItems.reportStatus" call. 13797// Exactly one of *ReportWorkItemStatusResponse or error will be 13798// non-nil. Any non-2xx status code is an error. Response headers are in 13799// either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a 13800// response was returned at all) in error.(*googleapi.Error).Header. Use 13801// googleapi.IsNotModified to check whether the returned error was 13802// because http.StatusNotModified was returned. 13803func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) { 13804 gensupport.SetOptions(c.urlParams_, opts...) 13805 res, err := c.doRequest("json") 13806 if res != nil && res.StatusCode == http.StatusNotModified { 13807 if res.Body != nil { 13808 res.Body.Close() 13809 } 13810 return nil, &googleapi.Error{ 13811 Code: res.StatusCode, 13812 Header: res.Header, 13813 } 13814 } 13815 if err != nil { 13816 return nil, err 13817 } 13818 defer googleapi.CloseBody(res) 13819 if err := googleapi.CheckResponse(res); err != nil { 13820 return nil, err 13821 } 13822 ret := &ReportWorkItemStatusResponse{ 13823 ServerResponse: googleapi.ServerResponse{ 13824 Header: res.Header, 13825 HTTPStatusCode: res.StatusCode, 13826 }, 13827 } 13828 target := &ret 13829 if err := gensupport.DecodeResponse(target, res); err != nil { 13830 return nil, err 13831 } 13832 return ret, nil 13833 // { 13834 // "description": "Reports the status of dataflow WorkItems leased by a worker.", 13835 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", 13836 // "httpMethod": "POST", 13837 // "id": "dataflow.projects.locations.jobs.workItems.reportStatus", 13838 // "parameterOrder": [ 13839 // "projectId", 13840 // "location", 13841 // "jobId" 13842 // ], 13843 // "parameters": { 13844 // "jobId": { 13845 // "description": "The job which the WorkItem is part of.", 13846 // "location": "path", 13847 // "required": true, 13848 // "type": "string" 13849 // }, 13850 // "location": { 13851 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the WorkItem's job.", 13852 // "location": "path", 13853 // "required": true, 13854 // "type": "string" 13855 // }, 13856 // "projectId": { 13857 // "description": "The project which owns the WorkItem's job.", 13858 // "location": "path", 13859 // "required": true, 13860 // "type": "string" 13861 // } 13862 // }, 13863 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", 13864 // "request": { 13865 // "$ref": "ReportWorkItemStatusRequest" 13866 // }, 13867 // "response": { 13868 // "$ref": "ReportWorkItemStatusResponse" 13869 // }, 13870 // "scopes": [ 13871 // "https://www.googleapis.com/auth/cloud-platform", 13872 // "https://www.googleapis.com/auth/compute", 13873 // "https://www.googleapis.com/auth/compute.readonly", 13874 // "https://www.googleapis.com/auth/userinfo.email" 13875 // ] 13876 // } 13877 13878} 13879 13880// method id "dataflow.projects.locations.snapshots.delete": 13881 13882type ProjectsLocationsSnapshotsDeleteCall struct { 13883 s *Service 13884 projectId string 13885 location string 13886 snapshotId string 13887 urlParams_ gensupport.URLParams 13888 ctx_ context.Context 13889 header_ http.Header 13890} 13891 13892// Delete: Deletes a snapshot. 13893// 13894// - location: The location that contains this snapshot. 13895// - projectId: The ID of the Cloud Platform project that the snapshot 13896// belongs to. 13897// - snapshotId: The ID of the snapshot. 13898func (r *ProjectsLocationsSnapshotsService) Delete(projectId string, location string, snapshotId string) *ProjectsLocationsSnapshotsDeleteCall { 13899 c := &ProjectsLocationsSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13900 c.projectId = projectId 13901 c.location = location 13902 c.snapshotId = snapshotId 13903 return c 13904} 13905 13906// Fields allows partial responses to be retrieved. See 13907// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13908// for more information. 13909func (c *ProjectsLocationsSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSnapshotsDeleteCall { 13910 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13911 return c 13912} 13913 13914// Context sets the context to be used in this call's Do method. Any 13915// pending HTTP request will be aborted if the provided context is 13916// canceled. 13917func (c *ProjectsLocationsSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSnapshotsDeleteCall { 13918 c.ctx_ = ctx 13919 return c 13920} 13921 13922// Header returns an http.Header that can be modified by the caller to 13923// add HTTP headers to the request. 13924func (c *ProjectsLocationsSnapshotsDeleteCall) Header() http.Header { 13925 if c.header_ == nil { 13926 c.header_ = make(http.Header) 13927 } 13928 return c.header_ 13929} 13930 13931func (c *ProjectsLocationsSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { 13932 reqHeaders := make(http.Header) 13933 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 13934 for k, v := range c.header_ { 13935 reqHeaders[k] = v 13936 } 13937 reqHeaders.Set("User-Agent", c.s.userAgent()) 13938 var body io.Reader = nil 13939 c.urlParams_.Set("alt", alt) 13940 c.urlParams_.Set("prettyPrint", "false") 13941 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}") 13942 urls += "?" + c.urlParams_.Encode() 13943 req, err := http.NewRequest("DELETE", urls, body) 13944 if err != nil { 13945 return nil, err 13946 } 13947 req.Header = reqHeaders 13948 googleapi.Expand(req.URL, map[string]string{ 13949 "projectId": c.projectId, 13950 "location": c.location, 13951 "snapshotId": c.snapshotId, 13952 }) 13953 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13954} 13955 13956// Do executes the "dataflow.projects.locations.snapshots.delete" call. 13957// Exactly one of *DeleteSnapshotResponse or error will be non-nil. Any 13958// non-2xx status code is an error. Response headers are in either 13959// *DeleteSnapshotResponse.ServerResponse.Header or (if a response was 13960// returned at all) in error.(*googleapi.Error).Header. Use 13961// googleapi.IsNotModified to check whether the returned error was 13962// because http.StatusNotModified was returned. 13963func (c *ProjectsLocationsSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteSnapshotResponse, error) { 13964 gensupport.SetOptions(c.urlParams_, opts...) 13965 res, err := c.doRequest("json") 13966 if res != nil && res.StatusCode == http.StatusNotModified { 13967 if res.Body != nil { 13968 res.Body.Close() 13969 } 13970 return nil, &googleapi.Error{ 13971 Code: res.StatusCode, 13972 Header: res.Header, 13973 } 13974 } 13975 if err != nil { 13976 return nil, err 13977 } 13978 defer googleapi.CloseBody(res) 13979 if err := googleapi.CheckResponse(res); err != nil { 13980 return nil, err 13981 } 13982 ret := &DeleteSnapshotResponse{ 13983 ServerResponse: googleapi.ServerResponse{ 13984 Header: res.Header, 13985 HTTPStatusCode: res.StatusCode, 13986 }, 13987 } 13988 target := &ret 13989 if err := gensupport.DecodeResponse(target, res); err != nil { 13990 return nil, err 13991 } 13992 return ret, nil 13993 // { 13994 // "description": "Deletes a snapshot.", 13995 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}", 13996 // "httpMethod": "DELETE", 13997 // "id": "dataflow.projects.locations.snapshots.delete", 13998 // "parameterOrder": [ 13999 // "projectId", 14000 // "location", 14001 // "snapshotId" 14002 // ], 14003 // "parameters": { 14004 // "location": { 14005 // "description": "The location that contains this snapshot.", 14006 // "location": "path", 14007 // "required": true, 14008 // "type": "string" 14009 // }, 14010 // "projectId": { 14011 // "description": "The ID of the Cloud Platform project that the snapshot belongs to.", 14012 // "location": "path", 14013 // "required": true, 14014 // "type": "string" 14015 // }, 14016 // "snapshotId": { 14017 // "description": "The ID of the snapshot.", 14018 // "location": "path", 14019 // "required": true, 14020 // "type": "string" 14021 // } 14022 // }, 14023 // "path": "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}", 14024 // "response": { 14025 // "$ref": "DeleteSnapshotResponse" 14026 // }, 14027 // "scopes": [ 14028 // "https://www.googleapis.com/auth/cloud-platform", 14029 // "https://www.googleapis.com/auth/compute", 14030 // "https://www.googleapis.com/auth/compute.readonly", 14031 // "https://www.googleapis.com/auth/userinfo.email" 14032 // ] 14033 // } 14034 14035} 14036 14037// method id "dataflow.projects.locations.snapshots.get": 14038 14039type ProjectsLocationsSnapshotsGetCall struct { 14040 s *Service 14041 projectId string 14042 location string 14043 snapshotId string 14044 urlParams_ gensupport.URLParams 14045 ifNoneMatch_ string 14046 ctx_ context.Context 14047 header_ http.Header 14048} 14049 14050// Get: Gets information about a snapshot. 14051// 14052// - location: The location that contains this snapshot. 14053// - projectId: The ID of the Cloud Platform project that the snapshot 14054// belongs to. 14055// - snapshotId: The ID of the snapshot. 14056func (r *ProjectsLocationsSnapshotsService) Get(projectId string, location string, snapshotId string) *ProjectsLocationsSnapshotsGetCall { 14057 c := &ProjectsLocationsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14058 c.projectId = projectId 14059 c.location = location 14060 c.snapshotId = snapshotId 14061 return c 14062} 14063 14064// Fields allows partial responses to be retrieved. See 14065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14066// for more information. 14067func (c *ProjectsLocationsSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSnapshotsGetCall { 14068 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14069 return c 14070} 14071 14072// IfNoneMatch sets the optional parameter which makes the operation 14073// fail if the object's ETag matches the given value. This is useful for 14074// getting updates only after the object has changed since the last 14075// request. Use googleapi.IsNotModified to check whether the response 14076// error from Do is the result of In-None-Match. 14077func (c *ProjectsLocationsSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSnapshotsGetCall { 14078 c.ifNoneMatch_ = entityTag 14079 return c 14080} 14081 14082// Context sets the context to be used in this call's Do method. Any 14083// pending HTTP request will be aborted if the provided context is 14084// canceled. 14085func (c *ProjectsLocationsSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsSnapshotsGetCall { 14086 c.ctx_ = ctx 14087 return c 14088} 14089 14090// Header returns an http.Header that can be modified by the caller to 14091// add HTTP headers to the request. 14092func (c *ProjectsLocationsSnapshotsGetCall) Header() http.Header { 14093 if c.header_ == nil { 14094 c.header_ = make(http.Header) 14095 } 14096 return c.header_ 14097} 14098 14099func (c *ProjectsLocationsSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { 14100 reqHeaders := make(http.Header) 14101 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14102 for k, v := range c.header_ { 14103 reqHeaders[k] = v 14104 } 14105 reqHeaders.Set("User-Agent", c.s.userAgent()) 14106 if c.ifNoneMatch_ != "" { 14107 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14108 } 14109 var body io.Reader = nil 14110 c.urlParams_.Set("alt", alt) 14111 c.urlParams_.Set("prettyPrint", "false") 14112 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}") 14113 urls += "?" + c.urlParams_.Encode() 14114 req, err := http.NewRequest("GET", urls, body) 14115 if err != nil { 14116 return nil, err 14117 } 14118 req.Header = reqHeaders 14119 googleapi.Expand(req.URL, map[string]string{ 14120 "projectId": c.projectId, 14121 "location": c.location, 14122 "snapshotId": c.snapshotId, 14123 }) 14124 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14125} 14126 14127// Do executes the "dataflow.projects.locations.snapshots.get" call. 14128// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status 14129// code is an error. Response headers are in either 14130// *Snapshot.ServerResponse.Header or (if a response was returned at 14131// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14132// to check whether the returned error was because 14133// http.StatusNotModified was returned. 14134func (c *ProjectsLocationsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 14135 gensupport.SetOptions(c.urlParams_, opts...) 14136 res, err := c.doRequest("json") 14137 if res != nil && res.StatusCode == http.StatusNotModified { 14138 if res.Body != nil { 14139 res.Body.Close() 14140 } 14141 return nil, &googleapi.Error{ 14142 Code: res.StatusCode, 14143 Header: res.Header, 14144 } 14145 } 14146 if err != nil { 14147 return nil, err 14148 } 14149 defer googleapi.CloseBody(res) 14150 if err := googleapi.CheckResponse(res); err != nil { 14151 return nil, err 14152 } 14153 ret := &Snapshot{ 14154 ServerResponse: googleapi.ServerResponse{ 14155 Header: res.Header, 14156 HTTPStatusCode: res.StatusCode, 14157 }, 14158 } 14159 target := &ret 14160 if err := gensupport.DecodeResponse(target, res); err != nil { 14161 return nil, err 14162 } 14163 return ret, nil 14164 // { 14165 // "description": "Gets information about a snapshot.", 14166 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}", 14167 // "httpMethod": "GET", 14168 // "id": "dataflow.projects.locations.snapshots.get", 14169 // "parameterOrder": [ 14170 // "projectId", 14171 // "location", 14172 // "snapshotId" 14173 // ], 14174 // "parameters": { 14175 // "location": { 14176 // "description": "The location that contains this snapshot.", 14177 // "location": "path", 14178 // "required": true, 14179 // "type": "string" 14180 // }, 14181 // "projectId": { 14182 // "description": "The ID of the Cloud Platform project that the snapshot belongs to.", 14183 // "location": "path", 14184 // "required": true, 14185 // "type": "string" 14186 // }, 14187 // "snapshotId": { 14188 // "description": "The ID of the snapshot.", 14189 // "location": "path", 14190 // "required": true, 14191 // "type": "string" 14192 // } 14193 // }, 14194 // "path": "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}", 14195 // "response": { 14196 // "$ref": "Snapshot" 14197 // }, 14198 // "scopes": [ 14199 // "https://www.googleapis.com/auth/cloud-platform", 14200 // "https://www.googleapis.com/auth/compute", 14201 // "https://www.googleapis.com/auth/compute.readonly", 14202 // "https://www.googleapis.com/auth/userinfo.email" 14203 // ] 14204 // } 14205 14206} 14207 14208// method id "dataflow.projects.locations.snapshots.list": 14209 14210type ProjectsLocationsSnapshotsListCall struct { 14211 s *Service 14212 projectId string 14213 location string 14214 urlParams_ gensupport.URLParams 14215 ifNoneMatch_ string 14216 ctx_ context.Context 14217 header_ http.Header 14218} 14219 14220// List: Lists snapshots. 14221// 14222// - location: The location to list snapshots in. 14223// - projectId: The project ID to list snapshots for. 14224func (r *ProjectsLocationsSnapshotsService) List(projectId string, location string) *ProjectsLocationsSnapshotsListCall { 14225 c := &ProjectsLocationsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14226 c.projectId = projectId 14227 c.location = location 14228 return c 14229} 14230 14231// JobId sets the optional parameter "jobId": If specified, list 14232// snapshots created from this job. 14233func (c *ProjectsLocationsSnapshotsListCall) JobId(jobId string) *ProjectsLocationsSnapshotsListCall { 14234 c.urlParams_.Set("jobId", jobId) 14235 return c 14236} 14237 14238// Fields allows partial responses to be retrieved. See 14239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14240// for more information. 14241func (c *ProjectsLocationsSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSnapshotsListCall { 14242 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14243 return c 14244} 14245 14246// IfNoneMatch sets the optional parameter which makes the operation 14247// fail if the object's ETag matches the given value. This is useful for 14248// getting updates only after the object has changed since the last 14249// request. Use googleapi.IsNotModified to check whether the response 14250// error from Do is the result of In-None-Match. 14251func (c *ProjectsLocationsSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSnapshotsListCall { 14252 c.ifNoneMatch_ = entityTag 14253 return c 14254} 14255 14256// Context sets the context to be used in this call's Do method. Any 14257// pending HTTP request will be aborted if the provided context is 14258// canceled. 14259func (c *ProjectsLocationsSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsSnapshotsListCall { 14260 c.ctx_ = ctx 14261 return c 14262} 14263 14264// Header returns an http.Header that can be modified by the caller to 14265// add HTTP headers to the request. 14266func (c *ProjectsLocationsSnapshotsListCall) Header() http.Header { 14267 if c.header_ == nil { 14268 c.header_ = make(http.Header) 14269 } 14270 return c.header_ 14271} 14272 14273func (c *ProjectsLocationsSnapshotsListCall) doRequest(alt string) (*http.Response, error) { 14274 reqHeaders := make(http.Header) 14275 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14276 for k, v := range c.header_ { 14277 reqHeaders[k] = v 14278 } 14279 reqHeaders.Set("User-Agent", c.s.userAgent()) 14280 if c.ifNoneMatch_ != "" { 14281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14282 } 14283 var body io.Reader = nil 14284 c.urlParams_.Set("alt", alt) 14285 c.urlParams_.Set("prettyPrint", "false") 14286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/snapshots") 14287 urls += "?" + c.urlParams_.Encode() 14288 req, err := http.NewRequest("GET", urls, body) 14289 if err != nil { 14290 return nil, err 14291 } 14292 req.Header = reqHeaders 14293 googleapi.Expand(req.URL, map[string]string{ 14294 "projectId": c.projectId, 14295 "location": c.location, 14296 }) 14297 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14298} 14299 14300// Do executes the "dataflow.projects.locations.snapshots.list" call. 14301// Exactly one of *ListSnapshotsResponse or error will be non-nil. Any 14302// non-2xx status code is an error. Response headers are in either 14303// *ListSnapshotsResponse.ServerResponse.Header or (if a response was 14304// returned at all) in error.(*googleapi.Error).Header. Use 14305// googleapi.IsNotModified to check whether the returned error was 14306// because http.StatusNotModified was returned. 14307func (c *ProjectsLocationsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) { 14308 gensupport.SetOptions(c.urlParams_, opts...) 14309 res, err := c.doRequest("json") 14310 if res != nil && res.StatusCode == http.StatusNotModified { 14311 if res.Body != nil { 14312 res.Body.Close() 14313 } 14314 return nil, &googleapi.Error{ 14315 Code: res.StatusCode, 14316 Header: res.Header, 14317 } 14318 } 14319 if err != nil { 14320 return nil, err 14321 } 14322 defer googleapi.CloseBody(res) 14323 if err := googleapi.CheckResponse(res); err != nil { 14324 return nil, err 14325 } 14326 ret := &ListSnapshotsResponse{ 14327 ServerResponse: googleapi.ServerResponse{ 14328 Header: res.Header, 14329 HTTPStatusCode: res.StatusCode, 14330 }, 14331 } 14332 target := &ret 14333 if err := gensupport.DecodeResponse(target, res); err != nil { 14334 return nil, err 14335 } 14336 return ret, nil 14337 // { 14338 // "description": "Lists snapshots.", 14339 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/snapshots", 14340 // "httpMethod": "GET", 14341 // "id": "dataflow.projects.locations.snapshots.list", 14342 // "parameterOrder": [ 14343 // "projectId", 14344 // "location" 14345 // ], 14346 // "parameters": { 14347 // "jobId": { 14348 // "description": "If specified, list snapshots created from this job.", 14349 // "location": "query", 14350 // "type": "string" 14351 // }, 14352 // "location": { 14353 // "description": "The location to list snapshots in.", 14354 // "location": "path", 14355 // "required": true, 14356 // "type": "string" 14357 // }, 14358 // "projectId": { 14359 // "description": "The project ID to list snapshots for.", 14360 // "location": "path", 14361 // "required": true, 14362 // "type": "string" 14363 // } 14364 // }, 14365 // "path": "v1b3/projects/{projectId}/locations/{location}/snapshots", 14366 // "response": { 14367 // "$ref": "ListSnapshotsResponse" 14368 // }, 14369 // "scopes": [ 14370 // "https://www.googleapis.com/auth/cloud-platform", 14371 // "https://www.googleapis.com/auth/compute", 14372 // "https://www.googleapis.com/auth/compute.readonly", 14373 // "https://www.googleapis.com/auth/userinfo.email" 14374 // ] 14375 // } 14376 14377} 14378 14379// method id "dataflow.projects.locations.sql.validate": 14380 14381type ProjectsLocationsSqlValidateCall struct { 14382 s *Service 14383 projectId string 14384 location string 14385 urlParams_ gensupport.URLParams 14386 ifNoneMatch_ string 14387 ctx_ context.Context 14388 header_ http.Header 14389} 14390 14391// Validate: Validates a GoogleSQL query for Cloud Dataflow syntax. Will 14392// always confirm the given query parses correctly, and if able to look 14393// up schema information from DataCatalog, will validate that the query 14394// analyzes properly as well. 14395// 14396// - location: The [regional endpoint] 14397// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 14398// to which to direct the request. 14399// - projectId: The ID of the Cloud Platform project that the job 14400// belongs to. 14401func (r *ProjectsLocationsSqlService) Validate(projectId string, location string) *ProjectsLocationsSqlValidateCall { 14402 c := &ProjectsLocationsSqlValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14403 c.projectId = projectId 14404 c.location = location 14405 return c 14406} 14407 14408// Query sets the optional parameter "query": The sql query to validate. 14409func (c *ProjectsLocationsSqlValidateCall) Query(query string) *ProjectsLocationsSqlValidateCall { 14410 c.urlParams_.Set("query", query) 14411 return c 14412} 14413 14414// Fields allows partial responses to be retrieved. See 14415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14416// for more information. 14417func (c *ProjectsLocationsSqlValidateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSqlValidateCall { 14418 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14419 return c 14420} 14421 14422// IfNoneMatch sets the optional parameter which makes the operation 14423// fail if the object's ETag matches the given value. This is useful for 14424// getting updates only after the object has changed since the last 14425// request. Use googleapi.IsNotModified to check whether the response 14426// error from Do is the result of In-None-Match. 14427func (c *ProjectsLocationsSqlValidateCall) IfNoneMatch(entityTag string) *ProjectsLocationsSqlValidateCall { 14428 c.ifNoneMatch_ = entityTag 14429 return c 14430} 14431 14432// Context sets the context to be used in this call's Do method. Any 14433// pending HTTP request will be aborted if the provided context is 14434// canceled. 14435func (c *ProjectsLocationsSqlValidateCall) Context(ctx context.Context) *ProjectsLocationsSqlValidateCall { 14436 c.ctx_ = ctx 14437 return c 14438} 14439 14440// Header returns an http.Header that can be modified by the caller to 14441// add HTTP headers to the request. 14442func (c *ProjectsLocationsSqlValidateCall) Header() http.Header { 14443 if c.header_ == nil { 14444 c.header_ = make(http.Header) 14445 } 14446 return c.header_ 14447} 14448 14449func (c *ProjectsLocationsSqlValidateCall) doRequest(alt string) (*http.Response, error) { 14450 reqHeaders := make(http.Header) 14451 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14452 for k, v := range c.header_ { 14453 reqHeaders[k] = v 14454 } 14455 reqHeaders.Set("User-Agent", c.s.userAgent()) 14456 if c.ifNoneMatch_ != "" { 14457 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14458 } 14459 var body io.Reader = nil 14460 c.urlParams_.Set("alt", alt) 14461 c.urlParams_.Set("prettyPrint", "false") 14462 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/sql:validate") 14463 urls += "?" + c.urlParams_.Encode() 14464 req, err := http.NewRequest("GET", urls, body) 14465 if err != nil { 14466 return nil, err 14467 } 14468 req.Header = reqHeaders 14469 googleapi.Expand(req.URL, map[string]string{ 14470 "projectId": c.projectId, 14471 "location": c.location, 14472 }) 14473 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14474} 14475 14476// Do executes the "dataflow.projects.locations.sql.validate" call. 14477// Exactly one of *ValidateResponse or error will be non-nil. Any 14478// non-2xx status code is an error. Response headers are in either 14479// *ValidateResponse.ServerResponse.Header or (if a response was 14480// returned at all) in error.(*googleapi.Error).Header. Use 14481// googleapi.IsNotModified to check whether the returned error was 14482// because http.StatusNotModified was returned. 14483func (c *ProjectsLocationsSqlValidateCall) Do(opts ...googleapi.CallOption) (*ValidateResponse, error) { 14484 gensupport.SetOptions(c.urlParams_, opts...) 14485 res, err := c.doRequest("json") 14486 if res != nil && res.StatusCode == http.StatusNotModified { 14487 if res.Body != nil { 14488 res.Body.Close() 14489 } 14490 return nil, &googleapi.Error{ 14491 Code: res.StatusCode, 14492 Header: res.Header, 14493 } 14494 } 14495 if err != nil { 14496 return nil, err 14497 } 14498 defer googleapi.CloseBody(res) 14499 if err := googleapi.CheckResponse(res); err != nil { 14500 return nil, err 14501 } 14502 ret := &ValidateResponse{ 14503 ServerResponse: googleapi.ServerResponse{ 14504 Header: res.Header, 14505 HTTPStatusCode: res.StatusCode, 14506 }, 14507 } 14508 target := &ret 14509 if err := gensupport.DecodeResponse(target, res); err != nil { 14510 return nil, err 14511 } 14512 return ret, nil 14513 // { 14514 // "description": "Validates a GoogleSQL query for Cloud Dataflow syntax. Will always confirm the given query parses correctly, and if able to look up schema information from DataCatalog, will validate that the query analyzes properly as well.", 14515 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/sql:validate", 14516 // "httpMethod": "GET", 14517 // "id": "dataflow.projects.locations.sql.validate", 14518 // "parameterOrder": [ 14519 // "projectId", 14520 // "location" 14521 // ], 14522 // "parameters": { 14523 // "location": { 14524 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.", 14525 // "location": "path", 14526 // "required": true, 14527 // "type": "string" 14528 // }, 14529 // "projectId": { 14530 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 14531 // "location": "path", 14532 // "required": true, 14533 // "type": "string" 14534 // }, 14535 // "query": { 14536 // "description": "The sql query to validate.", 14537 // "location": "query", 14538 // "type": "string" 14539 // } 14540 // }, 14541 // "path": "v1b3/projects/{projectId}/locations/{location}/sql:validate", 14542 // "response": { 14543 // "$ref": "ValidateResponse" 14544 // }, 14545 // "scopes": [ 14546 // "https://www.googleapis.com/auth/cloud-platform", 14547 // "https://www.googleapis.com/auth/userinfo.email" 14548 // ] 14549 // } 14550 14551} 14552 14553// method id "dataflow.projects.locations.templates.create": 14554 14555type ProjectsLocationsTemplatesCreateCall struct { 14556 s *Service 14557 projectId string 14558 location string 14559 createjobfromtemplaterequest *CreateJobFromTemplateRequest 14560 urlParams_ gensupport.URLParams 14561 ctx_ context.Context 14562 header_ http.Header 14563} 14564 14565// Create: Creates a Cloud Dataflow job from a template. 14566// 14567// - location: The [regional endpoint] 14568// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 14569// to which to direct the request. 14570// - projectId: The ID of the Cloud Platform project that the job 14571// belongs to. 14572func (r *ProjectsLocationsTemplatesService) Create(projectId string, location string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsLocationsTemplatesCreateCall { 14573 c := &ProjectsLocationsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14574 c.projectId = projectId 14575 c.location = location 14576 c.createjobfromtemplaterequest = createjobfromtemplaterequest 14577 return c 14578} 14579 14580// Fields allows partial responses to be retrieved. See 14581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14582// for more information. 14583func (c *ProjectsLocationsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesCreateCall { 14584 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14585 return c 14586} 14587 14588// Context sets the context to be used in this call's Do method. Any 14589// pending HTTP request will be aborted if the provided context is 14590// canceled. 14591func (c *ProjectsLocationsTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTemplatesCreateCall { 14592 c.ctx_ = ctx 14593 return c 14594} 14595 14596// Header returns an http.Header that can be modified by the caller to 14597// add HTTP headers to the request. 14598func (c *ProjectsLocationsTemplatesCreateCall) Header() http.Header { 14599 if c.header_ == nil { 14600 c.header_ = make(http.Header) 14601 } 14602 return c.header_ 14603} 14604 14605func (c *ProjectsLocationsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 14606 reqHeaders := make(http.Header) 14607 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14608 for k, v := range c.header_ { 14609 reqHeaders[k] = v 14610 } 14611 reqHeaders.Set("User-Agent", c.s.userAgent()) 14612 var body io.Reader = nil 14613 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest) 14614 if err != nil { 14615 return nil, err 14616 } 14617 reqHeaders.Set("Content-Type", "application/json") 14618 c.urlParams_.Set("alt", alt) 14619 c.urlParams_.Set("prettyPrint", "false") 14620 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates") 14621 urls += "?" + c.urlParams_.Encode() 14622 req, err := http.NewRequest("POST", urls, body) 14623 if err != nil { 14624 return nil, err 14625 } 14626 req.Header = reqHeaders 14627 googleapi.Expand(req.URL, map[string]string{ 14628 "projectId": c.projectId, 14629 "location": c.location, 14630 }) 14631 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14632} 14633 14634// Do executes the "dataflow.projects.locations.templates.create" call. 14635// Exactly one of *Job or error will be non-nil. Any non-2xx status code 14636// is an error. Response headers are in either 14637// *Job.ServerResponse.Header or (if a response was returned at all) in 14638// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 14639// whether the returned error was because http.StatusNotModified was 14640// returned. 14641func (c *ProjectsLocationsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 14642 gensupport.SetOptions(c.urlParams_, opts...) 14643 res, err := c.doRequest("json") 14644 if res != nil && res.StatusCode == http.StatusNotModified { 14645 if res.Body != nil { 14646 res.Body.Close() 14647 } 14648 return nil, &googleapi.Error{ 14649 Code: res.StatusCode, 14650 Header: res.Header, 14651 } 14652 } 14653 if err != nil { 14654 return nil, err 14655 } 14656 defer googleapi.CloseBody(res) 14657 if err := googleapi.CheckResponse(res); err != nil { 14658 return nil, err 14659 } 14660 ret := &Job{ 14661 ServerResponse: googleapi.ServerResponse{ 14662 Header: res.Header, 14663 HTTPStatusCode: res.StatusCode, 14664 }, 14665 } 14666 target := &ret 14667 if err := gensupport.DecodeResponse(target, res); err != nil { 14668 return nil, err 14669 } 14670 return ret, nil 14671 // { 14672 // "description": "Creates a Cloud Dataflow job from a template.", 14673 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", 14674 // "httpMethod": "POST", 14675 // "id": "dataflow.projects.locations.templates.create", 14676 // "parameterOrder": [ 14677 // "projectId", 14678 // "location" 14679 // ], 14680 // "parameters": { 14681 // "location": { 14682 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.", 14683 // "location": "path", 14684 // "required": true, 14685 // "type": "string" 14686 // }, 14687 // "projectId": { 14688 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 14689 // "location": "path", 14690 // "required": true, 14691 // "type": "string" 14692 // } 14693 // }, 14694 // "path": "v1b3/projects/{projectId}/locations/{location}/templates", 14695 // "request": { 14696 // "$ref": "CreateJobFromTemplateRequest" 14697 // }, 14698 // "response": { 14699 // "$ref": "Job" 14700 // }, 14701 // "scopes": [ 14702 // "https://www.googleapis.com/auth/cloud-platform", 14703 // "https://www.googleapis.com/auth/compute", 14704 // "https://www.googleapis.com/auth/compute.readonly", 14705 // "https://www.googleapis.com/auth/userinfo.email" 14706 // ] 14707 // } 14708 14709} 14710 14711// method id "dataflow.projects.locations.templates.get": 14712 14713type ProjectsLocationsTemplatesGetCall struct { 14714 s *Service 14715 projectId string 14716 location string 14717 urlParams_ gensupport.URLParams 14718 ifNoneMatch_ string 14719 ctx_ context.Context 14720 header_ http.Header 14721} 14722 14723// Get: Get the template associated with a template. 14724// 14725// - location: The [regional endpoint] 14726// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 14727// to which to direct the request. 14728// - projectId: The ID of the Cloud Platform project that the job 14729// belongs to. 14730func (r *ProjectsLocationsTemplatesService) Get(projectId string, location string) *ProjectsLocationsTemplatesGetCall { 14731 c := &ProjectsLocationsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14732 c.projectId = projectId 14733 c.location = location 14734 return c 14735} 14736 14737// GcsPath sets the optional parameter "gcsPath": Required. A Cloud 14738// Storage path to the template from which to create the job. Must be 14739// valid Cloud Storage URL, beginning with 'gs://'. 14740func (c *ProjectsLocationsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesGetCall { 14741 c.urlParams_.Set("gcsPath", gcsPath) 14742 return c 14743} 14744 14745// View sets the optional parameter "view": The view to retrieve. 14746// Defaults to METADATA_ONLY. 14747// 14748// Possible values: 14749// "METADATA_ONLY" - Template view that retrieves only the metadata 14750// associated with the template. 14751func (c *ProjectsLocationsTemplatesGetCall) View(view string) *ProjectsLocationsTemplatesGetCall { 14752 c.urlParams_.Set("view", view) 14753 return c 14754} 14755 14756// Fields allows partial responses to be retrieved. See 14757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14758// for more information. 14759func (c *ProjectsLocationsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesGetCall { 14760 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14761 return c 14762} 14763 14764// IfNoneMatch sets the optional parameter which makes the operation 14765// fail if the object's ETag matches the given value. This is useful for 14766// getting updates only after the object has changed since the last 14767// request. Use googleapi.IsNotModified to check whether the response 14768// error from Do is the result of In-None-Match. 14769func (c *ProjectsLocationsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTemplatesGetCall { 14770 c.ifNoneMatch_ = entityTag 14771 return c 14772} 14773 14774// Context sets the context to be used in this call's Do method. Any 14775// pending HTTP request will be aborted if the provided context is 14776// canceled. 14777func (c *ProjectsLocationsTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTemplatesGetCall { 14778 c.ctx_ = ctx 14779 return c 14780} 14781 14782// Header returns an http.Header that can be modified by the caller to 14783// add HTTP headers to the request. 14784func (c *ProjectsLocationsTemplatesGetCall) Header() http.Header { 14785 if c.header_ == nil { 14786 c.header_ = make(http.Header) 14787 } 14788 return c.header_ 14789} 14790 14791func (c *ProjectsLocationsTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 14792 reqHeaders := make(http.Header) 14793 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14794 for k, v := range c.header_ { 14795 reqHeaders[k] = v 14796 } 14797 reqHeaders.Set("User-Agent", c.s.userAgent()) 14798 if c.ifNoneMatch_ != "" { 14799 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14800 } 14801 var body io.Reader = nil 14802 c.urlParams_.Set("alt", alt) 14803 c.urlParams_.Set("prettyPrint", "false") 14804 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:get") 14805 urls += "?" + c.urlParams_.Encode() 14806 req, err := http.NewRequest("GET", urls, body) 14807 if err != nil { 14808 return nil, err 14809 } 14810 req.Header = reqHeaders 14811 googleapi.Expand(req.URL, map[string]string{ 14812 "projectId": c.projectId, 14813 "location": c.location, 14814 }) 14815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14816} 14817 14818// Do executes the "dataflow.projects.locations.templates.get" call. 14819// Exactly one of *GetTemplateResponse or error will be non-nil. Any 14820// non-2xx status code is an error. Response headers are in either 14821// *GetTemplateResponse.ServerResponse.Header or (if a response was 14822// returned at all) in error.(*googleapi.Error).Header. Use 14823// googleapi.IsNotModified to check whether the returned error was 14824// because http.StatusNotModified was returned. 14825func (c *ProjectsLocationsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) { 14826 gensupport.SetOptions(c.urlParams_, opts...) 14827 res, err := c.doRequest("json") 14828 if res != nil && res.StatusCode == http.StatusNotModified { 14829 if res.Body != nil { 14830 res.Body.Close() 14831 } 14832 return nil, &googleapi.Error{ 14833 Code: res.StatusCode, 14834 Header: res.Header, 14835 } 14836 } 14837 if err != nil { 14838 return nil, err 14839 } 14840 defer googleapi.CloseBody(res) 14841 if err := googleapi.CheckResponse(res); err != nil { 14842 return nil, err 14843 } 14844 ret := &GetTemplateResponse{ 14845 ServerResponse: googleapi.ServerResponse{ 14846 Header: res.Header, 14847 HTTPStatusCode: res.StatusCode, 14848 }, 14849 } 14850 target := &ret 14851 if err := gensupport.DecodeResponse(target, res); err != nil { 14852 return nil, err 14853 } 14854 return ret, nil 14855 // { 14856 // "description": "Get the template associated with a template.", 14857 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", 14858 // "httpMethod": "GET", 14859 // "id": "dataflow.projects.locations.templates.get", 14860 // "parameterOrder": [ 14861 // "projectId", 14862 // "location" 14863 // ], 14864 // "parameters": { 14865 // "gcsPath": { 14866 // "description": "Required. A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.", 14867 // "location": "query", 14868 // "type": "string" 14869 // }, 14870 // "location": { 14871 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.", 14872 // "location": "path", 14873 // "required": true, 14874 // "type": "string" 14875 // }, 14876 // "projectId": { 14877 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 14878 // "location": "path", 14879 // "required": true, 14880 // "type": "string" 14881 // }, 14882 // "view": { 14883 // "description": "The view to retrieve. Defaults to METADATA_ONLY.", 14884 // "enum": [ 14885 // "METADATA_ONLY" 14886 // ], 14887 // "enumDescriptions": [ 14888 // "Template view that retrieves only the metadata associated with the template." 14889 // ], 14890 // "location": "query", 14891 // "type": "string" 14892 // } 14893 // }, 14894 // "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", 14895 // "response": { 14896 // "$ref": "GetTemplateResponse" 14897 // }, 14898 // "scopes": [ 14899 // "https://www.googleapis.com/auth/cloud-platform", 14900 // "https://www.googleapis.com/auth/compute", 14901 // "https://www.googleapis.com/auth/compute.readonly", 14902 // "https://www.googleapis.com/auth/userinfo.email" 14903 // ] 14904 // } 14905 14906} 14907 14908// method id "dataflow.projects.locations.templates.launch": 14909 14910type ProjectsLocationsTemplatesLaunchCall struct { 14911 s *Service 14912 projectId string 14913 location string 14914 launchtemplateparameters *LaunchTemplateParameters 14915 urlParams_ gensupport.URLParams 14916 ctx_ context.Context 14917 header_ http.Header 14918} 14919 14920// Launch: Launch a template. 14921// 14922// - location: The [regional endpoint] 14923// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 14924// to which to direct the request. 14925// - projectId: The ID of the Cloud Platform project that the job 14926// belongs to. 14927func (r *ProjectsLocationsTemplatesService) Launch(projectId string, location string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsLocationsTemplatesLaunchCall { 14928 c := &ProjectsLocationsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14929 c.projectId = projectId 14930 c.location = location 14931 c.launchtemplateparameters = launchtemplateparameters 14932 return c 14933} 14934 14935// DynamicTemplateGcsPath sets the optional parameter 14936// "dynamicTemplate.gcsPath": Path to dynamic template spec file on 14937// Cloud Storage. The file must be a Json serialized 14938// DynamicTemplateFieSpec object. 14939func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsLocationsTemplatesLaunchCall { 14940 c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath) 14941 return c 14942} 14943 14944// DynamicTemplateStagingLocation sets the optional parameter 14945// "dynamicTemplate.stagingLocation": Cloud Storage path for staging 14946// dependencies. Must be a valid Cloud Storage URL, beginning with 14947// `gs://`. 14948func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsLocationsTemplatesLaunchCall { 14949 c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation) 14950 return c 14951} 14952 14953// GcsPath sets the optional parameter "gcsPath": A Cloud Storage path 14954// to the template from which to create the job. Must be valid Cloud 14955// Storage URL, beginning with 'gs://'. 14956func (c *ProjectsLocationsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesLaunchCall { 14957 c.urlParams_.Set("gcsPath", gcsPath) 14958 return c 14959} 14960 14961// ValidateOnly sets the optional parameter "validateOnly": If true, the 14962// request is validated but not actually executed. Defaults to false. 14963func (c *ProjectsLocationsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTemplatesLaunchCall { 14964 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 14965 return c 14966} 14967 14968// Fields allows partial responses to be retrieved. See 14969// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14970// for more information. 14971func (c *ProjectsLocationsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesLaunchCall { 14972 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14973 return c 14974} 14975 14976// Context sets the context to be used in this call's Do method. Any 14977// pending HTTP request will be aborted if the provided context is 14978// canceled. 14979func (c *ProjectsLocationsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsTemplatesLaunchCall { 14980 c.ctx_ = ctx 14981 return c 14982} 14983 14984// Header returns an http.Header that can be modified by the caller to 14985// add HTTP headers to the request. 14986func (c *ProjectsLocationsTemplatesLaunchCall) Header() http.Header { 14987 if c.header_ == nil { 14988 c.header_ = make(http.Header) 14989 } 14990 return c.header_ 14991} 14992 14993func (c *ProjectsLocationsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 14994 reqHeaders := make(http.Header) 14995 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 14996 for k, v := range c.header_ { 14997 reqHeaders[k] = v 14998 } 14999 reqHeaders.Set("User-Agent", c.s.userAgent()) 15000 var body io.Reader = nil 15001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters) 15002 if err != nil { 15003 return nil, err 15004 } 15005 reqHeaders.Set("Content-Type", "application/json") 15006 c.urlParams_.Set("alt", alt) 15007 c.urlParams_.Set("prettyPrint", "false") 15008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:launch") 15009 urls += "?" + c.urlParams_.Encode() 15010 req, err := http.NewRequest("POST", urls, body) 15011 if err != nil { 15012 return nil, err 15013 } 15014 req.Header = reqHeaders 15015 googleapi.Expand(req.URL, map[string]string{ 15016 "projectId": c.projectId, 15017 "location": c.location, 15018 }) 15019 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15020} 15021 15022// Do executes the "dataflow.projects.locations.templates.launch" call. 15023// Exactly one of *LaunchTemplateResponse or error will be non-nil. Any 15024// non-2xx status code is an error. Response headers are in either 15025// *LaunchTemplateResponse.ServerResponse.Header or (if a response was 15026// returned at all) in error.(*googleapi.Error).Header. Use 15027// googleapi.IsNotModified to check whether the returned error was 15028// because http.StatusNotModified was returned. 15029func (c *ProjectsLocationsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) { 15030 gensupport.SetOptions(c.urlParams_, opts...) 15031 res, err := c.doRequest("json") 15032 if res != nil && res.StatusCode == http.StatusNotModified { 15033 if res.Body != nil { 15034 res.Body.Close() 15035 } 15036 return nil, &googleapi.Error{ 15037 Code: res.StatusCode, 15038 Header: res.Header, 15039 } 15040 } 15041 if err != nil { 15042 return nil, err 15043 } 15044 defer googleapi.CloseBody(res) 15045 if err := googleapi.CheckResponse(res); err != nil { 15046 return nil, err 15047 } 15048 ret := &LaunchTemplateResponse{ 15049 ServerResponse: googleapi.ServerResponse{ 15050 Header: res.Header, 15051 HTTPStatusCode: res.StatusCode, 15052 }, 15053 } 15054 target := &ret 15055 if err := gensupport.DecodeResponse(target, res); err != nil { 15056 return nil, err 15057 } 15058 return ret, nil 15059 // { 15060 // "description": "Launch a template.", 15061 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch", 15062 // "httpMethod": "POST", 15063 // "id": "dataflow.projects.locations.templates.launch", 15064 // "parameterOrder": [ 15065 // "projectId", 15066 // "location" 15067 // ], 15068 // "parameters": { 15069 // "dynamicTemplate.gcsPath": { 15070 // "description": "Path to dynamic template spec file on Cloud Storage. The file must be a Json serialized DynamicTemplateFieSpec object.", 15071 // "location": "query", 15072 // "type": "string" 15073 // }, 15074 // "dynamicTemplate.stagingLocation": { 15075 // "description": "Cloud Storage path for staging dependencies. Must be a valid Cloud Storage URL, beginning with `gs://`.", 15076 // "location": "query", 15077 // "type": "string" 15078 // }, 15079 // "gcsPath": { 15080 // "description": "A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.", 15081 // "location": "query", 15082 // "type": "string" 15083 // }, 15084 // "location": { 15085 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.", 15086 // "location": "path", 15087 // "required": true, 15088 // "type": "string" 15089 // }, 15090 // "projectId": { 15091 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 15092 // "location": "path", 15093 // "required": true, 15094 // "type": "string" 15095 // }, 15096 // "validateOnly": { 15097 // "description": "If true, the request is validated but not actually executed. Defaults to false.", 15098 // "location": "query", 15099 // "type": "boolean" 15100 // } 15101 // }, 15102 // "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch", 15103 // "request": { 15104 // "$ref": "LaunchTemplateParameters" 15105 // }, 15106 // "response": { 15107 // "$ref": "LaunchTemplateResponse" 15108 // }, 15109 // "scopes": [ 15110 // "https://www.googleapis.com/auth/cloud-platform", 15111 // "https://www.googleapis.com/auth/compute", 15112 // "https://www.googleapis.com/auth/compute.readonly", 15113 // "https://www.googleapis.com/auth/userinfo.email" 15114 // ] 15115 // } 15116 15117} 15118 15119// method id "dataflow.projects.snapshots.get": 15120 15121type ProjectsSnapshotsGetCall struct { 15122 s *Service 15123 projectId string 15124 snapshotId string 15125 urlParams_ gensupport.URLParams 15126 ifNoneMatch_ string 15127 ctx_ context.Context 15128 header_ http.Header 15129} 15130 15131// Get: Gets information about a snapshot. 15132// 15133// - projectId: The ID of the Cloud Platform project that the snapshot 15134// belongs to. 15135// - snapshotId: The ID of the snapshot. 15136func (r *ProjectsSnapshotsService) Get(projectId string, snapshotId string) *ProjectsSnapshotsGetCall { 15137 c := &ProjectsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15138 c.projectId = projectId 15139 c.snapshotId = snapshotId 15140 return c 15141} 15142 15143// Location sets the optional parameter "location": The location that 15144// contains this snapshot. 15145func (c *ProjectsSnapshotsGetCall) Location(location string) *ProjectsSnapshotsGetCall { 15146 c.urlParams_.Set("location", location) 15147 return c 15148} 15149 15150// Fields allows partial responses to be retrieved. See 15151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15152// for more information. 15153func (c *ProjectsSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsGetCall { 15154 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15155 return c 15156} 15157 15158// IfNoneMatch sets the optional parameter which makes the operation 15159// fail if the object's ETag matches the given value. This is useful for 15160// getting updates only after the object has changed since the last 15161// request. Use googleapi.IsNotModified to check whether the response 15162// error from Do is the result of In-None-Match. 15163func (c *ProjectsSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsSnapshotsGetCall { 15164 c.ifNoneMatch_ = entityTag 15165 return c 15166} 15167 15168// Context sets the context to be used in this call's Do method. Any 15169// pending HTTP request will be aborted if the provided context is 15170// canceled. 15171func (c *ProjectsSnapshotsGetCall) Context(ctx context.Context) *ProjectsSnapshotsGetCall { 15172 c.ctx_ = ctx 15173 return c 15174} 15175 15176// Header returns an http.Header that can be modified by the caller to 15177// add HTTP headers to the request. 15178func (c *ProjectsSnapshotsGetCall) Header() http.Header { 15179 if c.header_ == nil { 15180 c.header_ = make(http.Header) 15181 } 15182 return c.header_ 15183} 15184 15185func (c *ProjectsSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { 15186 reqHeaders := make(http.Header) 15187 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15188 for k, v := range c.header_ { 15189 reqHeaders[k] = v 15190 } 15191 reqHeaders.Set("User-Agent", c.s.userAgent()) 15192 if c.ifNoneMatch_ != "" { 15193 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15194 } 15195 var body io.Reader = nil 15196 c.urlParams_.Set("alt", alt) 15197 c.urlParams_.Set("prettyPrint", "false") 15198 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/snapshots/{snapshotId}") 15199 urls += "?" + c.urlParams_.Encode() 15200 req, err := http.NewRequest("GET", urls, body) 15201 if err != nil { 15202 return nil, err 15203 } 15204 req.Header = reqHeaders 15205 googleapi.Expand(req.URL, map[string]string{ 15206 "projectId": c.projectId, 15207 "snapshotId": c.snapshotId, 15208 }) 15209 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15210} 15211 15212// Do executes the "dataflow.projects.snapshots.get" call. 15213// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status 15214// code is an error. Response headers are in either 15215// *Snapshot.ServerResponse.Header or (if a response was returned at 15216// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15217// to check whether the returned error was because 15218// http.StatusNotModified was returned. 15219func (c *ProjectsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 15220 gensupport.SetOptions(c.urlParams_, opts...) 15221 res, err := c.doRequest("json") 15222 if res != nil && res.StatusCode == http.StatusNotModified { 15223 if res.Body != nil { 15224 res.Body.Close() 15225 } 15226 return nil, &googleapi.Error{ 15227 Code: res.StatusCode, 15228 Header: res.Header, 15229 } 15230 } 15231 if err != nil { 15232 return nil, err 15233 } 15234 defer googleapi.CloseBody(res) 15235 if err := googleapi.CheckResponse(res); err != nil { 15236 return nil, err 15237 } 15238 ret := &Snapshot{ 15239 ServerResponse: googleapi.ServerResponse{ 15240 Header: res.Header, 15241 HTTPStatusCode: res.StatusCode, 15242 }, 15243 } 15244 target := &ret 15245 if err := gensupport.DecodeResponse(target, res); err != nil { 15246 return nil, err 15247 } 15248 return ret, nil 15249 // { 15250 // "description": "Gets information about a snapshot.", 15251 // "flatPath": "v1b3/projects/{projectId}/snapshots/{snapshotId}", 15252 // "httpMethod": "GET", 15253 // "id": "dataflow.projects.snapshots.get", 15254 // "parameterOrder": [ 15255 // "projectId", 15256 // "snapshotId" 15257 // ], 15258 // "parameters": { 15259 // "location": { 15260 // "description": "The location that contains this snapshot.", 15261 // "location": "query", 15262 // "type": "string" 15263 // }, 15264 // "projectId": { 15265 // "description": "The ID of the Cloud Platform project that the snapshot belongs to.", 15266 // "location": "path", 15267 // "required": true, 15268 // "type": "string" 15269 // }, 15270 // "snapshotId": { 15271 // "description": "The ID of the snapshot.", 15272 // "location": "path", 15273 // "required": true, 15274 // "type": "string" 15275 // } 15276 // }, 15277 // "path": "v1b3/projects/{projectId}/snapshots/{snapshotId}", 15278 // "response": { 15279 // "$ref": "Snapshot" 15280 // }, 15281 // "scopes": [ 15282 // "https://www.googleapis.com/auth/cloud-platform", 15283 // "https://www.googleapis.com/auth/compute", 15284 // "https://www.googleapis.com/auth/compute.readonly", 15285 // "https://www.googleapis.com/auth/userinfo.email" 15286 // ] 15287 // } 15288 15289} 15290 15291// method id "dataflow.projects.snapshots.list": 15292 15293type ProjectsSnapshotsListCall struct { 15294 s *Service 15295 projectId string 15296 urlParams_ gensupport.URLParams 15297 ifNoneMatch_ string 15298 ctx_ context.Context 15299 header_ http.Header 15300} 15301 15302// List: Lists snapshots. 15303// 15304// - projectId: The project ID to list snapshots for. 15305func (r *ProjectsSnapshotsService) List(projectId string) *ProjectsSnapshotsListCall { 15306 c := &ProjectsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15307 c.projectId = projectId 15308 return c 15309} 15310 15311// JobId sets the optional parameter "jobId": If specified, list 15312// snapshots created from this job. 15313func (c *ProjectsSnapshotsListCall) JobId(jobId string) *ProjectsSnapshotsListCall { 15314 c.urlParams_.Set("jobId", jobId) 15315 return c 15316} 15317 15318// Location sets the optional parameter "location": The location to list 15319// snapshots in. 15320func (c *ProjectsSnapshotsListCall) Location(location string) *ProjectsSnapshotsListCall { 15321 c.urlParams_.Set("location", location) 15322 return c 15323} 15324 15325// Fields allows partial responses to be retrieved. See 15326// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15327// for more information. 15328func (c *ProjectsSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsListCall { 15329 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15330 return c 15331} 15332 15333// IfNoneMatch sets the optional parameter which makes the operation 15334// fail if the object's ETag matches the given value. This is useful for 15335// getting updates only after the object has changed since the last 15336// request. Use googleapi.IsNotModified to check whether the response 15337// error from Do is the result of In-None-Match. 15338func (c *ProjectsSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsSnapshotsListCall { 15339 c.ifNoneMatch_ = entityTag 15340 return c 15341} 15342 15343// Context sets the context to be used in this call's Do method. Any 15344// pending HTTP request will be aborted if the provided context is 15345// canceled. 15346func (c *ProjectsSnapshotsListCall) Context(ctx context.Context) *ProjectsSnapshotsListCall { 15347 c.ctx_ = ctx 15348 return c 15349} 15350 15351// Header returns an http.Header that can be modified by the caller to 15352// add HTTP headers to the request. 15353func (c *ProjectsSnapshotsListCall) Header() http.Header { 15354 if c.header_ == nil { 15355 c.header_ = make(http.Header) 15356 } 15357 return c.header_ 15358} 15359 15360func (c *ProjectsSnapshotsListCall) doRequest(alt string) (*http.Response, error) { 15361 reqHeaders := make(http.Header) 15362 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15363 for k, v := range c.header_ { 15364 reqHeaders[k] = v 15365 } 15366 reqHeaders.Set("User-Agent", c.s.userAgent()) 15367 if c.ifNoneMatch_ != "" { 15368 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15369 } 15370 var body io.Reader = nil 15371 c.urlParams_.Set("alt", alt) 15372 c.urlParams_.Set("prettyPrint", "false") 15373 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/snapshots") 15374 urls += "?" + c.urlParams_.Encode() 15375 req, err := http.NewRequest("GET", urls, body) 15376 if err != nil { 15377 return nil, err 15378 } 15379 req.Header = reqHeaders 15380 googleapi.Expand(req.URL, map[string]string{ 15381 "projectId": c.projectId, 15382 }) 15383 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15384} 15385 15386// Do executes the "dataflow.projects.snapshots.list" call. 15387// Exactly one of *ListSnapshotsResponse or error will be non-nil. Any 15388// non-2xx status code is an error. Response headers are in either 15389// *ListSnapshotsResponse.ServerResponse.Header or (if a response was 15390// returned at all) in error.(*googleapi.Error).Header. Use 15391// googleapi.IsNotModified to check whether the returned error was 15392// because http.StatusNotModified was returned. 15393func (c *ProjectsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) { 15394 gensupport.SetOptions(c.urlParams_, opts...) 15395 res, err := c.doRequest("json") 15396 if res != nil && res.StatusCode == http.StatusNotModified { 15397 if res.Body != nil { 15398 res.Body.Close() 15399 } 15400 return nil, &googleapi.Error{ 15401 Code: res.StatusCode, 15402 Header: res.Header, 15403 } 15404 } 15405 if err != nil { 15406 return nil, err 15407 } 15408 defer googleapi.CloseBody(res) 15409 if err := googleapi.CheckResponse(res); err != nil { 15410 return nil, err 15411 } 15412 ret := &ListSnapshotsResponse{ 15413 ServerResponse: googleapi.ServerResponse{ 15414 Header: res.Header, 15415 HTTPStatusCode: res.StatusCode, 15416 }, 15417 } 15418 target := &ret 15419 if err := gensupport.DecodeResponse(target, res); err != nil { 15420 return nil, err 15421 } 15422 return ret, nil 15423 // { 15424 // "description": "Lists snapshots.", 15425 // "flatPath": "v1b3/projects/{projectId}/snapshots", 15426 // "httpMethod": "GET", 15427 // "id": "dataflow.projects.snapshots.list", 15428 // "parameterOrder": [ 15429 // "projectId" 15430 // ], 15431 // "parameters": { 15432 // "jobId": { 15433 // "description": "If specified, list snapshots created from this job.", 15434 // "location": "query", 15435 // "type": "string" 15436 // }, 15437 // "location": { 15438 // "description": "The location to list snapshots in.", 15439 // "location": "query", 15440 // "type": "string" 15441 // }, 15442 // "projectId": { 15443 // "description": "The project ID to list snapshots for.", 15444 // "location": "path", 15445 // "required": true, 15446 // "type": "string" 15447 // } 15448 // }, 15449 // "path": "v1b3/projects/{projectId}/snapshots", 15450 // "response": { 15451 // "$ref": "ListSnapshotsResponse" 15452 // }, 15453 // "scopes": [ 15454 // "https://www.googleapis.com/auth/cloud-platform", 15455 // "https://www.googleapis.com/auth/compute", 15456 // "https://www.googleapis.com/auth/compute.readonly", 15457 // "https://www.googleapis.com/auth/userinfo.email" 15458 // ] 15459 // } 15460 15461} 15462 15463// method id "dataflow.projects.templates.create": 15464 15465type ProjectsTemplatesCreateCall struct { 15466 s *Service 15467 projectId string 15468 createjobfromtemplaterequest *CreateJobFromTemplateRequest 15469 urlParams_ gensupport.URLParams 15470 ctx_ context.Context 15471 header_ http.Header 15472} 15473 15474// Create: Creates a Cloud Dataflow job from a template. 15475// 15476// - projectId: The ID of the Cloud Platform project that the job 15477// belongs to. 15478func (r *ProjectsTemplatesService) Create(projectId string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsTemplatesCreateCall { 15479 c := &ProjectsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15480 c.projectId = projectId 15481 c.createjobfromtemplaterequest = createjobfromtemplaterequest 15482 return c 15483} 15484 15485// Fields allows partial responses to be retrieved. See 15486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15487// for more information. 15488func (c *ProjectsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsTemplatesCreateCall { 15489 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15490 return c 15491} 15492 15493// Context sets the context to be used in this call's Do method. Any 15494// pending HTTP request will be aborted if the provided context is 15495// canceled. 15496func (c *ProjectsTemplatesCreateCall) Context(ctx context.Context) *ProjectsTemplatesCreateCall { 15497 c.ctx_ = ctx 15498 return c 15499} 15500 15501// Header returns an http.Header that can be modified by the caller to 15502// add HTTP headers to the request. 15503func (c *ProjectsTemplatesCreateCall) Header() http.Header { 15504 if c.header_ == nil { 15505 c.header_ = make(http.Header) 15506 } 15507 return c.header_ 15508} 15509 15510func (c *ProjectsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 15511 reqHeaders := make(http.Header) 15512 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15513 for k, v := range c.header_ { 15514 reqHeaders[k] = v 15515 } 15516 reqHeaders.Set("User-Agent", c.s.userAgent()) 15517 var body io.Reader = nil 15518 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest) 15519 if err != nil { 15520 return nil, err 15521 } 15522 reqHeaders.Set("Content-Type", "application/json") 15523 c.urlParams_.Set("alt", alt) 15524 c.urlParams_.Set("prettyPrint", "false") 15525 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates") 15526 urls += "?" + c.urlParams_.Encode() 15527 req, err := http.NewRequest("POST", urls, body) 15528 if err != nil { 15529 return nil, err 15530 } 15531 req.Header = reqHeaders 15532 googleapi.Expand(req.URL, map[string]string{ 15533 "projectId": c.projectId, 15534 }) 15535 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15536} 15537 15538// Do executes the "dataflow.projects.templates.create" call. 15539// Exactly one of *Job or error will be non-nil. Any non-2xx status code 15540// is an error. Response headers are in either 15541// *Job.ServerResponse.Header or (if a response was returned at all) in 15542// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 15543// whether the returned error was because http.StatusNotModified was 15544// returned. 15545func (c *ProjectsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 15546 gensupport.SetOptions(c.urlParams_, opts...) 15547 res, err := c.doRequest("json") 15548 if res != nil && res.StatusCode == http.StatusNotModified { 15549 if res.Body != nil { 15550 res.Body.Close() 15551 } 15552 return nil, &googleapi.Error{ 15553 Code: res.StatusCode, 15554 Header: res.Header, 15555 } 15556 } 15557 if err != nil { 15558 return nil, err 15559 } 15560 defer googleapi.CloseBody(res) 15561 if err := googleapi.CheckResponse(res); err != nil { 15562 return nil, err 15563 } 15564 ret := &Job{ 15565 ServerResponse: googleapi.ServerResponse{ 15566 Header: res.Header, 15567 HTTPStatusCode: res.StatusCode, 15568 }, 15569 } 15570 target := &ret 15571 if err := gensupport.DecodeResponse(target, res); err != nil { 15572 return nil, err 15573 } 15574 return ret, nil 15575 // { 15576 // "description": "Creates a Cloud Dataflow job from a template.", 15577 // "flatPath": "v1b3/projects/{projectId}/templates", 15578 // "httpMethod": "POST", 15579 // "id": "dataflow.projects.templates.create", 15580 // "parameterOrder": [ 15581 // "projectId" 15582 // ], 15583 // "parameters": { 15584 // "projectId": { 15585 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 15586 // "location": "path", 15587 // "required": true, 15588 // "type": "string" 15589 // } 15590 // }, 15591 // "path": "v1b3/projects/{projectId}/templates", 15592 // "request": { 15593 // "$ref": "CreateJobFromTemplateRequest" 15594 // }, 15595 // "response": { 15596 // "$ref": "Job" 15597 // }, 15598 // "scopes": [ 15599 // "https://www.googleapis.com/auth/cloud-platform", 15600 // "https://www.googleapis.com/auth/compute", 15601 // "https://www.googleapis.com/auth/compute.readonly", 15602 // "https://www.googleapis.com/auth/userinfo.email" 15603 // ] 15604 // } 15605 15606} 15607 15608// method id "dataflow.projects.templates.get": 15609 15610type ProjectsTemplatesGetCall struct { 15611 s *Service 15612 projectId string 15613 urlParams_ gensupport.URLParams 15614 ifNoneMatch_ string 15615 ctx_ context.Context 15616 header_ http.Header 15617} 15618 15619// Get: Get the template associated with a template. 15620// 15621// - projectId: The ID of the Cloud Platform project that the job 15622// belongs to. 15623func (r *ProjectsTemplatesService) Get(projectId string) *ProjectsTemplatesGetCall { 15624 c := &ProjectsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15625 c.projectId = projectId 15626 return c 15627} 15628 15629// GcsPath sets the optional parameter "gcsPath": Required. A Cloud 15630// Storage path to the template from which to create the job. Must be 15631// valid Cloud Storage URL, beginning with 'gs://'. 15632func (c *ProjectsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsTemplatesGetCall { 15633 c.urlParams_.Set("gcsPath", gcsPath) 15634 return c 15635} 15636 15637// Location sets the optional parameter "location": The [regional 15638// endpoint] 15639// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 15640// to which to direct the request. 15641func (c *ProjectsTemplatesGetCall) Location(location string) *ProjectsTemplatesGetCall { 15642 c.urlParams_.Set("location", location) 15643 return c 15644} 15645 15646// View sets the optional parameter "view": The view to retrieve. 15647// Defaults to METADATA_ONLY. 15648// 15649// Possible values: 15650// "METADATA_ONLY" - Template view that retrieves only the metadata 15651// associated with the template. 15652func (c *ProjectsTemplatesGetCall) View(view string) *ProjectsTemplatesGetCall { 15653 c.urlParams_.Set("view", view) 15654 return c 15655} 15656 15657// Fields allows partial responses to be retrieved. See 15658// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15659// for more information. 15660func (c *ProjectsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsTemplatesGetCall { 15661 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15662 return c 15663} 15664 15665// IfNoneMatch sets the optional parameter which makes the operation 15666// fail if the object's ETag matches the given value. This is useful for 15667// getting updates only after the object has changed since the last 15668// request. Use googleapi.IsNotModified to check whether the response 15669// error from Do is the result of In-None-Match. 15670func (c *ProjectsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsTemplatesGetCall { 15671 c.ifNoneMatch_ = entityTag 15672 return c 15673} 15674 15675// Context sets the context to be used in this call's Do method. Any 15676// pending HTTP request will be aborted if the provided context is 15677// canceled. 15678func (c *ProjectsTemplatesGetCall) Context(ctx context.Context) *ProjectsTemplatesGetCall { 15679 c.ctx_ = ctx 15680 return c 15681} 15682 15683// Header returns an http.Header that can be modified by the caller to 15684// add HTTP headers to the request. 15685func (c *ProjectsTemplatesGetCall) Header() http.Header { 15686 if c.header_ == nil { 15687 c.header_ = make(http.Header) 15688 } 15689 return c.header_ 15690} 15691 15692func (c *ProjectsTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 15693 reqHeaders := make(http.Header) 15694 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15695 for k, v := range c.header_ { 15696 reqHeaders[k] = v 15697 } 15698 reqHeaders.Set("User-Agent", c.s.userAgent()) 15699 if c.ifNoneMatch_ != "" { 15700 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15701 } 15702 var body io.Reader = nil 15703 c.urlParams_.Set("alt", alt) 15704 c.urlParams_.Set("prettyPrint", "false") 15705 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:get") 15706 urls += "?" + c.urlParams_.Encode() 15707 req, err := http.NewRequest("GET", urls, body) 15708 if err != nil { 15709 return nil, err 15710 } 15711 req.Header = reqHeaders 15712 googleapi.Expand(req.URL, map[string]string{ 15713 "projectId": c.projectId, 15714 }) 15715 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15716} 15717 15718// Do executes the "dataflow.projects.templates.get" call. 15719// Exactly one of *GetTemplateResponse or error will be non-nil. Any 15720// non-2xx status code is an error. Response headers are in either 15721// *GetTemplateResponse.ServerResponse.Header or (if a response was 15722// returned at all) in error.(*googleapi.Error).Header. Use 15723// googleapi.IsNotModified to check whether the returned error was 15724// because http.StatusNotModified was returned. 15725func (c *ProjectsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) { 15726 gensupport.SetOptions(c.urlParams_, opts...) 15727 res, err := c.doRequest("json") 15728 if res != nil && res.StatusCode == http.StatusNotModified { 15729 if res.Body != nil { 15730 res.Body.Close() 15731 } 15732 return nil, &googleapi.Error{ 15733 Code: res.StatusCode, 15734 Header: res.Header, 15735 } 15736 } 15737 if err != nil { 15738 return nil, err 15739 } 15740 defer googleapi.CloseBody(res) 15741 if err := googleapi.CheckResponse(res); err != nil { 15742 return nil, err 15743 } 15744 ret := &GetTemplateResponse{ 15745 ServerResponse: googleapi.ServerResponse{ 15746 Header: res.Header, 15747 HTTPStatusCode: res.StatusCode, 15748 }, 15749 } 15750 target := &ret 15751 if err := gensupport.DecodeResponse(target, res); err != nil { 15752 return nil, err 15753 } 15754 return ret, nil 15755 // { 15756 // "description": "Get the template associated with a template.", 15757 // "flatPath": "v1b3/projects/{projectId}/templates:get", 15758 // "httpMethod": "GET", 15759 // "id": "dataflow.projects.templates.get", 15760 // "parameterOrder": [ 15761 // "projectId" 15762 // ], 15763 // "parameters": { 15764 // "gcsPath": { 15765 // "description": "Required. A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.", 15766 // "location": "query", 15767 // "type": "string" 15768 // }, 15769 // "location": { 15770 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.", 15771 // "location": "query", 15772 // "type": "string" 15773 // }, 15774 // "projectId": { 15775 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 15776 // "location": "path", 15777 // "required": true, 15778 // "type": "string" 15779 // }, 15780 // "view": { 15781 // "description": "The view to retrieve. Defaults to METADATA_ONLY.", 15782 // "enum": [ 15783 // "METADATA_ONLY" 15784 // ], 15785 // "enumDescriptions": [ 15786 // "Template view that retrieves only the metadata associated with the template." 15787 // ], 15788 // "location": "query", 15789 // "type": "string" 15790 // } 15791 // }, 15792 // "path": "v1b3/projects/{projectId}/templates:get", 15793 // "response": { 15794 // "$ref": "GetTemplateResponse" 15795 // }, 15796 // "scopes": [ 15797 // "https://www.googleapis.com/auth/cloud-platform", 15798 // "https://www.googleapis.com/auth/compute", 15799 // "https://www.googleapis.com/auth/compute.readonly", 15800 // "https://www.googleapis.com/auth/userinfo.email" 15801 // ] 15802 // } 15803 15804} 15805 15806// method id "dataflow.projects.templates.launch": 15807 15808type ProjectsTemplatesLaunchCall struct { 15809 s *Service 15810 projectId string 15811 launchtemplateparameters *LaunchTemplateParameters 15812 urlParams_ gensupport.URLParams 15813 ctx_ context.Context 15814 header_ http.Header 15815} 15816 15817// Launch: Launch a template. 15818// 15819// - projectId: The ID of the Cloud Platform project that the job 15820// belongs to. 15821func (r *ProjectsTemplatesService) Launch(projectId string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsTemplatesLaunchCall { 15822 c := &ProjectsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15823 c.projectId = projectId 15824 c.launchtemplateparameters = launchtemplateparameters 15825 return c 15826} 15827 15828// DynamicTemplateGcsPath sets the optional parameter 15829// "dynamicTemplate.gcsPath": Path to dynamic template spec file on 15830// Cloud Storage. The file must be a Json serialized 15831// DynamicTemplateFieSpec object. 15832func (c *ProjectsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsTemplatesLaunchCall { 15833 c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath) 15834 return c 15835} 15836 15837// DynamicTemplateStagingLocation sets the optional parameter 15838// "dynamicTemplate.stagingLocation": Cloud Storage path for staging 15839// dependencies. Must be a valid Cloud Storage URL, beginning with 15840// `gs://`. 15841func (c *ProjectsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsTemplatesLaunchCall { 15842 c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation) 15843 return c 15844} 15845 15846// GcsPath sets the optional parameter "gcsPath": A Cloud Storage path 15847// to the template from which to create the job. Must be valid Cloud 15848// Storage URL, beginning with 'gs://'. 15849func (c *ProjectsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsTemplatesLaunchCall { 15850 c.urlParams_.Set("gcsPath", gcsPath) 15851 return c 15852} 15853 15854// Location sets the optional parameter "location": The [regional 15855// endpoint] 15856// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) 15857// to which to direct the request. 15858func (c *ProjectsTemplatesLaunchCall) Location(location string) *ProjectsTemplatesLaunchCall { 15859 c.urlParams_.Set("location", location) 15860 return c 15861} 15862 15863// ValidateOnly sets the optional parameter "validateOnly": If true, the 15864// request is validated but not actually executed. Defaults to false. 15865func (c *ProjectsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsTemplatesLaunchCall { 15866 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 15867 return c 15868} 15869 15870// Fields allows partial responses to be retrieved. See 15871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15872// for more information. 15873func (c *ProjectsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsTemplatesLaunchCall { 15874 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15875 return c 15876} 15877 15878// Context sets the context to be used in this call's Do method. Any 15879// pending HTTP request will be aborted if the provided context is 15880// canceled. 15881func (c *ProjectsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsTemplatesLaunchCall { 15882 c.ctx_ = ctx 15883 return c 15884} 15885 15886// Header returns an http.Header that can be modified by the caller to 15887// add HTTP headers to the request. 15888func (c *ProjectsTemplatesLaunchCall) Header() http.Header { 15889 if c.header_ == nil { 15890 c.header_ = make(http.Header) 15891 } 15892 return c.header_ 15893} 15894 15895func (c *ProjectsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 15896 reqHeaders := make(http.Header) 15897 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410") 15898 for k, v := range c.header_ { 15899 reqHeaders[k] = v 15900 } 15901 reqHeaders.Set("User-Agent", c.s.userAgent()) 15902 var body io.Reader = nil 15903 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters) 15904 if err != nil { 15905 return nil, err 15906 } 15907 reqHeaders.Set("Content-Type", "application/json") 15908 c.urlParams_.Set("alt", alt) 15909 c.urlParams_.Set("prettyPrint", "false") 15910 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:launch") 15911 urls += "?" + c.urlParams_.Encode() 15912 req, err := http.NewRequest("POST", urls, body) 15913 if err != nil { 15914 return nil, err 15915 } 15916 req.Header = reqHeaders 15917 googleapi.Expand(req.URL, map[string]string{ 15918 "projectId": c.projectId, 15919 }) 15920 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15921} 15922 15923// Do executes the "dataflow.projects.templates.launch" call. 15924// Exactly one of *LaunchTemplateResponse or error will be non-nil. Any 15925// non-2xx status code is an error. Response headers are in either 15926// *LaunchTemplateResponse.ServerResponse.Header or (if a response was 15927// returned at all) in error.(*googleapi.Error).Header. Use 15928// googleapi.IsNotModified to check whether the returned error was 15929// because http.StatusNotModified was returned. 15930func (c *ProjectsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) { 15931 gensupport.SetOptions(c.urlParams_, opts...) 15932 res, err := c.doRequest("json") 15933 if res != nil && res.StatusCode == http.StatusNotModified { 15934 if res.Body != nil { 15935 res.Body.Close() 15936 } 15937 return nil, &googleapi.Error{ 15938 Code: res.StatusCode, 15939 Header: res.Header, 15940 } 15941 } 15942 if err != nil { 15943 return nil, err 15944 } 15945 defer googleapi.CloseBody(res) 15946 if err := googleapi.CheckResponse(res); err != nil { 15947 return nil, err 15948 } 15949 ret := &LaunchTemplateResponse{ 15950 ServerResponse: googleapi.ServerResponse{ 15951 Header: res.Header, 15952 HTTPStatusCode: res.StatusCode, 15953 }, 15954 } 15955 target := &ret 15956 if err := gensupport.DecodeResponse(target, res); err != nil { 15957 return nil, err 15958 } 15959 return ret, nil 15960 // { 15961 // "description": "Launch a template.", 15962 // "flatPath": "v1b3/projects/{projectId}/templates:launch", 15963 // "httpMethod": "POST", 15964 // "id": "dataflow.projects.templates.launch", 15965 // "parameterOrder": [ 15966 // "projectId" 15967 // ], 15968 // "parameters": { 15969 // "dynamicTemplate.gcsPath": { 15970 // "description": "Path to dynamic template spec file on Cloud Storage. The file must be a Json serialized DynamicTemplateFieSpec object.", 15971 // "location": "query", 15972 // "type": "string" 15973 // }, 15974 // "dynamicTemplate.stagingLocation": { 15975 // "description": "Cloud Storage path for staging dependencies. Must be a valid Cloud Storage URL, beginning with `gs://`.", 15976 // "location": "query", 15977 // "type": "string" 15978 // }, 15979 // "gcsPath": { 15980 // "description": "A Cloud Storage path to the template from which to create the job. Must be valid Cloud Storage URL, beginning with 'gs://'.", 15981 // "location": "query", 15982 // "type": "string" 15983 // }, 15984 // "location": { 15985 // "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to which to direct the request.", 15986 // "location": "query", 15987 // "type": "string" 15988 // }, 15989 // "projectId": { 15990 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 15991 // "location": "path", 15992 // "required": true, 15993 // "type": "string" 15994 // }, 15995 // "validateOnly": { 15996 // "description": "If true, the request is validated but not actually executed. Defaults to false.", 15997 // "location": "query", 15998 // "type": "boolean" 15999 // } 16000 // }, 16001 // "path": "v1b3/projects/{projectId}/templates:launch", 16002 // "request": { 16003 // "$ref": "LaunchTemplateParameters" 16004 // }, 16005 // "response": { 16006 // "$ref": "LaunchTemplateResponse" 16007 // }, 16008 // "scopes": [ 16009 // "https://www.googleapis.com/auth/cloud-platform", 16010 // "https://www.googleapis.com/auth/compute", 16011 // "https://www.googleapis.com/auth/compute.readonly", 16012 // "https://www.googleapis.com/auth/userinfo.email" 16013 // ] 16014 // } 16015 16016} 16017