1// Copyright 2019 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 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 htransport "google.golang.org/api/transport/http" 60) 61 62// Always reference these packages, just in case the auto-generated code 63// below doesn't. 64var _ = bytes.NewBuffer 65var _ = strconv.Itoa 66var _ = fmt.Sprintf 67var _ = json.NewDecoder 68var _ = io.Copy 69var _ = url.Parse 70var _ = gensupport.MarshalJSON 71var _ = googleapi.Version 72var _ = errors.New 73var _ = strings.Replace 74var _ = context.Canceled 75 76const apiId = "dataflow:v1b3" 77const apiName = "dataflow" 78const apiVersion = "v1b3" 79const basePath = "https://dataflow.googleapis.com/" 80 81// OAuth2 scopes used by this API. 82const ( 83 // View and manage your data across Google Cloud Platform services 84 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 85 86 // View and manage your Google Compute Engine resources 87 ComputeScope = "https://www.googleapis.com/auth/compute" 88 89 // View your Google Compute Engine resources 90 ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" 91 92 // View your email address 93 UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email" 94) 95 96// NewService creates a new Service. 97func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 98 scopesOption := option.WithScopes( 99 "https://www.googleapis.com/auth/cloud-platform", 100 "https://www.googleapis.com/auth/compute", 101 "https://www.googleapis.com/auth/compute.readonly", 102 "https://www.googleapis.com/auth/userinfo.email", 103 ) 104 // NOTE: prepend, so we don't override user-specified scopes. 105 opts = append([]option.ClientOption{scopesOption}, opts...) 106 client, endpoint, err := htransport.NewClient(ctx, opts...) 107 if err != nil { 108 return nil, err 109 } 110 s, err := New(client) 111 if err != nil { 112 return nil, err 113 } 114 if endpoint != "" { 115 s.BasePath = endpoint 116 } 117 return s, nil 118} 119 120// New creates a new Service. It uses the provided http.Client for requests. 121// 122// Deprecated: please use NewService instead. 123// To provide a custom HTTP client, use option.WithHTTPClient. 124// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 125func New(client *http.Client) (*Service, error) { 126 if client == nil { 127 return nil, errors.New("client is nil") 128 } 129 s := &Service{client: client, BasePath: basePath} 130 s.Projects = NewProjectsService(s) 131 return s, nil 132} 133 134type Service struct { 135 client *http.Client 136 BasePath string // API endpoint base URL 137 UserAgent string // optional additional User-Agent fragment 138 139 Projects *ProjectsService 140} 141 142func (s *Service) userAgent() string { 143 if s.UserAgent == "" { 144 return googleapi.UserAgent 145 } 146 return googleapi.UserAgent + " " + s.UserAgent 147} 148 149func NewProjectsService(s *Service) *ProjectsService { 150 rs := &ProjectsService{s: s} 151 rs.Jobs = NewProjectsJobsService(s) 152 rs.Locations = NewProjectsLocationsService(s) 153 rs.Templates = NewProjectsTemplatesService(s) 154 return rs 155} 156 157type ProjectsService struct { 158 s *Service 159 160 Jobs *ProjectsJobsService 161 162 Locations *ProjectsLocationsService 163 164 Templates *ProjectsTemplatesService 165} 166 167func NewProjectsJobsService(s *Service) *ProjectsJobsService { 168 rs := &ProjectsJobsService{s: s} 169 rs.Debug = NewProjectsJobsDebugService(s) 170 rs.Messages = NewProjectsJobsMessagesService(s) 171 rs.WorkItems = NewProjectsJobsWorkItemsService(s) 172 return rs 173} 174 175type ProjectsJobsService struct { 176 s *Service 177 178 Debug *ProjectsJobsDebugService 179 180 Messages *ProjectsJobsMessagesService 181 182 WorkItems *ProjectsJobsWorkItemsService 183} 184 185func NewProjectsJobsDebugService(s *Service) *ProjectsJobsDebugService { 186 rs := &ProjectsJobsDebugService{s: s} 187 return rs 188} 189 190type ProjectsJobsDebugService struct { 191 s *Service 192} 193 194func NewProjectsJobsMessagesService(s *Service) *ProjectsJobsMessagesService { 195 rs := &ProjectsJobsMessagesService{s: s} 196 return rs 197} 198 199type ProjectsJobsMessagesService struct { 200 s *Service 201} 202 203func NewProjectsJobsWorkItemsService(s *Service) *ProjectsJobsWorkItemsService { 204 rs := &ProjectsJobsWorkItemsService{s: s} 205 return rs 206} 207 208type ProjectsJobsWorkItemsService struct { 209 s *Service 210} 211 212func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 213 rs := &ProjectsLocationsService{s: s} 214 rs.Jobs = NewProjectsLocationsJobsService(s) 215 rs.Sql = NewProjectsLocationsSqlService(s) 216 rs.Templates = NewProjectsLocationsTemplatesService(s) 217 return rs 218} 219 220type ProjectsLocationsService struct { 221 s *Service 222 223 Jobs *ProjectsLocationsJobsService 224 225 Sql *ProjectsLocationsSqlService 226 227 Templates *ProjectsLocationsTemplatesService 228} 229 230func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService { 231 rs := &ProjectsLocationsJobsService{s: s} 232 rs.Debug = NewProjectsLocationsJobsDebugService(s) 233 rs.Messages = NewProjectsLocationsJobsMessagesService(s) 234 rs.WorkItems = NewProjectsLocationsJobsWorkItemsService(s) 235 return rs 236} 237 238type ProjectsLocationsJobsService struct { 239 s *Service 240 241 Debug *ProjectsLocationsJobsDebugService 242 243 Messages *ProjectsLocationsJobsMessagesService 244 245 WorkItems *ProjectsLocationsJobsWorkItemsService 246} 247 248func NewProjectsLocationsJobsDebugService(s *Service) *ProjectsLocationsJobsDebugService { 249 rs := &ProjectsLocationsJobsDebugService{s: s} 250 return rs 251} 252 253type ProjectsLocationsJobsDebugService struct { 254 s *Service 255} 256 257func NewProjectsLocationsJobsMessagesService(s *Service) *ProjectsLocationsJobsMessagesService { 258 rs := &ProjectsLocationsJobsMessagesService{s: s} 259 return rs 260} 261 262type ProjectsLocationsJobsMessagesService struct { 263 s *Service 264} 265 266func NewProjectsLocationsJobsWorkItemsService(s *Service) *ProjectsLocationsJobsWorkItemsService { 267 rs := &ProjectsLocationsJobsWorkItemsService{s: s} 268 return rs 269} 270 271type ProjectsLocationsJobsWorkItemsService struct { 272 s *Service 273} 274 275func NewProjectsLocationsSqlService(s *Service) *ProjectsLocationsSqlService { 276 rs := &ProjectsLocationsSqlService{s: s} 277 return rs 278} 279 280type ProjectsLocationsSqlService struct { 281 s *Service 282} 283 284func NewProjectsLocationsTemplatesService(s *Service) *ProjectsLocationsTemplatesService { 285 rs := &ProjectsLocationsTemplatesService{s: s} 286 return rs 287} 288 289type ProjectsLocationsTemplatesService struct { 290 s *Service 291} 292 293func NewProjectsTemplatesService(s *Service) *ProjectsTemplatesService { 294 rs := &ProjectsTemplatesService{s: s} 295 return rs 296} 297 298type ProjectsTemplatesService struct { 299 s *Service 300} 301 302// ApproximateProgress: Obsolete in favor of ApproximateReportedProgress 303// and ApproximateSplitRequest. 304type ApproximateProgress struct { 305 // PercentComplete: Obsolete. 306 PercentComplete float64 `json:"percentComplete,omitempty"` 307 308 // Position: Obsolete. 309 Position *Position `json:"position,omitempty"` 310 311 // RemainingTime: Obsolete. 312 RemainingTime string `json:"remainingTime,omitempty"` 313 314 // ForceSendFields is a list of field names (e.g. "PercentComplete") to 315 // unconditionally include in API requests. By default, fields with 316 // empty values are omitted from API requests. However, any non-pointer, 317 // non-interface field appearing in ForceSendFields will be sent to the 318 // server regardless of whether the field is empty or not. This may be 319 // used to include empty fields in Patch requests. 320 ForceSendFields []string `json:"-"` 321 322 // NullFields is a list of field names (e.g. "PercentComplete") to 323 // include in API requests with the JSON null value. By default, fields 324 // with empty values are omitted from API requests. However, any field 325 // with an empty value appearing in NullFields will be sent to the 326 // server as null. It is an error if a field in this list has a 327 // non-empty value. This may be used to include null fields in Patch 328 // requests. 329 NullFields []string `json:"-"` 330} 331 332func (s *ApproximateProgress) MarshalJSON() ([]byte, error) { 333 type NoMethod ApproximateProgress 334 raw := NoMethod(*s) 335 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 336} 337 338func (s *ApproximateProgress) UnmarshalJSON(data []byte) error { 339 type NoMethod ApproximateProgress 340 var s1 struct { 341 PercentComplete gensupport.JSONFloat64 `json:"percentComplete"` 342 *NoMethod 343 } 344 s1.NoMethod = (*NoMethod)(s) 345 if err := json.Unmarshal(data, &s1); err != nil { 346 return err 347 } 348 s.PercentComplete = float64(s1.PercentComplete) 349 return nil 350} 351 352// ApproximateReportedProgress: A progress measurement of a WorkItem by 353// a worker. 354type ApproximateReportedProgress struct { 355 // ConsumedParallelism: Total amount of parallelism in the portion of 356 // input of this task that has 357 // already been consumed and is no longer active. In the first two 358 // examples 359 // above (see remaining_parallelism), the value should be 29 or 360 // 2 361 // respectively. The sum of remaining_parallelism and 362 // consumed_parallelism 363 // should equal the total amount of parallelism in this work item. 364 // If 365 // specified, must be finite. 366 ConsumedParallelism *ReportedParallelism `json:"consumedParallelism,omitempty"` 367 368 // FractionConsumed: Completion as fraction of the input consumed, from 369 // 0.0 (beginning, nothing 370 // consumed), to 1.0 (end of the input, entire input consumed). 371 FractionConsumed float64 `json:"fractionConsumed,omitempty"` 372 373 // Position: A Position within the work to represent a progress. 374 Position *Position `json:"position,omitempty"` 375 376 // RemainingParallelism: Total amount of parallelism in the input of 377 // this task that remains, 378 // (i.e. can be delegated to this task and any new tasks via 379 // dynamic 380 // splitting). Always at least 1 for non-finished work items and 0 381 // for 382 // finished. 383 // 384 // "Amount of parallelism" refers to how many non-empty parts of the 385 // input 386 // can be read in parallel. This does not necessarily equal number 387 // of records. An input that can be read in parallel down to 388 // the 389 // individual records is called "perfectly splittable". 390 // An example of non-perfectly parallelizable input is a 391 // block-compressed 392 // file format where a block of records has to be read as a whole, 393 // but different blocks can be read in parallel. 394 // 395 // Examples: 396 // * If we are processing record #30 (starting at 1) out of 50 in a 397 // perfectly 398 // splittable 50-record input, this value should be 21 (20 remaining + 399 // 1 400 // current). 401 // * If we are reading through block 3 in a block-compressed file 402 // consisting 403 // of 5 blocks, this value should be 3 (since blocks 4 and 5 can be 404 // processed in parallel by new tasks via dynamic splitting and the 405 // current 406 // task remains processing block 3). 407 // * If we are reading through the last block in a block-compressed 408 // file, 409 // or reading or processing the last record in a perfectly splittable 410 // input, this value should be 1, because apart from the current task, 411 // no 412 // additional remainder can be split off. 413 RemainingParallelism *ReportedParallelism `json:"remainingParallelism,omitempty"` 414 415 // ForceSendFields is a list of field names (e.g. "ConsumedParallelism") 416 // to unconditionally include in API requests. By default, fields with 417 // empty values are omitted from API requests. However, any non-pointer, 418 // non-interface field appearing in ForceSendFields will be sent to the 419 // server regardless of whether the field is empty or not. This may be 420 // used to include empty fields in Patch requests. 421 ForceSendFields []string `json:"-"` 422 423 // NullFields is a list of field names (e.g. "ConsumedParallelism") to 424 // include in API requests with the JSON null value. By default, fields 425 // with empty values are omitted from API requests. However, any field 426 // with an empty value appearing in NullFields will be sent to the 427 // server as null. It is an error if a field in this list has a 428 // non-empty value. This may be used to include null fields in Patch 429 // requests. 430 NullFields []string `json:"-"` 431} 432 433func (s *ApproximateReportedProgress) MarshalJSON() ([]byte, error) { 434 type NoMethod ApproximateReportedProgress 435 raw := NoMethod(*s) 436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 437} 438 439func (s *ApproximateReportedProgress) UnmarshalJSON(data []byte) error { 440 type NoMethod ApproximateReportedProgress 441 var s1 struct { 442 FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"` 443 *NoMethod 444 } 445 s1.NoMethod = (*NoMethod)(s) 446 if err := json.Unmarshal(data, &s1); err != nil { 447 return err 448 } 449 s.FractionConsumed = float64(s1.FractionConsumed) 450 return nil 451} 452 453// ApproximateSplitRequest: A suggestion by the service to the worker to 454// dynamically split the WorkItem. 455type ApproximateSplitRequest struct { 456 // FractionConsumed: A fraction at which to split the work item, from 457 // 0.0 (beginning of the 458 // input) to 1.0 (end of the input). 459 FractionConsumed float64 `json:"fractionConsumed,omitempty"` 460 461 // FractionOfRemainder: The fraction of the remainder of work to split 462 // the work item at, from 0.0 463 // (split at the current position) to 1.0 (end of the input). 464 FractionOfRemainder float64 `json:"fractionOfRemainder,omitempty"` 465 466 // Position: A Position at which to split the work item. 467 Position *Position `json:"position,omitempty"` 468 469 // ForceSendFields is a list of field names (e.g. "FractionConsumed") to 470 // unconditionally include in API requests. By default, fields with 471 // empty values are omitted from API requests. However, any non-pointer, 472 // non-interface field appearing in ForceSendFields will be sent to the 473 // server regardless of whether the field is empty or not. This may be 474 // used to include empty fields in Patch requests. 475 ForceSendFields []string `json:"-"` 476 477 // NullFields is a list of field names (e.g. "FractionConsumed") to 478 // include in API requests with the JSON null value. By default, fields 479 // with empty values are omitted from API requests. However, any field 480 // with an empty value appearing in NullFields will be sent to the 481 // server as null. It is an error if a field in this list has a 482 // non-empty value. This may be used to include null fields in Patch 483 // requests. 484 NullFields []string `json:"-"` 485} 486 487func (s *ApproximateSplitRequest) MarshalJSON() ([]byte, error) { 488 type NoMethod ApproximateSplitRequest 489 raw := NoMethod(*s) 490 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 491} 492 493func (s *ApproximateSplitRequest) UnmarshalJSON(data []byte) error { 494 type NoMethod ApproximateSplitRequest 495 var s1 struct { 496 FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"` 497 FractionOfRemainder gensupport.JSONFloat64 `json:"fractionOfRemainder"` 498 *NoMethod 499 } 500 s1.NoMethod = (*NoMethod)(s) 501 if err := json.Unmarshal(data, &s1); err != nil { 502 return err 503 } 504 s.FractionConsumed = float64(s1.FractionConsumed) 505 s.FractionOfRemainder = float64(s1.FractionOfRemainder) 506 return nil 507} 508 509// AutoscalingEvent: A structured message reporting an autoscaling 510// decision made by the Dataflow 511// service. 512type AutoscalingEvent struct { 513 // CurrentNumWorkers: The current number of workers the job has. 514 CurrentNumWorkers int64 `json:"currentNumWorkers,omitempty,string"` 515 516 // Description: A message describing why the system decided to adjust 517 // the current 518 // number of workers, why it failed, or why the system decided to 519 // not make any changes to the number of workers. 520 Description *StructuredMessage `json:"description,omitempty"` 521 522 // EventType: The type of autoscaling event to report. 523 // 524 // Possible values: 525 // "TYPE_UNKNOWN" - Default type for the enum. Value should never be 526 // returned. 527 // "TARGET_NUM_WORKERS_CHANGED" - The TARGET_NUM_WORKERS_CHANGED type 528 // should be used when the target 529 // worker pool size has changed at the start of an actuation. An 530 // event 531 // should always be specified as TARGET_NUM_WORKERS_CHANGED if it 532 // reflects 533 // a change in the target_num_workers. 534 // "CURRENT_NUM_WORKERS_CHANGED" - The CURRENT_NUM_WORKERS_CHANGED 535 // type should be used when actual worker 536 // pool size has been changed, but the target_num_workers has not 537 // changed. 538 // "ACTUATION_FAILURE" - The ACTUATION_FAILURE type should be used 539 // when we want to report 540 // an error to the user indicating why the current number of workers 541 // in the pool could not be changed. 542 // Displayed in the current status and history widgets. 543 // "NO_CHANGE" - Used when we want to report to the user a reason why 544 // we are 545 // not currently adjusting the number of workers. 546 // Should specify both target_num_workers, current_num_workers and 547 // a 548 // decision_message. 549 EventType string `json:"eventType,omitempty"` 550 551 // TargetNumWorkers: The target number of workers the worker pool wants 552 // to resize to use. 553 TargetNumWorkers int64 `json:"targetNumWorkers,omitempty,string"` 554 555 // Time: The time this event was emitted to indicate a new target or 556 // current 557 // num_workers value. 558 Time string `json:"time,omitempty"` 559 560 // WorkerPool: A short and friendly name for the worker pool this event 561 // refers to, 562 // populated from the value of PoolStageRelation::user_pool_name. 563 WorkerPool string `json:"workerPool,omitempty"` 564 565 // ForceSendFields is a list of field names (e.g. "CurrentNumWorkers") 566 // to unconditionally include in API requests. By default, fields with 567 // empty values are omitted from API requests. However, any non-pointer, 568 // non-interface field appearing in ForceSendFields will be sent to the 569 // server regardless of whether the field is empty or not. This may be 570 // used to include empty fields in Patch requests. 571 ForceSendFields []string `json:"-"` 572 573 // NullFields is a list of field names (e.g. "CurrentNumWorkers") to 574 // include in API requests with the JSON null value. By default, fields 575 // with empty values are omitted from API requests. However, any field 576 // with an empty value appearing in NullFields will be sent to the 577 // server as null. It is an error if a field in this list has a 578 // non-empty value. This may be used to include null fields in Patch 579 // requests. 580 NullFields []string `json:"-"` 581} 582 583func (s *AutoscalingEvent) MarshalJSON() ([]byte, error) { 584 type NoMethod AutoscalingEvent 585 raw := NoMethod(*s) 586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 587} 588 589// AutoscalingSettings: Settings for WorkerPool autoscaling. 590type AutoscalingSettings struct { 591 // Algorithm: The algorithm to use for autoscaling. 592 // 593 // Possible values: 594 // "AUTOSCALING_ALGORITHM_UNKNOWN" - The algorithm is unknown, or 595 // unspecified. 596 // "AUTOSCALING_ALGORITHM_NONE" - Disable autoscaling. 597 // "AUTOSCALING_ALGORITHM_BASIC" - Increase worker count over time to 598 // reduce job execution time. 599 Algorithm string `json:"algorithm,omitempty"` 600 601 // MaxNumWorkers: The maximum number of workers to cap scaling at. 602 MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"` 603 604 // ForceSendFields is a list of field names (e.g. "Algorithm") to 605 // unconditionally include in API requests. By default, fields with 606 // empty values are omitted from API requests. However, any non-pointer, 607 // non-interface field appearing in ForceSendFields will be sent to the 608 // server regardless of whether the field is empty or not. This may be 609 // used to include empty fields in Patch requests. 610 ForceSendFields []string `json:"-"` 611 612 // NullFields is a list of field names (e.g. "Algorithm") to include in 613 // API requests with the JSON null value. By default, fields with empty 614 // values are omitted from API requests. However, any field with an 615 // empty value appearing in NullFields will be sent to the server as 616 // null. It is an error if a field in this list has a non-empty value. 617 // This may be used to include null fields in Patch requests. 618 NullFields []string `json:"-"` 619} 620 621func (s *AutoscalingSettings) MarshalJSON() ([]byte, error) { 622 type NoMethod AutoscalingSettings 623 raw := NoMethod(*s) 624 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 625} 626 627// BigQueryIODetails: Metadata for a BigQuery connector used by the job. 628type BigQueryIODetails struct { 629 // Dataset: Dataset accessed in the connection. 630 Dataset string `json:"dataset,omitempty"` 631 632 // ProjectId: Project accessed in the connection. 633 ProjectId string `json:"projectId,omitempty"` 634 635 // Query: Query used to access data in the connection. 636 Query string `json:"query,omitempty"` 637 638 // Table: Table accessed in the connection. 639 Table string `json:"table,omitempty"` 640 641 // ForceSendFields is a list of field names (e.g. "Dataset") to 642 // unconditionally include in API requests. By default, fields with 643 // empty values are omitted from API requests. However, any non-pointer, 644 // non-interface field appearing in ForceSendFields will be sent to the 645 // server regardless of whether the field is empty or not. This may be 646 // used to include empty fields in Patch requests. 647 ForceSendFields []string `json:"-"` 648 649 // NullFields is a list of field names (e.g. "Dataset") to include in 650 // API requests with the JSON null value. By default, fields with empty 651 // values are omitted from API requests. However, any field with an 652 // empty value appearing in NullFields will be sent to the server as 653 // null. It is an error if a field in this list has a non-empty value. 654 // This may be used to include null fields in Patch requests. 655 NullFields []string `json:"-"` 656} 657 658func (s *BigQueryIODetails) MarshalJSON() ([]byte, error) { 659 type NoMethod BigQueryIODetails 660 raw := NoMethod(*s) 661 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 662} 663 664// BigTableIODetails: Metadata for a BigTable connector used by the job. 665type BigTableIODetails struct { 666 // InstanceId: InstanceId accessed in the connection. 667 InstanceId string `json:"instanceId,omitempty"` 668 669 // ProjectId: ProjectId accessed in the connection. 670 ProjectId string `json:"projectId,omitempty"` 671 672 // TableId: TableId accessed in the connection. 673 TableId string `json:"tableId,omitempty"` 674 675 // ForceSendFields is a list of field names (e.g. "InstanceId") to 676 // unconditionally include in API requests. By default, fields with 677 // empty values are omitted from API requests. However, any non-pointer, 678 // non-interface field appearing in ForceSendFields will be sent to the 679 // server regardless of whether the field is empty or not. This may be 680 // used to include empty fields in Patch requests. 681 ForceSendFields []string `json:"-"` 682 683 // NullFields is a list of field names (e.g. "InstanceId") to include in 684 // API requests with the JSON null value. By default, fields with empty 685 // values are omitted from API requests. However, any field with an 686 // empty value appearing in NullFields will be sent to the server as 687 // null. It is an error if a field in this list has a non-empty value. 688 // This may be used to include null fields in Patch requests. 689 NullFields []string `json:"-"` 690} 691 692func (s *BigTableIODetails) MarshalJSON() ([]byte, error) { 693 type NoMethod BigTableIODetails 694 raw := NoMethod(*s) 695 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 696} 697 698// CPUTime: Modeled after information exposed by /proc/stat. 699type CPUTime struct { 700 // Rate: Average CPU utilization rate (% non-idle cpu / second) since 701 // previous 702 // sample. 703 Rate float64 `json:"rate,omitempty"` 704 705 // Timestamp: Timestamp of the measurement. 706 Timestamp string `json:"timestamp,omitempty"` 707 708 // TotalMs: Total active CPU time across all cores (ie., non-idle) in 709 // milliseconds 710 // since start-up. 711 TotalMs uint64 `json:"totalMs,omitempty,string"` 712 713 // ForceSendFields is a list of field names (e.g. "Rate") to 714 // unconditionally include in API requests. By default, fields with 715 // empty values are omitted from API requests. However, any non-pointer, 716 // non-interface field appearing in ForceSendFields will be sent to the 717 // server regardless of whether the field is empty or not. This may be 718 // used to include empty fields in Patch requests. 719 ForceSendFields []string `json:"-"` 720 721 // NullFields is a list of field names (e.g. "Rate") to include in API 722 // requests with the JSON null value. By default, fields with empty 723 // values are omitted from API requests. However, any field with an 724 // empty value appearing in NullFields will be sent to the server as 725 // null. It is an error if a field in this list has a non-empty value. 726 // This may be used to include null fields in Patch requests. 727 NullFields []string `json:"-"` 728} 729 730func (s *CPUTime) MarshalJSON() ([]byte, error) { 731 type NoMethod CPUTime 732 raw := NoMethod(*s) 733 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 734} 735 736func (s *CPUTime) UnmarshalJSON(data []byte) error { 737 type NoMethod CPUTime 738 var s1 struct { 739 Rate gensupport.JSONFloat64 `json:"rate"` 740 *NoMethod 741 } 742 s1.NoMethod = (*NoMethod)(s) 743 if err := json.Unmarshal(data, &s1); err != nil { 744 return err 745 } 746 s.Rate = float64(s1.Rate) 747 return nil 748} 749 750// ComponentSource: Description of an interstitial value between 751// transforms in an execution 752// stage. 753type ComponentSource struct { 754 // Name: Dataflow service generated name for this source. 755 Name string `json:"name,omitempty"` 756 757 // OriginalTransformOrCollection: User name for the original user 758 // transform or collection with which this 759 // source is most closely associated. 760 OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"` 761 762 // UserName: Human-readable name for this transform; may be user or 763 // system generated. 764 UserName string `json:"userName,omitempty"` 765 766 // ForceSendFields is a list of field names (e.g. "Name") to 767 // unconditionally include in API requests. By default, fields with 768 // empty values are omitted from API requests. However, any non-pointer, 769 // non-interface field appearing in ForceSendFields will be sent to the 770 // server regardless of whether the field is empty or not. This may be 771 // used to include empty fields in Patch requests. 772 ForceSendFields []string `json:"-"` 773 774 // NullFields is a list of field names (e.g. "Name") to include in API 775 // requests with the JSON null value. By default, fields with empty 776 // values are omitted from API requests. However, any field with an 777 // empty value appearing in NullFields will be sent to the server as 778 // null. It is an error if a field in this list has a non-empty value. 779 // This may be used to include null fields in Patch requests. 780 NullFields []string `json:"-"` 781} 782 783func (s *ComponentSource) MarshalJSON() ([]byte, error) { 784 type NoMethod ComponentSource 785 raw := NoMethod(*s) 786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 787} 788 789// ComponentTransform: Description of a transform executed as part of an 790// execution stage. 791type ComponentTransform struct { 792 // Name: Dataflow service generated name for this source. 793 Name string `json:"name,omitempty"` 794 795 // OriginalTransform: User name for the original user transform with 796 // which this transform is 797 // most closely associated. 798 OriginalTransform string `json:"originalTransform,omitempty"` 799 800 // UserName: Human-readable name for this transform; may be user or 801 // system generated. 802 UserName string `json:"userName,omitempty"` 803 804 // ForceSendFields is a list of field names (e.g. "Name") to 805 // unconditionally include in API requests. By default, fields with 806 // empty values are omitted from API requests. However, any non-pointer, 807 // non-interface field appearing in ForceSendFields will be sent to the 808 // server regardless of whether the field is empty or not. This may be 809 // used to include empty fields in Patch requests. 810 ForceSendFields []string `json:"-"` 811 812 // NullFields is a list of field names (e.g. "Name") to include in API 813 // requests with the JSON null value. By default, fields with empty 814 // values are omitted from API requests. However, any field with an 815 // empty value appearing in NullFields will be sent to the server as 816 // null. It is an error if a field in this list has a non-empty value. 817 // This may be used to include null fields in Patch requests. 818 NullFields []string `json:"-"` 819} 820 821func (s *ComponentTransform) MarshalJSON() ([]byte, error) { 822 type NoMethod ComponentTransform 823 raw := NoMethod(*s) 824 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 825} 826 827// ComputationTopology: All configuration data for a particular 828// Computation. 829type ComputationTopology struct { 830 // ComputationId: The ID of the computation. 831 ComputationId string `json:"computationId,omitempty"` 832 833 // Inputs: The inputs to the computation. 834 Inputs []*StreamLocation `json:"inputs,omitempty"` 835 836 // KeyRanges: The key ranges processed by the computation. 837 KeyRanges []*KeyRangeLocation `json:"keyRanges,omitempty"` 838 839 // Outputs: The outputs from the computation. 840 Outputs []*StreamLocation `json:"outputs,omitempty"` 841 842 // StateFamilies: The state family values. 843 StateFamilies []*StateFamilyConfig `json:"stateFamilies,omitempty"` 844 845 // SystemStageName: The system stage name. 846 SystemStageName string `json:"systemStageName,omitempty"` 847 848 // ForceSendFields is a list of field names (e.g. "ComputationId") to 849 // unconditionally include in API requests. By default, fields with 850 // empty values are omitted from API requests. However, any non-pointer, 851 // non-interface field appearing in ForceSendFields will be sent to the 852 // server regardless of whether the field is empty or not. This may be 853 // used to include empty fields in Patch requests. 854 ForceSendFields []string `json:"-"` 855 856 // NullFields is a list of field names (e.g. "ComputationId") to include 857 // in API requests with the JSON null value. By default, fields with 858 // empty values are omitted from API requests. However, any field with 859 // an empty value appearing in NullFields will be sent to the server as 860 // null. It is an error if a field in this list has a non-empty value. 861 // This may be used to include null fields in Patch requests. 862 NullFields []string `json:"-"` 863} 864 865func (s *ComputationTopology) MarshalJSON() ([]byte, error) { 866 type NoMethod ComputationTopology 867 raw := NoMethod(*s) 868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 869} 870 871// ConcatPosition: A position that encapsulates an inner position and an 872// index for the inner 873// position. A ConcatPosition can be used by a reader of a source 874// that 875// encapsulates a set of other sources. 876type ConcatPosition struct { 877 // Index: Index of the inner source. 878 Index int64 `json:"index,omitempty"` 879 880 // Position: Position within the inner source. 881 Position *Position `json:"position,omitempty"` 882 883 // ForceSendFields is a list of field names (e.g. "Index") to 884 // unconditionally include in API requests. By default, fields with 885 // empty values are omitted from API requests. However, any non-pointer, 886 // non-interface field appearing in ForceSendFields will be sent to the 887 // server regardless of whether the field is empty or not. This may be 888 // used to include empty fields in Patch requests. 889 ForceSendFields []string `json:"-"` 890 891 // NullFields is a list of field names (e.g. "Index") to include in API 892 // requests with the JSON null value. By default, fields with empty 893 // values are omitted from API requests. However, any field with an 894 // empty value appearing in NullFields will be sent to the server as 895 // null. It is an error if a field in this list has a non-empty value. 896 // This may be used to include null fields in Patch requests. 897 NullFields []string `json:"-"` 898} 899 900func (s *ConcatPosition) MarshalJSON() ([]byte, error) { 901 type NoMethod ConcatPosition 902 raw := NoMethod(*s) 903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 904} 905 906// CounterMetadata: CounterMetadata includes all static non-name 907// non-value counter attributes. 908type CounterMetadata struct { 909 // Description: Human-readable description of the counter semantics. 910 Description string `json:"description,omitempty"` 911 912 // Kind: Counter aggregation kind. 913 // 914 // Possible values: 915 // "INVALID" - Counter aggregation kind was not set. 916 // "SUM" - Aggregated value is the sum of all contributed values. 917 // "MAX" - Aggregated value is the max of all contributed values. 918 // "MIN" - Aggregated value is the min of all contributed values. 919 // "MEAN" - Aggregated value is the mean of all contributed values. 920 // "OR" - Aggregated value represents the logical 'or' of all 921 // contributed values. 922 // "AND" - Aggregated value represents the logical 'and' of all 923 // contributed values. 924 // "SET" - Aggregated value is a set of unique contributed values. 925 // "DISTRIBUTION" - Aggregated value captures statistics about a 926 // distribution. 927 // "LATEST_VALUE" - Aggregated value tracks the latest value of a 928 // variable. 929 Kind string `json:"kind,omitempty"` 930 931 // OtherUnits: A string referring to the unit type. 932 OtherUnits string `json:"otherUnits,omitempty"` 933 934 // StandardUnits: System defined Units, see above enum. 935 // 936 // Possible values: 937 // "BYTES" - Counter returns a value in bytes. 938 // "BYTES_PER_SEC" - Counter returns a value in bytes per second. 939 // "MILLISECONDS" - Counter returns a value in milliseconds. 940 // "MICROSECONDS" - Counter returns a value in microseconds. 941 // "NANOSECONDS" - Counter returns a value in nanoseconds. 942 // "TIMESTAMP_MSEC" - Counter returns a timestamp in milliseconds. 943 // "TIMESTAMP_USEC" - Counter returns a timestamp in microseconds. 944 // "TIMESTAMP_NSEC" - Counter returns a timestamp in nanoseconds. 945 StandardUnits string `json:"standardUnits,omitempty"` 946 947 // ForceSendFields is a list of field names (e.g. "Description") to 948 // unconditionally include in API requests. By default, fields with 949 // empty values are omitted from API requests. However, any non-pointer, 950 // non-interface field appearing in ForceSendFields will be sent to the 951 // server regardless of whether the field is empty or not. This may be 952 // used to include empty fields in Patch requests. 953 ForceSendFields []string `json:"-"` 954 955 // NullFields is a list of field names (e.g. "Description") to include 956 // in API requests with the JSON null value. By default, fields with 957 // empty values are omitted from API requests. However, any field with 958 // an empty value appearing in NullFields will be sent to the server as 959 // null. It is an error if a field in this list has a non-empty value. 960 // This may be used to include null fields in Patch requests. 961 NullFields []string `json:"-"` 962} 963 964func (s *CounterMetadata) MarshalJSON() ([]byte, error) { 965 type NoMethod CounterMetadata 966 raw := NoMethod(*s) 967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 968} 969 970// CounterStructuredName: Identifies a counter within a per-job 971// namespace. Counters whose structured 972// names are the same get merged into a single value for the job. 973type CounterStructuredName struct { 974 // ComponentStepName: Name of the optimized step being executed by the 975 // workers. 976 ComponentStepName string `json:"componentStepName,omitempty"` 977 978 // ExecutionStepName: Name of the stage. An execution step contains 979 // multiple component steps. 980 ExecutionStepName string `json:"executionStepName,omitempty"` 981 982 // InputIndex: Index of an input collection that's being read 983 // from/written to as a side 984 // input. 985 // The index identifies a step's side inputs starting by 1 (e.g. the 986 // first 987 // side input has input_index 1, the third has input_index 3). 988 // Side inputs are identified by a pair of (original_step_name, 989 // input_index). 990 // This field helps uniquely identify them. 991 InputIndex int64 `json:"inputIndex,omitempty"` 992 993 // Name: Counter name. Not necessarily globally-unique, but unique 994 // within the 995 // context of the other fields. 996 // Required. 997 Name string `json:"name,omitempty"` 998 999 // Origin: One of the standard Origins defined above. 1000 // 1001 // Possible values: 1002 // "SYSTEM" - Counter was created by the Dataflow system. 1003 // "USER" - Counter was created by the user. 1004 Origin string `json:"origin,omitempty"` 1005 1006 // OriginNamespace: A string containing a more specific namespace of the 1007 // counter's origin. 1008 OriginNamespace string `json:"originNamespace,omitempty"` 1009 1010 // OriginalRequestingStepName: The step name requesting an operation, 1011 // such as GBK. 1012 // I.e. the ParDo causing a read/write from shuffle to occur, or a 1013 // read from side inputs. 1014 OriginalRequestingStepName string `json:"originalRequestingStepName,omitempty"` 1015 1016 // OriginalStepName: System generated name of the original step in the 1017 // user's graph, before 1018 // optimization. 1019 OriginalStepName string `json:"originalStepName,omitempty"` 1020 1021 // Portion: Portion of this counter, either key or value. 1022 // 1023 // Possible values: 1024 // "ALL" - Counter portion has not been set. 1025 // "KEY" - Counter reports a key. 1026 // "VALUE" - Counter reports a value. 1027 Portion string `json:"portion,omitempty"` 1028 1029 // WorkerId: ID of a particular worker. 1030 WorkerId string `json:"workerId,omitempty"` 1031 1032 // ForceSendFields is a list of field names (e.g. "ComponentStepName") 1033 // to unconditionally include in API requests. By default, fields with 1034 // empty values are omitted from API requests. However, any non-pointer, 1035 // non-interface field appearing in ForceSendFields will be sent to the 1036 // server regardless of whether the field is empty or not. This may be 1037 // used to include empty fields in Patch requests. 1038 ForceSendFields []string `json:"-"` 1039 1040 // NullFields is a list of field names (e.g. "ComponentStepName") to 1041 // include in API requests with the JSON null value. By default, fields 1042 // with empty values are omitted from API requests. However, any field 1043 // with an empty value appearing in NullFields will be sent to the 1044 // server as null. It is an error if a field in this list has a 1045 // non-empty value. This may be used to include null fields in Patch 1046 // requests. 1047 NullFields []string `json:"-"` 1048} 1049 1050func (s *CounterStructuredName) MarshalJSON() ([]byte, error) { 1051 type NoMethod CounterStructuredName 1052 raw := NoMethod(*s) 1053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1054} 1055 1056// CounterStructuredNameAndMetadata: A single message which encapsulates 1057// structured name and metadata for a given 1058// counter. 1059type CounterStructuredNameAndMetadata struct { 1060 // Metadata: Metadata associated with a counter 1061 Metadata *CounterMetadata `json:"metadata,omitempty"` 1062 1063 // Name: Structured name of the counter. 1064 Name *CounterStructuredName `json:"name,omitempty"` 1065 1066 // ForceSendFields is a list of field names (e.g. "Metadata") to 1067 // unconditionally include in API requests. By default, fields with 1068 // empty values are omitted from API requests. However, any non-pointer, 1069 // non-interface field appearing in ForceSendFields will be sent to the 1070 // server regardless of whether the field is empty or not. This may be 1071 // used to include empty fields in Patch requests. 1072 ForceSendFields []string `json:"-"` 1073 1074 // NullFields is a list of field names (e.g. "Metadata") to include in 1075 // API requests with the JSON null value. By default, fields with empty 1076 // values are omitted from API requests. However, any field with an 1077 // empty value appearing in NullFields will be sent to the server as 1078 // null. It is an error if a field in this list has a non-empty value. 1079 // This may be used to include null fields in Patch requests. 1080 NullFields []string `json:"-"` 1081} 1082 1083func (s *CounterStructuredNameAndMetadata) MarshalJSON() ([]byte, error) { 1084 type NoMethod CounterStructuredNameAndMetadata 1085 raw := NoMethod(*s) 1086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1087} 1088 1089// CounterUpdate: An update to a Counter sent from a worker. 1090type CounterUpdate struct { 1091 // Boolean: Boolean value for And, Or. 1092 Boolean bool `json:"boolean,omitempty"` 1093 1094 // Cumulative: True if this counter is reported as the total cumulative 1095 // aggregate 1096 // value accumulated since the worker started working on this 1097 // WorkItem. 1098 // By default this is false, indicating that this counter is reported 1099 // as a delta. 1100 Cumulative bool `json:"cumulative,omitempty"` 1101 1102 // Distribution: Distribution data 1103 Distribution *DistributionUpdate `json:"distribution,omitempty"` 1104 1105 // FloatingPoint: Floating point value for Sum, Max, Min. 1106 FloatingPoint float64 `json:"floatingPoint,omitempty"` 1107 1108 // FloatingPointList: List of floating point numbers, for Set. 1109 FloatingPointList *FloatingPointList `json:"floatingPointList,omitempty"` 1110 1111 // FloatingPointMean: Floating point mean aggregation value for Mean. 1112 FloatingPointMean *FloatingPointMean `json:"floatingPointMean,omitempty"` 1113 1114 // Integer: Integer value for Sum, Max, Min. 1115 Integer *SplitInt64 `json:"integer,omitempty"` 1116 1117 // IntegerGauge: Gauge data 1118 IntegerGauge *IntegerGauge `json:"integerGauge,omitempty"` 1119 1120 // IntegerList: List of integers, for Set. 1121 IntegerList *IntegerList `json:"integerList,omitempty"` 1122 1123 // IntegerMean: Integer mean aggregation value for Mean. 1124 IntegerMean *IntegerMean `json:"integerMean,omitempty"` 1125 1126 // Internal: Value for internally-defined counters used by the Dataflow 1127 // service. 1128 Internal interface{} `json:"internal,omitempty"` 1129 1130 // NameAndKind: Counter name and aggregation type. 1131 NameAndKind *NameAndKind `json:"nameAndKind,omitempty"` 1132 1133 // ShortId: The service-generated short identifier for this counter. 1134 // The short_id -> (name, metadata) mapping is constant for the lifetime 1135 // of 1136 // a job. 1137 ShortId int64 `json:"shortId,omitempty,string"` 1138 1139 // StringList: List of strings, for Set. 1140 StringList *StringList `json:"stringList,omitempty"` 1141 1142 // StructuredNameAndMetadata: Counter structured name and metadata. 1143 StructuredNameAndMetadata *CounterStructuredNameAndMetadata `json:"structuredNameAndMetadata,omitempty"` 1144 1145 // ForceSendFields is a list of field names (e.g. "Boolean") to 1146 // unconditionally include in API requests. By default, fields with 1147 // empty values are omitted from API requests. However, any non-pointer, 1148 // non-interface field appearing in ForceSendFields will be sent to the 1149 // server regardless of whether the field is empty or not. This may be 1150 // used to include empty fields in Patch requests. 1151 ForceSendFields []string `json:"-"` 1152 1153 // NullFields is a list of field names (e.g. "Boolean") to include in 1154 // API requests with the JSON null value. By default, fields with empty 1155 // values are omitted from API requests. However, any field with an 1156 // empty value appearing in NullFields will be sent to the server as 1157 // null. It is an error if a field in this list has a non-empty value. 1158 // This may be used to include null fields in Patch requests. 1159 NullFields []string `json:"-"` 1160} 1161 1162func (s *CounterUpdate) MarshalJSON() ([]byte, error) { 1163 type NoMethod CounterUpdate 1164 raw := NoMethod(*s) 1165 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1166} 1167 1168func (s *CounterUpdate) UnmarshalJSON(data []byte) error { 1169 type NoMethod CounterUpdate 1170 var s1 struct { 1171 FloatingPoint gensupport.JSONFloat64 `json:"floatingPoint"` 1172 *NoMethod 1173 } 1174 s1.NoMethod = (*NoMethod)(s) 1175 if err := json.Unmarshal(data, &s1); err != nil { 1176 return err 1177 } 1178 s.FloatingPoint = float64(s1.FloatingPoint) 1179 return nil 1180} 1181 1182// CreateJobFromTemplateRequest: A request to create a Cloud Dataflow 1183// job from a template. 1184type CreateJobFromTemplateRequest struct { 1185 // Environment: The runtime environment for the job. 1186 Environment *RuntimeEnvironment `json:"environment,omitempty"` 1187 1188 // GcsPath: Required. A Cloud Storage path to the template from which 1189 // to 1190 // create the job. 1191 // Must be a valid Cloud Storage URL, beginning with `gs://`. 1192 GcsPath string `json:"gcsPath,omitempty"` 1193 1194 // JobName: Required. The job name to use for the created job. 1195 JobName string `json:"jobName,omitempty"` 1196 1197 // Location: The [regional 1198 // endpoint] 1199 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 1200 // dpoints) to 1201 // which to direct the request. 1202 Location string `json:"location,omitempty"` 1203 1204 // Parameters: The runtime parameters to pass to the job. 1205 Parameters map[string]string `json:"parameters,omitempty"` 1206 1207 // ForceSendFields is a list of field names (e.g. "Environment") to 1208 // unconditionally include in API requests. By default, fields with 1209 // empty values are omitted from API requests. However, any non-pointer, 1210 // non-interface field appearing in ForceSendFields will be sent to the 1211 // server regardless of whether the field is empty or not. This may be 1212 // used to include empty fields in Patch requests. 1213 ForceSendFields []string `json:"-"` 1214 1215 // NullFields is a list of field names (e.g. "Environment") to include 1216 // in API requests with the JSON null value. By default, fields with 1217 // empty values are omitted from API requests. However, any field with 1218 // an empty value appearing in NullFields will be sent to the server as 1219 // null. It is an error if a field in this list has a non-empty value. 1220 // This may be used to include null fields in Patch requests. 1221 NullFields []string `json:"-"` 1222} 1223 1224func (s *CreateJobFromTemplateRequest) MarshalJSON() ([]byte, error) { 1225 type NoMethod CreateJobFromTemplateRequest 1226 raw := NoMethod(*s) 1227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1228} 1229 1230// CustomSourceLocation: Identifies the location of a custom souce. 1231type CustomSourceLocation struct { 1232 // Stateful: Whether this source is stateful. 1233 Stateful bool `json:"stateful,omitempty"` 1234 1235 // ForceSendFields is a list of field names (e.g. "Stateful") to 1236 // unconditionally include in API requests. By default, fields with 1237 // empty values are omitted from API requests. However, any non-pointer, 1238 // non-interface field appearing in ForceSendFields will be sent to the 1239 // server regardless of whether the field is empty or not. This may be 1240 // used to include empty fields in Patch requests. 1241 ForceSendFields []string `json:"-"` 1242 1243 // NullFields is a list of field names (e.g. "Stateful") to include in 1244 // API requests with the JSON null value. By default, fields with empty 1245 // values are omitted from API requests. However, any field with an 1246 // empty value appearing in NullFields will be sent to the server as 1247 // null. It is an error if a field in this list has a non-empty value. 1248 // This may be used to include null fields in Patch requests. 1249 NullFields []string `json:"-"` 1250} 1251 1252func (s *CustomSourceLocation) MarshalJSON() ([]byte, error) { 1253 type NoMethod CustomSourceLocation 1254 raw := NoMethod(*s) 1255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1256} 1257 1258// DataDiskAssignment: Data disk assignment for a given VM instance. 1259type DataDiskAssignment struct { 1260 // DataDisks: Mounted data disks. The order is important a data disk's 1261 // 0-based index in 1262 // this list defines which persistent directory the disk is mounted to, 1263 // for 1264 // example the list of { "myproject-1014-104817-4c2-harness-0-disk-0" 1265 // }, 1266 // { "myproject-1014-104817-4c2-harness-0-disk-1" }. 1267 DataDisks []string `json:"dataDisks,omitempty"` 1268 1269 // VmInstance: VM instance name the data disks mounted to, for 1270 // example 1271 // "myproject-1014-104817-4c2-harness-0". 1272 VmInstance string `json:"vmInstance,omitempty"` 1273 1274 // ForceSendFields is a list of field names (e.g. "DataDisks") to 1275 // unconditionally include in API requests. By default, fields with 1276 // empty values are omitted from API requests. However, any non-pointer, 1277 // non-interface field appearing in ForceSendFields will be sent to the 1278 // server regardless of whether the field is empty or not. This may be 1279 // used to include empty fields in Patch requests. 1280 ForceSendFields []string `json:"-"` 1281 1282 // NullFields is a list of field names (e.g. "DataDisks") to include in 1283 // API requests with the JSON null value. By default, fields with empty 1284 // values are omitted from API requests. However, any field with an 1285 // empty value appearing in NullFields will be sent to the server as 1286 // null. It is an error if a field in this list has a non-empty value. 1287 // This may be used to include null fields in Patch requests. 1288 NullFields []string `json:"-"` 1289} 1290 1291func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) { 1292 type NoMethod DataDiskAssignment 1293 raw := NoMethod(*s) 1294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1295} 1296 1297// DatastoreIODetails: Metadata for a Datastore connector used by the 1298// job. 1299type DatastoreIODetails struct { 1300 // Namespace: Namespace used in the connection. 1301 Namespace string `json:"namespace,omitempty"` 1302 1303 // ProjectId: ProjectId accessed in the connection. 1304 ProjectId string `json:"projectId,omitempty"` 1305 1306 // ForceSendFields is a list of field names (e.g. "Namespace") to 1307 // unconditionally include in API requests. By default, fields with 1308 // empty values are omitted from API requests. However, any non-pointer, 1309 // non-interface field appearing in ForceSendFields will be sent to the 1310 // server regardless of whether the field is empty or not. This may be 1311 // used to include empty fields in Patch requests. 1312 ForceSendFields []string `json:"-"` 1313 1314 // NullFields is a list of field names (e.g. "Namespace") to include in 1315 // API requests with the JSON null value. By default, fields with empty 1316 // values are omitted from API requests. However, any field with an 1317 // empty value appearing in NullFields will be sent to the server as 1318 // null. It is an error if a field in this list has a non-empty value. 1319 // This may be used to include null fields in Patch requests. 1320 NullFields []string `json:"-"` 1321} 1322 1323func (s *DatastoreIODetails) MarshalJSON() ([]byte, error) { 1324 type NoMethod DatastoreIODetails 1325 raw := NoMethod(*s) 1326 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1327} 1328 1329// DerivedSource: Specification of one of the bundles produced as a 1330// result of splitting 1331// a Source (e.g. when executing a SourceSplitRequest, or when 1332// splitting an active task using 1333// WorkItemStatus.dynamic_source_split), 1334// relative to the source being split. 1335type DerivedSource struct { 1336 // DerivationMode: What source to base the produced source on (if any). 1337 // 1338 // Possible values: 1339 // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is 1340 // unknown, or unspecified. 1341 // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely 1342 // independent Source with no base. 1343 // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based 1344 // on the Source being split. 1345 // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source 1346 // based on the base of the Source being split. 1347 DerivationMode string `json:"derivationMode,omitempty"` 1348 1349 // Source: Specification of the source. 1350 Source *Source `json:"source,omitempty"` 1351 1352 // ForceSendFields is a list of field names (e.g. "DerivationMode") to 1353 // unconditionally include in API requests. By default, fields with 1354 // empty values are omitted from API requests. However, any non-pointer, 1355 // non-interface field appearing in ForceSendFields will be sent to the 1356 // server regardless of whether the field is empty or not. This may be 1357 // used to include empty fields in Patch requests. 1358 ForceSendFields []string `json:"-"` 1359 1360 // NullFields is a list of field names (e.g. "DerivationMode") to 1361 // include in API requests with the JSON null value. By default, fields 1362 // with empty values are omitted from API requests. However, any field 1363 // with an empty value appearing in NullFields will be sent to the 1364 // server as null. It is an error if a field in this list has a 1365 // non-empty value. This may be used to include null fields in Patch 1366 // requests. 1367 NullFields []string `json:"-"` 1368} 1369 1370func (s *DerivedSource) MarshalJSON() ([]byte, error) { 1371 type NoMethod DerivedSource 1372 raw := NoMethod(*s) 1373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1374} 1375 1376// Disk: Describes the data disk used by a workflow job. 1377type Disk struct { 1378 // DiskType: Disk storage type, as defined by Google Compute Engine. 1379 // This 1380 // must be a disk type appropriate to the project and zone in which 1381 // the workers will run. If unknown or unspecified, the service 1382 // will attempt to choose a reasonable default. 1383 // 1384 // For example, the standard persistent disk type is a resource 1385 // name 1386 // typically ending in "pd-standard". If SSD persistent disks 1387 // are 1388 // available, the resource name typically ends with "pd-ssd". 1389 // The 1390 // actual valid values are defined the Google Compute Engine API, 1391 // not by the Cloud Dataflow API; consult the Google Compute 1392 // Engine 1393 // documentation for more information about determining the set 1394 // of 1395 // available disk types for a particular project and zone. 1396 // 1397 // Google Compute Engine Disk types are local to a particular 1398 // project in a particular zone, and so the resource name will 1399 // typically look something like 1400 // this: 1401 // 1402 // compute.googleapis.com/projects/project-id/zones/zone/diskTypes 1403 // /pd-standard 1404 DiskType string `json:"diskType,omitempty"` 1405 1406 // MountPoint: Directory in a VM where disk is mounted. 1407 MountPoint string `json:"mountPoint,omitempty"` 1408 1409 // SizeGb: Size of disk in GB. If zero or unspecified, the service 1410 // will 1411 // attempt to choose a reasonable default. 1412 SizeGb int64 `json:"sizeGb,omitempty"` 1413 1414 // ForceSendFields is a list of field names (e.g. "DiskType") to 1415 // unconditionally include in API requests. By default, fields with 1416 // empty values are omitted from API requests. However, any non-pointer, 1417 // non-interface field appearing in ForceSendFields will be sent to the 1418 // server regardless of whether the field is empty or not. This may be 1419 // used to include empty fields in Patch requests. 1420 ForceSendFields []string `json:"-"` 1421 1422 // NullFields is a list of field names (e.g. "DiskType") to include in 1423 // API requests with the JSON null value. By default, fields with empty 1424 // values are omitted from API requests. However, any field with an 1425 // empty value appearing in NullFields will be sent to the server as 1426 // null. It is an error if a field in this list has a non-empty value. 1427 // This may be used to include null fields in Patch requests. 1428 NullFields []string `json:"-"` 1429} 1430 1431func (s *Disk) MarshalJSON() ([]byte, error) { 1432 type NoMethod Disk 1433 raw := NoMethod(*s) 1434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1435} 1436 1437// DisplayData: Data provided with a pipeline or transform to provide 1438// descriptive info. 1439type DisplayData struct { 1440 // BoolValue: Contains value if the data is of a boolean type. 1441 BoolValue bool `json:"boolValue,omitempty"` 1442 1443 // DurationValue: Contains value if the data is of duration type. 1444 DurationValue string `json:"durationValue,omitempty"` 1445 1446 // FloatValue: Contains value if the data is of float type. 1447 FloatValue float64 `json:"floatValue,omitempty"` 1448 1449 // Int64Value: Contains value if the data is of int64 type. 1450 Int64Value int64 `json:"int64Value,omitempty,string"` 1451 1452 // JavaClassValue: Contains value if the data is of java class type. 1453 JavaClassValue string `json:"javaClassValue,omitempty"` 1454 1455 // Key: The key identifying the display data. 1456 // This is intended to be used as a label for the display data 1457 // when viewed in a dax monitoring system. 1458 Key string `json:"key,omitempty"` 1459 1460 // Label: An optional label to display in a dax UI for the element. 1461 Label string `json:"label,omitempty"` 1462 1463 // Namespace: The namespace for the key. This is usually a class name or 1464 // programming 1465 // language namespace (i.e. python module) which defines the display 1466 // data. 1467 // This allows a dax monitoring system to specially handle the data 1468 // and perform custom rendering. 1469 Namespace string `json:"namespace,omitempty"` 1470 1471 // ShortStrValue: A possible additional shorter value to display. 1472 // For example a java_class_name_value of com.mypackage.MyDoFn 1473 // will be stored with MyDoFn as the short_str_value 1474 // and 1475 // com.mypackage.MyDoFn as the java_class_name value. 1476 // short_str_value can be displayed and java_class_name_value 1477 // will be displayed as a tooltip. 1478 ShortStrValue string `json:"shortStrValue,omitempty"` 1479 1480 // StrValue: Contains value if the data is of string type. 1481 StrValue string `json:"strValue,omitempty"` 1482 1483 // TimestampValue: Contains value if the data is of timestamp type. 1484 TimestampValue string `json:"timestampValue,omitempty"` 1485 1486 // Url: An optional full URL. 1487 Url string `json:"url,omitempty"` 1488 1489 // ForceSendFields is a list of field names (e.g. "BoolValue") to 1490 // unconditionally include in API requests. By default, fields with 1491 // empty values are omitted from API requests. However, any non-pointer, 1492 // non-interface field appearing in ForceSendFields will be sent to the 1493 // server regardless of whether the field is empty or not. This may be 1494 // used to include empty fields in Patch requests. 1495 ForceSendFields []string `json:"-"` 1496 1497 // NullFields is a list of field names (e.g. "BoolValue") to include in 1498 // API requests with the JSON null value. By default, fields with empty 1499 // values are omitted from API requests. However, any field with an 1500 // empty value appearing in NullFields will be sent to the server as 1501 // null. It is an error if a field in this list has a non-empty value. 1502 // This may be used to include null fields in Patch requests. 1503 NullFields []string `json:"-"` 1504} 1505 1506func (s *DisplayData) MarshalJSON() ([]byte, error) { 1507 type NoMethod DisplayData 1508 raw := NoMethod(*s) 1509 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1510} 1511 1512func (s *DisplayData) UnmarshalJSON(data []byte) error { 1513 type NoMethod DisplayData 1514 var s1 struct { 1515 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 1516 *NoMethod 1517 } 1518 s1.NoMethod = (*NoMethod)(s) 1519 if err := json.Unmarshal(data, &s1); err != nil { 1520 return err 1521 } 1522 s.FloatValue = float64(s1.FloatValue) 1523 return nil 1524} 1525 1526// DistributionUpdate: A metric value representing a distribution. 1527type DistributionUpdate struct { 1528 // Count: The count of the number of elements present in the 1529 // distribution. 1530 Count *SplitInt64 `json:"count,omitempty"` 1531 1532 // Histogram: (Optional) Histogram of value counts for the distribution. 1533 Histogram *Histogram `json:"histogram,omitempty"` 1534 1535 // Max: The maximum value present in the distribution. 1536 Max *SplitInt64 `json:"max,omitempty"` 1537 1538 // Min: The minimum value present in the distribution. 1539 Min *SplitInt64 `json:"min,omitempty"` 1540 1541 // Sum: Use an int64 since we'd prefer the added precision. If overflow 1542 // is a common 1543 // problem we can detect it and use an additional int64 or a double. 1544 Sum *SplitInt64 `json:"sum,omitempty"` 1545 1546 // SumOfSquares: Use a double since the sum of squares is likely to 1547 // overflow int64. 1548 SumOfSquares float64 `json:"sumOfSquares,omitempty"` 1549 1550 // ForceSendFields is a list of field names (e.g. "Count") to 1551 // unconditionally include in API requests. By default, fields with 1552 // empty values are omitted from API requests. However, any non-pointer, 1553 // non-interface field appearing in ForceSendFields will be sent to the 1554 // server regardless of whether the field is empty or not. This may be 1555 // used to include empty fields in Patch requests. 1556 ForceSendFields []string `json:"-"` 1557 1558 // NullFields is a list of field names (e.g. "Count") to include in API 1559 // requests with the JSON null value. By default, fields with empty 1560 // values are omitted from API requests. However, any field with an 1561 // empty value appearing in NullFields will be sent to the server as 1562 // null. It is an error if a field in this list has a non-empty value. 1563 // This may be used to include null fields in Patch requests. 1564 NullFields []string `json:"-"` 1565} 1566 1567func (s *DistributionUpdate) MarshalJSON() ([]byte, error) { 1568 type NoMethod DistributionUpdate 1569 raw := NoMethod(*s) 1570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1571} 1572 1573func (s *DistributionUpdate) UnmarshalJSON(data []byte) error { 1574 type NoMethod DistributionUpdate 1575 var s1 struct { 1576 SumOfSquares gensupport.JSONFloat64 `json:"sumOfSquares"` 1577 *NoMethod 1578 } 1579 s1.NoMethod = (*NoMethod)(s) 1580 if err := json.Unmarshal(data, &s1); err != nil { 1581 return err 1582 } 1583 s.SumOfSquares = float64(s1.SumOfSquares) 1584 return nil 1585} 1586 1587// DynamicSourceSplit: When a task splits using 1588// WorkItemStatus.dynamic_source_split, this 1589// message describes the two parts of the split relative to 1590// the 1591// description of the current task's input. 1592type DynamicSourceSplit struct { 1593 // Primary: Primary part (continued to be processed by 1594 // worker). 1595 // Specified relative to the previously-current source. 1596 // Becomes current. 1597 Primary *DerivedSource `json:"primary,omitempty"` 1598 1599 // Residual: Residual part (returned to the pool of work). 1600 // Specified relative to the previously-current source. 1601 Residual *DerivedSource `json:"residual,omitempty"` 1602 1603 // ForceSendFields is a list of field names (e.g. "Primary") to 1604 // unconditionally include in API requests. By default, fields with 1605 // empty values are omitted from API requests. However, any non-pointer, 1606 // non-interface field appearing in ForceSendFields will be sent to the 1607 // server regardless of whether the field is empty or not. This may be 1608 // used to include empty fields in Patch requests. 1609 ForceSendFields []string `json:"-"` 1610 1611 // NullFields is a list of field names (e.g. "Primary") to include in 1612 // API requests with the JSON null value. By default, fields with empty 1613 // values are omitted from API requests. However, any field with an 1614 // empty value appearing in NullFields will be sent to the server as 1615 // null. It is an error if a field in this list has a non-empty value. 1616 // This may be used to include null fields in Patch requests. 1617 NullFields []string `json:"-"` 1618} 1619 1620func (s *DynamicSourceSplit) MarshalJSON() ([]byte, error) { 1621 type NoMethod DynamicSourceSplit 1622 raw := NoMethod(*s) 1623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1624} 1625 1626// Environment: Describes the environment in which a Dataflow Job runs. 1627type Environment struct { 1628 // ClusterManagerApiService: The type of cluster manager API to use. If 1629 // unknown or 1630 // unspecified, the service will attempt to choose a reasonable 1631 // default. This should be in the form of the API service name, 1632 // e.g. "compute.googleapis.com". 1633 ClusterManagerApiService string `json:"clusterManagerApiService,omitempty"` 1634 1635 // Dataset: The dataset for the current project where various 1636 // workflow 1637 // related tables are stored. 1638 // 1639 // The supported resource type is: 1640 // 1641 // Google BigQuery: 1642 // bigquery.googleapis.com/{dataset} 1643 Dataset string `json:"dataset,omitempty"` 1644 1645 // Experiments: The list of experiments to enable. 1646 Experiments []string `json:"experiments,omitempty"` 1647 1648 // FlexResourceSchedulingGoal: Which Flexible Resource Scheduling mode 1649 // to run in. 1650 // 1651 // Possible values: 1652 // "FLEXRS_UNSPECIFIED" - Run in the default mode. 1653 // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time. 1654 // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost. 1655 FlexResourceSchedulingGoal string `json:"flexResourceSchedulingGoal,omitempty"` 1656 1657 // InternalExperiments: Experimental settings. 1658 InternalExperiments googleapi.RawMessage `json:"internalExperiments,omitempty"` 1659 1660 // SdkPipelineOptions: The Cloud Dataflow SDK pipeline options specified 1661 // by the user. These 1662 // options are passed through the service and are used to recreate 1663 // the 1664 // SDK pipeline options on the worker in a language agnostic and 1665 // platform 1666 // independent way. 1667 SdkPipelineOptions googleapi.RawMessage `json:"sdkPipelineOptions,omitempty"` 1668 1669 // ServiceAccountEmail: Identity to run virtual machines as. Defaults to 1670 // the default account. 1671 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 1672 1673 // ServiceKmsKeyName: If set, contains the Cloud KMS key identifier used 1674 // to encrypt data 1675 // at rest, AKA a Customer Managed Encryption Key (CMEK). 1676 // 1677 // Format: 1678 // 1679 // projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KE 1680 // Y 1681 ServiceKmsKeyName string `json:"serviceKmsKeyName,omitempty"` 1682 1683 // TempStoragePrefix: The prefix of the resources the system should use 1684 // for temporary 1685 // storage. The system will append the suffix "/temp-{JOBNAME} to 1686 // this resource prefix, where {JOBNAME} is the value of the 1687 // job_name field. The resulting bucket and object prefix is used 1688 // as the prefix of the resources used to store temporary data 1689 // needed during the job execution. NOTE: This will override the 1690 // value in taskrunner_settings. 1691 // The supported resource type is: 1692 // 1693 // Google Cloud Storage: 1694 // 1695 // storage.googleapis.com/{bucket}/{object} 1696 // bucket.storage.googleapis.com/{object} 1697 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 1698 1699 // UserAgent: A description of the process that generated the request. 1700 UserAgent googleapi.RawMessage `json:"userAgent,omitempty"` 1701 1702 // Version: A structure describing which components and their versions 1703 // of the service 1704 // are required in order to run the job. 1705 Version googleapi.RawMessage `json:"version,omitempty"` 1706 1707 // WorkerPools: The worker pools. At least one "harness" worker pool 1708 // must be 1709 // specified in order for the job to have workers. 1710 WorkerPools []*WorkerPool `json:"workerPools,omitempty"` 1711 1712 // WorkerRegion: The Compute Engine 1713 // region 1714 // (https://cloud.google.com/compute/docs/regions-zones/regions-zo 1715 // nes) in 1716 // which worker processing should occur, e.g. "us-west1". Mutually 1717 // exclusive 1718 // with worker_zone. If neither worker_region nor worker_zone is 1719 // specified, 1720 // default to the control plane's region. 1721 WorkerRegion string `json:"workerRegion,omitempty"` 1722 1723 // WorkerZone: The Compute Engine 1724 // zone 1725 // (https://cloud.google.com/compute/docs/regions-zones/regions-zone 1726 // s) in 1727 // which worker processing should occur, e.g. "us-west1-a". Mutually 1728 // exclusive 1729 // with worker_region. If neither worker_region nor worker_zone is 1730 // specified, 1731 // a zone in the control plane's region is chosen based on available 1732 // capacity. 1733 WorkerZone string `json:"workerZone,omitempty"` 1734 1735 // ForceSendFields is a list of field names (e.g. 1736 // "ClusterManagerApiService") to unconditionally include in API 1737 // requests. By default, fields with empty values are omitted from API 1738 // requests. However, any non-pointer, non-interface field appearing in 1739 // ForceSendFields will be sent to the server regardless of whether the 1740 // field is empty or not. This may be used to include empty fields in 1741 // Patch requests. 1742 ForceSendFields []string `json:"-"` 1743 1744 // NullFields is a list of field names (e.g. "ClusterManagerApiService") 1745 // to include in API requests with the JSON null value. By default, 1746 // fields with empty values are omitted from API requests. However, any 1747 // field with an empty value appearing in NullFields will be sent to the 1748 // server as null. It is an error if a field in this list has a 1749 // non-empty value. This may be used to include null fields in Patch 1750 // requests. 1751 NullFields []string `json:"-"` 1752} 1753 1754func (s *Environment) MarshalJSON() ([]byte, error) { 1755 type NoMethod Environment 1756 raw := NoMethod(*s) 1757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1758} 1759 1760// ExecutionStageState: A message describing the state of a particular 1761// execution stage. 1762type ExecutionStageState struct { 1763 // CurrentStateTime: The time at which the stage transitioned to this 1764 // state. 1765 CurrentStateTime string `json:"currentStateTime,omitempty"` 1766 1767 // ExecutionStageName: The name of the execution stage. 1768 ExecutionStageName string `json:"executionStageName,omitempty"` 1769 1770 // ExecutionStageState: Executions stage states allow the same set of 1771 // values as JobState. 1772 // 1773 // Possible values: 1774 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 1775 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job 1776 // has not 1777 // yet started to run. 1778 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 1779 // currently running. 1780 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 1781 // successfully completed. 1782 // This is a terminal job state. This state may be set by the Cloud 1783 // Dataflow 1784 // service, as a transition from `JOB_STATE_RUNNING`. It may also be set 1785 // via a 1786 // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a 1787 // terminal 1788 // state. 1789 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has 1790 // failed. This is a 1791 // terminal job state. This state may only be set by the Cloud 1792 // Dataflow 1793 // service, and only as a transition from `JOB_STATE_RUNNING`. 1794 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the 1795 // job has been explicitly 1796 // cancelled. This is a terminal job state. This state may only be 1797 // set via a Cloud Dataflow `UpdateJob` call, and only if the job has 1798 // not 1799 // yet reached another terminal state. 1800 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job 1801 // was successfully updated, 1802 // meaning that this job was stopped and another job was started, 1803 // inheriting 1804 // state from this one. This is a terminal job state. This state may 1805 // only be 1806 // set by the Cloud Dataflow service, and only as a transition 1807 // from 1808 // `JOB_STATE_RUNNING`. 1809 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job 1810 // is in the process of draining. 1811 // A draining job has stopped pulling from its input sources and is 1812 // processing 1813 // any data that remains in-flight. This state may be set via a Cloud 1814 // Dataflow 1815 // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. 1816 // Jobs 1817 // that are draining may only transition to 1818 // `JOB_STATE_DRAINED`, 1819 // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 1820 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job 1821 // has been drained. 1822 // A drained job terminated by stopping pulling from its input sources 1823 // and 1824 // processing any data that remained in-flight when draining was 1825 // requested. 1826 // This state is a terminal state, may only be set by the Cloud 1827 // Dataflow 1828 // service, and only as a transition from `JOB_STATE_DRAINING`. 1829 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job 1830 // has been created but is not yet 1831 // running. Jobs that are pending may only transition to 1832 // `JOB_STATE_RUNNING`, 1833 // or `JOB_STATE_FAILED`. 1834 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the 1835 // job has been explicitly cancelled 1836 // and is in the process of stopping. Jobs that are cancelling may 1837 // only 1838 // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. 1839 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has 1840 // been created but is being 1841 // delayed until launch. Jobs that are queued may only transition 1842 // to 1843 // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 1844 ExecutionStageState string `json:"executionStageState,omitempty"` 1845 1846 // ForceSendFields is a list of field names (e.g. "CurrentStateTime") to 1847 // unconditionally include in API requests. By default, fields with 1848 // empty values are omitted from API requests. However, any non-pointer, 1849 // non-interface field appearing in ForceSendFields will be sent to the 1850 // server regardless of whether the field is empty or not. This may be 1851 // used to include empty fields in Patch requests. 1852 ForceSendFields []string `json:"-"` 1853 1854 // NullFields is a list of field names (e.g. "CurrentStateTime") to 1855 // include in API requests with the JSON null value. By default, fields 1856 // with empty values are omitted from API requests. However, any field 1857 // with an empty value appearing in NullFields will be sent to the 1858 // server as null. It is an error if a field in this list has a 1859 // non-empty value. This may be used to include null fields in Patch 1860 // requests. 1861 NullFields []string `json:"-"` 1862} 1863 1864func (s *ExecutionStageState) MarshalJSON() ([]byte, error) { 1865 type NoMethod ExecutionStageState 1866 raw := NoMethod(*s) 1867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1868} 1869 1870// ExecutionStageSummary: Description of the composing transforms, 1871// names/ids, and input/outputs of a 1872// stage of execution. Some composing transforms and sources may have 1873// been 1874// generated by the Dataflow service during execution planning. 1875type ExecutionStageSummary struct { 1876 // ComponentSource: Collections produced and consumed by component 1877 // transforms of this stage. 1878 ComponentSource []*ComponentSource `json:"componentSource,omitempty"` 1879 1880 // ComponentTransform: Transforms that comprise this execution stage. 1881 ComponentTransform []*ComponentTransform `json:"componentTransform,omitempty"` 1882 1883 // Id: Dataflow service generated id for this stage. 1884 Id string `json:"id,omitempty"` 1885 1886 // InputSource: Input sources for this stage. 1887 InputSource []*StageSource `json:"inputSource,omitempty"` 1888 1889 // Kind: Type of tranform this stage is executing. 1890 // 1891 // Possible values: 1892 // "UNKNOWN_KIND" - Unrecognized transform type. 1893 // "PAR_DO_KIND" - ParDo transform. 1894 // "GROUP_BY_KEY_KIND" - Group By Key transform. 1895 // "FLATTEN_KIND" - Flatten transform. 1896 // "READ_KIND" - Read transform. 1897 // "WRITE_KIND" - Write transform. 1898 // "CONSTANT_KIND" - Constructs from a constant value, such as with 1899 // Create.of. 1900 // "SINGLETON_KIND" - Creates a Singleton view of a collection. 1901 // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as 1902 // part of a GroupByKey. 1903 Kind string `json:"kind,omitempty"` 1904 1905 // Name: Dataflow service generated name for this stage. 1906 Name string `json:"name,omitempty"` 1907 1908 // OutputSource: Output sources for this stage. 1909 OutputSource []*StageSource `json:"outputSource,omitempty"` 1910 1911 // ForceSendFields is a list of field names (e.g. "ComponentSource") to 1912 // unconditionally include in API requests. By default, fields with 1913 // empty values are omitted from API requests. However, any non-pointer, 1914 // non-interface field appearing in ForceSendFields will be sent to the 1915 // server regardless of whether the field is empty or not. This may be 1916 // used to include empty fields in Patch requests. 1917 ForceSendFields []string `json:"-"` 1918 1919 // NullFields is a list of field names (e.g. "ComponentSource") to 1920 // include in API requests with the JSON null value. By default, fields 1921 // with empty values are omitted from API requests. However, any field 1922 // with an empty value appearing in NullFields will be sent to the 1923 // server as null. It is an error if a field in this list has a 1924 // non-empty value. This may be used to include null fields in Patch 1925 // requests. 1926 NullFields []string `json:"-"` 1927} 1928 1929func (s *ExecutionStageSummary) MarshalJSON() ([]byte, error) { 1930 type NoMethod ExecutionStageSummary 1931 raw := NoMethod(*s) 1932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1933} 1934 1935// FailedLocation: Indicates which [regional 1936// endpoint] 1937// (https://cloud.google.com/dataflow/docs/concepts/regional-en 1938// dpoints) failed 1939// to respond to a request for data. 1940type FailedLocation struct { 1941 // Name: The name of the [regional 1942 // endpoint] 1943 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 1944 // dpoints) that 1945 // failed to respond. 1946 Name string `json:"name,omitempty"` 1947 1948 // ForceSendFields is a list of field names (e.g. "Name") to 1949 // unconditionally include in API requests. By default, fields with 1950 // empty values are omitted from API requests. However, any non-pointer, 1951 // non-interface field appearing in ForceSendFields will be sent to the 1952 // server regardless of whether the field is empty or not. This may be 1953 // used to include empty fields in Patch requests. 1954 ForceSendFields []string `json:"-"` 1955 1956 // NullFields is a list of field names (e.g. "Name") to include in API 1957 // requests with the JSON null value. By default, fields with empty 1958 // values are omitted from API requests. However, any field with an 1959 // empty value appearing in NullFields will be sent to the server as 1960 // null. It is an error if a field in this list has a non-empty value. 1961 // This may be used to include null fields in Patch requests. 1962 NullFields []string `json:"-"` 1963} 1964 1965func (s *FailedLocation) MarshalJSON() ([]byte, error) { 1966 type NoMethod FailedLocation 1967 raw := NoMethod(*s) 1968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1969} 1970 1971// FileIODetails: Metadata for a File connector used by the job. 1972type FileIODetails struct { 1973 // FilePattern: File Pattern used to access files by the connector. 1974 FilePattern string `json:"filePattern,omitempty"` 1975 1976 // ForceSendFields is a list of field names (e.g. "FilePattern") to 1977 // unconditionally include in API requests. By default, fields with 1978 // empty values are omitted from API requests. However, any non-pointer, 1979 // non-interface field appearing in ForceSendFields will be sent to the 1980 // server regardless of whether the field is empty or not. This may be 1981 // used to include empty fields in Patch requests. 1982 ForceSendFields []string `json:"-"` 1983 1984 // NullFields is a list of field names (e.g. "FilePattern") to include 1985 // in API requests with the JSON null value. By default, fields with 1986 // empty values are omitted from API requests. However, any field with 1987 // an empty value appearing in NullFields will be sent to the server as 1988 // null. It is an error if a field in this list has a non-empty value. 1989 // This may be used to include null fields in Patch requests. 1990 NullFields []string `json:"-"` 1991} 1992 1993func (s *FileIODetails) MarshalJSON() ([]byte, error) { 1994 type NoMethod FileIODetails 1995 raw := NoMethod(*s) 1996 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1997} 1998 1999// FlattenInstruction: An instruction that copies its inputs (zero or 2000// more) to its (single) output. 2001type FlattenInstruction struct { 2002 // Inputs: Describes the inputs to the flatten instruction. 2003 Inputs []*InstructionInput `json:"inputs,omitempty"` 2004 2005 // ForceSendFields is a list of field names (e.g. "Inputs") to 2006 // unconditionally include in API requests. By default, fields with 2007 // empty values are omitted from API requests. However, any non-pointer, 2008 // non-interface field appearing in ForceSendFields will be sent to the 2009 // server regardless of whether the field is empty or not. This may be 2010 // used to include empty fields in Patch requests. 2011 ForceSendFields []string `json:"-"` 2012 2013 // NullFields is a list of field names (e.g. "Inputs") to include in API 2014 // requests with the JSON null value. By default, fields with empty 2015 // values are omitted from API requests. However, any field with an 2016 // empty value appearing in NullFields will be sent to the server as 2017 // null. It is an error if a field in this list has a non-empty value. 2018 // This may be used to include null fields in Patch requests. 2019 NullFields []string `json:"-"` 2020} 2021 2022func (s *FlattenInstruction) MarshalJSON() ([]byte, error) { 2023 type NoMethod FlattenInstruction 2024 raw := NoMethod(*s) 2025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2026} 2027 2028// FloatingPointList: A metric value representing a list of floating 2029// point numbers. 2030type FloatingPointList struct { 2031 // Elements: Elements of the list. 2032 Elements []float64 `json:"elements,omitempty"` 2033 2034 // ForceSendFields is a list of field names (e.g. "Elements") to 2035 // unconditionally include in API requests. By default, fields with 2036 // empty values are omitted from API requests. However, any non-pointer, 2037 // non-interface field appearing in ForceSendFields will be sent to the 2038 // server regardless of whether the field is empty or not. This may be 2039 // used to include empty fields in Patch requests. 2040 ForceSendFields []string `json:"-"` 2041 2042 // NullFields is a list of field names (e.g. "Elements") to include in 2043 // API requests with the JSON null value. By default, fields with empty 2044 // values are omitted from API requests. However, any field with an 2045 // empty value appearing in NullFields will be sent to the server as 2046 // null. It is an error if a field in this list has a non-empty value. 2047 // This may be used to include null fields in Patch requests. 2048 NullFields []string `json:"-"` 2049} 2050 2051func (s *FloatingPointList) MarshalJSON() ([]byte, error) { 2052 type NoMethod FloatingPointList 2053 raw := NoMethod(*s) 2054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2055} 2056 2057// FloatingPointMean: A representation of a floating point mean metric 2058// contribution. 2059type FloatingPointMean struct { 2060 // Count: The number of values being aggregated. 2061 Count *SplitInt64 `json:"count,omitempty"` 2062 2063 // Sum: The sum of all values being aggregated. 2064 Sum float64 `json:"sum,omitempty"` 2065 2066 // ForceSendFields is a list of field names (e.g. "Count") to 2067 // unconditionally include in API requests. By default, fields with 2068 // empty values are omitted from API requests. However, any non-pointer, 2069 // non-interface field appearing in ForceSendFields will be sent to the 2070 // server regardless of whether the field is empty or not. This may be 2071 // used to include empty fields in Patch requests. 2072 ForceSendFields []string `json:"-"` 2073 2074 // NullFields is a list of field names (e.g. "Count") to include in API 2075 // requests with the JSON null value. By default, fields with empty 2076 // values are omitted from API requests. However, any field with an 2077 // empty value appearing in NullFields will be sent to the server as 2078 // null. It is an error if a field in this list has a non-empty value. 2079 // This may be used to include null fields in Patch requests. 2080 NullFields []string `json:"-"` 2081} 2082 2083func (s *FloatingPointMean) MarshalJSON() ([]byte, error) { 2084 type NoMethod FloatingPointMean 2085 raw := NoMethod(*s) 2086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2087} 2088 2089func (s *FloatingPointMean) UnmarshalJSON(data []byte) error { 2090 type NoMethod FloatingPointMean 2091 var s1 struct { 2092 Sum gensupport.JSONFloat64 `json:"sum"` 2093 *NoMethod 2094 } 2095 s1.NoMethod = (*NoMethod)(s) 2096 if err := json.Unmarshal(data, &s1); err != nil { 2097 return err 2098 } 2099 s.Sum = float64(s1.Sum) 2100 return nil 2101} 2102 2103// GetDebugConfigRequest: Request to get updated debug configuration for 2104// component. 2105type GetDebugConfigRequest struct { 2106 // ComponentId: The internal component id for which debug configuration 2107 // is 2108 // requested. 2109 ComponentId string `json:"componentId,omitempty"` 2110 2111 // Location: The [regional 2112 // endpoint] 2113 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 2114 // dpoints) that 2115 // contains the job specified by job_id. 2116 Location string `json:"location,omitempty"` 2117 2118 // WorkerId: The worker id, i.e., VM hostname. 2119 WorkerId string `json:"workerId,omitempty"` 2120 2121 // ForceSendFields is a list of field names (e.g. "ComponentId") to 2122 // unconditionally include in API requests. By default, fields with 2123 // empty values are omitted from API requests. However, any non-pointer, 2124 // non-interface field appearing in ForceSendFields will be sent to the 2125 // server regardless of whether the field is empty or not. This may be 2126 // used to include empty fields in Patch requests. 2127 ForceSendFields []string `json:"-"` 2128 2129 // NullFields is a list of field names (e.g. "ComponentId") to include 2130 // in API requests with the JSON null value. By default, fields with 2131 // empty values are omitted from API requests. However, any field with 2132 // an empty value appearing in NullFields will be sent to the server as 2133 // null. It is an error if a field in this list has a non-empty value. 2134 // This may be used to include null fields in Patch requests. 2135 NullFields []string `json:"-"` 2136} 2137 2138func (s *GetDebugConfigRequest) MarshalJSON() ([]byte, error) { 2139 type NoMethod GetDebugConfigRequest 2140 raw := NoMethod(*s) 2141 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2142} 2143 2144// GetDebugConfigResponse: Response to a get debug configuration 2145// request. 2146type GetDebugConfigResponse struct { 2147 // Config: The encoded debug configuration for the requested component. 2148 Config string `json:"config,omitempty"` 2149 2150 // ServerResponse contains the HTTP response code and headers from the 2151 // server. 2152 googleapi.ServerResponse `json:"-"` 2153 2154 // ForceSendFields is a list of field names (e.g. "Config") to 2155 // unconditionally include in API requests. By default, fields with 2156 // empty values are omitted from API requests. However, any non-pointer, 2157 // non-interface field appearing in ForceSendFields will be sent to the 2158 // server regardless of whether the field is empty or not. This may be 2159 // used to include empty fields in Patch requests. 2160 ForceSendFields []string `json:"-"` 2161 2162 // NullFields is a list of field names (e.g. "Config") to include in API 2163 // requests with the JSON null value. By default, fields with empty 2164 // values are omitted from API requests. However, any field with an 2165 // empty value appearing in NullFields will be sent to the server as 2166 // null. It is an error if a field in this list has a non-empty value. 2167 // This may be used to include null fields in Patch requests. 2168 NullFields []string `json:"-"` 2169} 2170 2171func (s *GetDebugConfigResponse) MarshalJSON() ([]byte, error) { 2172 type NoMethod GetDebugConfigResponse 2173 raw := NoMethod(*s) 2174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2175} 2176 2177// GetTemplateResponse: The response to a GetTemplate request. 2178type GetTemplateResponse struct { 2179 // Metadata: The template metadata describing the template name, 2180 // available 2181 // parameters, etc. 2182 Metadata *TemplateMetadata `json:"metadata,omitempty"` 2183 2184 // Status: The status of the get template request. Any problems with 2185 // the 2186 // request will be indicated in the error_details. 2187 Status *Status `json:"status,omitempty"` 2188 2189 // ServerResponse contains the HTTP response code and headers from the 2190 // server. 2191 googleapi.ServerResponse `json:"-"` 2192 2193 // ForceSendFields is a list of field names (e.g. "Metadata") to 2194 // unconditionally include in API requests. By default, fields with 2195 // empty values are omitted from API requests. However, any non-pointer, 2196 // non-interface field appearing in ForceSendFields will be sent to the 2197 // server regardless of whether the field is empty or not. This may be 2198 // used to include empty fields in Patch requests. 2199 ForceSendFields []string `json:"-"` 2200 2201 // NullFields is a list of field names (e.g. "Metadata") to include in 2202 // API requests with the JSON null value. By default, fields with empty 2203 // values are omitted from API requests. However, any field with an 2204 // empty value appearing in NullFields will be sent to the server as 2205 // null. It is an error if a field in this list has a non-empty value. 2206 // This may be used to include null fields in Patch requests. 2207 NullFields []string `json:"-"` 2208} 2209 2210func (s *GetTemplateResponse) MarshalJSON() ([]byte, error) { 2211 type NoMethod GetTemplateResponse 2212 raw := NoMethod(*s) 2213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2214} 2215 2216// Histogram: Histogram of value counts for a distribution. 2217// 2218// Buckets have an inclusive lower bound and exclusive upper bound and 2219// use 2220// "1,2,5 bucketing": The first bucket range is from [0,1) and all 2221// subsequent 2222// bucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus, 2223// bucket 2224// boundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2225// ... 2226// Negative values are not supported. 2227type Histogram struct { 2228 // BucketCounts: Counts of values in each bucket. For efficiency, prefix 2229 // and trailing 2230 // buckets with count = 0 are elided. Buckets can store the full range 2231 // of 2232 // values of an unsigned long, with ULLONG_MAX falling into the 59th 2233 // bucket 2234 // with range [1e19, 2e19). 2235 BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` 2236 2237 // FirstBucketOffset: Starting index of first stored bucket. The 2238 // non-inclusive upper-bound of 2239 // the ith bucket is given by: 2240 // pow(10,(i-first_bucket_offset)/3) * 2241 // (1,2,5)[(i-first_bucket_offset)%3] 2242 FirstBucketOffset int64 `json:"firstBucketOffset,omitempty"` 2243 2244 // ForceSendFields is a list of field names (e.g. "BucketCounts") to 2245 // unconditionally include in API requests. By default, fields with 2246 // empty values are omitted from API requests. However, any non-pointer, 2247 // non-interface field appearing in ForceSendFields will be sent to the 2248 // server regardless of whether the field is empty or not. This may be 2249 // used to include empty fields in Patch requests. 2250 ForceSendFields []string `json:"-"` 2251 2252 // NullFields is a list of field names (e.g. "BucketCounts") to include 2253 // in API requests with the JSON null value. By default, fields with 2254 // empty values are omitted from API requests. However, any field with 2255 // an empty value appearing in NullFields will be sent to the server as 2256 // null. It is an error if a field in this list has a non-empty value. 2257 // This may be used to include null fields in Patch requests. 2258 NullFields []string `json:"-"` 2259} 2260 2261func (s *Histogram) MarshalJSON() ([]byte, error) { 2262 type NoMethod Histogram 2263 raw := NoMethod(*s) 2264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2265} 2266 2267// HotKeyDetection: Proto describing a hot key detected on a given 2268// WorkItem. 2269type HotKeyDetection struct { 2270 // HotKeyAge: The age of the hot key measured from when it was first 2271 // detected. 2272 HotKeyAge string `json:"hotKeyAge,omitempty"` 2273 2274 // SystemName: System-defined name of the step containing this hot 2275 // key. 2276 // Unique across the workflow. 2277 SystemName string `json:"systemName,omitempty"` 2278 2279 // UserStepName: User-provided name of the step that contains this hot 2280 // key. 2281 UserStepName string `json:"userStepName,omitempty"` 2282 2283 // ForceSendFields is a list of field names (e.g. "HotKeyAge") 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. "HotKeyAge") to include in 2292 // API requests with the JSON null value. By default, fields with empty 2293 // values are omitted from API requests. However, any field with an 2294 // 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 *HotKeyDetection) MarshalJSON() ([]byte, error) { 2301 type NoMethod HotKeyDetection 2302 raw := NoMethod(*s) 2303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2304} 2305 2306// InstructionInput: An input of an instruction, as a reference to an 2307// output of a 2308// producer instruction. 2309type InstructionInput struct { 2310 // OutputNum: The output index (origin zero) within the producer. 2311 OutputNum int64 `json:"outputNum,omitempty"` 2312 2313 // ProducerInstructionIndex: The index (origin zero) of the parallel 2314 // instruction that produces 2315 // the output to be consumed by this input. This index is relative 2316 // to the list of instructions in this input's instruction's 2317 // containing MapTask. 2318 ProducerInstructionIndex int64 `json:"producerInstructionIndex,omitempty"` 2319 2320 // ForceSendFields is a list of field names (e.g. "OutputNum") to 2321 // unconditionally include in API requests. By default, fields with 2322 // empty values are omitted from API requests. However, any non-pointer, 2323 // non-interface field appearing in ForceSendFields will be sent to the 2324 // server regardless of whether the field is empty or not. This may be 2325 // used to include empty fields in Patch requests. 2326 ForceSendFields []string `json:"-"` 2327 2328 // NullFields is a list of field names (e.g. "OutputNum") to include in 2329 // API requests with the JSON null value. By default, fields with empty 2330 // values are omitted from API requests. However, any field with an 2331 // empty value appearing in NullFields will be sent to the server as 2332 // null. It is an error if a field in this list has a non-empty value. 2333 // This may be used to include null fields in Patch requests. 2334 NullFields []string `json:"-"` 2335} 2336 2337func (s *InstructionInput) MarshalJSON() ([]byte, error) { 2338 type NoMethod InstructionInput 2339 raw := NoMethod(*s) 2340 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2341} 2342 2343// InstructionOutput: An output of an instruction. 2344type InstructionOutput struct { 2345 // Codec: The codec to use to encode data being written via this output. 2346 Codec googleapi.RawMessage `json:"codec,omitempty"` 2347 2348 // Name: The user-provided name of this output. 2349 Name string `json:"name,omitempty"` 2350 2351 // OnlyCountKeyBytes: For system-generated byte and mean byte metrics, 2352 // certain instructions 2353 // should only report the key size. 2354 OnlyCountKeyBytes bool `json:"onlyCountKeyBytes,omitempty"` 2355 2356 // OnlyCountValueBytes: For system-generated byte and mean byte metrics, 2357 // certain instructions 2358 // should only report the value size. 2359 OnlyCountValueBytes bool `json:"onlyCountValueBytes,omitempty"` 2360 2361 // OriginalName: System-defined name for this output in the original 2362 // workflow graph. 2363 // Outputs that do not contribute to an original instruction do not set 2364 // this. 2365 OriginalName string `json:"originalName,omitempty"` 2366 2367 // SystemName: System-defined name of this output. 2368 // Unique across the workflow. 2369 SystemName string `json:"systemName,omitempty"` 2370 2371 // ForceSendFields is a list of field names (e.g. "Codec") to 2372 // unconditionally include in API requests. By default, fields with 2373 // empty values are omitted from API requests. However, any non-pointer, 2374 // non-interface field appearing in ForceSendFields will be sent to the 2375 // server regardless of whether the field is empty or not. This may be 2376 // used to include empty fields in Patch requests. 2377 ForceSendFields []string `json:"-"` 2378 2379 // NullFields is a list of field names (e.g. "Codec") to include in API 2380 // requests with the JSON null value. By default, fields with empty 2381 // values are omitted from API requests. However, any field with an 2382 // empty value appearing in NullFields will be sent to the server as 2383 // null. It is an error if a field in this list has a non-empty value. 2384 // This may be used to include null fields in Patch requests. 2385 NullFields []string `json:"-"` 2386} 2387 2388func (s *InstructionOutput) MarshalJSON() ([]byte, error) { 2389 type NoMethod InstructionOutput 2390 raw := NoMethod(*s) 2391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2392} 2393 2394// IntegerGauge: A metric value representing temporal values of a 2395// variable. 2396type IntegerGauge struct { 2397 // Timestamp: The time at which this value was measured. Measured as 2398 // msecs from epoch. 2399 Timestamp string `json:"timestamp,omitempty"` 2400 2401 // Value: The value of the variable represented by this gauge. 2402 Value *SplitInt64 `json:"value,omitempty"` 2403 2404 // ForceSendFields is a list of field names (e.g. "Timestamp") to 2405 // unconditionally include in API requests. By default, fields with 2406 // empty values are omitted from API requests. However, any non-pointer, 2407 // non-interface field appearing in ForceSendFields will be sent to the 2408 // server regardless of whether the field is empty or not. This may be 2409 // used to include empty fields in Patch requests. 2410 ForceSendFields []string `json:"-"` 2411 2412 // NullFields is a list of field names (e.g. "Timestamp") to include in 2413 // API requests with the JSON null value. By default, fields with empty 2414 // values are omitted from API requests. However, any field with an 2415 // empty value appearing in NullFields will be sent to the server as 2416 // null. It is an error if a field in this list has a non-empty value. 2417 // This may be used to include null fields in Patch requests. 2418 NullFields []string `json:"-"` 2419} 2420 2421func (s *IntegerGauge) MarshalJSON() ([]byte, error) { 2422 type NoMethod IntegerGauge 2423 raw := NoMethod(*s) 2424 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2425} 2426 2427// IntegerList: A metric value representing a list of integers. 2428type IntegerList struct { 2429 // Elements: Elements of the list. 2430 Elements []*SplitInt64 `json:"elements,omitempty"` 2431 2432 // ForceSendFields is a list of field names (e.g. "Elements") to 2433 // unconditionally include in API requests. By default, fields with 2434 // empty values are omitted from API requests. However, any non-pointer, 2435 // non-interface field appearing in ForceSendFields will be sent to the 2436 // server regardless of whether the field is empty or not. This may be 2437 // used to include empty fields in Patch requests. 2438 ForceSendFields []string `json:"-"` 2439 2440 // NullFields is a list of field names (e.g. "Elements") to include in 2441 // API requests with the JSON null value. By default, fields with empty 2442 // values are omitted from API requests. However, any field with an 2443 // empty value appearing in NullFields will be sent to the server as 2444 // null. It is an error if a field in this list has a non-empty value. 2445 // This may be used to include null fields in Patch requests. 2446 NullFields []string `json:"-"` 2447} 2448 2449func (s *IntegerList) MarshalJSON() ([]byte, error) { 2450 type NoMethod IntegerList 2451 raw := NoMethod(*s) 2452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2453} 2454 2455// IntegerMean: A representation of an integer mean metric contribution. 2456type IntegerMean struct { 2457 // Count: The number of values being aggregated. 2458 Count *SplitInt64 `json:"count,omitempty"` 2459 2460 // Sum: The sum of all values being aggregated. 2461 Sum *SplitInt64 `json:"sum,omitempty"` 2462 2463 // ForceSendFields is a list of field names (e.g. "Count") to 2464 // unconditionally include in API requests. By default, fields with 2465 // empty values are omitted from API requests. However, any non-pointer, 2466 // non-interface field appearing in ForceSendFields will be sent to the 2467 // server regardless of whether the field is empty or not. This may be 2468 // used to include empty fields in Patch requests. 2469 ForceSendFields []string `json:"-"` 2470 2471 // NullFields is a list of field names (e.g. "Count") to include in API 2472 // requests with the JSON null value. By default, fields with empty 2473 // values are omitted from API requests. However, any field with an 2474 // empty value appearing in NullFields will be sent to the server as 2475 // null. It is an error if a field in this list has a non-empty value. 2476 // This may be used to include null fields in Patch requests. 2477 NullFields []string `json:"-"` 2478} 2479 2480func (s *IntegerMean) MarshalJSON() ([]byte, error) { 2481 type NoMethod IntegerMean 2482 raw := NoMethod(*s) 2483 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2484} 2485 2486// Job: Defines a job to be run by the Cloud Dataflow service. 2487type Job struct { 2488 // ClientRequestId: The client's unique identifier of the job, re-used 2489 // across retried attempts. 2490 // If this field is set, the service will ensure its uniqueness. 2491 // The request to create a job will fail if the service has knowledge of 2492 // a 2493 // previously submitted job with the same client's ID and job name. 2494 // The caller may use this field to ensure idempotence of job 2495 // creation across retried attempts to create a job. 2496 // By default, the field is empty and, in that case, the service ignores 2497 // it. 2498 ClientRequestId string `json:"clientRequestId,omitempty"` 2499 2500 // CreateTime: The timestamp when the job was initially created. 2501 // Immutable and set by the 2502 // Cloud Dataflow service. 2503 CreateTime string `json:"createTime,omitempty"` 2504 2505 // CreatedFromSnapshotId: If this is specified, the job's initial state 2506 // is populated from the given 2507 // snapshot. 2508 CreatedFromSnapshotId string `json:"createdFromSnapshotId,omitempty"` 2509 2510 // CurrentState: The current state of the job. 2511 // 2512 // Jobs are created in the `JOB_STATE_STOPPED` state unless 2513 // otherwise 2514 // specified. 2515 // 2516 // A job in the `JOB_STATE_RUNNING` state may asynchronously enter 2517 // a 2518 // terminal state. After a job has reached a terminal state, no 2519 // further state updates may be made. 2520 // 2521 // This field may be mutated by the Cloud Dataflow service; 2522 // callers cannot mutate it. 2523 // 2524 // Possible values: 2525 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 2526 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job 2527 // has not 2528 // yet started to run. 2529 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 2530 // currently running. 2531 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 2532 // successfully completed. 2533 // This is a terminal job state. This state may be set by the Cloud 2534 // Dataflow 2535 // service, as a transition from `JOB_STATE_RUNNING`. It may also be set 2536 // via a 2537 // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a 2538 // terminal 2539 // state. 2540 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has 2541 // failed. This is a 2542 // terminal job state. This state may only be set by the Cloud 2543 // Dataflow 2544 // service, and only as a transition from `JOB_STATE_RUNNING`. 2545 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the 2546 // job has been explicitly 2547 // cancelled. This is a terminal job state. This state may only be 2548 // set via a Cloud Dataflow `UpdateJob` call, and only if the job has 2549 // not 2550 // yet reached another terminal state. 2551 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job 2552 // was successfully updated, 2553 // meaning that this job was stopped and another job was started, 2554 // inheriting 2555 // state from this one. This is a terminal job state. This state may 2556 // only be 2557 // set by the Cloud Dataflow service, and only as a transition 2558 // from 2559 // `JOB_STATE_RUNNING`. 2560 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job 2561 // is in the process of draining. 2562 // A draining job has stopped pulling from its input sources and is 2563 // processing 2564 // any data that remains in-flight. This state may be set via a Cloud 2565 // Dataflow 2566 // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. 2567 // Jobs 2568 // that are draining may only transition to 2569 // `JOB_STATE_DRAINED`, 2570 // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 2571 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job 2572 // has been drained. 2573 // A drained job terminated by stopping pulling from its input sources 2574 // and 2575 // processing any data that remained in-flight when draining was 2576 // requested. 2577 // This state is a terminal state, may only be set by the Cloud 2578 // Dataflow 2579 // service, and only as a transition from `JOB_STATE_DRAINING`. 2580 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job 2581 // has been created but is not yet 2582 // running. Jobs that are pending may only transition to 2583 // `JOB_STATE_RUNNING`, 2584 // or `JOB_STATE_FAILED`. 2585 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the 2586 // job has been explicitly cancelled 2587 // and is in the process of stopping. Jobs that are cancelling may 2588 // only 2589 // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. 2590 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has 2591 // been created but is being 2592 // delayed until launch. Jobs that are queued may only transition 2593 // to 2594 // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 2595 CurrentState string `json:"currentState,omitempty"` 2596 2597 // CurrentStateTime: The timestamp associated with the current state. 2598 CurrentStateTime string `json:"currentStateTime,omitempty"` 2599 2600 // Environment: The environment for the job. 2601 Environment *Environment `json:"environment,omitempty"` 2602 2603 // ExecutionInfo: Deprecated. 2604 ExecutionInfo *JobExecutionInfo `json:"executionInfo,omitempty"` 2605 2606 // Id: The unique ID of this job. 2607 // 2608 // This field is set by the Cloud Dataflow service when the Job 2609 // is 2610 // created, and is immutable for the life of the job. 2611 Id string `json:"id,omitempty"` 2612 2613 // JobMetadata: This field is populated by the Dataflow service to 2614 // support filtering jobs 2615 // by the metadata values provided here. Populated for ListJobs and all 2616 // GetJob 2617 // views SUMMARY and higher. 2618 JobMetadata *JobMetadata `json:"jobMetadata,omitempty"` 2619 2620 // Labels: User-defined labels for this job. 2621 // 2622 // The labels map can contain no more than 64 entries. Entries of the 2623 // labels 2624 // map are UTF8 strings that comply with the following restrictions: 2625 // 2626 // * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} 2627 // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} 2628 // * Both keys and values are additionally constrained to be <= 128 2629 // bytes in 2630 // size. 2631 Labels map[string]string `json:"labels,omitempty"` 2632 2633 // Location: The [regional 2634 // endpoint] 2635 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 2636 // dpoints) that 2637 // contains this job. 2638 Location string `json:"location,omitempty"` 2639 2640 // Name: The user-specified Cloud Dataflow job name. 2641 // 2642 // Only one Job with a given name may exist in a project at any 2643 // given time. If a caller attempts to create a Job with the same 2644 // name as an already-existing Job, the attempt returns the 2645 // existing Job. 2646 // 2647 // The name must match the regular 2648 // expression 2649 // `[a-z]([-a-z0-9]{0,38}[a-z0-9])?` 2650 Name string `json:"name,omitempty"` 2651 2652 // PipelineDescription: Preliminary field: The format of this data may 2653 // change at any time. 2654 // A description of the user pipeline and stages through which it is 2655 // executed. 2656 // Created by Cloud Dataflow service. Only retrieved 2657 // with 2658 // JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. 2659 PipelineDescription *PipelineDescription `json:"pipelineDescription,omitempty"` 2660 2661 // ProjectId: The ID of the Cloud Platform project that the job belongs 2662 // to. 2663 ProjectId string `json:"projectId,omitempty"` 2664 2665 // ReplaceJobId: If this job is an update of an existing job, this field 2666 // is the job ID 2667 // of the job it replaced. 2668 // 2669 // When sending a `CreateJobRequest`, you can update a job by specifying 2670 // it 2671 // here. The job named here is stopped, and its intermediate state 2672 // is 2673 // transferred to this job. 2674 ReplaceJobId string `json:"replaceJobId,omitempty"` 2675 2676 // ReplacedByJobId: If another job is an update of this job (and thus, 2677 // this job is in 2678 // `JOB_STATE_UPDATED`), this field contains the ID of that job. 2679 ReplacedByJobId string `json:"replacedByJobId,omitempty"` 2680 2681 // RequestedState: The job's requested state. 2682 // 2683 // `UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` 2684 // and 2685 // `JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` 2686 // may 2687 // also be used to directly set a job's requested state 2688 // to 2689 // `JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating 2690 // the 2691 // job if it has not already reached a terminal state. 2692 // 2693 // Possible values: 2694 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 2695 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job 2696 // has not 2697 // yet started to run. 2698 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 2699 // currently running. 2700 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 2701 // successfully completed. 2702 // This is a terminal job state. This state may be set by the Cloud 2703 // Dataflow 2704 // service, as a transition from `JOB_STATE_RUNNING`. It may also be set 2705 // via a 2706 // Cloud Dataflow `UpdateJob` call, if the job has not yet reached a 2707 // terminal 2708 // state. 2709 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has 2710 // failed. This is a 2711 // terminal job state. This state may only be set by the Cloud 2712 // Dataflow 2713 // service, and only as a transition from `JOB_STATE_RUNNING`. 2714 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the 2715 // job has been explicitly 2716 // cancelled. This is a terminal job state. This state may only be 2717 // set via a Cloud Dataflow `UpdateJob` call, and only if the job has 2718 // not 2719 // yet reached another terminal state. 2720 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job 2721 // was successfully updated, 2722 // meaning that this job was stopped and another job was started, 2723 // inheriting 2724 // state from this one. This is a terminal job state. This state may 2725 // only be 2726 // set by the Cloud Dataflow service, and only as a transition 2727 // from 2728 // `JOB_STATE_RUNNING`. 2729 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job 2730 // is in the process of draining. 2731 // A draining job has stopped pulling from its input sources and is 2732 // processing 2733 // any data that remains in-flight. This state may be set via a Cloud 2734 // Dataflow 2735 // `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. 2736 // Jobs 2737 // that are draining may only transition to 2738 // `JOB_STATE_DRAINED`, 2739 // `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 2740 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job 2741 // has been drained. 2742 // A drained job terminated by stopping pulling from its input sources 2743 // and 2744 // processing any data that remained in-flight when draining was 2745 // requested. 2746 // This state is a terminal state, may only be set by the Cloud 2747 // Dataflow 2748 // service, and only as a transition from `JOB_STATE_DRAINING`. 2749 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job 2750 // has been created but is not yet 2751 // running. Jobs that are pending may only transition to 2752 // `JOB_STATE_RUNNING`, 2753 // or `JOB_STATE_FAILED`. 2754 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the 2755 // job has been explicitly cancelled 2756 // and is in the process of stopping. Jobs that are cancelling may 2757 // only 2758 // transition to `JOB_STATE_CANCELLED` or `JOB_STATE_FAILED`. 2759 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has 2760 // been created but is being 2761 // delayed until launch. Jobs that are queued may only transition 2762 // to 2763 // `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 2764 RequestedState string `json:"requestedState,omitempty"` 2765 2766 // StageStates: This field may be mutated by the Cloud Dataflow 2767 // service; 2768 // callers cannot mutate it. 2769 StageStates []*ExecutionStageState `json:"stageStates,omitempty"` 2770 2771 // StartTime: The timestamp when the job was started (transitioned to 2772 // JOB_STATE_PENDING). 2773 // Flexible resource scheduling jobs are started with some delay after 2774 // job 2775 // creation, so start_time is unset before start and is updated when 2776 // the 2777 // job is started by the Cloud Dataflow service. For other jobs, 2778 // start_time 2779 // always equals to create_time and is immutable and set by the Cloud 2780 // Dataflow 2781 // service. 2782 StartTime string `json:"startTime,omitempty"` 2783 2784 // Steps: Exactly one of step or steps_location should be 2785 // specified. 2786 // 2787 // The top-level steps that constitute the entire job. 2788 Steps []*Step `json:"steps,omitempty"` 2789 2790 // StepsLocation: The GCS location where the steps are stored. 2791 StepsLocation string `json:"stepsLocation,omitempty"` 2792 2793 // TempFiles: A set of files the system should be aware of that are 2794 // used 2795 // for temporary storage. These temporary files will be 2796 // removed on job completion. 2797 // No duplicates are allowed. 2798 // No file patterns are supported. 2799 // 2800 // The supported files are: 2801 // 2802 // Google Cloud Storage: 2803 // 2804 // storage.googleapis.com/{bucket}/{object} 2805 // bucket.storage.googleapis.com/{object} 2806 TempFiles []string `json:"tempFiles,omitempty"` 2807 2808 // TransformNameMapping: The map of transform name prefixes of the job 2809 // to be replaced to the 2810 // corresponding name prefixes of the new job. 2811 TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"` 2812 2813 // Type: The type of Cloud Dataflow job. 2814 // 2815 // Possible values: 2816 // "JOB_TYPE_UNKNOWN" - The type of the job is unspecified, or 2817 // unknown. 2818 // "JOB_TYPE_BATCH" - A batch job with a well-defined end point: data 2819 // is read, data is 2820 // processed, data is written, and the job is done. 2821 // "JOB_TYPE_STREAMING" - A continuously streaming job with no end: 2822 // data is read, 2823 // processed, and written continuously. 2824 Type string `json:"type,omitempty"` 2825 2826 // ServerResponse contains the HTTP response code and headers from the 2827 // server. 2828 googleapi.ServerResponse `json:"-"` 2829 2830 // ForceSendFields is a list of field names (e.g. "ClientRequestId") to 2831 // unconditionally include in API requests. By default, fields with 2832 // empty values are omitted from API requests. However, any non-pointer, 2833 // non-interface field appearing in ForceSendFields will be sent to the 2834 // server regardless of whether the field is empty or not. This may be 2835 // used to include empty fields in Patch requests. 2836 ForceSendFields []string `json:"-"` 2837 2838 // NullFields is a list of field names (e.g. "ClientRequestId") to 2839 // include in API requests with the JSON null value. By default, fields 2840 // with empty values are omitted from API requests. However, any field 2841 // with an empty value appearing in NullFields will be sent to the 2842 // server as null. It is an error if a field in this list has a 2843 // non-empty value. This may be used to include null fields in Patch 2844 // requests. 2845 NullFields []string `json:"-"` 2846} 2847 2848func (s *Job) MarshalJSON() ([]byte, error) { 2849 type NoMethod Job 2850 raw := NoMethod(*s) 2851 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2852} 2853 2854// JobExecutionInfo: Additional information about how a Cloud Dataflow 2855// job will be executed that 2856// isn't contained in the submitted job. 2857type JobExecutionInfo struct { 2858 // Stages: A mapping from each stage to the information about that 2859 // stage. 2860 Stages map[string]JobExecutionStageInfo `json:"stages,omitempty"` 2861 2862 // ForceSendFields is a list of field names (e.g. "Stages") to 2863 // unconditionally include in API requests. By default, fields with 2864 // empty values are omitted from API requests. However, any non-pointer, 2865 // non-interface field appearing in ForceSendFields will be sent to the 2866 // server regardless of whether the field is empty or not. This may be 2867 // used to include empty fields in Patch requests. 2868 ForceSendFields []string `json:"-"` 2869 2870 // NullFields is a list of field names (e.g. "Stages") to include in API 2871 // requests with the JSON null value. By default, fields with empty 2872 // values are omitted from API requests. However, any field with an 2873 // empty value appearing in NullFields will be sent to the server as 2874 // null. It is an error if a field in this list has a non-empty value. 2875 // This may be used to include null fields in Patch requests. 2876 NullFields []string `json:"-"` 2877} 2878 2879func (s *JobExecutionInfo) MarshalJSON() ([]byte, error) { 2880 type NoMethod JobExecutionInfo 2881 raw := NoMethod(*s) 2882 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2883} 2884 2885// JobExecutionStageInfo: Contains information about how a 2886// particular 2887// google.dataflow.v1beta3.Step will be executed. 2888type JobExecutionStageInfo struct { 2889 // StepName: The steps associated with the execution stage. 2890 // Note that stages may have several steps, and that a given step 2891 // might be run by more than one stage. 2892 StepName []string `json:"stepName,omitempty"` 2893 2894 // ForceSendFields is a list of field names (e.g. "StepName") to 2895 // unconditionally include in API requests. By default, fields with 2896 // empty values are omitted from API requests. However, any non-pointer, 2897 // non-interface field appearing in ForceSendFields will be sent to the 2898 // server regardless of whether the field is empty or not. This may be 2899 // used to include empty fields in Patch requests. 2900 ForceSendFields []string `json:"-"` 2901 2902 // NullFields is a list of field names (e.g. "StepName") to include in 2903 // API requests with the JSON null value. By default, fields with empty 2904 // values are omitted from API requests. However, any field with an 2905 // empty value appearing in NullFields will be sent to the server as 2906 // null. It is an error if a field in this list has a non-empty value. 2907 // This may be used to include null fields in Patch requests. 2908 NullFields []string `json:"-"` 2909} 2910 2911func (s *JobExecutionStageInfo) MarshalJSON() ([]byte, error) { 2912 type NoMethod JobExecutionStageInfo 2913 raw := NoMethod(*s) 2914 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2915} 2916 2917// JobMessage: A particular message pertaining to a Dataflow job. 2918type JobMessage struct { 2919 // Id: Deprecated. 2920 Id string `json:"id,omitempty"` 2921 2922 // MessageImportance: Importance level of the message. 2923 // 2924 // Possible values: 2925 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't 2926 // specified, or is unknown. 2927 // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: 2928 // typically only useful for 2929 // software engineers working on the code the job is running. 2930 // Typically, Dataflow pipeline runners do not display log messages 2931 // at this level by default. 2932 // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: 2933 // somewhat verbose, but 2934 // potentially useful to users. Typically, Dataflow pipeline 2935 // runners do not display log messages at this level by default. 2936 // These messages are displayed by default in the Dataflow 2937 // monitoring UI. 2938 // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful 2939 // for keeping 2940 // track of the execution of a Dataflow pipeline. Typically, 2941 // Dataflow pipeline runners display log messages at this level 2942 // by 2943 // default, and these messages are displayed by default in the 2944 // Dataflow monitoring UI. 2945 // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: 2946 // indicating a condition 2947 // pertaining to a job which may require human intervention. 2948 // Typically, Dataflow pipeline runners display log messages at 2949 // this 2950 // level by default, and these messages are displayed by default in 2951 // the Dataflow monitoring UI. 2952 // "JOB_MESSAGE_ERROR" - The message is at the 'error' level: 2953 // indicating a condition 2954 // preventing a job from succeeding. Typically, Dataflow 2955 // pipeline 2956 // runners display log messages at this level by default, and 2957 // these 2958 // messages are displayed by default in the Dataflow monitoring UI. 2959 MessageImportance string `json:"messageImportance,omitempty"` 2960 2961 // MessageText: The text of the message. 2962 MessageText string `json:"messageText,omitempty"` 2963 2964 // Time: The timestamp of the message. 2965 Time string `json:"time,omitempty"` 2966 2967 // ForceSendFields is a list of field names (e.g. "Id") 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. "Id") 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 *JobMessage) MarshalJSON() ([]byte, error) { 2985 type NoMethod JobMessage 2986 raw := NoMethod(*s) 2987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2988} 2989 2990// JobMetadata: Metadata available primarily for filtering jobs. Will be 2991// included in the 2992// ListJob response and Job SUMMARY view. 2993type JobMetadata struct { 2994 // BigTableDetails: Identification of a BigTable source used in the 2995 // Dataflow job. 2996 BigTableDetails []*BigTableIODetails `json:"bigTableDetails,omitempty"` 2997 2998 // BigqueryDetails: Identification of a BigQuery source used in the 2999 // Dataflow job. 3000 BigqueryDetails []*BigQueryIODetails `json:"bigqueryDetails,omitempty"` 3001 3002 // DatastoreDetails: Identification of a Datastore source used in the 3003 // Dataflow job. 3004 DatastoreDetails []*DatastoreIODetails `json:"datastoreDetails,omitempty"` 3005 3006 // FileDetails: Identification of a File source used in the Dataflow 3007 // job. 3008 FileDetails []*FileIODetails `json:"fileDetails,omitempty"` 3009 3010 // PubsubDetails: Identification of a PubSub source used in the Dataflow 3011 // job. 3012 PubsubDetails []*PubSubIODetails `json:"pubsubDetails,omitempty"` 3013 3014 // SdkVersion: The SDK version used to run the job. 3015 SdkVersion *SdkVersion `json:"sdkVersion,omitempty"` 3016 3017 // SpannerDetails: Identification of a Spanner source used in the 3018 // Dataflow job. 3019 SpannerDetails []*SpannerIODetails `json:"spannerDetails,omitempty"` 3020 3021 // ForceSendFields is a list of field names (e.g. "BigTableDetails") to 3022 // unconditionally include in API requests. By default, fields with 3023 // empty values are omitted from API requests. However, any non-pointer, 3024 // non-interface field appearing in ForceSendFields will be sent to the 3025 // server regardless of whether the field is empty or not. This may be 3026 // used to include empty fields in Patch requests. 3027 ForceSendFields []string `json:"-"` 3028 3029 // NullFields is a list of field names (e.g. "BigTableDetails") to 3030 // include in API requests with the JSON null value. By default, fields 3031 // with empty values are omitted from API requests. However, any field 3032 // with an empty value appearing in NullFields will be sent to the 3033 // server as null. It is an error if a field in this list has a 3034 // non-empty value. This may be used to include null fields in Patch 3035 // requests. 3036 NullFields []string `json:"-"` 3037} 3038 3039func (s *JobMetadata) MarshalJSON() ([]byte, error) { 3040 type NoMethod JobMetadata 3041 raw := NoMethod(*s) 3042 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3043} 3044 3045// JobMetrics: JobMetrics contains a collection of metrics describing 3046// the detailed progress 3047// of a Dataflow job. Metrics correspond to user-defined and 3048// system-defined 3049// metrics in the job. 3050// 3051// This resource captures only the most recent values of each 3052// metric; 3053// time-series data can be queried for them (under the same metric 3054// names) 3055// from Cloud Monitoring. 3056type JobMetrics struct { 3057 // MetricTime: Timestamp as of which metric values are current. 3058 MetricTime string `json:"metricTime,omitempty"` 3059 3060 // Metrics: All metrics for this job. 3061 Metrics []*MetricUpdate `json:"metrics,omitempty"` 3062 3063 // ServerResponse contains the HTTP response code and headers from the 3064 // server. 3065 googleapi.ServerResponse `json:"-"` 3066 3067 // ForceSendFields is a list of field names (e.g. "MetricTime") to 3068 // unconditionally include in API requests. By default, fields with 3069 // empty values are omitted from API requests. However, any non-pointer, 3070 // non-interface field appearing in ForceSendFields will be sent to the 3071 // server regardless of whether the field is empty or not. This may be 3072 // used to include empty fields in Patch requests. 3073 ForceSendFields []string `json:"-"` 3074 3075 // NullFields is a list of field names (e.g. "MetricTime") to include in 3076 // API requests with the JSON null value. By default, fields with empty 3077 // values are omitted from API requests. However, any field with an 3078 // empty value appearing in NullFields will be sent to the server as 3079 // null. It is an error if a field in this list has a non-empty value. 3080 // This may be used to include null fields in Patch requests. 3081 NullFields []string `json:"-"` 3082} 3083 3084func (s *JobMetrics) MarshalJSON() ([]byte, error) { 3085 type NoMethod JobMetrics 3086 raw := NoMethod(*s) 3087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3088} 3089 3090// KeyRangeDataDiskAssignment: Data disk assignment information for a 3091// specific key-range of a sharded 3092// computation. 3093// Currently we only support UTF-8 character splits to simplify encoding 3094// into 3095// JSON. 3096type KeyRangeDataDiskAssignment struct { 3097 // DataDisk: The name of the data disk where data for this range is 3098 // stored. 3099 // This name is local to the Google Cloud Platform project and 3100 // uniquely 3101 // identifies the disk within that project, for 3102 // example 3103 // "myproject-1014-104817-4c2-harness-0-disk-1". 3104 DataDisk string `json:"dataDisk,omitempty"` 3105 3106 // End: The end (exclusive) of the key range. 3107 End string `json:"end,omitempty"` 3108 3109 // Start: The start (inclusive) of the key range. 3110 Start string `json:"start,omitempty"` 3111 3112 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3113 // unconditionally include in API requests. By default, fields with 3114 // empty values are omitted from API requests. However, any non-pointer, 3115 // non-interface field appearing in ForceSendFields will be sent to the 3116 // server regardless of whether the field is empty or not. This may be 3117 // used to include empty fields in Patch requests. 3118 ForceSendFields []string `json:"-"` 3119 3120 // NullFields is a list of field names (e.g. "DataDisk") to include in 3121 // API requests with the JSON null value. By default, fields with empty 3122 // values are omitted from API requests. However, any field with an 3123 // empty value appearing in NullFields will be sent to the server as 3124 // null. It is an error if a field in this list has a non-empty value. 3125 // This may be used to include null fields in Patch requests. 3126 NullFields []string `json:"-"` 3127} 3128 3129func (s *KeyRangeDataDiskAssignment) MarshalJSON() ([]byte, error) { 3130 type NoMethod KeyRangeDataDiskAssignment 3131 raw := NoMethod(*s) 3132 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3133} 3134 3135// KeyRangeLocation: Location information for a specific key-range of a 3136// sharded computation. 3137// Currently we only support UTF-8 character splits to simplify encoding 3138// into 3139// JSON. 3140type KeyRangeLocation struct { 3141 // DataDisk: The name of the data disk where data for this range is 3142 // stored. 3143 // This name is local to the Google Cloud Platform project and 3144 // uniquely 3145 // identifies the disk within that project, for 3146 // example 3147 // "myproject-1014-104817-4c2-harness-0-disk-1". 3148 DataDisk string `json:"dataDisk,omitempty"` 3149 3150 // DeliveryEndpoint: The physical location of this range assignment to 3151 // be used for 3152 // streaming computation cross-worker message delivery. 3153 DeliveryEndpoint string `json:"deliveryEndpoint,omitempty"` 3154 3155 // DeprecatedPersistentDirectory: DEPRECATED. The location of the 3156 // persistent state for this range, as a 3157 // persistent directory in the worker local filesystem. 3158 DeprecatedPersistentDirectory string `json:"deprecatedPersistentDirectory,omitempty"` 3159 3160 // End: The end (exclusive) of the key range. 3161 End string `json:"end,omitempty"` 3162 3163 // Start: The start (inclusive) of the key range. 3164 Start string `json:"start,omitempty"` 3165 3166 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3167 // unconditionally include in API requests. By default, fields with 3168 // empty values are omitted from API requests. However, any non-pointer, 3169 // non-interface field appearing in ForceSendFields will be sent to the 3170 // server regardless of whether the field is empty or not. This may be 3171 // used to include empty fields in Patch requests. 3172 ForceSendFields []string `json:"-"` 3173 3174 // NullFields is a list of field names (e.g. "DataDisk") to include in 3175 // API requests with the JSON null value. By default, fields with empty 3176 // values are omitted from API requests. However, any field with an 3177 // empty value appearing in NullFields will be sent to the server as 3178 // null. It is an error if a field in this list has a non-empty value. 3179 // This may be used to include null fields in Patch requests. 3180 NullFields []string `json:"-"` 3181} 3182 3183func (s *KeyRangeLocation) MarshalJSON() ([]byte, error) { 3184 type NoMethod KeyRangeLocation 3185 raw := NoMethod(*s) 3186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3187} 3188 3189// LaunchTemplateParameters: Parameters to provide to the template being 3190// launched. 3191type LaunchTemplateParameters struct { 3192 // Environment: The runtime environment for the job. 3193 Environment *RuntimeEnvironment `json:"environment,omitempty"` 3194 3195 // JobName: Required. The job name to use for the created job. 3196 JobName string `json:"jobName,omitempty"` 3197 3198 // Parameters: The runtime parameters to pass to the job. 3199 Parameters map[string]string `json:"parameters,omitempty"` 3200 3201 // TransformNameMapping: Only applicable when updating a pipeline. Map 3202 // of transform name prefixes of 3203 // the job to be replaced to the corresponding name prefixes of the new 3204 // job. 3205 TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"` 3206 3207 // Update: If set, replace the existing pipeline with the name specified 3208 // by jobName 3209 // with this pipeline, preserving state. 3210 Update bool `json:"update,omitempty"` 3211 3212 // ForceSendFields is a list of field names (e.g. "Environment") to 3213 // unconditionally include in API requests. By default, fields with 3214 // empty values are omitted from API requests. However, any non-pointer, 3215 // non-interface field appearing in ForceSendFields will be sent to the 3216 // server regardless of whether the field is empty or not. This may be 3217 // used to include empty fields in Patch requests. 3218 ForceSendFields []string `json:"-"` 3219 3220 // NullFields is a list of field names (e.g. "Environment") to include 3221 // in API requests with the JSON null value. By default, fields with 3222 // empty values are omitted from API requests. However, any field with 3223 // an empty value appearing in NullFields will be sent to the server as 3224 // null. It is an error if a field in this list has a non-empty value. 3225 // This may be used to include null fields in Patch requests. 3226 NullFields []string `json:"-"` 3227} 3228 3229func (s *LaunchTemplateParameters) MarshalJSON() ([]byte, error) { 3230 type NoMethod LaunchTemplateParameters 3231 raw := NoMethod(*s) 3232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3233} 3234 3235// LaunchTemplateResponse: Response to the request to launch a template. 3236type LaunchTemplateResponse struct { 3237 // Job: The job that was launched, if the request was not a dry run 3238 // and 3239 // the job was successfully launched. 3240 Job *Job `json:"job,omitempty"` 3241 3242 // ServerResponse contains the HTTP response code and headers from the 3243 // server. 3244 googleapi.ServerResponse `json:"-"` 3245 3246 // ForceSendFields is a list of field names (e.g. "Job") to 3247 // unconditionally include in API requests. By default, fields with 3248 // empty values are omitted from API requests. However, any non-pointer, 3249 // non-interface field appearing in ForceSendFields will be sent to the 3250 // server regardless of whether the field is empty or not. This may be 3251 // used to include empty fields in Patch requests. 3252 ForceSendFields []string `json:"-"` 3253 3254 // NullFields is a list of field names (e.g. "Job") to include in API 3255 // requests with the JSON null value. By default, fields with empty 3256 // values are omitted from API requests. However, any field with an 3257 // empty value appearing in NullFields will be sent to the server as 3258 // null. It is an error if a field in this list has a non-empty value. 3259 // This may be used to include null fields in Patch requests. 3260 NullFields []string `json:"-"` 3261} 3262 3263func (s *LaunchTemplateResponse) MarshalJSON() ([]byte, error) { 3264 type NoMethod LaunchTemplateResponse 3265 raw := NoMethod(*s) 3266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3267} 3268 3269// LeaseWorkItemRequest: Request to lease WorkItems. 3270type LeaseWorkItemRequest struct { 3271 // CurrentWorkerTime: The current timestamp at the worker. 3272 CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` 3273 3274 // Location: The [regional 3275 // endpoint] 3276 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 3277 // dpoints) that 3278 // contains the WorkItem's job. 3279 Location string `json:"location,omitempty"` 3280 3281 // RequestedLeaseDuration: The initial lease period. 3282 RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` 3283 3284 // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkRequest from 3285 // UnifiedWorker. 3286 UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` 3287 3288 // WorkItemTypes: Filter for WorkItem type. 3289 WorkItemTypes []string `json:"workItemTypes,omitempty"` 3290 3291 // WorkerCapabilities: Worker capabilities. WorkItems might be limited 3292 // to workers with specific 3293 // capabilities. 3294 WorkerCapabilities []string `json:"workerCapabilities,omitempty"` 3295 3296 // WorkerId: Identifies the worker leasing work -- typically the ID of 3297 // the 3298 // virtual machine running the worker. 3299 WorkerId string `json:"workerId,omitempty"` 3300 3301 // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime") 3302 // to unconditionally include in API requests. By default, fields with 3303 // empty values are omitted from API requests. However, any non-pointer, 3304 // non-interface field appearing in ForceSendFields will be sent to the 3305 // server regardless of whether the field is empty or not. This may be 3306 // used to include empty fields in Patch requests. 3307 ForceSendFields []string `json:"-"` 3308 3309 // NullFields is a list of field names (e.g. "CurrentWorkerTime") to 3310 // include in API requests with the JSON null value. By default, fields 3311 // with empty values are omitted from API requests. However, any field 3312 // with an empty value appearing in NullFields will be sent to the 3313 // server as null. It is an error if a field in this list has a 3314 // non-empty value. This may be used to include null fields in Patch 3315 // requests. 3316 NullFields []string `json:"-"` 3317} 3318 3319func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) { 3320 type NoMethod LeaseWorkItemRequest 3321 raw := NoMethod(*s) 3322 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3323} 3324 3325// LeaseWorkItemResponse: Response to a request to lease WorkItems. 3326type LeaseWorkItemResponse struct { 3327 // UnifiedWorkerResponse: Untranslated bag-of-bytes WorkResponse for 3328 // UnifiedWorker. 3329 UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` 3330 3331 // WorkItems: A list of the leased WorkItems. 3332 WorkItems []*WorkItem `json:"workItems,omitempty"` 3333 3334 // ServerResponse contains the HTTP response code and headers from the 3335 // server. 3336 googleapi.ServerResponse `json:"-"` 3337 3338 // ForceSendFields is a list of field names (e.g. 3339 // "UnifiedWorkerResponse") to unconditionally include in API requests. 3340 // By default, fields with empty values are omitted from API requests. 3341 // However, any non-pointer, non-interface field appearing in 3342 // ForceSendFields will be sent to the server regardless of whether the 3343 // field is empty or not. This may be used to include empty fields in 3344 // Patch requests. 3345 ForceSendFields []string `json:"-"` 3346 3347 // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to 3348 // include in API requests with the JSON null value. By default, fields 3349 // with empty values are omitted from API requests. However, any field 3350 // with an empty value appearing in NullFields will be sent to the 3351 // server as null. It is an error if a field in this list has a 3352 // non-empty value. This may be used to include null fields in Patch 3353 // requests. 3354 NullFields []string `json:"-"` 3355} 3356 3357func (s *LeaseWorkItemResponse) MarshalJSON() ([]byte, error) { 3358 type NoMethod LeaseWorkItemResponse 3359 raw := NoMethod(*s) 3360 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3361} 3362 3363// ListJobMessagesResponse: Response to a request to list job messages. 3364type ListJobMessagesResponse struct { 3365 // AutoscalingEvents: Autoscaling events in ascending timestamp order. 3366 AutoscalingEvents []*AutoscalingEvent `json:"autoscalingEvents,omitempty"` 3367 3368 // JobMessages: Messages in ascending timestamp order. 3369 JobMessages []*JobMessage `json:"jobMessages,omitempty"` 3370 3371 // NextPageToken: The token to obtain the next page of results if there 3372 // are more. 3373 NextPageToken string `json:"nextPageToken,omitempty"` 3374 3375 // ServerResponse contains the HTTP response code and headers from the 3376 // server. 3377 googleapi.ServerResponse `json:"-"` 3378 3379 // ForceSendFields is a list of field names (e.g. "AutoscalingEvents") 3380 // to unconditionally include in API requests. By default, fields with 3381 // empty values are omitted from API requests. However, any non-pointer, 3382 // non-interface field appearing in ForceSendFields will be sent to the 3383 // server regardless of whether the field is empty or not. This may be 3384 // used to include empty fields in Patch requests. 3385 ForceSendFields []string `json:"-"` 3386 3387 // NullFields is a list of field names (e.g. "AutoscalingEvents") to 3388 // include in API requests with the JSON null value. By default, fields 3389 // with empty values are omitted from API requests. However, any field 3390 // with an empty value appearing in NullFields will be sent to the 3391 // server as null. It is an error if a field in this list has a 3392 // non-empty value. This may be used to include null fields in Patch 3393 // requests. 3394 NullFields []string `json:"-"` 3395} 3396 3397func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) { 3398 type NoMethod ListJobMessagesResponse 3399 raw := NoMethod(*s) 3400 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3401} 3402 3403// ListJobsResponse: Response to a request to list Cloud Dataflow jobs. 3404// This may be a partial 3405// response, depending on the page size in the ListJobsRequest. 3406type ListJobsResponse struct { 3407 // FailedLocation: Zero or more messages describing the [regional 3408 // endpoints] 3409 // (https://cloud.google.com/dataflow/docs/concepts/regional-e 3410 // ndpoints) that 3411 // failed to respond. 3412 FailedLocation []*FailedLocation `json:"failedLocation,omitempty"` 3413 3414 // Jobs: A subset of the requested job information. 3415 Jobs []*Job `json:"jobs,omitempty"` 3416 3417 // NextPageToken: Set if there may be more results than fit in this 3418 // response. 3419 NextPageToken string `json:"nextPageToken,omitempty"` 3420 3421 // ServerResponse contains the HTTP response code and headers from the 3422 // server. 3423 googleapi.ServerResponse `json:"-"` 3424 3425 // ForceSendFields is a list of field names (e.g. "FailedLocation") to 3426 // unconditionally include in API requests. By default, fields with 3427 // empty values are omitted from API requests. However, any non-pointer, 3428 // non-interface field appearing in ForceSendFields will be sent to the 3429 // server regardless of whether the field is empty or not. This may be 3430 // used to include empty fields in Patch requests. 3431 ForceSendFields []string `json:"-"` 3432 3433 // NullFields is a list of field names (e.g. "FailedLocation") to 3434 // include in API requests with the JSON null value. By default, fields 3435 // with empty values are omitted from API requests. However, any field 3436 // with an empty value appearing in NullFields will be sent to the 3437 // server as null. It is an error if a field in this list has a 3438 // non-empty value. This may be used to include null fields in Patch 3439 // requests. 3440 NullFields []string `json:"-"` 3441} 3442 3443func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { 3444 type NoMethod ListJobsResponse 3445 raw := NoMethod(*s) 3446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3447} 3448 3449// MapTask: MapTask consists of an ordered set of instructions, each of 3450// which 3451// describes one particular low-level operation for the worker 3452// to 3453// perform in order to accomplish the MapTask's WorkItem. 3454// 3455// Each instruction must appear in the list before any instructions 3456// which 3457// depends on its output. 3458type MapTask struct { 3459 // CounterPrefix: Counter prefix that can be used to prefix counters. 3460 // Not currently used in 3461 // Dataflow. 3462 CounterPrefix string `json:"counterPrefix,omitempty"` 3463 3464 // Instructions: The instructions in the MapTask. 3465 Instructions []*ParallelInstruction `json:"instructions,omitempty"` 3466 3467 // StageName: System-defined name of the stage containing this 3468 // MapTask. 3469 // Unique across the workflow. 3470 StageName string `json:"stageName,omitempty"` 3471 3472 // SystemName: System-defined name of this MapTask. 3473 // Unique across the workflow. 3474 SystemName string `json:"systemName,omitempty"` 3475 3476 // ForceSendFields is a list of field names (e.g. "CounterPrefix") to 3477 // unconditionally include in API requests. By default, fields with 3478 // empty values are omitted from API requests. However, any non-pointer, 3479 // non-interface field appearing in ForceSendFields will be sent to the 3480 // server regardless of whether the field is empty or not. This may be 3481 // used to include empty fields in Patch requests. 3482 ForceSendFields []string `json:"-"` 3483 3484 // NullFields is a list of field names (e.g. "CounterPrefix") to include 3485 // in API requests with the JSON null value. By default, fields with 3486 // empty values are omitted from API requests. However, any field with 3487 // an empty value appearing in NullFields will be sent to the server as 3488 // null. It is an error if a field in this list has a non-empty value. 3489 // This may be used to include null fields in Patch requests. 3490 NullFields []string `json:"-"` 3491} 3492 3493func (s *MapTask) MarshalJSON() ([]byte, error) { 3494 type NoMethod MapTask 3495 raw := NoMethod(*s) 3496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3497} 3498 3499// MetricShortId: The metric short id is returned to the user alongside 3500// an offset into 3501// ReportWorkItemStatusRequest 3502type MetricShortId struct { 3503 // MetricIndex: The index of the corresponding metric in 3504 // the ReportWorkItemStatusRequest. Required. 3505 MetricIndex int64 `json:"metricIndex,omitempty"` 3506 3507 // ShortId: The service-generated short identifier for the metric. 3508 ShortId int64 `json:"shortId,omitempty,string"` 3509 3510 // ForceSendFields is a list of field names (e.g. "MetricIndex") to 3511 // unconditionally include in API requests. By default, fields with 3512 // empty values are omitted from API requests. However, any non-pointer, 3513 // non-interface field appearing in ForceSendFields will be sent to the 3514 // server regardless of whether the field is empty or not. This may be 3515 // used to include empty fields in Patch requests. 3516 ForceSendFields []string `json:"-"` 3517 3518 // NullFields is a list of field names (e.g. "MetricIndex") to include 3519 // in API requests with the JSON null value. By default, fields with 3520 // empty values are omitted from API requests. However, any field with 3521 // an empty value appearing in NullFields will be sent to the server as 3522 // null. It is an error if a field in this list has a non-empty value. 3523 // This may be used to include null fields in Patch requests. 3524 NullFields []string `json:"-"` 3525} 3526 3527func (s *MetricShortId) MarshalJSON() ([]byte, error) { 3528 type NoMethod MetricShortId 3529 raw := NoMethod(*s) 3530 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3531} 3532 3533// MetricStructuredName: Identifies a metric, by describing the source 3534// which generated the 3535// metric. 3536type MetricStructuredName struct { 3537 // Context: Zero or more labeled fields which identify the part of the 3538 // job this 3539 // metric is associated with, such as the name of a step or 3540 // collection. 3541 // 3542 // For example, built-in counters associated with steps will 3543 // have 3544 // context['step'] = <step-name>. Counters associated with 3545 // PCollections 3546 // in the SDK will have context['pcollection'] = <pcollection-name>. 3547 Context map[string]string `json:"context,omitempty"` 3548 3549 // Name: Worker-defined metric name. 3550 Name string `json:"name,omitempty"` 3551 3552 // Origin: Origin (namespace) of metric name. May be blank for 3553 // user-define metrics; 3554 // will be "dataflow" for metrics defined by the Dataflow service or 3555 // SDK. 3556 Origin string `json:"origin,omitempty"` 3557 3558 // ForceSendFields is a list of field names (e.g. "Context") to 3559 // unconditionally include in API requests. By default, fields with 3560 // empty values are omitted from API requests. However, any non-pointer, 3561 // non-interface field appearing in ForceSendFields will be sent to the 3562 // server regardless of whether the field is empty or not. This may be 3563 // used to include empty fields in Patch requests. 3564 ForceSendFields []string `json:"-"` 3565 3566 // NullFields is a list of field names (e.g. "Context") to include in 3567 // API requests with the JSON null value. By default, fields with empty 3568 // values are omitted from API requests. However, any field with an 3569 // empty value appearing in NullFields will be sent to the server as 3570 // null. It is an error if a field in this list has a non-empty value. 3571 // This may be used to include null fields in Patch requests. 3572 NullFields []string `json:"-"` 3573} 3574 3575func (s *MetricStructuredName) MarshalJSON() ([]byte, error) { 3576 type NoMethod MetricStructuredName 3577 raw := NoMethod(*s) 3578 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3579} 3580 3581// MetricUpdate: Describes the state of a metric. 3582type MetricUpdate struct { 3583 // Cumulative: True if this metric is reported as the total cumulative 3584 // aggregate 3585 // value accumulated since the worker started working on this 3586 // WorkItem. 3587 // By default this is false, indicating that this metric is reported 3588 // as a delta that is not associated with any WorkItem. 3589 Cumulative bool `json:"cumulative,omitempty"` 3590 3591 // Distribution: A struct value describing properties of a distribution 3592 // of numeric values. 3593 Distribution interface{} `json:"distribution,omitempty"` 3594 3595 // Gauge: A struct value describing properties of a Gauge. 3596 // Metrics of gauge type show the value of a metric across time, and 3597 // is 3598 // aggregated based on the newest value. 3599 Gauge interface{} `json:"gauge,omitempty"` 3600 3601 // Internal: Worker-computed aggregate value for internal use by the 3602 // Dataflow 3603 // service. 3604 Internal interface{} `json:"internal,omitempty"` 3605 3606 // Kind: Metric aggregation kind. The possible metric aggregation kinds 3607 // are 3608 // "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and 3609 // "Distribution". 3610 // The specified aggregation kind is case-insensitive. 3611 // 3612 // If omitted, this is not an aggregated value but instead 3613 // a single metric sample value. 3614 Kind string `json:"kind,omitempty"` 3615 3616 // MeanCount: Worker-computed aggregate value for the "Mean" aggregation 3617 // kind. 3618 // This holds the count of the aggregated values and is used in 3619 // combination 3620 // with mean_sum above to obtain the actual mean aggregate value. 3621 // The only possible value type is Long. 3622 MeanCount interface{} `json:"meanCount,omitempty"` 3623 3624 // MeanSum: Worker-computed aggregate value for the "Mean" aggregation 3625 // kind. 3626 // This holds the sum of the aggregated values and is used in 3627 // combination 3628 // with mean_count below to obtain the actual mean aggregate value. 3629 // The only possible value types are Long and Double. 3630 MeanSum interface{} `json:"meanSum,omitempty"` 3631 3632 // Name: Name of the metric. 3633 Name *MetricStructuredName `json:"name,omitempty"` 3634 3635 // Scalar: Worker-computed aggregate value for aggregation kinds "Sum", 3636 // "Max", "Min", 3637 // "And", and "Or". The possible value types are Long, Double, and 3638 // Boolean. 3639 Scalar interface{} `json:"scalar,omitempty"` 3640 3641 // Set: Worker-computed aggregate value for the "Set" aggregation kind. 3642 // The only 3643 // possible value type is a list of Values whose type can be Long, 3644 // Double, 3645 // or String, according to the metric's type. All Values in the list 3646 // must 3647 // be of the same type. 3648 Set interface{} `json:"set,omitempty"` 3649 3650 // UpdateTime: Timestamp associated with the metric value. Optional when 3651 // workers are 3652 // reporting work progress; it will be filled in responses from 3653 // the 3654 // metrics API. 3655 UpdateTime string `json:"updateTime,omitempty"` 3656 3657 // ForceSendFields is a list of field names (e.g. "Cumulative") 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. "Cumulative") 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 *MetricUpdate) MarshalJSON() ([]byte, error) { 3675 type NoMethod MetricUpdate 3676 raw := NoMethod(*s) 3677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3678} 3679 3680// MountedDataDisk: Describes mounted data disk. 3681type MountedDataDisk struct { 3682 // DataDisk: The name of the data disk. 3683 // This name is local to the Google Cloud Platform project and 3684 // uniquely 3685 // identifies the disk within that project, for 3686 // example 3687 // "myproject-1014-104817-4c2-harness-0-disk-1". 3688 DataDisk string `json:"dataDisk,omitempty"` 3689 3690 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3691 // unconditionally include in API requests. By default, fields with 3692 // empty values are omitted from API requests. However, any non-pointer, 3693 // non-interface field appearing in ForceSendFields will be sent to the 3694 // server regardless of whether the field is empty or not. This may be 3695 // used to include empty fields in Patch requests. 3696 ForceSendFields []string `json:"-"` 3697 3698 // NullFields is a list of field names (e.g. "DataDisk") to include in 3699 // API requests with the JSON null value. By default, fields with empty 3700 // values are omitted from API requests. However, any field with an 3701 // empty value appearing in NullFields will be sent to the server as 3702 // null. It is an error if a field in this list has a non-empty value. 3703 // This may be used to include null fields in Patch requests. 3704 NullFields []string `json:"-"` 3705} 3706 3707func (s *MountedDataDisk) MarshalJSON() ([]byte, error) { 3708 type NoMethod MountedDataDisk 3709 raw := NoMethod(*s) 3710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3711} 3712 3713// MultiOutputInfo: Information about an output of a multi-output DoFn. 3714type MultiOutputInfo struct { 3715 // Tag: The id of the tag the user code will emit to this output by; 3716 // this 3717 // should correspond to the tag of some SideInputInfo. 3718 Tag string `json:"tag,omitempty"` 3719 3720 // ForceSendFields is a list of field names (e.g. "Tag") to 3721 // unconditionally include in API requests. By default, fields with 3722 // empty values are omitted from API requests. However, any non-pointer, 3723 // non-interface field appearing in ForceSendFields will be sent to the 3724 // server regardless of whether the field is empty or not. This may be 3725 // used to include empty fields in Patch requests. 3726 ForceSendFields []string `json:"-"` 3727 3728 // NullFields is a list of field names (e.g. "Tag") to include in API 3729 // requests with the JSON null value. By default, fields with empty 3730 // values are omitted from API requests. However, any field with an 3731 // empty value appearing in NullFields will be sent to the server as 3732 // null. It is an error if a field in this list has a non-empty value. 3733 // This may be used to include null fields in Patch requests. 3734 NullFields []string `json:"-"` 3735} 3736 3737func (s *MultiOutputInfo) MarshalJSON() ([]byte, error) { 3738 type NoMethod MultiOutputInfo 3739 raw := NoMethod(*s) 3740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3741} 3742 3743// NameAndKind: Basic metadata about a counter. 3744type NameAndKind struct { 3745 // Kind: Counter aggregation kind. 3746 // 3747 // Possible values: 3748 // "INVALID" - Counter aggregation kind was not set. 3749 // "SUM" - Aggregated value is the sum of all contributed values. 3750 // "MAX" - Aggregated value is the max of all contributed values. 3751 // "MIN" - Aggregated value is the min of all contributed values. 3752 // "MEAN" - Aggregated value is the mean of all contributed values. 3753 // "OR" - Aggregated value represents the logical 'or' of all 3754 // contributed values. 3755 // "AND" - Aggregated value represents the logical 'and' of all 3756 // contributed values. 3757 // "SET" - Aggregated value is a set of unique contributed values. 3758 // "DISTRIBUTION" - Aggregated value captures statistics about a 3759 // distribution. 3760 // "LATEST_VALUE" - Aggregated value tracks the latest value of a 3761 // variable. 3762 Kind string `json:"kind,omitempty"` 3763 3764 // Name: Name of the counter. 3765 Name string `json:"name,omitempty"` 3766 3767 // ForceSendFields is a list of field names (e.g. "Kind") to 3768 // unconditionally include in API requests. By default, fields with 3769 // empty values are omitted from API requests. However, any non-pointer, 3770 // non-interface field appearing in ForceSendFields will be sent to the 3771 // server regardless of whether the field is empty or not. This may be 3772 // used to include empty fields in Patch requests. 3773 ForceSendFields []string `json:"-"` 3774 3775 // NullFields is a list of field names (e.g. "Kind") to include in API 3776 // requests with the JSON null value. By default, fields with empty 3777 // values are omitted from API requests. However, any field with an 3778 // empty value appearing in NullFields will be sent to the server as 3779 // null. It is an error if a field in this list has a non-empty value. 3780 // This may be used to include null fields in Patch requests. 3781 NullFields []string `json:"-"` 3782} 3783 3784func (s *NameAndKind) MarshalJSON() ([]byte, error) { 3785 type NoMethod NameAndKind 3786 raw := NoMethod(*s) 3787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3788} 3789 3790// Package: The packages that must be installed in order for a worker to 3791// run the 3792// steps of the Cloud Dataflow job that will be assigned to its 3793// worker 3794// pool. 3795// 3796// This is the mechanism by which the Cloud Dataflow SDK causes code 3797// to 3798// be loaded onto the workers. For example, the Cloud Dataflow Java 3799// SDK 3800// might use this to install jars containing the user's code and all of 3801// the 3802// various dependencies (libraries, data files, etc.) required in 3803// order 3804// for that code to run. 3805type Package struct { 3806 // Location: The resource to read the package from. The supported 3807 // resource type is: 3808 // 3809 // Google Cloud Storage: 3810 // 3811 // storage.googleapis.com/{bucket} 3812 // bucket.storage.googleapis.com/ 3813 Location string `json:"location,omitempty"` 3814 3815 // Name: The name of the package. 3816 Name string `json:"name,omitempty"` 3817 3818 // ForceSendFields is a list of field names (e.g. "Location") to 3819 // unconditionally include in API requests. By default, fields with 3820 // empty values are omitted from API requests. However, any non-pointer, 3821 // non-interface field appearing in ForceSendFields will be sent to the 3822 // server regardless of whether the field is empty or not. This may be 3823 // used to include empty fields in Patch requests. 3824 ForceSendFields []string `json:"-"` 3825 3826 // NullFields is a list of field names (e.g. "Location") to include in 3827 // API requests with the JSON null value. By default, fields with empty 3828 // values are omitted from API requests. However, any field with an 3829 // empty value appearing in NullFields will be sent to the server as 3830 // null. It is an error if a field in this list has a non-empty value. 3831 // This may be used to include null fields in Patch requests. 3832 NullFields []string `json:"-"` 3833} 3834 3835func (s *Package) MarshalJSON() ([]byte, error) { 3836 type NoMethod Package 3837 raw := NoMethod(*s) 3838 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3839} 3840 3841// ParDoInstruction: An instruction that does a ParDo operation. 3842// Takes one main input and zero or more side inputs, and produces 3843// zero or more outputs. 3844// Runs user code. 3845type ParDoInstruction struct { 3846 // Input: The input. 3847 Input *InstructionInput `json:"input,omitempty"` 3848 3849 // MultiOutputInfos: Information about each of the outputs, if user_fn 3850 // is a MultiDoFn. 3851 MultiOutputInfos []*MultiOutputInfo `json:"multiOutputInfos,omitempty"` 3852 3853 // NumOutputs: The number of outputs. 3854 NumOutputs int64 `json:"numOutputs,omitempty"` 3855 3856 // SideInputs: Zero or more side inputs. 3857 SideInputs []*SideInputInfo `json:"sideInputs,omitempty"` 3858 3859 // UserFn: The user function to invoke. 3860 UserFn googleapi.RawMessage `json:"userFn,omitempty"` 3861 3862 // ForceSendFields is a list of field names (e.g. "Input") to 3863 // unconditionally include in API requests. By default, fields with 3864 // empty values are omitted from API requests. However, any non-pointer, 3865 // non-interface field appearing in ForceSendFields will be sent to the 3866 // server regardless of whether the field is empty or not. This may be 3867 // used to include empty fields in Patch requests. 3868 ForceSendFields []string `json:"-"` 3869 3870 // NullFields is a list of field names (e.g. "Input") to include in API 3871 // requests with the JSON null value. By default, fields with empty 3872 // values are omitted from API requests. However, any field with an 3873 // empty value appearing in NullFields will be sent to the server as 3874 // null. It is an error if a field in this list has a non-empty value. 3875 // This may be used to include null fields in Patch requests. 3876 NullFields []string `json:"-"` 3877} 3878 3879func (s *ParDoInstruction) MarshalJSON() ([]byte, error) { 3880 type NoMethod ParDoInstruction 3881 raw := NoMethod(*s) 3882 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3883} 3884 3885// ParallelInstruction: Describes a particular operation comprising a 3886// MapTask. 3887type ParallelInstruction struct { 3888 // Flatten: Additional information for Flatten instructions. 3889 Flatten *FlattenInstruction `json:"flatten,omitempty"` 3890 3891 // Name: User-provided name of this operation. 3892 Name string `json:"name,omitempty"` 3893 3894 // OriginalName: System-defined name for the operation in the original 3895 // workflow graph. 3896 OriginalName string `json:"originalName,omitempty"` 3897 3898 // Outputs: Describes the outputs of the instruction. 3899 Outputs []*InstructionOutput `json:"outputs,omitempty"` 3900 3901 // ParDo: Additional information for ParDo instructions. 3902 ParDo *ParDoInstruction `json:"parDo,omitempty"` 3903 3904 // PartialGroupByKey: Additional information for PartialGroupByKey 3905 // instructions. 3906 PartialGroupByKey *PartialGroupByKeyInstruction `json:"partialGroupByKey,omitempty"` 3907 3908 // Read: Additional information for Read instructions. 3909 Read *ReadInstruction `json:"read,omitempty"` 3910 3911 // SystemName: System-defined name of this operation. 3912 // Unique across the workflow. 3913 SystemName string `json:"systemName,omitempty"` 3914 3915 // Write: Additional information for Write instructions. 3916 Write *WriteInstruction `json:"write,omitempty"` 3917 3918 // ForceSendFields is a list of field names (e.g. "Flatten") to 3919 // unconditionally include in API requests. By default, fields with 3920 // empty values are omitted from API requests. However, any non-pointer, 3921 // non-interface field appearing in ForceSendFields will be sent to the 3922 // server regardless of whether the field is empty or not. This may be 3923 // used to include empty fields in Patch requests. 3924 ForceSendFields []string `json:"-"` 3925 3926 // NullFields is a list of field names (e.g. "Flatten") to include in 3927 // API requests with the JSON null value. By default, fields with empty 3928 // values are omitted from API requests. However, any field with an 3929 // empty value appearing in NullFields will be sent to the server as 3930 // null. It is an error if a field in this list has a non-empty value. 3931 // This may be used to include null fields in Patch requests. 3932 NullFields []string `json:"-"` 3933} 3934 3935func (s *ParallelInstruction) MarshalJSON() ([]byte, error) { 3936 type NoMethod ParallelInstruction 3937 raw := NoMethod(*s) 3938 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3939} 3940 3941// Parameter: Structured data associated with this message. 3942type Parameter struct { 3943 // Key: Key or name for this parameter. 3944 Key string `json:"key,omitempty"` 3945 3946 // Value: Value for this parameter. 3947 Value interface{} `json:"value,omitempty"` 3948 3949 // ForceSendFields is a list of field names (e.g. "Key") to 3950 // unconditionally include in API requests. By default, fields with 3951 // empty values are omitted from API requests. However, any non-pointer, 3952 // non-interface field appearing in ForceSendFields will be sent to the 3953 // server regardless of whether the field is empty or not. This may be 3954 // used to include empty fields in Patch requests. 3955 ForceSendFields []string `json:"-"` 3956 3957 // NullFields is a list of field names (e.g. "Key") to include in API 3958 // requests with the JSON null value. By default, fields with empty 3959 // values are omitted from API requests. However, any field with an 3960 // empty value appearing in NullFields will be sent to the server as 3961 // null. It is an error if a field in this list has a non-empty value. 3962 // This may be used to include null fields in Patch requests. 3963 NullFields []string `json:"-"` 3964} 3965 3966func (s *Parameter) MarshalJSON() ([]byte, error) { 3967 type NoMethod Parameter 3968 raw := NoMethod(*s) 3969 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3970} 3971 3972// ParameterMetadata: Metadata for a specific parameter. 3973type ParameterMetadata struct { 3974 // HelpText: Required. The help text to display for the parameter. 3975 HelpText string `json:"helpText,omitempty"` 3976 3977 // IsOptional: Optional. Whether the parameter is optional. Defaults to 3978 // false. 3979 IsOptional bool `json:"isOptional,omitempty"` 3980 3981 // Label: Required. The label to display for the parameter. 3982 Label string `json:"label,omitempty"` 3983 3984 // Name: Required. The name of the parameter. 3985 Name string `json:"name,omitempty"` 3986 3987 // Regexes: Optional. Regexes that the parameter must match. 3988 Regexes []string `json:"regexes,omitempty"` 3989 3990 // ForceSendFields is a list of field names (e.g. "HelpText") to 3991 // unconditionally include in API requests. By default, fields with 3992 // empty values are omitted from API requests. However, any non-pointer, 3993 // non-interface field appearing in ForceSendFields will be sent to the 3994 // server regardless of whether the field is empty or not. This may be 3995 // used to include empty fields in Patch requests. 3996 ForceSendFields []string `json:"-"` 3997 3998 // NullFields is a list of field names (e.g. "HelpText") to include in 3999 // API requests with the JSON null value. By default, fields with empty 4000 // values are omitted from API requests. However, any field with an 4001 // empty value appearing in NullFields will be sent to the server as 4002 // null. It is an error if a field in this list has a non-empty value. 4003 // This may be used to include null fields in Patch requests. 4004 NullFields []string `json:"-"` 4005} 4006 4007func (s *ParameterMetadata) MarshalJSON() ([]byte, error) { 4008 type NoMethod ParameterMetadata 4009 raw := NoMethod(*s) 4010 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4011} 4012 4013// PartialGroupByKeyInstruction: An instruction that does a partial 4014// group-by-key. 4015// One input and one output. 4016type PartialGroupByKeyInstruction struct { 4017 // Input: Describes the input to the partial group-by-key instruction. 4018 Input *InstructionInput `json:"input,omitempty"` 4019 4020 // InputElementCodec: The codec to use for interpreting an element in 4021 // the input PTable. 4022 InputElementCodec googleapi.RawMessage `json:"inputElementCodec,omitempty"` 4023 4024 // OriginalCombineValuesInputStoreName: If this instruction includes a 4025 // combining function this is the name of the 4026 // intermediate store between the GBK and the CombineValues. 4027 OriginalCombineValuesInputStoreName string `json:"originalCombineValuesInputStoreName,omitempty"` 4028 4029 // OriginalCombineValuesStepName: If this instruction includes a 4030 // combining function, this is the name of the 4031 // CombineValues instruction lifted into this instruction. 4032 OriginalCombineValuesStepName string `json:"originalCombineValuesStepName,omitempty"` 4033 4034 // SideInputs: Zero or more side inputs. 4035 SideInputs []*SideInputInfo `json:"sideInputs,omitempty"` 4036 4037 // ValueCombiningFn: The value combining function to invoke. 4038 ValueCombiningFn googleapi.RawMessage `json:"valueCombiningFn,omitempty"` 4039 4040 // ForceSendFields is a list of field names (e.g. "Input") to 4041 // unconditionally include in API requests. By default, fields with 4042 // empty values are omitted from API requests. However, any non-pointer, 4043 // non-interface field appearing in ForceSendFields will be sent to the 4044 // server regardless of whether the field is empty or not. This may be 4045 // used to include empty fields in Patch requests. 4046 ForceSendFields []string `json:"-"` 4047 4048 // NullFields is a list of field names (e.g. "Input") to include in API 4049 // requests with the JSON null value. By default, fields with empty 4050 // values are omitted from API requests. However, any field with an 4051 // empty value appearing in NullFields will be sent to the server as 4052 // null. It is an error if a field in this list has a non-empty value. 4053 // This may be used to include null fields in Patch requests. 4054 NullFields []string `json:"-"` 4055} 4056 4057func (s *PartialGroupByKeyInstruction) MarshalJSON() ([]byte, error) { 4058 type NoMethod PartialGroupByKeyInstruction 4059 raw := NoMethod(*s) 4060 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4061} 4062 4063// PipelineDescription: A descriptive representation of submitted 4064// pipeline as well as the executed 4065// form. This data is provided by the Dataflow service for ease of 4066// visualizing 4067// the pipeline and interpreting Dataflow provided metrics. 4068type PipelineDescription struct { 4069 // DisplayData: Pipeline level display data. 4070 DisplayData []*DisplayData `json:"displayData,omitempty"` 4071 4072 // ExecutionPipelineStage: Description of each stage of execution of the 4073 // pipeline. 4074 ExecutionPipelineStage []*ExecutionStageSummary `json:"executionPipelineStage,omitempty"` 4075 4076 // OriginalPipelineTransform: Description of each transform in the 4077 // pipeline and collections between them. 4078 OriginalPipelineTransform []*TransformSummary `json:"originalPipelineTransform,omitempty"` 4079 4080 // ForceSendFields is a list of field names (e.g. "DisplayData") to 4081 // unconditionally include in API requests. By default, fields with 4082 // empty values are omitted from API requests. However, any non-pointer, 4083 // non-interface field appearing in ForceSendFields will be sent to the 4084 // server regardless of whether the field is empty or not. This may be 4085 // used to include empty fields in Patch requests. 4086 ForceSendFields []string `json:"-"` 4087 4088 // NullFields is a list of field names (e.g. "DisplayData") to include 4089 // in API requests with the JSON null value. By default, fields with 4090 // empty values are omitted from API requests. However, any field with 4091 // an empty value appearing in NullFields will be sent to the server as 4092 // null. It is an error if a field in this list has a non-empty value. 4093 // This may be used to include null fields in Patch requests. 4094 NullFields []string `json:"-"` 4095} 4096 4097func (s *PipelineDescription) MarshalJSON() ([]byte, error) { 4098 type NoMethod PipelineDescription 4099 raw := NoMethod(*s) 4100 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4101} 4102 4103// Position: Position defines a position within a collection of data. 4104// The value 4105// can be either the end position, a key (used with 4106// ordered 4107// collections), a byte offset, or a record index. 4108type Position struct { 4109 // ByteOffset: Position is a byte offset. 4110 ByteOffset int64 `json:"byteOffset,omitempty,string"` 4111 4112 // ConcatPosition: CloudPosition is a concat position. 4113 ConcatPosition *ConcatPosition `json:"concatPosition,omitempty"` 4114 4115 // End: Position is past all other positions. Also useful for the 4116 // end 4117 // position of an unbounded range. 4118 End bool `json:"end,omitempty"` 4119 4120 // Key: Position is a string key, ordered lexicographically. 4121 Key string `json:"key,omitempty"` 4122 4123 // RecordIndex: Position is a record index. 4124 RecordIndex int64 `json:"recordIndex,omitempty,string"` 4125 4126 // ShufflePosition: CloudPosition is a base64 encoded 4127 // BatchShufflePosition (with FIXED 4128 // sharding). 4129 ShufflePosition string `json:"shufflePosition,omitempty"` 4130 4131 // ForceSendFields is a list of field names (e.g. "ByteOffset") to 4132 // unconditionally include in API requests. By default, fields with 4133 // empty values are omitted from API requests. However, any non-pointer, 4134 // non-interface field appearing in ForceSendFields will be sent to the 4135 // server regardless of whether the field is empty or not. This may be 4136 // used to include empty fields in Patch requests. 4137 ForceSendFields []string `json:"-"` 4138 4139 // NullFields is a list of field names (e.g. "ByteOffset") to include in 4140 // API requests with the JSON null value. By default, fields with empty 4141 // values are omitted from API requests. However, any field with an 4142 // empty value appearing in NullFields will be sent to the server as 4143 // null. It is an error if a field in this list has a non-empty value. 4144 // This may be used to include null fields in Patch requests. 4145 NullFields []string `json:"-"` 4146} 4147 4148func (s *Position) MarshalJSON() ([]byte, error) { 4149 type NoMethod Position 4150 raw := NoMethod(*s) 4151 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4152} 4153 4154// PubSubIODetails: Metadata for a PubSub connector used by the job. 4155type PubSubIODetails struct { 4156 // Subscription: Subscription used in the connection. 4157 Subscription string `json:"subscription,omitempty"` 4158 4159 // Topic: Topic accessed in the connection. 4160 Topic string `json:"topic,omitempty"` 4161 4162 // ForceSendFields is a list of field names (e.g. "Subscription") to 4163 // unconditionally include in API requests. By default, fields with 4164 // empty values are omitted from API requests. However, any non-pointer, 4165 // non-interface field appearing in ForceSendFields will be sent to the 4166 // server regardless of whether the field is empty or not. This may be 4167 // used to include empty fields in Patch requests. 4168 ForceSendFields []string `json:"-"` 4169 4170 // NullFields is a list of field names (e.g. "Subscription") to include 4171 // in API requests with the JSON null value. By default, fields with 4172 // empty values are omitted from API requests. However, any field with 4173 // an empty value appearing in NullFields will be sent to the server as 4174 // null. It is an error if a field in this list has a non-empty value. 4175 // This may be used to include null fields in Patch requests. 4176 NullFields []string `json:"-"` 4177} 4178 4179func (s *PubSubIODetails) MarshalJSON() ([]byte, error) { 4180 type NoMethod PubSubIODetails 4181 raw := NoMethod(*s) 4182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4183} 4184 4185// PubsubLocation: Identifies a pubsub location to use for transferring 4186// data into or 4187// out of a streaming Dataflow job. 4188type PubsubLocation struct { 4189 // DropLateData: Indicates whether the pipeline allows late-arriving 4190 // data. 4191 DropLateData bool `json:"dropLateData,omitempty"` 4192 4193 // IdLabel: If set, contains a pubsub label from which to extract record 4194 // ids. 4195 // If left empty, record deduplication will be strictly best effort. 4196 IdLabel string `json:"idLabel,omitempty"` 4197 4198 // Subscription: A pubsub subscription, in the form 4199 // of 4200 // "pubsub.googleapis.com/subscriptions/<project-id>/<subscription-nam 4201 // e>" 4202 Subscription string `json:"subscription,omitempty"` 4203 4204 // TimestampLabel: If set, contains a pubsub label from which to extract 4205 // record timestamps. 4206 // If left empty, record timestamps will be generated upon arrival. 4207 TimestampLabel string `json:"timestampLabel,omitempty"` 4208 4209 // Topic: A pubsub topic, in the form 4210 // of 4211 // "pubsub.googleapis.com/topics/<project-id>/<topic-name>" 4212 Topic string `json:"topic,omitempty"` 4213 4214 // TrackingSubscription: If set, specifies the pubsub subscription that 4215 // will be used for tracking 4216 // custom time timestamps for watermark estimation. 4217 TrackingSubscription string `json:"trackingSubscription,omitempty"` 4218 4219 // WithAttributes: If true, then the client has requested to get pubsub 4220 // attributes. 4221 WithAttributes bool `json:"withAttributes,omitempty"` 4222 4223 // ForceSendFields is a list of field names (e.g. "DropLateData") to 4224 // unconditionally include in API requests. By default, fields with 4225 // empty values are omitted from API requests. However, any non-pointer, 4226 // non-interface field appearing in ForceSendFields will be sent to the 4227 // server regardless of whether the field is empty or not. This may be 4228 // used to include empty fields in Patch requests. 4229 ForceSendFields []string `json:"-"` 4230 4231 // NullFields is a list of field names (e.g. "DropLateData") to include 4232 // in API requests with the JSON null value. By default, fields with 4233 // empty values are omitted from API requests. However, any field with 4234 // an empty value appearing in NullFields will be sent to the server as 4235 // null. It is an error if a field in this list has a non-empty value. 4236 // This may be used to include null fields in Patch requests. 4237 NullFields []string `json:"-"` 4238} 4239 4240func (s *PubsubLocation) MarshalJSON() ([]byte, error) { 4241 type NoMethod PubsubLocation 4242 raw := NoMethod(*s) 4243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4244} 4245 4246// ReadInstruction: An instruction that reads records. 4247// Takes no inputs, produces one output. 4248type ReadInstruction struct { 4249 // Source: The source to read from. 4250 Source *Source `json:"source,omitempty"` 4251 4252 // ForceSendFields is a list of field names (e.g. "Source") to 4253 // unconditionally include in API requests. By default, fields with 4254 // empty values are omitted from API requests. However, any non-pointer, 4255 // non-interface field appearing in ForceSendFields will be sent to the 4256 // server regardless of whether the field is empty or not. This may be 4257 // used to include empty fields in Patch requests. 4258 ForceSendFields []string `json:"-"` 4259 4260 // NullFields is a list of field names (e.g. "Source") to include in API 4261 // requests with the JSON null value. By default, fields with empty 4262 // values are omitted from API requests. However, any field with an 4263 // empty value appearing in NullFields will be sent to the server as 4264 // null. It is an error if a field in this list has a non-empty value. 4265 // This may be used to include null fields in Patch requests. 4266 NullFields []string `json:"-"` 4267} 4268 4269func (s *ReadInstruction) MarshalJSON() ([]byte, error) { 4270 type NoMethod ReadInstruction 4271 raw := NoMethod(*s) 4272 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4273} 4274 4275// ReportWorkItemStatusRequest: Request to report the status of 4276// WorkItems. 4277type ReportWorkItemStatusRequest struct { 4278 // CurrentWorkerTime: The current timestamp at the worker. 4279 CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` 4280 4281 // Location: The [regional 4282 // endpoint] 4283 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 4284 // dpoints) that 4285 // contains the WorkItem's job. 4286 Location string `json:"location,omitempty"` 4287 4288 // UnifiedWorkerRequest: Untranslated bag-of-bytes 4289 // WorkProgressUpdateRequest from UnifiedWorker. 4290 UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` 4291 4292 // WorkItemStatuses: The order is unimportant, except that the order of 4293 // the 4294 // WorkItemServiceState messages in the 4295 // ReportWorkItemStatusResponse 4296 // corresponds to the order of WorkItemStatus messages here. 4297 WorkItemStatuses []*WorkItemStatus `json:"workItemStatuses,omitempty"` 4298 4299 // WorkerId: The ID of the worker reporting the WorkItem status. If 4300 // this 4301 // does not match the ID of the worker which the Dataflow 4302 // service 4303 // believes currently has the lease on the WorkItem, the report 4304 // will be dropped (with an error response). 4305 WorkerId string `json:"workerId,omitempty"` 4306 4307 // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime") 4308 // to unconditionally include in API requests. By default, fields with 4309 // empty values are omitted from API requests. However, any non-pointer, 4310 // non-interface field appearing in ForceSendFields will be sent to the 4311 // server regardless of whether the field is empty or not. This may be 4312 // used to include empty fields in Patch requests. 4313 ForceSendFields []string `json:"-"` 4314 4315 // NullFields is a list of field names (e.g. "CurrentWorkerTime") to 4316 // include in API requests with the JSON null value. By default, fields 4317 // with empty values are omitted from API requests. However, any field 4318 // with an empty value appearing in NullFields will be sent to the 4319 // server as null. It is an error if a field in this list has a 4320 // non-empty value. This may be used to include null fields in Patch 4321 // requests. 4322 NullFields []string `json:"-"` 4323} 4324 4325func (s *ReportWorkItemStatusRequest) MarshalJSON() ([]byte, error) { 4326 type NoMethod ReportWorkItemStatusRequest 4327 raw := NoMethod(*s) 4328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4329} 4330 4331// ReportWorkItemStatusResponse: Response from a request to report the 4332// status of WorkItems. 4333type ReportWorkItemStatusResponse struct { 4334 // UnifiedWorkerResponse: Untranslated bag-of-bytes 4335 // WorkProgressUpdateResponse for UnifiedWorker. 4336 UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` 4337 4338 // WorkItemServiceStates: A set of messages indicating the service-side 4339 // state for each 4340 // WorkItem whose status was reported, in the same order as 4341 // the 4342 // WorkItemStatus messages in the ReportWorkItemStatusRequest 4343 // which 4344 // resulting in this response. 4345 WorkItemServiceStates []*WorkItemServiceState `json:"workItemServiceStates,omitempty"` 4346 4347 // ServerResponse contains the HTTP response code and headers from the 4348 // server. 4349 googleapi.ServerResponse `json:"-"` 4350 4351 // ForceSendFields is a list of field names (e.g. 4352 // "UnifiedWorkerResponse") to unconditionally include in API requests. 4353 // By default, fields with empty values are omitted from API requests. 4354 // However, any non-pointer, non-interface field appearing in 4355 // ForceSendFields will be sent to the server regardless of whether the 4356 // field is empty or not. This may be used to include empty fields in 4357 // Patch requests. 4358 ForceSendFields []string `json:"-"` 4359 4360 // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to 4361 // include in API requests with the JSON null value. By default, fields 4362 // with empty values are omitted from API requests. However, any field 4363 // with an empty value appearing in NullFields will be sent to the 4364 // server as null. It is an error if a field in this list has a 4365 // non-empty value. This may be used to include null fields in Patch 4366 // requests. 4367 NullFields []string `json:"-"` 4368} 4369 4370func (s *ReportWorkItemStatusResponse) MarshalJSON() ([]byte, error) { 4371 type NoMethod ReportWorkItemStatusResponse 4372 raw := NoMethod(*s) 4373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4374} 4375 4376// ReportedParallelism: Represents the level of parallelism in a 4377// WorkItem's input, 4378// reported by the worker. 4379type ReportedParallelism struct { 4380 // IsInfinite: Specifies whether the parallelism is infinite. If true, 4381 // "value" is 4382 // ignored. 4383 // Infinite parallelism means the service will assume that the work 4384 // item 4385 // can always be split into more non-empty work items by dynamic 4386 // splitting. 4387 // This is a work-around for lack of support for infinity by the 4388 // current 4389 // JSON-based Java RPC stack. 4390 IsInfinite bool `json:"isInfinite,omitempty"` 4391 4392 // Value: Specifies the level of parallelism in case it is finite. 4393 Value float64 `json:"value,omitempty"` 4394 4395 // ForceSendFields is a list of field names (e.g. "IsInfinite") to 4396 // unconditionally include in API requests. By default, fields with 4397 // empty values are omitted from API requests. However, any non-pointer, 4398 // non-interface field appearing in ForceSendFields will be sent to the 4399 // server regardless of whether the field is empty or not. This may be 4400 // used to include empty fields in Patch requests. 4401 ForceSendFields []string `json:"-"` 4402 4403 // NullFields is a list of field names (e.g. "IsInfinite") to include in 4404 // API requests with the JSON null value. By default, fields with empty 4405 // values are omitted from API requests. However, any field with an 4406 // empty value appearing in NullFields will be sent to the server as 4407 // null. It is an error if a field in this list has a non-empty value. 4408 // This may be used to include null fields in Patch requests. 4409 NullFields []string `json:"-"` 4410} 4411 4412func (s *ReportedParallelism) MarshalJSON() ([]byte, error) { 4413 type NoMethod ReportedParallelism 4414 raw := NoMethod(*s) 4415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4416} 4417 4418func (s *ReportedParallelism) UnmarshalJSON(data []byte) error { 4419 type NoMethod ReportedParallelism 4420 var s1 struct { 4421 Value gensupport.JSONFloat64 `json:"value"` 4422 *NoMethod 4423 } 4424 s1.NoMethod = (*NoMethod)(s) 4425 if err := json.Unmarshal(data, &s1); err != nil { 4426 return err 4427 } 4428 s.Value = float64(s1.Value) 4429 return nil 4430} 4431 4432// ResourceUtilizationReport: Worker metrics exported from workers. This 4433// contains resource utilization 4434// metrics accumulated from a variety of sources. For more information, 4435// see 4436// go/df-resource-signals. 4437type ResourceUtilizationReport struct { 4438 // CpuTime: CPU utilization samples. 4439 CpuTime []*CPUTime `json:"cpuTime,omitempty"` 4440 4441 // ForceSendFields is a list of field names (e.g. "CpuTime") to 4442 // unconditionally include in API requests. By default, fields with 4443 // empty values are omitted from API requests. However, any non-pointer, 4444 // non-interface field appearing in ForceSendFields will be sent to the 4445 // server regardless of whether the field is empty or not. This may be 4446 // used to include empty fields in Patch requests. 4447 ForceSendFields []string `json:"-"` 4448 4449 // NullFields is a list of field names (e.g. "CpuTime") to include in 4450 // API requests with the JSON null value. By default, fields with empty 4451 // values are omitted from API requests. However, any field with an 4452 // empty value appearing in NullFields will be sent to the server as 4453 // null. It is an error if a field in this list has a non-empty value. 4454 // This may be used to include null fields in Patch requests. 4455 NullFields []string `json:"-"` 4456} 4457 4458func (s *ResourceUtilizationReport) MarshalJSON() ([]byte, error) { 4459 type NoMethod ResourceUtilizationReport 4460 raw := NoMethod(*s) 4461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4462} 4463 4464// ResourceUtilizationReportResponse: Service-side response to 4465// WorkerMessage reporting resource utilization. 4466type ResourceUtilizationReportResponse struct { 4467} 4468 4469// RuntimeEnvironment: The environment values to set at runtime. 4470type RuntimeEnvironment struct { 4471 // AdditionalExperiments: Additional experiment flags for the job. 4472 AdditionalExperiments []string `json:"additionalExperiments,omitempty"` 4473 4474 // AdditionalUserLabels: Additional user labels to be specified for the 4475 // job. 4476 // Keys and values should follow the restrictions specified in the 4477 // [labeling 4478 // restrictions](https://cloud.google.com/compute/docs/labeling 4479 // -resources#restrictions) 4480 // page. 4481 AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"` 4482 4483 // BypassTempDirValidation: Whether to bypass the safety checks for the 4484 // job's temporary directory. 4485 // Use with caution. 4486 BypassTempDirValidation bool `json:"bypassTempDirValidation,omitempty"` 4487 4488 // KmsKeyName: Optional. Name for the Cloud KMS key for the job. 4489 // Key format 4490 // is: 4491 // projects/<project>/locations/<location>/keyRings/<keyring>/cryptoK 4492 // eys/<key> 4493 KmsKeyName string `json:"kmsKeyName,omitempty"` 4494 4495 // MachineType: The machine type to use for the job. Defaults to the 4496 // value from the 4497 // template if not specified. 4498 MachineType string `json:"machineType,omitempty"` 4499 4500 // MaxWorkers: The maximum number of Google Compute Engine instances to 4501 // be made 4502 // available to your pipeline during execution, from 1 to 1000. 4503 MaxWorkers int64 `json:"maxWorkers,omitempty"` 4504 4505 // Network: Network to which VMs will be assigned. If empty or 4506 // unspecified, 4507 // the service will use the network "default". 4508 Network string `json:"network,omitempty"` 4509 4510 // NumWorkers: The initial number of Google Compute Engine instnaces for 4511 // the job. 4512 NumWorkers int64 `json:"numWorkers,omitempty"` 4513 4514 // ServiceAccountEmail: The email address of the service account to run 4515 // the job as. 4516 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 4517 4518 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. 4519 // Expected to be of 4520 // the form "regions/REGION/subnetworks/SUBNETWORK". 4521 Subnetwork string `json:"subnetwork,omitempty"` 4522 4523 // TempLocation: The Cloud Storage path to use for temporary files. 4524 // Must be a valid Cloud Storage URL, beginning with `gs://`. 4525 TempLocation string `json:"tempLocation,omitempty"` 4526 4527 // UsePrivateIps: Optional. Specifies whether worker pools should be 4528 // started with private IP addresses. 4529 // False by default. 4530 UsePrivateIps bool `json:"usePrivateIps,omitempty"` 4531 4532 // WorkerRegion: The Compute Engine 4533 // region 4534 // (https://cloud.google.com/compute/docs/regions-zones/regions-zo 4535 // nes) in 4536 // which worker processing should occur, e.g. "us-west1". Mutually 4537 // exclusive 4538 // with worker_zone. If neither worker_region nor worker_zone is 4539 // specified, 4540 // default to the control plane's region. 4541 WorkerRegion string `json:"workerRegion,omitempty"` 4542 4543 // WorkerZone: The Compute Engine 4544 // zone 4545 // (https://cloud.google.com/compute/docs/regions-zones/regions-zone 4546 // s) in 4547 // which worker processing should occur, e.g. "us-west1-a". Mutually 4548 // exclusive 4549 // with worker_region. If neither worker_region nor worker_zone is 4550 // specified, 4551 // a zone in the control plane's region is chosen based on available 4552 // capacity. 4553 // If both `worker_zone` and `zone` are set, `worker_zone` takes 4554 // precedence. 4555 WorkerZone string `json:"workerZone,omitempty"` 4556 4557 // Zone: The Compute Engine 4558 // [availability 4559 // zone](https://cloud.google.com/compute/docs/regions-zone 4560 // s/regions-zones) 4561 // for launching worker instances to run your pipeline. 4562 // In the future, worker_zone will take precedence. 4563 Zone string `json:"zone,omitempty"` 4564 4565 // ForceSendFields is a list of field names (e.g. 4566 // "AdditionalExperiments") to unconditionally include in API requests. 4567 // By default, fields with empty values are omitted from API requests. 4568 // However, any non-pointer, non-interface field appearing in 4569 // ForceSendFields will be sent to the server regardless of whether the 4570 // field is empty or not. This may be used to include empty fields in 4571 // Patch requests. 4572 ForceSendFields []string `json:"-"` 4573 4574 // NullFields is a list of field names (e.g. "AdditionalExperiments") to 4575 // include in API requests with the JSON null value. By default, fields 4576 // with empty values are omitted from API requests. However, any field 4577 // with an empty value appearing in NullFields will be sent to the 4578 // server as null. It is an error if a field in this list has a 4579 // non-empty value. This may be used to include null fields in Patch 4580 // requests. 4581 NullFields []string `json:"-"` 4582} 4583 4584func (s *RuntimeEnvironment) MarshalJSON() ([]byte, error) { 4585 type NoMethod RuntimeEnvironment 4586 raw := NoMethod(*s) 4587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4588} 4589 4590// SdkVersion: The version of the SDK used to run the job. 4591type SdkVersion struct { 4592 // SdkSupportStatus: The support status for this SDK version. 4593 // 4594 // Possible values: 4595 // "UNKNOWN" - Cloud Dataflow is unaware of this version. 4596 // "SUPPORTED" - This is a known version of an SDK, and is supported. 4597 // "STALE" - A newer version of the SDK family exists, and an update 4598 // is recommended. 4599 // "DEPRECATED" - This version of the SDK is deprecated and will 4600 // eventually be no 4601 // longer supported. 4602 // "UNSUPPORTED" - Support for this SDK version has ended and it 4603 // should no longer be used. 4604 SdkSupportStatus string `json:"sdkSupportStatus,omitempty"` 4605 4606 // Version: The version of the SDK used to run the job. 4607 Version string `json:"version,omitempty"` 4608 4609 // VersionDisplayName: A readable string describing the version of the 4610 // SDK. 4611 VersionDisplayName string `json:"versionDisplayName,omitempty"` 4612 4613 // ForceSendFields is a list of field names (e.g. "SdkSupportStatus") to 4614 // unconditionally include in API requests. By default, fields with 4615 // empty values are omitted from API requests. However, any non-pointer, 4616 // non-interface field appearing in ForceSendFields will be sent to the 4617 // server regardless of whether the field is empty or not. This may be 4618 // used to include empty fields in Patch requests. 4619 ForceSendFields []string `json:"-"` 4620 4621 // NullFields is a list of field names (e.g. "SdkSupportStatus") to 4622 // include in API requests with the JSON null value. By default, fields 4623 // with empty values are omitted from API requests. However, any field 4624 // with an empty value appearing in NullFields will be sent to the 4625 // server as null. It is an error if a field in this list has a 4626 // non-empty value. This may be used to include null fields in Patch 4627 // requests. 4628 NullFields []string `json:"-"` 4629} 4630 4631func (s *SdkVersion) MarshalJSON() ([]byte, error) { 4632 type NoMethod SdkVersion 4633 raw := NoMethod(*s) 4634 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4635} 4636 4637// SendDebugCaptureRequest: Request to send encoded debug information. 4638type SendDebugCaptureRequest struct { 4639 // ComponentId: The internal component id for which debug information is 4640 // sent. 4641 ComponentId string `json:"componentId,omitempty"` 4642 4643 // Data: The encoded debug information. 4644 Data string `json:"data,omitempty"` 4645 4646 // Location: The [regional 4647 // endpoint] 4648 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 4649 // dpoints) that 4650 // contains the job specified by job_id. 4651 Location string `json:"location,omitempty"` 4652 4653 // WorkerId: The worker id, i.e., VM hostname. 4654 WorkerId string `json:"workerId,omitempty"` 4655 4656 // ForceSendFields is a list of field names (e.g. "ComponentId") to 4657 // unconditionally include in API requests. By default, fields with 4658 // empty values are omitted from API requests. However, any non-pointer, 4659 // non-interface field appearing in ForceSendFields will be sent to the 4660 // server regardless of whether the field is empty or not. This may be 4661 // used to include empty fields in Patch requests. 4662 ForceSendFields []string `json:"-"` 4663 4664 // NullFields is a list of field names (e.g. "ComponentId") to include 4665 // in API requests with the JSON null value. By default, fields with 4666 // empty values are omitted from API requests. However, any field with 4667 // an empty value appearing in NullFields will be sent to the server as 4668 // null. It is an error if a field in this list has a non-empty value. 4669 // This may be used to include null fields in Patch requests. 4670 NullFields []string `json:"-"` 4671} 4672 4673func (s *SendDebugCaptureRequest) MarshalJSON() ([]byte, error) { 4674 type NoMethod SendDebugCaptureRequest 4675 raw := NoMethod(*s) 4676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4677} 4678 4679// SendDebugCaptureResponse: Response to a send capture request. 4680// nothing 4681type SendDebugCaptureResponse struct { 4682 // ServerResponse contains the HTTP response code and headers from the 4683 // server. 4684 googleapi.ServerResponse `json:"-"` 4685} 4686 4687// SendWorkerMessagesRequest: A request for sending worker messages to 4688// the service. 4689type SendWorkerMessagesRequest struct { 4690 // Location: The [regional 4691 // endpoint] 4692 // (https://cloud.google.com/dataflow/docs/concepts/regional-en 4693 // dpoints) that 4694 // contains the job. 4695 Location string `json:"location,omitempty"` 4696 4697 // WorkerMessages: The WorkerMessages to send. 4698 WorkerMessages []*WorkerMessage `json:"workerMessages,omitempty"` 4699 4700 // ForceSendFields is a list of field names (e.g. "Location") to 4701 // unconditionally include in API requests. By default, fields with 4702 // empty values are omitted from API requests. However, any non-pointer, 4703 // non-interface field appearing in ForceSendFields will be sent to the 4704 // server regardless of whether the field is empty or not. This may be 4705 // used to include empty fields in Patch requests. 4706 ForceSendFields []string `json:"-"` 4707 4708 // NullFields is a list of field names (e.g. "Location") to include in 4709 // API requests with the JSON null value. By default, fields with empty 4710 // values are omitted from API requests. However, any field with an 4711 // empty value appearing in NullFields will be sent to the server as 4712 // null. It is an error if a field in this list has a non-empty value. 4713 // This may be used to include null fields in Patch requests. 4714 NullFields []string `json:"-"` 4715} 4716 4717func (s *SendWorkerMessagesRequest) MarshalJSON() ([]byte, error) { 4718 type NoMethod SendWorkerMessagesRequest 4719 raw := NoMethod(*s) 4720 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4721} 4722 4723// SendWorkerMessagesResponse: The response to the worker messages. 4724type SendWorkerMessagesResponse struct { 4725 // WorkerMessageResponses: The servers response to the worker messages. 4726 WorkerMessageResponses []*WorkerMessageResponse `json:"workerMessageResponses,omitempty"` 4727 4728 // ServerResponse contains the HTTP response code and headers from the 4729 // server. 4730 googleapi.ServerResponse `json:"-"` 4731 4732 // ForceSendFields is a list of field names (e.g. 4733 // "WorkerMessageResponses") to unconditionally include in API requests. 4734 // By default, fields with empty values are omitted from API requests. 4735 // However, any non-pointer, non-interface field appearing in 4736 // ForceSendFields will be sent to the server regardless of whether the 4737 // field is empty or not. This may be used to include empty fields in 4738 // Patch requests. 4739 ForceSendFields []string `json:"-"` 4740 4741 // NullFields is a list of field names (e.g. "WorkerMessageResponses") 4742 // to include in API requests with the JSON null value. By default, 4743 // fields with empty values are omitted from API requests. However, any 4744 // field with an empty value appearing in NullFields will be sent to the 4745 // server as null. It is an error if a field in this list has a 4746 // non-empty value. This may be used to include null fields in Patch 4747 // requests. 4748 NullFields []string `json:"-"` 4749} 4750 4751func (s *SendWorkerMessagesResponse) MarshalJSON() ([]byte, error) { 4752 type NoMethod SendWorkerMessagesResponse 4753 raw := NoMethod(*s) 4754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4755} 4756 4757// SeqMapTask: Describes a particular function to invoke. 4758type SeqMapTask struct { 4759 // Inputs: Information about each of the inputs. 4760 Inputs []*SideInputInfo `json:"inputs,omitempty"` 4761 4762 // Name: The user-provided name of the SeqDo operation. 4763 Name string `json:"name,omitempty"` 4764 4765 // OutputInfos: Information about each of the outputs. 4766 OutputInfos []*SeqMapTaskOutputInfo `json:"outputInfos,omitempty"` 4767 4768 // StageName: System-defined name of the stage containing the SeqDo 4769 // operation. 4770 // Unique across the workflow. 4771 StageName string `json:"stageName,omitempty"` 4772 4773 // SystemName: System-defined name of the SeqDo operation. 4774 // Unique across the workflow. 4775 SystemName string `json:"systemName,omitempty"` 4776 4777 // UserFn: The user function to invoke. 4778 UserFn googleapi.RawMessage `json:"userFn,omitempty"` 4779 4780 // ForceSendFields is a list of field names (e.g. "Inputs") to 4781 // unconditionally include in API requests. By default, fields with 4782 // empty values are omitted from API requests. However, any non-pointer, 4783 // non-interface field appearing in ForceSendFields will be sent to the 4784 // server regardless of whether the field is empty or not. This may be 4785 // used to include empty fields in Patch requests. 4786 ForceSendFields []string `json:"-"` 4787 4788 // NullFields is a list of field names (e.g. "Inputs") to include in API 4789 // requests with the JSON null value. By default, fields with empty 4790 // values are omitted from API requests. However, any field with an 4791 // empty value appearing in NullFields will be sent to the server as 4792 // null. It is an error if a field in this list has a non-empty value. 4793 // This may be used to include null fields in Patch requests. 4794 NullFields []string `json:"-"` 4795} 4796 4797func (s *SeqMapTask) MarshalJSON() ([]byte, error) { 4798 type NoMethod SeqMapTask 4799 raw := NoMethod(*s) 4800 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4801} 4802 4803// SeqMapTaskOutputInfo: Information about an output of a SeqMapTask. 4804type SeqMapTaskOutputInfo struct { 4805 // Sink: The sink to write the output value to. 4806 Sink *Sink `json:"sink,omitempty"` 4807 4808 // Tag: The id of the TupleTag the user code will tag the output value 4809 // by. 4810 Tag string `json:"tag,omitempty"` 4811 4812 // ForceSendFields is a list of field names (e.g. "Sink") to 4813 // unconditionally include in API requests. By default, fields with 4814 // empty values are omitted from API requests. However, any non-pointer, 4815 // non-interface field appearing in ForceSendFields will be sent to the 4816 // server regardless of whether the field is empty or not. This may be 4817 // used to include empty fields in Patch requests. 4818 ForceSendFields []string `json:"-"` 4819 4820 // NullFields is a list of field names (e.g. "Sink") to include in API 4821 // requests with the JSON null value. By default, fields with empty 4822 // values are omitted from API requests. However, any field with an 4823 // empty value appearing in NullFields will be sent to the server as 4824 // null. It is an error if a field in this list has a non-empty value. 4825 // This may be used to include null fields in Patch requests. 4826 NullFields []string `json:"-"` 4827} 4828 4829func (s *SeqMapTaskOutputInfo) MarshalJSON() ([]byte, error) { 4830 type NoMethod SeqMapTaskOutputInfo 4831 raw := NoMethod(*s) 4832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4833} 4834 4835// ShellTask: A task which consists of a shell command for the worker to 4836// execute. 4837type ShellTask struct { 4838 // Command: The shell command to run. 4839 Command string `json:"command,omitempty"` 4840 4841 // ExitCode: Exit code for the task. 4842 ExitCode int64 `json:"exitCode,omitempty"` 4843 4844 // ForceSendFields is a list of field names (e.g. "Command") to 4845 // unconditionally include in API requests. By default, fields with 4846 // empty values are omitted from API requests. However, any non-pointer, 4847 // non-interface field appearing in ForceSendFields will be sent to the 4848 // server regardless of whether the field is empty or not. This may be 4849 // used to include empty fields in Patch requests. 4850 ForceSendFields []string `json:"-"` 4851 4852 // NullFields is a list of field names (e.g. "Command") to include in 4853 // API requests with the JSON null value. By default, fields with empty 4854 // values are omitted from API requests. However, any field with an 4855 // empty value appearing in NullFields will be sent to the server as 4856 // null. It is an error if a field in this list has a non-empty value. 4857 // This may be used to include null fields in Patch requests. 4858 NullFields []string `json:"-"` 4859} 4860 4861func (s *ShellTask) MarshalJSON() ([]byte, error) { 4862 type NoMethod ShellTask 4863 raw := NoMethod(*s) 4864 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4865} 4866 4867// SideInputInfo: Information about a side input of a DoFn or an input 4868// of a SeqDoFn. 4869type SideInputInfo struct { 4870 // Kind: How to interpret the source element(s) as a side input value. 4871 Kind googleapi.RawMessage `json:"kind,omitempty"` 4872 4873 // Sources: The source(s) to read element(s) from to get the value of 4874 // this side input. 4875 // If more than one source, then the elements are taken from 4876 // the 4877 // sources, in the specified order if order matters. 4878 // At least one source is required. 4879 Sources []*Source `json:"sources,omitempty"` 4880 4881 // Tag: The id of the tag the user code will access this side input 4882 // by; 4883 // this should correspond to the tag of some MultiOutputInfo. 4884 Tag string `json:"tag,omitempty"` 4885 4886 // ForceSendFields is a list of field names (e.g. "Kind") to 4887 // unconditionally include in API requests. By default, fields with 4888 // empty values are omitted from API requests. However, any non-pointer, 4889 // non-interface field appearing in ForceSendFields will be sent to the 4890 // server regardless of whether the field is empty or not. This may be 4891 // used to include empty fields in Patch requests. 4892 ForceSendFields []string `json:"-"` 4893 4894 // NullFields is a list of field names (e.g. "Kind") to include in API 4895 // requests with the JSON null value. By default, fields with empty 4896 // values are omitted from API requests. However, any field with an 4897 // empty value appearing in NullFields will be sent to the server as 4898 // null. It is an error if a field in this list has a non-empty value. 4899 // This may be used to include null fields in Patch requests. 4900 NullFields []string `json:"-"` 4901} 4902 4903func (s *SideInputInfo) MarshalJSON() ([]byte, error) { 4904 type NoMethod SideInputInfo 4905 raw := NoMethod(*s) 4906 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4907} 4908 4909// Sink: A sink that records can be encoded and written to. 4910type Sink struct { 4911 // Codec: The codec to use to encode data written to the sink. 4912 Codec googleapi.RawMessage `json:"codec,omitempty"` 4913 4914 // Spec: The sink to write to, plus its parameters. 4915 Spec googleapi.RawMessage `json:"spec,omitempty"` 4916 4917 // ForceSendFields is a list of field names (e.g. "Codec") to 4918 // unconditionally include in API requests. By default, fields with 4919 // empty values are omitted from API requests. However, any non-pointer, 4920 // non-interface field appearing in ForceSendFields will be sent to the 4921 // server regardless of whether the field is empty or not. This may be 4922 // used to include empty fields in Patch requests. 4923 ForceSendFields []string `json:"-"` 4924 4925 // NullFields is a list of field names (e.g. "Codec") to include in API 4926 // requests with the JSON null value. By default, fields with empty 4927 // values are omitted from API requests. However, any field with an 4928 // empty value appearing in NullFields will be sent to the server as 4929 // null. It is an error if a field in this list has a non-empty value. 4930 // This may be used to include null fields in Patch requests. 4931 NullFields []string `json:"-"` 4932} 4933 4934func (s *Sink) MarshalJSON() ([]byte, error) { 4935 type NoMethod Sink 4936 raw := NoMethod(*s) 4937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4938} 4939 4940// Source: A source that records can be read and decoded from. 4941type Source struct { 4942 // BaseSpecs: While splitting, sources may specify the produced 4943 // bundles 4944 // as differences against another source, in order to save 4945 // backend-side 4946 // memory and allow bigger jobs. For details, see SourceSplitRequest. 4947 // To support this use case, the full set of parameters of the source 4948 // is logically obtained by taking the latest explicitly specified 4949 // value 4950 // of each parameter in the order: 4951 // base_specs (later items win), spec (overrides anything in 4952 // base_specs). 4953 BaseSpecs []googleapi.RawMessage `json:"baseSpecs,omitempty"` 4954 4955 // Codec: The codec to use to decode data read from the source. 4956 Codec googleapi.RawMessage `json:"codec,omitempty"` 4957 4958 // DoesNotNeedSplitting: Setting this value to true hints to the 4959 // framework that the source 4960 // doesn't need splitting, and using SourceSplitRequest on it 4961 // would 4962 // yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. 4963 // 4964 // E.g. a file splitter may set this to true when splitting a single 4965 // file 4966 // into a set of byte ranges of appropriate size, and set this 4967 // to false when splitting a filepattern into individual files. 4968 // However, for efficiency, a file splitter may decide to produce 4969 // file subranges directly from the filepattern to avoid a 4970 // splitting 4971 // round-trip. 4972 // 4973 // See SourceSplitRequest for an overview of the splitting 4974 // process. 4975 // 4976 // This field is meaningful only in the Source objects populated 4977 // by the user (e.g. when filling in a DerivedSource). 4978 // Source objects supplied by the framework to the user don't have 4979 // this field populated. 4980 DoesNotNeedSplitting bool `json:"doesNotNeedSplitting,omitempty"` 4981 4982 // Metadata: Optionally, metadata for this source can be supplied right 4983 // away, 4984 // avoiding a SourceGetMetadataOperation roundtrip 4985 // (see SourceOperationRequest). 4986 // 4987 // This field is meaningful only in the Source objects populated 4988 // by the user (e.g. when filling in a DerivedSource). 4989 // Source objects supplied by the framework to the user don't have 4990 // this field populated. 4991 Metadata *SourceMetadata `json:"metadata,omitempty"` 4992 4993 // Spec: The source to read from, plus its parameters. 4994 Spec googleapi.RawMessage `json:"spec,omitempty"` 4995 4996 // ForceSendFields is a list of field names (e.g. "BaseSpecs") to 4997 // unconditionally include in API requests. By default, fields with 4998 // empty values are omitted from API requests. However, any non-pointer, 4999 // non-interface field appearing in ForceSendFields will be sent to the 5000 // server regardless of whether the field is empty or not. This may be 5001 // used to include empty fields in Patch requests. 5002 ForceSendFields []string `json:"-"` 5003 5004 // NullFields is a list of field names (e.g. "BaseSpecs") to include in 5005 // API requests with the JSON null value. By default, fields with empty 5006 // values are omitted from API requests. However, any field with an 5007 // empty value appearing in NullFields will be sent to the server as 5008 // null. It is an error if a field in this list has a non-empty value. 5009 // This may be used to include null fields in Patch requests. 5010 NullFields []string `json:"-"` 5011} 5012 5013func (s *Source) MarshalJSON() ([]byte, error) { 5014 type NoMethod Source 5015 raw := NoMethod(*s) 5016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5017} 5018 5019// SourceFork: DEPRECATED in favor of DynamicSourceSplit. 5020type SourceFork struct { 5021 // Primary: DEPRECATED 5022 Primary *SourceSplitShard `json:"primary,omitempty"` 5023 5024 // PrimarySource: DEPRECATED 5025 PrimarySource *DerivedSource `json:"primarySource,omitempty"` 5026 5027 // Residual: DEPRECATED 5028 Residual *SourceSplitShard `json:"residual,omitempty"` 5029 5030 // ResidualSource: DEPRECATED 5031 ResidualSource *DerivedSource `json:"residualSource,omitempty"` 5032 5033 // ForceSendFields is a list of field names (e.g. "Primary") to 5034 // unconditionally include in API requests. By default, fields with 5035 // empty values are omitted from API requests. However, any non-pointer, 5036 // non-interface field appearing in ForceSendFields will be sent to the 5037 // server regardless of whether the field is empty or not. This may be 5038 // used to include empty fields in Patch requests. 5039 ForceSendFields []string `json:"-"` 5040 5041 // NullFields is a list of field names (e.g. "Primary") to include in 5042 // API requests with the JSON null value. By default, fields with empty 5043 // values are omitted from API requests. However, any field with an 5044 // empty value appearing in NullFields will be sent to the server as 5045 // null. It is an error if a field in this list has a non-empty value. 5046 // This may be used to include null fields in Patch requests. 5047 NullFields []string `json:"-"` 5048} 5049 5050func (s *SourceFork) MarshalJSON() ([]byte, error) { 5051 type NoMethod SourceFork 5052 raw := NoMethod(*s) 5053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5054} 5055 5056// SourceGetMetadataRequest: A request to compute the SourceMetadata of 5057// a Source. 5058type SourceGetMetadataRequest struct { 5059 // Source: Specification of the source whose metadata should be 5060 // computed. 5061 Source *Source `json:"source,omitempty"` 5062 5063 // ForceSendFields is a list of field names (e.g. "Source") to 5064 // unconditionally include in API requests. By default, fields with 5065 // empty values are omitted from API requests. However, any non-pointer, 5066 // non-interface field appearing in ForceSendFields will be sent to the 5067 // server regardless of whether the field is empty or not. This may be 5068 // used to include empty fields in Patch requests. 5069 ForceSendFields []string `json:"-"` 5070 5071 // NullFields is a list of field names (e.g. "Source") to include in API 5072 // requests with the JSON null value. By default, fields with empty 5073 // values are omitted from API requests. However, any field with an 5074 // empty value appearing in NullFields will be sent to the server as 5075 // null. It is an error if a field in this list has a non-empty value. 5076 // This may be used to include null fields in Patch requests. 5077 NullFields []string `json:"-"` 5078} 5079 5080func (s *SourceGetMetadataRequest) MarshalJSON() ([]byte, error) { 5081 type NoMethod SourceGetMetadataRequest 5082 raw := NoMethod(*s) 5083 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5084} 5085 5086// SourceGetMetadataResponse: The result of a 5087// SourceGetMetadataOperation. 5088type SourceGetMetadataResponse struct { 5089 // Metadata: The computed metadata. 5090 Metadata *SourceMetadata `json:"metadata,omitempty"` 5091 5092 // ForceSendFields is a list of field names (e.g. "Metadata") to 5093 // unconditionally include in API requests. By default, fields with 5094 // empty values are omitted from API requests. However, any non-pointer, 5095 // non-interface field appearing in ForceSendFields will be sent to the 5096 // server regardless of whether the field is empty or not. This may be 5097 // used to include empty fields in Patch requests. 5098 ForceSendFields []string `json:"-"` 5099 5100 // NullFields is a list of field names (e.g. "Metadata") to include in 5101 // API requests with the JSON null value. By default, fields with empty 5102 // values are omitted from API requests. However, any field with an 5103 // empty value appearing in NullFields will be sent to the server as 5104 // null. It is an error if a field in this list has a non-empty value. 5105 // This may be used to include null fields in Patch requests. 5106 NullFields []string `json:"-"` 5107} 5108 5109func (s *SourceGetMetadataResponse) MarshalJSON() ([]byte, error) { 5110 type NoMethod SourceGetMetadataResponse 5111 raw := NoMethod(*s) 5112 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5113} 5114 5115// SourceMetadata: Metadata about a Source useful for automatically 5116// optimizing 5117// and tuning the pipeline, etc. 5118type SourceMetadata struct { 5119 // EstimatedSizeBytes: An estimate of the total size (in bytes) of the 5120 // data that would be 5121 // read from this source. This estimate is in terms of external 5122 // storage 5123 // size, before any decompression or other processing done by the 5124 // reader. 5125 EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"` 5126 5127 // Infinite: Specifies that the size of this source is known to be 5128 // infinite 5129 // (this is a streaming source). 5130 Infinite bool `json:"infinite,omitempty"` 5131 5132 // ProducesSortedKeys: Whether this source is known to produce key/value 5133 // pairs with 5134 // the (encoded) keys in lexicographically sorted order. 5135 ProducesSortedKeys bool `json:"producesSortedKeys,omitempty"` 5136 5137 // ForceSendFields is a list of field names (e.g. "EstimatedSizeBytes") 5138 // to unconditionally include in API requests. By default, fields with 5139 // empty values are omitted from API requests. However, any non-pointer, 5140 // non-interface field appearing in ForceSendFields will be sent to the 5141 // server regardless of whether the field is empty or not. This may be 5142 // used to include empty fields in Patch requests. 5143 ForceSendFields []string `json:"-"` 5144 5145 // NullFields is a list of field names (e.g. "EstimatedSizeBytes") to 5146 // include in API requests with the JSON null value. By default, fields 5147 // with empty values are omitted from API requests. However, any field 5148 // with an empty value appearing in NullFields will be sent to the 5149 // server as null. It is an error if a field in this list has a 5150 // non-empty value. This may be used to include null fields in Patch 5151 // requests. 5152 NullFields []string `json:"-"` 5153} 5154 5155func (s *SourceMetadata) MarshalJSON() ([]byte, error) { 5156 type NoMethod SourceMetadata 5157 raw := NoMethod(*s) 5158 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5159} 5160 5161// SourceOperationRequest: A work item that represents the different 5162// operations that can be 5163// performed on a user-defined Source specification. 5164type SourceOperationRequest struct { 5165 // GetMetadata: Information about a request to get metadata about a 5166 // source. 5167 GetMetadata *SourceGetMetadataRequest `json:"getMetadata,omitempty"` 5168 5169 // Name: User-provided name of the Read instruction for this source. 5170 Name string `json:"name,omitempty"` 5171 5172 // OriginalName: System-defined name for the Read instruction for this 5173 // source 5174 // in the original workflow graph. 5175 OriginalName string `json:"originalName,omitempty"` 5176 5177 // Split: Information about a request to split a source. 5178 Split *SourceSplitRequest `json:"split,omitempty"` 5179 5180 // StageName: System-defined name of the stage containing the source 5181 // operation. 5182 // Unique across the workflow. 5183 StageName string `json:"stageName,omitempty"` 5184 5185 // SystemName: System-defined name of the Read instruction for this 5186 // source. 5187 // Unique across the workflow. 5188 SystemName string `json:"systemName,omitempty"` 5189 5190 // ForceSendFields is a list of field names (e.g. "GetMetadata") to 5191 // unconditionally include in API requests. By default, fields with 5192 // empty values are omitted from API requests. However, any non-pointer, 5193 // non-interface field appearing in ForceSendFields will be sent to the 5194 // server regardless of whether the field is empty or not. This may be 5195 // used to include empty fields in Patch requests. 5196 ForceSendFields []string `json:"-"` 5197 5198 // NullFields is a list of field names (e.g. "GetMetadata") to include 5199 // in API requests with the JSON null value. By default, fields with 5200 // empty values are omitted from API requests. However, any field with 5201 // an empty value appearing in NullFields will be sent to the server as 5202 // null. It is an error if a field in this list has a non-empty value. 5203 // This may be used to include null fields in Patch requests. 5204 NullFields []string `json:"-"` 5205} 5206 5207func (s *SourceOperationRequest) MarshalJSON() ([]byte, error) { 5208 type NoMethod SourceOperationRequest 5209 raw := NoMethod(*s) 5210 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5211} 5212 5213// SourceOperationResponse: The result of a SourceOperationRequest, 5214// specified in 5215// ReportWorkItemStatusRequest.source_operation when the work item 5216// is completed. 5217type SourceOperationResponse struct { 5218 // GetMetadata: A response to a request to get metadata about a source. 5219 GetMetadata *SourceGetMetadataResponse `json:"getMetadata,omitempty"` 5220 5221 // Split: A response to a request to split a source. 5222 Split *SourceSplitResponse `json:"split,omitempty"` 5223 5224 // ForceSendFields is a list of field names (e.g. "GetMetadata") to 5225 // unconditionally include in API requests. By default, fields with 5226 // empty values are omitted from API requests. However, any non-pointer, 5227 // non-interface field appearing in ForceSendFields will be sent to the 5228 // server regardless of whether the field is empty or not. This may be 5229 // used to include empty fields in Patch requests. 5230 ForceSendFields []string `json:"-"` 5231 5232 // NullFields is a list of field names (e.g. "GetMetadata") to include 5233 // in API requests with the JSON null value. By default, fields with 5234 // empty values are omitted from API requests. However, any field with 5235 // an empty value appearing in NullFields will be sent to the server as 5236 // null. It is an error if a field in this list has a non-empty value. 5237 // This may be used to include null fields in Patch requests. 5238 NullFields []string `json:"-"` 5239} 5240 5241func (s *SourceOperationResponse) MarshalJSON() ([]byte, error) { 5242 type NoMethod SourceOperationResponse 5243 raw := NoMethod(*s) 5244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5245} 5246 5247// SourceSplitOptions: Hints for splitting a Source into bundles (parts 5248// for parallel 5249// processing) using SourceSplitRequest. 5250type SourceSplitOptions struct { 5251 // DesiredBundleSizeBytes: The source should be split into a set of 5252 // bundles where the estimated size 5253 // of each is approximately this many bytes. 5254 DesiredBundleSizeBytes int64 `json:"desiredBundleSizeBytes,omitempty,string"` 5255 5256 // DesiredShardSizeBytes: DEPRECATED in favor of 5257 // desired_bundle_size_bytes. 5258 DesiredShardSizeBytes int64 `json:"desiredShardSizeBytes,omitempty,string"` 5259 5260 // ForceSendFields is a list of field names (e.g. 5261 // "DesiredBundleSizeBytes") to unconditionally include in API requests. 5262 // By default, fields with empty values are omitted from API requests. 5263 // However, any non-pointer, non-interface field appearing in 5264 // ForceSendFields will be sent to the server regardless of whether the 5265 // field is empty or not. This may be used to include empty fields in 5266 // Patch requests. 5267 ForceSendFields []string `json:"-"` 5268 5269 // NullFields is a list of field names (e.g. "DesiredBundleSizeBytes") 5270 // to include in API requests with the JSON null value. By default, 5271 // fields with empty values are omitted from API requests. However, any 5272 // field with an empty value appearing in NullFields will be sent to the 5273 // server as null. It is an error if a field in this list has a 5274 // non-empty value. This may be used to include null fields in Patch 5275 // requests. 5276 NullFields []string `json:"-"` 5277} 5278 5279func (s *SourceSplitOptions) MarshalJSON() ([]byte, error) { 5280 type NoMethod SourceSplitOptions 5281 raw := NoMethod(*s) 5282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5283} 5284 5285// SourceSplitRequest: Represents the operation to split a high-level 5286// Source specification 5287// into bundles (parts for parallel processing). 5288// 5289// At a high level, splitting of a source into bundles happens as 5290// follows: 5291// SourceSplitRequest is applied to the source. If it 5292// returns 5293// SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and 5294// the source 5295// is used "as is". Otherwise, splitting is applied recursively to 5296// each 5297// produced DerivedSource. 5298// 5299// As an optimization, for any Source, if its does_not_need_splitting 5300// is 5301// true, the framework assumes that splitting this source would 5302// return 5303// SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a 5304// SourceSplitRequest. 5305// This applies both to the initial source being split and to 5306// bundles 5307// produced from it. 5308type SourceSplitRequest struct { 5309 // Options: Hints for tuning the splitting process. 5310 Options *SourceSplitOptions `json:"options,omitempty"` 5311 5312 // Source: Specification of the source to be split. 5313 Source *Source `json:"source,omitempty"` 5314 5315 // ForceSendFields is a list of field names (e.g. "Options") to 5316 // unconditionally include in API requests. By default, fields with 5317 // empty values are omitted from API requests. However, any non-pointer, 5318 // non-interface field appearing in ForceSendFields will be sent to the 5319 // server regardless of whether the field is empty or not. This may be 5320 // used to include empty fields in Patch requests. 5321 ForceSendFields []string `json:"-"` 5322 5323 // NullFields is a list of field names (e.g. "Options") to include in 5324 // API requests with the JSON null value. By default, fields with empty 5325 // values are omitted from API requests. However, any field with an 5326 // empty value appearing in NullFields will be sent to the server as 5327 // null. It is an error if a field in this list has a non-empty value. 5328 // This may be used to include null fields in Patch requests. 5329 NullFields []string `json:"-"` 5330} 5331 5332func (s *SourceSplitRequest) MarshalJSON() ([]byte, error) { 5333 type NoMethod SourceSplitRequest 5334 raw := NoMethod(*s) 5335 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5336} 5337 5338// SourceSplitResponse: The response to a SourceSplitRequest. 5339type SourceSplitResponse struct { 5340 // Bundles: If outcome is SPLITTING_HAPPENED, then this is a list of 5341 // bundles 5342 // into which the source was split. Otherwise this field is 5343 // ignored. 5344 // This list can be empty, which means the source represents an empty 5345 // input. 5346 Bundles []*DerivedSource `json:"bundles,omitempty"` 5347 5348 // Outcome: Indicates whether splitting happened and produced a list of 5349 // bundles. 5350 // If this is USE_CURRENT_SOURCE_AS_IS, the current source should 5351 // be processed "as is" without splitting. "bundles" is ignored in this 5352 // case. 5353 // If this is SPLITTING_HAPPENED, then "bundles" contains a list 5354 // of 5355 // bundles into which the source was split. 5356 // 5357 // Possible values: 5358 // "SOURCE_SPLIT_OUTCOME_UNKNOWN" - The source split outcome is 5359 // unknown, or unspecified. 5360 // "SOURCE_SPLIT_OUTCOME_USE_CURRENT" - The current source should be 5361 // processed "as is" without splitting. 5362 // "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - Splitting produced a 5363 // list of bundles. 5364 Outcome string `json:"outcome,omitempty"` 5365 5366 // Shards: DEPRECATED in favor of bundles. 5367 Shards []*SourceSplitShard `json:"shards,omitempty"` 5368 5369 // ForceSendFields is a list of field names (e.g. "Bundles") to 5370 // unconditionally include in API requests. By default, fields with 5371 // empty values are omitted from API requests. However, any non-pointer, 5372 // non-interface field appearing in ForceSendFields will be sent to the 5373 // server regardless of whether the field is empty or not. This may be 5374 // used to include empty fields in Patch requests. 5375 ForceSendFields []string `json:"-"` 5376 5377 // NullFields is a list of field names (e.g. "Bundles") to include in 5378 // API requests with the JSON null value. By default, fields with empty 5379 // values are omitted from API requests. However, any field with an 5380 // empty value appearing in NullFields will be sent to the server as 5381 // null. It is an error if a field in this list has a non-empty value. 5382 // This may be used to include null fields in Patch requests. 5383 NullFields []string `json:"-"` 5384} 5385 5386func (s *SourceSplitResponse) MarshalJSON() ([]byte, error) { 5387 type NoMethod SourceSplitResponse 5388 raw := NoMethod(*s) 5389 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5390} 5391 5392// SourceSplitShard: DEPRECATED in favor of DerivedSource. 5393type SourceSplitShard struct { 5394 // DerivationMode: DEPRECATED 5395 // 5396 // Possible values: 5397 // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is 5398 // unknown, or unspecified. 5399 // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely 5400 // independent Source with no base. 5401 // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based 5402 // on the Source being split. 5403 // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source 5404 // based on the base of the Source being split. 5405 DerivationMode string `json:"derivationMode,omitempty"` 5406 5407 // Source: DEPRECATED 5408 Source *Source `json:"source,omitempty"` 5409 5410 // ForceSendFields is a list of field names (e.g. "DerivationMode") to 5411 // unconditionally include in API requests. By default, fields with 5412 // empty values are omitted from API requests. However, any non-pointer, 5413 // non-interface field appearing in ForceSendFields will be sent to the 5414 // server regardless of whether the field is empty or not. This may be 5415 // used to include empty fields in Patch requests. 5416 ForceSendFields []string `json:"-"` 5417 5418 // NullFields is a list of field names (e.g. "DerivationMode") to 5419 // include in API requests with the JSON null value. By default, fields 5420 // with empty values are omitted from API requests. However, any field 5421 // with an empty value appearing in NullFields will be sent to the 5422 // server as null. It is an error if a field in this list has a 5423 // non-empty value. This may be used to include null fields in Patch 5424 // requests. 5425 NullFields []string `json:"-"` 5426} 5427 5428func (s *SourceSplitShard) MarshalJSON() ([]byte, error) { 5429 type NoMethod SourceSplitShard 5430 raw := NoMethod(*s) 5431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5432} 5433 5434// SpannerIODetails: Metadata for a Spanner connector used by the job. 5435type SpannerIODetails struct { 5436 // DatabaseId: DatabaseId accessed in the connection. 5437 DatabaseId string `json:"databaseId,omitempty"` 5438 5439 // InstanceId: InstanceId accessed in the connection. 5440 InstanceId string `json:"instanceId,omitempty"` 5441 5442 // ProjectId: ProjectId accessed in the connection. 5443 ProjectId string `json:"projectId,omitempty"` 5444 5445 // ForceSendFields is a list of field names (e.g. "DatabaseId") to 5446 // unconditionally include in API requests. By default, fields with 5447 // empty values are omitted from API requests. However, any non-pointer, 5448 // non-interface field appearing in ForceSendFields will be sent to the 5449 // server regardless of whether the field is empty or not. This may be 5450 // used to include empty fields in Patch requests. 5451 ForceSendFields []string `json:"-"` 5452 5453 // NullFields is a list of field names (e.g. "DatabaseId") to include in 5454 // API requests with the JSON null value. By default, fields with empty 5455 // values are omitted from API requests. However, any field with an 5456 // empty value appearing in NullFields will be sent to the server as 5457 // null. It is an error if a field in this list has a non-empty value. 5458 // This may be used to include null fields in Patch requests. 5459 NullFields []string `json:"-"` 5460} 5461 5462func (s *SpannerIODetails) MarshalJSON() ([]byte, error) { 5463 type NoMethod SpannerIODetails 5464 raw := NoMethod(*s) 5465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5466} 5467 5468// SplitInt64: A representation of an int64, n, that is immune to 5469// precision loss when 5470// encoded in JSON. 5471type SplitInt64 struct { 5472 // HighBits: The high order bits, including the sign: n >> 32. 5473 HighBits int64 `json:"highBits,omitempty"` 5474 5475 // LowBits: The low order bits: n & 0xffffffff. 5476 LowBits int64 `json:"lowBits,omitempty"` 5477 5478 // ForceSendFields is a list of field names (e.g. "HighBits") to 5479 // unconditionally include in API requests. By default, fields with 5480 // empty values are omitted from API requests. However, any non-pointer, 5481 // non-interface field appearing in ForceSendFields will be sent to the 5482 // server regardless of whether the field is empty or not. This may be 5483 // used to include empty fields in Patch requests. 5484 ForceSendFields []string `json:"-"` 5485 5486 // NullFields is a list of field names (e.g. "HighBits") to include in 5487 // API requests with the JSON null value. By default, fields with empty 5488 // values are omitted from API requests. However, any field with an 5489 // empty value appearing in NullFields will be sent to the server as 5490 // null. It is an error if a field in this list has a non-empty value. 5491 // This may be used to include null fields in Patch requests. 5492 NullFields []string `json:"-"` 5493} 5494 5495func (s *SplitInt64) MarshalJSON() ([]byte, error) { 5496 type NoMethod SplitInt64 5497 raw := NoMethod(*s) 5498 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5499} 5500 5501// StageSource: Description of an input or output of an execution stage. 5502type StageSource struct { 5503 // Name: Dataflow service generated name for this source. 5504 Name string `json:"name,omitempty"` 5505 5506 // OriginalTransformOrCollection: User name for the original user 5507 // transform or collection with which this 5508 // source is most closely associated. 5509 OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"` 5510 5511 // SizeBytes: Size of the source, if measurable. 5512 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 5513 5514 // UserName: Human-readable name for this source; may be user or system 5515 // generated. 5516 UserName string `json:"userName,omitempty"` 5517 5518 // ForceSendFields is a list of field names (e.g. "Name") to 5519 // unconditionally include in API requests. By default, fields with 5520 // empty values are omitted from API requests. However, any non-pointer, 5521 // non-interface field appearing in ForceSendFields will be sent to the 5522 // server regardless of whether the field is empty or not. This may be 5523 // used to include empty fields in Patch requests. 5524 ForceSendFields []string `json:"-"` 5525 5526 // NullFields is a list of field names (e.g. "Name") to include in API 5527 // requests with the JSON null value. By default, fields with empty 5528 // values are omitted from API requests. However, any field with an 5529 // empty value appearing in NullFields will be sent to the server as 5530 // null. It is an error if a field in this list has a non-empty value. 5531 // This may be used to include null fields in Patch requests. 5532 NullFields []string `json:"-"` 5533} 5534 5535func (s *StageSource) MarshalJSON() ([]byte, error) { 5536 type NoMethod StageSource 5537 raw := NoMethod(*s) 5538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5539} 5540 5541// StateFamilyConfig: State family configuration. 5542type StateFamilyConfig struct { 5543 // IsRead: If true, this family corresponds to a read operation. 5544 IsRead bool `json:"isRead,omitempty"` 5545 5546 // StateFamily: The state family value. 5547 StateFamily string `json:"stateFamily,omitempty"` 5548 5549 // ForceSendFields is a list of field names (e.g. "IsRead") to 5550 // unconditionally include in API requests. By default, fields with 5551 // empty values are omitted from API requests. However, any non-pointer, 5552 // non-interface field appearing in ForceSendFields will be sent to the 5553 // server regardless of whether the field is empty or not. This may be 5554 // used to include empty fields in Patch requests. 5555 ForceSendFields []string `json:"-"` 5556 5557 // NullFields is a list of field names (e.g. "IsRead") to include in API 5558 // requests with the JSON null value. By default, fields with empty 5559 // values are omitted from API requests. However, any field with an 5560 // empty value appearing in NullFields will be sent to the server as 5561 // null. It is an error if a field in this list has a non-empty value. 5562 // This may be used to include null fields in Patch requests. 5563 NullFields []string `json:"-"` 5564} 5565 5566func (s *StateFamilyConfig) MarshalJSON() ([]byte, error) { 5567 type NoMethod StateFamilyConfig 5568 raw := NoMethod(*s) 5569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5570} 5571 5572// Status: The `Status` type defines a logical error model that is 5573// suitable for 5574// different programming environments, including REST APIs and RPC APIs. 5575// It is 5576// used by [gRPC](https://github.com/grpc). Each `Status` message 5577// contains 5578// three pieces of data: error code, error message, and error 5579// details. 5580// 5581// You can find out more about this error model and how to work with it 5582// in the 5583// [API Design Guide](https://cloud.google.com/apis/design/errors). 5584type Status struct { 5585 // Code: The status code, which should be an enum value of 5586 // google.rpc.Code. 5587 Code int64 `json:"code,omitempty"` 5588 5589 // Details: A list of messages that carry the error details. There is a 5590 // common set of 5591 // message types for APIs to use. 5592 Details []googleapi.RawMessage `json:"details,omitempty"` 5593 5594 // Message: A developer-facing error message, which should be in 5595 // English. Any 5596 // user-facing error message should be localized and sent in 5597 // the 5598 // google.rpc.Status.details field, or localized by the client. 5599 Message string `json:"message,omitempty"` 5600 5601 // ForceSendFields is a list of field names (e.g. "Code") to 5602 // unconditionally include in API requests. By default, fields with 5603 // empty values are omitted from API requests. However, any non-pointer, 5604 // non-interface field appearing in ForceSendFields will be sent to the 5605 // server regardless of whether the field is empty or not. This may be 5606 // used to include empty fields in Patch requests. 5607 ForceSendFields []string `json:"-"` 5608 5609 // NullFields is a list of field names (e.g. "Code") to include in API 5610 // requests with the JSON null value. By default, fields with empty 5611 // values are omitted from API requests. However, any field with an 5612 // empty value appearing in NullFields will be sent to the server as 5613 // null. It is an error if a field in this list has a non-empty value. 5614 // This may be used to include null fields in Patch requests. 5615 NullFields []string `json:"-"` 5616} 5617 5618func (s *Status) MarshalJSON() ([]byte, error) { 5619 type NoMethod Status 5620 raw := NoMethod(*s) 5621 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5622} 5623 5624// Step: Defines a particular step within a Cloud Dataflow job. 5625// 5626// A job consists of multiple steps, each of which performs 5627// some 5628// specific operation as part of the overall job. Data is 5629// typically 5630// passed from one step to another as part of the job. 5631// 5632// Here's an example of a sequence of steps which together implement 5633// a 5634// Map-Reduce job: 5635// 5636// * Read a collection of data from some source, parsing the 5637// collection's elements. 5638// 5639// * Validate the elements. 5640// 5641// * Apply a user-defined function to map each element to some value 5642// and extract an element-specific key value. 5643// 5644// * Group elements with the same key into a single element with 5645// that key, transforming a multiply-keyed collection into a 5646// uniquely-keyed collection. 5647// 5648// * Write the elements out to some data sink. 5649// 5650// Note that the Cloud Dataflow service may be used to run many 5651// different 5652// types of jobs, not just Map-Reduce. 5653type Step struct { 5654 // Kind: The kind of step in the Cloud Dataflow job. 5655 Kind string `json:"kind,omitempty"` 5656 5657 // Name: The name that identifies the step. This must be unique for 5658 // each 5659 // step with respect to all other steps in the Cloud Dataflow job. 5660 Name string `json:"name,omitempty"` 5661 5662 // Properties: Named properties associated with the step. Each kind 5663 // of 5664 // predefined step has its own required set of properties. 5665 // Must be provided on Create. Only retrieved with JOB_VIEW_ALL. 5666 Properties googleapi.RawMessage `json:"properties,omitempty"` 5667 5668 // ForceSendFields is a list of field names (e.g. "Kind") to 5669 // unconditionally include in API requests. By default, fields with 5670 // empty values are omitted from API requests. However, any non-pointer, 5671 // non-interface field appearing in ForceSendFields will be sent to the 5672 // server regardless of whether the field is empty or not. This may be 5673 // used to include empty fields in Patch requests. 5674 ForceSendFields []string `json:"-"` 5675 5676 // NullFields is a list of field names (e.g. "Kind") to include in API 5677 // requests with the JSON null value. By default, fields with empty 5678 // values are omitted from API requests. However, any field with an 5679 // empty value appearing in NullFields will be sent to the server as 5680 // null. It is an error if a field in this list has a non-empty value. 5681 // This may be used to include null fields in Patch requests. 5682 NullFields []string `json:"-"` 5683} 5684 5685func (s *Step) MarshalJSON() ([]byte, error) { 5686 type NoMethod Step 5687 raw := NoMethod(*s) 5688 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5689} 5690 5691// StreamLocation: Describes a stream of data, either as input to be 5692// processed or as 5693// output of a streaming Dataflow job. 5694type StreamLocation struct { 5695 // CustomSourceLocation: The stream is a custom source. 5696 CustomSourceLocation *CustomSourceLocation `json:"customSourceLocation,omitempty"` 5697 5698 // PubsubLocation: The stream is a pubsub stream. 5699 PubsubLocation *PubsubLocation `json:"pubsubLocation,omitempty"` 5700 5701 // SideInputLocation: The stream is a streaming side input. 5702 SideInputLocation *StreamingSideInputLocation `json:"sideInputLocation,omitempty"` 5703 5704 // StreamingStageLocation: The stream is part of another computation 5705 // within the current 5706 // streaming Dataflow job. 5707 StreamingStageLocation *StreamingStageLocation `json:"streamingStageLocation,omitempty"` 5708 5709 // ForceSendFields is a list of field names (e.g. 5710 // "CustomSourceLocation") to unconditionally include in API requests. 5711 // By default, fields with empty values are omitted from API requests. 5712 // However, any non-pointer, non-interface field appearing in 5713 // ForceSendFields will be sent to the server regardless of whether the 5714 // field is empty or not. This may be used to include empty fields in 5715 // Patch requests. 5716 ForceSendFields []string `json:"-"` 5717 5718 // NullFields is a list of field names (e.g. "CustomSourceLocation") to 5719 // include in API requests with the JSON null value. By default, fields 5720 // with empty values are omitted from API requests. However, any field 5721 // with an empty value appearing in NullFields will be sent to the 5722 // server as null. It is an error if a field in this list has a 5723 // non-empty value. This may be used to include null fields in Patch 5724 // requests. 5725 NullFields []string `json:"-"` 5726} 5727 5728func (s *StreamLocation) MarshalJSON() ([]byte, error) { 5729 type NoMethod StreamLocation 5730 raw := NoMethod(*s) 5731 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5732} 5733 5734// StreamingApplianceSnapshotConfig: Streaming appliance snapshot 5735// configuration. 5736type StreamingApplianceSnapshotConfig struct { 5737 // ImportStateEndpoint: Indicates which endpoint is used to import 5738 // appliance state. 5739 ImportStateEndpoint string `json:"importStateEndpoint,omitempty"` 5740 5741 // SnapshotId: If set, indicates the snapshot id for the snapshot being 5742 // performed. 5743 SnapshotId string `json:"snapshotId,omitempty"` 5744 5745 // ForceSendFields is a list of field names (e.g. "ImportStateEndpoint") 5746 // to unconditionally include in API requests. By default, fields with 5747 // empty values are omitted from API requests. However, any non-pointer, 5748 // non-interface field appearing in ForceSendFields will be sent to the 5749 // server regardless of whether the field is empty or not. This may be 5750 // used to include empty fields in Patch requests. 5751 ForceSendFields []string `json:"-"` 5752 5753 // NullFields is a list of field names (e.g. "ImportStateEndpoint") to 5754 // include in API requests with the JSON null value. By default, fields 5755 // with empty values are omitted from API requests. However, any field 5756 // with an empty value appearing in NullFields will be sent to the 5757 // server as null. It is an error if a field in this list has a 5758 // non-empty value. This may be used to include null fields in Patch 5759 // requests. 5760 NullFields []string `json:"-"` 5761} 5762 5763func (s *StreamingApplianceSnapshotConfig) MarshalJSON() ([]byte, error) { 5764 type NoMethod StreamingApplianceSnapshotConfig 5765 raw := NoMethod(*s) 5766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5767} 5768 5769// StreamingComputationConfig: Configuration information for a single 5770// streaming computation. 5771type StreamingComputationConfig struct { 5772 // ComputationId: Unique identifier for this computation. 5773 ComputationId string `json:"computationId,omitempty"` 5774 5775 // Instructions: Instructions that comprise the computation. 5776 Instructions []*ParallelInstruction `json:"instructions,omitempty"` 5777 5778 // StageName: Stage name of this computation. 5779 StageName string `json:"stageName,omitempty"` 5780 5781 // SystemName: System defined name for this computation. 5782 SystemName string `json:"systemName,omitempty"` 5783 5784 // TransformUserNameToStateFamily: Map from user name of stateful 5785 // transforms in this stage to their state 5786 // family. 5787 TransformUserNameToStateFamily map[string]string `json:"transformUserNameToStateFamily,omitempty"` 5788 5789 // ForceSendFields is a list of field names (e.g. "ComputationId") to 5790 // unconditionally include in API requests. By default, fields with 5791 // empty values are omitted from API requests. However, any non-pointer, 5792 // non-interface field appearing in ForceSendFields will be sent to the 5793 // server regardless of whether the field is empty or not. This may be 5794 // used to include empty fields in Patch requests. 5795 ForceSendFields []string `json:"-"` 5796 5797 // NullFields is a list of field names (e.g. "ComputationId") to include 5798 // in API requests with the JSON null value. By default, fields with 5799 // empty values are omitted from API requests. However, any field with 5800 // an empty value appearing in NullFields will be sent to the server as 5801 // null. It is an error if a field in this list has a non-empty value. 5802 // This may be used to include null fields in Patch requests. 5803 NullFields []string `json:"-"` 5804} 5805 5806func (s *StreamingComputationConfig) MarshalJSON() ([]byte, error) { 5807 type NoMethod StreamingComputationConfig 5808 raw := NoMethod(*s) 5809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5810} 5811 5812// StreamingComputationRanges: Describes full or partial data disk 5813// assignment information of the computation 5814// ranges. 5815type StreamingComputationRanges struct { 5816 // ComputationId: The ID of the computation. 5817 ComputationId string `json:"computationId,omitempty"` 5818 5819 // RangeAssignments: Data disk assignments for ranges from this 5820 // computation. 5821 RangeAssignments []*KeyRangeDataDiskAssignment `json:"rangeAssignments,omitempty"` 5822 5823 // ForceSendFields is a list of field names (e.g. "ComputationId") to 5824 // unconditionally include in API requests. By default, fields with 5825 // empty values are omitted from API requests. However, any non-pointer, 5826 // non-interface field appearing in ForceSendFields will be sent to the 5827 // server regardless of whether the field is empty or not. This may be 5828 // used to include empty fields in Patch requests. 5829 ForceSendFields []string `json:"-"` 5830 5831 // NullFields is a list of field names (e.g. "ComputationId") to include 5832 // in API requests with the JSON null value. By default, fields with 5833 // empty values are omitted from API requests. However, any field with 5834 // an empty value appearing in NullFields will be sent to the server as 5835 // null. It is an error if a field in this list has a non-empty value. 5836 // This may be used to include null fields in Patch requests. 5837 NullFields []string `json:"-"` 5838} 5839 5840func (s *StreamingComputationRanges) MarshalJSON() ([]byte, error) { 5841 type NoMethod StreamingComputationRanges 5842 raw := NoMethod(*s) 5843 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5844} 5845 5846// StreamingComputationTask: A task which describes what action should 5847// be performed for the specified 5848// streaming computation ranges. 5849type StreamingComputationTask struct { 5850 // ComputationRanges: Contains ranges of a streaming computation this 5851 // task should apply to. 5852 ComputationRanges []*StreamingComputationRanges `json:"computationRanges,omitempty"` 5853 5854 // DataDisks: Describes the set of data disks this task should apply to. 5855 DataDisks []*MountedDataDisk `json:"dataDisks,omitempty"` 5856 5857 // TaskType: A type of streaming computation task. 5858 // 5859 // Possible values: 5860 // "STREAMING_COMPUTATION_TASK_UNKNOWN" - The streaming computation 5861 // task is unknown, or unspecified. 5862 // "STREAMING_COMPUTATION_TASK_STOP" - Stop processing specified 5863 // streaming computation range(s). 5864 // "STREAMING_COMPUTATION_TASK_START" - Start processing specified 5865 // streaming computation range(s). 5866 TaskType string `json:"taskType,omitempty"` 5867 5868 // ForceSendFields is a list of field names (e.g. "ComputationRanges") 5869 // to unconditionally include in API requests. By default, fields with 5870 // empty values are omitted from API requests. However, any non-pointer, 5871 // non-interface field appearing in ForceSendFields will be sent to the 5872 // server regardless of whether the field is empty or not. This may be 5873 // used to include empty fields in Patch requests. 5874 ForceSendFields []string `json:"-"` 5875 5876 // NullFields is a list of field names (e.g. "ComputationRanges") to 5877 // include in API requests with the JSON null value. By default, fields 5878 // with empty values are omitted from API requests. However, any field 5879 // with an empty value appearing in NullFields will be sent to the 5880 // server as null. It is an error if a field in this list has a 5881 // non-empty value. This may be used to include null fields in Patch 5882 // requests. 5883 NullFields []string `json:"-"` 5884} 5885 5886func (s *StreamingComputationTask) MarshalJSON() ([]byte, error) { 5887 type NoMethod StreamingComputationTask 5888 raw := NoMethod(*s) 5889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5890} 5891 5892// StreamingConfigTask: A task that carries configuration information 5893// for streaming computations. 5894type StreamingConfigTask struct { 5895 // CommitStreamChunkSizeBytes: Chunk size for commit streams from the 5896 // harness to windmill. 5897 CommitStreamChunkSizeBytes int64 `json:"commitStreamChunkSizeBytes,omitempty,string"` 5898 5899 // GetDataStreamChunkSizeBytes: Chunk size for get data streams from the 5900 // harness to windmill. 5901 GetDataStreamChunkSizeBytes int64 `json:"getDataStreamChunkSizeBytes,omitempty,string"` 5902 5903 // MaxWorkItemCommitBytes: Maximum size for work item commit supported 5904 // windmill storage layer. 5905 MaxWorkItemCommitBytes int64 `json:"maxWorkItemCommitBytes,omitempty,string"` 5906 5907 // StreamingComputationConfigs: Set of computation configuration 5908 // information. 5909 StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"` 5910 5911 // UserStepToStateFamilyNameMap: Map from user step names to state 5912 // families. 5913 UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"` 5914 5915 // WindmillServiceEndpoint: If present, the worker must use this 5916 // endpoint to communicate with Windmill 5917 // Service dispatchers, otherwise the worker must continue to use 5918 // whatever 5919 // endpoint it had been using. 5920 WindmillServiceEndpoint string `json:"windmillServiceEndpoint,omitempty"` 5921 5922 // WindmillServicePort: If present, the worker must use this port to 5923 // communicate with Windmill 5924 // Service dispatchers. Only applicable when windmill_service_endpoint 5925 // is 5926 // specified. 5927 WindmillServicePort int64 `json:"windmillServicePort,omitempty,string"` 5928 5929 // ForceSendFields is a list of field names (e.g. 5930 // "CommitStreamChunkSizeBytes") to unconditionally include in API 5931 // requests. By default, fields with empty values are omitted from API 5932 // requests. However, any non-pointer, non-interface field appearing in 5933 // ForceSendFields will be sent to the server regardless of whether the 5934 // field is empty or not. This may be used to include empty fields in 5935 // Patch requests. 5936 ForceSendFields []string `json:"-"` 5937 5938 // NullFields is a list of field names (e.g. 5939 // "CommitStreamChunkSizeBytes") to include in API requests with the 5940 // JSON null value. By default, fields with empty values are omitted 5941 // from API requests. However, any field with an empty value appearing 5942 // in NullFields will be sent to the server as null. It is an error if a 5943 // field in this list has a non-empty value. This may be used to include 5944 // null fields in Patch requests. 5945 NullFields []string `json:"-"` 5946} 5947 5948func (s *StreamingConfigTask) MarshalJSON() ([]byte, error) { 5949 type NoMethod StreamingConfigTask 5950 raw := NoMethod(*s) 5951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5952} 5953 5954// StreamingSetupTask: A task which initializes part of a streaming 5955// Dataflow job. 5956type StreamingSetupTask struct { 5957 // Drain: The user has requested drain. 5958 Drain bool `json:"drain,omitempty"` 5959 5960 // ReceiveWorkPort: The TCP port on which the worker should listen for 5961 // messages from 5962 // other streaming computation workers. 5963 ReceiveWorkPort int64 `json:"receiveWorkPort,omitempty"` 5964 5965 // SnapshotConfig: Configures streaming appliance snapshot. 5966 SnapshotConfig *StreamingApplianceSnapshotConfig `json:"snapshotConfig,omitempty"` 5967 5968 // StreamingComputationTopology: The global topology of the streaming 5969 // Dataflow job. 5970 StreamingComputationTopology *TopologyConfig `json:"streamingComputationTopology,omitempty"` 5971 5972 // WorkerHarnessPort: The TCP port used by the worker to communicate 5973 // with the Dataflow 5974 // worker harness. 5975 WorkerHarnessPort int64 `json:"workerHarnessPort,omitempty"` 5976 5977 // ForceSendFields is a list of field names (e.g. "Drain") to 5978 // unconditionally include in API requests. By default, fields with 5979 // empty values are omitted from API requests. However, any non-pointer, 5980 // non-interface field appearing in ForceSendFields will be sent to the 5981 // server regardless of whether the field is empty or not. This may be 5982 // used to include empty fields in Patch requests. 5983 ForceSendFields []string `json:"-"` 5984 5985 // NullFields is a list of field names (e.g. "Drain") to include in API 5986 // requests with the JSON null value. By default, fields with empty 5987 // values are omitted from API requests. However, any field with an 5988 // empty value appearing in NullFields will be sent to the server as 5989 // null. It is an error if a field in this list has a non-empty value. 5990 // This may be used to include null fields in Patch requests. 5991 NullFields []string `json:"-"` 5992} 5993 5994func (s *StreamingSetupTask) MarshalJSON() ([]byte, error) { 5995 type NoMethod StreamingSetupTask 5996 raw := NoMethod(*s) 5997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5998} 5999 6000// StreamingSideInputLocation: Identifies the location of a streaming 6001// side input. 6002type StreamingSideInputLocation struct { 6003 // StateFamily: Identifies the state family where this side input is 6004 // stored. 6005 StateFamily string `json:"stateFamily,omitempty"` 6006 6007 // Tag: Identifies the particular side input within the streaming 6008 // Dataflow job. 6009 Tag string `json:"tag,omitempty"` 6010 6011 // ForceSendFields is a list of field names (e.g. "StateFamily") to 6012 // unconditionally include in API requests. By default, fields with 6013 // empty values are omitted from API requests. However, any non-pointer, 6014 // non-interface field appearing in ForceSendFields will be sent to the 6015 // server regardless of whether the field is empty or not. This may be 6016 // used to include empty fields in Patch requests. 6017 ForceSendFields []string `json:"-"` 6018 6019 // NullFields is a list of field names (e.g. "StateFamily") to include 6020 // in API requests with the JSON null value. By default, fields with 6021 // empty values are omitted from API requests. However, any field with 6022 // an empty value appearing in NullFields will be sent to the server as 6023 // null. It is an error if a field in this list has a non-empty value. 6024 // This may be used to include null fields in Patch requests. 6025 NullFields []string `json:"-"` 6026} 6027 6028func (s *StreamingSideInputLocation) MarshalJSON() ([]byte, error) { 6029 type NoMethod StreamingSideInputLocation 6030 raw := NoMethod(*s) 6031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6032} 6033 6034// StreamingStageLocation: Identifies the location of a streaming 6035// computation stage, for 6036// stage-to-stage communication. 6037type StreamingStageLocation struct { 6038 // StreamId: Identifies the particular stream within the streaming 6039 // Dataflow 6040 // job. 6041 StreamId string `json:"streamId,omitempty"` 6042 6043 // ForceSendFields is a list of field names (e.g. "StreamId") to 6044 // unconditionally include in API requests. By default, fields with 6045 // empty values are omitted from API requests. However, any non-pointer, 6046 // non-interface field appearing in ForceSendFields will be sent to the 6047 // server regardless of whether the field is empty or not. This may be 6048 // used to include empty fields in Patch requests. 6049 ForceSendFields []string `json:"-"` 6050 6051 // NullFields is a list of field names (e.g. "StreamId") to include in 6052 // API requests with the JSON null value. By default, fields with empty 6053 // values are omitted from API requests. However, any field with an 6054 // empty value appearing in NullFields will be sent to the server as 6055 // null. It is an error if a field in this list has a non-empty value. 6056 // This may be used to include null fields in Patch requests. 6057 NullFields []string `json:"-"` 6058} 6059 6060func (s *StreamingStageLocation) MarshalJSON() ([]byte, error) { 6061 type NoMethod StreamingStageLocation 6062 raw := NoMethod(*s) 6063 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6064} 6065 6066// StringList: A metric value representing a list of strings. 6067type StringList struct { 6068 // Elements: Elements of the list. 6069 Elements []string `json:"elements,omitempty"` 6070 6071 // ForceSendFields is a list of field names (e.g. "Elements") to 6072 // unconditionally include in API requests. By default, fields with 6073 // empty values are omitted from API requests. However, any non-pointer, 6074 // non-interface field appearing in ForceSendFields will be sent to the 6075 // server regardless of whether the field is empty or not. This may be 6076 // used to include empty fields in Patch requests. 6077 ForceSendFields []string `json:"-"` 6078 6079 // NullFields is a list of field names (e.g. "Elements") to include in 6080 // API requests with the JSON null value. By default, fields with empty 6081 // values are omitted from API requests. However, any field with an 6082 // empty value appearing in NullFields will be sent to the server as 6083 // null. It is an error if a field in this list has a non-empty value. 6084 // This may be used to include null fields in Patch requests. 6085 NullFields []string `json:"-"` 6086} 6087 6088func (s *StringList) MarshalJSON() ([]byte, error) { 6089 type NoMethod StringList 6090 raw := NoMethod(*s) 6091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6092} 6093 6094// StructuredMessage: A rich message format, including a human readable 6095// string, a key for 6096// identifying the message, and structured data associated with the 6097// message for 6098// programmatic consumption. 6099type StructuredMessage struct { 6100 // MessageKey: Identifier for this message type. Used by external 6101 // systems to 6102 // internationalize or personalize message. 6103 MessageKey string `json:"messageKey,omitempty"` 6104 6105 // MessageText: Human-readable version of message. 6106 MessageText string `json:"messageText,omitempty"` 6107 6108 // Parameters: The structured data associated with this message. 6109 Parameters []*Parameter `json:"parameters,omitempty"` 6110 6111 // ForceSendFields is a list of field names (e.g. "MessageKey") to 6112 // unconditionally include in API requests. By default, fields with 6113 // empty values are omitted from API requests. However, any non-pointer, 6114 // non-interface field appearing in ForceSendFields will be sent to the 6115 // server regardless of whether the field is empty or not. This may be 6116 // used to include empty fields in Patch requests. 6117 ForceSendFields []string `json:"-"` 6118 6119 // NullFields is a list of field names (e.g. "MessageKey") to include in 6120 // API requests with the JSON null value. By default, fields with empty 6121 // values are omitted from API requests. However, any field with an 6122 // empty value appearing in NullFields will be sent to the server as 6123 // null. It is an error if a field in this list has a non-empty value. 6124 // This may be used to include null fields in Patch requests. 6125 NullFields []string `json:"-"` 6126} 6127 6128func (s *StructuredMessage) MarshalJSON() ([]byte, error) { 6129 type NoMethod StructuredMessage 6130 raw := NoMethod(*s) 6131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6132} 6133 6134// TaskRunnerSettings: Taskrunner configuration settings. 6135type TaskRunnerSettings struct { 6136 // Alsologtostderr: Whether to also send taskrunner log info to stderr. 6137 Alsologtostderr bool `json:"alsologtostderr,omitempty"` 6138 6139 // BaseTaskDir: The location on the worker for task-specific 6140 // subdirectories. 6141 BaseTaskDir string `json:"baseTaskDir,omitempty"` 6142 6143 // BaseUrl: The base URL for the taskrunner to use when accessing Google 6144 // Cloud APIs. 6145 // 6146 // When workers access Google Cloud APIs, they logically do so 6147 // via 6148 // relative URLs. If this field is specified, it supplies the base 6149 // URL to use for resolving these relative URLs. The 6150 // normative 6151 // algorithm used is defined by RFC 1808, "Relative Uniform 6152 // Resource 6153 // Locators". 6154 // 6155 // If not specified, the default value is "http://www.googleapis.com/" 6156 BaseUrl string `json:"baseUrl,omitempty"` 6157 6158 // CommandlinesFileName: The file to store preprocessing commands in. 6159 CommandlinesFileName string `json:"commandlinesFileName,omitempty"` 6160 6161 // ContinueOnException: Whether to continue taskrunner if an exception 6162 // is hit. 6163 ContinueOnException bool `json:"continueOnException,omitempty"` 6164 6165 // DataflowApiVersion: The API version of endpoint, e.g. "v1b3" 6166 DataflowApiVersion string `json:"dataflowApiVersion,omitempty"` 6167 6168 // HarnessCommand: The command to launch the worker harness. 6169 HarnessCommand string `json:"harnessCommand,omitempty"` 6170 6171 // LanguageHint: The suggested backend language. 6172 LanguageHint string `json:"languageHint,omitempty"` 6173 6174 // LogDir: The directory on the VM to store logs. 6175 LogDir string `json:"logDir,omitempty"` 6176 6177 // LogToSerialconsole: Whether to send taskrunner log info to Google 6178 // Compute Engine VM serial 6179 // console. 6180 LogToSerialconsole bool `json:"logToSerialconsole,omitempty"` 6181 6182 // LogUploadLocation: Indicates where to put logs. If this is not 6183 // specified, the logs 6184 // will not be uploaded. 6185 // 6186 // The supported resource type is: 6187 // 6188 // Google Cloud Storage: 6189 // storage.googleapis.com/{bucket}/{object} 6190 // bucket.storage.googleapis.com/{object} 6191 LogUploadLocation string `json:"logUploadLocation,omitempty"` 6192 6193 // OauthScopes: The OAuth2 scopes to be requested by the taskrunner in 6194 // order to 6195 // access the Cloud Dataflow API. 6196 OauthScopes []string `json:"oauthScopes,omitempty"` 6197 6198 // ParallelWorkerSettings: The settings to pass to the parallel worker 6199 // harness. 6200 ParallelWorkerSettings *WorkerSettings `json:"parallelWorkerSettings,omitempty"` 6201 6202 // StreamingWorkerMainClass: The streaming worker main class name. 6203 StreamingWorkerMainClass string `json:"streamingWorkerMainClass,omitempty"` 6204 6205 // TaskGroup: The UNIX group ID on the worker VM to use for tasks 6206 // launched by 6207 // taskrunner; e.g. "wheel". 6208 TaskGroup string `json:"taskGroup,omitempty"` 6209 6210 // TaskUser: The UNIX user ID on the worker VM to use for tasks launched 6211 // by 6212 // taskrunner; e.g. "root". 6213 TaskUser string `json:"taskUser,omitempty"` 6214 6215 // TempStoragePrefix: The prefix of the resources the taskrunner should 6216 // use for 6217 // temporary storage. 6218 // 6219 // The supported resource type is: 6220 // 6221 // Google Cloud Storage: 6222 // storage.googleapis.com/{bucket}/{object} 6223 // bucket.storage.googleapis.com/{object} 6224 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 6225 6226 // VmId: The ID string of the VM. 6227 VmId string `json:"vmId,omitempty"` 6228 6229 // WorkflowFileName: The file to store the workflow in. 6230 WorkflowFileName string `json:"workflowFileName,omitempty"` 6231 6232 // ForceSendFields is a list of field names (e.g. "Alsologtostderr") to 6233 // unconditionally include in API requests. By default, fields with 6234 // empty values are omitted from API requests. However, any non-pointer, 6235 // non-interface field appearing in ForceSendFields will be sent to the 6236 // server regardless of whether the field is empty or not. This may be 6237 // used to include empty fields in Patch requests. 6238 ForceSendFields []string `json:"-"` 6239 6240 // NullFields is a list of field names (e.g. "Alsologtostderr") to 6241 // include in API requests with the JSON null value. By default, fields 6242 // with empty values are omitted from API requests. However, any field 6243 // with an empty value appearing in NullFields will be sent to the 6244 // server as null. It is an error if a field in this list has a 6245 // non-empty value. This may be used to include null fields in Patch 6246 // requests. 6247 NullFields []string `json:"-"` 6248} 6249 6250func (s *TaskRunnerSettings) MarshalJSON() ([]byte, error) { 6251 type NoMethod TaskRunnerSettings 6252 raw := NoMethod(*s) 6253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6254} 6255 6256// TemplateMetadata: Metadata describing a template. 6257type TemplateMetadata struct { 6258 // Description: Optional. A description of the template. 6259 Description string `json:"description,omitempty"` 6260 6261 // Name: Required. The name of the template. 6262 Name string `json:"name,omitempty"` 6263 6264 // Parameters: The parameters for the template. 6265 Parameters []*ParameterMetadata `json:"parameters,omitempty"` 6266 6267 // ForceSendFields is a list of field names (e.g. "Description") to 6268 // unconditionally include in API requests. By default, fields with 6269 // empty values are omitted from API requests. However, any non-pointer, 6270 // non-interface field appearing in ForceSendFields will be sent to the 6271 // server regardless of whether the field is empty or not. This may be 6272 // used to include empty fields in Patch requests. 6273 ForceSendFields []string `json:"-"` 6274 6275 // NullFields is a list of field names (e.g. "Description") to include 6276 // in API requests with the JSON null value. By default, fields with 6277 // empty values are omitted from API requests. However, any field with 6278 // an empty value appearing in NullFields will be sent to the server as 6279 // null. It is an error if a field in this list has a non-empty value. 6280 // This may be used to include null fields in Patch requests. 6281 NullFields []string `json:"-"` 6282} 6283 6284func (s *TemplateMetadata) MarshalJSON() ([]byte, error) { 6285 type NoMethod TemplateMetadata 6286 raw := NoMethod(*s) 6287 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6288} 6289 6290// TopologyConfig: Global topology of the streaming Dataflow job, 6291// including all 6292// computations and their sharded locations. 6293type TopologyConfig struct { 6294 // Computations: The computations associated with a streaming Dataflow 6295 // job. 6296 Computations []*ComputationTopology `json:"computations,omitempty"` 6297 6298 // DataDiskAssignments: The disks assigned to a streaming Dataflow job. 6299 DataDiskAssignments []*DataDiskAssignment `json:"dataDiskAssignments,omitempty"` 6300 6301 // ForwardingKeyBits: The size (in bits) of keys that will be assigned 6302 // to source messages. 6303 ForwardingKeyBits int64 `json:"forwardingKeyBits,omitempty"` 6304 6305 // PersistentStateVersion: Version number for persistent state. 6306 PersistentStateVersion int64 `json:"persistentStateVersion,omitempty"` 6307 6308 // UserStageToComputationNameMap: Maps user stage names to stable 6309 // computation names. 6310 UserStageToComputationNameMap map[string]string `json:"userStageToComputationNameMap,omitempty"` 6311 6312 // ForceSendFields is a list of field names (e.g. "Computations") to 6313 // unconditionally include in API requests. By default, fields with 6314 // empty values are omitted from API requests. However, any non-pointer, 6315 // non-interface field appearing in ForceSendFields will be sent to the 6316 // server regardless of whether the field is empty or not. This may be 6317 // used to include empty fields in Patch requests. 6318 ForceSendFields []string `json:"-"` 6319 6320 // NullFields is a list of field names (e.g. "Computations") to include 6321 // in API requests with the JSON null value. By default, fields with 6322 // empty values are omitted from API requests. However, any field with 6323 // an empty value appearing in NullFields will be sent to the server as 6324 // null. It is an error if a field in this list has a non-empty value. 6325 // This may be used to include null fields in Patch requests. 6326 NullFields []string `json:"-"` 6327} 6328 6329func (s *TopologyConfig) MarshalJSON() ([]byte, error) { 6330 type NoMethod TopologyConfig 6331 raw := NoMethod(*s) 6332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6333} 6334 6335// TransformSummary: Description of the type, names/ids, and 6336// input/outputs for a transform. 6337type TransformSummary struct { 6338 // DisplayData: Transform-specific display data. 6339 DisplayData []*DisplayData `json:"displayData,omitempty"` 6340 6341 // Id: SDK generated id of this transform instance. 6342 Id string `json:"id,omitempty"` 6343 6344 // InputCollectionName: User names for all collection inputs to this 6345 // transform. 6346 InputCollectionName []string `json:"inputCollectionName,omitempty"` 6347 6348 // Kind: Type of transform. 6349 // 6350 // Possible values: 6351 // "UNKNOWN_KIND" - Unrecognized transform type. 6352 // "PAR_DO_KIND" - ParDo transform. 6353 // "GROUP_BY_KEY_KIND" - Group By Key transform. 6354 // "FLATTEN_KIND" - Flatten transform. 6355 // "READ_KIND" - Read transform. 6356 // "WRITE_KIND" - Write transform. 6357 // "CONSTANT_KIND" - Constructs from a constant value, such as with 6358 // Create.of. 6359 // "SINGLETON_KIND" - Creates a Singleton view of a collection. 6360 // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as 6361 // part of a GroupByKey. 6362 Kind string `json:"kind,omitempty"` 6363 6364 // Name: User provided name for this transform instance. 6365 Name string `json:"name,omitempty"` 6366 6367 // OutputCollectionName: User names for all collection outputs to this 6368 // transform. 6369 OutputCollectionName []string `json:"outputCollectionName,omitempty"` 6370 6371 // ForceSendFields is a list of field names (e.g. "DisplayData") to 6372 // unconditionally include in API requests. By default, fields with 6373 // empty values are omitted from API requests. However, any non-pointer, 6374 // non-interface field appearing in ForceSendFields will be sent to the 6375 // server regardless of whether the field is empty or not. This may be 6376 // used to include empty fields in Patch requests. 6377 ForceSendFields []string `json:"-"` 6378 6379 // NullFields is a list of field names (e.g. "DisplayData") to include 6380 // in API requests with the JSON null value. By default, fields with 6381 // empty values are omitted from API requests. However, any field with 6382 // an empty value appearing in NullFields will be sent to the server as 6383 // null. It is an error if a field in this list has a non-empty value. 6384 // This may be used to include null fields in Patch requests. 6385 NullFields []string `json:"-"` 6386} 6387 6388func (s *TransformSummary) MarshalJSON() ([]byte, error) { 6389 type NoMethod TransformSummary 6390 raw := NoMethod(*s) 6391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6392} 6393 6394// ValidateResponse: Response to the validation request. 6395type ValidateResponse struct { 6396 // ErrorMessage: Will be empty if validation succeeds. 6397 ErrorMessage string `json:"errorMessage,omitempty"` 6398 6399 // ServerResponse contains the HTTP response code and headers from the 6400 // server. 6401 googleapi.ServerResponse `json:"-"` 6402 6403 // ForceSendFields is a list of field names (e.g. "ErrorMessage") to 6404 // unconditionally include in API requests. By default, fields with 6405 // empty values are omitted from API requests. However, any non-pointer, 6406 // non-interface field appearing in ForceSendFields will be sent to the 6407 // server regardless of whether the field is empty or not. This may be 6408 // used to include empty fields in Patch requests. 6409 ForceSendFields []string `json:"-"` 6410 6411 // NullFields is a list of field names (e.g. "ErrorMessage") to include 6412 // in API requests with the JSON null value. By default, fields with 6413 // empty values are omitted from API requests. However, any field with 6414 // an empty value appearing in NullFields will be sent to the server as 6415 // null. It is an error if a field in this list has a non-empty value. 6416 // This may be used to include null fields in Patch requests. 6417 NullFields []string `json:"-"` 6418} 6419 6420func (s *ValidateResponse) MarshalJSON() ([]byte, error) { 6421 type NoMethod ValidateResponse 6422 raw := NoMethod(*s) 6423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6424} 6425 6426// WorkItem: WorkItem represents basic information about a WorkItem to 6427// be executed 6428// in the cloud. 6429type WorkItem struct { 6430 // Configuration: Work item-specific configuration as an opaque blob. 6431 Configuration string `json:"configuration,omitempty"` 6432 6433 // Id: Identifies this WorkItem. 6434 Id int64 `json:"id,omitempty,string"` 6435 6436 // InitialReportIndex: The initial index to use when reporting the 6437 // status of the WorkItem. 6438 InitialReportIndex int64 `json:"initialReportIndex,omitempty,string"` 6439 6440 // JobId: Identifies the workflow job this WorkItem belongs to. 6441 JobId string `json:"jobId,omitempty"` 6442 6443 // LeaseExpireTime: Time when the lease on this Work will expire. 6444 LeaseExpireTime string `json:"leaseExpireTime,omitempty"` 6445 6446 // MapTask: Additional information for MapTask WorkItems. 6447 MapTask *MapTask `json:"mapTask,omitempty"` 6448 6449 // Packages: Any required packages that need to be fetched in order to 6450 // execute 6451 // this WorkItem. 6452 Packages []*Package `json:"packages,omitempty"` 6453 6454 // ProjectId: Identifies the cloud project this WorkItem belongs to. 6455 ProjectId string `json:"projectId,omitempty"` 6456 6457 // ReportStatusInterval: Recommended reporting interval. 6458 ReportStatusInterval string `json:"reportStatusInterval,omitempty"` 6459 6460 // SeqMapTask: Additional information for SeqMapTask WorkItems. 6461 SeqMapTask *SeqMapTask `json:"seqMapTask,omitempty"` 6462 6463 // ShellTask: Additional information for ShellTask WorkItems. 6464 ShellTask *ShellTask `json:"shellTask,omitempty"` 6465 6466 // SourceOperationTask: Additional information for source operation 6467 // WorkItems. 6468 SourceOperationTask *SourceOperationRequest `json:"sourceOperationTask,omitempty"` 6469 6470 // StreamingComputationTask: Additional information for 6471 // StreamingComputationTask WorkItems. 6472 StreamingComputationTask *StreamingComputationTask `json:"streamingComputationTask,omitempty"` 6473 6474 // StreamingConfigTask: Additional information for StreamingConfigTask 6475 // WorkItems. 6476 StreamingConfigTask *StreamingConfigTask `json:"streamingConfigTask,omitempty"` 6477 6478 // StreamingSetupTask: Additional information for StreamingSetupTask 6479 // WorkItems. 6480 StreamingSetupTask *StreamingSetupTask `json:"streamingSetupTask,omitempty"` 6481 6482 // ForceSendFields is a list of field names (e.g. "Configuration") to 6483 // unconditionally include in API requests. By default, fields with 6484 // empty values are omitted from API requests. However, any non-pointer, 6485 // non-interface field appearing in ForceSendFields will be sent to the 6486 // server regardless of whether the field is empty or not. This may be 6487 // used to include empty fields in Patch requests. 6488 ForceSendFields []string `json:"-"` 6489 6490 // NullFields is a list of field names (e.g. "Configuration") to include 6491 // in API requests with the JSON null value. By default, fields with 6492 // empty values are omitted from API requests. However, any field with 6493 // an empty value appearing in NullFields will be sent to the server as 6494 // null. It is an error if a field in this list has a non-empty value. 6495 // This may be used to include null fields in Patch requests. 6496 NullFields []string `json:"-"` 6497} 6498 6499func (s *WorkItem) MarshalJSON() ([]byte, error) { 6500 type NoMethod WorkItem 6501 raw := NoMethod(*s) 6502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6503} 6504 6505// WorkItemServiceState: The Dataflow service's idea of the current 6506// state of a WorkItem 6507// being processed by a worker. 6508type WorkItemServiceState struct { 6509 // HarnessData: Other data returned by the service, specific to the 6510 // particular 6511 // worker harness. 6512 HarnessData googleapi.RawMessage `json:"harnessData,omitempty"` 6513 6514 // HotKeyDetection: A hot key is a symptom of poor data distribution in 6515 // which there are enough 6516 // elements mapped to a single key to impact pipeline performance. 6517 // When 6518 // present, this field includes metadata associated with any hot key. 6519 HotKeyDetection *HotKeyDetection `json:"hotKeyDetection,omitempty"` 6520 6521 // LeaseExpireTime: Time at which the current lease will expire. 6522 LeaseExpireTime string `json:"leaseExpireTime,omitempty"` 6523 6524 // MetricShortId: The short ids that workers should use in subsequent 6525 // metric updates. 6526 // Workers should strive to use short ids whenever possible, but it is 6527 // ok 6528 // to request the short_id again if a worker lost track of it 6529 // (e.g. if the worker is recovering from a crash). 6530 // NOTE: it is possible that the response may have short ids for a 6531 // subset 6532 // of the metrics. 6533 MetricShortId []*MetricShortId `json:"metricShortId,omitempty"` 6534 6535 // NextReportIndex: The index value to use for the next report sent by 6536 // the worker. 6537 // Note: If the report call fails for whatever reason, the worker 6538 // should 6539 // reuse this index for subsequent report attempts. 6540 NextReportIndex int64 `json:"nextReportIndex,omitempty,string"` 6541 6542 // ReportStatusInterval: New recommended reporting interval. 6543 ReportStatusInterval string `json:"reportStatusInterval,omitempty"` 6544 6545 // SplitRequest: The progress point in the WorkItem where the Dataflow 6546 // service 6547 // suggests that the worker truncate the task. 6548 SplitRequest *ApproximateSplitRequest `json:"splitRequest,omitempty"` 6549 6550 // SuggestedStopPoint: DEPRECATED in favor of split_request. 6551 SuggestedStopPoint *ApproximateProgress `json:"suggestedStopPoint,omitempty"` 6552 6553 // SuggestedStopPosition: Obsolete, always empty. 6554 SuggestedStopPosition *Position `json:"suggestedStopPosition,omitempty"` 6555 6556 // ForceSendFields is a list of field names (e.g. "HarnessData") to 6557 // unconditionally include in API requests. By default, fields with 6558 // empty values are omitted from API requests. However, any non-pointer, 6559 // non-interface field appearing in ForceSendFields will be sent to the 6560 // server regardless of whether the field is empty or not. This may be 6561 // used to include empty fields in Patch requests. 6562 ForceSendFields []string `json:"-"` 6563 6564 // NullFields is a list of field names (e.g. "HarnessData") to include 6565 // in API requests with the JSON null value. By default, fields with 6566 // empty values are omitted from API requests. However, any field with 6567 // an empty value appearing in NullFields will be sent to the server as 6568 // null. It is an error if a field in this list has a non-empty value. 6569 // This may be used to include null fields in Patch requests. 6570 NullFields []string `json:"-"` 6571} 6572 6573func (s *WorkItemServiceState) MarshalJSON() ([]byte, error) { 6574 type NoMethod WorkItemServiceState 6575 raw := NoMethod(*s) 6576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6577} 6578 6579// WorkItemStatus: Conveys a worker's progress through the work 6580// described by a WorkItem. 6581type WorkItemStatus struct { 6582 // Completed: True if the WorkItem was completed (successfully or 6583 // unsuccessfully). 6584 Completed bool `json:"completed,omitempty"` 6585 6586 // CounterUpdates: Worker output counters for this WorkItem. 6587 CounterUpdates []*CounterUpdate `json:"counterUpdates,omitempty"` 6588 6589 // DynamicSourceSplit: See documentation of stop_position. 6590 DynamicSourceSplit *DynamicSourceSplit `json:"dynamicSourceSplit,omitempty"` 6591 6592 // Errors: Specifies errors which occurred during processing. If errors 6593 // are 6594 // provided, and completed = true, then the WorkItem is considered 6595 // to have failed. 6596 Errors []*Status `json:"errors,omitempty"` 6597 6598 // MetricUpdates: DEPRECATED in favor of counter_updates. 6599 MetricUpdates []*MetricUpdate `json:"metricUpdates,omitempty"` 6600 6601 // Progress: DEPRECATED in favor of reported_progress. 6602 Progress *ApproximateProgress `json:"progress,omitempty"` 6603 6604 // ReportIndex: The report index. When a WorkItem is leased, the lease 6605 // will 6606 // contain an initial report index. When a WorkItem's status 6607 // is 6608 // reported to the system, the report should be sent with 6609 // that report index, and the response will contain the index the 6610 // worker should use for the next report. Reports received 6611 // with 6612 // unexpected index values will be rejected by the service. 6613 // 6614 // In order to preserve idempotency, the worker should not alter 6615 // the 6616 // contents of a report, even if the worker must submit the same 6617 // report multiple times before getting back a response. The 6618 // worker 6619 // should not submit a subsequent report until the response for 6620 // the 6621 // previous report had been received from the service. 6622 ReportIndex int64 `json:"reportIndex,omitempty,string"` 6623 6624 // ReportedProgress: The worker's progress through this WorkItem. 6625 ReportedProgress *ApproximateReportedProgress `json:"reportedProgress,omitempty"` 6626 6627 // RequestedLeaseDuration: Amount of time the worker requests for its 6628 // lease. 6629 RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` 6630 6631 // SourceFork: DEPRECATED in favor of dynamic_source_split. 6632 SourceFork *SourceFork `json:"sourceFork,omitempty"` 6633 6634 // SourceOperationResponse: If the work item represented a 6635 // SourceOperationRequest, and the work 6636 // is completed, contains the result of the operation. 6637 SourceOperationResponse *SourceOperationResponse `json:"sourceOperationResponse,omitempty"` 6638 6639 // StopPosition: A worker may split an active map task in two parts, 6640 // "primary" and 6641 // "residual", continuing to process the primary part and returning 6642 // the 6643 // residual part into the pool of available work. 6644 // This event is called a "dynamic split" and is critical to the 6645 // dynamic 6646 // work rebalancing feature. The two obtained sub-tasks are 6647 // called 6648 // "parts" of the split. 6649 // The parts, if concatenated, must represent the same input as would 6650 // be read by the current task if the split did not happen. 6651 // The exact way in which the original task is decomposed into the 6652 // two 6653 // parts is specified either as a position demarcating 6654 // them 6655 // (stop_position), or explicitly as two DerivedSources, if this 6656 // task consumes a user-defined source type (dynamic_source_split). 6657 // 6658 // The "current" task is adjusted as a result of the split: after a 6659 // task 6660 // with range [A, B) sends a stop_position update at C, its range 6661 // is 6662 // considered to be [A, C), e.g.: 6663 // * Progress should be interpreted relative to the new range, e.g. 6664 // "75% completed" means "75% of [A, C) completed" 6665 // * The worker should interpret proposed_stop_position relative to the 6666 // new range, e.g. "split at 68%" should be interpreted as 6667 // "split at 68% of [A, C)". 6668 // * If the worker chooses to split again using stop_position, only 6669 // stop_positions in [A, C) will be accepted. 6670 // * Etc. 6671 // dynamic_source_split has similar semantics: e.g., if a task 6672 // with 6673 // source S splits using dynamic_source_split into {P, R} 6674 // (where P and R must be together equivalent to S), then 6675 // subsequent 6676 // progress and proposed_stop_position should be interpreted relative 6677 // to P, and in a potential subsequent dynamic_source_split into {P', 6678 // R'}, 6679 // P' and R' must be together equivalent to P, etc. 6680 StopPosition *Position `json:"stopPosition,omitempty"` 6681 6682 // TotalThrottlerWaitTimeSeconds: Total time the worker spent being 6683 // throttled by external systems. 6684 TotalThrottlerWaitTimeSeconds float64 `json:"totalThrottlerWaitTimeSeconds,omitempty"` 6685 6686 // WorkItemId: Identifies the WorkItem. 6687 WorkItemId string `json:"workItemId,omitempty"` 6688 6689 // ForceSendFields is a list of field names (e.g. "Completed") to 6690 // unconditionally include in API requests. By default, fields with 6691 // empty values are omitted from API requests. However, any non-pointer, 6692 // non-interface field appearing in ForceSendFields will be sent to the 6693 // server regardless of whether the field is empty or not. This may be 6694 // used to include empty fields in Patch requests. 6695 ForceSendFields []string `json:"-"` 6696 6697 // NullFields is a list of field names (e.g. "Completed") to include in 6698 // API requests with the JSON null value. By default, fields with empty 6699 // values are omitted from API requests. However, any field with an 6700 // empty value appearing in NullFields will be sent to the server as 6701 // null. It is an error if a field in this list has a non-empty value. 6702 // This may be used to include null fields in Patch requests. 6703 NullFields []string `json:"-"` 6704} 6705 6706func (s *WorkItemStatus) MarshalJSON() ([]byte, error) { 6707 type NoMethod WorkItemStatus 6708 raw := NoMethod(*s) 6709 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6710} 6711 6712func (s *WorkItemStatus) UnmarshalJSON(data []byte) error { 6713 type NoMethod WorkItemStatus 6714 var s1 struct { 6715 TotalThrottlerWaitTimeSeconds gensupport.JSONFloat64 `json:"totalThrottlerWaitTimeSeconds"` 6716 *NoMethod 6717 } 6718 s1.NoMethod = (*NoMethod)(s) 6719 if err := json.Unmarshal(data, &s1); err != nil { 6720 return err 6721 } 6722 s.TotalThrottlerWaitTimeSeconds = float64(s1.TotalThrottlerWaitTimeSeconds) 6723 return nil 6724} 6725 6726// WorkerHealthReport: WorkerHealthReport contains information about the 6727// health of a worker. 6728// 6729// The VM should be identified by the labels attached to the 6730// WorkerMessage that 6731// this health ping belongs to. 6732type WorkerHealthReport struct { 6733 // Msg: A message describing any unusual health reports. 6734 Msg string `json:"msg,omitempty"` 6735 6736 // Pods: The pods running on the worker. 6737 // See: 6738 // http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html# 6739 // _v1_pod 6740 // 6741 // This field is used by the worker to send the status of the 6742 // indvidual 6743 // containers running on each worker. 6744 Pods []googleapi.RawMessage `json:"pods,omitempty"` 6745 6746 // ReportInterval: The interval at which the worker is sending health 6747 // reports. 6748 // The default value of 0 should be interpreted as the field is not 6749 // being 6750 // explicitly set by the worker. 6751 ReportInterval string `json:"reportInterval,omitempty"` 6752 6753 // VmIsBroken: Whether the VM is in a permanently broken state. 6754 // Broken VMs should be abandoned or deleted ASAP to avoid assigning 6755 // or 6756 // completing any work. 6757 VmIsBroken bool `json:"vmIsBroken,omitempty"` 6758 6759 // VmIsHealthy: Whether the VM is currently healthy. 6760 VmIsHealthy bool `json:"vmIsHealthy,omitempty"` 6761 6762 // VmStartupTime: The time the VM was booted. 6763 VmStartupTime string `json:"vmStartupTime,omitempty"` 6764 6765 // ForceSendFields is a list of field names (e.g. "Msg") to 6766 // unconditionally include in API requests. By default, fields with 6767 // empty values are omitted from API requests. However, any non-pointer, 6768 // non-interface field appearing in ForceSendFields will be sent to the 6769 // server regardless of whether the field is empty or not. This may be 6770 // used to include empty fields in Patch requests. 6771 ForceSendFields []string `json:"-"` 6772 6773 // NullFields is a list of field names (e.g. "Msg") to include in API 6774 // requests with the JSON null value. By default, fields with empty 6775 // values are omitted from API requests. However, any field with an 6776 // empty value appearing in NullFields will be sent to the server as 6777 // null. It is an error if a field in this list has a non-empty value. 6778 // This may be used to include null fields in Patch requests. 6779 NullFields []string `json:"-"` 6780} 6781 6782func (s *WorkerHealthReport) MarshalJSON() ([]byte, error) { 6783 type NoMethod WorkerHealthReport 6784 raw := NoMethod(*s) 6785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6786} 6787 6788// WorkerHealthReportResponse: WorkerHealthReportResponse contains 6789// information returned to the worker 6790// in response to a health ping. 6791type WorkerHealthReportResponse struct { 6792 // ReportInterval: A positive value indicates the worker should change 6793 // its reporting interval 6794 // to the specified value. 6795 // 6796 // The default value of zero means no change in report rate is requested 6797 // by 6798 // the server. 6799 ReportInterval string `json:"reportInterval,omitempty"` 6800 6801 // ForceSendFields is a list of field names (e.g. "ReportInterval") to 6802 // unconditionally include in API requests. By default, fields with 6803 // empty values are omitted from API requests. However, any non-pointer, 6804 // non-interface field appearing in ForceSendFields will be sent to the 6805 // server regardless of whether the field is empty or not. This may be 6806 // used to include empty fields in Patch requests. 6807 ForceSendFields []string `json:"-"` 6808 6809 // NullFields is a list of field names (e.g. "ReportInterval") to 6810 // include in API requests with the JSON null value. By default, fields 6811 // with empty values are omitted from API requests. However, any field 6812 // with an empty value appearing in NullFields will be sent to the 6813 // server as null. It is an error if a field in this list has a 6814 // non-empty value. This may be used to include null fields in Patch 6815 // requests. 6816 NullFields []string `json:"-"` 6817} 6818 6819func (s *WorkerHealthReportResponse) MarshalJSON() ([]byte, error) { 6820 type NoMethod WorkerHealthReportResponse 6821 raw := NoMethod(*s) 6822 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6823} 6824 6825// WorkerLifecycleEvent: A report of an event in a worker's 6826// lifecycle. 6827// The proto contains one event, because the worker is expected 6828// to 6829// asynchronously send each message immediately after the event. 6830// Due to this asynchrony, messages may arrive out of order (or 6831// missing), and it 6832// is up to the consumer to interpret. 6833// The timestamp of the event is in the enclosing WorkerMessage proto. 6834type WorkerLifecycleEvent struct { 6835 // ContainerStartTime: The start time of this container. All events will 6836 // report this so that 6837 // events can be grouped together across container/VM restarts. 6838 ContainerStartTime string `json:"containerStartTime,omitempty"` 6839 6840 // Event: The event being reported. 6841 // 6842 // Possible values: 6843 // "UNKNOWN_EVENT" - Invalid event. 6844 // "OS_START" - The time the VM started. 6845 // "CONTAINER_START" - Our container code starts running. Multiple 6846 // containers could be 6847 // distinguished with WorkerMessage.labels if desired. 6848 // "NETWORK_UP" - The worker has a functional external network 6849 // connection. 6850 // "STAGING_FILES_DOWNLOAD_START" - Started downloading staging files. 6851 // "STAGING_FILES_DOWNLOAD_FINISH" - Finished downloading all staging 6852 // files. 6853 // "SDK_INSTALL_START" - For applicable SDKs, started installation of 6854 // SDK and worker packages. 6855 // "SDK_INSTALL_FINISH" - Finished installing SDK. 6856 Event string `json:"event,omitempty"` 6857 6858 // Metadata: Other stats that can accompany an event. E.g. 6859 // { "downloaded_bytes" : "123456" } 6860 Metadata map[string]string `json:"metadata,omitempty"` 6861 6862 // ForceSendFields is a list of field names (e.g. "ContainerStartTime") 6863 // to unconditionally include in API requests. By default, fields with 6864 // empty values are omitted from API requests. However, any non-pointer, 6865 // non-interface field appearing in ForceSendFields will be sent to the 6866 // server regardless of whether the field is empty or not. This may be 6867 // used to include empty fields in Patch requests. 6868 ForceSendFields []string `json:"-"` 6869 6870 // NullFields is a list of field names (e.g. "ContainerStartTime") to 6871 // include in API requests with the JSON null value. By default, fields 6872 // with empty values are omitted from API requests. However, any field 6873 // with an empty value appearing in NullFields will be sent to the 6874 // server as null. It is an error if a field in this list has a 6875 // non-empty value. This may be used to include null fields in Patch 6876 // requests. 6877 NullFields []string `json:"-"` 6878} 6879 6880func (s *WorkerLifecycleEvent) MarshalJSON() ([]byte, error) { 6881 type NoMethod WorkerLifecycleEvent 6882 raw := NoMethod(*s) 6883 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6884} 6885 6886// WorkerMessage: WorkerMessage provides information to the backend 6887// about a worker. 6888type WorkerMessage struct { 6889 // Labels: Labels are used to group WorkerMessages. 6890 // For example, a worker_message about a particular container 6891 // might have the labels: 6892 // { "JOB_ID": "2015-04-22", 6893 // "WORKER_ID": "wordcount-vm-2015…" 6894 // "CONTAINER_TYPE": "worker", 6895 // "CONTAINER_ID": "ac1234def"} 6896 // Label tags typically correspond to Label enum values. However, for 6897 // ease 6898 // of development other strings can be used as tags. LABEL_UNSPECIFIED 6899 // should 6900 // not be used here. 6901 Labels map[string]string `json:"labels,omitempty"` 6902 6903 // Time: The timestamp of the worker_message. 6904 Time string `json:"time,omitempty"` 6905 6906 // WorkerHealthReport: The health of a worker. 6907 WorkerHealthReport *WorkerHealthReport `json:"workerHealthReport,omitempty"` 6908 6909 // WorkerLifecycleEvent: Record of worker lifecycle events. 6910 WorkerLifecycleEvent *WorkerLifecycleEvent `json:"workerLifecycleEvent,omitempty"` 6911 6912 // WorkerMessageCode: A worker message code. 6913 WorkerMessageCode *WorkerMessageCode `json:"workerMessageCode,omitempty"` 6914 6915 // WorkerMetrics: Resource metrics reported by workers. 6916 WorkerMetrics *ResourceUtilizationReport `json:"workerMetrics,omitempty"` 6917 6918 // WorkerShutdownNotice: Shutdown notice by workers. 6919 WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,omitempty"` 6920 6921 // ForceSendFields is a list of field names (e.g. "Labels") to 6922 // unconditionally include in API requests. By default, fields with 6923 // empty values are omitted from API requests. However, any non-pointer, 6924 // non-interface field appearing in ForceSendFields will be sent to the 6925 // server regardless of whether the field is empty or not. This may be 6926 // used to include empty fields in Patch requests. 6927 ForceSendFields []string `json:"-"` 6928 6929 // NullFields is a list of field names (e.g. "Labels") to include in API 6930 // requests with the JSON null value. By default, fields with empty 6931 // values are omitted from API requests. However, any field with an 6932 // empty value appearing in NullFields will be sent to the server as 6933 // null. It is an error if a field in this list has a non-empty value. 6934 // This may be used to include null fields in Patch requests. 6935 NullFields []string `json:"-"` 6936} 6937 6938func (s *WorkerMessage) MarshalJSON() ([]byte, error) { 6939 type NoMethod WorkerMessage 6940 raw := NoMethod(*s) 6941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6942} 6943 6944// WorkerMessageCode: A message code is used to report status and error 6945// messages to the service. 6946// The message codes are intended to be machine readable. The service 6947// will 6948// take care of translating these into user understandable messages 6949// if 6950// necessary. 6951// 6952// Example use cases: 6953// 1. Worker processes reporting successful startup. 6954// 2. Worker processes reporting specific errors (e.g. package 6955// staging 6956// failure). 6957type WorkerMessageCode struct { 6958 // Code: The code is a string intended for consumption by a machine that 6959 // identifies 6960 // the type of message being sent. 6961 // Examples: 6962 // 1. "HARNESS_STARTED" might be used to indicate the worker harness 6963 // has 6964 // started. 6965 // 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error 6966 // downloading 6967 // a GCS file as part of the boot process of one of the worker 6968 // containers. 6969 // 6970 // This is a string and not an enum to make it easy to add new codes 6971 // without 6972 // waiting for an API change. 6973 Code string `json:"code,omitempty"` 6974 6975 // Parameters: Parameters contains specific information about the 6976 // code. 6977 // 6978 // This is a struct to allow parameters of different types. 6979 // 6980 // Examples: 6981 // 1. For a "HARNESS_STARTED" message parameters might provide the 6982 // name 6983 // of the worker and additional data like timing information. 6984 // 2. For a "GCS_DOWNLOAD_ERROR" parameters might contain fields 6985 // listing 6986 // the GCS objects being downloaded and fields containing 6987 // errors. 6988 // 6989 // In general complex data structures should be avoided. If a 6990 // worker 6991 // needs to send a specific and complicated data structure then 6992 // please 6993 // consider defining a new proto and adding it to the data oneof 6994 // in 6995 // WorkerMessageResponse. 6996 // 6997 // Conventions: 6998 // Parameters should only be used for information that isn't typically 6999 // passed 7000 // as a label. 7001 // hostname and other worker identifiers should almost always be 7002 // passed 7003 // as labels since they will be included on most messages. 7004 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 7005 7006 // ForceSendFields is a list of field names (e.g. "Code") to 7007 // unconditionally include in API requests. By default, fields with 7008 // empty values are omitted from API requests. However, any non-pointer, 7009 // non-interface field appearing in ForceSendFields will be sent to the 7010 // server regardless of whether the field is empty or not. This may be 7011 // used to include empty fields in Patch requests. 7012 ForceSendFields []string `json:"-"` 7013 7014 // NullFields is a list of field names (e.g. "Code") to include in API 7015 // requests with the JSON null value. By default, fields with empty 7016 // values are omitted from API requests. However, any field with an 7017 // empty value appearing in NullFields will be sent to the server as 7018 // null. It is an error if a field in this list has a non-empty value. 7019 // This may be used to include null fields in Patch requests. 7020 NullFields []string `json:"-"` 7021} 7022 7023func (s *WorkerMessageCode) MarshalJSON() ([]byte, error) { 7024 type NoMethod WorkerMessageCode 7025 raw := NoMethod(*s) 7026 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7027} 7028 7029// WorkerMessageResponse: A worker_message response allows the server to 7030// pass information to the 7031// sender. 7032type WorkerMessageResponse struct { 7033 // WorkerHealthReportResponse: The service's response to a worker's 7034 // health report. 7035 WorkerHealthReportResponse *WorkerHealthReportResponse `json:"workerHealthReportResponse,omitempty"` 7036 7037 // WorkerMetricsResponse: Service's response to reporting worker metrics 7038 // (currently empty). 7039 WorkerMetricsResponse *ResourceUtilizationReportResponse `json:"workerMetricsResponse,omitempty"` 7040 7041 // WorkerShutdownNoticeResponse: Service's response to shutdown notice 7042 // (currently empty). 7043 WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"` 7044 7045 // ForceSendFields is a list of field names (e.g. 7046 // "WorkerHealthReportResponse") to unconditionally include in API 7047 // requests. By default, fields with empty values are omitted from API 7048 // requests. However, any non-pointer, non-interface field appearing in 7049 // ForceSendFields will be sent to the server regardless of whether the 7050 // field is empty or not. This may be used to include empty fields in 7051 // Patch requests. 7052 ForceSendFields []string `json:"-"` 7053 7054 // NullFields is a list of field names (e.g. 7055 // "WorkerHealthReportResponse") to include in API requests with the 7056 // JSON null value. By default, fields with empty values are omitted 7057 // from API requests. However, any field with an empty value appearing 7058 // in NullFields will be sent to the server as null. It is an error if a 7059 // field in this list has a non-empty value. This may be used to include 7060 // null fields in Patch requests. 7061 NullFields []string `json:"-"` 7062} 7063 7064func (s *WorkerMessageResponse) MarshalJSON() ([]byte, error) { 7065 type NoMethod WorkerMessageResponse 7066 raw := NoMethod(*s) 7067 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7068} 7069 7070// WorkerPool: Describes one particular pool of Cloud Dataflow workers 7071// to be 7072// instantiated by the Cloud Dataflow service in order to perform 7073// the 7074// computations required by a job. Note that a workflow job may 7075// use 7076// multiple pools, in order to match the various 7077// computational 7078// requirements of the various stages of the job. 7079type WorkerPool struct { 7080 // AutoscalingSettings: Settings for autoscaling of this WorkerPool. 7081 AutoscalingSettings *AutoscalingSettings `json:"autoscalingSettings,omitempty"` 7082 7083 // DataDisks: Data disks that are used by a VM in this workflow. 7084 DataDisks []*Disk `json:"dataDisks,omitempty"` 7085 7086 // DefaultPackageSet: The default package set to install. This allows 7087 // the service to 7088 // select a default set of packages which are useful to worker 7089 // harnesses written in a particular language. 7090 // 7091 // Possible values: 7092 // "DEFAULT_PACKAGE_SET_UNKNOWN" - The default set of packages to 7093 // stage is unknown, or unspecified. 7094 // "DEFAULT_PACKAGE_SET_NONE" - Indicates that no packages should be 7095 // staged at the worker unless 7096 // explicitly specified by the job. 7097 // "DEFAULT_PACKAGE_SET_JAVA" - Stage packages typically useful to 7098 // workers written in Java. 7099 // "DEFAULT_PACKAGE_SET_PYTHON" - Stage pacakges typically useful to 7100 // workers written in Python. 7101 DefaultPackageSet string `json:"defaultPackageSet,omitempty"` 7102 7103 // DiskSizeGb: Size of root disk for VMs, in GB. If zero or 7104 // unspecified, the service will 7105 // attempt to choose a reasonable default. 7106 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 7107 7108 // DiskSourceImage: Fully qualified source image for disks. 7109 DiskSourceImage string `json:"diskSourceImage,omitempty"` 7110 7111 // DiskType: Type of root disk for VMs. If empty or unspecified, the 7112 // service will 7113 // attempt to choose a reasonable default. 7114 DiskType string `json:"diskType,omitempty"` 7115 7116 // IpConfiguration: Configuration for VM IPs. 7117 // 7118 // Possible values: 7119 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or 7120 // unspecified. 7121 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 7122 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 7123 IpConfiguration string `json:"ipConfiguration,omitempty"` 7124 7125 // Kind: The kind of the worker pool; currently only `harness` and 7126 // `shuffle` 7127 // are supported. 7128 Kind string `json:"kind,omitempty"` 7129 7130 // MachineType: Machine type (e.g. "n1-standard-1"). If empty or 7131 // unspecified, the 7132 // service will attempt to choose a reasonable default. 7133 MachineType string `json:"machineType,omitempty"` 7134 7135 // Metadata: Metadata to set on the Google Compute Engine VMs. 7136 Metadata map[string]string `json:"metadata,omitempty"` 7137 7138 // Network: Network to which VMs will be assigned. If empty or 7139 // unspecified, 7140 // the service will use the network "default". 7141 Network string `json:"network,omitempty"` 7142 7143 // NumThreadsPerWorker: The number of threads per worker harness. If 7144 // empty or unspecified, the 7145 // service will choose a number of threads (according to the number of 7146 // cores 7147 // on the selected machine type for batch, or 1 by convention for 7148 // streaming). 7149 NumThreadsPerWorker int64 `json:"numThreadsPerWorker,omitempty"` 7150 7151 // NumWorkers: Number of Google Compute Engine workers in this pool 7152 // needed to 7153 // execute the job. If zero or unspecified, the service will 7154 // attempt to choose a reasonable default. 7155 NumWorkers int64 `json:"numWorkers,omitempty"` 7156 7157 // OnHostMaintenance: The action to take on host maintenance, as defined 7158 // by the Google 7159 // Compute Engine API. 7160 OnHostMaintenance string `json:"onHostMaintenance,omitempty"` 7161 7162 // Packages: Packages to be installed on workers. 7163 Packages []*Package `json:"packages,omitempty"` 7164 7165 // PoolArgs: Extra arguments for this worker pool. 7166 PoolArgs googleapi.RawMessage `json:"poolArgs,omitempty"` 7167 7168 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. 7169 // Expected to be of 7170 // the form "regions/REGION/subnetworks/SUBNETWORK". 7171 Subnetwork string `json:"subnetwork,omitempty"` 7172 7173 // TaskrunnerSettings: Settings passed through to Google Compute Engine 7174 // workers when 7175 // using the standard Dataflow task runner. Users should ignore 7176 // this field. 7177 TaskrunnerSettings *TaskRunnerSettings `json:"taskrunnerSettings,omitempty"` 7178 7179 // TeardownPolicy: Sets the policy for determining when to turndown 7180 // worker pool. 7181 // Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, 7182 // and 7183 // `TEARDOWN_NEVER`. 7184 // `TEARDOWN_ALWAYS` means workers are always torn down regardless of 7185 // whether 7186 // the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn 7187 // down 7188 // if the job succeeds. `TEARDOWN_NEVER` means the workers are never 7189 // torn 7190 // down. 7191 // 7192 // If the workers are not torn down by the service, they will 7193 // continue to run and use Google Compute Engine VM resources in 7194 // the 7195 // user's project until they are explicitly terminated by the 7196 // user. 7197 // Because of this, Google recommends using the `TEARDOWN_ALWAYS` 7198 // policy except for small, manually supervised test jobs. 7199 // 7200 // If unknown or unspecified, the service will attempt to choose a 7201 // reasonable 7202 // default. 7203 // 7204 // Possible values: 7205 // "TEARDOWN_POLICY_UNKNOWN" - The teardown policy isn't specified, or 7206 // is unknown. 7207 // "TEARDOWN_ALWAYS" - Always teardown the resource. 7208 // "TEARDOWN_ON_SUCCESS" - Teardown the resource on success. This is 7209 // useful for debugging 7210 // failures. 7211 // "TEARDOWN_NEVER" - Never teardown the resource. This is useful for 7212 // debugging and 7213 // development. 7214 TeardownPolicy string `json:"teardownPolicy,omitempty"` 7215 7216 // WorkerHarnessContainerImage: Required. Docker container image that 7217 // executes the Cloud Dataflow worker 7218 // harness, residing in Google Container Registry. 7219 WorkerHarnessContainerImage string `json:"workerHarnessContainerImage,omitempty"` 7220 7221 // Zone: Zone to run the worker pools in. If empty or unspecified, the 7222 // service 7223 // will attempt to choose a reasonable default. 7224 Zone string `json:"zone,omitempty"` 7225 7226 // ForceSendFields is a list of field names (e.g. "AutoscalingSettings") 7227 // to unconditionally include in API requests. By default, fields with 7228 // empty values are omitted from API requests. However, any non-pointer, 7229 // non-interface field appearing in ForceSendFields will be sent to the 7230 // server regardless of whether the field is empty or not. This may be 7231 // used to include empty fields in Patch requests. 7232 ForceSendFields []string `json:"-"` 7233 7234 // NullFields is a list of field names (e.g. "AutoscalingSettings") to 7235 // include in API requests with the JSON null value. By default, fields 7236 // with empty values are omitted from API requests. However, any field 7237 // with an empty value appearing in NullFields will be sent to the 7238 // server as null. It is an error if a field in this list has a 7239 // non-empty value. This may be used to include null fields in Patch 7240 // requests. 7241 NullFields []string `json:"-"` 7242} 7243 7244func (s *WorkerPool) MarshalJSON() ([]byte, error) { 7245 type NoMethod WorkerPool 7246 raw := NoMethod(*s) 7247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7248} 7249 7250// WorkerSettings: Provides data to pass through to the worker harness. 7251type WorkerSettings struct { 7252 // BaseUrl: The base URL for accessing Google Cloud APIs. 7253 // 7254 // When workers access Google Cloud APIs, they logically do so 7255 // via 7256 // relative URLs. If this field is specified, it supplies the base 7257 // URL to use for resolving these relative URLs. The 7258 // normative 7259 // algorithm used is defined by RFC 1808, "Relative Uniform 7260 // Resource 7261 // Locators". 7262 // 7263 // If not specified, the default value is "http://www.googleapis.com/" 7264 BaseUrl string `json:"baseUrl,omitempty"` 7265 7266 // ReportingEnabled: Whether to send work progress updates to the 7267 // service. 7268 ReportingEnabled bool `json:"reportingEnabled,omitempty"` 7269 7270 // ServicePath: The Cloud Dataflow service path relative to the root 7271 // URL, for example, 7272 // "dataflow/v1b3/projects". 7273 ServicePath string `json:"servicePath,omitempty"` 7274 7275 // ShuffleServicePath: The Shuffle service path relative to the root 7276 // URL, for example, 7277 // "shuffle/v1beta1". 7278 ShuffleServicePath string `json:"shuffleServicePath,omitempty"` 7279 7280 // TempStoragePrefix: The prefix of the resources the system should use 7281 // for temporary 7282 // storage. 7283 // 7284 // The supported resource type is: 7285 // 7286 // Google Cloud Storage: 7287 // 7288 // storage.googleapis.com/{bucket}/{object} 7289 // bucket.storage.googleapis.com/{object} 7290 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 7291 7292 // WorkerId: The ID of the worker running this pipeline. 7293 WorkerId string `json:"workerId,omitempty"` 7294 7295 // ForceSendFields is a list of field names (e.g. "BaseUrl") to 7296 // unconditionally include in API requests. By default, fields with 7297 // empty values are omitted from API requests. However, any non-pointer, 7298 // non-interface field appearing in ForceSendFields will be sent to the 7299 // server regardless of whether the field is empty or not. This may be 7300 // used to include empty fields in Patch requests. 7301 ForceSendFields []string `json:"-"` 7302 7303 // NullFields is a list of field names (e.g. "BaseUrl") to include in 7304 // API requests with the JSON null value. By default, fields with empty 7305 // values are omitted from API requests. However, any field with an 7306 // empty value appearing in NullFields will be sent to the server as 7307 // null. It is an error if a field in this list has a non-empty value. 7308 // This may be used to include null fields in Patch requests. 7309 NullFields []string `json:"-"` 7310} 7311 7312func (s *WorkerSettings) MarshalJSON() ([]byte, error) { 7313 type NoMethod WorkerSettings 7314 raw := NoMethod(*s) 7315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7316} 7317 7318// WorkerShutdownNotice: Shutdown notification from workers. This is to 7319// be sent by the shutdown 7320// script of the worker VM so that the backend knows that the VM is 7321// being 7322// shut down. 7323type WorkerShutdownNotice struct { 7324 // Reason: The reason for the worker shutdown. 7325 // Current possible values are: 7326 // "UNKNOWN": shutdown reason is unknown. 7327 // "PREEMPTION": shutdown reason is preemption. 7328 // Other possible reasons may be added in the future. 7329 Reason string `json:"reason,omitempty"` 7330 7331 // ForceSendFields is a list of field names (e.g. "Reason") to 7332 // unconditionally include in API requests. By default, fields with 7333 // empty values are omitted from API requests. However, any non-pointer, 7334 // non-interface field appearing in ForceSendFields will be sent to the 7335 // server regardless of whether the field is empty or not. This may be 7336 // used to include empty fields in Patch requests. 7337 ForceSendFields []string `json:"-"` 7338 7339 // NullFields is a list of field names (e.g. "Reason") to include in API 7340 // requests with the JSON null value. By default, fields with empty 7341 // values are omitted from API requests. However, any field with an 7342 // empty value appearing in NullFields will be sent to the server as 7343 // null. It is an error if a field in this list has a non-empty value. 7344 // This may be used to include null fields in Patch requests. 7345 NullFields []string `json:"-"` 7346} 7347 7348func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) { 7349 type NoMethod WorkerShutdownNotice 7350 raw := NoMethod(*s) 7351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7352} 7353 7354// WorkerShutdownNoticeResponse: Service-side response to WorkerMessage 7355// issuing shutdown notice. 7356type WorkerShutdownNoticeResponse struct { 7357} 7358 7359// WriteInstruction: An instruction that writes records. 7360// Takes one input, produces no outputs. 7361type WriteInstruction struct { 7362 // Input: The input. 7363 Input *InstructionInput `json:"input,omitempty"` 7364 7365 // Sink: The sink to write to. 7366 Sink *Sink `json:"sink,omitempty"` 7367 7368 // ForceSendFields is a list of field names (e.g. "Input") to 7369 // unconditionally include in API requests. By default, fields with 7370 // empty values are omitted from API requests. However, any non-pointer, 7371 // non-interface field appearing in ForceSendFields will be sent to the 7372 // server regardless of whether the field is empty or not. This may be 7373 // used to include empty fields in Patch requests. 7374 ForceSendFields []string `json:"-"` 7375 7376 // NullFields is a list of field names (e.g. "Input") to include in API 7377 // requests with the JSON null value. By default, fields with empty 7378 // values are omitted from API requests. However, any field with an 7379 // empty value appearing in NullFields will be sent to the server as 7380 // null. It is an error if a field in this list has a non-empty value. 7381 // This may be used to include null fields in Patch requests. 7382 NullFields []string `json:"-"` 7383} 7384 7385func (s *WriteInstruction) MarshalJSON() ([]byte, error) { 7386 type NoMethod WriteInstruction 7387 raw := NoMethod(*s) 7388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7389} 7390 7391// method id "dataflow.projects.workerMessages": 7392 7393type ProjectsWorkerMessagesCall struct { 7394 s *Service 7395 projectId string 7396 sendworkermessagesrequest *SendWorkerMessagesRequest 7397 urlParams_ gensupport.URLParams 7398 ctx_ context.Context 7399 header_ http.Header 7400} 7401 7402// WorkerMessages: Send a worker_message to the service. 7403func (r *ProjectsService) WorkerMessages(projectId string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsWorkerMessagesCall { 7404 c := &ProjectsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7405 c.projectId = projectId 7406 c.sendworkermessagesrequest = sendworkermessagesrequest 7407 return c 7408} 7409 7410// Fields allows partial responses to be retrieved. See 7411// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7412// for more information. 7413func (c *ProjectsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsWorkerMessagesCall { 7414 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7415 return c 7416} 7417 7418// Context sets the context to be used in this call's Do method. Any 7419// pending HTTP request will be aborted if the provided context is 7420// canceled. 7421func (c *ProjectsWorkerMessagesCall) Context(ctx context.Context) *ProjectsWorkerMessagesCall { 7422 c.ctx_ = ctx 7423 return c 7424} 7425 7426// Header returns an http.Header that can be modified by the caller to 7427// add HTTP headers to the request. 7428func (c *ProjectsWorkerMessagesCall) Header() http.Header { 7429 if c.header_ == nil { 7430 c.header_ = make(http.Header) 7431 } 7432 return c.header_ 7433} 7434 7435func (c *ProjectsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) { 7436 reqHeaders := make(http.Header) 7437 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7438 for k, v := range c.header_ { 7439 reqHeaders[k] = v 7440 } 7441 reqHeaders.Set("User-Agent", c.s.userAgent()) 7442 var body io.Reader = nil 7443 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest) 7444 if err != nil { 7445 return nil, err 7446 } 7447 reqHeaders.Set("Content-Type", "application/json") 7448 c.urlParams_.Set("alt", alt) 7449 c.urlParams_.Set("prettyPrint", "false") 7450 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/WorkerMessages") 7451 urls += "?" + c.urlParams_.Encode() 7452 req, err := http.NewRequest("POST", urls, body) 7453 if err != nil { 7454 return nil, err 7455 } 7456 req.Header = reqHeaders 7457 googleapi.Expand(req.URL, map[string]string{ 7458 "projectId": c.projectId, 7459 }) 7460 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7461} 7462 7463// Do executes the "dataflow.projects.workerMessages" call. 7464// Exactly one of *SendWorkerMessagesResponse or error will be non-nil. 7465// Any non-2xx status code is an error. Response headers are in either 7466// *SendWorkerMessagesResponse.ServerResponse.Header or (if a response 7467// was returned at all) in error.(*googleapi.Error).Header. Use 7468// googleapi.IsNotModified to check whether the returned error was 7469// because http.StatusNotModified was returned. 7470func (c *ProjectsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) { 7471 gensupport.SetOptions(c.urlParams_, opts...) 7472 res, err := c.doRequest("json") 7473 if res != nil && res.StatusCode == http.StatusNotModified { 7474 if res.Body != nil { 7475 res.Body.Close() 7476 } 7477 return nil, &googleapi.Error{ 7478 Code: res.StatusCode, 7479 Header: res.Header, 7480 } 7481 } 7482 if err != nil { 7483 return nil, err 7484 } 7485 defer googleapi.CloseBody(res) 7486 if err := googleapi.CheckResponse(res); err != nil { 7487 return nil, err 7488 } 7489 ret := &SendWorkerMessagesResponse{ 7490 ServerResponse: googleapi.ServerResponse{ 7491 Header: res.Header, 7492 HTTPStatusCode: res.StatusCode, 7493 }, 7494 } 7495 target := &ret 7496 if err := gensupport.DecodeResponse(target, res); err != nil { 7497 return nil, err 7498 } 7499 return ret, nil 7500 // { 7501 // "description": "Send a worker_message to the service.", 7502 // "flatPath": "v1b3/projects/{projectId}/WorkerMessages", 7503 // "httpMethod": "POST", 7504 // "id": "dataflow.projects.workerMessages", 7505 // "parameterOrder": [ 7506 // "projectId" 7507 // ], 7508 // "parameters": { 7509 // "projectId": { 7510 // "description": "The project to send the WorkerMessages to.", 7511 // "location": "path", 7512 // "required": true, 7513 // "type": "string" 7514 // } 7515 // }, 7516 // "path": "v1b3/projects/{projectId}/WorkerMessages", 7517 // "request": { 7518 // "$ref": "SendWorkerMessagesRequest" 7519 // }, 7520 // "response": { 7521 // "$ref": "SendWorkerMessagesResponse" 7522 // }, 7523 // "scopes": [ 7524 // "https://www.googleapis.com/auth/cloud-platform", 7525 // "https://www.googleapis.com/auth/compute", 7526 // "https://www.googleapis.com/auth/compute.readonly", 7527 // "https://www.googleapis.com/auth/userinfo.email" 7528 // ] 7529 // } 7530 7531} 7532 7533// method id "dataflow.projects.jobs.aggregated": 7534 7535type ProjectsJobsAggregatedCall struct { 7536 s *Service 7537 projectId string 7538 urlParams_ gensupport.URLParams 7539 ifNoneMatch_ string 7540 ctx_ context.Context 7541 header_ http.Header 7542} 7543 7544// Aggregated: List the jobs of a project across all regions. 7545func (r *ProjectsJobsService) Aggregated(projectId string) *ProjectsJobsAggregatedCall { 7546 c := &ProjectsJobsAggregatedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7547 c.projectId = projectId 7548 return c 7549} 7550 7551// Filter sets the optional parameter "filter": The kind of filter to 7552// use. 7553// 7554// Possible values: 7555// "UNKNOWN" 7556// "ALL" 7557// "TERMINATED" 7558// "ACTIVE" 7559func (c *ProjectsJobsAggregatedCall) Filter(filter string) *ProjectsJobsAggregatedCall { 7560 c.urlParams_.Set("filter", filter) 7561 return c 7562} 7563 7564// Location sets the optional parameter "location": The [regional 7565// endpoint] 7566// (https://cloud.google.com/dataflow/docs/concepts/regional-en 7567// dpoints) that 7568// contains this job. 7569func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggregatedCall { 7570 c.urlParams_.Set("location", location) 7571 return c 7572} 7573 7574// PageSize sets the optional parameter "pageSize": If there are many 7575// jobs, limit response to at most this many. 7576// The actual number of jobs returned will be the lesser of 7577// max_responses 7578// and an unspecified server-defined limit. 7579func (c *ProjectsJobsAggregatedCall) PageSize(pageSize int64) *ProjectsJobsAggregatedCall { 7580 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7581 return c 7582} 7583 7584// PageToken sets the optional parameter "pageToken": Set this to the 7585// 'next_page_token' field of a previous response 7586// to request additional results in a long list. 7587func (c *ProjectsJobsAggregatedCall) PageToken(pageToken string) *ProjectsJobsAggregatedCall { 7588 c.urlParams_.Set("pageToken", pageToken) 7589 return c 7590} 7591 7592// View sets the optional parameter "view": Level of information 7593// requested in response. Default is `JOB_VIEW_SUMMARY`. 7594// 7595// Possible values: 7596// "JOB_VIEW_UNKNOWN" 7597// "JOB_VIEW_SUMMARY" 7598// "JOB_VIEW_ALL" 7599// "JOB_VIEW_DESCRIPTION" 7600func (c *ProjectsJobsAggregatedCall) View(view string) *ProjectsJobsAggregatedCall { 7601 c.urlParams_.Set("view", view) 7602 return c 7603} 7604 7605// Fields allows partial responses to be retrieved. See 7606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7607// for more information. 7608func (c *ProjectsJobsAggregatedCall) Fields(s ...googleapi.Field) *ProjectsJobsAggregatedCall { 7609 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7610 return c 7611} 7612 7613// IfNoneMatch sets the optional parameter which makes the operation 7614// fail if the object's ETag matches the given value. This is useful for 7615// getting updates only after the object has changed since the last 7616// request. Use googleapi.IsNotModified to check whether the response 7617// error from Do is the result of In-None-Match. 7618func (c *ProjectsJobsAggregatedCall) IfNoneMatch(entityTag string) *ProjectsJobsAggregatedCall { 7619 c.ifNoneMatch_ = entityTag 7620 return c 7621} 7622 7623// Context sets the context to be used in this call's Do method. Any 7624// pending HTTP request will be aborted if the provided context is 7625// canceled. 7626func (c *ProjectsJobsAggregatedCall) Context(ctx context.Context) *ProjectsJobsAggregatedCall { 7627 c.ctx_ = ctx 7628 return c 7629} 7630 7631// Header returns an http.Header that can be modified by the caller to 7632// add HTTP headers to the request. 7633func (c *ProjectsJobsAggregatedCall) Header() http.Header { 7634 if c.header_ == nil { 7635 c.header_ = make(http.Header) 7636 } 7637 return c.header_ 7638} 7639 7640func (c *ProjectsJobsAggregatedCall) doRequest(alt string) (*http.Response, error) { 7641 reqHeaders := make(http.Header) 7642 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7643 for k, v := range c.header_ { 7644 reqHeaders[k] = v 7645 } 7646 reqHeaders.Set("User-Agent", c.s.userAgent()) 7647 if c.ifNoneMatch_ != "" { 7648 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7649 } 7650 var body io.Reader = nil 7651 c.urlParams_.Set("alt", alt) 7652 c.urlParams_.Set("prettyPrint", "false") 7653 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs:aggregated") 7654 urls += "?" + c.urlParams_.Encode() 7655 req, err := http.NewRequest("GET", urls, body) 7656 if err != nil { 7657 return nil, err 7658 } 7659 req.Header = reqHeaders 7660 googleapi.Expand(req.URL, map[string]string{ 7661 "projectId": c.projectId, 7662 }) 7663 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7664} 7665 7666// Do executes the "dataflow.projects.jobs.aggregated" call. 7667// Exactly one of *ListJobsResponse or error will be non-nil. Any 7668// non-2xx status code is an error. Response headers are in either 7669// *ListJobsResponse.ServerResponse.Header or (if a response was 7670// returned at all) in error.(*googleapi.Error).Header. Use 7671// googleapi.IsNotModified to check whether the returned error was 7672// because http.StatusNotModified was returned. 7673func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 7674 gensupport.SetOptions(c.urlParams_, opts...) 7675 res, err := c.doRequest("json") 7676 if res != nil && res.StatusCode == http.StatusNotModified { 7677 if res.Body != nil { 7678 res.Body.Close() 7679 } 7680 return nil, &googleapi.Error{ 7681 Code: res.StatusCode, 7682 Header: res.Header, 7683 } 7684 } 7685 if err != nil { 7686 return nil, err 7687 } 7688 defer googleapi.CloseBody(res) 7689 if err := googleapi.CheckResponse(res); err != nil { 7690 return nil, err 7691 } 7692 ret := &ListJobsResponse{ 7693 ServerResponse: googleapi.ServerResponse{ 7694 Header: res.Header, 7695 HTTPStatusCode: res.StatusCode, 7696 }, 7697 } 7698 target := &ret 7699 if err := gensupport.DecodeResponse(target, res); err != nil { 7700 return nil, err 7701 } 7702 return ret, nil 7703 // { 7704 // "description": "List the jobs of a project across all regions.", 7705 // "flatPath": "v1b3/projects/{projectId}/jobs:aggregated", 7706 // "httpMethod": "GET", 7707 // "id": "dataflow.projects.jobs.aggregated", 7708 // "parameterOrder": [ 7709 // "projectId" 7710 // ], 7711 // "parameters": { 7712 // "filter": { 7713 // "description": "The kind of filter to use.", 7714 // "enum": [ 7715 // "UNKNOWN", 7716 // "ALL", 7717 // "TERMINATED", 7718 // "ACTIVE" 7719 // ], 7720 // "location": "query", 7721 // "type": "string" 7722 // }, 7723 // "location": { 7724 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 7725 // "location": "query", 7726 // "type": "string" 7727 // }, 7728 // "pageSize": { 7729 // "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", 7730 // "format": "int32", 7731 // "location": "query", 7732 // "type": "integer" 7733 // }, 7734 // "pageToken": { 7735 // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", 7736 // "location": "query", 7737 // "type": "string" 7738 // }, 7739 // "projectId": { 7740 // "description": "The project which owns the jobs.", 7741 // "location": "path", 7742 // "required": true, 7743 // "type": "string" 7744 // }, 7745 // "view": { 7746 // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", 7747 // "enum": [ 7748 // "JOB_VIEW_UNKNOWN", 7749 // "JOB_VIEW_SUMMARY", 7750 // "JOB_VIEW_ALL", 7751 // "JOB_VIEW_DESCRIPTION" 7752 // ], 7753 // "location": "query", 7754 // "type": "string" 7755 // } 7756 // }, 7757 // "path": "v1b3/projects/{projectId}/jobs:aggregated", 7758 // "response": { 7759 // "$ref": "ListJobsResponse" 7760 // }, 7761 // "scopes": [ 7762 // "https://www.googleapis.com/auth/cloud-platform", 7763 // "https://www.googleapis.com/auth/compute", 7764 // "https://www.googleapis.com/auth/compute.readonly", 7765 // "https://www.googleapis.com/auth/userinfo.email" 7766 // ] 7767 // } 7768 7769} 7770 7771// Pages invokes f for each page of results. 7772// A non-nil error returned from f will halt the iteration. 7773// The provided context supersedes any context provided to the Context method. 7774func (c *ProjectsJobsAggregatedCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 7775 c.ctx_ = ctx 7776 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7777 for { 7778 x, err := c.Do() 7779 if err != nil { 7780 return err 7781 } 7782 if err := f(x); err != nil { 7783 return err 7784 } 7785 if x.NextPageToken == "" { 7786 return nil 7787 } 7788 c.PageToken(x.NextPageToken) 7789 } 7790} 7791 7792// method id "dataflow.projects.jobs.create": 7793 7794type ProjectsJobsCreateCall struct { 7795 s *Service 7796 projectId string 7797 job *Job 7798 urlParams_ gensupport.URLParams 7799 ctx_ context.Context 7800 header_ http.Header 7801} 7802 7803// Create: Creates a Cloud Dataflow job. 7804// 7805// To create a job, we recommend using `projects.locations.jobs.create` 7806// with a 7807// [regional 7808// endpoint] 7809// (https://cloud.google.com/dataflow/docs/concepts/regional-en 7810// dpoints). Using 7811// `projects.jobs.create` is not recommended, as your job will always 7812// start 7813// in `us-central1`. 7814func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCreateCall { 7815 c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7816 c.projectId = projectId 7817 c.job = job 7818 return c 7819} 7820 7821// Location sets the optional parameter "location": The [regional 7822// endpoint] 7823// (https://cloud.google.com/dataflow/docs/concepts/regional-en 7824// dpoints) that 7825// contains this job. 7826func (c *ProjectsJobsCreateCall) Location(location string) *ProjectsJobsCreateCall { 7827 c.urlParams_.Set("location", location) 7828 return c 7829} 7830 7831// ReplaceJobId sets the optional parameter "replaceJobId": Deprecated. 7832// This field is now in the Job message. 7833func (c *ProjectsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsJobsCreateCall { 7834 c.urlParams_.Set("replaceJobId", replaceJobId) 7835 return c 7836} 7837 7838// View sets the optional parameter "view": The level of information 7839// requested in response. 7840// 7841// Possible values: 7842// "JOB_VIEW_UNKNOWN" 7843// "JOB_VIEW_SUMMARY" 7844// "JOB_VIEW_ALL" 7845// "JOB_VIEW_DESCRIPTION" 7846func (c *ProjectsJobsCreateCall) View(view string) *ProjectsJobsCreateCall { 7847 c.urlParams_.Set("view", view) 7848 return c 7849} 7850 7851// Fields allows partial responses to be retrieved. See 7852// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7853// for more information. 7854func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall { 7855 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7856 return c 7857} 7858 7859// Context sets the context to be used in this call's Do method. Any 7860// pending HTTP request will be aborted if the provided context is 7861// canceled. 7862func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall { 7863 c.ctx_ = ctx 7864 return c 7865} 7866 7867// Header returns an http.Header that can be modified by the caller to 7868// add HTTP headers to the request. 7869func (c *ProjectsJobsCreateCall) Header() http.Header { 7870 if c.header_ == nil { 7871 c.header_ = make(http.Header) 7872 } 7873 return c.header_ 7874} 7875 7876func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) { 7877 reqHeaders := make(http.Header) 7878 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7879 for k, v := range c.header_ { 7880 reqHeaders[k] = v 7881 } 7882 reqHeaders.Set("User-Agent", c.s.userAgent()) 7883 var body io.Reader = nil 7884 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 7885 if err != nil { 7886 return nil, err 7887 } 7888 reqHeaders.Set("Content-Type", "application/json") 7889 c.urlParams_.Set("alt", alt) 7890 c.urlParams_.Set("prettyPrint", "false") 7891 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") 7892 urls += "?" + c.urlParams_.Encode() 7893 req, err := http.NewRequest("POST", urls, body) 7894 if err != nil { 7895 return nil, err 7896 } 7897 req.Header = reqHeaders 7898 googleapi.Expand(req.URL, map[string]string{ 7899 "projectId": c.projectId, 7900 }) 7901 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7902} 7903 7904// Do executes the "dataflow.projects.jobs.create" call. 7905// Exactly one of *Job or error will be non-nil. Any non-2xx status code 7906// is an error. Response headers are in either 7907// *Job.ServerResponse.Header or (if a response was returned at all) in 7908// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7909// whether the returned error was because http.StatusNotModified was 7910// returned. 7911func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 7912 gensupport.SetOptions(c.urlParams_, opts...) 7913 res, err := c.doRequest("json") 7914 if res != nil && res.StatusCode == http.StatusNotModified { 7915 if res.Body != nil { 7916 res.Body.Close() 7917 } 7918 return nil, &googleapi.Error{ 7919 Code: res.StatusCode, 7920 Header: res.Header, 7921 } 7922 } 7923 if err != nil { 7924 return nil, err 7925 } 7926 defer googleapi.CloseBody(res) 7927 if err := googleapi.CheckResponse(res); err != nil { 7928 return nil, err 7929 } 7930 ret := &Job{ 7931 ServerResponse: googleapi.ServerResponse{ 7932 Header: res.Header, 7933 HTTPStatusCode: res.StatusCode, 7934 }, 7935 } 7936 target := &ret 7937 if err := gensupport.DecodeResponse(target, res); err != nil { 7938 return nil, err 7939 } 7940 return ret, nil 7941 // { 7942 // "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.", 7943 // "flatPath": "v1b3/projects/{projectId}/jobs", 7944 // "httpMethod": "POST", 7945 // "id": "dataflow.projects.jobs.create", 7946 // "parameterOrder": [ 7947 // "projectId" 7948 // ], 7949 // "parameters": { 7950 // "location": { 7951 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 7952 // "location": "query", 7953 // "type": "string" 7954 // }, 7955 // "projectId": { 7956 // "description": "The ID of the Cloud Platform project that the job belongs to.", 7957 // "location": "path", 7958 // "required": true, 7959 // "type": "string" 7960 // }, 7961 // "replaceJobId": { 7962 // "description": "Deprecated. This field is now in the Job message.", 7963 // "location": "query", 7964 // "type": "string" 7965 // }, 7966 // "view": { 7967 // "description": "The level of information requested in response.", 7968 // "enum": [ 7969 // "JOB_VIEW_UNKNOWN", 7970 // "JOB_VIEW_SUMMARY", 7971 // "JOB_VIEW_ALL", 7972 // "JOB_VIEW_DESCRIPTION" 7973 // ], 7974 // "location": "query", 7975 // "type": "string" 7976 // } 7977 // }, 7978 // "path": "v1b3/projects/{projectId}/jobs", 7979 // "request": { 7980 // "$ref": "Job" 7981 // }, 7982 // "response": { 7983 // "$ref": "Job" 7984 // }, 7985 // "scopes": [ 7986 // "https://www.googleapis.com/auth/cloud-platform", 7987 // "https://www.googleapis.com/auth/compute", 7988 // "https://www.googleapis.com/auth/compute.readonly", 7989 // "https://www.googleapis.com/auth/userinfo.email" 7990 // ] 7991 // } 7992 7993} 7994 7995// method id "dataflow.projects.jobs.get": 7996 7997type ProjectsJobsGetCall struct { 7998 s *Service 7999 projectId string 8000 jobId string 8001 urlParams_ gensupport.URLParams 8002 ifNoneMatch_ string 8003 ctx_ context.Context 8004 header_ http.Header 8005} 8006 8007// Get: Gets the state of the specified Cloud Dataflow job. 8008// 8009// To get the state of a job, we recommend using 8010// `projects.locations.jobs.get` 8011// with a [regional 8012// endpoint] 8013// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8014// dpoints). Using 8015// `projects.jobs.get` is not recommended, as you can only get the state 8016// of 8017// jobs that are running in `us-central1`. 8018func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall { 8019 c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8020 c.projectId = projectId 8021 c.jobId = jobId 8022 return c 8023} 8024 8025// Location sets the optional parameter "location": The [regional 8026// endpoint] 8027// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8028// dpoints) that 8029// contains this job. 8030func (c *ProjectsJobsGetCall) Location(location string) *ProjectsJobsGetCall { 8031 c.urlParams_.Set("location", location) 8032 return c 8033} 8034 8035// View sets the optional parameter "view": The level of information 8036// requested in response. 8037// 8038// Possible values: 8039// "JOB_VIEW_UNKNOWN" 8040// "JOB_VIEW_SUMMARY" 8041// "JOB_VIEW_ALL" 8042// "JOB_VIEW_DESCRIPTION" 8043func (c *ProjectsJobsGetCall) View(view string) *ProjectsJobsGetCall { 8044 c.urlParams_.Set("view", view) 8045 return c 8046} 8047 8048// Fields allows partial responses to be retrieved. See 8049// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8050// for more information. 8051func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall { 8052 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8053 return c 8054} 8055 8056// IfNoneMatch sets the optional parameter which makes the operation 8057// fail if the object's ETag matches the given value. This is useful for 8058// getting updates only after the object has changed since the last 8059// request. Use googleapi.IsNotModified to check whether the response 8060// error from Do is the result of In-None-Match. 8061func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall { 8062 c.ifNoneMatch_ = entityTag 8063 return c 8064} 8065 8066// Context sets the context to be used in this call's Do method. Any 8067// pending HTTP request will be aborted if the provided context is 8068// canceled. 8069func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall { 8070 c.ctx_ = ctx 8071 return c 8072} 8073 8074// Header returns an http.Header that can be modified by the caller to 8075// add HTTP headers to the request. 8076func (c *ProjectsJobsGetCall) Header() http.Header { 8077 if c.header_ == nil { 8078 c.header_ = make(http.Header) 8079 } 8080 return c.header_ 8081} 8082 8083func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) { 8084 reqHeaders := make(http.Header) 8085 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8086 for k, v := range c.header_ { 8087 reqHeaders[k] = v 8088 } 8089 reqHeaders.Set("User-Agent", c.s.userAgent()) 8090 if c.ifNoneMatch_ != "" { 8091 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8092 } 8093 var body io.Reader = nil 8094 c.urlParams_.Set("alt", alt) 8095 c.urlParams_.Set("prettyPrint", "false") 8096 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") 8097 urls += "?" + c.urlParams_.Encode() 8098 req, err := http.NewRequest("GET", urls, body) 8099 if err != nil { 8100 return nil, err 8101 } 8102 req.Header = reqHeaders 8103 googleapi.Expand(req.URL, map[string]string{ 8104 "projectId": c.projectId, 8105 "jobId": c.jobId, 8106 }) 8107 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8108} 8109 8110// Do executes the "dataflow.projects.jobs.get" call. 8111// Exactly one of *Job or error will be non-nil. Any non-2xx status code 8112// is an error. Response headers are in either 8113// *Job.ServerResponse.Header or (if a response was returned at all) in 8114// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8115// whether the returned error was because http.StatusNotModified was 8116// returned. 8117func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 8118 gensupport.SetOptions(c.urlParams_, opts...) 8119 res, err := c.doRequest("json") 8120 if res != nil && res.StatusCode == http.StatusNotModified { 8121 if res.Body != nil { 8122 res.Body.Close() 8123 } 8124 return nil, &googleapi.Error{ 8125 Code: res.StatusCode, 8126 Header: res.Header, 8127 } 8128 } 8129 if err != nil { 8130 return nil, err 8131 } 8132 defer googleapi.CloseBody(res) 8133 if err := googleapi.CheckResponse(res); err != nil { 8134 return nil, err 8135 } 8136 ret := &Job{ 8137 ServerResponse: googleapi.ServerResponse{ 8138 Header: res.Header, 8139 HTTPStatusCode: res.StatusCode, 8140 }, 8141 } 8142 target := &ret 8143 if err := gensupport.DecodeResponse(target, res); err != nil { 8144 return nil, err 8145 } 8146 return ret, nil 8147 // { 8148 // "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.", 8149 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", 8150 // "httpMethod": "GET", 8151 // "id": "dataflow.projects.jobs.get", 8152 // "parameterOrder": [ 8153 // "projectId", 8154 // "jobId" 8155 // ], 8156 // "parameters": { 8157 // "jobId": { 8158 // "description": "The job ID.", 8159 // "location": "path", 8160 // "required": true, 8161 // "type": "string" 8162 // }, 8163 // "location": { 8164 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 8165 // "location": "query", 8166 // "type": "string" 8167 // }, 8168 // "projectId": { 8169 // "description": "The ID of the Cloud Platform project that the job belongs to.", 8170 // "location": "path", 8171 // "required": true, 8172 // "type": "string" 8173 // }, 8174 // "view": { 8175 // "description": "The level of information requested in response.", 8176 // "enum": [ 8177 // "JOB_VIEW_UNKNOWN", 8178 // "JOB_VIEW_SUMMARY", 8179 // "JOB_VIEW_ALL", 8180 // "JOB_VIEW_DESCRIPTION" 8181 // ], 8182 // "location": "query", 8183 // "type": "string" 8184 // } 8185 // }, 8186 // "path": "v1b3/projects/{projectId}/jobs/{jobId}", 8187 // "response": { 8188 // "$ref": "Job" 8189 // }, 8190 // "scopes": [ 8191 // "https://www.googleapis.com/auth/cloud-platform", 8192 // "https://www.googleapis.com/auth/compute", 8193 // "https://www.googleapis.com/auth/compute.readonly", 8194 // "https://www.googleapis.com/auth/userinfo.email" 8195 // ] 8196 // } 8197 8198} 8199 8200// method id "dataflow.projects.jobs.getMetrics": 8201 8202type ProjectsJobsGetMetricsCall struct { 8203 s *Service 8204 projectId string 8205 jobId string 8206 urlParams_ gensupport.URLParams 8207 ifNoneMatch_ string 8208 ctx_ context.Context 8209 header_ http.Header 8210} 8211 8212// GetMetrics: Request the job status. 8213// 8214// To request the status of a job, we recommend 8215// using 8216// `projects.locations.jobs.getMetrics` with a [regional 8217// endpoint] 8218// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8219// dpoints). Using 8220// `projects.jobs.getMetrics` is not recommended, as you can only 8221// request the 8222// status of jobs that are running in `us-central1`. 8223func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *ProjectsJobsGetMetricsCall { 8224 c := &ProjectsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8225 c.projectId = projectId 8226 c.jobId = jobId 8227 return c 8228} 8229 8230// Location sets the optional parameter "location": The [regional 8231// endpoint] 8232// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8233// dpoints) that 8234// contains the job specified by job_id. 8235func (c *ProjectsJobsGetMetricsCall) Location(location string) *ProjectsJobsGetMetricsCall { 8236 c.urlParams_.Set("location", location) 8237 return c 8238} 8239 8240// StartTime sets the optional parameter "startTime": Return only metric 8241// data that has changed since this time. 8242// Default is to return all information about all metrics for the job. 8243func (c *ProjectsJobsGetMetricsCall) StartTime(startTime string) *ProjectsJobsGetMetricsCall { 8244 c.urlParams_.Set("startTime", startTime) 8245 return c 8246} 8247 8248// Fields allows partial responses to be retrieved. See 8249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8250// for more information. 8251func (c *ProjectsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsJobsGetMetricsCall { 8252 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8253 return c 8254} 8255 8256// IfNoneMatch sets the optional parameter which makes the operation 8257// fail if the object's ETag matches the given value. This is useful for 8258// getting updates only after the object has changed since the last 8259// request. Use googleapi.IsNotModified to check whether the response 8260// error from Do is the result of In-None-Match. 8261func (c *ProjectsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsJobsGetMetricsCall { 8262 c.ifNoneMatch_ = entityTag 8263 return c 8264} 8265 8266// Context sets the context to be used in this call's Do method. Any 8267// pending HTTP request will be aborted if the provided context is 8268// canceled. 8269func (c *ProjectsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsJobsGetMetricsCall { 8270 c.ctx_ = ctx 8271 return c 8272} 8273 8274// Header returns an http.Header that can be modified by the caller to 8275// add HTTP headers to the request. 8276func (c *ProjectsJobsGetMetricsCall) Header() http.Header { 8277 if c.header_ == nil { 8278 c.header_ = make(http.Header) 8279 } 8280 return c.header_ 8281} 8282 8283func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) { 8284 reqHeaders := make(http.Header) 8285 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8286 for k, v := range c.header_ { 8287 reqHeaders[k] = v 8288 } 8289 reqHeaders.Set("User-Agent", c.s.userAgent()) 8290 if c.ifNoneMatch_ != "" { 8291 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8292 } 8293 var body io.Reader = nil 8294 c.urlParams_.Set("alt", alt) 8295 c.urlParams_.Set("prettyPrint", "false") 8296 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/metrics") 8297 urls += "?" + c.urlParams_.Encode() 8298 req, err := http.NewRequest("GET", urls, body) 8299 if err != nil { 8300 return nil, err 8301 } 8302 req.Header = reqHeaders 8303 googleapi.Expand(req.URL, map[string]string{ 8304 "projectId": c.projectId, 8305 "jobId": c.jobId, 8306 }) 8307 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8308} 8309 8310// Do executes the "dataflow.projects.jobs.getMetrics" call. 8311// Exactly one of *JobMetrics or error will be non-nil. Any non-2xx 8312// status code is an error. Response headers are in either 8313// *JobMetrics.ServerResponse.Header or (if a response was returned at 8314// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8315// to check whether the returned error was because 8316// http.StatusNotModified was returned. 8317func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) { 8318 gensupport.SetOptions(c.urlParams_, opts...) 8319 res, err := c.doRequest("json") 8320 if res != nil && res.StatusCode == http.StatusNotModified { 8321 if res.Body != nil { 8322 res.Body.Close() 8323 } 8324 return nil, &googleapi.Error{ 8325 Code: res.StatusCode, 8326 Header: res.Header, 8327 } 8328 } 8329 if err != nil { 8330 return nil, err 8331 } 8332 defer googleapi.CloseBody(res) 8333 if err := googleapi.CheckResponse(res); err != nil { 8334 return nil, err 8335 } 8336 ret := &JobMetrics{ 8337 ServerResponse: googleapi.ServerResponse{ 8338 Header: res.Header, 8339 HTTPStatusCode: res.StatusCode, 8340 }, 8341 } 8342 target := &ret 8343 if err := gensupport.DecodeResponse(target, res); err != nil { 8344 return nil, err 8345 } 8346 return ret, nil 8347 // { 8348 // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.", 8349 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", 8350 // "httpMethod": "GET", 8351 // "id": "dataflow.projects.jobs.getMetrics", 8352 // "parameterOrder": [ 8353 // "projectId", 8354 // "jobId" 8355 // ], 8356 // "parameters": { 8357 // "jobId": { 8358 // "description": "The job to get messages for.", 8359 // "location": "path", 8360 // "required": true, 8361 // "type": "string" 8362 // }, 8363 // "location": { 8364 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", 8365 // "location": "query", 8366 // "type": "string" 8367 // }, 8368 // "projectId": { 8369 // "description": "A project id.", 8370 // "location": "path", 8371 // "required": true, 8372 // "type": "string" 8373 // }, 8374 // "startTime": { 8375 // "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", 8376 // "format": "google-datetime", 8377 // "location": "query", 8378 // "type": "string" 8379 // } 8380 // }, 8381 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", 8382 // "response": { 8383 // "$ref": "JobMetrics" 8384 // }, 8385 // "scopes": [ 8386 // "https://www.googleapis.com/auth/cloud-platform", 8387 // "https://www.googleapis.com/auth/compute", 8388 // "https://www.googleapis.com/auth/compute.readonly", 8389 // "https://www.googleapis.com/auth/userinfo.email" 8390 // ] 8391 // } 8392 8393} 8394 8395// method id "dataflow.projects.jobs.list": 8396 8397type ProjectsJobsListCall struct { 8398 s *Service 8399 projectId string 8400 urlParams_ gensupport.URLParams 8401 ifNoneMatch_ string 8402 ctx_ context.Context 8403 header_ http.Header 8404} 8405 8406// List: List the jobs of a project. 8407// 8408// To list the jobs of a project in a region, we recommend 8409// using 8410// `projects.locations.jobs.get` with a [regional 8411// endpoint] 8412// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8413// dpoints). To 8414// list the all jobs across all regions, use `projects.jobs.aggregated`. 8415// Using 8416// `projects.jobs.list` is not recommended, as you can only get the list 8417// of 8418// jobs that are running in `us-central1`. 8419func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall { 8420 c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8421 c.projectId = projectId 8422 return c 8423} 8424 8425// Filter sets the optional parameter "filter": The kind of filter to 8426// use. 8427// 8428// Possible values: 8429// "UNKNOWN" 8430// "ALL" 8431// "TERMINATED" 8432// "ACTIVE" 8433func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall { 8434 c.urlParams_.Set("filter", filter) 8435 return c 8436} 8437 8438// Location sets the optional parameter "location": The [regional 8439// endpoint] 8440// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8441// dpoints) that 8442// contains this job. 8443func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall { 8444 c.urlParams_.Set("location", location) 8445 return c 8446} 8447 8448// PageSize sets the optional parameter "pageSize": If there are many 8449// jobs, limit response to at most this many. 8450// The actual number of jobs returned will be the lesser of 8451// max_responses 8452// and an unspecified server-defined limit. 8453func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall { 8454 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8455 return c 8456} 8457 8458// PageToken sets the optional parameter "pageToken": Set this to the 8459// 'next_page_token' field of a previous response 8460// to request additional results in a long list. 8461func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall { 8462 c.urlParams_.Set("pageToken", pageToken) 8463 return c 8464} 8465 8466// View sets the optional parameter "view": Level of information 8467// requested in response. Default is `JOB_VIEW_SUMMARY`. 8468// 8469// Possible values: 8470// "JOB_VIEW_UNKNOWN" 8471// "JOB_VIEW_SUMMARY" 8472// "JOB_VIEW_ALL" 8473// "JOB_VIEW_DESCRIPTION" 8474func (c *ProjectsJobsListCall) View(view string) *ProjectsJobsListCall { 8475 c.urlParams_.Set("view", view) 8476 return c 8477} 8478 8479// Fields allows partial responses to be retrieved. See 8480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8481// for more information. 8482func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall { 8483 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8484 return c 8485} 8486 8487// IfNoneMatch sets the optional parameter which makes the operation 8488// fail if the object's ETag matches the given value. This is useful for 8489// getting updates only after the object has changed since the last 8490// request. Use googleapi.IsNotModified to check whether the response 8491// error from Do is the result of In-None-Match. 8492func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall { 8493 c.ifNoneMatch_ = entityTag 8494 return c 8495} 8496 8497// Context sets the context to be used in this call's Do method. Any 8498// pending HTTP request will be aborted if the provided context is 8499// canceled. 8500func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall { 8501 c.ctx_ = ctx 8502 return c 8503} 8504 8505// Header returns an http.Header that can be modified by the caller to 8506// add HTTP headers to the request. 8507func (c *ProjectsJobsListCall) Header() http.Header { 8508 if c.header_ == nil { 8509 c.header_ = make(http.Header) 8510 } 8511 return c.header_ 8512} 8513 8514func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) { 8515 reqHeaders := make(http.Header) 8516 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8517 for k, v := range c.header_ { 8518 reqHeaders[k] = v 8519 } 8520 reqHeaders.Set("User-Agent", c.s.userAgent()) 8521 if c.ifNoneMatch_ != "" { 8522 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8523 } 8524 var body io.Reader = nil 8525 c.urlParams_.Set("alt", alt) 8526 c.urlParams_.Set("prettyPrint", "false") 8527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") 8528 urls += "?" + c.urlParams_.Encode() 8529 req, err := http.NewRequest("GET", urls, body) 8530 if err != nil { 8531 return nil, err 8532 } 8533 req.Header = reqHeaders 8534 googleapi.Expand(req.URL, map[string]string{ 8535 "projectId": c.projectId, 8536 }) 8537 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8538} 8539 8540// Do executes the "dataflow.projects.jobs.list" call. 8541// Exactly one of *ListJobsResponse or error will be non-nil. Any 8542// non-2xx status code is an error. Response headers are in either 8543// *ListJobsResponse.ServerResponse.Header or (if a response was 8544// returned at all) in error.(*googleapi.Error).Header. Use 8545// googleapi.IsNotModified to check whether the returned error was 8546// because http.StatusNotModified was returned. 8547func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 8548 gensupport.SetOptions(c.urlParams_, opts...) 8549 res, err := c.doRequest("json") 8550 if res != nil && res.StatusCode == http.StatusNotModified { 8551 if res.Body != nil { 8552 res.Body.Close() 8553 } 8554 return nil, &googleapi.Error{ 8555 Code: res.StatusCode, 8556 Header: res.Header, 8557 } 8558 } 8559 if err != nil { 8560 return nil, err 8561 } 8562 defer googleapi.CloseBody(res) 8563 if err := googleapi.CheckResponse(res); err != nil { 8564 return nil, err 8565 } 8566 ret := &ListJobsResponse{ 8567 ServerResponse: googleapi.ServerResponse{ 8568 Header: res.Header, 8569 HTTPStatusCode: res.StatusCode, 8570 }, 8571 } 8572 target := &ret 8573 if err := gensupport.DecodeResponse(target, res); err != nil { 8574 return nil, err 8575 } 8576 return ret, nil 8577 // { 8578 // "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.", 8579 // "flatPath": "v1b3/projects/{projectId}/jobs", 8580 // "httpMethod": "GET", 8581 // "id": "dataflow.projects.jobs.list", 8582 // "parameterOrder": [ 8583 // "projectId" 8584 // ], 8585 // "parameters": { 8586 // "filter": { 8587 // "description": "The kind of filter to use.", 8588 // "enum": [ 8589 // "UNKNOWN", 8590 // "ALL", 8591 // "TERMINATED", 8592 // "ACTIVE" 8593 // ], 8594 // "location": "query", 8595 // "type": "string" 8596 // }, 8597 // "location": { 8598 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 8599 // "location": "query", 8600 // "type": "string" 8601 // }, 8602 // "pageSize": { 8603 // "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", 8604 // "format": "int32", 8605 // "location": "query", 8606 // "type": "integer" 8607 // }, 8608 // "pageToken": { 8609 // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", 8610 // "location": "query", 8611 // "type": "string" 8612 // }, 8613 // "projectId": { 8614 // "description": "The project which owns the jobs.", 8615 // "location": "path", 8616 // "required": true, 8617 // "type": "string" 8618 // }, 8619 // "view": { 8620 // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", 8621 // "enum": [ 8622 // "JOB_VIEW_UNKNOWN", 8623 // "JOB_VIEW_SUMMARY", 8624 // "JOB_VIEW_ALL", 8625 // "JOB_VIEW_DESCRIPTION" 8626 // ], 8627 // "location": "query", 8628 // "type": "string" 8629 // } 8630 // }, 8631 // "path": "v1b3/projects/{projectId}/jobs", 8632 // "response": { 8633 // "$ref": "ListJobsResponse" 8634 // }, 8635 // "scopes": [ 8636 // "https://www.googleapis.com/auth/cloud-platform", 8637 // "https://www.googleapis.com/auth/compute", 8638 // "https://www.googleapis.com/auth/compute.readonly", 8639 // "https://www.googleapis.com/auth/userinfo.email" 8640 // ] 8641 // } 8642 8643} 8644 8645// Pages invokes f for each page of results. 8646// A non-nil error returned from f will halt the iteration. 8647// The provided context supersedes any context provided to the Context method. 8648func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 8649 c.ctx_ = ctx 8650 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8651 for { 8652 x, err := c.Do() 8653 if err != nil { 8654 return err 8655 } 8656 if err := f(x); err != nil { 8657 return err 8658 } 8659 if x.NextPageToken == "" { 8660 return nil 8661 } 8662 c.PageToken(x.NextPageToken) 8663 } 8664} 8665 8666// method id "dataflow.projects.jobs.update": 8667 8668type ProjectsJobsUpdateCall struct { 8669 s *Service 8670 projectId string 8671 jobId string 8672 job *Job 8673 urlParams_ gensupport.URLParams 8674 ctx_ context.Context 8675 header_ http.Header 8676} 8677 8678// Update: Updates the state of an existing Cloud Dataflow job. 8679// 8680// To update the state of an existing job, we recommend 8681// using 8682// `projects.locations.jobs.update` with a [regional 8683// endpoint] 8684// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8685// dpoints). Using 8686// `projects.jobs.update` is not recommended, as you can only update the 8687// state 8688// of jobs that are running in `us-central1`. 8689func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) *ProjectsJobsUpdateCall { 8690 c := &ProjectsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8691 c.projectId = projectId 8692 c.jobId = jobId 8693 c.job = job 8694 return c 8695} 8696 8697// Location sets the optional parameter "location": The [regional 8698// endpoint] 8699// (https://cloud.google.com/dataflow/docs/concepts/regional-en 8700// dpoints) that 8701// contains this job. 8702func (c *ProjectsJobsUpdateCall) Location(location string) *ProjectsJobsUpdateCall { 8703 c.urlParams_.Set("location", location) 8704 return c 8705} 8706 8707// Fields allows partial responses to be retrieved. See 8708// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8709// for more information. 8710func (c *ProjectsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsJobsUpdateCall { 8711 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8712 return c 8713} 8714 8715// Context sets the context to be used in this call's Do method. Any 8716// pending HTTP request will be aborted if the provided context is 8717// canceled. 8718func (c *ProjectsJobsUpdateCall) Context(ctx context.Context) *ProjectsJobsUpdateCall { 8719 c.ctx_ = ctx 8720 return c 8721} 8722 8723// Header returns an http.Header that can be modified by the caller to 8724// add HTTP headers to the request. 8725func (c *ProjectsJobsUpdateCall) Header() http.Header { 8726 if c.header_ == nil { 8727 c.header_ = make(http.Header) 8728 } 8729 return c.header_ 8730} 8731 8732func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { 8733 reqHeaders := make(http.Header) 8734 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8735 for k, v := range c.header_ { 8736 reqHeaders[k] = v 8737 } 8738 reqHeaders.Set("User-Agent", c.s.userAgent()) 8739 var body io.Reader = nil 8740 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 8741 if err != nil { 8742 return nil, err 8743 } 8744 reqHeaders.Set("Content-Type", "application/json") 8745 c.urlParams_.Set("alt", alt) 8746 c.urlParams_.Set("prettyPrint", "false") 8747 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") 8748 urls += "?" + c.urlParams_.Encode() 8749 req, err := http.NewRequest("PUT", urls, body) 8750 if err != nil { 8751 return nil, err 8752 } 8753 req.Header = reqHeaders 8754 googleapi.Expand(req.URL, map[string]string{ 8755 "projectId": c.projectId, 8756 "jobId": c.jobId, 8757 }) 8758 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8759} 8760 8761// Do executes the "dataflow.projects.jobs.update" call. 8762// Exactly one of *Job or error will be non-nil. Any non-2xx status code 8763// is an error. Response headers are in either 8764// *Job.ServerResponse.Header or (if a response was returned at all) in 8765// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8766// whether the returned error was because http.StatusNotModified was 8767// returned. 8768func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 8769 gensupport.SetOptions(c.urlParams_, opts...) 8770 res, err := c.doRequest("json") 8771 if res != nil && res.StatusCode == http.StatusNotModified { 8772 if res.Body != nil { 8773 res.Body.Close() 8774 } 8775 return nil, &googleapi.Error{ 8776 Code: res.StatusCode, 8777 Header: res.Header, 8778 } 8779 } 8780 if err != nil { 8781 return nil, err 8782 } 8783 defer googleapi.CloseBody(res) 8784 if err := googleapi.CheckResponse(res); err != nil { 8785 return nil, err 8786 } 8787 ret := &Job{ 8788 ServerResponse: googleapi.ServerResponse{ 8789 Header: res.Header, 8790 HTTPStatusCode: res.StatusCode, 8791 }, 8792 } 8793 target := &ret 8794 if err := gensupport.DecodeResponse(target, res); err != nil { 8795 return nil, err 8796 } 8797 return ret, nil 8798 // { 8799 // "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.", 8800 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", 8801 // "httpMethod": "PUT", 8802 // "id": "dataflow.projects.jobs.update", 8803 // "parameterOrder": [ 8804 // "projectId", 8805 // "jobId" 8806 // ], 8807 // "parameters": { 8808 // "jobId": { 8809 // "description": "The job ID.", 8810 // "location": "path", 8811 // "required": true, 8812 // "type": "string" 8813 // }, 8814 // "location": { 8815 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 8816 // "location": "query", 8817 // "type": "string" 8818 // }, 8819 // "projectId": { 8820 // "description": "The ID of the Cloud Platform project that the job belongs to.", 8821 // "location": "path", 8822 // "required": true, 8823 // "type": "string" 8824 // } 8825 // }, 8826 // "path": "v1b3/projects/{projectId}/jobs/{jobId}", 8827 // "request": { 8828 // "$ref": "Job" 8829 // }, 8830 // "response": { 8831 // "$ref": "Job" 8832 // }, 8833 // "scopes": [ 8834 // "https://www.googleapis.com/auth/cloud-platform", 8835 // "https://www.googleapis.com/auth/compute", 8836 // "https://www.googleapis.com/auth/compute.readonly", 8837 // "https://www.googleapis.com/auth/userinfo.email" 8838 // ] 8839 // } 8840 8841} 8842 8843// method id "dataflow.projects.jobs.debug.getConfig": 8844 8845type ProjectsJobsDebugGetConfigCall struct { 8846 s *Service 8847 projectId string 8848 jobId string 8849 getdebugconfigrequest *GetDebugConfigRequest 8850 urlParams_ gensupport.URLParams 8851 ctx_ context.Context 8852 header_ http.Header 8853} 8854 8855// GetConfig: Get encoded debug configuration for component. Not 8856// cacheable. 8857func (r *ProjectsJobsDebugService) GetConfig(projectId string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsJobsDebugGetConfigCall { 8858 c := &ProjectsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8859 c.projectId = projectId 8860 c.jobId = jobId 8861 c.getdebugconfigrequest = getdebugconfigrequest 8862 return c 8863} 8864 8865// Fields allows partial responses to be retrieved. See 8866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8867// for more information. 8868func (c *ProjectsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugGetConfigCall { 8869 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8870 return c 8871} 8872 8873// Context sets the context to be used in this call's Do method. Any 8874// pending HTTP request will be aborted if the provided context is 8875// canceled. 8876func (c *ProjectsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsJobsDebugGetConfigCall { 8877 c.ctx_ = ctx 8878 return c 8879} 8880 8881// Header returns an http.Header that can be modified by the caller to 8882// add HTTP headers to the request. 8883func (c *ProjectsJobsDebugGetConfigCall) Header() http.Header { 8884 if c.header_ == nil { 8885 c.header_ = make(http.Header) 8886 } 8887 return c.header_ 8888} 8889 8890func (c *ProjectsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) { 8891 reqHeaders := make(http.Header) 8892 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8893 for k, v := range c.header_ { 8894 reqHeaders[k] = v 8895 } 8896 reqHeaders.Set("User-Agent", c.s.userAgent()) 8897 var body io.Reader = nil 8898 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest) 8899 if err != nil { 8900 return nil, err 8901 } 8902 reqHeaders.Set("Content-Type", "application/json") 8903 c.urlParams_.Set("alt", alt) 8904 c.urlParams_.Set("prettyPrint", "false") 8905 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig") 8906 urls += "?" + c.urlParams_.Encode() 8907 req, err := http.NewRequest("POST", urls, body) 8908 if err != nil { 8909 return nil, err 8910 } 8911 req.Header = reqHeaders 8912 googleapi.Expand(req.URL, map[string]string{ 8913 "projectId": c.projectId, 8914 "jobId": c.jobId, 8915 }) 8916 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8917} 8918 8919// Do executes the "dataflow.projects.jobs.debug.getConfig" call. 8920// Exactly one of *GetDebugConfigResponse or error will be non-nil. Any 8921// non-2xx status code is an error. Response headers are in either 8922// *GetDebugConfigResponse.ServerResponse.Header or (if a response was 8923// returned at all) in error.(*googleapi.Error).Header. Use 8924// googleapi.IsNotModified to check whether the returned error was 8925// because http.StatusNotModified was returned. 8926func (c *ProjectsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) { 8927 gensupport.SetOptions(c.urlParams_, opts...) 8928 res, err := c.doRequest("json") 8929 if res != nil && res.StatusCode == http.StatusNotModified { 8930 if res.Body != nil { 8931 res.Body.Close() 8932 } 8933 return nil, &googleapi.Error{ 8934 Code: res.StatusCode, 8935 Header: res.Header, 8936 } 8937 } 8938 if err != nil { 8939 return nil, err 8940 } 8941 defer googleapi.CloseBody(res) 8942 if err := googleapi.CheckResponse(res); err != nil { 8943 return nil, err 8944 } 8945 ret := &GetDebugConfigResponse{ 8946 ServerResponse: googleapi.ServerResponse{ 8947 Header: res.Header, 8948 HTTPStatusCode: res.StatusCode, 8949 }, 8950 } 8951 target := &ret 8952 if err := gensupport.DecodeResponse(target, res); err != nil { 8953 return nil, err 8954 } 8955 return ret, nil 8956 // { 8957 // "description": "Get encoded debug configuration for component. Not cacheable.", 8958 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", 8959 // "httpMethod": "POST", 8960 // "id": "dataflow.projects.jobs.debug.getConfig", 8961 // "parameterOrder": [ 8962 // "projectId", 8963 // "jobId" 8964 // ], 8965 // "parameters": { 8966 // "jobId": { 8967 // "description": "The job id.", 8968 // "location": "path", 8969 // "required": true, 8970 // "type": "string" 8971 // }, 8972 // "projectId": { 8973 // "description": "The project id.", 8974 // "location": "path", 8975 // "required": true, 8976 // "type": "string" 8977 // } 8978 // }, 8979 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", 8980 // "request": { 8981 // "$ref": "GetDebugConfigRequest" 8982 // }, 8983 // "response": { 8984 // "$ref": "GetDebugConfigResponse" 8985 // }, 8986 // "scopes": [ 8987 // "https://www.googleapis.com/auth/cloud-platform", 8988 // "https://www.googleapis.com/auth/compute", 8989 // "https://www.googleapis.com/auth/compute.readonly", 8990 // "https://www.googleapis.com/auth/userinfo.email" 8991 // ] 8992 // } 8993 8994} 8995 8996// method id "dataflow.projects.jobs.debug.sendCapture": 8997 8998type ProjectsJobsDebugSendCaptureCall struct { 8999 s *Service 9000 projectId string 9001 jobId string 9002 senddebugcapturerequest *SendDebugCaptureRequest 9003 urlParams_ gensupport.URLParams 9004 ctx_ context.Context 9005 header_ http.Header 9006} 9007 9008// SendCapture: Send encoded debug capture data for component. 9009func (r *ProjectsJobsDebugService) SendCapture(projectId string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsJobsDebugSendCaptureCall { 9010 c := &ProjectsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9011 c.projectId = projectId 9012 c.jobId = jobId 9013 c.senddebugcapturerequest = senddebugcapturerequest 9014 return c 9015} 9016 9017// Fields allows partial responses to be retrieved. See 9018// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9019// for more information. 9020func (c *ProjectsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugSendCaptureCall { 9021 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9022 return c 9023} 9024 9025// Context sets the context to be used in this call's Do method. Any 9026// pending HTTP request will be aborted if the provided context is 9027// canceled. 9028func (c *ProjectsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsJobsDebugSendCaptureCall { 9029 c.ctx_ = ctx 9030 return c 9031} 9032 9033// Header returns an http.Header that can be modified by the caller to 9034// add HTTP headers to the request. 9035func (c *ProjectsJobsDebugSendCaptureCall) Header() http.Header { 9036 if c.header_ == nil { 9037 c.header_ = make(http.Header) 9038 } 9039 return c.header_ 9040} 9041 9042func (c *ProjectsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) { 9043 reqHeaders := make(http.Header) 9044 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9045 for k, v := range c.header_ { 9046 reqHeaders[k] = v 9047 } 9048 reqHeaders.Set("User-Agent", c.s.userAgent()) 9049 var body io.Reader = nil 9050 body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest) 9051 if err != nil { 9052 return nil, err 9053 } 9054 reqHeaders.Set("Content-Type", "application/json") 9055 c.urlParams_.Set("alt", alt) 9056 c.urlParams_.Set("prettyPrint", "false") 9057 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture") 9058 urls += "?" + c.urlParams_.Encode() 9059 req, err := http.NewRequest("POST", urls, body) 9060 if err != nil { 9061 return nil, err 9062 } 9063 req.Header = reqHeaders 9064 googleapi.Expand(req.URL, map[string]string{ 9065 "projectId": c.projectId, 9066 "jobId": c.jobId, 9067 }) 9068 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9069} 9070 9071// Do executes the "dataflow.projects.jobs.debug.sendCapture" call. 9072// Exactly one of *SendDebugCaptureResponse or error will be non-nil. 9073// Any non-2xx status code is an error. Response headers are in either 9074// *SendDebugCaptureResponse.ServerResponse.Header or (if a response was 9075// returned at all) in error.(*googleapi.Error).Header. Use 9076// googleapi.IsNotModified to check whether the returned error was 9077// because http.StatusNotModified was returned. 9078func (c *ProjectsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) { 9079 gensupport.SetOptions(c.urlParams_, opts...) 9080 res, err := c.doRequest("json") 9081 if res != nil && res.StatusCode == http.StatusNotModified { 9082 if res.Body != nil { 9083 res.Body.Close() 9084 } 9085 return nil, &googleapi.Error{ 9086 Code: res.StatusCode, 9087 Header: res.Header, 9088 } 9089 } 9090 if err != nil { 9091 return nil, err 9092 } 9093 defer googleapi.CloseBody(res) 9094 if err := googleapi.CheckResponse(res); err != nil { 9095 return nil, err 9096 } 9097 ret := &SendDebugCaptureResponse{ 9098 ServerResponse: googleapi.ServerResponse{ 9099 Header: res.Header, 9100 HTTPStatusCode: res.StatusCode, 9101 }, 9102 } 9103 target := &ret 9104 if err := gensupport.DecodeResponse(target, res); err != nil { 9105 return nil, err 9106 } 9107 return ret, nil 9108 // { 9109 // "description": "Send encoded debug capture data for component.", 9110 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", 9111 // "httpMethod": "POST", 9112 // "id": "dataflow.projects.jobs.debug.sendCapture", 9113 // "parameterOrder": [ 9114 // "projectId", 9115 // "jobId" 9116 // ], 9117 // "parameters": { 9118 // "jobId": { 9119 // "description": "The job id.", 9120 // "location": "path", 9121 // "required": true, 9122 // "type": "string" 9123 // }, 9124 // "projectId": { 9125 // "description": "The project id.", 9126 // "location": "path", 9127 // "required": true, 9128 // "type": "string" 9129 // } 9130 // }, 9131 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", 9132 // "request": { 9133 // "$ref": "SendDebugCaptureRequest" 9134 // }, 9135 // "response": { 9136 // "$ref": "SendDebugCaptureResponse" 9137 // }, 9138 // "scopes": [ 9139 // "https://www.googleapis.com/auth/cloud-platform", 9140 // "https://www.googleapis.com/auth/compute", 9141 // "https://www.googleapis.com/auth/compute.readonly", 9142 // "https://www.googleapis.com/auth/userinfo.email" 9143 // ] 9144 // } 9145 9146} 9147 9148// method id "dataflow.projects.jobs.messages.list": 9149 9150type ProjectsJobsMessagesListCall struct { 9151 s *Service 9152 projectId string 9153 jobId string 9154 urlParams_ gensupport.URLParams 9155 ifNoneMatch_ string 9156 ctx_ context.Context 9157 header_ http.Header 9158} 9159 9160// List: Request the job status. 9161// 9162// To request the status of a job, we recommend 9163// using 9164// `projects.locations.jobs.messages.list` with a [regional 9165// endpoint] 9166// (https://cloud.google.com/dataflow/docs/concepts/regional-en 9167// dpoints). Using 9168// `projects.jobs.messages.list` is not recommended, as you can only 9169// request 9170// the status of jobs that are running in `us-central1`. 9171func (r *ProjectsJobsMessagesService) List(projectId string, jobId string) *ProjectsJobsMessagesListCall { 9172 c := &ProjectsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9173 c.projectId = projectId 9174 c.jobId = jobId 9175 return c 9176} 9177 9178// EndTime sets the optional parameter "endTime": Return only messages 9179// with timestamps < end_time. The default is now 9180// (i.e. return up to the latest messages available). 9181func (c *ProjectsJobsMessagesListCall) EndTime(endTime string) *ProjectsJobsMessagesListCall { 9182 c.urlParams_.Set("endTime", endTime) 9183 return c 9184} 9185 9186// Location sets the optional parameter "location": The [regional 9187// endpoint] 9188// (https://cloud.google.com/dataflow/docs/concepts/regional-en 9189// dpoints) that 9190// contains the job specified by job_id. 9191func (c *ProjectsJobsMessagesListCall) Location(location string) *ProjectsJobsMessagesListCall { 9192 c.urlParams_.Set("location", location) 9193 return c 9194} 9195 9196// MinimumImportance sets the optional parameter "minimumImportance": 9197// Filter to only get messages with importance >= level 9198// 9199// Possible values: 9200// "JOB_MESSAGE_IMPORTANCE_UNKNOWN" 9201// "JOB_MESSAGE_DEBUG" 9202// "JOB_MESSAGE_DETAILED" 9203// "JOB_MESSAGE_BASIC" 9204// "JOB_MESSAGE_WARNING" 9205// "JOB_MESSAGE_ERROR" 9206func (c *ProjectsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsJobsMessagesListCall { 9207 c.urlParams_.Set("minimumImportance", minimumImportance) 9208 return c 9209} 9210 9211// PageSize sets the optional parameter "pageSize": If specified, 9212// determines the maximum number of messages to 9213// return. If unspecified, the service may choose an 9214// appropriate 9215// default, or may return an arbitrarily large number of results. 9216func (c *ProjectsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsJobsMessagesListCall { 9217 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9218 return c 9219} 9220 9221// PageToken sets the optional parameter "pageToken": If supplied, this 9222// should be the value of next_page_token returned 9223// by an earlier call. This will cause the next page of results to 9224// be returned. 9225func (c *ProjectsJobsMessagesListCall) PageToken(pageToken string) *ProjectsJobsMessagesListCall { 9226 c.urlParams_.Set("pageToken", pageToken) 9227 return c 9228} 9229 9230// StartTime sets the optional parameter "startTime": If specified, 9231// return only messages with timestamps >= start_time. 9232// The default is the job creation time (i.e. beginning of messages). 9233func (c *ProjectsJobsMessagesListCall) StartTime(startTime string) *ProjectsJobsMessagesListCall { 9234 c.urlParams_.Set("startTime", startTime) 9235 return c 9236} 9237 9238// Fields allows partial responses to be retrieved. See 9239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9240// for more information. 9241func (c *ProjectsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsJobsMessagesListCall { 9242 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9243 return c 9244} 9245 9246// IfNoneMatch sets the optional parameter which makes the operation 9247// fail if the object's ETag matches the given value. This is useful for 9248// getting updates only after the object has changed since the last 9249// request. Use googleapi.IsNotModified to check whether the response 9250// error from Do is the result of In-None-Match. 9251func (c *ProjectsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsJobsMessagesListCall { 9252 c.ifNoneMatch_ = entityTag 9253 return c 9254} 9255 9256// Context sets the context to be used in this call's Do method. Any 9257// pending HTTP request will be aborted if the provided context is 9258// canceled. 9259func (c *ProjectsJobsMessagesListCall) Context(ctx context.Context) *ProjectsJobsMessagesListCall { 9260 c.ctx_ = ctx 9261 return c 9262} 9263 9264// Header returns an http.Header that can be modified by the caller to 9265// add HTTP headers to the request. 9266func (c *ProjectsJobsMessagesListCall) Header() http.Header { 9267 if c.header_ == nil { 9268 c.header_ = make(http.Header) 9269 } 9270 return c.header_ 9271} 9272 9273func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) { 9274 reqHeaders := make(http.Header) 9275 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9276 for k, v := range c.header_ { 9277 reqHeaders[k] = v 9278 } 9279 reqHeaders.Set("User-Agent", c.s.userAgent()) 9280 if c.ifNoneMatch_ != "" { 9281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9282 } 9283 var body io.Reader = nil 9284 c.urlParams_.Set("alt", alt) 9285 c.urlParams_.Set("prettyPrint", "false") 9286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/messages") 9287 urls += "?" + c.urlParams_.Encode() 9288 req, err := http.NewRequest("GET", urls, body) 9289 if err != nil { 9290 return nil, err 9291 } 9292 req.Header = reqHeaders 9293 googleapi.Expand(req.URL, map[string]string{ 9294 "projectId": c.projectId, 9295 "jobId": c.jobId, 9296 }) 9297 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9298} 9299 9300// Do executes the "dataflow.projects.jobs.messages.list" call. 9301// Exactly one of *ListJobMessagesResponse or error will be non-nil. Any 9302// non-2xx status code is an error. Response headers are in either 9303// *ListJobMessagesResponse.ServerResponse.Header or (if a response was 9304// returned at all) in error.(*googleapi.Error).Header. Use 9305// googleapi.IsNotModified to check whether the returned error was 9306// because http.StatusNotModified was returned. 9307func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) { 9308 gensupport.SetOptions(c.urlParams_, opts...) 9309 res, err := c.doRequest("json") 9310 if res != nil && res.StatusCode == http.StatusNotModified { 9311 if res.Body != nil { 9312 res.Body.Close() 9313 } 9314 return nil, &googleapi.Error{ 9315 Code: res.StatusCode, 9316 Header: res.Header, 9317 } 9318 } 9319 if err != nil { 9320 return nil, err 9321 } 9322 defer googleapi.CloseBody(res) 9323 if err := googleapi.CheckResponse(res); err != nil { 9324 return nil, err 9325 } 9326 ret := &ListJobMessagesResponse{ 9327 ServerResponse: googleapi.ServerResponse{ 9328 Header: res.Header, 9329 HTTPStatusCode: res.StatusCode, 9330 }, 9331 } 9332 target := &ret 9333 if err := gensupport.DecodeResponse(target, res); err != nil { 9334 return nil, err 9335 } 9336 return ret, nil 9337 // { 9338 // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.", 9339 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", 9340 // "httpMethod": "GET", 9341 // "id": "dataflow.projects.jobs.messages.list", 9342 // "parameterOrder": [ 9343 // "projectId", 9344 // "jobId" 9345 // ], 9346 // "parameters": { 9347 // "endTime": { 9348 // "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", 9349 // "format": "google-datetime", 9350 // "location": "query", 9351 // "type": "string" 9352 // }, 9353 // "jobId": { 9354 // "description": "The job to get messages about.", 9355 // "location": "path", 9356 // "required": true, 9357 // "type": "string" 9358 // }, 9359 // "location": { 9360 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", 9361 // "location": "query", 9362 // "type": "string" 9363 // }, 9364 // "minimumImportance": { 9365 // "description": "Filter to only get messages with importance \u003e= level", 9366 // "enum": [ 9367 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN", 9368 // "JOB_MESSAGE_DEBUG", 9369 // "JOB_MESSAGE_DETAILED", 9370 // "JOB_MESSAGE_BASIC", 9371 // "JOB_MESSAGE_WARNING", 9372 // "JOB_MESSAGE_ERROR" 9373 // ], 9374 // "location": "query", 9375 // "type": "string" 9376 // }, 9377 // "pageSize": { 9378 // "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", 9379 // "format": "int32", 9380 // "location": "query", 9381 // "type": "integer" 9382 // }, 9383 // "pageToken": { 9384 // "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", 9385 // "location": "query", 9386 // "type": "string" 9387 // }, 9388 // "projectId": { 9389 // "description": "A project id.", 9390 // "location": "path", 9391 // "required": true, 9392 // "type": "string" 9393 // }, 9394 // "startTime": { 9395 // "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", 9396 // "format": "google-datetime", 9397 // "location": "query", 9398 // "type": "string" 9399 // } 9400 // }, 9401 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", 9402 // "response": { 9403 // "$ref": "ListJobMessagesResponse" 9404 // }, 9405 // "scopes": [ 9406 // "https://www.googleapis.com/auth/cloud-platform", 9407 // "https://www.googleapis.com/auth/compute", 9408 // "https://www.googleapis.com/auth/compute.readonly", 9409 // "https://www.googleapis.com/auth/userinfo.email" 9410 // ] 9411 // } 9412 9413} 9414 9415// Pages invokes f for each page of results. 9416// A non-nil error returned from f will halt the iteration. 9417// The provided context supersedes any context provided to the Context method. 9418func (c *ProjectsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error { 9419 c.ctx_ = ctx 9420 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9421 for { 9422 x, err := c.Do() 9423 if err != nil { 9424 return err 9425 } 9426 if err := f(x); err != nil { 9427 return err 9428 } 9429 if x.NextPageToken == "" { 9430 return nil 9431 } 9432 c.PageToken(x.NextPageToken) 9433 } 9434} 9435 9436// method id "dataflow.projects.jobs.workItems.lease": 9437 9438type ProjectsJobsWorkItemsLeaseCall struct { 9439 s *Service 9440 projectId string 9441 jobId string 9442 leaseworkitemrequest *LeaseWorkItemRequest 9443 urlParams_ gensupport.URLParams 9444 ctx_ context.Context 9445 header_ http.Header 9446} 9447 9448// Lease: Leases a dataflow WorkItem to run. 9449func (r *ProjectsJobsWorkItemsService) Lease(projectId string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsJobsWorkItemsLeaseCall { 9450 c := &ProjectsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9451 c.projectId = projectId 9452 c.jobId = jobId 9453 c.leaseworkitemrequest = leaseworkitemrequest 9454 return c 9455} 9456 9457// Fields allows partial responses to be retrieved. See 9458// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9459// for more information. 9460func (c *ProjectsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsLeaseCall { 9461 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9462 return c 9463} 9464 9465// Context sets the context to be used in this call's Do method. Any 9466// pending HTTP request will be aborted if the provided context is 9467// canceled. 9468func (c *ProjectsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsJobsWorkItemsLeaseCall { 9469 c.ctx_ = ctx 9470 return c 9471} 9472 9473// Header returns an http.Header that can be modified by the caller to 9474// add HTTP headers to the request. 9475func (c *ProjectsJobsWorkItemsLeaseCall) Header() http.Header { 9476 if c.header_ == nil { 9477 c.header_ = make(http.Header) 9478 } 9479 return c.header_ 9480} 9481 9482func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) { 9483 reqHeaders := make(http.Header) 9484 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9485 for k, v := range c.header_ { 9486 reqHeaders[k] = v 9487 } 9488 reqHeaders.Set("User-Agent", c.s.userAgent()) 9489 var body io.Reader = nil 9490 body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest) 9491 if err != nil { 9492 return nil, err 9493 } 9494 reqHeaders.Set("Content-Type", "application/json") 9495 c.urlParams_.Set("alt", alt) 9496 c.urlParams_.Set("prettyPrint", "false") 9497 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease") 9498 urls += "?" + c.urlParams_.Encode() 9499 req, err := http.NewRequest("POST", urls, body) 9500 if err != nil { 9501 return nil, err 9502 } 9503 req.Header = reqHeaders 9504 googleapi.Expand(req.URL, map[string]string{ 9505 "projectId": c.projectId, 9506 "jobId": c.jobId, 9507 }) 9508 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9509} 9510 9511// Do executes the "dataflow.projects.jobs.workItems.lease" call. 9512// Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any 9513// non-2xx status code is an error. Response headers are in either 9514// *LeaseWorkItemResponse.ServerResponse.Header or (if a response was 9515// returned at all) in error.(*googleapi.Error).Header. Use 9516// googleapi.IsNotModified to check whether the returned error was 9517// because http.StatusNotModified was returned. 9518func (c *ProjectsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) { 9519 gensupport.SetOptions(c.urlParams_, opts...) 9520 res, err := c.doRequest("json") 9521 if res != nil && res.StatusCode == http.StatusNotModified { 9522 if res.Body != nil { 9523 res.Body.Close() 9524 } 9525 return nil, &googleapi.Error{ 9526 Code: res.StatusCode, 9527 Header: res.Header, 9528 } 9529 } 9530 if err != nil { 9531 return nil, err 9532 } 9533 defer googleapi.CloseBody(res) 9534 if err := googleapi.CheckResponse(res); err != nil { 9535 return nil, err 9536 } 9537 ret := &LeaseWorkItemResponse{ 9538 ServerResponse: googleapi.ServerResponse{ 9539 Header: res.Header, 9540 HTTPStatusCode: res.StatusCode, 9541 }, 9542 } 9543 target := &ret 9544 if err := gensupport.DecodeResponse(target, res); err != nil { 9545 return nil, err 9546 } 9547 return ret, nil 9548 // { 9549 // "description": "Leases a dataflow WorkItem to run.", 9550 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", 9551 // "httpMethod": "POST", 9552 // "id": "dataflow.projects.jobs.workItems.lease", 9553 // "parameterOrder": [ 9554 // "projectId", 9555 // "jobId" 9556 // ], 9557 // "parameters": { 9558 // "jobId": { 9559 // "description": "Identifies the workflow job this worker belongs to.", 9560 // "location": "path", 9561 // "required": true, 9562 // "type": "string" 9563 // }, 9564 // "projectId": { 9565 // "description": "Identifies the project this worker belongs to.", 9566 // "location": "path", 9567 // "required": true, 9568 // "type": "string" 9569 // } 9570 // }, 9571 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", 9572 // "request": { 9573 // "$ref": "LeaseWorkItemRequest" 9574 // }, 9575 // "response": { 9576 // "$ref": "LeaseWorkItemResponse" 9577 // }, 9578 // "scopes": [ 9579 // "https://www.googleapis.com/auth/cloud-platform", 9580 // "https://www.googleapis.com/auth/compute", 9581 // "https://www.googleapis.com/auth/compute.readonly", 9582 // "https://www.googleapis.com/auth/userinfo.email" 9583 // ] 9584 // } 9585 9586} 9587 9588// method id "dataflow.projects.jobs.workItems.reportStatus": 9589 9590type ProjectsJobsWorkItemsReportStatusCall struct { 9591 s *Service 9592 projectId string 9593 jobId string 9594 reportworkitemstatusrequest *ReportWorkItemStatusRequest 9595 urlParams_ gensupport.URLParams 9596 ctx_ context.Context 9597 header_ http.Header 9598} 9599 9600// ReportStatus: Reports the status of dataflow WorkItems leased by a 9601// worker. 9602func (r *ProjectsJobsWorkItemsService) ReportStatus(projectId string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsJobsWorkItemsReportStatusCall { 9603 c := &ProjectsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9604 c.projectId = projectId 9605 c.jobId = jobId 9606 c.reportworkitemstatusrequest = reportworkitemstatusrequest 9607 return c 9608} 9609 9610// Fields allows partial responses to be retrieved. See 9611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9612// for more information. 9613func (c *ProjectsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsReportStatusCall { 9614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9615 return c 9616} 9617 9618// Context sets the context to be used in this call's Do method. Any 9619// pending HTTP request will be aborted if the provided context is 9620// canceled. 9621func (c *ProjectsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsJobsWorkItemsReportStatusCall { 9622 c.ctx_ = ctx 9623 return c 9624} 9625 9626// Header returns an http.Header that can be modified by the caller to 9627// add HTTP headers to the request. 9628func (c *ProjectsJobsWorkItemsReportStatusCall) Header() http.Header { 9629 if c.header_ == nil { 9630 c.header_ = make(http.Header) 9631 } 9632 return c.header_ 9633} 9634 9635func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) { 9636 reqHeaders := make(http.Header) 9637 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9638 for k, v := range c.header_ { 9639 reqHeaders[k] = v 9640 } 9641 reqHeaders.Set("User-Agent", c.s.userAgent()) 9642 var body io.Reader = nil 9643 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest) 9644 if err != nil { 9645 return nil, err 9646 } 9647 reqHeaders.Set("Content-Type", "application/json") 9648 c.urlParams_.Set("alt", alt) 9649 c.urlParams_.Set("prettyPrint", "false") 9650 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus") 9651 urls += "?" + c.urlParams_.Encode() 9652 req, err := http.NewRequest("POST", urls, body) 9653 if err != nil { 9654 return nil, err 9655 } 9656 req.Header = reqHeaders 9657 googleapi.Expand(req.URL, map[string]string{ 9658 "projectId": c.projectId, 9659 "jobId": c.jobId, 9660 }) 9661 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9662} 9663 9664// Do executes the "dataflow.projects.jobs.workItems.reportStatus" call. 9665// Exactly one of *ReportWorkItemStatusResponse or error will be 9666// non-nil. Any non-2xx status code is an error. Response headers are in 9667// either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a 9668// response was returned at all) in error.(*googleapi.Error).Header. Use 9669// googleapi.IsNotModified to check whether the returned error was 9670// because http.StatusNotModified was returned. 9671func (c *ProjectsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) { 9672 gensupport.SetOptions(c.urlParams_, opts...) 9673 res, err := c.doRequest("json") 9674 if res != nil && res.StatusCode == http.StatusNotModified { 9675 if res.Body != nil { 9676 res.Body.Close() 9677 } 9678 return nil, &googleapi.Error{ 9679 Code: res.StatusCode, 9680 Header: res.Header, 9681 } 9682 } 9683 if err != nil { 9684 return nil, err 9685 } 9686 defer googleapi.CloseBody(res) 9687 if err := googleapi.CheckResponse(res); err != nil { 9688 return nil, err 9689 } 9690 ret := &ReportWorkItemStatusResponse{ 9691 ServerResponse: googleapi.ServerResponse{ 9692 Header: res.Header, 9693 HTTPStatusCode: res.StatusCode, 9694 }, 9695 } 9696 target := &ret 9697 if err := gensupport.DecodeResponse(target, res); err != nil { 9698 return nil, err 9699 } 9700 return ret, nil 9701 // { 9702 // "description": "Reports the status of dataflow WorkItems leased by a worker.", 9703 // "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", 9704 // "httpMethod": "POST", 9705 // "id": "dataflow.projects.jobs.workItems.reportStatus", 9706 // "parameterOrder": [ 9707 // "projectId", 9708 // "jobId" 9709 // ], 9710 // "parameters": { 9711 // "jobId": { 9712 // "description": "The job which the WorkItem is part of.", 9713 // "location": "path", 9714 // "required": true, 9715 // "type": "string" 9716 // }, 9717 // "projectId": { 9718 // "description": "The project which owns the WorkItem's job.", 9719 // "location": "path", 9720 // "required": true, 9721 // "type": "string" 9722 // } 9723 // }, 9724 // "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", 9725 // "request": { 9726 // "$ref": "ReportWorkItemStatusRequest" 9727 // }, 9728 // "response": { 9729 // "$ref": "ReportWorkItemStatusResponse" 9730 // }, 9731 // "scopes": [ 9732 // "https://www.googleapis.com/auth/cloud-platform", 9733 // "https://www.googleapis.com/auth/compute", 9734 // "https://www.googleapis.com/auth/compute.readonly", 9735 // "https://www.googleapis.com/auth/userinfo.email" 9736 // ] 9737 // } 9738 9739} 9740 9741// method id "dataflow.projects.locations.workerMessages": 9742 9743type ProjectsLocationsWorkerMessagesCall struct { 9744 s *Service 9745 projectId string 9746 location string 9747 sendworkermessagesrequest *SendWorkerMessagesRequest 9748 urlParams_ gensupport.URLParams 9749 ctx_ context.Context 9750 header_ http.Header 9751} 9752 9753// WorkerMessages: Send a worker_message to the service. 9754func (r *ProjectsLocationsService) WorkerMessages(projectId string, location string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsLocationsWorkerMessagesCall { 9755 c := &ProjectsLocationsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9756 c.projectId = projectId 9757 c.location = location 9758 c.sendworkermessagesrequest = sendworkermessagesrequest 9759 return c 9760} 9761 9762// Fields allows partial responses to be retrieved. See 9763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9764// for more information. 9765func (c *ProjectsLocationsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerMessagesCall { 9766 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9767 return c 9768} 9769 9770// Context sets the context to be used in this call's Do method. Any 9771// pending HTTP request will be aborted if the provided context is 9772// canceled. 9773func (c *ProjectsLocationsWorkerMessagesCall) Context(ctx context.Context) *ProjectsLocationsWorkerMessagesCall { 9774 c.ctx_ = ctx 9775 return c 9776} 9777 9778// Header returns an http.Header that can be modified by the caller to 9779// add HTTP headers to the request. 9780func (c *ProjectsLocationsWorkerMessagesCall) Header() http.Header { 9781 if c.header_ == nil { 9782 c.header_ = make(http.Header) 9783 } 9784 return c.header_ 9785} 9786 9787func (c *ProjectsLocationsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) { 9788 reqHeaders := make(http.Header) 9789 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9790 for k, v := range c.header_ { 9791 reqHeaders[k] = v 9792 } 9793 reqHeaders.Set("User-Agent", c.s.userAgent()) 9794 var body io.Reader = nil 9795 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest) 9796 if err != nil { 9797 return nil, err 9798 } 9799 reqHeaders.Set("Content-Type", "application/json") 9800 c.urlParams_.Set("alt", alt) 9801 c.urlParams_.Set("prettyPrint", "false") 9802 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/WorkerMessages") 9803 urls += "?" + c.urlParams_.Encode() 9804 req, err := http.NewRequest("POST", urls, body) 9805 if err != nil { 9806 return nil, err 9807 } 9808 req.Header = reqHeaders 9809 googleapi.Expand(req.URL, map[string]string{ 9810 "projectId": c.projectId, 9811 "location": c.location, 9812 }) 9813 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9814} 9815 9816// Do executes the "dataflow.projects.locations.workerMessages" call. 9817// Exactly one of *SendWorkerMessagesResponse or error will be non-nil. 9818// Any non-2xx status code is an error. Response headers are in either 9819// *SendWorkerMessagesResponse.ServerResponse.Header or (if a response 9820// was returned at all) in error.(*googleapi.Error).Header. Use 9821// googleapi.IsNotModified to check whether the returned error was 9822// because http.StatusNotModified was returned. 9823func (c *ProjectsLocationsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) { 9824 gensupport.SetOptions(c.urlParams_, opts...) 9825 res, err := c.doRequest("json") 9826 if res != nil && res.StatusCode == http.StatusNotModified { 9827 if res.Body != nil { 9828 res.Body.Close() 9829 } 9830 return nil, &googleapi.Error{ 9831 Code: res.StatusCode, 9832 Header: res.Header, 9833 } 9834 } 9835 if err != nil { 9836 return nil, err 9837 } 9838 defer googleapi.CloseBody(res) 9839 if err := googleapi.CheckResponse(res); err != nil { 9840 return nil, err 9841 } 9842 ret := &SendWorkerMessagesResponse{ 9843 ServerResponse: googleapi.ServerResponse{ 9844 Header: res.Header, 9845 HTTPStatusCode: res.StatusCode, 9846 }, 9847 } 9848 target := &ret 9849 if err := gensupport.DecodeResponse(target, res); err != nil { 9850 return nil, err 9851 } 9852 return ret, nil 9853 // { 9854 // "description": "Send a worker_message to the service.", 9855 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", 9856 // "httpMethod": "POST", 9857 // "id": "dataflow.projects.locations.workerMessages", 9858 // "parameterOrder": [ 9859 // "projectId", 9860 // "location" 9861 // ], 9862 // "parameters": { 9863 // "location": { 9864 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job.", 9865 // "location": "path", 9866 // "required": true, 9867 // "type": "string" 9868 // }, 9869 // "projectId": { 9870 // "description": "The project to send the WorkerMessages to.", 9871 // "location": "path", 9872 // "required": true, 9873 // "type": "string" 9874 // } 9875 // }, 9876 // "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", 9877 // "request": { 9878 // "$ref": "SendWorkerMessagesRequest" 9879 // }, 9880 // "response": { 9881 // "$ref": "SendWorkerMessagesResponse" 9882 // }, 9883 // "scopes": [ 9884 // "https://www.googleapis.com/auth/cloud-platform", 9885 // "https://www.googleapis.com/auth/compute", 9886 // "https://www.googleapis.com/auth/compute.readonly", 9887 // "https://www.googleapis.com/auth/userinfo.email" 9888 // ] 9889 // } 9890 9891} 9892 9893// method id "dataflow.projects.locations.jobs.create": 9894 9895type ProjectsLocationsJobsCreateCall struct { 9896 s *Service 9897 projectId string 9898 location string 9899 job *Job 9900 urlParams_ gensupport.URLParams 9901 ctx_ context.Context 9902 header_ http.Header 9903} 9904 9905// Create: Creates a Cloud Dataflow job. 9906// 9907// To create a job, we recommend using `projects.locations.jobs.create` 9908// with a 9909// [regional 9910// endpoint] 9911// (https://cloud.google.com/dataflow/docs/concepts/regional-en 9912// dpoints). Using 9913// `projects.jobs.create` is not recommended, as your job will always 9914// start 9915// in `us-central1`. 9916func (r *ProjectsLocationsJobsService) Create(projectId string, location string, job *Job) *ProjectsLocationsJobsCreateCall { 9917 c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9918 c.projectId = projectId 9919 c.location = location 9920 c.job = job 9921 return c 9922} 9923 9924// ReplaceJobId sets the optional parameter "replaceJobId": Deprecated. 9925// This field is now in the Job message. 9926func (c *ProjectsLocationsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsLocationsJobsCreateCall { 9927 c.urlParams_.Set("replaceJobId", replaceJobId) 9928 return c 9929} 9930 9931// View sets the optional parameter "view": The level of information 9932// requested in response. 9933// 9934// Possible values: 9935// "JOB_VIEW_UNKNOWN" 9936// "JOB_VIEW_SUMMARY" 9937// "JOB_VIEW_ALL" 9938// "JOB_VIEW_DESCRIPTION" 9939func (c *ProjectsLocationsJobsCreateCall) View(view string) *ProjectsLocationsJobsCreateCall { 9940 c.urlParams_.Set("view", view) 9941 return c 9942} 9943 9944// Fields allows partial responses to be retrieved. See 9945// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9946// for more information. 9947func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall { 9948 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9949 return c 9950} 9951 9952// Context sets the context to be used in this call's Do method. Any 9953// pending HTTP request will be aborted if the provided context is 9954// canceled. 9955func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall { 9956 c.ctx_ = ctx 9957 return c 9958} 9959 9960// Header returns an http.Header that can be modified by the caller to 9961// add HTTP headers to the request. 9962func (c *ProjectsLocationsJobsCreateCall) Header() http.Header { 9963 if c.header_ == nil { 9964 c.header_ = make(http.Header) 9965 } 9966 return c.header_ 9967} 9968 9969func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) { 9970 reqHeaders := make(http.Header) 9971 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9972 for k, v := range c.header_ { 9973 reqHeaders[k] = v 9974 } 9975 reqHeaders.Set("User-Agent", c.s.userAgent()) 9976 var body io.Reader = nil 9977 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 9978 if err != nil { 9979 return nil, err 9980 } 9981 reqHeaders.Set("Content-Type", "application/json") 9982 c.urlParams_.Set("alt", alt) 9983 c.urlParams_.Set("prettyPrint", "false") 9984 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") 9985 urls += "?" + c.urlParams_.Encode() 9986 req, err := http.NewRequest("POST", urls, body) 9987 if err != nil { 9988 return nil, err 9989 } 9990 req.Header = reqHeaders 9991 googleapi.Expand(req.URL, map[string]string{ 9992 "projectId": c.projectId, 9993 "location": c.location, 9994 }) 9995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9996} 9997 9998// Do executes the "dataflow.projects.locations.jobs.create" call. 9999// Exactly one of *Job or error will be non-nil. Any non-2xx status code 10000// is an error. Response headers are in either 10001// *Job.ServerResponse.Header or (if a response was returned at all) in 10002// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10003// whether the returned error was because http.StatusNotModified was 10004// returned. 10005func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 10006 gensupport.SetOptions(c.urlParams_, opts...) 10007 res, err := c.doRequest("json") 10008 if res != nil && res.StatusCode == http.StatusNotModified { 10009 if res.Body != nil { 10010 res.Body.Close() 10011 } 10012 return nil, &googleapi.Error{ 10013 Code: res.StatusCode, 10014 Header: res.Header, 10015 } 10016 } 10017 if err != nil { 10018 return nil, err 10019 } 10020 defer googleapi.CloseBody(res) 10021 if err := googleapi.CheckResponse(res); err != nil { 10022 return nil, err 10023 } 10024 ret := &Job{ 10025 ServerResponse: googleapi.ServerResponse{ 10026 Header: res.Header, 10027 HTTPStatusCode: res.StatusCode, 10028 }, 10029 } 10030 target := &ret 10031 if err := gensupport.DecodeResponse(target, res); err != nil { 10032 return nil, err 10033 } 10034 return ret, nil 10035 // { 10036 // "description": "Creates a Cloud Dataflow job.\n\nTo create a job, we recommend using `projects.locations.jobs.create` with a\n[regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.create` is not recommended, as your job will always start\nin `us-central1`.", 10037 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", 10038 // "httpMethod": "POST", 10039 // "id": "dataflow.projects.locations.jobs.create", 10040 // "parameterOrder": [ 10041 // "projectId", 10042 // "location" 10043 // ], 10044 // "parameters": { 10045 // "location": { 10046 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 10047 // "location": "path", 10048 // "required": true, 10049 // "type": "string" 10050 // }, 10051 // "projectId": { 10052 // "description": "The ID of the Cloud Platform project that the job belongs to.", 10053 // "location": "path", 10054 // "required": true, 10055 // "type": "string" 10056 // }, 10057 // "replaceJobId": { 10058 // "description": "Deprecated. This field is now in the Job message.", 10059 // "location": "query", 10060 // "type": "string" 10061 // }, 10062 // "view": { 10063 // "description": "The level of information requested in response.", 10064 // "enum": [ 10065 // "JOB_VIEW_UNKNOWN", 10066 // "JOB_VIEW_SUMMARY", 10067 // "JOB_VIEW_ALL", 10068 // "JOB_VIEW_DESCRIPTION" 10069 // ], 10070 // "location": "query", 10071 // "type": "string" 10072 // } 10073 // }, 10074 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs", 10075 // "request": { 10076 // "$ref": "Job" 10077 // }, 10078 // "response": { 10079 // "$ref": "Job" 10080 // }, 10081 // "scopes": [ 10082 // "https://www.googleapis.com/auth/cloud-platform", 10083 // "https://www.googleapis.com/auth/compute", 10084 // "https://www.googleapis.com/auth/compute.readonly", 10085 // "https://www.googleapis.com/auth/userinfo.email" 10086 // ] 10087 // } 10088 10089} 10090 10091// method id "dataflow.projects.locations.jobs.get": 10092 10093type ProjectsLocationsJobsGetCall struct { 10094 s *Service 10095 projectId string 10096 location string 10097 jobId string 10098 urlParams_ gensupport.URLParams 10099 ifNoneMatch_ string 10100 ctx_ context.Context 10101 header_ http.Header 10102} 10103 10104// Get: Gets the state of the specified Cloud Dataflow job. 10105// 10106// To get the state of a job, we recommend using 10107// `projects.locations.jobs.get` 10108// with a [regional 10109// endpoint] 10110// (https://cloud.google.com/dataflow/docs/concepts/regional-en 10111// dpoints). Using 10112// `projects.jobs.get` is not recommended, as you can only get the state 10113// of 10114// jobs that are running in `us-central1`. 10115func (r *ProjectsLocationsJobsService) Get(projectId string, location string, jobId string) *ProjectsLocationsJobsGetCall { 10116 c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10117 c.projectId = projectId 10118 c.location = location 10119 c.jobId = jobId 10120 return c 10121} 10122 10123// View sets the optional parameter "view": The level of information 10124// requested in response. 10125// 10126// Possible values: 10127// "JOB_VIEW_UNKNOWN" 10128// "JOB_VIEW_SUMMARY" 10129// "JOB_VIEW_ALL" 10130// "JOB_VIEW_DESCRIPTION" 10131func (c *ProjectsLocationsJobsGetCall) View(view string) *ProjectsLocationsJobsGetCall { 10132 c.urlParams_.Set("view", view) 10133 return c 10134} 10135 10136// Fields allows partial responses to be retrieved. See 10137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10138// for more information. 10139func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall { 10140 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10141 return c 10142} 10143 10144// IfNoneMatch sets the optional parameter which makes the operation 10145// fail if the object's ETag matches the given value. This is useful for 10146// getting updates only after the object has changed since the last 10147// request. Use googleapi.IsNotModified to check whether the response 10148// error from Do is the result of In-None-Match. 10149func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall { 10150 c.ifNoneMatch_ = entityTag 10151 return c 10152} 10153 10154// Context sets the context to be used in this call's Do method. Any 10155// pending HTTP request will be aborted if the provided context is 10156// canceled. 10157func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall { 10158 c.ctx_ = ctx 10159 return c 10160} 10161 10162// Header returns an http.Header that can be modified by the caller to 10163// add HTTP headers to the request. 10164func (c *ProjectsLocationsJobsGetCall) Header() http.Header { 10165 if c.header_ == nil { 10166 c.header_ = make(http.Header) 10167 } 10168 return c.header_ 10169} 10170 10171func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) { 10172 reqHeaders := make(http.Header) 10173 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10174 for k, v := range c.header_ { 10175 reqHeaders[k] = v 10176 } 10177 reqHeaders.Set("User-Agent", c.s.userAgent()) 10178 if c.ifNoneMatch_ != "" { 10179 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10180 } 10181 var body io.Reader = nil 10182 c.urlParams_.Set("alt", alt) 10183 c.urlParams_.Set("prettyPrint", "false") 10184 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") 10185 urls += "?" + c.urlParams_.Encode() 10186 req, err := http.NewRequest("GET", urls, body) 10187 if err != nil { 10188 return nil, err 10189 } 10190 req.Header = reqHeaders 10191 googleapi.Expand(req.URL, map[string]string{ 10192 "projectId": c.projectId, 10193 "location": c.location, 10194 "jobId": c.jobId, 10195 }) 10196 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10197} 10198 10199// Do executes the "dataflow.projects.locations.jobs.get" call. 10200// Exactly one of *Job or error will be non-nil. Any non-2xx status code 10201// is an error. Response headers are in either 10202// *Job.ServerResponse.Header or (if a response was returned at all) in 10203// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10204// whether the returned error was because http.StatusNotModified was 10205// returned. 10206func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 10207 gensupport.SetOptions(c.urlParams_, opts...) 10208 res, err := c.doRequest("json") 10209 if res != nil && res.StatusCode == http.StatusNotModified { 10210 if res.Body != nil { 10211 res.Body.Close() 10212 } 10213 return nil, &googleapi.Error{ 10214 Code: res.StatusCode, 10215 Header: res.Header, 10216 } 10217 } 10218 if err != nil { 10219 return nil, err 10220 } 10221 defer googleapi.CloseBody(res) 10222 if err := googleapi.CheckResponse(res); err != nil { 10223 return nil, err 10224 } 10225 ret := &Job{ 10226 ServerResponse: googleapi.ServerResponse{ 10227 Header: res.Header, 10228 HTTPStatusCode: res.StatusCode, 10229 }, 10230 } 10231 target := &ret 10232 if err := gensupport.DecodeResponse(target, res); err != nil { 10233 return nil, err 10234 } 10235 return ret, nil 10236 // { 10237 // "description": "Gets the state of the specified Cloud Dataflow job.\n\nTo get the state of a job, we recommend using `projects.locations.jobs.get`\nwith a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.get` is not recommended, as you can only get the state of\njobs that are running in `us-central1`.", 10238 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 10239 // "httpMethod": "GET", 10240 // "id": "dataflow.projects.locations.jobs.get", 10241 // "parameterOrder": [ 10242 // "projectId", 10243 // "location", 10244 // "jobId" 10245 // ], 10246 // "parameters": { 10247 // "jobId": { 10248 // "description": "The job ID.", 10249 // "location": "path", 10250 // "required": true, 10251 // "type": "string" 10252 // }, 10253 // "location": { 10254 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 10255 // "location": "path", 10256 // "required": true, 10257 // "type": "string" 10258 // }, 10259 // "projectId": { 10260 // "description": "The ID of the Cloud Platform project that the job belongs to.", 10261 // "location": "path", 10262 // "required": true, 10263 // "type": "string" 10264 // }, 10265 // "view": { 10266 // "description": "The level of information requested in response.", 10267 // "enum": [ 10268 // "JOB_VIEW_UNKNOWN", 10269 // "JOB_VIEW_SUMMARY", 10270 // "JOB_VIEW_ALL", 10271 // "JOB_VIEW_DESCRIPTION" 10272 // ], 10273 // "location": "query", 10274 // "type": "string" 10275 // } 10276 // }, 10277 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 10278 // "response": { 10279 // "$ref": "Job" 10280 // }, 10281 // "scopes": [ 10282 // "https://www.googleapis.com/auth/cloud-platform", 10283 // "https://www.googleapis.com/auth/compute", 10284 // "https://www.googleapis.com/auth/compute.readonly", 10285 // "https://www.googleapis.com/auth/userinfo.email" 10286 // ] 10287 // } 10288 10289} 10290 10291// method id "dataflow.projects.locations.jobs.getMetrics": 10292 10293type ProjectsLocationsJobsGetMetricsCall struct { 10294 s *Service 10295 projectId string 10296 location string 10297 jobId string 10298 urlParams_ gensupport.URLParams 10299 ifNoneMatch_ string 10300 ctx_ context.Context 10301 header_ http.Header 10302} 10303 10304// GetMetrics: Request the job status. 10305// 10306// To request the status of a job, we recommend 10307// using 10308// `projects.locations.jobs.getMetrics` with a [regional 10309// endpoint] 10310// (https://cloud.google.com/dataflow/docs/concepts/regional-en 10311// dpoints). Using 10312// `projects.jobs.getMetrics` is not recommended, as you can only 10313// request the 10314// status of jobs that are running in `us-central1`. 10315func (r *ProjectsLocationsJobsService) GetMetrics(projectId string, location string, jobId string) *ProjectsLocationsJobsGetMetricsCall { 10316 c := &ProjectsLocationsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10317 c.projectId = projectId 10318 c.location = location 10319 c.jobId = jobId 10320 return c 10321} 10322 10323// StartTime sets the optional parameter "startTime": Return only metric 10324// data that has changed since this time. 10325// Default is to return all information about all metrics for the job. 10326func (c *ProjectsLocationsJobsGetMetricsCall) StartTime(startTime string) *ProjectsLocationsJobsGetMetricsCall { 10327 c.urlParams_.Set("startTime", startTime) 10328 return c 10329} 10330 10331// Fields allows partial responses to be retrieved. See 10332// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10333// for more information. 10334func (c *ProjectsLocationsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetMetricsCall { 10335 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10336 return c 10337} 10338 10339// IfNoneMatch sets the optional parameter which makes the operation 10340// fail if the object's ETag matches the given value. This is useful for 10341// getting updates only after the object has changed since the last 10342// request. Use googleapi.IsNotModified to check whether the response 10343// error from Do is the result of In-None-Match. 10344func (c *ProjectsLocationsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetMetricsCall { 10345 c.ifNoneMatch_ = entityTag 10346 return c 10347} 10348 10349// Context sets the context to be used in this call's Do method. Any 10350// pending HTTP request will be aborted if the provided context is 10351// canceled. 10352func (c *ProjectsLocationsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetMetricsCall { 10353 c.ctx_ = ctx 10354 return c 10355} 10356 10357// Header returns an http.Header that can be modified by the caller to 10358// add HTTP headers to the request. 10359func (c *ProjectsLocationsJobsGetMetricsCall) Header() http.Header { 10360 if c.header_ == nil { 10361 c.header_ = make(http.Header) 10362 } 10363 return c.header_ 10364} 10365 10366func (c *ProjectsLocationsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) { 10367 reqHeaders := make(http.Header) 10368 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10369 for k, v := range c.header_ { 10370 reqHeaders[k] = v 10371 } 10372 reqHeaders.Set("User-Agent", c.s.userAgent()) 10373 if c.ifNoneMatch_ != "" { 10374 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10375 } 10376 var body io.Reader = nil 10377 c.urlParams_.Set("alt", alt) 10378 c.urlParams_.Set("prettyPrint", "false") 10379 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics") 10380 urls += "?" + c.urlParams_.Encode() 10381 req, err := http.NewRequest("GET", urls, body) 10382 if err != nil { 10383 return nil, err 10384 } 10385 req.Header = reqHeaders 10386 googleapi.Expand(req.URL, map[string]string{ 10387 "projectId": c.projectId, 10388 "location": c.location, 10389 "jobId": c.jobId, 10390 }) 10391 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10392} 10393 10394// Do executes the "dataflow.projects.locations.jobs.getMetrics" call. 10395// Exactly one of *JobMetrics or error will be non-nil. Any non-2xx 10396// status code is an error. Response headers are in either 10397// *JobMetrics.ServerResponse.Header or (if a response was returned at 10398// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10399// to check whether the returned error was because 10400// http.StatusNotModified was returned. 10401func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) { 10402 gensupport.SetOptions(c.urlParams_, opts...) 10403 res, err := c.doRequest("json") 10404 if res != nil && res.StatusCode == http.StatusNotModified { 10405 if res.Body != nil { 10406 res.Body.Close() 10407 } 10408 return nil, &googleapi.Error{ 10409 Code: res.StatusCode, 10410 Header: res.Header, 10411 } 10412 } 10413 if err != nil { 10414 return nil, err 10415 } 10416 defer googleapi.CloseBody(res) 10417 if err := googleapi.CheckResponse(res); err != nil { 10418 return nil, err 10419 } 10420 ret := &JobMetrics{ 10421 ServerResponse: googleapi.ServerResponse{ 10422 Header: res.Header, 10423 HTTPStatusCode: res.StatusCode, 10424 }, 10425 } 10426 target := &ret 10427 if err := gensupport.DecodeResponse(target, res); err != nil { 10428 return nil, err 10429 } 10430 return ret, nil 10431 // { 10432 // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.getMetrics` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.getMetrics` is not recommended, as you can only request the\nstatus of jobs that are running in `us-central1`.", 10433 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", 10434 // "httpMethod": "GET", 10435 // "id": "dataflow.projects.locations.jobs.getMetrics", 10436 // "parameterOrder": [ 10437 // "projectId", 10438 // "location", 10439 // "jobId" 10440 // ], 10441 // "parameters": { 10442 // "jobId": { 10443 // "description": "The job to get messages for.", 10444 // "location": "path", 10445 // "required": true, 10446 // "type": "string" 10447 // }, 10448 // "location": { 10449 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", 10450 // "location": "path", 10451 // "required": true, 10452 // "type": "string" 10453 // }, 10454 // "projectId": { 10455 // "description": "A project id.", 10456 // "location": "path", 10457 // "required": true, 10458 // "type": "string" 10459 // }, 10460 // "startTime": { 10461 // "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", 10462 // "format": "google-datetime", 10463 // "location": "query", 10464 // "type": "string" 10465 // } 10466 // }, 10467 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", 10468 // "response": { 10469 // "$ref": "JobMetrics" 10470 // }, 10471 // "scopes": [ 10472 // "https://www.googleapis.com/auth/cloud-platform", 10473 // "https://www.googleapis.com/auth/compute", 10474 // "https://www.googleapis.com/auth/compute.readonly", 10475 // "https://www.googleapis.com/auth/userinfo.email" 10476 // ] 10477 // } 10478 10479} 10480 10481// method id "dataflow.projects.locations.jobs.list": 10482 10483type ProjectsLocationsJobsListCall struct { 10484 s *Service 10485 projectId string 10486 location string 10487 urlParams_ gensupport.URLParams 10488 ifNoneMatch_ string 10489 ctx_ context.Context 10490 header_ http.Header 10491} 10492 10493// List: List the jobs of a project. 10494// 10495// To list the jobs of a project in a region, we recommend 10496// using 10497// `projects.locations.jobs.get` with a [regional 10498// endpoint] 10499// (https://cloud.google.com/dataflow/docs/concepts/regional-en 10500// dpoints). To 10501// list the all jobs across all regions, use `projects.jobs.aggregated`. 10502// Using 10503// `projects.jobs.list` is not recommended, as you can only get the list 10504// of 10505// jobs that are running in `us-central1`. 10506func (r *ProjectsLocationsJobsService) List(projectId string, location string) *ProjectsLocationsJobsListCall { 10507 c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10508 c.projectId = projectId 10509 c.location = location 10510 return c 10511} 10512 10513// Filter sets the optional parameter "filter": The kind of filter to 10514// use. 10515// 10516// Possible values: 10517// "UNKNOWN" 10518// "ALL" 10519// "TERMINATED" 10520// "ACTIVE" 10521func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall { 10522 c.urlParams_.Set("filter", filter) 10523 return c 10524} 10525 10526// PageSize sets the optional parameter "pageSize": If there are many 10527// jobs, limit response to at most this many. 10528// The actual number of jobs returned will be the lesser of 10529// max_responses 10530// and an unspecified server-defined limit. 10531func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall { 10532 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10533 return c 10534} 10535 10536// PageToken sets the optional parameter "pageToken": Set this to the 10537// 'next_page_token' field of a previous response 10538// to request additional results in a long list. 10539func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall { 10540 c.urlParams_.Set("pageToken", pageToken) 10541 return c 10542} 10543 10544// View sets the optional parameter "view": Level of information 10545// requested in response. Default is `JOB_VIEW_SUMMARY`. 10546// 10547// Possible values: 10548// "JOB_VIEW_UNKNOWN" 10549// "JOB_VIEW_SUMMARY" 10550// "JOB_VIEW_ALL" 10551// "JOB_VIEW_DESCRIPTION" 10552func (c *ProjectsLocationsJobsListCall) View(view string) *ProjectsLocationsJobsListCall { 10553 c.urlParams_.Set("view", view) 10554 return c 10555} 10556 10557// Fields allows partial responses to be retrieved. See 10558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10559// for more information. 10560func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall { 10561 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10562 return c 10563} 10564 10565// IfNoneMatch sets the optional parameter which makes the operation 10566// fail if the object's ETag matches the given value. This is useful for 10567// getting updates only after the object has changed since the last 10568// request. Use googleapi.IsNotModified to check whether the response 10569// error from Do is the result of In-None-Match. 10570func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall { 10571 c.ifNoneMatch_ = entityTag 10572 return c 10573} 10574 10575// Context sets the context to be used in this call's Do method. Any 10576// pending HTTP request will be aborted if the provided context is 10577// canceled. 10578func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall { 10579 c.ctx_ = ctx 10580 return c 10581} 10582 10583// Header returns an http.Header that can be modified by the caller to 10584// add HTTP headers to the request. 10585func (c *ProjectsLocationsJobsListCall) Header() http.Header { 10586 if c.header_ == nil { 10587 c.header_ = make(http.Header) 10588 } 10589 return c.header_ 10590} 10591 10592func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) { 10593 reqHeaders := make(http.Header) 10594 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10595 for k, v := range c.header_ { 10596 reqHeaders[k] = v 10597 } 10598 reqHeaders.Set("User-Agent", c.s.userAgent()) 10599 if c.ifNoneMatch_ != "" { 10600 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10601 } 10602 var body io.Reader = nil 10603 c.urlParams_.Set("alt", alt) 10604 c.urlParams_.Set("prettyPrint", "false") 10605 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") 10606 urls += "?" + c.urlParams_.Encode() 10607 req, err := http.NewRequest("GET", urls, body) 10608 if err != nil { 10609 return nil, err 10610 } 10611 req.Header = reqHeaders 10612 googleapi.Expand(req.URL, map[string]string{ 10613 "projectId": c.projectId, 10614 "location": c.location, 10615 }) 10616 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10617} 10618 10619// Do executes the "dataflow.projects.locations.jobs.list" call. 10620// Exactly one of *ListJobsResponse or error will be non-nil. Any 10621// non-2xx status code is an error. Response headers are in either 10622// *ListJobsResponse.ServerResponse.Header or (if a response was 10623// returned at all) in error.(*googleapi.Error).Header. Use 10624// googleapi.IsNotModified to check whether the returned error was 10625// because http.StatusNotModified was returned. 10626func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 10627 gensupport.SetOptions(c.urlParams_, opts...) 10628 res, err := c.doRequest("json") 10629 if res != nil && res.StatusCode == http.StatusNotModified { 10630 if res.Body != nil { 10631 res.Body.Close() 10632 } 10633 return nil, &googleapi.Error{ 10634 Code: res.StatusCode, 10635 Header: res.Header, 10636 } 10637 } 10638 if err != nil { 10639 return nil, err 10640 } 10641 defer googleapi.CloseBody(res) 10642 if err := googleapi.CheckResponse(res); err != nil { 10643 return nil, err 10644 } 10645 ret := &ListJobsResponse{ 10646 ServerResponse: googleapi.ServerResponse{ 10647 Header: res.Header, 10648 HTTPStatusCode: res.StatusCode, 10649 }, 10650 } 10651 target := &ret 10652 if err := gensupport.DecodeResponse(target, res); err != nil { 10653 return nil, err 10654 } 10655 return ret, nil 10656 // { 10657 // "description": "List the jobs of a project.\n\nTo list the jobs of a project in a region, we recommend using\n`projects.locations.jobs.get` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To\nlist the all jobs across all regions, use `projects.jobs.aggregated`. Using\n`projects.jobs.list` is not recommended, as you can only get the list of\njobs that are running in `us-central1`.", 10658 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", 10659 // "httpMethod": "GET", 10660 // "id": "dataflow.projects.locations.jobs.list", 10661 // "parameterOrder": [ 10662 // "projectId", 10663 // "location" 10664 // ], 10665 // "parameters": { 10666 // "filter": { 10667 // "description": "The kind of filter to use.", 10668 // "enum": [ 10669 // "UNKNOWN", 10670 // "ALL", 10671 // "TERMINATED", 10672 // "ACTIVE" 10673 // ], 10674 // "location": "query", 10675 // "type": "string" 10676 // }, 10677 // "location": { 10678 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 10679 // "location": "path", 10680 // "required": true, 10681 // "type": "string" 10682 // }, 10683 // "pageSize": { 10684 // "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", 10685 // "format": "int32", 10686 // "location": "query", 10687 // "type": "integer" 10688 // }, 10689 // "pageToken": { 10690 // "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", 10691 // "location": "query", 10692 // "type": "string" 10693 // }, 10694 // "projectId": { 10695 // "description": "The project which owns the jobs.", 10696 // "location": "path", 10697 // "required": true, 10698 // "type": "string" 10699 // }, 10700 // "view": { 10701 // "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", 10702 // "enum": [ 10703 // "JOB_VIEW_UNKNOWN", 10704 // "JOB_VIEW_SUMMARY", 10705 // "JOB_VIEW_ALL", 10706 // "JOB_VIEW_DESCRIPTION" 10707 // ], 10708 // "location": "query", 10709 // "type": "string" 10710 // } 10711 // }, 10712 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs", 10713 // "response": { 10714 // "$ref": "ListJobsResponse" 10715 // }, 10716 // "scopes": [ 10717 // "https://www.googleapis.com/auth/cloud-platform", 10718 // "https://www.googleapis.com/auth/compute", 10719 // "https://www.googleapis.com/auth/compute.readonly", 10720 // "https://www.googleapis.com/auth/userinfo.email" 10721 // ] 10722 // } 10723 10724} 10725 10726// Pages invokes f for each page of results. 10727// A non-nil error returned from f will halt the iteration. 10728// The provided context supersedes any context provided to the Context method. 10729func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 10730 c.ctx_ = ctx 10731 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10732 for { 10733 x, err := c.Do() 10734 if err != nil { 10735 return err 10736 } 10737 if err := f(x); err != nil { 10738 return err 10739 } 10740 if x.NextPageToken == "" { 10741 return nil 10742 } 10743 c.PageToken(x.NextPageToken) 10744 } 10745} 10746 10747// method id "dataflow.projects.locations.jobs.update": 10748 10749type ProjectsLocationsJobsUpdateCall struct { 10750 s *Service 10751 projectId string 10752 location string 10753 jobId string 10754 job *Job 10755 urlParams_ gensupport.URLParams 10756 ctx_ context.Context 10757 header_ http.Header 10758} 10759 10760// Update: Updates the state of an existing Cloud Dataflow job. 10761// 10762// To update the state of an existing job, we recommend 10763// using 10764// `projects.locations.jobs.update` with a [regional 10765// endpoint] 10766// (https://cloud.google.com/dataflow/docs/concepts/regional-en 10767// dpoints). Using 10768// `projects.jobs.update` is not recommended, as you can only update the 10769// state 10770// of jobs that are running in `us-central1`. 10771func (r *ProjectsLocationsJobsService) Update(projectId string, location string, jobId string, job *Job) *ProjectsLocationsJobsUpdateCall { 10772 c := &ProjectsLocationsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10773 c.projectId = projectId 10774 c.location = location 10775 c.jobId = jobId 10776 c.job = job 10777 return c 10778} 10779 10780// Fields allows partial responses to be retrieved. See 10781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10782// for more information. 10783func (c *ProjectsLocationsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsUpdateCall { 10784 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10785 return c 10786} 10787 10788// Context sets the context to be used in this call's Do method. Any 10789// pending HTTP request will be aborted if the provided context is 10790// canceled. 10791func (c *ProjectsLocationsJobsUpdateCall) Context(ctx context.Context) *ProjectsLocationsJobsUpdateCall { 10792 c.ctx_ = ctx 10793 return c 10794} 10795 10796// Header returns an http.Header that can be modified by the caller to 10797// add HTTP headers to the request. 10798func (c *ProjectsLocationsJobsUpdateCall) Header() http.Header { 10799 if c.header_ == nil { 10800 c.header_ = make(http.Header) 10801 } 10802 return c.header_ 10803} 10804 10805func (c *ProjectsLocationsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { 10806 reqHeaders := make(http.Header) 10807 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10808 for k, v := range c.header_ { 10809 reqHeaders[k] = v 10810 } 10811 reqHeaders.Set("User-Agent", c.s.userAgent()) 10812 var body io.Reader = nil 10813 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 10814 if err != nil { 10815 return nil, err 10816 } 10817 reqHeaders.Set("Content-Type", "application/json") 10818 c.urlParams_.Set("alt", alt) 10819 c.urlParams_.Set("prettyPrint", "false") 10820 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") 10821 urls += "?" + c.urlParams_.Encode() 10822 req, err := http.NewRequest("PUT", urls, body) 10823 if err != nil { 10824 return nil, err 10825 } 10826 req.Header = reqHeaders 10827 googleapi.Expand(req.URL, map[string]string{ 10828 "projectId": c.projectId, 10829 "location": c.location, 10830 "jobId": c.jobId, 10831 }) 10832 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10833} 10834 10835// Do executes the "dataflow.projects.locations.jobs.update" call. 10836// Exactly one of *Job or error will be non-nil. Any non-2xx status code 10837// is an error. Response headers are in either 10838// *Job.ServerResponse.Header or (if a response was returned at all) in 10839// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10840// whether the returned error was because http.StatusNotModified was 10841// returned. 10842func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 10843 gensupport.SetOptions(c.urlParams_, opts...) 10844 res, err := c.doRequest("json") 10845 if res != nil && res.StatusCode == http.StatusNotModified { 10846 if res.Body != nil { 10847 res.Body.Close() 10848 } 10849 return nil, &googleapi.Error{ 10850 Code: res.StatusCode, 10851 Header: res.Header, 10852 } 10853 } 10854 if err != nil { 10855 return nil, err 10856 } 10857 defer googleapi.CloseBody(res) 10858 if err := googleapi.CheckResponse(res); err != nil { 10859 return nil, err 10860 } 10861 ret := &Job{ 10862 ServerResponse: googleapi.ServerResponse{ 10863 Header: res.Header, 10864 HTTPStatusCode: res.StatusCode, 10865 }, 10866 } 10867 target := &ret 10868 if err := gensupport.DecodeResponse(target, res); err != nil { 10869 return nil, err 10870 } 10871 return ret, nil 10872 // { 10873 // "description": "Updates the state of an existing Cloud Dataflow job.\n\nTo update the state of an existing job, we recommend using\n`projects.locations.jobs.update` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.update` is not recommended, as you can only update the state\nof jobs that are running in `us-central1`.", 10874 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 10875 // "httpMethod": "PUT", 10876 // "id": "dataflow.projects.locations.jobs.update", 10877 // "parameterOrder": [ 10878 // "projectId", 10879 // "location", 10880 // "jobId" 10881 // ], 10882 // "parameters": { 10883 // "jobId": { 10884 // "description": "The job ID.", 10885 // "location": "path", 10886 // "required": true, 10887 // "type": "string" 10888 // }, 10889 // "location": { 10890 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains this job.", 10891 // "location": "path", 10892 // "required": true, 10893 // "type": "string" 10894 // }, 10895 // "projectId": { 10896 // "description": "The ID of the Cloud Platform project that the job belongs to.", 10897 // "location": "path", 10898 // "required": true, 10899 // "type": "string" 10900 // } 10901 // }, 10902 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", 10903 // "request": { 10904 // "$ref": "Job" 10905 // }, 10906 // "response": { 10907 // "$ref": "Job" 10908 // }, 10909 // "scopes": [ 10910 // "https://www.googleapis.com/auth/cloud-platform", 10911 // "https://www.googleapis.com/auth/compute", 10912 // "https://www.googleapis.com/auth/compute.readonly", 10913 // "https://www.googleapis.com/auth/userinfo.email" 10914 // ] 10915 // } 10916 10917} 10918 10919// method id "dataflow.projects.locations.jobs.debug.getConfig": 10920 10921type ProjectsLocationsJobsDebugGetConfigCall struct { 10922 s *Service 10923 projectId string 10924 location string 10925 jobId string 10926 getdebugconfigrequest *GetDebugConfigRequest 10927 urlParams_ gensupport.URLParams 10928 ctx_ context.Context 10929 header_ http.Header 10930} 10931 10932// GetConfig: Get encoded debug configuration for component. Not 10933// cacheable. 10934func (r *ProjectsLocationsJobsDebugService) GetConfig(projectId string, location string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsLocationsJobsDebugGetConfigCall { 10935 c := &ProjectsLocationsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10936 c.projectId = projectId 10937 c.location = location 10938 c.jobId = jobId 10939 c.getdebugconfigrequest = getdebugconfigrequest 10940 return c 10941} 10942 10943// Fields allows partial responses to be retrieved. See 10944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10945// for more information. 10946func (c *ProjectsLocationsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugGetConfigCall { 10947 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10948 return c 10949} 10950 10951// Context sets the context to be used in this call's Do method. Any 10952// pending HTTP request will be aborted if the provided context is 10953// canceled. 10954func (c *ProjectsLocationsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugGetConfigCall { 10955 c.ctx_ = ctx 10956 return c 10957} 10958 10959// Header returns an http.Header that can be modified by the caller to 10960// add HTTP headers to the request. 10961func (c *ProjectsLocationsJobsDebugGetConfigCall) Header() http.Header { 10962 if c.header_ == nil { 10963 c.header_ = make(http.Header) 10964 } 10965 return c.header_ 10966} 10967 10968func (c *ProjectsLocationsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) { 10969 reqHeaders := make(http.Header) 10970 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10971 for k, v := range c.header_ { 10972 reqHeaders[k] = v 10973 } 10974 reqHeaders.Set("User-Agent", c.s.userAgent()) 10975 var body io.Reader = nil 10976 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest) 10977 if err != nil { 10978 return nil, err 10979 } 10980 reqHeaders.Set("Content-Type", "application/json") 10981 c.urlParams_.Set("alt", alt) 10982 c.urlParams_.Set("prettyPrint", "false") 10983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig") 10984 urls += "?" + c.urlParams_.Encode() 10985 req, err := http.NewRequest("POST", urls, body) 10986 if err != nil { 10987 return nil, err 10988 } 10989 req.Header = reqHeaders 10990 googleapi.Expand(req.URL, map[string]string{ 10991 "projectId": c.projectId, 10992 "location": c.location, 10993 "jobId": c.jobId, 10994 }) 10995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10996} 10997 10998// Do executes the "dataflow.projects.locations.jobs.debug.getConfig" call. 10999// Exactly one of *GetDebugConfigResponse or error will be non-nil. Any 11000// non-2xx status code is an error. Response headers are in either 11001// *GetDebugConfigResponse.ServerResponse.Header or (if a response was 11002// returned at all) in error.(*googleapi.Error).Header. Use 11003// googleapi.IsNotModified to check whether the returned error was 11004// because http.StatusNotModified was returned. 11005func (c *ProjectsLocationsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) { 11006 gensupport.SetOptions(c.urlParams_, opts...) 11007 res, err := c.doRequest("json") 11008 if res != nil && res.StatusCode == http.StatusNotModified { 11009 if res.Body != nil { 11010 res.Body.Close() 11011 } 11012 return nil, &googleapi.Error{ 11013 Code: res.StatusCode, 11014 Header: res.Header, 11015 } 11016 } 11017 if err != nil { 11018 return nil, err 11019 } 11020 defer googleapi.CloseBody(res) 11021 if err := googleapi.CheckResponse(res); err != nil { 11022 return nil, err 11023 } 11024 ret := &GetDebugConfigResponse{ 11025 ServerResponse: googleapi.ServerResponse{ 11026 Header: res.Header, 11027 HTTPStatusCode: res.StatusCode, 11028 }, 11029 } 11030 target := &ret 11031 if err := gensupport.DecodeResponse(target, res); err != nil { 11032 return nil, err 11033 } 11034 return ret, nil 11035 // { 11036 // "description": "Get encoded debug configuration for component. Not cacheable.", 11037 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", 11038 // "httpMethod": "POST", 11039 // "id": "dataflow.projects.locations.jobs.debug.getConfig", 11040 // "parameterOrder": [ 11041 // "projectId", 11042 // "location", 11043 // "jobId" 11044 // ], 11045 // "parameters": { 11046 // "jobId": { 11047 // "description": "The job id.", 11048 // "location": "path", 11049 // "required": true, 11050 // "type": "string" 11051 // }, 11052 // "location": { 11053 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", 11054 // "location": "path", 11055 // "required": true, 11056 // "type": "string" 11057 // }, 11058 // "projectId": { 11059 // "description": "The project id.", 11060 // "location": "path", 11061 // "required": true, 11062 // "type": "string" 11063 // } 11064 // }, 11065 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", 11066 // "request": { 11067 // "$ref": "GetDebugConfigRequest" 11068 // }, 11069 // "response": { 11070 // "$ref": "GetDebugConfigResponse" 11071 // }, 11072 // "scopes": [ 11073 // "https://www.googleapis.com/auth/cloud-platform", 11074 // "https://www.googleapis.com/auth/compute", 11075 // "https://www.googleapis.com/auth/compute.readonly", 11076 // "https://www.googleapis.com/auth/userinfo.email" 11077 // ] 11078 // } 11079 11080} 11081 11082// method id "dataflow.projects.locations.jobs.debug.sendCapture": 11083 11084type ProjectsLocationsJobsDebugSendCaptureCall struct { 11085 s *Service 11086 projectId string 11087 location string 11088 jobId string 11089 senddebugcapturerequest *SendDebugCaptureRequest 11090 urlParams_ gensupport.URLParams 11091 ctx_ context.Context 11092 header_ http.Header 11093} 11094 11095// SendCapture: Send encoded debug capture data for component. 11096func (r *ProjectsLocationsJobsDebugService) SendCapture(projectId string, location string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsLocationsJobsDebugSendCaptureCall { 11097 c := &ProjectsLocationsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11098 c.projectId = projectId 11099 c.location = location 11100 c.jobId = jobId 11101 c.senddebugcapturerequest = senddebugcapturerequest 11102 return c 11103} 11104 11105// Fields allows partial responses to be retrieved. See 11106// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11107// for more information. 11108func (c *ProjectsLocationsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugSendCaptureCall { 11109 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11110 return c 11111} 11112 11113// Context sets the context to be used in this call's Do method. Any 11114// pending HTTP request will be aborted if the provided context is 11115// canceled. 11116func (c *ProjectsLocationsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugSendCaptureCall { 11117 c.ctx_ = ctx 11118 return c 11119} 11120 11121// Header returns an http.Header that can be modified by the caller to 11122// add HTTP headers to the request. 11123func (c *ProjectsLocationsJobsDebugSendCaptureCall) Header() http.Header { 11124 if c.header_ == nil { 11125 c.header_ = make(http.Header) 11126 } 11127 return c.header_ 11128} 11129 11130func (c *ProjectsLocationsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) { 11131 reqHeaders := make(http.Header) 11132 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11133 for k, v := range c.header_ { 11134 reqHeaders[k] = v 11135 } 11136 reqHeaders.Set("User-Agent", c.s.userAgent()) 11137 var body io.Reader = nil 11138 body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest) 11139 if err != nil { 11140 return nil, err 11141 } 11142 reqHeaders.Set("Content-Type", "application/json") 11143 c.urlParams_.Set("alt", alt) 11144 c.urlParams_.Set("prettyPrint", "false") 11145 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture") 11146 urls += "?" + c.urlParams_.Encode() 11147 req, err := http.NewRequest("POST", urls, body) 11148 if err != nil { 11149 return nil, err 11150 } 11151 req.Header = reqHeaders 11152 googleapi.Expand(req.URL, map[string]string{ 11153 "projectId": c.projectId, 11154 "location": c.location, 11155 "jobId": c.jobId, 11156 }) 11157 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11158} 11159 11160// Do executes the "dataflow.projects.locations.jobs.debug.sendCapture" call. 11161// Exactly one of *SendDebugCaptureResponse or error will be non-nil. 11162// Any non-2xx status code is an error. Response headers are in either 11163// *SendDebugCaptureResponse.ServerResponse.Header or (if a response was 11164// returned at all) in error.(*googleapi.Error).Header. Use 11165// googleapi.IsNotModified to check whether the returned error was 11166// because http.StatusNotModified was returned. 11167func (c *ProjectsLocationsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) { 11168 gensupport.SetOptions(c.urlParams_, opts...) 11169 res, err := c.doRequest("json") 11170 if res != nil && res.StatusCode == http.StatusNotModified { 11171 if res.Body != nil { 11172 res.Body.Close() 11173 } 11174 return nil, &googleapi.Error{ 11175 Code: res.StatusCode, 11176 Header: res.Header, 11177 } 11178 } 11179 if err != nil { 11180 return nil, err 11181 } 11182 defer googleapi.CloseBody(res) 11183 if err := googleapi.CheckResponse(res); err != nil { 11184 return nil, err 11185 } 11186 ret := &SendDebugCaptureResponse{ 11187 ServerResponse: googleapi.ServerResponse{ 11188 Header: res.Header, 11189 HTTPStatusCode: res.StatusCode, 11190 }, 11191 } 11192 target := &ret 11193 if err := gensupport.DecodeResponse(target, res); err != nil { 11194 return nil, err 11195 } 11196 return ret, nil 11197 // { 11198 // "description": "Send encoded debug capture data for component.", 11199 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", 11200 // "httpMethod": "POST", 11201 // "id": "dataflow.projects.locations.jobs.debug.sendCapture", 11202 // "parameterOrder": [ 11203 // "projectId", 11204 // "location", 11205 // "jobId" 11206 // ], 11207 // "parameters": { 11208 // "jobId": { 11209 // "description": "The job id.", 11210 // "location": "path", 11211 // "required": true, 11212 // "type": "string" 11213 // }, 11214 // "location": { 11215 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", 11216 // "location": "path", 11217 // "required": true, 11218 // "type": "string" 11219 // }, 11220 // "projectId": { 11221 // "description": "The project id.", 11222 // "location": "path", 11223 // "required": true, 11224 // "type": "string" 11225 // } 11226 // }, 11227 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", 11228 // "request": { 11229 // "$ref": "SendDebugCaptureRequest" 11230 // }, 11231 // "response": { 11232 // "$ref": "SendDebugCaptureResponse" 11233 // }, 11234 // "scopes": [ 11235 // "https://www.googleapis.com/auth/cloud-platform", 11236 // "https://www.googleapis.com/auth/compute", 11237 // "https://www.googleapis.com/auth/compute.readonly", 11238 // "https://www.googleapis.com/auth/userinfo.email" 11239 // ] 11240 // } 11241 11242} 11243 11244// method id "dataflow.projects.locations.jobs.messages.list": 11245 11246type ProjectsLocationsJobsMessagesListCall struct { 11247 s *Service 11248 projectId string 11249 location string 11250 jobId string 11251 urlParams_ gensupport.URLParams 11252 ifNoneMatch_ string 11253 ctx_ context.Context 11254 header_ http.Header 11255} 11256 11257// List: Request the job status. 11258// 11259// To request the status of a job, we recommend 11260// using 11261// `projects.locations.jobs.messages.list` with a [regional 11262// endpoint] 11263// (https://cloud.google.com/dataflow/docs/concepts/regional-en 11264// dpoints). Using 11265// `projects.jobs.messages.list` is not recommended, as you can only 11266// request 11267// the status of jobs that are running in `us-central1`. 11268func (r *ProjectsLocationsJobsMessagesService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsMessagesListCall { 11269 c := &ProjectsLocationsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11270 c.projectId = projectId 11271 c.location = location 11272 c.jobId = jobId 11273 return c 11274} 11275 11276// EndTime sets the optional parameter "endTime": Return only messages 11277// with timestamps < end_time. The default is now 11278// (i.e. return up to the latest messages available). 11279func (c *ProjectsLocationsJobsMessagesListCall) EndTime(endTime string) *ProjectsLocationsJobsMessagesListCall { 11280 c.urlParams_.Set("endTime", endTime) 11281 return c 11282} 11283 11284// MinimumImportance sets the optional parameter "minimumImportance": 11285// Filter to only get messages with importance >= level 11286// 11287// Possible values: 11288// "JOB_MESSAGE_IMPORTANCE_UNKNOWN" 11289// "JOB_MESSAGE_DEBUG" 11290// "JOB_MESSAGE_DETAILED" 11291// "JOB_MESSAGE_BASIC" 11292// "JOB_MESSAGE_WARNING" 11293// "JOB_MESSAGE_ERROR" 11294func (c *ProjectsLocationsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsLocationsJobsMessagesListCall { 11295 c.urlParams_.Set("minimumImportance", minimumImportance) 11296 return c 11297} 11298 11299// PageSize sets the optional parameter "pageSize": If specified, 11300// determines the maximum number of messages to 11301// return. If unspecified, the service may choose an 11302// appropriate 11303// default, or may return an arbitrarily large number of results. 11304func (c *ProjectsLocationsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsJobsMessagesListCall { 11305 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11306 return c 11307} 11308 11309// PageToken sets the optional parameter "pageToken": If supplied, this 11310// should be the value of next_page_token returned 11311// by an earlier call. This will cause the next page of results to 11312// be returned. 11313func (c *ProjectsLocationsJobsMessagesListCall) PageToken(pageToken string) *ProjectsLocationsJobsMessagesListCall { 11314 c.urlParams_.Set("pageToken", pageToken) 11315 return c 11316} 11317 11318// StartTime sets the optional parameter "startTime": If specified, 11319// return only messages with timestamps >= start_time. 11320// The default is the job creation time (i.e. beginning of messages). 11321func (c *ProjectsLocationsJobsMessagesListCall) StartTime(startTime string) *ProjectsLocationsJobsMessagesListCall { 11322 c.urlParams_.Set("startTime", startTime) 11323 return c 11324} 11325 11326// Fields allows partial responses to be retrieved. See 11327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11328// for more information. 11329func (c *ProjectsLocationsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsMessagesListCall { 11330 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11331 return c 11332} 11333 11334// IfNoneMatch sets the optional parameter which makes the operation 11335// fail if the object's ETag matches the given value. This is useful for 11336// getting updates only after the object has changed since the last 11337// request. Use googleapi.IsNotModified to check whether the response 11338// error from Do is the result of In-None-Match. 11339func (c *ProjectsLocationsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsMessagesListCall { 11340 c.ifNoneMatch_ = entityTag 11341 return c 11342} 11343 11344// Context sets the context to be used in this call's Do method. Any 11345// pending HTTP request will be aborted if the provided context is 11346// canceled. 11347func (c *ProjectsLocationsJobsMessagesListCall) Context(ctx context.Context) *ProjectsLocationsJobsMessagesListCall { 11348 c.ctx_ = ctx 11349 return c 11350} 11351 11352// Header returns an http.Header that can be modified by the caller to 11353// add HTTP headers to the request. 11354func (c *ProjectsLocationsJobsMessagesListCall) Header() http.Header { 11355 if c.header_ == nil { 11356 c.header_ = make(http.Header) 11357 } 11358 return c.header_ 11359} 11360 11361func (c *ProjectsLocationsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) { 11362 reqHeaders := make(http.Header) 11363 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11364 for k, v := range c.header_ { 11365 reqHeaders[k] = v 11366 } 11367 reqHeaders.Set("User-Agent", c.s.userAgent()) 11368 if c.ifNoneMatch_ != "" { 11369 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11370 } 11371 var body io.Reader = nil 11372 c.urlParams_.Set("alt", alt) 11373 c.urlParams_.Set("prettyPrint", "false") 11374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages") 11375 urls += "?" + c.urlParams_.Encode() 11376 req, err := http.NewRequest("GET", urls, body) 11377 if err != nil { 11378 return nil, err 11379 } 11380 req.Header = reqHeaders 11381 googleapi.Expand(req.URL, map[string]string{ 11382 "projectId": c.projectId, 11383 "location": c.location, 11384 "jobId": c.jobId, 11385 }) 11386 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11387} 11388 11389// Do executes the "dataflow.projects.locations.jobs.messages.list" call. 11390// Exactly one of *ListJobMessagesResponse or error will be non-nil. Any 11391// non-2xx status code is an error. Response headers are in either 11392// *ListJobMessagesResponse.ServerResponse.Header or (if a response was 11393// returned at all) in error.(*googleapi.Error).Header. Use 11394// googleapi.IsNotModified to check whether the returned error was 11395// because http.StatusNotModified was returned. 11396func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) { 11397 gensupport.SetOptions(c.urlParams_, opts...) 11398 res, err := c.doRequest("json") 11399 if res != nil && res.StatusCode == http.StatusNotModified { 11400 if res.Body != nil { 11401 res.Body.Close() 11402 } 11403 return nil, &googleapi.Error{ 11404 Code: res.StatusCode, 11405 Header: res.Header, 11406 } 11407 } 11408 if err != nil { 11409 return nil, err 11410 } 11411 defer googleapi.CloseBody(res) 11412 if err := googleapi.CheckResponse(res); err != nil { 11413 return nil, err 11414 } 11415 ret := &ListJobMessagesResponse{ 11416 ServerResponse: googleapi.ServerResponse{ 11417 Header: res.Header, 11418 HTTPStatusCode: res.StatusCode, 11419 }, 11420 } 11421 target := &ret 11422 if err := gensupport.DecodeResponse(target, res); err != nil { 11423 return nil, err 11424 } 11425 return ret, nil 11426 // { 11427 // "description": "Request the job status.\n\nTo request the status of a job, we recommend using\n`projects.locations.jobs.messages.list` with a [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using\n`projects.jobs.messages.list` is not recommended, as you can only request\nthe status of jobs that are running in `us-central1`.", 11428 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", 11429 // "httpMethod": "GET", 11430 // "id": "dataflow.projects.locations.jobs.messages.list", 11431 // "parameterOrder": [ 11432 // "projectId", 11433 // "location", 11434 // "jobId" 11435 // ], 11436 // "parameters": { 11437 // "endTime": { 11438 // "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", 11439 // "format": "google-datetime", 11440 // "location": "query", 11441 // "type": "string" 11442 // }, 11443 // "jobId": { 11444 // "description": "The job to get messages about.", 11445 // "location": "path", 11446 // "required": true, 11447 // "type": "string" 11448 // }, 11449 // "location": { 11450 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the job specified by job_id.", 11451 // "location": "path", 11452 // "required": true, 11453 // "type": "string" 11454 // }, 11455 // "minimumImportance": { 11456 // "description": "Filter to only get messages with importance \u003e= level", 11457 // "enum": [ 11458 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN", 11459 // "JOB_MESSAGE_DEBUG", 11460 // "JOB_MESSAGE_DETAILED", 11461 // "JOB_MESSAGE_BASIC", 11462 // "JOB_MESSAGE_WARNING", 11463 // "JOB_MESSAGE_ERROR" 11464 // ], 11465 // "location": "query", 11466 // "type": "string" 11467 // }, 11468 // "pageSize": { 11469 // "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", 11470 // "format": "int32", 11471 // "location": "query", 11472 // "type": "integer" 11473 // }, 11474 // "pageToken": { 11475 // "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", 11476 // "location": "query", 11477 // "type": "string" 11478 // }, 11479 // "projectId": { 11480 // "description": "A project id.", 11481 // "location": "path", 11482 // "required": true, 11483 // "type": "string" 11484 // }, 11485 // "startTime": { 11486 // "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", 11487 // "format": "google-datetime", 11488 // "location": "query", 11489 // "type": "string" 11490 // } 11491 // }, 11492 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages", 11493 // "response": { 11494 // "$ref": "ListJobMessagesResponse" 11495 // }, 11496 // "scopes": [ 11497 // "https://www.googleapis.com/auth/cloud-platform", 11498 // "https://www.googleapis.com/auth/compute", 11499 // "https://www.googleapis.com/auth/compute.readonly", 11500 // "https://www.googleapis.com/auth/userinfo.email" 11501 // ] 11502 // } 11503 11504} 11505 11506// Pages invokes f for each page of results. 11507// A non-nil error returned from f will halt the iteration. 11508// The provided context supersedes any context provided to the Context method. 11509func (c *ProjectsLocationsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error { 11510 c.ctx_ = ctx 11511 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 11512 for { 11513 x, err := c.Do() 11514 if err != nil { 11515 return err 11516 } 11517 if err := f(x); err != nil { 11518 return err 11519 } 11520 if x.NextPageToken == "" { 11521 return nil 11522 } 11523 c.PageToken(x.NextPageToken) 11524 } 11525} 11526 11527// method id "dataflow.projects.locations.jobs.workItems.lease": 11528 11529type ProjectsLocationsJobsWorkItemsLeaseCall struct { 11530 s *Service 11531 projectId string 11532 location string 11533 jobId string 11534 leaseworkitemrequest *LeaseWorkItemRequest 11535 urlParams_ gensupport.URLParams 11536 ctx_ context.Context 11537 header_ http.Header 11538} 11539 11540// Lease: Leases a dataflow WorkItem to run. 11541func (r *ProjectsLocationsJobsWorkItemsService) Lease(projectId string, location string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsLocationsJobsWorkItemsLeaseCall { 11542 c := &ProjectsLocationsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11543 c.projectId = projectId 11544 c.location = location 11545 c.jobId = jobId 11546 c.leaseworkitemrequest = leaseworkitemrequest 11547 return c 11548} 11549 11550// Fields allows partial responses to be retrieved. See 11551// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11552// for more information. 11553func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsLeaseCall { 11554 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11555 return c 11556} 11557 11558// Context sets the context to be used in this call's Do method. Any 11559// pending HTTP request will be aborted if the provided context is 11560// canceled. 11561func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsLeaseCall { 11562 c.ctx_ = ctx 11563 return c 11564} 11565 11566// Header returns an http.Header that can be modified by the caller to 11567// add HTTP headers to the request. 11568func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Header() http.Header { 11569 if c.header_ == nil { 11570 c.header_ = make(http.Header) 11571 } 11572 return c.header_ 11573} 11574 11575func (c *ProjectsLocationsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) { 11576 reqHeaders := make(http.Header) 11577 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11578 for k, v := range c.header_ { 11579 reqHeaders[k] = v 11580 } 11581 reqHeaders.Set("User-Agent", c.s.userAgent()) 11582 var body io.Reader = nil 11583 body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest) 11584 if err != nil { 11585 return nil, err 11586 } 11587 reqHeaders.Set("Content-Type", "application/json") 11588 c.urlParams_.Set("alt", alt) 11589 c.urlParams_.Set("prettyPrint", "false") 11590 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease") 11591 urls += "?" + c.urlParams_.Encode() 11592 req, err := http.NewRequest("POST", urls, body) 11593 if err != nil { 11594 return nil, err 11595 } 11596 req.Header = reqHeaders 11597 googleapi.Expand(req.URL, map[string]string{ 11598 "projectId": c.projectId, 11599 "location": c.location, 11600 "jobId": c.jobId, 11601 }) 11602 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11603} 11604 11605// Do executes the "dataflow.projects.locations.jobs.workItems.lease" call. 11606// Exactly one of *LeaseWorkItemResponse or error will be non-nil. Any 11607// non-2xx status code is an error. Response headers are in either 11608// *LeaseWorkItemResponse.ServerResponse.Header or (if a response was 11609// returned at all) in error.(*googleapi.Error).Header. Use 11610// googleapi.IsNotModified to check whether the returned error was 11611// because http.StatusNotModified was returned. 11612func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) { 11613 gensupport.SetOptions(c.urlParams_, opts...) 11614 res, err := c.doRequest("json") 11615 if res != nil && res.StatusCode == http.StatusNotModified { 11616 if res.Body != nil { 11617 res.Body.Close() 11618 } 11619 return nil, &googleapi.Error{ 11620 Code: res.StatusCode, 11621 Header: res.Header, 11622 } 11623 } 11624 if err != nil { 11625 return nil, err 11626 } 11627 defer googleapi.CloseBody(res) 11628 if err := googleapi.CheckResponse(res); err != nil { 11629 return nil, err 11630 } 11631 ret := &LeaseWorkItemResponse{ 11632 ServerResponse: googleapi.ServerResponse{ 11633 Header: res.Header, 11634 HTTPStatusCode: res.StatusCode, 11635 }, 11636 } 11637 target := &ret 11638 if err := gensupport.DecodeResponse(target, res); err != nil { 11639 return nil, err 11640 } 11641 return ret, nil 11642 // { 11643 // "description": "Leases a dataflow WorkItem to run.", 11644 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", 11645 // "httpMethod": "POST", 11646 // "id": "dataflow.projects.locations.jobs.workItems.lease", 11647 // "parameterOrder": [ 11648 // "projectId", 11649 // "location", 11650 // "jobId" 11651 // ], 11652 // "parameters": { 11653 // "jobId": { 11654 // "description": "Identifies the workflow job this worker belongs to.", 11655 // "location": "path", 11656 // "required": true, 11657 // "type": "string" 11658 // }, 11659 // "location": { 11660 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", 11661 // "location": "path", 11662 // "required": true, 11663 // "type": "string" 11664 // }, 11665 // "projectId": { 11666 // "description": "Identifies the project this worker belongs to.", 11667 // "location": "path", 11668 // "required": true, 11669 // "type": "string" 11670 // } 11671 // }, 11672 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", 11673 // "request": { 11674 // "$ref": "LeaseWorkItemRequest" 11675 // }, 11676 // "response": { 11677 // "$ref": "LeaseWorkItemResponse" 11678 // }, 11679 // "scopes": [ 11680 // "https://www.googleapis.com/auth/cloud-platform", 11681 // "https://www.googleapis.com/auth/compute", 11682 // "https://www.googleapis.com/auth/compute.readonly", 11683 // "https://www.googleapis.com/auth/userinfo.email" 11684 // ] 11685 // } 11686 11687} 11688 11689// method id "dataflow.projects.locations.jobs.workItems.reportStatus": 11690 11691type ProjectsLocationsJobsWorkItemsReportStatusCall struct { 11692 s *Service 11693 projectId string 11694 location string 11695 jobId string 11696 reportworkitemstatusrequest *ReportWorkItemStatusRequest 11697 urlParams_ gensupport.URLParams 11698 ctx_ context.Context 11699 header_ http.Header 11700} 11701 11702// ReportStatus: Reports the status of dataflow WorkItems leased by a 11703// worker. 11704func (r *ProjectsLocationsJobsWorkItemsService) ReportStatus(projectId string, location string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsLocationsJobsWorkItemsReportStatusCall { 11705 c := &ProjectsLocationsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11706 c.projectId = projectId 11707 c.location = location 11708 c.jobId = jobId 11709 c.reportworkitemstatusrequest = reportworkitemstatusrequest 11710 return c 11711} 11712 11713// Fields allows partial responses to be retrieved. See 11714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11715// for more information. 11716func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsReportStatusCall { 11717 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11718 return c 11719} 11720 11721// Context sets the context to be used in this call's Do method. Any 11722// pending HTTP request will be aborted if the provided context is 11723// canceled. 11724func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsReportStatusCall { 11725 c.ctx_ = ctx 11726 return c 11727} 11728 11729// Header returns an http.Header that can be modified by the caller to 11730// add HTTP headers to the request. 11731func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Header() http.Header { 11732 if c.header_ == nil { 11733 c.header_ = make(http.Header) 11734 } 11735 return c.header_ 11736} 11737 11738func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) { 11739 reqHeaders := make(http.Header) 11740 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11741 for k, v := range c.header_ { 11742 reqHeaders[k] = v 11743 } 11744 reqHeaders.Set("User-Agent", c.s.userAgent()) 11745 var body io.Reader = nil 11746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest) 11747 if err != nil { 11748 return nil, err 11749 } 11750 reqHeaders.Set("Content-Type", "application/json") 11751 c.urlParams_.Set("alt", alt) 11752 c.urlParams_.Set("prettyPrint", "false") 11753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus") 11754 urls += "?" + c.urlParams_.Encode() 11755 req, err := http.NewRequest("POST", urls, body) 11756 if err != nil { 11757 return nil, err 11758 } 11759 req.Header = reqHeaders 11760 googleapi.Expand(req.URL, map[string]string{ 11761 "projectId": c.projectId, 11762 "location": c.location, 11763 "jobId": c.jobId, 11764 }) 11765 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11766} 11767 11768// Do executes the "dataflow.projects.locations.jobs.workItems.reportStatus" call. 11769// Exactly one of *ReportWorkItemStatusResponse or error will be 11770// non-nil. Any non-2xx status code is an error. Response headers are in 11771// either *ReportWorkItemStatusResponse.ServerResponse.Header or (if a 11772// response was returned at all) in error.(*googleapi.Error).Header. Use 11773// googleapi.IsNotModified to check whether the returned error was 11774// because http.StatusNotModified was returned. 11775func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) { 11776 gensupport.SetOptions(c.urlParams_, opts...) 11777 res, err := c.doRequest("json") 11778 if res != nil && res.StatusCode == http.StatusNotModified { 11779 if res.Body != nil { 11780 res.Body.Close() 11781 } 11782 return nil, &googleapi.Error{ 11783 Code: res.StatusCode, 11784 Header: res.Header, 11785 } 11786 } 11787 if err != nil { 11788 return nil, err 11789 } 11790 defer googleapi.CloseBody(res) 11791 if err := googleapi.CheckResponse(res); err != nil { 11792 return nil, err 11793 } 11794 ret := &ReportWorkItemStatusResponse{ 11795 ServerResponse: googleapi.ServerResponse{ 11796 Header: res.Header, 11797 HTTPStatusCode: res.StatusCode, 11798 }, 11799 } 11800 target := &ret 11801 if err := gensupport.DecodeResponse(target, res); err != nil { 11802 return nil, err 11803 } 11804 return ret, nil 11805 // { 11806 // "description": "Reports the status of dataflow WorkItems leased by a worker.", 11807 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", 11808 // "httpMethod": "POST", 11809 // "id": "dataflow.projects.locations.jobs.workItems.reportStatus", 11810 // "parameterOrder": [ 11811 // "projectId", 11812 // "location", 11813 // "jobId" 11814 // ], 11815 // "parameters": { 11816 // "jobId": { 11817 // "description": "The job which the WorkItem is part of.", 11818 // "location": "path", 11819 // "required": true, 11820 // "type": "string" 11821 // }, 11822 // "location": { 11823 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that\ncontains the WorkItem's job.", 11824 // "location": "path", 11825 // "required": true, 11826 // "type": "string" 11827 // }, 11828 // "projectId": { 11829 // "description": "The project which owns the WorkItem's job.", 11830 // "location": "path", 11831 // "required": true, 11832 // "type": "string" 11833 // } 11834 // }, 11835 // "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", 11836 // "request": { 11837 // "$ref": "ReportWorkItemStatusRequest" 11838 // }, 11839 // "response": { 11840 // "$ref": "ReportWorkItemStatusResponse" 11841 // }, 11842 // "scopes": [ 11843 // "https://www.googleapis.com/auth/cloud-platform", 11844 // "https://www.googleapis.com/auth/compute", 11845 // "https://www.googleapis.com/auth/compute.readonly", 11846 // "https://www.googleapis.com/auth/userinfo.email" 11847 // ] 11848 // } 11849 11850} 11851 11852// method id "dataflow.projects.locations.sql.validate": 11853 11854type ProjectsLocationsSqlValidateCall struct { 11855 s *Service 11856 projectId string 11857 location string 11858 urlParams_ gensupport.URLParams 11859 ifNoneMatch_ string 11860 ctx_ context.Context 11861 header_ http.Header 11862} 11863 11864// Validate: Validates a GoogleSQL query for Cloud Dataflow syntax. Will 11865// always 11866// confirm the given query parses correctly, and if able to look 11867// up 11868// schema information from DataCatalog, will validate that the 11869// query 11870// analyzes properly as well. 11871func (r *ProjectsLocationsSqlService) Validate(projectId string, location string) *ProjectsLocationsSqlValidateCall { 11872 c := &ProjectsLocationsSqlValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11873 c.projectId = projectId 11874 c.location = location 11875 return c 11876} 11877 11878// Query sets the optional parameter "query": The sql query to validate. 11879func (c *ProjectsLocationsSqlValidateCall) Query(query string) *ProjectsLocationsSqlValidateCall { 11880 c.urlParams_.Set("query", query) 11881 return c 11882} 11883 11884// Fields allows partial responses to be retrieved. See 11885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11886// for more information. 11887func (c *ProjectsLocationsSqlValidateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSqlValidateCall { 11888 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11889 return c 11890} 11891 11892// IfNoneMatch sets the optional parameter which makes the operation 11893// fail if the object's ETag matches the given value. This is useful for 11894// getting updates only after the object has changed since the last 11895// request. Use googleapi.IsNotModified to check whether the response 11896// error from Do is the result of In-None-Match. 11897func (c *ProjectsLocationsSqlValidateCall) IfNoneMatch(entityTag string) *ProjectsLocationsSqlValidateCall { 11898 c.ifNoneMatch_ = entityTag 11899 return c 11900} 11901 11902// Context sets the context to be used in this call's Do method. Any 11903// pending HTTP request will be aborted if the provided context is 11904// canceled. 11905func (c *ProjectsLocationsSqlValidateCall) Context(ctx context.Context) *ProjectsLocationsSqlValidateCall { 11906 c.ctx_ = ctx 11907 return c 11908} 11909 11910// Header returns an http.Header that can be modified by the caller to 11911// add HTTP headers to the request. 11912func (c *ProjectsLocationsSqlValidateCall) Header() http.Header { 11913 if c.header_ == nil { 11914 c.header_ = make(http.Header) 11915 } 11916 return c.header_ 11917} 11918 11919func (c *ProjectsLocationsSqlValidateCall) doRequest(alt string) (*http.Response, error) { 11920 reqHeaders := make(http.Header) 11921 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11922 for k, v := range c.header_ { 11923 reqHeaders[k] = v 11924 } 11925 reqHeaders.Set("User-Agent", c.s.userAgent()) 11926 if c.ifNoneMatch_ != "" { 11927 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11928 } 11929 var body io.Reader = nil 11930 c.urlParams_.Set("alt", alt) 11931 c.urlParams_.Set("prettyPrint", "false") 11932 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/sql:validate") 11933 urls += "?" + c.urlParams_.Encode() 11934 req, err := http.NewRequest("GET", urls, body) 11935 if err != nil { 11936 return nil, err 11937 } 11938 req.Header = reqHeaders 11939 googleapi.Expand(req.URL, map[string]string{ 11940 "projectId": c.projectId, 11941 "location": c.location, 11942 }) 11943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11944} 11945 11946// Do executes the "dataflow.projects.locations.sql.validate" call. 11947// Exactly one of *ValidateResponse or error will be non-nil. Any 11948// non-2xx status code is an error. Response headers are in either 11949// *ValidateResponse.ServerResponse.Header or (if a response was 11950// returned at all) in error.(*googleapi.Error).Header. Use 11951// googleapi.IsNotModified to check whether the returned error was 11952// because http.StatusNotModified was returned. 11953func (c *ProjectsLocationsSqlValidateCall) Do(opts ...googleapi.CallOption) (*ValidateResponse, error) { 11954 gensupport.SetOptions(c.urlParams_, opts...) 11955 res, err := c.doRequest("json") 11956 if res != nil && res.StatusCode == http.StatusNotModified { 11957 if res.Body != nil { 11958 res.Body.Close() 11959 } 11960 return nil, &googleapi.Error{ 11961 Code: res.StatusCode, 11962 Header: res.Header, 11963 } 11964 } 11965 if err != nil { 11966 return nil, err 11967 } 11968 defer googleapi.CloseBody(res) 11969 if err := googleapi.CheckResponse(res); err != nil { 11970 return nil, err 11971 } 11972 ret := &ValidateResponse{ 11973 ServerResponse: googleapi.ServerResponse{ 11974 Header: res.Header, 11975 HTTPStatusCode: res.StatusCode, 11976 }, 11977 } 11978 target := &ret 11979 if err := gensupport.DecodeResponse(target, res); err != nil { 11980 return nil, err 11981 } 11982 return ret, nil 11983 // { 11984 // "description": "Validates a GoogleSQL query for Cloud Dataflow syntax. Will always\nconfirm the given query parses correctly, and if able to look up\nschema information from DataCatalog, will validate that the query\nanalyzes properly as well.", 11985 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/sql:validate", 11986 // "httpMethod": "GET", 11987 // "id": "dataflow.projects.locations.sql.validate", 11988 // "parameterOrder": [ 11989 // "projectId", 11990 // "location" 11991 // ], 11992 // "parameters": { 11993 // "location": { 11994 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", 11995 // "location": "path", 11996 // "required": true, 11997 // "type": "string" 11998 // }, 11999 // "projectId": { 12000 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 12001 // "location": "path", 12002 // "required": true, 12003 // "type": "string" 12004 // }, 12005 // "query": { 12006 // "description": "The sql query to validate.", 12007 // "location": "query", 12008 // "type": "string" 12009 // } 12010 // }, 12011 // "path": "v1b3/projects/{projectId}/locations/{location}/sql:validate", 12012 // "response": { 12013 // "$ref": "ValidateResponse" 12014 // }, 12015 // "scopes": [ 12016 // "https://www.googleapis.com/auth/cloud-platform", 12017 // "https://www.googleapis.com/auth/userinfo.email" 12018 // ] 12019 // } 12020 12021} 12022 12023// method id "dataflow.projects.locations.templates.create": 12024 12025type ProjectsLocationsTemplatesCreateCall struct { 12026 s *Service 12027 projectId string 12028 location string 12029 createjobfromtemplaterequest *CreateJobFromTemplateRequest 12030 urlParams_ gensupport.URLParams 12031 ctx_ context.Context 12032 header_ http.Header 12033} 12034 12035// Create: Creates a Cloud Dataflow job from a template. 12036func (r *ProjectsLocationsTemplatesService) Create(projectId string, location string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsLocationsTemplatesCreateCall { 12037 c := &ProjectsLocationsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12038 c.projectId = projectId 12039 c.location = location 12040 c.createjobfromtemplaterequest = createjobfromtemplaterequest 12041 return c 12042} 12043 12044// Fields allows partial responses to be retrieved. See 12045// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12046// for more information. 12047func (c *ProjectsLocationsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesCreateCall { 12048 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12049 return c 12050} 12051 12052// Context sets the context to be used in this call's Do method. Any 12053// pending HTTP request will be aborted if the provided context is 12054// canceled. 12055func (c *ProjectsLocationsTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTemplatesCreateCall { 12056 c.ctx_ = ctx 12057 return c 12058} 12059 12060// Header returns an http.Header that can be modified by the caller to 12061// add HTTP headers to the request. 12062func (c *ProjectsLocationsTemplatesCreateCall) Header() http.Header { 12063 if c.header_ == nil { 12064 c.header_ = make(http.Header) 12065 } 12066 return c.header_ 12067} 12068 12069func (c *ProjectsLocationsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 12070 reqHeaders := make(http.Header) 12071 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12072 for k, v := range c.header_ { 12073 reqHeaders[k] = v 12074 } 12075 reqHeaders.Set("User-Agent", c.s.userAgent()) 12076 var body io.Reader = nil 12077 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest) 12078 if err != nil { 12079 return nil, err 12080 } 12081 reqHeaders.Set("Content-Type", "application/json") 12082 c.urlParams_.Set("alt", alt) 12083 c.urlParams_.Set("prettyPrint", "false") 12084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates") 12085 urls += "?" + c.urlParams_.Encode() 12086 req, err := http.NewRequest("POST", urls, body) 12087 if err != nil { 12088 return nil, err 12089 } 12090 req.Header = reqHeaders 12091 googleapi.Expand(req.URL, map[string]string{ 12092 "projectId": c.projectId, 12093 "location": c.location, 12094 }) 12095 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12096} 12097 12098// Do executes the "dataflow.projects.locations.templates.create" call. 12099// Exactly one of *Job or error will be non-nil. Any non-2xx status code 12100// is an error. Response headers are in either 12101// *Job.ServerResponse.Header or (if a response was returned at all) in 12102// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12103// whether the returned error was because http.StatusNotModified was 12104// returned. 12105func (c *ProjectsLocationsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 12106 gensupport.SetOptions(c.urlParams_, opts...) 12107 res, err := c.doRequest("json") 12108 if res != nil && res.StatusCode == http.StatusNotModified { 12109 if res.Body != nil { 12110 res.Body.Close() 12111 } 12112 return nil, &googleapi.Error{ 12113 Code: res.StatusCode, 12114 Header: res.Header, 12115 } 12116 } 12117 if err != nil { 12118 return nil, err 12119 } 12120 defer googleapi.CloseBody(res) 12121 if err := googleapi.CheckResponse(res); err != nil { 12122 return nil, err 12123 } 12124 ret := &Job{ 12125 ServerResponse: googleapi.ServerResponse{ 12126 Header: res.Header, 12127 HTTPStatusCode: res.StatusCode, 12128 }, 12129 } 12130 target := &ret 12131 if err := gensupport.DecodeResponse(target, res); err != nil { 12132 return nil, err 12133 } 12134 return ret, nil 12135 // { 12136 // "description": "Creates a Cloud Dataflow job from a template.", 12137 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", 12138 // "httpMethod": "POST", 12139 // "id": "dataflow.projects.locations.templates.create", 12140 // "parameterOrder": [ 12141 // "projectId", 12142 // "location" 12143 // ], 12144 // "parameters": { 12145 // "location": { 12146 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", 12147 // "location": "path", 12148 // "required": true, 12149 // "type": "string" 12150 // }, 12151 // "projectId": { 12152 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 12153 // "location": "path", 12154 // "required": true, 12155 // "type": "string" 12156 // } 12157 // }, 12158 // "path": "v1b3/projects/{projectId}/locations/{location}/templates", 12159 // "request": { 12160 // "$ref": "CreateJobFromTemplateRequest" 12161 // }, 12162 // "response": { 12163 // "$ref": "Job" 12164 // }, 12165 // "scopes": [ 12166 // "https://www.googleapis.com/auth/cloud-platform", 12167 // "https://www.googleapis.com/auth/compute", 12168 // "https://www.googleapis.com/auth/compute.readonly", 12169 // "https://www.googleapis.com/auth/userinfo.email" 12170 // ] 12171 // } 12172 12173} 12174 12175// method id "dataflow.projects.locations.templates.get": 12176 12177type ProjectsLocationsTemplatesGetCall struct { 12178 s *Service 12179 projectId string 12180 location string 12181 urlParams_ gensupport.URLParams 12182 ifNoneMatch_ string 12183 ctx_ context.Context 12184 header_ http.Header 12185} 12186 12187// Get: Get the template associated with a template. 12188func (r *ProjectsLocationsTemplatesService) Get(projectId string, location string) *ProjectsLocationsTemplatesGetCall { 12189 c := &ProjectsLocationsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12190 c.projectId = projectId 12191 c.location = location 12192 return c 12193} 12194 12195// GcsPath sets the optional parameter "gcsPath": Required. A Cloud 12196// Storage path to the template from which to 12197// create the job. 12198// Must be valid Cloud Storage URL, beginning with 'gs://'. 12199func (c *ProjectsLocationsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesGetCall { 12200 c.urlParams_.Set("gcsPath", gcsPath) 12201 return c 12202} 12203 12204// View sets the optional parameter "view": The view to retrieve. 12205// Defaults to METADATA_ONLY. 12206// 12207// Possible values: 12208// "METADATA_ONLY" 12209func (c *ProjectsLocationsTemplatesGetCall) View(view string) *ProjectsLocationsTemplatesGetCall { 12210 c.urlParams_.Set("view", view) 12211 return c 12212} 12213 12214// Fields allows partial responses to be retrieved. See 12215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12216// for more information. 12217func (c *ProjectsLocationsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesGetCall { 12218 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12219 return c 12220} 12221 12222// IfNoneMatch sets the optional parameter which makes the operation 12223// fail if the object's ETag matches the given value. This is useful for 12224// getting updates only after the object has changed since the last 12225// request. Use googleapi.IsNotModified to check whether the response 12226// error from Do is the result of In-None-Match. 12227func (c *ProjectsLocationsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTemplatesGetCall { 12228 c.ifNoneMatch_ = entityTag 12229 return c 12230} 12231 12232// Context sets the context to be used in this call's Do method. Any 12233// pending HTTP request will be aborted if the provided context is 12234// canceled. 12235func (c *ProjectsLocationsTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTemplatesGetCall { 12236 c.ctx_ = ctx 12237 return c 12238} 12239 12240// Header returns an http.Header that can be modified by the caller to 12241// add HTTP headers to the request. 12242func (c *ProjectsLocationsTemplatesGetCall) Header() http.Header { 12243 if c.header_ == nil { 12244 c.header_ = make(http.Header) 12245 } 12246 return c.header_ 12247} 12248 12249func (c *ProjectsLocationsTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 12250 reqHeaders := make(http.Header) 12251 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12252 for k, v := range c.header_ { 12253 reqHeaders[k] = v 12254 } 12255 reqHeaders.Set("User-Agent", c.s.userAgent()) 12256 if c.ifNoneMatch_ != "" { 12257 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12258 } 12259 var body io.Reader = nil 12260 c.urlParams_.Set("alt", alt) 12261 c.urlParams_.Set("prettyPrint", "false") 12262 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:get") 12263 urls += "?" + c.urlParams_.Encode() 12264 req, err := http.NewRequest("GET", urls, body) 12265 if err != nil { 12266 return nil, err 12267 } 12268 req.Header = reqHeaders 12269 googleapi.Expand(req.URL, map[string]string{ 12270 "projectId": c.projectId, 12271 "location": c.location, 12272 }) 12273 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12274} 12275 12276// Do executes the "dataflow.projects.locations.templates.get" call. 12277// Exactly one of *GetTemplateResponse or error will be non-nil. Any 12278// non-2xx status code is an error. Response headers are in either 12279// *GetTemplateResponse.ServerResponse.Header or (if a response was 12280// returned at all) in error.(*googleapi.Error).Header. Use 12281// googleapi.IsNotModified to check whether the returned error was 12282// because http.StatusNotModified was returned. 12283func (c *ProjectsLocationsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) { 12284 gensupport.SetOptions(c.urlParams_, opts...) 12285 res, err := c.doRequest("json") 12286 if res != nil && res.StatusCode == http.StatusNotModified { 12287 if res.Body != nil { 12288 res.Body.Close() 12289 } 12290 return nil, &googleapi.Error{ 12291 Code: res.StatusCode, 12292 Header: res.Header, 12293 } 12294 } 12295 if err != nil { 12296 return nil, err 12297 } 12298 defer googleapi.CloseBody(res) 12299 if err := googleapi.CheckResponse(res); err != nil { 12300 return nil, err 12301 } 12302 ret := &GetTemplateResponse{ 12303 ServerResponse: googleapi.ServerResponse{ 12304 Header: res.Header, 12305 HTTPStatusCode: res.StatusCode, 12306 }, 12307 } 12308 target := &ret 12309 if err := gensupport.DecodeResponse(target, res); err != nil { 12310 return nil, err 12311 } 12312 return ret, nil 12313 // { 12314 // "description": "Get the template associated with a template.", 12315 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", 12316 // "httpMethod": "GET", 12317 // "id": "dataflow.projects.locations.templates.get", 12318 // "parameterOrder": [ 12319 // "projectId", 12320 // "location" 12321 // ], 12322 // "parameters": { 12323 // "gcsPath": { 12324 // "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", 12325 // "location": "query", 12326 // "type": "string" 12327 // }, 12328 // "location": { 12329 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", 12330 // "location": "path", 12331 // "required": true, 12332 // "type": "string" 12333 // }, 12334 // "projectId": { 12335 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 12336 // "location": "path", 12337 // "required": true, 12338 // "type": "string" 12339 // }, 12340 // "view": { 12341 // "description": "The view to retrieve. Defaults to METADATA_ONLY.", 12342 // "enum": [ 12343 // "METADATA_ONLY" 12344 // ], 12345 // "location": "query", 12346 // "type": "string" 12347 // } 12348 // }, 12349 // "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", 12350 // "response": { 12351 // "$ref": "GetTemplateResponse" 12352 // }, 12353 // "scopes": [ 12354 // "https://www.googleapis.com/auth/cloud-platform", 12355 // "https://www.googleapis.com/auth/compute", 12356 // "https://www.googleapis.com/auth/compute.readonly", 12357 // "https://www.googleapis.com/auth/userinfo.email" 12358 // ] 12359 // } 12360 12361} 12362 12363// method id "dataflow.projects.locations.templates.launch": 12364 12365type ProjectsLocationsTemplatesLaunchCall struct { 12366 s *Service 12367 projectId string 12368 location string 12369 launchtemplateparameters *LaunchTemplateParameters 12370 urlParams_ gensupport.URLParams 12371 ctx_ context.Context 12372 header_ http.Header 12373} 12374 12375// Launch: Launch a template. 12376func (r *ProjectsLocationsTemplatesService) Launch(projectId string, location string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsLocationsTemplatesLaunchCall { 12377 c := &ProjectsLocationsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12378 c.projectId = projectId 12379 c.location = location 12380 c.launchtemplateparameters = launchtemplateparameters 12381 return c 12382} 12383 12384// DynamicTemplateGcsPath sets the optional parameter 12385// "dynamicTemplate.gcsPath": Path to dynamic template spec file on 12386// GCS. 12387// The file must be a Json serialized DynamicTemplateFieSpec object. 12388func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsLocationsTemplatesLaunchCall { 12389 c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath) 12390 return c 12391} 12392 12393// DynamicTemplateStagingLocation sets the optional parameter 12394// "dynamicTemplate.stagingLocation": Cloud Storage path for staging 12395// dependencies. 12396// Must be a valid Cloud Storage URL, beginning with `gs://`. 12397func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsLocationsTemplatesLaunchCall { 12398 c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation) 12399 return c 12400} 12401 12402// GcsPath sets the optional parameter "gcsPath": A Cloud Storage path 12403// to the template from which to create 12404// the job. 12405// Must be valid Cloud Storage URL, beginning with 'gs://'. 12406func (c *ProjectsLocationsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesLaunchCall { 12407 c.urlParams_.Set("gcsPath", gcsPath) 12408 return c 12409} 12410 12411// ValidateOnly sets the optional parameter "validateOnly": If true, the 12412// request is validated but not actually executed. 12413// Defaults to false. 12414func (c *ProjectsLocationsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTemplatesLaunchCall { 12415 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 12416 return c 12417} 12418 12419// Fields allows partial responses to be retrieved. See 12420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12421// for more information. 12422func (c *ProjectsLocationsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesLaunchCall { 12423 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12424 return c 12425} 12426 12427// Context sets the context to be used in this call's Do method. Any 12428// pending HTTP request will be aborted if the provided context is 12429// canceled. 12430func (c *ProjectsLocationsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsTemplatesLaunchCall { 12431 c.ctx_ = ctx 12432 return c 12433} 12434 12435// Header returns an http.Header that can be modified by the caller to 12436// add HTTP headers to the request. 12437func (c *ProjectsLocationsTemplatesLaunchCall) Header() http.Header { 12438 if c.header_ == nil { 12439 c.header_ = make(http.Header) 12440 } 12441 return c.header_ 12442} 12443 12444func (c *ProjectsLocationsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 12445 reqHeaders := make(http.Header) 12446 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12447 for k, v := range c.header_ { 12448 reqHeaders[k] = v 12449 } 12450 reqHeaders.Set("User-Agent", c.s.userAgent()) 12451 var body io.Reader = nil 12452 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters) 12453 if err != nil { 12454 return nil, err 12455 } 12456 reqHeaders.Set("Content-Type", "application/json") 12457 c.urlParams_.Set("alt", alt) 12458 c.urlParams_.Set("prettyPrint", "false") 12459 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:launch") 12460 urls += "?" + c.urlParams_.Encode() 12461 req, err := http.NewRequest("POST", urls, body) 12462 if err != nil { 12463 return nil, err 12464 } 12465 req.Header = reqHeaders 12466 googleapi.Expand(req.URL, map[string]string{ 12467 "projectId": c.projectId, 12468 "location": c.location, 12469 }) 12470 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12471} 12472 12473// Do executes the "dataflow.projects.locations.templates.launch" call. 12474// Exactly one of *LaunchTemplateResponse or error will be non-nil. Any 12475// non-2xx status code is an error. Response headers are in either 12476// *LaunchTemplateResponse.ServerResponse.Header or (if a response was 12477// returned at all) in error.(*googleapi.Error).Header. Use 12478// googleapi.IsNotModified to check whether the returned error was 12479// because http.StatusNotModified was returned. 12480func (c *ProjectsLocationsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) { 12481 gensupport.SetOptions(c.urlParams_, opts...) 12482 res, err := c.doRequest("json") 12483 if res != nil && res.StatusCode == http.StatusNotModified { 12484 if res.Body != nil { 12485 res.Body.Close() 12486 } 12487 return nil, &googleapi.Error{ 12488 Code: res.StatusCode, 12489 Header: res.Header, 12490 } 12491 } 12492 if err != nil { 12493 return nil, err 12494 } 12495 defer googleapi.CloseBody(res) 12496 if err := googleapi.CheckResponse(res); err != nil { 12497 return nil, err 12498 } 12499 ret := &LaunchTemplateResponse{ 12500 ServerResponse: googleapi.ServerResponse{ 12501 Header: res.Header, 12502 HTTPStatusCode: res.StatusCode, 12503 }, 12504 } 12505 target := &ret 12506 if err := gensupport.DecodeResponse(target, res); err != nil { 12507 return nil, err 12508 } 12509 return ret, nil 12510 // { 12511 // "description": "Launch a template.", 12512 // "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch", 12513 // "httpMethod": "POST", 12514 // "id": "dataflow.projects.locations.templates.launch", 12515 // "parameterOrder": [ 12516 // "projectId", 12517 // "location" 12518 // ], 12519 // "parameters": { 12520 // "dynamicTemplate.gcsPath": { 12521 // "description": "Path to dynamic template spec file on GCS.\nThe file must be a Json serialized DynamicTemplateFieSpec object.", 12522 // "location": "query", 12523 // "type": "string" 12524 // }, 12525 // "dynamicTemplate.stagingLocation": { 12526 // "description": "Cloud Storage path for staging dependencies.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", 12527 // "location": "query", 12528 // "type": "string" 12529 // }, 12530 // "gcsPath": { 12531 // "description": "A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", 12532 // "location": "query", 12533 // "type": "string" 12534 // }, 12535 // "location": { 12536 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", 12537 // "location": "path", 12538 // "required": true, 12539 // "type": "string" 12540 // }, 12541 // "projectId": { 12542 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 12543 // "location": "path", 12544 // "required": true, 12545 // "type": "string" 12546 // }, 12547 // "validateOnly": { 12548 // "description": "If true, the request is validated but not actually executed.\nDefaults to false.", 12549 // "location": "query", 12550 // "type": "boolean" 12551 // } 12552 // }, 12553 // "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch", 12554 // "request": { 12555 // "$ref": "LaunchTemplateParameters" 12556 // }, 12557 // "response": { 12558 // "$ref": "LaunchTemplateResponse" 12559 // }, 12560 // "scopes": [ 12561 // "https://www.googleapis.com/auth/cloud-platform", 12562 // "https://www.googleapis.com/auth/compute", 12563 // "https://www.googleapis.com/auth/compute.readonly", 12564 // "https://www.googleapis.com/auth/userinfo.email" 12565 // ] 12566 // } 12567 12568} 12569 12570// method id "dataflow.projects.templates.create": 12571 12572type ProjectsTemplatesCreateCall struct { 12573 s *Service 12574 projectId string 12575 createjobfromtemplaterequest *CreateJobFromTemplateRequest 12576 urlParams_ gensupport.URLParams 12577 ctx_ context.Context 12578 header_ http.Header 12579} 12580 12581// Create: Creates a Cloud Dataflow job from a template. 12582func (r *ProjectsTemplatesService) Create(projectId string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsTemplatesCreateCall { 12583 c := &ProjectsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12584 c.projectId = projectId 12585 c.createjobfromtemplaterequest = createjobfromtemplaterequest 12586 return c 12587} 12588 12589// Fields allows partial responses to be retrieved. See 12590// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12591// for more information. 12592func (c *ProjectsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsTemplatesCreateCall { 12593 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12594 return c 12595} 12596 12597// Context sets the context to be used in this call's Do method. Any 12598// pending HTTP request will be aborted if the provided context is 12599// canceled. 12600func (c *ProjectsTemplatesCreateCall) Context(ctx context.Context) *ProjectsTemplatesCreateCall { 12601 c.ctx_ = ctx 12602 return c 12603} 12604 12605// Header returns an http.Header that can be modified by the caller to 12606// add HTTP headers to the request. 12607func (c *ProjectsTemplatesCreateCall) Header() http.Header { 12608 if c.header_ == nil { 12609 c.header_ = make(http.Header) 12610 } 12611 return c.header_ 12612} 12613 12614func (c *ProjectsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 12615 reqHeaders := make(http.Header) 12616 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12617 for k, v := range c.header_ { 12618 reqHeaders[k] = v 12619 } 12620 reqHeaders.Set("User-Agent", c.s.userAgent()) 12621 var body io.Reader = nil 12622 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest) 12623 if err != nil { 12624 return nil, err 12625 } 12626 reqHeaders.Set("Content-Type", "application/json") 12627 c.urlParams_.Set("alt", alt) 12628 c.urlParams_.Set("prettyPrint", "false") 12629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates") 12630 urls += "?" + c.urlParams_.Encode() 12631 req, err := http.NewRequest("POST", urls, body) 12632 if err != nil { 12633 return nil, err 12634 } 12635 req.Header = reqHeaders 12636 googleapi.Expand(req.URL, map[string]string{ 12637 "projectId": c.projectId, 12638 }) 12639 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12640} 12641 12642// Do executes the "dataflow.projects.templates.create" call. 12643// Exactly one of *Job or error will be non-nil. Any non-2xx status code 12644// is an error. Response headers are in either 12645// *Job.ServerResponse.Header or (if a response was returned at all) in 12646// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12647// whether the returned error was because http.StatusNotModified was 12648// returned. 12649func (c *ProjectsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 12650 gensupport.SetOptions(c.urlParams_, opts...) 12651 res, err := c.doRequest("json") 12652 if res != nil && res.StatusCode == http.StatusNotModified { 12653 if res.Body != nil { 12654 res.Body.Close() 12655 } 12656 return nil, &googleapi.Error{ 12657 Code: res.StatusCode, 12658 Header: res.Header, 12659 } 12660 } 12661 if err != nil { 12662 return nil, err 12663 } 12664 defer googleapi.CloseBody(res) 12665 if err := googleapi.CheckResponse(res); err != nil { 12666 return nil, err 12667 } 12668 ret := &Job{ 12669 ServerResponse: googleapi.ServerResponse{ 12670 Header: res.Header, 12671 HTTPStatusCode: res.StatusCode, 12672 }, 12673 } 12674 target := &ret 12675 if err := gensupport.DecodeResponse(target, res); err != nil { 12676 return nil, err 12677 } 12678 return ret, nil 12679 // { 12680 // "description": "Creates a Cloud Dataflow job from a template.", 12681 // "flatPath": "v1b3/projects/{projectId}/templates", 12682 // "httpMethod": "POST", 12683 // "id": "dataflow.projects.templates.create", 12684 // "parameterOrder": [ 12685 // "projectId" 12686 // ], 12687 // "parameters": { 12688 // "projectId": { 12689 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 12690 // "location": "path", 12691 // "required": true, 12692 // "type": "string" 12693 // } 12694 // }, 12695 // "path": "v1b3/projects/{projectId}/templates", 12696 // "request": { 12697 // "$ref": "CreateJobFromTemplateRequest" 12698 // }, 12699 // "response": { 12700 // "$ref": "Job" 12701 // }, 12702 // "scopes": [ 12703 // "https://www.googleapis.com/auth/cloud-platform", 12704 // "https://www.googleapis.com/auth/compute", 12705 // "https://www.googleapis.com/auth/compute.readonly", 12706 // "https://www.googleapis.com/auth/userinfo.email" 12707 // ] 12708 // } 12709 12710} 12711 12712// method id "dataflow.projects.templates.get": 12713 12714type ProjectsTemplatesGetCall struct { 12715 s *Service 12716 projectId string 12717 urlParams_ gensupport.URLParams 12718 ifNoneMatch_ string 12719 ctx_ context.Context 12720 header_ http.Header 12721} 12722 12723// Get: Get the template associated with a template. 12724func (r *ProjectsTemplatesService) Get(projectId string) *ProjectsTemplatesGetCall { 12725 c := &ProjectsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12726 c.projectId = projectId 12727 return c 12728} 12729 12730// GcsPath sets the optional parameter "gcsPath": Required. A Cloud 12731// Storage path to the template from which to 12732// create the job. 12733// Must be valid Cloud Storage URL, beginning with 'gs://'. 12734func (c *ProjectsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsTemplatesGetCall { 12735 c.urlParams_.Set("gcsPath", gcsPath) 12736 return c 12737} 12738 12739// Location sets the optional parameter "location": The [regional 12740// endpoint] 12741// (https://cloud.google.com/dataflow/docs/concepts/regional-en 12742// dpoints) to 12743// which to direct the request. 12744func (c *ProjectsTemplatesGetCall) Location(location string) *ProjectsTemplatesGetCall { 12745 c.urlParams_.Set("location", location) 12746 return c 12747} 12748 12749// View sets the optional parameter "view": The view to retrieve. 12750// Defaults to METADATA_ONLY. 12751// 12752// Possible values: 12753// "METADATA_ONLY" 12754func (c *ProjectsTemplatesGetCall) View(view string) *ProjectsTemplatesGetCall { 12755 c.urlParams_.Set("view", view) 12756 return c 12757} 12758 12759// Fields allows partial responses to be retrieved. See 12760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12761// for more information. 12762func (c *ProjectsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsTemplatesGetCall { 12763 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12764 return c 12765} 12766 12767// IfNoneMatch sets the optional parameter which makes the operation 12768// fail if the object's ETag matches the given value. This is useful for 12769// getting updates only after the object has changed since the last 12770// request. Use googleapi.IsNotModified to check whether the response 12771// error from Do is the result of In-None-Match. 12772func (c *ProjectsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsTemplatesGetCall { 12773 c.ifNoneMatch_ = entityTag 12774 return c 12775} 12776 12777// Context sets the context to be used in this call's Do method. Any 12778// pending HTTP request will be aborted if the provided context is 12779// canceled. 12780func (c *ProjectsTemplatesGetCall) Context(ctx context.Context) *ProjectsTemplatesGetCall { 12781 c.ctx_ = ctx 12782 return c 12783} 12784 12785// Header returns an http.Header that can be modified by the caller to 12786// add HTTP headers to the request. 12787func (c *ProjectsTemplatesGetCall) Header() http.Header { 12788 if c.header_ == nil { 12789 c.header_ = make(http.Header) 12790 } 12791 return c.header_ 12792} 12793 12794func (c *ProjectsTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 12795 reqHeaders := make(http.Header) 12796 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12797 for k, v := range c.header_ { 12798 reqHeaders[k] = v 12799 } 12800 reqHeaders.Set("User-Agent", c.s.userAgent()) 12801 if c.ifNoneMatch_ != "" { 12802 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12803 } 12804 var body io.Reader = nil 12805 c.urlParams_.Set("alt", alt) 12806 c.urlParams_.Set("prettyPrint", "false") 12807 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:get") 12808 urls += "?" + c.urlParams_.Encode() 12809 req, err := http.NewRequest("GET", urls, body) 12810 if err != nil { 12811 return nil, err 12812 } 12813 req.Header = reqHeaders 12814 googleapi.Expand(req.URL, map[string]string{ 12815 "projectId": c.projectId, 12816 }) 12817 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12818} 12819 12820// Do executes the "dataflow.projects.templates.get" call. 12821// Exactly one of *GetTemplateResponse or error will be non-nil. Any 12822// non-2xx status code is an error. Response headers are in either 12823// *GetTemplateResponse.ServerResponse.Header or (if a response was 12824// returned at all) in error.(*googleapi.Error).Header. Use 12825// googleapi.IsNotModified to check whether the returned error was 12826// because http.StatusNotModified was returned. 12827func (c *ProjectsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) { 12828 gensupport.SetOptions(c.urlParams_, opts...) 12829 res, err := c.doRequest("json") 12830 if res != nil && res.StatusCode == http.StatusNotModified { 12831 if res.Body != nil { 12832 res.Body.Close() 12833 } 12834 return nil, &googleapi.Error{ 12835 Code: res.StatusCode, 12836 Header: res.Header, 12837 } 12838 } 12839 if err != nil { 12840 return nil, err 12841 } 12842 defer googleapi.CloseBody(res) 12843 if err := googleapi.CheckResponse(res); err != nil { 12844 return nil, err 12845 } 12846 ret := &GetTemplateResponse{ 12847 ServerResponse: googleapi.ServerResponse{ 12848 Header: res.Header, 12849 HTTPStatusCode: res.StatusCode, 12850 }, 12851 } 12852 target := &ret 12853 if err := gensupport.DecodeResponse(target, res); err != nil { 12854 return nil, err 12855 } 12856 return ret, nil 12857 // { 12858 // "description": "Get the template associated with a template.", 12859 // "flatPath": "v1b3/projects/{projectId}/templates:get", 12860 // "httpMethod": "GET", 12861 // "id": "dataflow.projects.templates.get", 12862 // "parameterOrder": [ 12863 // "projectId" 12864 // ], 12865 // "parameters": { 12866 // "gcsPath": { 12867 // "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", 12868 // "location": "query", 12869 // "type": "string" 12870 // }, 12871 // "location": { 12872 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", 12873 // "location": "query", 12874 // "type": "string" 12875 // }, 12876 // "projectId": { 12877 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 12878 // "location": "path", 12879 // "required": true, 12880 // "type": "string" 12881 // }, 12882 // "view": { 12883 // "description": "The view to retrieve. Defaults to METADATA_ONLY.", 12884 // "enum": [ 12885 // "METADATA_ONLY" 12886 // ], 12887 // "location": "query", 12888 // "type": "string" 12889 // } 12890 // }, 12891 // "path": "v1b3/projects/{projectId}/templates:get", 12892 // "response": { 12893 // "$ref": "GetTemplateResponse" 12894 // }, 12895 // "scopes": [ 12896 // "https://www.googleapis.com/auth/cloud-platform", 12897 // "https://www.googleapis.com/auth/compute", 12898 // "https://www.googleapis.com/auth/compute.readonly", 12899 // "https://www.googleapis.com/auth/userinfo.email" 12900 // ] 12901 // } 12902 12903} 12904 12905// method id "dataflow.projects.templates.launch": 12906 12907type ProjectsTemplatesLaunchCall struct { 12908 s *Service 12909 projectId string 12910 launchtemplateparameters *LaunchTemplateParameters 12911 urlParams_ gensupport.URLParams 12912 ctx_ context.Context 12913 header_ http.Header 12914} 12915 12916// Launch: Launch a template. 12917func (r *ProjectsTemplatesService) Launch(projectId string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsTemplatesLaunchCall { 12918 c := &ProjectsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12919 c.projectId = projectId 12920 c.launchtemplateparameters = launchtemplateparameters 12921 return c 12922} 12923 12924// DynamicTemplateGcsPath sets the optional parameter 12925// "dynamicTemplate.gcsPath": Path to dynamic template spec file on 12926// GCS. 12927// The file must be a Json serialized DynamicTemplateFieSpec object. 12928func (c *ProjectsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsTemplatesLaunchCall { 12929 c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath) 12930 return c 12931} 12932 12933// DynamicTemplateStagingLocation sets the optional parameter 12934// "dynamicTemplate.stagingLocation": Cloud Storage path for staging 12935// dependencies. 12936// Must be a valid Cloud Storage URL, beginning with `gs://`. 12937func (c *ProjectsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsTemplatesLaunchCall { 12938 c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation) 12939 return c 12940} 12941 12942// GcsPath sets the optional parameter "gcsPath": A Cloud Storage path 12943// to the template from which to create 12944// the job. 12945// Must be valid Cloud Storage URL, beginning with 'gs://'. 12946func (c *ProjectsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsTemplatesLaunchCall { 12947 c.urlParams_.Set("gcsPath", gcsPath) 12948 return c 12949} 12950 12951// Location sets the optional parameter "location": The [regional 12952// endpoint] 12953// (https://cloud.google.com/dataflow/docs/concepts/regional-en 12954// dpoints) to 12955// which to direct the request. 12956func (c *ProjectsTemplatesLaunchCall) Location(location string) *ProjectsTemplatesLaunchCall { 12957 c.urlParams_.Set("location", location) 12958 return c 12959} 12960 12961// ValidateOnly sets the optional parameter "validateOnly": If true, the 12962// request is validated but not actually executed. 12963// Defaults to false. 12964func (c *ProjectsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsTemplatesLaunchCall { 12965 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 12966 return c 12967} 12968 12969// Fields allows partial responses to be retrieved. See 12970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12971// for more information. 12972func (c *ProjectsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsTemplatesLaunchCall { 12973 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12974 return c 12975} 12976 12977// Context sets the context to be used in this call's Do method. Any 12978// pending HTTP request will be aborted if the provided context is 12979// canceled. 12980func (c *ProjectsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsTemplatesLaunchCall { 12981 c.ctx_ = ctx 12982 return c 12983} 12984 12985// Header returns an http.Header that can be modified by the caller to 12986// add HTTP headers to the request. 12987func (c *ProjectsTemplatesLaunchCall) Header() http.Header { 12988 if c.header_ == nil { 12989 c.header_ = make(http.Header) 12990 } 12991 return c.header_ 12992} 12993 12994func (c *ProjectsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 12995 reqHeaders := make(http.Header) 12996 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12997 for k, v := range c.header_ { 12998 reqHeaders[k] = v 12999 } 13000 reqHeaders.Set("User-Agent", c.s.userAgent()) 13001 var body io.Reader = nil 13002 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters) 13003 if err != nil { 13004 return nil, err 13005 } 13006 reqHeaders.Set("Content-Type", "application/json") 13007 c.urlParams_.Set("alt", alt) 13008 c.urlParams_.Set("prettyPrint", "false") 13009 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:launch") 13010 urls += "?" + c.urlParams_.Encode() 13011 req, err := http.NewRequest("POST", urls, body) 13012 if err != nil { 13013 return nil, err 13014 } 13015 req.Header = reqHeaders 13016 googleapi.Expand(req.URL, map[string]string{ 13017 "projectId": c.projectId, 13018 }) 13019 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13020} 13021 13022// Do executes the "dataflow.projects.templates.launch" call. 13023// Exactly one of *LaunchTemplateResponse or error will be non-nil. Any 13024// non-2xx status code is an error. Response headers are in either 13025// *LaunchTemplateResponse.ServerResponse.Header or (if a response was 13026// returned at all) in error.(*googleapi.Error).Header. Use 13027// googleapi.IsNotModified to check whether the returned error was 13028// because http.StatusNotModified was returned. 13029func (c *ProjectsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) { 13030 gensupport.SetOptions(c.urlParams_, opts...) 13031 res, err := c.doRequest("json") 13032 if res != nil && res.StatusCode == http.StatusNotModified { 13033 if res.Body != nil { 13034 res.Body.Close() 13035 } 13036 return nil, &googleapi.Error{ 13037 Code: res.StatusCode, 13038 Header: res.Header, 13039 } 13040 } 13041 if err != nil { 13042 return nil, err 13043 } 13044 defer googleapi.CloseBody(res) 13045 if err := googleapi.CheckResponse(res); err != nil { 13046 return nil, err 13047 } 13048 ret := &LaunchTemplateResponse{ 13049 ServerResponse: googleapi.ServerResponse{ 13050 Header: res.Header, 13051 HTTPStatusCode: res.StatusCode, 13052 }, 13053 } 13054 target := &ret 13055 if err := gensupport.DecodeResponse(target, res); err != nil { 13056 return nil, err 13057 } 13058 return ret, nil 13059 // { 13060 // "description": "Launch a template.", 13061 // "flatPath": "v1b3/projects/{projectId}/templates:launch", 13062 // "httpMethod": "POST", 13063 // "id": "dataflow.projects.templates.launch", 13064 // "parameterOrder": [ 13065 // "projectId" 13066 // ], 13067 // "parameters": { 13068 // "dynamicTemplate.gcsPath": { 13069 // "description": "Path to dynamic template spec file on GCS.\nThe file must be a Json serialized DynamicTemplateFieSpec object.", 13070 // "location": "query", 13071 // "type": "string" 13072 // }, 13073 // "dynamicTemplate.stagingLocation": { 13074 // "description": "Cloud Storage path for staging dependencies.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", 13075 // "location": "query", 13076 // "type": "string" 13077 // }, 13078 // "gcsPath": { 13079 // "description": "A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", 13080 // "location": "query", 13081 // "type": "string" 13082 // }, 13083 // "location": { 13084 // "description": "The [regional endpoint]\n(https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to\nwhich to direct the request.", 13085 // "location": "query", 13086 // "type": "string" 13087 // }, 13088 // "projectId": { 13089 // "description": "Required. The ID of the Cloud Platform project that the job belongs to.", 13090 // "location": "path", 13091 // "required": true, 13092 // "type": "string" 13093 // }, 13094 // "validateOnly": { 13095 // "description": "If true, the request is validated but not actually executed.\nDefaults to false.", 13096 // "location": "query", 13097 // "type": "boolean" 13098 // } 13099 // }, 13100 // "path": "v1b3/projects/{projectId}/templates:launch", 13101 // "request": { 13102 // "$ref": "LaunchTemplateParameters" 13103 // }, 13104 // "response": { 13105 // "$ref": "LaunchTemplateResponse" 13106 // }, 13107 // "scopes": [ 13108 // "https://www.googleapis.com/auth/cloud-platform", 13109 // "https://www.googleapis.com/auth/compute", 13110 // "https://www.googleapis.com/auth/compute.readonly", 13111 // "https://www.googleapis.com/auth/userinfo.email" 13112 // ] 13113 // } 13114 13115} 13116