1 // Copyright 2024 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 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/dataflow/v1b3" 27 // ... 28 // ctx := context.Background() 29 // dataflowService, err := dataflow.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // By default, all available scopes (see "Constants") are used to authenticate. 38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]: 39 // 40 // dataflowService, err := dataflow.NewService(ctx, option.WithScopes(dataflow.ComputeReadonlyScope)) 41 // 42 // To use an API key for authentication (note: some APIs do not support API 43 // keys), use [google.golang.org/api/option.WithAPIKey]: 44 // 45 // dataflowService, err := dataflow.NewService(ctx, option.WithAPIKey("AIza...")) 46 // 47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 48 // flow, use [google.golang.org/api/option.WithTokenSource]: 49 // 50 // config := &oauth2.Config{...} 51 // // ... 52 // token, err := config.Exchange(ctx, ...) 53 // dataflowService, err := dataflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 54 // 55 // See [google.golang.org/api/option.ClientOption] for details on options. 56 package dataflow // import "google.golang.org/api/dataflow/v1b3" 57 58 import ( 59 "bytes" 60 "context" 61 "encoding/json" 62 "errors" 63 "fmt" 64 "io" 65 "net/http" 66 "net/url" 67 "strconv" 68 "strings" 69 70 googleapi "google.golang.org/api/googleapi" 71 internal "google.golang.org/api/internal" 72 gensupport "google.golang.org/api/internal/gensupport" 73 option "google.golang.org/api/option" 74 internaloption "google.golang.org/api/option/internaloption" 75 htransport "google.golang.org/api/transport/http" 76 ) 77 78 // Always reference these packages, just in case the auto-generated code 79 // below doesn't. 80 var _ = bytes.NewBuffer 81 var _ = strconv.Itoa 82 var _ = fmt.Sprintf 83 var _ = json.NewDecoder 84 var _ = io.Copy 85 var _ = url.Parse 86 var _ = gensupport.MarshalJSON 87 var _ = googleapi.Version 88 var _ = errors.New 89 var _ = strings.Replace 90 var _ = context.Canceled 91 var _ = internaloption.WithDefaultEndpoint 92 var _ = internal.Version 93 94 const apiId = "dataflow:v1b3" 95 const apiName = "dataflow" 96 const apiVersion = "v1b3" 97 const basePath = "https://dataflow.googleapis.com/" 98 const basePathTemplate = "https://dataflow.UNIVERSE_DOMAIN/" 99 const mtlsBasePath = "https://dataflow.mtls.googleapis.com/" 100 101 // OAuth2 scopes used by this API. 102 const ( 103 // See, edit, configure, and delete your Google Cloud data and see the email 104 // address for your Google Account. 105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 106 107 // View and manage your Google Compute Engine resources 108 ComputeScope = "https://www.googleapis.com/auth/compute" 109 110 // View your Google Compute Engine resources 111 ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" 112 ) 113 114 // NewService creates a new Service. 115 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 116 scopesOption := internaloption.WithDefaultScopes( 117 "https://www.googleapis.com/auth/cloud-platform", 118 "https://www.googleapis.com/auth/compute", 119 "https://www.googleapis.com/auth/compute.readonly", 120 ) 121 // NOTE: prepend, so we don't override user-specified scopes. 122 opts = append([]option.ClientOption{scopesOption}, opts...) 123 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 124 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 125 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 126 opts = append(opts, internaloption.EnableNewAuthLibrary()) 127 client, endpoint, err := htransport.NewClient(ctx, opts...) 128 if err != nil { 129 return nil, err 130 } 131 s, err := New(client) 132 if err != nil { 133 return nil, err 134 } 135 if endpoint != "" { 136 s.BasePath = endpoint 137 } 138 return s, nil 139 } 140 141 // New creates a new Service. It uses the provided http.Client for requests. 142 // 143 // Deprecated: please use NewService instead. 144 // To provide a custom HTTP client, use option.WithHTTPClient. 145 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 146 func New(client *http.Client) (*Service, error) { 147 if client == nil { 148 return nil, errors.New("client is nil") 149 } 150 s := &Service{client: client, BasePath: basePath} 151 s.Projects = NewProjectsService(s) 152 return s, nil 153 } 154 155 type Service struct { 156 client *http.Client 157 BasePath string // API endpoint base URL 158 UserAgent string // optional additional User-Agent fragment 159 160 Projects *ProjectsService 161 } 162 163 func (s *Service) userAgent() string { 164 if s.UserAgent == "" { 165 return googleapi.UserAgent 166 } 167 return googleapi.UserAgent + " " + s.UserAgent 168 } 169 170 func NewProjectsService(s *Service) *ProjectsService { 171 rs := &ProjectsService{s: s} 172 rs.Jobs = NewProjectsJobsService(s) 173 rs.Locations = NewProjectsLocationsService(s) 174 rs.Snapshots = NewProjectsSnapshotsService(s) 175 rs.Templates = NewProjectsTemplatesService(s) 176 return rs 177 } 178 179 type ProjectsService struct { 180 s *Service 181 182 Jobs *ProjectsJobsService 183 184 Locations *ProjectsLocationsService 185 186 Snapshots *ProjectsSnapshotsService 187 188 Templates *ProjectsTemplatesService 189 } 190 191 func NewProjectsJobsService(s *Service) *ProjectsJobsService { 192 rs := &ProjectsJobsService{s: s} 193 rs.Debug = NewProjectsJobsDebugService(s) 194 rs.Messages = NewProjectsJobsMessagesService(s) 195 rs.WorkItems = NewProjectsJobsWorkItemsService(s) 196 return rs 197 } 198 199 type ProjectsJobsService struct { 200 s *Service 201 202 Debug *ProjectsJobsDebugService 203 204 Messages *ProjectsJobsMessagesService 205 206 WorkItems *ProjectsJobsWorkItemsService 207 } 208 209 func NewProjectsJobsDebugService(s *Service) *ProjectsJobsDebugService { 210 rs := &ProjectsJobsDebugService{s: s} 211 return rs 212 } 213 214 type ProjectsJobsDebugService struct { 215 s *Service 216 } 217 218 func NewProjectsJobsMessagesService(s *Service) *ProjectsJobsMessagesService { 219 rs := &ProjectsJobsMessagesService{s: s} 220 return rs 221 } 222 223 type ProjectsJobsMessagesService struct { 224 s *Service 225 } 226 227 func NewProjectsJobsWorkItemsService(s *Service) *ProjectsJobsWorkItemsService { 228 rs := &ProjectsJobsWorkItemsService{s: s} 229 return rs 230 } 231 232 type ProjectsJobsWorkItemsService struct { 233 s *Service 234 } 235 236 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 237 rs := &ProjectsLocationsService{s: s} 238 rs.FlexTemplates = NewProjectsLocationsFlexTemplatesService(s) 239 rs.Jobs = NewProjectsLocationsJobsService(s) 240 rs.Snapshots = NewProjectsLocationsSnapshotsService(s) 241 rs.Templates = NewProjectsLocationsTemplatesService(s) 242 return rs 243 } 244 245 type ProjectsLocationsService struct { 246 s *Service 247 248 FlexTemplates *ProjectsLocationsFlexTemplatesService 249 250 Jobs *ProjectsLocationsJobsService 251 252 Snapshots *ProjectsLocationsSnapshotsService 253 254 Templates *ProjectsLocationsTemplatesService 255 } 256 257 func NewProjectsLocationsFlexTemplatesService(s *Service) *ProjectsLocationsFlexTemplatesService { 258 rs := &ProjectsLocationsFlexTemplatesService{s: s} 259 return rs 260 } 261 262 type ProjectsLocationsFlexTemplatesService struct { 263 s *Service 264 } 265 266 func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService { 267 rs := &ProjectsLocationsJobsService{s: s} 268 rs.Debug = NewProjectsLocationsJobsDebugService(s) 269 rs.Messages = NewProjectsLocationsJobsMessagesService(s) 270 rs.Snapshots = NewProjectsLocationsJobsSnapshotsService(s) 271 rs.Stages = NewProjectsLocationsJobsStagesService(s) 272 rs.WorkItems = NewProjectsLocationsJobsWorkItemsService(s) 273 return rs 274 } 275 276 type ProjectsLocationsJobsService struct { 277 s *Service 278 279 Debug *ProjectsLocationsJobsDebugService 280 281 Messages *ProjectsLocationsJobsMessagesService 282 283 Snapshots *ProjectsLocationsJobsSnapshotsService 284 285 Stages *ProjectsLocationsJobsStagesService 286 287 WorkItems *ProjectsLocationsJobsWorkItemsService 288 } 289 290 func NewProjectsLocationsJobsDebugService(s *Service) *ProjectsLocationsJobsDebugService { 291 rs := &ProjectsLocationsJobsDebugService{s: s} 292 return rs 293 } 294 295 type ProjectsLocationsJobsDebugService struct { 296 s *Service 297 } 298 299 func NewProjectsLocationsJobsMessagesService(s *Service) *ProjectsLocationsJobsMessagesService { 300 rs := &ProjectsLocationsJobsMessagesService{s: s} 301 return rs 302 } 303 304 type ProjectsLocationsJobsMessagesService struct { 305 s *Service 306 } 307 308 func NewProjectsLocationsJobsSnapshotsService(s *Service) *ProjectsLocationsJobsSnapshotsService { 309 rs := &ProjectsLocationsJobsSnapshotsService{s: s} 310 return rs 311 } 312 313 type ProjectsLocationsJobsSnapshotsService struct { 314 s *Service 315 } 316 317 func NewProjectsLocationsJobsStagesService(s *Service) *ProjectsLocationsJobsStagesService { 318 rs := &ProjectsLocationsJobsStagesService{s: s} 319 return rs 320 } 321 322 type ProjectsLocationsJobsStagesService struct { 323 s *Service 324 } 325 326 func NewProjectsLocationsJobsWorkItemsService(s *Service) *ProjectsLocationsJobsWorkItemsService { 327 rs := &ProjectsLocationsJobsWorkItemsService{s: s} 328 return rs 329 } 330 331 type ProjectsLocationsJobsWorkItemsService struct { 332 s *Service 333 } 334 335 func NewProjectsLocationsSnapshotsService(s *Service) *ProjectsLocationsSnapshotsService { 336 rs := &ProjectsLocationsSnapshotsService{s: s} 337 return rs 338 } 339 340 type ProjectsLocationsSnapshotsService struct { 341 s *Service 342 } 343 344 func NewProjectsLocationsTemplatesService(s *Service) *ProjectsLocationsTemplatesService { 345 rs := &ProjectsLocationsTemplatesService{s: s} 346 return rs 347 } 348 349 type ProjectsLocationsTemplatesService struct { 350 s *Service 351 } 352 353 func NewProjectsSnapshotsService(s *Service) *ProjectsSnapshotsService { 354 rs := &ProjectsSnapshotsService{s: s} 355 return rs 356 } 357 358 type ProjectsSnapshotsService struct { 359 s *Service 360 } 361 362 func NewProjectsTemplatesService(s *Service) *ProjectsTemplatesService { 363 rs := &ProjectsTemplatesService{s: s} 364 return rs 365 } 366 367 type ProjectsTemplatesService struct { 368 s *Service 369 } 370 371 // ApproximateProgress: Obsolete in favor of ApproximateReportedProgress and 372 // ApproximateSplitRequest. 373 type ApproximateProgress struct { 374 // PercentComplete: Obsolete. 375 PercentComplete float64 `json:"percentComplete,omitempty"` 376 // Position: Obsolete. 377 Position *Position `json:"position,omitempty"` 378 // RemainingTime: Obsolete. 379 RemainingTime string `json:"remainingTime,omitempty"` 380 // ForceSendFields is a list of field names (e.g. "PercentComplete") to 381 // unconditionally include in API requests. By default, fields with empty or 382 // default values are omitted from API requests. See 383 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 384 // details. 385 ForceSendFields []string `json:"-"` 386 // NullFields is a list of field names (e.g. "PercentComplete") to include in 387 // API requests with the JSON null value. By default, fields with empty values 388 // are omitted from API requests. See 389 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 390 NullFields []string `json:"-"` 391 } 392 393 func (s *ApproximateProgress) MarshalJSON() ([]byte, error) { 394 type NoMethod ApproximateProgress 395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 396 } 397 398 func (s *ApproximateProgress) UnmarshalJSON(data []byte) error { 399 type NoMethod ApproximateProgress 400 var s1 struct { 401 PercentComplete gensupport.JSONFloat64 `json:"percentComplete"` 402 *NoMethod 403 } 404 s1.NoMethod = (*NoMethod)(s) 405 if err := json.Unmarshal(data, &s1); err != nil { 406 return err 407 } 408 s.PercentComplete = float64(s1.PercentComplete) 409 return nil 410 } 411 412 // ApproximateReportedProgress: A progress measurement of a WorkItem by a 413 // worker. 414 type ApproximateReportedProgress struct { 415 // ConsumedParallelism: Total amount of parallelism in the portion of input of 416 // this task that has already been consumed and is no longer active. In the 417 // first two examples above (see remaining_parallelism), the value should be 29 418 // or 2 respectively. The sum of remaining_parallelism and consumed_parallelism 419 // should equal the total amount of parallelism in this work item. If 420 // specified, must be finite. 421 ConsumedParallelism *ReportedParallelism `json:"consumedParallelism,omitempty"` 422 // FractionConsumed: Completion as fraction of the input consumed, from 0.0 423 // (beginning, nothing consumed), to 1.0 (end of the input, entire input 424 // consumed). 425 FractionConsumed float64 `json:"fractionConsumed,omitempty"` 426 // Position: A Position within the work to represent a progress. 427 Position *Position `json:"position,omitempty"` 428 // RemainingParallelism: Total amount of parallelism in the input of this task 429 // that remains, (i.e. can be delegated to this task and any new tasks via 430 // dynamic splitting). Always at least 1 for non-finished work items and 0 for 431 // finished. "Amount of parallelism" refers to how many non-empty parts of the 432 // input can be read in parallel. This does not necessarily equal number of 433 // records. An input that can be read in parallel down to the individual 434 // records is called "perfectly splittable". An example of non-perfectly 435 // parallelizable input is a block-compressed file format where a block of 436 // records has to be read as a whole, but different blocks can be read in 437 // parallel. Examples: * If we are processing record #30 (starting at 1) out of 438 // 50 in a perfectly splittable 50-record input, this value should be 21 (20 439 // remaining + 1 current). * If we are reading through block 3 in a 440 // block-compressed file consisting of 5 blocks, this value should be 3 (since 441 // blocks 4 and 5 can be processed in parallel by new tasks via dynamic 442 // splitting and the current task remains processing block 3). * If we are 443 // reading through the last block in a block-compressed file, or reading or 444 // processing the last record in a perfectly splittable input, this value 445 // should be 1, because apart from the current task, no additional remainder 446 // can be split off. 447 RemainingParallelism *ReportedParallelism `json:"remainingParallelism,omitempty"` 448 // ForceSendFields is a list of field names (e.g. "ConsumedParallelism") to 449 // unconditionally include in API requests. By default, fields with empty or 450 // default values are omitted from API requests. See 451 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 452 // details. 453 ForceSendFields []string `json:"-"` 454 // NullFields is a list of field names (e.g. "ConsumedParallelism") to include 455 // in API requests with the JSON null value. By default, fields with empty 456 // values are omitted from API requests. See 457 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 458 NullFields []string `json:"-"` 459 } 460 461 func (s *ApproximateReportedProgress) MarshalJSON() ([]byte, error) { 462 type NoMethod ApproximateReportedProgress 463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 464 } 465 466 func (s *ApproximateReportedProgress) UnmarshalJSON(data []byte) error { 467 type NoMethod ApproximateReportedProgress 468 var s1 struct { 469 FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"` 470 *NoMethod 471 } 472 s1.NoMethod = (*NoMethod)(s) 473 if err := json.Unmarshal(data, &s1); err != nil { 474 return err 475 } 476 s.FractionConsumed = float64(s1.FractionConsumed) 477 return nil 478 } 479 480 // ApproximateSplitRequest: A suggestion by the service to the worker to 481 // dynamically split the WorkItem. 482 type ApproximateSplitRequest struct { 483 // FractionConsumed: A fraction at which to split the work item, from 0.0 484 // (beginning of the input) to 1.0 (end of the input). 485 FractionConsumed float64 `json:"fractionConsumed,omitempty"` 486 // FractionOfRemainder: The fraction of the remainder of work to split the work 487 // item at, from 0.0 (split at the current position) to 1.0 (end of the input). 488 FractionOfRemainder float64 `json:"fractionOfRemainder,omitempty"` 489 // Position: A Position at which to split the work item. 490 Position *Position `json:"position,omitempty"` 491 // ForceSendFields is a list of field names (e.g. "FractionConsumed") to 492 // unconditionally include in API requests. By default, fields with empty or 493 // default values are omitted from API requests. See 494 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 495 // details. 496 ForceSendFields []string `json:"-"` 497 // NullFields is a list of field names (e.g. "FractionConsumed") to include in 498 // API requests with the JSON null value. By default, fields with empty values 499 // are omitted from API requests. See 500 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 501 NullFields []string `json:"-"` 502 } 503 504 func (s *ApproximateSplitRequest) MarshalJSON() ([]byte, error) { 505 type NoMethod ApproximateSplitRequest 506 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 507 } 508 509 func (s *ApproximateSplitRequest) UnmarshalJSON(data []byte) error { 510 type NoMethod ApproximateSplitRequest 511 var s1 struct { 512 FractionConsumed gensupport.JSONFloat64 `json:"fractionConsumed"` 513 FractionOfRemainder gensupport.JSONFloat64 `json:"fractionOfRemainder"` 514 *NoMethod 515 } 516 s1.NoMethod = (*NoMethod)(s) 517 if err := json.Unmarshal(data, &s1); err != nil { 518 return err 519 } 520 s.FractionConsumed = float64(s1.FractionConsumed) 521 s.FractionOfRemainder = float64(s1.FractionOfRemainder) 522 return nil 523 } 524 525 // AutoscalingEvent: A structured message reporting an autoscaling decision 526 // made by the Dataflow service. 527 type AutoscalingEvent struct { 528 // CurrentNumWorkers: The current number of workers the job has. 529 CurrentNumWorkers int64 `json:"currentNumWorkers,omitempty,string"` 530 // Description: A message describing why the system decided to adjust the 531 // current number of workers, why it failed, or why the system decided to not 532 // make any changes to the number of workers. 533 Description *StructuredMessage `json:"description,omitempty"` 534 // EventType: The type of autoscaling event to report. 535 // 536 // Possible values: 537 // "TYPE_UNKNOWN" - Default type for the enum. Value should never be 538 // returned. 539 // "TARGET_NUM_WORKERS_CHANGED" - The TARGET_NUM_WORKERS_CHANGED type should 540 // be used when the target worker pool size has changed at the start of an 541 // actuation. An event should always be specified as TARGET_NUM_WORKERS_CHANGED 542 // if it reflects a change in the target_num_workers. 543 // "CURRENT_NUM_WORKERS_CHANGED" - The CURRENT_NUM_WORKERS_CHANGED type 544 // should be used when actual worker pool size has been changed, but the 545 // target_num_workers has not changed. 546 // "ACTUATION_FAILURE" - The ACTUATION_FAILURE type should be used when we 547 // want to report an error to the user indicating why the current number of 548 // workers in the pool could not be changed. Displayed in the current status 549 // and history widgets. 550 // "NO_CHANGE" - Used when we want to report to the user a reason why we are 551 // not currently adjusting the number of workers. Should specify both 552 // target_num_workers, current_num_workers and a decision_message. 553 EventType string `json:"eventType,omitempty"` 554 // TargetNumWorkers: The target number of workers the worker pool wants to 555 // resize to use. 556 TargetNumWorkers int64 `json:"targetNumWorkers,omitempty,string"` 557 // Time: The time this event was emitted to indicate a new target or current 558 // num_workers value. 559 Time string `json:"time,omitempty"` 560 // WorkerPool: A short and friendly name for the worker pool this event refers 561 // to. 562 WorkerPool string `json:"workerPool,omitempty"` 563 // ForceSendFields is a list of field names (e.g. "CurrentNumWorkers") to 564 // unconditionally include in API requests. By default, fields with empty or 565 // default values are omitted from API requests. See 566 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 567 // details. 568 ForceSendFields []string `json:"-"` 569 // NullFields is a list of field names (e.g. "CurrentNumWorkers") to include in 570 // API requests with the JSON null value. By default, fields with empty values 571 // are omitted from API requests. See 572 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 573 NullFields []string `json:"-"` 574 } 575 576 func (s *AutoscalingEvent) MarshalJSON() ([]byte, error) { 577 type NoMethod AutoscalingEvent 578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 579 } 580 581 // AutoscalingSettings: Settings for WorkerPool autoscaling. 582 type AutoscalingSettings struct { 583 // Algorithm: The algorithm to use for autoscaling. 584 // 585 // Possible values: 586 // "AUTOSCALING_ALGORITHM_UNKNOWN" - The algorithm is unknown, or 587 // unspecified. 588 // "AUTOSCALING_ALGORITHM_NONE" - Disable autoscaling. 589 // "AUTOSCALING_ALGORITHM_BASIC" - Increase worker count over time to reduce 590 // job execution time. 591 Algorithm string `json:"algorithm,omitempty"` 592 // MaxNumWorkers: The maximum number of workers to cap scaling at. 593 MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"` 594 // ForceSendFields is a list of field names (e.g. "Algorithm") to 595 // unconditionally include in API requests. By default, fields with empty or 596 // default values are omitted from API requests. See 597 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 598 // details. 599 ForceSendFields []string `json:"-"` 600 // NullFields is a list of field names (e.g. "Algorithm") to include in API 601 // requests with the JSON null value. By default, fields with empty values are 602 // omitted from API requests. See 603 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 604 NullFields []string `json:"-"` 605 } 606 607 func (s *AutoscalingSettings) MarshalJSON() ([]byte, error) { 608 type NoMethod AutoscalingSettings 609 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 610 } 611 612 // Base2Exponent: Exponential buckets where the growth factor between buckets 613 // is `2**(2**-scale)`. e.g. for `scale=1` growth factor is 614 // `2**(2**(-1))=sqrt(2)`. `n` buckets will have the following boundaries. - 615 // 0th: [0, gf) - i in [1, n-1]: [gf^(i), gf^(i+1)) 616 type Base2Exponent struct { 617 // NumberOfBuckets: Must be greater than 0. 618 NumberOfBuckets int64 `json:"numberOfBuckets,omitempty"` 619 // Scale: Must be between -3 and 3. This forces the growth factor of the bucket 620 // boundaries to be between `2^(1/8)` and `256`. 621 Scale int64 `json:"scale,omitempty"` 622 // ForceSendFields is a list of field names (e.g. "NumberOfBuckets") to 623 // unconditionally include in API requests. By default, fields with empty or 624 // default values are omitted from API requests. See 625 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 626 // details. 627 ForceSendFields []string `json:"-"` 628 // NullFields is a list of field names (e.g. "NumberOfBuckets") to include in 629 // API requests with the JSON null value. By default, fields with empty values 630 // are omitted from API requests. See 631 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 632 NullFields []string `json:"-"` 633 } 634 635 func (s *Base2Exponent) MarshalJSON() ([]byte, error) { 636 type NoMethod Base2Exponent 637 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 638 } 639 640 // BigQueryIODetails: Metadata for a BigQuery connector used by the job. 641 type BigQueryIODetails struct { 642 // Dataset: Dataset accessed in the connection. 643 Dataset string `json:"dataset,omitempty"` 644 // ProjectId: Project accessed in the connection. 645 ProjectId string `json:"projectId,omitempty"` 646 // Query: Query used to access data in the connection. 647 Query string `json:"query,omitempty"` 648 // Table: Table accessed in the connection. 649 Table string `json:"table,omitempty"` 650 // ForceSendFields is a list of field names (e.g. "Dataset") to unconditionally 651 // include in API requests. By default, fields with empty or default values are 652 // omitted from API requests. See 653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 654 // details. 655 ForceSendFields []string `json:"-"` 656 // NullFields is a list of field names (e.g. "Dataset") to include in API 657 // requests with the JSON null value. By default, fields with empty values are 658 // omitted from API requests. See 659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 660 NullFields []string `json:"-"` 661 } 662 663 func (s *BigQueryIODetails) MarshalJSON() ([]byte, error) { 664 type NoMethod BigQueryIODetails 665 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 666 } 667 668 // BigTableIODetails: Metadata for a Cloud Bigtable connector used by the job. 669 type BigTableIODetails struct { 670 // InstanceId: InstanceId accessed in the connection. 671 InstanceId string `json:"instanceId,omitempty"` 672 // ProjectId: ProjectId accessed in the connection. 673 ProjectId string `json:"projectId,omitempty"` 674 // TableId: TableId accessed in the connection. 675 TableId string `json:"tableId,omitempty"` 676 // ForceSendFields is a list of field names (e.g. "InstanceId") to 677 // unconditionally include in API requests. By default, fields with empty or 678 // default values are omitted from API requests. See 679 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 680 // details. 681 ForceSendFields []string `json:"-"` 682 // NullFields is a list of field names (e.g. "InstanceId") to include in API 683 // requests with the JSON null value. By default, fields with empty values are 684 // omitted from API requests. See 685 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 686 NullFields []string `json:"-"` 687 } 688 689 func (s *BigTableIODetails) MarshalJSON() ([]byte, error) { 690 type NoMethod BigTableIODetails 691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 692 } 693 694 // BucketOptions: `BucketOptions` describes the bucket boundaries used in the 695 // histogram. 696 type BucketOptions struct { 697 // Exponential: Bucket boundaries grow exponentially. 698 Exponential *Base2Exponent `json:"exponential,omitempty"` 699 // Linear: Bucket boundaries grow linearly. 700 Linear *Linear `json:"linear,omitempty"` 701 // ForceSendFields is a list of field names (e.g. "Exponential") to 702 // unconditionally include in API requests. By default, fields with empty or 703 // default values are omitted from API requests. See 704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 705 // details. 706 ForceSendFields []string `json:"-"` 707 // NullFields is a list of field names (e.g. "Exponential") to include in API 708 // requests with the JSON null value. By default, fields with empty values are 709 // omitted from API requests. See 710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 711 NullFields []string `json:"-"` 712 } 713 714 func (s *BucketOptions) MarshalJSON() ([]byte, error) { 715 type NoMethod BucketOptions 716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 717 } 718 719 // CPUTime: Modeled after information exposed by /proc/stat. 720 type CPUTime struct { 721 // Rate: Average CPU utilization rate (% non-idle cpu / second) since previous 722 // sample. 723 Rate float64 `json:"rate,omitempty"` 724 // Timestamp: Timestamp of the measurement. 725 Timestamp string `json:"timestamp,omitempty"` 726 // TotalMs: Total active CPU time across all cores (ie., non-idle) in 727 // milliseconds since start-up. 728 TotalMs uint64 `json:"totalMs,omitempty,string"` 729 // ForceSendFields is a list of field names (e.g. "Rate") to unconditionally 730 // include in API requests. By default, fields with empty or default values are 731 // omitted from API requests. See 732 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 733 // details. 734 ForceSendFields []string `json:"-"` 735 // NullFields is a list of field names (e.g. "Rate") to include in API requests 736 // with the JSON null value. By default, fields with empty values are omitted 737 // from API requests. See 738 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 739 NullFields []string `json:"-"` 740 } 741 742 func (s *CPUTime) MarshalJSON() ([]byte, error) { 743 type NoMethod CPUTime 744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 745 } 746 747 func (s *CPUTime) UnmarshalJSON(data []byte) error { 748 type NoMethod CPUTime 749 var s1 struct { 750 Rate gensupport.JSONFloat64 `json:"rate"` 751 *NoMethod 752 } 753 s1.NoMethod = (*NoMethod)(s) 754 if err := json.Unmarshal(data, &s1); err != nil { 755 return err 756 } 757 s.Rate = float64(s1.Rate) 758 return nil 759 } 760 761 // ComponentSource: Description of an interstitial value between transforms in 762 // an execution stage. 763 type ComponentSource struct { 764 // Name: Dataflow service generated name for this source. 765 Name string `json:"name,omitempty"` 766 // OriginalTransformOrCollection: User name for the original user transform or 767 // collection with which this source is most closely associated. 768 OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"` 769 // UserName: Human-readable name for this transform; may be user or system 770 // generated. 771 UserName string `json:"userName,omitempty"` 772 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 773 // include in API requests. By default, fields with empty or default values are 774 // omitted from API requests. See 775 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 776 // details. 777 ForceSendFields []string `json:"-"` 778 // NullFields is a list of field names (e.g. "Name") to include in API requests 779 // with the JSON null value. By default, fields with empty values are omitted 780 // from API requests. See 781 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 782 NullFields []string `json:"-"` 783 } 784 785 func (s *ComponentSource) MarshalJSON() ([]byte, error) { 786 type NoMethod ComponentSource 787 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 788 } 789 790 // ComponentTransform: Description of a transform executed as part of an 791 // execution stage. 792 type ComponentTransform struct { 793 // Name: Dataflow service generated name for this source. 794 Name string `json:"name,omitempty"` 795 // OriginalTransform: User name for the original user transform with which this 796 // transform is most closely associated. 797 OriginalTransform string `json:"originalTransform,omitempty"` 798 // UserName: Human-readable name for this transform; may be user or system 799 // generated. 800 UserName string `json:"userName,omitempty"` 801 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 802 // include in API requests. By default, fields with empty or default values are 803 // omitted from API requests. See 804 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 805 // details. 806 ForceSendFields []string `json:"-"` 807 // NullFields is a list of field names (e.g. "Name") to include in API requests 808 // with the JSON null value. By default, fields with empty values are omitted 809 // from API requests. See 810 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 811 NullFields []string `json:"-"` 812 } 813 814 func (s *ComponentTransform) MarshalJSON() ([]byte, error) { 815 type NoMethod ComponentTransform 816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 817 } 818 819 // ComputationTopology: All configuration data for a particular Computation. 820 type ComputationTopology struct { 821 // ComputationId: The ID of the computation. 822 ComputationId string `json:"computationId,omitempty"` 823 // Inputs: The inputs to the computation. 824 Inputs []*StreamLocation `json:"inputs,omitempty"` 825 // KeyRanges: The key ranges processed by the computation. 826 KeyRanges []*KeyRangeLocation `json:"keyRanges,omitempty"` 827 // Outputs: The outputs from the computation. 828 Outputs []*StreamLocation `json:"outputs,omitempty"` 829 // StateFamilies: The state family values. 830 StateFamilies []*StateFamilyConfig `json:"stateFamilies,omitempty"` 831 // SystemStageName: The system stage name. 832 SystemStageName string `json:"systemStageName,omitempty"` 833 // ForceSendFields is a list of field names (e.g. "ComputationId") to 834 // unconditionally include in API requests. By default, fields with empty or 835 // default values are omitted from API requests. See 836 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 837 // details. 838 ForceSendFields []string `json:"-"` 839 // NullFields is a list of field names (e.g. "ComputationId") to include in API 840 // requests with the JSON null value. By default, fields with empty values are 841 // omitted from API requests. See 842 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 843 NullFields []string `json:"-"` 844 } 845 846 func (s *ComputationTopology) MarshalJSON() ([]byte, error) { 847 type NoMethod ComputationTopology 848 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 849 } 850 851 // ConcatPosition: A position that encapsulates an inner position and an index 852 // for the inner position. A ConcatPosition can be used by a reader of a source 853 // that encapsulates a set of other sources. 854 type ConcatPosition struct { 855 // Index: Index of the inner source. 856 Index int64 `json:"index,omitempty"` 857 // Position: Position within the inner source. 858 Position *Position `json:"position,omitempty"` 859 // ForceSendFields is a list of field names (e.g. "Index") to unconditionally 860 // include in API requests. By default, fields with empty or default values are 861 // omitted from API requests. See 862 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 863 // details. 864 ForceSendFields []string `json:"-"` 865 // NullFields is a list of field names (e.g. "Index") to include in API 866 // requests with the JSON null value. By default, fields with empty values are 867 // omitted from API requests. See 868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 869 NullFields []string `json:"-"` 870 } 871 872 func (s *ConcatPosition) MarshalJSON() ([]byte, error) { 873 type NoMethod ConcatPosition 874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 875 } 876 877 // ContainerSpec: Container Spec. 878 type ContainerSpec struct { 879 // DefaultEnvironment: Default runtime environment for the job. 880 DefaultEnvironment *FlexTemplateRuntimeEnvironment `json:"defaultEnvironment,omitempty"` 881 // Image: Name of the docker container image. E.g., gcr.io/project/some-image 882 Image string `json:"image,omitempty"` 883 // ImageRepositoryCertPath: Cloud Storage path to self-signed certificate of 884 // private registry. 885 ImageRepositoryCertPath string `json:"imageRepositoryCertPath,omitempty"` 886 // ImageRepositoryPasswordSecretId: Secret Manager secret id for password to 887 // authenticate to private registry. 888 ImageRepositoryPasswordSecretId string `json:"imageRepositoryPasswordSecretId,omitempty"` 889 // ImageRepositoryUsernameSecretId: Secret Manager secret id for username to 890 // authenticate to private registry. 891 ImageRepositoryUsernameSecretId string `json:"imageRepositoryUsernameSecretId,omitempty"` 892 // Metadata: Metadata describing a template including description and 893 // validation rules. 894 Metadata *TemplateMetadata `json:"metadata,omitempty"` 895 // SdkInfo: Required. SDK info of the Flex Template. 896 SdkInfo *SDKInfo `json:"sdkInfo,omitempty"` 897 // ForceSendFields is a list of field names (e.g. "DefaultEnvironment") to 898 // unconditionally include in API requests. By default, fields with empty or 899 // default values are omitted from API requests. See 900 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 901 // details. 902 ForceSendFields []string `json:"-"` 903 // NullFields is a list of field names (e.g. "DefaultEnvironment") to include 904 // in API requests with the JSON null value. By default, fields with empty 905 // values are omitted from API requests. See 906 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 907 NullFields []string `json:"-"` 908 } 909 910 func (s *ContainerSpec) MarshalJSON() ([]byte, error) { 911 type NoMethod ContainerSpec 912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 913 } 914 915 // CounterMetadata: CounterMetadata includes all static non-name non-value 916 // counter attributes. 917 type CounterMetadata struct { 918 // Description: Human-readable description of the counter semantics. 919 Description string `json:"description,omitempty"` 920 // Kind: Counter aggregation kind. 921 // 922 // Possible values: 923 // "INVALID" - Counter aggregation kind was not set. 924 // "SUM" - Aggregated value is the sum of all contributed values. 925 // "MAX" - Aggregated value is the max of all contributed values. 926 // "MIN" - Aggregated value is the min of all contributed values. 927 // "MEAN" - Aggregated value is the mean of all contributed values. 928 // "OR" - Aggregated value represents the logical 'or' of all contributed 929 // values. 930 // "AND" - Aggregated value represents the logical 'and' of all contributed 931 // values. 932 // "SET" - Aggregated value is a set of unique contributed values. 933 // "DISTRIBUTION" - Aggregated value captures statistics about a 934 // distribution. 935 // "LATEST_VALUE" - Aggregated value tracks the latest value of a variable. 936 Kind string `json:"kind,omitempty"` 937 // OtherUnits: A string referring to the unit type. 938 OtherUnits string `json:"otherUnits,omitempty"` 939 // StandardUnits: System defined Units, see above enum. 940 // 941 // Possible values: 942 // "BYTES" - Counter returns a value in bytes. 943 // "BYTES_PER_SEC" - Counter returns a value in bytes per second. 944 // "MILLISECONDS" - Counter returns a value in milliseconds. 945 // "MICROSECONDS" - Counter returns a value in microseconds. 946 // "NANOSECONDS" - Counter returns a value in nanoseconds. 947 // "TIMESTAMP_MSEC" - Counter returns a timestamp in milliseconds. 948 // "TIMESTAMP_USEC" - Counter returns a timestamp in microseconds. 949 // "TIMESTAMP_NSEC" - Counter returns a timestamp in nanoseconds. 950 StandardUnits string `json:"standardUnits,omitempty"` 951 // ForceSendFields is a list of field names (e.g. "Description") to 952 // unconditionally include in API requests. By default, fields with empty or 953 // default values are omitted from API requests. See 954 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 955 // details. 956 ForceSendFields []string `json:"-"` 957 // NullFields is a list of field names (e.g. "Description") to include in API 958 // requests with the JSON null value. By default, fields with empty values are 959 // omitted from API requests. See 960 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 961 NullFields []string `json:"-"` 962 } 963 964 func (s *CounterMetadata) MarshalJSON() ([]byte, error) { 965 type NoMethod CounterMetadata 966 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 967 } 968 969 // CounterStructuredName: Identifies a counter within a per-job namespace. 970 // Counters whose structured names are the same get merged into a single value 971 // for the job. 972 type CounterStructuredName struct { 973 // ComponentStepName: Name of the optimized step being executed by the workers. 974 ComponentStepName string `json:"componentStepName,omitempty"` 975 // ExecutionStepName: Name of the stage. An execution step contains multiple 976 // component steps. 977 ExecutionStepName string `json:"executionStepName,omitempty"` 978 // InputIndex: Index of an input collection that's being read from/written to 979 // as a side input. The index identifies a step's side inputs starting by 1 980 // (e.g. the first side input has input_index 1, the third has input_index 3). 981 // Side inputs are identified by a pair of (original_step_name, input_index). 982 // This field helps uniquely identify them. 983 InputIndex int64 `json:"inputIndex,omitempty"` 984 // Name: Counter name. Not necessarily globally-unique, but unique within the 985 // context of the other fields. Required. 986 Name string `json:"name,omitempty"` 987 // Origin: One of the standard Origins defined above. 988 // 989 // Possible values: 990 // "SYSTEM" - Counter was created by the Dataflow system. 991 // "USER" - Counter was created by the user. 992 Origin string `json:"origin,omitempty"` 993 // OriginNamespace: A string containing a more specific namespace of the 994 // counter's origin. 995 OriginNamespace string `json:"originNamespace,omitempty"` 996 // OriginalRequestingStepName: The step name requesting an operation, such as 997 // GBK. I.e. the ParDo causing a read/write from shuffle to occur, or a read 998 // from side inputs. 999 OriginalRequestingStepName string `json:"originalRequestingStepName,omitempty"` 1000 // OriginalStepName: System generated name of the original step in the user's 1001 // graph, before optimization. 1002 OriginalStepName string `json:"originalStepName,omitempty"` 1003 // Portion: Portion of this counter, either key or value. 1004 // 1005 // Possible values: 1006 // "ALL" - Counter portion has not been set. 1007 // "KEY" - Counter reports a key. 1008 // "VALUE" - Counter reports a value. 1009 Portion string `json:"portion,omitempty"` 1010 // WorkerId: ID of a particular worker. 1011 WorkerId string `json:"workerId,omitempty"` 1012 // ForceSendFields is a list of field names (e.g. "ComponentStepName") to 1013 // unconditionally include in API requests. By default, fields with empty or 1014 // default values are omitted from API requests. See 1015 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1016 // details. 1017 ForceSendFields []string `json:"-"` 1018 // NullFields is a list of field names (e.g. "ComponentStepName") to include in 1019 // API requests with the JSON null value. By default, fields with empty values 1020 // are omitted from API requests. See 1021 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1022 NullFields []string `json:"-"` 1023 } 1024 1025 func (s *CounterStructuredName) MarshalJSON() ([]byte, error) { 1026 type NoMethod CounterStructuredName 1027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1028 } 1029 1030 // CounterStructuredNameAndMetadata: A single message which encapsulates 1031 // structured name and metadata for a given counter. 1032 type CounterStructuredNameAndMetadata struct { 1033 // Metadata: Metadata associated with a counter 1034 Metadata *CounterMetadata `json:"metadata,omitempty"` 1035 // Name: Structured name of the counter. 1036 Name *CounterStructuredName `json:"name,omitempty"` 1037 // ForceSendFields is a list of field names (e.g. "Metadata") to 1038 // unconditionally include in API requests. By default, fields with empty or 1039 // default values are omitted from API requests. See 1040 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1041 // details. 1042 ForceSendFields []string `json:"-"` 1043 // NullFields is a list of field names (e.g. "Metadata") to include in API 1044 // requests with the JSON null value. By default, fields with empty values are 1045 // omitted from API requests. See 1046 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1047 NullFields []string `json:"-"` 1048 } 1049 1050 func (s *CounterStructuredNameAndMetadata) MarshalJSON() ([]byte, error) { 1051 type NoMethod CounterStructuredNameAndMetadata 1052 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1053 } 1054 1055 // CounterUpdate: An update to a Counter sent from a worker. 1056 type CounterUpdate struct { 1057 // Boolean: Boolean value for And, Or. 1058 Boolean bool `json:"boolean,omitempty"` 1059 // Cumulative: True if this counter is reported as the total cumulative 1060 // aggregate value accumulated since the worker started working on this 1061 // WorkItem. By default this is false, indicating that this counter is reported 1062 // as a delta. 1063 Cumulative bool `json:"cumulative,omitempty"` 1064 // Distribution: Distribution data 1065 Distribution *DistributionUpdate `json:"distribution,omitempty"` 1066 // FloatingPoint: Floating point value for Sum, Max, Min. 1067 FloatingPoint float64 `json:"floatingPoint,omitempty"` 1068 // FloatingPointList: List of floating point numbers, for Set. 1069 FloatingPointList *FloatingPointList `json:"floatingPointList,omitempty"` 1070 // FloatingPointMean: Floating point mean aggregation value for Mean. 1071 FloatingPointMean *FloatingPointMean `json:"floatingPointMean,omitempty"` 1072 // Integer: Integer value for Sum, Max, Min. 1073 Integer *SplitInt64 `json:"integer,omitempty"` 1074 // IntegerGauge: Gauge data 1075 IntegerGauge *IntegerGauge `json:"integerGauge,omitempty"` 1076 // IntegerList: List of integers, for Set. 1077 IntegerList *IntegerList `json:"integerList,omitempty"` 1078 // IntegerMean: Integer mean aggregation value for Mean. 1079 IntegerMean *IntegerMean `json:"integerMean,omitempty"` 1080 // Internal: Value for internally-defined counters used by the Dataflow 1081 // service. 1082 Internal interface{} `json:"internal,omitempty"` 1083 // NameAndKind: Counter name and aggregation type. 1084 NameAndKind *NameAndKind `json:"nameAndKind,omitempty"` 1085 // ShortId: The service-generated short identifier for this counter. The 1086 // short_id -> (name, metadata) mapping is constant for the lifetime of a job. 1087 ShortId int64 `json:"shortId,omitempty,string"` 1088 // StringList: List of strings, for Set. 1089 StringList *StringList `json:"stringList,omitempty"` 1090 // StructuredNameAndMetadata: Counter structured name and metadata. 1091 StructuredNameAndMetadata *CounterStructuredNameAndMetadata `json:"structuredNameAndMetadata,omitempty"` 1092 // ForceSendFields is a list of field names (e.g. "Boolean") to unconditionally 1093 // include in API requests. By default, fields with empty or default values are 1094 // omitted from API requests. See 1095 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1096 // details. 1097 ForceSendFields []string `json:"-"` 1098 // NullFields is a list of field names (e.g. "Boolean") to include in API 1099 // requests with the JSON null value. By default, fields with empty values are 1100 // omitted from API requests. See 1101 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1102 NullFields []string `json:"-"` 1103 } 1104 1105 func (s *CounterUpdate) MarshalJSON() ([]byte, error) { 1106 type NoMethod CounterUpdate 1107 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1108 } 1109 1110 func (s *CounterUpdate) UnmarshalJSON(data []byte) error { 1111 type NoMethod CounterUpdate 1112 var s1 struct { 1113 FloatingPoint gensupport.JSONFloat64 `json:"floatingPoint"` 1114 *NoMethod 1115 } 1116 s1.NoMethod = (*NoMethod)(s) 1117 if err := json.Unmarshal(data, &s1); err != nil { 1118 return err 1119 } 1120 s.FloatingPoint = float64(s1.FloatingPoint) 1121 return nil 1122 } 1123 1124 // CreateJobFromTemplateRequest: A request to create a Cloud Dataflow job from 1125 // a template. 1126 type CreateJobFromTemplateRequest struct { 1127 // Environment: The runtime environment for the job. 1128 Environment *RuntimeEnvironment `json:"environment,omitempty"` 1129 // GcsPath: Required. A Cloud Storage path to the template from which to create 1130 // the job. Must be a valid Cloud Storage URL, beginning with `gs://`. 1131 GcsPath string `json:"gcsPath,omitempty"` 1132 // JobName: Required. The job name to use for the created job. 1133 JobName string `json:"jobName,omitempty"` 1134 // Location: The [regional endpoint] 1135 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 1136 // which to direct the request. 1137 Location string `json:"location,omitempty"` 1138 // Parameters: The runtime parameters to pass to the job. 1139 Parameters map[string]string `json:"parameters,omitempty"` 1140 // ForceSendFields is a list of field names (e.g. "Environment") to 1141 // unconditionally include in API requests. By default, fields with empty or 1142 // default values are omitted from API requests. See 1143 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1144 // details. 1145 ForceSendFields []string `json:"-"` 1146 // NullFields is a list of field names (e.g. "Environment") to include in API 1147 // requests with the JSON null value. By default, fields with empty values are 1148 // omitted from API requests. See 1149 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1150 NullFields []string `json:"-"` 1151 } 1152 1153 func (s *CreateJobFromTemplateRequest) MarshalJSON() ([]byte, error) { 1154 type NoMethod CreateJobFromTemplateRequest 1155 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1156 } 1157 1158 // CustomSourceLocation: Identifies the location of a custom souce. 1159 type CustomSourceLocation struct { 1160 // Stateful: Whether this source is stateful. 1161 Stateful bool `json:"stateful,omitempty"` 1162 // ForceSendFields is a list of field names (e.g. "Stateful") to 1163 // unconditionally include in API requests. By default, fields with empty or 1164 // default values are omitted from API requests. See 1165 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1166 // details. 1167 ForceSendFields []string `json:"-"` 1168 // NullFields is a list of field names (e.g. "Stateful") to include in API 1169 // requests with the JSON null value. By default, fields with empty values are 1170 // omitted from API requests. See 1171 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1172 NullFields []string `json:"-"` 1173 } 1174 1175 func (s *CustomSourceLocation) MarshalJSON() ([]byte, error) { 1176 type NoMethod CustomSourceLocation 1177 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1178 } 1179 1180 // DataDiskAssignment: Data disk assignment for a given VM instance. 1181 type DataDiskAssignment struct { 1182 // DataDisks: Mounted data disks. The order is important a data disk's 0-based 1183 // index in this list defines which persistent directory the disk is mounted 1184 // to, for example the list of { "myproject-1014-104817-4c2-harness-0-disk-0" 1185 // }, { "myproject-1014-104817-4c2-harness-0-disk-1" }. 1186 DataDisks []string `json:"dataDisks,omitempty"` 1187 // VmInstance: VM instance name the data disks mounted to, for example 1188 // "myproject-1014-104817-4c2-harness-0". 1189 VmInstance string `json:"vmInstance,omitempty"` 1190 // ForceSendFields is a list of field names (e.g. "DataDisks") to 1191 // unconditionally include in API requests. By default, fields with empty or 1192 // default values are omitted from API requests. See 1193 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1194 // details. 1195 ForceSendFields []string `json:"-"` 1196 // NullFields is a list of field names (e.g. "DataDisks") to include in API 1197 // requests with the JSON null value. By default, fields with empty values are 1198 // omitted from API requests. See 1199 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1200 NullFields []string `json:"-"` 1201 } 1202 1203 func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) { 1204 type NoMethod DataDiskAssignment 1205 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1206 } 1207 1208 // DataSamplingConfig: Configuration options for sampling elements. 1209 type DataSamplingConfig struct { 1210 // Behaviors: List of given sampling behaviors to enable. For example, 1211 // specifying behaviors = [ALWAYS_ON] samples in-flight elements but does not 1212 // sample exceptions. Can be used to specify multiple behaviors like, behaviors 1213 // = [ALWAYS_ON, EXCEPTIONS] for specifying periodic sampling and exception 1214 // sampling. If DISABLED is in the list, then sampling will be disabled and 1215 // ignore the other given behaviors. Ordering does not matter. 1216 // 1217 // Possible values: 1218 // "DATA_SAMPLING_BEHAVIOR_UNSPECIFIED" - If given, has no effect on sampling 1219 // behavior. Used as an unknown or unset sentinel value. 1220 // "DISABLED" - When given, disables element sampling. Has same behavior as 1221 // not setting the behavior. 1222 // "ALWAYS_ON" - When given, enables sampling in-flight from all 1223 // PCollections. 1224 // "EXCEPTIONS" - When given, enables sampling input elements when a 1225 // user-defined DoFn causes an exception. 1226 Behaviors []string `json:"behaviors,omitempty"` 1227 // ForceSendFields is a list of field names (e.g. "Behaviors") to 1228 // unconditionally include in API requests. By default, fields with empty or 1229 // default values are omitted from API requests. See 1230 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1231 // details. 1232 ForceSendFields []string `json:"-"` 1233 // NullFields is a list of field names (e.g. "Behaviors") to include in API 1234 // requests with the JSON null value. By default, fields with empty values are 1235 // omitted from API requests. See 1236 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1237 NullFields []string `json:"-"` 1238 } 1239 1240 func (s *DataSamplingConfig) MarshalJSON() ([]byte, error) { 1241 type NoMethod DataSamplingConfig 1242 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1243 } 1244 1245 // DataSamplingReport: Contains per-worker telemetry about the data sampling 1246 // feature. 1247 type DataSamplingReport struct { 1248 // BytesWrittenDelta: Optional. Delta of bytes written to file from previous 1249 // report. 1250 BytesWrittenDelta int64 `json:"bytesWrittenDelta,omitempty,string"` 1251 // ElementsSampledBytes: Optional. Delta of bytes sampled from previous report. 1252 ElementsSampledBytes int64 `json:"elementsSampledBytes,omitempty,string"` 1253 // ElementsSampledCount: Optional. Delta of number of elements sampled from 1254 // previous report. 1255 ElementsSampledCount int64 `json:"elementsSampledCount,omitempty,string"` 1256 // ExceptionsSampledCount: Optional. Delta of number of samples taken from user 1257 // code exceptions from previous report. 1258 ExceptionsSampledCount int64 `json:"exceptionsSampledCount,omitempty,string"` 1259 // PcollectionsSampledCount: Optional. Delta of number of PCollections sampled 1260 // from previous report. 1261 PcollectionsSampledCount int64 `json:"pcollectionsSampledCount,omitempty,string"` 1262 // PersistenceErrorsCount: Optional. Delta of errors counts from persisting the 1263 // samples from previous report. 1264 PersistenceErrorsCount int64 `json:"persistenceErrorsCount,omitempty,string"` 1265 // TranslationErrorsCount: Optional. Delta of errors counts from retrieving, or 1266 // translating the samples from previous report. 1267 TranslationErrorsCount int64 `json:"translationErrorsCount,omitempty,string"` 1268 // ForceSendFields is a list of field names (e.g. "BytesWrittenDelta") to 1269 // unconditionally include in API requests. By default, fields with empty or 1270 // default values are omitted from API requests. See 1271 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1272 // details. 1273 ForceSendFields []string `json:"-"` 1274 // NullFields is a list of field names (e.g. "BytesWrittenDelta") to include in 1275 // API requests with the JSON null value. By default, fields with empty values 1276 // are omitted from API requests. See 1277 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1278 NullFields []string `json:"-"` 1279 } 1280 1281 func (s *DataSamplingReport) MarshalJSON() ([]byte, error) { 1282 type NoMethod DataSamplingReport 1283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1284 } 1285 1286 // DataflowHistogramValue: Summary statistics for a population of values. 1287 // HistogramValue contains a sequence of buckets and gives a count of values 1288 // that fall into each bucket. Bucket boundares are defined by a formula and 1289 // bucket widths are either fixed or exponentially increasing. 1290 type DataflowHistogramValue struct { 1291 // BucketCounts: Optional. The number of values in each bucket of the 1292 // histogram, as described in `bucket_options`. `bucket_counts` should contain 1293 // N values, where N is the number of buckets specified in `bucket_options`. If 1294 // `bucket_counts` has fewer than N values, the remaining values are assumed to 1295 // be 0. 1296 BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` 1297 // BucketOptions: Describes the bucket boundaries used in the histogram. 1298 BucketOptions *BucketOptions `json:"bucketOptions,omitempty"` 1299 // Count: Number of values recorded in this histogram. 1300 Count int64 `json:"count,omitempty,string"` 1301 // OutlierStats: Statistics on the values recorded in the histogram that fall 1302 // out of the bucket boundaries. 1303 OutlierStats *OutlierStats `json:"outlierStats,omitempty"` 1304 // ForceSendFields is a list of field names (e.g. "BucketCounts") to 1305 // unconditionally include in API requests. By default, fields with empty or 1306 // default values are omitted from API requests. See 1307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1308 // details. 1309 ForceSendFields []string `json:"-"` 1310 // NullFields is a list of field names (e.g. "BucketCounts") to include in API 1311 // requests with the JSON null value. By default, fields with empty values are 1312 // omitted from API requests. See 1313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1314 NullFields []string `json:"-"` 1315 } 1316 1317 func (s *DataflowHistogramValue) MarshalJSON() ([]byte, error) { 1318 type NoMethod DataflowHistogramValue 1319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1320 } 1321 1322 // DatastoreIODetails: Metadata for a Datastore connector used by the job. 1323 type DatastoreIODetails struct { 1324 // Namespace: Namespace used in the connection. 1325 Namespace string `json:"namespace,omitempty"` 1326 // ProjectId: ProjectId accessed in the connection. 1327 ProjectId string `json:"projectId,omitempty"` 1328 // ForceSendFields is a list of field names (e.g. "Namespace") to 1329 // unconditionally include in API requests. By default, fields with empty or 1330 // default values are omitted from API requests. See 1331 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1332 // details. 1333 ForceSendFields []string `json:"-"` 1334 // NullFields is a list of field names (e.g. "Namespace") to include in API 1335 // requests with the JSON null value. By default, fields with empty values are 1336 // omitted from API requests. See 1337 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1338 NullFields []string `json:"-"` 1339 } 1340 1341 func (s *DatastoreIODetails) MarshalJSON() ([]byte, error) { 1342 type NoMethod DatastoreIODetails 1343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1344 } 1345 1346 // DebugOptions: Describes any options that have an effect on the debugging of 1347 // pipelines. 1348 type DebugOptions struct { 1349 // DataSampling: Configuration options for sampling elements from a running 1350 // pipeline. 1351 DataSampling *DataSamplingConfig `json:"dataSampling,omitempty"` 1352 // EnableHotKeyLogging: When true, enables the logging of the literal hot key 1353 // to the user's Cloud Logging. 1354 EnableHotKeyLogging bool `json:"enableHotKeyLogging,omitempty"` 1355 // ForceSendFields is a list of field names (e.g. "DataSampling") to 1356 // unconditionally include in API requests. By default, fields with empty or 1357 // default values are omitted from API requests. See 1358 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1359 // details. 1360 ForceSendFields []string `json:"-"` 1361 // NullFields is a list of field names (e.g. "DataSampling") to include in API 1362 // requests with the JSON null value. By default, fields with empty values are 1363 // omitted from API requests. See 1364 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1365 NullFields []string `json:"-"` 1366 } 1367 1368 func (s *DebugOptions) MarshalJSON() ([]byte, error) { 1369 type NoMethod DebugOptions 1370 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1371 } 1372 1373 // DeleteSnapshotResponse: Response from deleting a snapshot. 1374 type DeleteSnapshotResponse struct { 1375 // ServerResponse contains the HTTP response code and headers from the server. 1376 googleapi.ServerResponse `json:"-"` 1377 } 1378 1379 // DerivedSource: Specification of one of the bundles produced as a result of 1380 // splitting a Source (e.g. when executing a SourceSplitRequest, or when 1381 // splitting an active task using WorkItemStatus.dynamic_source_split), 1382 // relative to the source being split. 1383 type DerivedSource struct { 1384 // DerivationMode: What source to base the produced source on (if any). 1385 // 1386 // Possible values: 1387 // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is unknown, or 1388 // unspecified. 1389 // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely independent 1390 // Source with no base. 1391 // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based on the 1392 // Source being split. 1393 // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source based on 1394 // the base of the Source being split. 1395 DerivationMode string `json:"derivationMode,omitempty"` 1396 // Source: Specification of the source. 1397 Source *Source `json:"source,omitempty"` 1398 // ForceSendFields is a list of field names (e.g. "DerivationMode") to 1399 // unconditionally include in API requests. By default, fields with empty or 1400 // default values are omitted from API requests. See 1401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1402 // details. 1403 ForceSendFields []string `json:"-"` 1404 // NullFields is a list of field names (e.g. "DerivationMode") to include in 1405 // API requests with the JSON null value. By default, fields with empty values 1406 // are omitted from API requests. See 1407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1408 NullFields []string `json:"-"` 1409 } 1410 1411 func (s *DerivedSource) MarshalJSON() ([]byte, error) { 1412 type NoMethod DerivedSource 1413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1414 } 1415 1416 // Disk: Describes the data disk used by a workflow job. 1417 type Disk struct { 1418 // DiskType: Disk storage type, as defined by Google Compute Engine. This must 1419 // be a disk type appropriate to the project and zone in which the workers will 1420 // run. If unknown or unspecified, the service will attempt to choose a 1421 // reasonable default. For example, the standard persistent disk type is a 1422 // resource name typically ending in "pd-standard". If SSD persistent disks are 1423 // available, the resource name typically ends with "pd-ssd". The actual valid 1424 // values are defined the Google Compute Engine API, not by the Cloud Dataflow 1425 // API; consult the Google Compute Engine documentation for more information 1426 // about determining the set of available disk types for a particular project 1427 // and zone. Google Compute Engine Disk types are local to a particular project 1428 // in a particular zone, and so the resource name will typically look something 1429 // like this: 1430 // compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard 1431 DiskType string `json:"diskType,omitempty"` 1432 // MountPoint: Directory in a VM where disk is mounted. 1433 MountPoint string `json:"mountPoint,omitempty"` 1434 // SizeGb: Size of disk in GB. If zero or unspecified, the service will attempt 1435 // to choose a reasonable default. 1436 SizeGb int64 `json:"sizeGb,omitempty"` 1437 // ForceSendFields is a list of field names (e.g. "DiskType") to 1438 // unconditionally include in API requests. By default, fields with empty or 1439 // default values are omitted from API requests. See 1440 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1441 // details. 1442 ForceSendFields []string `json:"-"` 1443 // NullFields is a list of field names (e.g. "DiskType") to include in API 1444 // requests with the JSON null value. By default, fields with empty values are 1445 // omitted from API requests. See 1446 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1447 NullFields []string `json:"-"` 1448 } 1449 1450 func (s *Disk) MarshalJSON() ([]byte, error) { 1451 type NoMethod Disk 1452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1453 } 1454 1455 // DisplayData: Data provided with a pipeline or transform to provide 1456 // descriptive info. 1457 type DisplayData struct { 1458 // BoolValue: Contains value if the data is of a boolean type. 1459 BoolValue bool `json:"boolValue,omitempty"` 1460 // DurationValue: Contains value if the data is of duration type. 1461 DurationValue string `json:"durationValue,omitempty"` 1462 // FloatValue: Contains value if the data is of float type. 1463 FloatValue float64 `json:"floatValue,omitempty"` 1464 // Int64Value: Contains value if the data is of int64 type. 1465 Int64Value int64 `json:"int64Value,omitempty,string"` 1466 // JavaClassValue: Contains value if the data is of java class type. 1467 JavaClassValue string `json:"javaClassValue,omitempty"` 1468 // Key: The key identifying the display data. This is intended to be used as a 1469 // label for the display data when viewed in a dax monitoring system. 1470 Key string `json:"key,omitempty"` 1471 // Label: An optional label to display in a dax UI for the element. 1472 Label string `json:"label,omitempty"` 1473 // Namespace: The namespace for the key. This is usually a class name or 1474 // programming language namespace (i.e. python module) which defines the 1475 // display data. This allows a dax monitoring system to specially handle the 1476 // data and perform custom rendering. 1477 Namespace string `json:"namespace,omitempty"` 1478 // ShortStrValue: A possible additional shorter value to display. For example a 1479 // java_class_name_value of com.mypackage.MyDoFn will be stored with MyDoFn as 1480 // the short_str_value and com.mypackage.MyDoFn as the java_class_name value. 1481 // short_str_value can be displayed and java_class_name_value will be displayed 1482 // as a tooltip. 1483 ShortStrValue string `json:"shortStrValue,omitempty"` 1484 // StrValue: Contains value if the data is of string type. 1485 StrValue string `json:"strValue,omitempty"` 1486 // TimestampValue: Contains value if the data is of timestamp type. 1487 TimestampValue string `json:"timestampValue,omitempty"` 1488 // Url: An optional full URL. 1489 Url string `json:"url,omitempty"` 1490 // ForceSendFields is a list of field names (e.g. "BoolValue") to 1491 // unconditionally include in API requests. By default, fields with empty or 1492 // default values are omitted from API requests. See 1493 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1494 // details. 1495 ForceSendFields []string `json:"-"` 1496 // NullFields is a list of field names (e.g. "BoolValue") to include in API 1497 // requests with the JSON null value. By default, fields with empty values are 1498 // omitted from API requests. See 1499 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1500 NullFields []string `json:"-"` 1501 } 1502 1503 func (s *DisplayData) MarshalJSON() ([]byte, error) { 1504 type NoMethod DisplayData 1505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1506 } 1507 1508 func (s *DisplayData) UnmarshalJSON(data []byte) error { 1509 type NoMethod DisplayData 1510 var s1 struct { 1511 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 1512 *NoMethod 1513 } 1514 s1.NoMethod = (*NoMethod)(s) 1515 if err := json.Unmarshal(data, &s1); err != nil { 1516 return err 1517 } 1518 s.FloatValue = float64(s1.FloatValue) 1519 return nil 1520 } 1521 1522 // DistributionUpdate: A metric value representing a distribution. 1523 type DistributionUpdate struct { 1524 // Count: The count of the number of elements present in the distribution. 1525 Count *SplitInt64 `json:"count,omitempty"` 1526 // Histogram: (Optional) Histogram of value counts for the distribution. 1527 Histogram *Histogram `json:"histogram,omitempty"` 1528 // Max: The maximum value present in the distribution. 1529 Max *SplitInt64 `json:"max,omitempty"` 1530 // Min: The minimum value present in the distribution. 1531 Min *SplitInt64 `json:"min,omitempty"` 1532 // Sum: Use an int64 since we'd prefer the added precision. If overflow is a 1533 // common problem we can detect it and use an additional int64 or a double. 1534 Sum *SplitInt64 `json:"sum,omitempty"` 1535 // SumOfSquares: Use a double since the sum of squares is likely to overflow 1536 // int64. 1537 SumOfSquares float64 `json:"sumOfSquares,omitempty"` 1538 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally 1539 // include in API requests. By default, fields with empty or default values are 1540 // omitted from API requests. See 1541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1542 // details. 1543 ForceSendFields []string `json:"-"` 1544 // NullFields is a list of field names (e.g. "Count") to include in API 1545 // requests with the JSON null value. By default, fields with empty values are 1546 // omitted from API requests. See 1547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1548 NullFields []string `json:"-"` 1549 } 1550 1551 func (s *DistributionUpdate) MarshalJSON() ([]byte, error) { 1552 type NoMethod DistributionUpdate 1553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1554 } 1555 1556 func (s *DistributionUpdate) UnmarshalJSON(data []byte) error { 1557 type NoMethod DistributionUpdate 1558 var s1 struct { 1559 SumOfSquares gensupport.JSONFloat64 `json:"sumOfSquares"` 1560 *NoMethod 1561 } 1562 s1.NoMethod = (*NoMethod)(s) 1563 if err := json.Unmarshal(data, &s1); err != nil { 1564 return err 1565 } 1566 s.SumOfSquares = float64(s1.SumOfSquares) 1567 return nil 1568 } 1569 1570 // DynamicSourceSplit: When a task splits using 1571 // WorkItemStatus.dynamic_source_split, this message describes the two parts of 1572 // the split relative to the description of the current task's input. 1573 type DynamicSourceSplit struct { 1574 // Primary: Primary part (continued to be processed by worker). Specified 1575 // relative to the previously-current source. Becomes current. 1576 Primary *DerivedSource `json:"primary,omitempty"` 1577 // Residual: Residual part (returned to the pool of work). Specified relative 1578 // to the previously-current source. 1579 Residual *DerivedSource `json:"residual,omitempty"` 1580 // ForceSendFields is a list of field names (e.g. "Primary") to unconditionally 1581 // include in API requests. By default, fields with empty or default values are 1582 // omitted from API requests. See 1583 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1584 // details. 1585 ForceSendFields []string `json:"-"` 1586 // NullFields is a list of field names (e.g. "Primary") to include in API 1587 // requests with the JSON null value. By default, fields with empty values are 1588 // omitted from API requests. See 1589 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1590 NullFields []string `json:"-"` 1591 } 1592 1593 func (s *DynamicSourceSplit) MarshalJSON() ([]byte, error) { 1594 type NoMethod DynamicSourceSplit 1595 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1596 } 1597 1598 // Environment: Describes the environment in which a Dataflow Job runs. 1599 type Environment struct { 1600 // ClusterManagerApiService: The type of cluster manager API to use. If unknown 1601 // or unspecified, the service will attempt to choose a reasonable default. 1602 // This should be in the form of the API service name, e.g. 1603 // "compute.googleapis.com". 1604 ClusterManagerApiService string `json:"clusterManagerApiService,omitempty"` 1605 // Dataset: The dataset for the current project where various workflow related 1606 // tables are stored. The supported resource type is: Google BigQuery: 1607 // bigquery.googleapis.com/{dataset} 1608 Dataset string `json:"dataset,omitempty"` 1609 // DebugOptions: Any debugging options to be supplied to the job. 1610 DebugOptions *DebugOptions `json:"debugOptions,omitempty"` 1611 // Experiments: The list of experiments to enable. This field should be used 1612 // for SDK related experiments and not for service related experiments. The 1613 // proper field for service related experiments is service_options. 1614 Experiments []string `json:"experiments,omitempty"` 1615 // FlexResourceSchedulingGoal: Which Flexible Resource Scheduling mode to run 1616 // in. 1617 // 1618 // Possible values: 1619 // "FLEXRS_UNSPECIFIED" - Run in the default mode. 1620 // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time. 1621 // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost. 1622 FlexResourceSchedulingGoal string `json:"flexResourceSchedulingGoal,omitempty"` 1623 // InternalExperiments: Experimental settings. 1624 InternalExperiments googleapi.RawMessage `json:"internalExperiments,omitempty"` 1625 // SdkPipelineOptions: The Cloud Dataflow SDK pipeline options specified by the 1626 // user. These options are passed through the service and are used to recreate 1627 // the SDK pipeline options on the worker in a language agnostic and platform 1628 // independent way. 1629 SdkPipelineOptions googleapi.RawMessage `json:"sdkPipelineOptions,omitempty"` 1630 // ServiceAccountEmail: Identity to run virtual machines as. Defaults to the 1631 // default account. 1632 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 1633 // ServiceKmsKeyName: If set, contains the Cloud KMS key identifier used to 1634 // encrypt data at rest, AKA a Customer Managed Encryption Key (CMEK). Format: 1635 // projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/KEY 1636 ServiceKmsKeyName string `json:"serviceKmsKeyName,omitempty"` 1637 // ServiceOptions: Optional. The list of service options to enable. This field 1638 // should be used for service related experiments only. These experiments, when 1639 // graduating to GA, should be replaced by dedicated fields or become default 1640 // (i.e. always on). 1641 ServiceOptions []string `json:"serviceOptions,omitempty"` 1642 // ShuffleMode: Output only. The shuffle mode used for the job. 1643 // 1644 // Possible values: 1645 // "SHUFFLE_MODE_UNSPECIFIED" - Shuffle mode information is not available. 1646 // "VM_BASED" - Shuffle is done on the worker VMs. 1647 // "SERVICE_BASED" - Shuffle is done on the service side. 1648 ShuffleMode string `json:"shuffleMode,omitempty"` 1649 // StreamingMode: Optional. Specifies the Streaming Engine message processing 1650 // guarantees. Reduces cost and latency but might result in duplicate messages 1651 // committed to storage. Designed to run simple mapping streaming ETL jobs at 1652 // the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a 1653 // canonical use case. For more information, see Set the pipeline streaming 1654 // mode (https://cloud.google.com/dataflow/docs/guides/streaming-modes). 1655 // 1656 // Possible values: 1657 // "STREAMING_MODE_UNSPECIFIED" - Run in the default mode. 1658 // "STREAMING_MODE_EXACTLY_ONCE" - In this mode, message deduplication is 1659 // performed against persistent state to make sure each message is processed 1660 // and committed to storage exactly once. 1661 // "STREAMING_MODE_AT_LEAST_ONCE" - Message deduplication is not performed. 1662 // Messages might be processed multiple times, and the results are applied 1663 // multiple times. Note: Setting this value also enables Streaming Engine and 1664 // Streaming Engine resource-based billing. 1665 StreamingMode string `json:"streamingMode,omitempty"` 1666 // TempStoragePrefix: The prefix of the resources the system should use for 1667 // temporary storage. The system will append the suffix "/temp-{JOBNAME} to 1668 // this resource prefix, where {JOBNAME} is the value of the job_name field. 1669 // The resulting bucket and object prefix is used as the prefix of the 1670 // resources used to store temporary data needed during the job execution. 1671 // NOTE: This will override the value in taskrunner_settings. The supported 1672 // resource type is: Google Cloud Storage: 1673 // storage.googleapis.com/{bucket}/{object} 1674 // bucket.storage.googleapis.com/{object} 1675 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 1676 // UseStreamingEngineResourceBasedBilling: Output only. Whether the job uses 1677 // the Streaming Engine resource-based billing model. 1678 UseStreamingEngineResourceBasedBilling bool `json:"useStreamingEngineResourceBasedBilling,omitempty"` 1679 // UserAgent: A description of the process that generated the request. 1680 UserAgent googleapi.RawMessage `json:"userAgent,omitempty"` 1681 // Version: A structure describing which components and their versions of the 1682 // service are required in order to run the job. 1683 Version googleapi.RawMessage `json:"version,omitempty"` 1684 // WorkerPools: The worker pools. At least one "harness" worker pool must be 1685 // specified in order for the job to have workers. 1686 WorkerPools []*WorkerPool `json:"workerPools,omitempty"` 1687 // WorkerRegion: The Compute Engine region 1688 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which 1689 // worker processing should occur, e.g. "us-west1". Mutually exclusive with 1690 // worker_zone. If neither worker_region nor worker_zone is specified, default 1691 // to the control plane's region. 1692 WorkerRegion string `json:"workerRegion,omitempty"` 1693 // WorkerZone: The Compute Engine zone 1694 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which 1695 // worker processing should occur, e.g. "us-west1-a". Mutually exclusive with 1696 // worker_region. If neither worker_region nor worker_zone is specified, a zone 1697 // in the control plane's region is chosen based on available capacity. 1698 WorkerZone string `json:"workerZone,omitempty"` 1699 // ForceSendFields is a list of field names (e.g. "ClusterManagerApiService") 1700 // to unconditionally include in API requests. By default, fields with empty or 1701 // default values are omitted from API requests. See 1702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1703 // details. 1704 ForceSendFields []string `json:"-"` 1705 // NullFields is a list of field names (e.g. "ClusterManagerApiService") to 1706 // include in API requests with the JSON null value. By default, fields with 1707 // empty values are omitted from API requests. See 1708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1709 NullFields []string `json:"-"` 1710 } 1711 1712 func (s *Environment) MarshalJSON() ([]byte, error) { 1713 type NoMethod Environment 1714 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1715 } 1716 1717 // ExecutionStageState: A message describing the state of a particular 1718 // execution stage. 1719 type ExecutionStageState struct { 1720 // CurrentStateTime: The time at which the stage transitioned to this state. 1721 CurrentStateTime string `json:"currentStateTime,omitempty"` 1722 // ExecutionStageName: The name of the execution stage. 1723 ExecutionStageName string `json:"executionStageName,omitempty"` 1724 // ExecutionStageState: Executions stage states allow the same set of values as 1725 // JobState. 1726 // 1727 // Possible values: 1728 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 1729 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job has not 1730 // yet started to run. 1731 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 1732 // currently running. 1733 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 1734 // successfully completed. This is a terminal job state. This state may be set 1735 // by the Cloud Dataflow service, as a transition from `JOB_STATE_RUNNING`. It 1736 // may also be set via a Cloud Dataflow `UpdateJob` call, if the job has not 1737 // yet reached a terminal state. 1738 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has failed. 1739 // This is a terminal job state. This state may only be set by the Cloud 1740 // Dataflow service, and only as a transition from `JOB_STATE_RUNNING`. 1741 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the job has 1742 // been explicitly cancelled. This is a terminal job state. This state may only 1743 // be set via a Cloud Dataflow `UpdateJob` call, and only if the job has not 1744 // yet reached another terminal state. 1745 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job was 1746 // successfully updated, meaning that this job was stopped and another job was 1747 // started, inheriting state from this one. This is a terminal job state. This 1748 // state may only be set by the Cloud Dataflow service, and only as a 1749 // transition from `JOB_STATE_RUNNING`. 1750 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job is in 1751 // the process of draining. A draining job has stopped pulling from its input 1752 // sources and is processing any data that remains in-flight. This state may be 1753 // set via a Cloud Dataflow `UpdateJob` call, but only as a transition from 1754 // `JOB_STATE_RUNNING`. Jobs that are draining may only transition to 1755 // `JOB_STATE_DRAINED`, `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 1756 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job has been 1757 // drained. A drained job terminated by stopping pulling from its input sources 1758 // and processing any data that remained in-flight when draining was requested. 1759 // This state is a terminal state, may only be set by the Cloud Dataflow 1760 // service, and only as a transition from `JOB_STATE_DRAINING`. 1761 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job has been 1762 // created but is not yet running. Jobs that are pending may only transition to 1763 // `JOB_STATE_RUNNING`, or `JOB_STATE_FAILED`. 1764 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the job has 1765 // been explicitly cancelled and is in the process of stopping. Jobs that are 1766 // cancelling may only transition to `JOB_STATE_CANCELLED` or 1767 // `JOB_STATE_FAILED`. 1768 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has been 1769 // created but is being delayed until launch. Jobs that are queued may only 1770 // transition to `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 1771 // "JOB_STATE_RESOURCE_CLEANING_UP" - `JOB_STATE_RESOURCE_CLEANING_UP` 1772 // indicates that the batch job's associated resources are currently being 1773 // cleaned up after a successful run. Currently, this is an opt-in feature, 1774 // please reach out to Cloud support team if you are interested. 1775 ExecutionStageState string `json:"executionStageState,omitempty"` 1776 // ForceSendFields is a list of field names (e.g. "CurrentStateTime") to 1777 // unconditionally include in API requests. By default, fields with empty or 1778 // default values are omitted from API requests. See 1779 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1780 // details. 1781 ForceSendFields []string `json:"-"` 1782 // NullFields is a list of field names (e.g. "CurrentStateTime") to include in 1783 // API requests with the JSON null value. By default, fields with empty values 1784 // are omitted from API requests. See 1785 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1786 NullFields []string `json:"-"` 1787 } 1788 1789 func (s *ExecutionStageState) MarshalJSON() ([]byte, error) { 1790 type NoMethod ExecutionStageState 1791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1792 } 1793 1794 // ExecutionStageSummary: Description of the composing transforms, names/ids, 1795 // and input/outputs of a stage of execution. Some composing transforms and 1796 // sources may have been generated by the Dataflow service during execution 1797 // planning. 1798 type ExecutionStageSummary struct { 1799 // ComponentSource: Collections produced and consumed by component transforms 1800 // of this stage. 1801 ComponentSource []*ComponentSource `json:"componentSource,omitempty"` 1802 // ComponentTransform: Transforms that comprise this execution stage. 1803 ComponentTransform []*ComponentTransform `json:"componentTransform,omitempty"` 1804 // Id: Dataflow service generated id for this stage. 1805 Id string `json:"id,omitempty"` 1806 // InputSource: Input sources for this stage. 1807 InputSource []*StageSource `json:"inputSource,omitempty"` 1808 // Kind: Type of transform this stage is executing. 1809 // 1810 // Possible values: 1811 // "UNKNOWN_KIND" - Unrecognized transform type. 1812 // "PAR_DO_KIND" - ParDo transform. 1813 // "GROUP_BY_KEY_KIND" - Group By Key transform. 1814 // "FLATTEN_KIND" - Flatten transform. 1815 // "READ_KIND" - Read transform. 1816 // "WRITE_KIND" - Write transform. 1817 // "CONSTANT_KIND" - Constructs from a constant value, such as with 1818 // Create.of. 1819 // "SINGLETON_KIND" - Creates a Singleton view of a collection. 1820 // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as part of a 1821 // GroupByKey. 1822 Kind string `json:"kind,omitempty"` 1823 // Name: Dataflow service generated name for this stage. 1824 Name string `json:"name,omitempty"` 1825 // OutputSource: Output sources for this stage. 1826 OutputSource []*StageSource `json:"outputSource,omitempty"` 1827 // PrerequisiteStage: Other stages that must complete before this stage can 1828 // run. 1829 PrerequisiteStage []string `json:"prerequisiteStage,omitempty"` 1830 // ForceSendFields is a list of field names (e.g. "ComponentSource") to 1831 // unconditionally include in API requests. By default, fields with empty or 1832 // default values are omitted from API requests. See 1833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1834 // details. 1835 ForceSendFields []string `json:"-"` 1836 // NullFields is a list of field names (e.g. "ComponentSource") to include in 1837 // API requests with the JSON null value. By default, fields with empty values 1838 // are omitted from API requests. See 1839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1840 NullFields []string `json:"-"` 1841 } 1842 1843 func (s *ExecutionStageSummary) MarshalJSON() ([]byte, error) { 1844 type NoMethod ExecutionStageSummary 1845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1846 } 1847 1848 // FailedLocation: Indicates which [regional endpoint] 1849 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) failed 1850 // to respond to a request for data. 1851 type FailedLocation struct { 1852 // Name: The name of the [regional endpoint] 1853 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 1854 // failed to respond. 1855 Name string `json:"name,omitempty"` 1856 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1857 // include in API requests. By default, fields with empty or default values are 1858 // omitted from API requests. See 1859 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1860 // details. 1861 ForceSendFields []string `json:"-"` 1862 // NullFields is a list of field names (e.g. "Name") to include in API requests 1863 // with the JSON null value. By default, fields with empty values are omitted 1864 // from API requests. See 1865 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1866 NullFields []string `json:"-"` 1867 } 1868 1869 func (s *FailedLocation) MarshalJSON() ([]byte, error) { 1870 type NoMethod FailedLocation 1871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1872 } 1873 1874 // FileIODetails: Metadata for a File connector used by the job. 1875 type FileIODetails struct { 1876 // FilePattern: File Pattern used to access files by the connector. 1877 FilePattern string `json:"filePattern,omitempty"` 1878 // ForceSendFields is a list of field names (e.g. "FilePattern") to 1879 // unconditionally include in API requests. By default, fields with empty or 1880 // default values are omitted from API requests. See 1881 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1882 // details. 1883 ForceSendFields []string `json:"-"` 1884 // NullFields is a list of field names (e.g. "FilePattern") to include in API 1885 // requests with the JSON null value. By default, fields with empty values are 1886 // omitted from API requests. See 1887 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1888 NullFields []string `json:"-"` 1889 } 1890 1891 func (s *FileIODetails) MarshalJSON() ([]byte, error) { 1892 type NoMethod FileIODetails 1893 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1894 } 1895 1896 // FlattenInstruction: An instruction that copies its inputs (zero or more) to 1897 // its (single) output. 1898 type FlattenInstruction struct { 1899 // Inputs: Describes the inputs to the flatten instruction. 1900 Inputs []*InstructionInput `json:"inputs,omitempty"` 1901 // ForceSendFields is a list of field names (e.g. "Inputs") to unconditionally 1902 // include in API requests. By default, fields with empty or default values are 1903 // omitted from API requests. See 1904 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1905 // details. 1906 ForceSendFields []string `json:"-"` 1907 // NullFields is a list of field names (e.g. "Inputs") to include in API 1908 // requests with the JSON null value. By default, fields with empty values are 1909 // omitted from API requests. See 1910 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1911 NullFields []string `json:"-"` 1912 } 1913 1914 func (s *FlattenInstruction) MarshalJSON() ([]byte, error) { 1915 type NoMethod FlattenInstruction 1916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1917 } 1918 1919 // FlexTemplateRuntimeEnvironment: The environment values to be set at runtime 1920 // for flex template. LINT.IfChange 1921 type FlexTemplateRuntimeEnvironment struct { 1922 // AdditionalExperiments: Additional experiment flags for the job. 1923 AdditionalExperiments []string `json:"additionalExperiments,omitempty"` 1924 // AdditionalUserLabels: Additional user labels to be specified for the job. 1925 // Keys and values must follow the restrictions specified in the labeling 1926 // restrictions 1927 // (https://cloud.google.com/compute/docs/labeling-resources#restrictions) 1928 // page. An object containing a list of "key": value pairs. Example: { "name": 1929 // "wrench", "mass": "1kg", "count": "3" }. 1930 AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"` 1931 // AutoscalingAlgorithm: The algorithm to use for autoscaling 1932 // 1933 // Possible values: 1934 // "AUTOSCALING_ALGORITHM_UNKNOWN" - The algorithm is unknown, or 1935 // unspecified. 1936 // "AUTOSCALING_ALGORITHM_NONE" - Disable autoscaling. 1937 // "AUTOSCALING_ALGORITHM_BASIC" - Increase worker count over time to reduce 1938 // job execution time. 1939 AutoscalingAlgorithm string `json:"autoscalingAlgorithm,omitempty"` 1940 // DiskSizeGb: Worker disk size, in gigabytes. 1941 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 1942 // DumpHeapOnOom: If true, when processing time is spent almost entirely on 1943 // garbage collection (GC), saves a heap dump before ending the thread or 1944 // process. If false, ends the thread or process without saving a heap dump. 1945 // Does not save a heap dump when the Java Virtual Machine (JVM) has an out of 1946 // memory error during processing. The location of the heap file is either 1947 // echoed back to the user, or the user is given the opportunity to download 1948 // the heap file. 1949 DumpHeapOnOom bool `json:"dumpHeapOnOom,omitempty"` 1950 // EnableLauncherVmSerialPortLogging: If true serial port logging will be 1951 // enabled for the launcher VM. 1952 EnableLauncherVmSerialPortLogging bool `json:"enableLauncherVmSerialPortLogging,omitempty"` 1953 // EnableStreamingEngine: Whether to enable Streaming Engine for the job. 1954 EnableStreamingEngine bool `json:"enableStreamingEngine,omitempty"` 1955 // FlexrsGoal: Set FlexRS goal for the job. 1956 // https://cloud.google.com/dataflow/docs/guides/flexrs 1957 // 1958 // Possible values: 1959 // "FLEXRS_UNSPECIFIED" - Run in the default mode. 1960 // "FLEXRS_SPEED_OPTIMIZED" - Optimize for lower execution time. 1961 // "FLEXRS_COST_OPTIMIZED" - Optimize for lower cost. 1962 FlexrsGoal string `json:"flexrsGoal,omitempty"` 1963 // IpConfiguration: Configuration for VM IPs. 1964 // 1965 // Possible values: 1966 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or unspecified. 1967 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 1968 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 1969 IpConfiguration string `json:"ipConfiguration,omitempty"` 1970 // KmsKeyName: Name for the Cloud KMS key for the job. Key format is: 1971 // projects//locations//keyRings//cryptoKeys/ 1972 KmsKeyName string `json:"kmsKeyName,omitempty"` 1973 // LauncherMachineType: The machine type to use for launching the job. The 1974 // default is n1-standard-1. 1975 LauncherMachineType string `json:"launcherMachineType,omitempty"` 1976 // MachineType: The machine type to use for the job. Defaults to the value from 1977 // the template if not specified. 1978 MachineType string `json:"machineType,omitempty"` 1979 // MaxWorkers: The maximum number of Google Compute Engine instances to be made 1980 // available to your pipeline during execution, from 1 to 1000. 1981 MaxWorkers int64 `json:"maxWorkers,omitempty"` 1982 // Network: Network to which VMs will be assigned. If empty or unspecified, the 1983 // service will use the network "default". 1984 Network string `json:"network,omitempty"` 1985 // NumWorkers: The initial number of Google Compute Engine instances for the 1986 // job. 1987 NumWorkers int64 `json:"numWorkers,omitempty"` 1988 // SaveHeapDumpsToGcsPath: Cloud Storage bucket (directory) to upload heap 1989 // dumps to. Enabling this field implies that `dump_heap_on_oom` is set to 1990 // true. 1991 SaveHeapDumpsToGcsPath string `json:"saveHeapDumpsToGcsPath,omitempty"` 1992 // SdkContainerImage: Docker registry location of container image to use for 1993 // the 'worker harness. Default is the container for the version of the SDK. 1994 // Note this field is only valid for portable pipelines. 1995 SdkContainerImage string `json:"sdkContainerImage,omitempty"` 1996 // ServiceAccountEmail: The email address of the service account to run the job 1997 // as. 1998 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 1999 // StagingLocation: The Cloud Storage path for staging local files. Must be a 2000 // valid Cloud Storage URL, beginning with `gs://`. 2001 StagingLocation string `json:"stagingLocation,omitempty"` 2002 // StreamingMode: Optional. Specifies the Streaming Engine message processing 2003 // guarantees. Reduces cost and latency but might result in duplicate messages 2004 // committed to storage. Designed to run simple mapping streaming ETL jobs at 2005 // the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a 2006 // canonical use case. For more information, see Set the pipeline streaming 2007 // mode (https://cloud.google.com/dataflow/docs/guides/streaming-modes). 2008 // 2009 // Possible values: 2010 // "STREAMING_MODE_UNSPECIFIED" - Run in the default mode. 2011 // "STREAMING_MODE_EXACTLY_ONCE" - In this mode, message deduplication is 2012 // performed against persistent state to make sure each message is processed 2013 // and committed to storage exactly once. 2014 // "STREAMING_MODE_AT_LEAST_ONCE" - Message deduplication is not performed. 2015 // Messages might be processed multiple times, and the results are applied 2016 // multiple times. Note: Setting this value also enables Streaming Engine and 2017 // Streaming Engine resource-based billing. 2018 StreamingMode string `json:"streamingMode,omitempty"` 2019 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. You can 2020 // specify a subnetwork using either a complete URL or an abbreviated path. 2021 // Expected to be of the form 2022 // "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGIO 2023 // N/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the 2024 // subnetwork is located in a Shared VPC network, you must use the complete 2025 // URL. 2026 Subnetwork string `json:"subnetwork,omitempty"` 2027 // TempLocation: The Cloud Storage path to use for temporary files. Must be a 2028 // valid Cloud Storage URL, beginning with `gs://`. 2029 TempLocation string `json:"tempLocation,omitempty"` 2030 // WorkerRegion: The Compute Engine region 2031 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which 2032 // worker processing should occur, e.g. "us-west1". Mutually exclusive with 2033 // worker_zone. If neither worker_region nor worker_zone is specified, default 2034 // to the control plane's region. 2035 WorkerRegion string `json:"workerRegion,omitempty"` 2036 // WorkerZone: The Compute Engine zone 2037 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which 2038 // worker processing should occur, e.g. "us-west1-a". Mutually exclusive with 2039 // worker_region. If neither worker_region nor worker_zone is specified, a zone 2040 // in the control plane's region is chosen based on available capacity. If both 2041 // `worker_zone` and `zone` are set, `worker_zone` takes precedence. 2042 WorkerZone string `json:"workerZone,omitempty"` 2043 // Zone: The Compute Engine availability zone 2044 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) for 2045 // launching worker instances to run your pipeline. In the future, worker_zone 2046 // will take precedence. 2047 Zone string `json:"zone,omitempty"` 2048 // ForceSendFields is a list of field names (e.g. "AdditionalExperiments") to 2049 // unconditionally include in API requests. By default, fields with empty or 2050 // default values are omitted from API requests. See 2051 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2052 // details. 2053 ForceSendFields []string `json:"-"` 2054 // NullFields is a list of field names (e.g. "AdditionalExperiments") to 2055 // include in API requests with the JSON null value. By default, fields with 2056 // empty values are omitted from API requests. See 2057 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2058 NullFields []string `json:"-"` 2059 } 2060 2061 func (s *FlexTemplateRuntimeEnvironment) MarshalJSON() ([]byte, error) { 2062 type NoMethod FlexTemplateRuntimeEnvironment 2063 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2064 } 2065 2066 // FloatingPointList: A metric value representing a list of floating point 2067 // numbers. 2068 type FloatingPointList struct { 2069 // Elements: Elements of the list. 2070 Elements []float64 `json:"elements,omitempty"` 2071 // ForceSendFields is a list of field names (e.g. "Elements") to 2072 // unconditionally include in API requests. By default, fields with empty or 2073 // default values are omitted from API requests. See 2074 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2075 // details. 2076 ForceSendFields []string `json:"-"` 2077 // NullFields is a list of field names (e.g. "Elements") to include in API 2078 // requests with the JSON null value. By default, fields with empty values are 2079 // omitted from API requests. See 2080 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2081 NullFields []string `json:"-"` 2082 } 2083 2084 func (s *FloatingPointList) MarshalJSON() ([]byte, error) { 2085 type NoMethod FloatingPointList 2086 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2087 } 2088 2089 func (s *FloatingPointList) UnmarshalJSON(data []byte) error { 2090 type NoMethod FloatingPointList 2091 var s1 struct { 2092 Elements []gensupport.JSONFloat64 `json:"elements"` 2093 *NoMethod 2094 } 2095 s1.NoMethod = (*NoMethod)(s) 2096 if err := json.Unmarshal(data, &s1); err != nil { 2097 return err 2098 } 2099 s.Elements = make([]float64, len(s1.Elements)) 2100 for i := range s1.Elements { 2101 s.Elements[i] = float64(s1.Elements[i]) 2102 } 2103 return nil 2104 } 2105 2106 // FloatingPointMean: A representation of a floating point mean metric 2107 // contribution. 2108 type FloatingPointMean struct { 2109 // Count: The number of values being aggregated. 2110 Count *SplitInt64 `json:"count,omitempty"` 2111 // Sum: The sum of all values being aggregated. 2112 Sum float64 `json:"sum,omitempty"` 2113 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally 2114 // include in API requests. By default, fields with empty or default values are 2115 // omitted from API requests. See 2116 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2117 // details. 2118 ForceSendFields []string `json:"-"` 2119 // NullFields is a list of field names (e.g. "Count") to include in API 2120 // requests with the JSON null value. By default, fields with empty values are 2121 // omitted from API requests. See 2122 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2123 NullFields []string `json:"-"` 2124 } 2125 2126 func (s *FloatingPointMean) MarshalJSON() ([]byte, error) { 2127 type NoMethod FloatingPointMean 2128 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2129 } 2130 2131 func (s *FloatingPointMean) UnmarshalJSON(data []byte) error { 2132 type NoMethod FloatingPointMean 2133 var s1 struct { 2134 Sum gensupport.JSONFloat64 `json:"sum"` 2135 *NoMethod 2136 } 2137 s1.NoMethod = (*NoMethod)(s) 2138 if err := json.Unmarshal(data, &s1); err != nil { 2139 return err 2140 } 2141 s.Sum = float64(s1.Sum) 2142 return nil 2143 } 2144 2145 // GetDebugConfigRequest: Request to get updated debug configuration for 2146 // component. 2147 type GetDebugConfigRequest struct { 2148 // ComponentId: The internal component id for which debug configuration is 2149 // requested. 2150 ComponentId string `json:"componentId,omitempty"` 2151 // Location: The [regional endpoint] 2152 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 2153 // contains the job specified by job_id. 2154 Location string `json:"location,omitempty"` 2155 // WorkerId: The worker id, i.e., VM hostname. 2156 WorkerId string `json:"workerId,omitempty"` 2157 // ForceSendFields is a list of field names (e.g. "ComponentId") to 2158 // unconditionally include in API requests. By default, fields with empty or 2159 // default values are omitted from API requests. See 2160 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2161 // details. 2162 ForceSendFields []string `json:"-"` 2163 // NullFields is a list of field names (e.g. "ComponentId") to include in API 2164 // requests with the JSON null value. By default, fields with empty values are 2165 // omitted from API requests. See 2166 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2167 NullFields []string `json:"-"` 2168 } 2169 2170 func (s *GetDebugConfigRequest) MarshalJSON() ([]byte, error) { 2171 type NoMethod GetDebugConfigRequest 2172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2173 } 2174 2175 // GetDebugConfigResponse: Response to a get debug configuration request. 2176 type GetDebugConfigResponse struct { 2177 // Config: The encoded debug configuration for the requested component. 2178 Config string `json:"config,omitempty"` 2179 2180 // ServerResponse contains the HTTP response code and headers from the server. 2181 googleapi.ServerResponse `json:"-"` 2182 // ForceSendFields is a list of field names (e.g. "Config") to unconditionally 2183 // include in API requests. By default, fields with empty or default values are 2184 // omitted from API requests. See 2185 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2186 // details. 2187 ForceSendFields []string `json:"-"` 2188 // NullFields is a list of field names (e.g. "Config") to include in API 2189 // requests with the JSON null value. By default, fields with empty values are 2190 // omitted from API requests. See 2191 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2192 NullFields []string `json:"-"` 2193 } 2194 2195 func (s *GetDebugConfigResponse) MarshalJSON() ([]byte, error) { 2196 type NoMethod GetDebugConfigResponse 2197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2198 } 2199 2200 // GetTemplateResponse: The response to a GetTemplate request. 2201 type GetTemplateResponse struct { 2202 // Metadata: The template metadata describing the template name, available 2203 // parameters, etc. 2204 Metadata *TemplateMetadata `json:"metadata,omitempty"` 2205 // RuntimeMetadata: Describes the runtime metadata with SDKInfo and available 2206 // parameters. 2207 RuntimeMetadata *RuntimeMetadata `json:"runtimeMetadata,omitempty"` 2208 // Status: The status of the get template request. Any problems with the 2209 // request will be indicated in the error_details. 2210 Status *Status `json:"status,omitempty"` 2211 // TemplateType: Template Type. 2212 // 2213 // Possible values: 2214 // "UNKNOWN" - Unknown Template Type. 2215 // "LEGACY" - Legacy Template. 2216 // "FLEX" - Flex Template. 2217 TemplateType string `json:"templateType,omitempty"` 2218 2219 // ServerResponse contains the HTTP response code and headers from the server. 2220 googleapi.ServerResponse `json:"-"` 2221 // ForceSendFields is a list of field names (e.g. "Metadata") to 2222 // unconditionally include in API requests. By default, fields with empty or 2223 // default values are omitted from API requests. See 2224 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2225 // details. 2226 ForceSendFields []string `json:"-"` 2227 // NullFields is a list of field names (e.g. "Metadata") to include in API 2228 // requests with the JSON null value. By default, fields with empty values are 2229 // omitted from API requests. See 2230 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2231 NullFields []string `json:"-"` 2232 } 2233 2234 func (s *GetTemplateResponse) MarshalJSON() ([]byte, error) { 2235 type NoMethod GetTemplateResponse 2236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2237 } 2238 2239 // Histogram: Histogram of value counts for a distribution. Buckets have an 2240 // inclusive lower bound and exclusive upper bound and use "1,2,5 bucketing": 2241 // The first bucket range is from [0,1) and all subsequent bucket boundaries 2242 // are powers of ten multiplied by 1, 2, or 5. Thus, bucket boundaries are 0, 2243 // 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, ... Negative values are not 2244 // supported. 2245 type Histogram struct { 2246 // BucketCounts: Counts of values in each bucket. For efficiency, prefix and 2247 // trailing buckets with count = 0 are elided. Buckets can store the full range 2248 // of values of an unsigned long, with ULLONG_MAX falling into the 59th bucket 2249 // with range [1e19, 2e19). 2250 BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` 2251 // FirstBucketOffset: Starting index of first stored bucket. The non-inclusive 2252 // upper-bound of the ith bucket is given by: pow(10,(i-first_bucket_offset)/3) 2253 // * (1,2,5)[(i-first_bucket_offset)%3] 2254 FirstBucketOffset int64 `json:"firstBucketOffset,omitempty"` 2255 // ForceSendFields is a list of field names (e.g. "BucketCounts") to 2256 // unconditionally include in API requests. By default, fields with empty or 2257 // default values are omitted from API requests. See 2258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2259 // details. 2260 ForceSendFields []string `json:"-"` 2261 // NullFields is a list of field names (e.g. "BucketCounts") to include in API 2262 // requests with the JSON null value. By default, fields with empty values are 2263 // omitted from API requests. See 2264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2265 NullFields []string `json:"-"` 2266 } 2267 2268 func (s *Histogram) MarshalJSON() ([]byte, error) { 2269 type NoMethod Histogram 2270 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2271 } 2272 2273 // HotKeyDebuggingInfo: Information useful for debugging a hot key detection. 2274 type HotKeyDebuggingInfo struct { 2275 // DetectedHotKeys: Debugging information for each detected hot key. Keyed by a 2276 // hash of the key. 2277 DetectedHotKeys map[string]HotKeyInfo `json:"detectedHotKeys,omitempty"` 2278 // ForceSendFields is a list of field names (e.g. "DetectedHotKeys") to 2279 // unconditionally include in API requests. By default, fields with empty or 2280 // default values are omitted from API requests. See 2281 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2282 // details. 2283 ForceSendFields []string `json:"-"` 2284 // NullFields is a list of field names (e.g. "DetectedHotKeys") to include in 2285 // API requests with the JSON null value. By default, fields with empty values 2286 // are omitted from API requests. See 2287 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2288 NullFields []string `json:"-"` 2289 } 2290 2291 func (s *HotKeyDebuggingInfo) MarshalJSON() ([]byte, error) { 2292 type NoMethod HotKeyDebuggingInfo 2293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2294 } 2295 2296 // HotKeyDetection: Proto describing a hot key detected on a given WorkItem. 2297 type HotKeyDetection struct { 2298 // HotKeyAge: The age of the hot key measured from when it was first detected. 2299 HotKeyAge string `json:"hotKeyAge,omitempty"` 2300 // SystemName: System-defined name of the step containing this hot key. Unique 2301 // across the workflow. 2302 SystemName string `json:"systemName,omitempty"` 2303 // UserStepName: User-provided name of the step that contains this hot key. 2304 UserStepName string `json:"userStepName,omitempty"` 2305 // ForceSendFields is a list of field names (e.g. "HotKeyAge") to 2306 // unconditionally include in API requests. By default, fields with empty or 2307 // default values are omitted from API requests. See 2308 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2309 // details. 2310 ForceSendFields []string `json:"-"` 2311 // NullFields is a list of field names (e.g. "HotKeyAge") to include in API 2312 // requests with the JSON null value. By default, fields with empty values are 2313 // omitted from API requests. See 2314 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2315 NullFields []string `json:"-"` 2316 } 2317 2318 func (s *HotKeyDetection) MarshalJSON() ([]byte, error) { 2319 type NoMethod HotKeyDetection 2320 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2321 } 2322 2323 // HotKeyInfo: Information about a hot key. 2324 type HotKeyInfo struct { 2325 // HotKeyAge: The age of the hot key measured from when it was first detected. 2326 HotKeyAge string `json:"hotKeyAge,omitempty"` 2327 // Key: A detected hot key that is causing limited parallelism. This field will 2328 // be populated only if the following flag is set to true: 2329 // "--enable_hot_key_logging". 2330 Key string `json:"key,omitempty"` 2331 // KeyTruncated: If true, then the above key is truncated and cannot be 2332 // deserialized. This occurs if the key above is populated and the key size is 2333 // >5MB. 2334 KeyTruncated bool `json:"keyTruncated,omitempty"` 2335 // ForceSendFields is a list of field names (e.g. "HotKeyAge") to 2336 // unconditionally include in API requests. By default, fields with empty or 2337 // default values are omitted from API requests. See 2338 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2339 // details. 2340 ForceSendFields []string `json:"-"` 2341 // NullFields is a list of field names (e.g. "HotKeyAge") to include in API 2342 // requests with the JSON null value. By default, fields with empty values are 2343 // omitted from API requests. See 2344 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2345 NullFields []string `json:"-"` 2346 } 2347 2348 func (s *HotKeyInfo) MarshalJSON() ([]byte, error) { 2349 type NoMethod HotKeyInfo 2350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2351 } 2352 2353 // InstructionInput: An input of an instruction, as a reference to an output of 2354 // a producer instruction. 2355 type InstructionInput struct { 2356 // OutputNum: The output index (origin zero) within the producer. 2357 OutputNum int64 `json:"outputNum,omitempty"` 2358 // ProducerInstructionIndex: The index (origin zero) of the parallel 2359 // instruction that produces the output to be consumed by this input. This 2360 // index is relative to the list of instructions in this input's instruction's 2361 // containing MapTask. 2362 ProducerInstructionIndex int64 `json:"producerInstructionIndex,omitempty"` 2363 // ForceSendFields is a list of field names (e.g. "OutputNum") to 2364 // unconditionally include in API requests. By default, fields with empty or 2365 // default values are omitted from API requests. See 2366 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2367 // details. 2368 ForceSendFields []string `json:"-"` 2369 // NullFields is a list of field names (e.g. "OutputNum") to include in API 2370 // requests with the JSON null value. By default, fields with empty values are 2371 // omitted from API requests. See 2372 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2373 NullFields []string `json:"-"` 2374 } 2375 2376 func (s *InstructionInput) MarshalJSON() ([]byte, error) { 2377 type NoMethod InstructionInput 2378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2379 } 2380 2381 // InstructionOutput: An output of an instruction. 2382 type InstructionOutput struct { 2383 // Codec: The codec to use to encode data being written via this output. 2384 Codec googleapi.RawMessage `json:"codec,omitempty"` 2385 // Name: The user-provided name of this output. 2386 Name string `json:"name,omitempty"` 2387 // OnlyCountKeyBytes: For system-generated byte and mean byte metrics, certain 2388 // instructions should only report the key size. 2389 OnlyCountKeyBytes bool `json:"onlyCountKeyBytes,omitempty"` 2390 // OnlyCountValueBytes: For system-generated byte and mean byte metrics, 2391 // certain instructions should only report the value size. 2392 OnlyCountValueBytes bool `json:"onlyCountValueBytes,omitempty"` 2393 // OriginalName: System-defined name for this output in the original workflow 2394 // graph. Outputs that do not contribute to an original instruction do not set 2395 // this. 2396 OriginalName string `json:"originalName,omitempty"` 2397 // SystemName: System-defined name of this output. Unique across the workflow. 2398 SystemName string `json:"systemName,omitempty"` 2399 // ForceSendFields is a list of field names (e.g. "Codec") to unconditionally 2400 // include in API requests. By default, fields with empty or default values are 2401 // omitted from API requests. See 2402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2403 // details. 2404 ForceSendFields []string `json:"-"` 2405 // NullFields is a list of field names (e.g. "Codec") to include in API 2406 // requests with the JSON null value. By default, fields with empty values are 2407 // omitted from API requests. See 2408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2409 NullFields []string `json:"-"` 2410 } 2411 2412 func (s *InstructionOutput) MarshalJSON() ([]byte, error) { 2413 type NoMethod InstructionOutput 2414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2415 } 2416 2417 // IntegerGauge: A metric value representing temporal values of a variable. 2418 type IntegerGauge struct { 2419 // Timestamp: The time at which this value was measured. Measured as msecs from 2420 // epoch. 2421 Timestamp string `json:"timestamp,omitempty"` 2422 // Value: The value of the variable represented by this gauge. 2423 Value *SplitInt64 `json:"value,omitempty"` 2424 // ForceSendFields is a list of field names (e.g. "Timestamp") to 2425 // unconditionally include in API requests. By default, fields with empty or 2426 // default values are omitted from API requests. See 2427 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2428 // details. 2429 ForceSendFields []string `json:"-"` 2430 // NullFields is a list of field names (e.g. "Timestamp") to include in API 2431 // requests with the JSON null value. By default, fields with empty values are 2432 // omitted from API requests. See 2433 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2434 NullFields []string `json:"-"` 2435 } 2436 2437 func (s *IntegerGauge) MarshalJSON() ([]byte, error) { 2438 type NoMethod IntegerGauge 2439 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2440 } 2441 2442 // IntegerList: A metric value representing a list of integers. 2443 type IntegerList struct { 2444 // Elements: Elements of the list. 2445 Elements []*SplitInt64 `json:"elements,omitempty"` 2446 // ForceSendFields is a list of field names (e.g. "Elements") to 2447 // unconditionally include in API requests. By default, fields with empty or 2448 // default values are omitted from API requests. See 2449 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2450 // details. 2451 ForceSendFields []string `json:"-"` 2452 // NullFields is a list of field names (e.g. "Elements") to include in API 2453 // requests with the JSON null value. By default, fields with empty values are 2454 // omitted from API requests. See 2455 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2456 NullFields []string `json:"-"` 2457 } 2458 2459 func (s *IntegerList) MarshalJSON() ([]byte, error) { 2460 type NoMethod IntegerList 2461 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2462 } 2463 2464 // IntegerMean: A representation of an integer mean metric contribution. 2465 type IntegerMean struct { 2466 // Count: The number of values being aggregated. 2467 Count *SplitInt64 `json:"count,omitempty"` 2468 // Sum: The sum of all values being aggregated. 2469 Sum *SplitInt64 `json:"sum,omitempty"` 2470 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally 2471 // include in API requests. By default, fields with empty or default values are 2472 // omitted from API requests. See 2473 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2474 // details. 2475 ForceSendFields []string `json:"-"` 2476 // NullFields is a list of field names (e.g. "Count") to include in API 2477 // requests with the JSON null value. By default, fields with empty values are 2478 // omitted from API requests. See 2479 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2480 NullFields []string `json:"-"` 2481 } 2482 2483 func (s *IntegerMean) MarshalJSON() ([]byte, error) { 2484 type NoMethod IntegerMean 2485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2486 } 2487 2488 // Job: Defines a job to be run by the Cloud Dataflow service. Do not enter 2489 // confidential information when you supply string values using the API. 2490 type Job struct { 2491 // ClientRequestId: The client's unique identifier of the job, re-used across 2492 // retried attempts. If this field is set, the service will ensure its 2493 // uniqueness. The request to create a job will fail if the service has 2494 // knowledge of a previously submitted job with the same client's ID and job 2495 // name. The caller may use this field to ensure idempotence of job creation 2496 // across retried attempts to create a job. By default, the field is empty and, 2497 // in that case, the service ignores it. 2498 ClientRequestId string `json:"clientRequestId,omitempty"` 2499 // CreateTime: The timestamp when the job was initially created. Immutable and 2500 // set by the Cloud Dataflow service. 2501 CreateTime string `json:"createTime,omitempty"` 2502 // CreatedFromSnapshotId: If this is specified, the job's initial state is 2503 // populated from the given snapshot. 2504 CreatedFromSnapshotId string `json:"createdFromSnapshotId,omitempty"` 2505 // CurrentState: The current state of the job. Jobs are created in the 2506 // `JOB_STATE_STOPPED` state unless otherwise specified. A job in the 2507 // `JOB_STATE_RUNNING` state may asynchronously enter a terminal state. After a 2508 // job has reached a terminal state, no further state updates may be made. This 2509 // field might be mutated by the Dataflow service; callers cannot mutate it. 2510 // 2511 // Possible values: 2512 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 2513 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job has not 2514 // yet started to run. 2515 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 2516 // currently running. 2517 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 2518 // successfully completed. This is a terminal job state. This state may be set 2519 // by the Cloud Dataflow service, as a transition from `JOB_STATE_RUNNING`. It 2520 // may also be set via a Cloud Dataflow `UpdateJob` call, if the job has not 2521 // yet reached a terminal state. 2522 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has failed. 2523 // This is a terminal job state. This state may only be set by the Cloud 2524 // Dataflow service, and only as a transition from `JOB_STATE_RUNNING`. 2525 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the job has 2526 // been explicitly cancelled. This is a terminal job state. This state may only 2527 // be set via a Cloud Dataflow `UpdateJob` call, and only if the job has not 2528 // yet reached another terminal state. 2529 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job was 2530 // successfully updated, meaning that this job was stopped and another job was 2531 // started, inheriting state from this one. This is a terminal job state. This 2532 // state may only be set by the Cloud Dataflow service, and only as a 2533 // transition from `JOB_STATE_RUNNING`. 2534 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job is in 2535 // the process of draining. A draining job has stopped pulling from its input 2536 // sources and is processing any data that remains in-flight. This state may be 2537 // set via a Cloud Dataflow `UpdateJob` call, but only as a transition from 2538 // `JOB_STATE_RUNNING`. Jobs that are draining may only transition to 2539 // `JOB_STATE_DRAINED`, `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 2540 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job has been 2541 // drained. A drained job terminated by stopping pulling from its input sources 2542 // and processing any data that remained in-flight when draining was requested. 2543 // This state is a terminal state, may only be set by the Cloud Dataflow 2544 // service, and only as a transition from `JOB_STATE_DRAINING`. 2545 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job has been 2546 // created but is not yet running. Jobs that are pending may only transition to 2547 // `JOB_STATE_RUNNING`, or `JOB_STATE_FAILED`. 2548 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the job has 2549 // been explicitly cancelled and is in the process of stopping. Jobs that are 2550 // cancelling may only transition to `JOB_STATE_CANCELLED` or 2551 // `JOB_STATE_FAILED`. 2552 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has been 2553 // created but is being delayed until launch. Jobs that are queued may only 2554 // transition to `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 2555 // "JOB_STATE_RESOURCE_CLEANING_UP" - `JOB_STATE_RESOURCE_CLEANING_UP` 2556 // indicates that the batch job's associated resources are currently being 2557 // cleaned up after a successful run. Currently, this is an opt-in feature, 2558 // please reach out to Cloud support team if you are interested. 2559 CurrentState string `json:"currentState,omitempty"` 2560 // CurrentStateTime: The timestamp associated with the current state. 2561 CurrentStateTime string `json:"currentStateTime,omitempty"` 2562 // Environment: Optional. The environment for the job. 2563 Environment *Environment `json:"environment,omitempty"` 2564 // ExecutionInfo: Deprecated. 2565 ExecutionInfo *JobExecutionInfo `json:"executionInfo,omitempty"` 2566 // Id: The unique ID of this job. This field is set by the Dataflow service 2567 // when the job is created, and is immutable for the life of the job. 2568 Id string `json:"id,omitempty"` 2569 // JobMetadata: This field is populated by the Dataflow service to support 2570 // filtering jobs by the metadata values provided here. Populated for ListJobs 2571 // and all GetJob views SUMMARY and higher. 2572 JobMetadata *JobMetadata `json:"jobMetadata,omitempty"` 2573 // Labels: User-defined labels for this job. The labels map can contain no more 2574 // than 64 entries. Entries of the labels map are UTF8 strings that comply with 2575 // the following restrictions: * Keys must conform to regexp: 2576 // \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: 2577 // [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally 2578 // constrained to be <= 128 bytes in size. 2579 Labels map[string]string `json:"labels,omitempty"` 2580 // Location: The [regional endpoint] 2581 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 2582 // contains this job. 2583 Location string `json:"location,omitempty"` 2584 // Name: Optional. The user-specified Dataflow job name. Only one active job 2585 // with a given name can exist in a project within one region at any given 2586 // time. Jobs in different regions can have the same name. If a caller attempts 2587 // to create a job with the same name as an active job that already exists, the 2588 // attempt returns the existing job. The name must match the regular expression 2589 // `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?` 2590 Name string `json:"name,omitempty"` 2591 // PipelineDescription: Preliminary field: The format of this data may change 2592 // at any time. A description of the user pipeline and stages through which it 2593 // is executed. Created by Cloud Dataflow service. Only retrieved with 2594 // JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL. 2595 PipelineDescription *PipelineDescription `json:"pipelineDescription,omitempty"` 2596 // ProjectId: The ID of the Google Cloud project that the job belongs to. 2597 ProjectId string `json:"projectId,omitempty"` 2598 // ReplaceJobId: If this job is an update of an existing job, this field is the 2599 // job ID of the job it replaced. When sending a `CreateJobRequest`, you can 2600 // update a job by specifying it here. The job named here is stopped, and its 2601 // intermediate state is transferred to this job. 2602 ReplaceJobId string `json:"replaceJobId,omitempty"` 2603 // ReplacedByJobId: If another job is an update of this job (and thus, this job 2604 // is in `JOB_STATE_UPDATED`), this field contains the ID of that job. 2605 ReplacedByJobId string `json:"replacedByJobId,omitempty"` 2606 // RequestedState: The job's requested state. Applies to `UpdateJob` requests. 2607 // Set `requested_state` with `UpdateJob` requests to switch between the states 2608 // `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use `UpdateJob` 2609 // requests to change a job's state from `JOB_STATE_RUNNING` to 2610 // `JOB_STATE_CANCELLED`, `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These 2611 // states irrevocably terminate the job if it hasn't already reached a terminal 2612 // state. This field has no effect on `CreateJob` requests. 2613 // 2614 // Possible values: 2615 // "JOB_STATE_UNKNOWN" - The job's run state isn't specified. 2616 // "JOB_STATE_STOPPED" - `JOB_STATE_STOPPED` indicates that the job has not 2617 // yet started to run. 2618 // "JOB_STATE_RUNNING" - `JOB_STATE_RUNNING` indicates that the job is 2619 // currently running. 2620 // "JOB_STATE_DONE" - `JOB_STATE_DONE` indicates that the job has 2621 // successfully completed. This is a terminal job state. This state may be set 2622 // by the Cloud Dataflow service, as a transition from `JOB_STATE_RUNNING`. It 2623 // may also be set via a Cloud Dataflow `UpdateJob` call, if the job has not 2624 // yet reached a terminal state. 2625 // "JOB_STATE_FAILED" - `JOB_STATE_FAILED` indicates that the job has failed. 2626 // This is a terminal job state. This state may only be set by the Cloud 2627 // Dataflow service, and only as a transition from `JOB_STATE_RUNNING`. 2628 // "JOB_STATE_CANCELLED" - `JOB_STATE_CANCELLED` indicates that the job has 2629 // been explicitly cancelled. This is a terminal job state. This state may only 2630 // be set via a Cloud Dataflow `UpdateJob` call, and only if the job has not 2631 // yet reached another terminal state. 2632 // "JOB_STATE_UPDATED" - `JOB_STATE_UPDATED` indicates that the job was 2633 // successfully updated, meaning that this job was stopped and another job was 2634 // started, inheriting state from this one. This is a terminal job state. This 2635 // state may only be set by the Cloud Dataflow service, and only as a 2636 // transition from `JOB_STATE_RUNNING`. 2637 // "JOB_STATE_DRAINING" - `JOB_STATE_DRAINING` indicates that the job is in 2638 // the process of draining. A draining job has stopped pulling from its input 2639 // sources and is processing any data that remains in-flight. This state may be 2640 // set via a Cloud Dataflow `UpdateJob` call, but only as a transition from 2641 // `JOB_STATE_RUNNING`. Jobs that are draining may only transition to 2642 // `JOB_STATE_DRAINED`, `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. 2643 // "JOB_STATE_DRAINED" - `JOB_STATE_DRAINED` indicates that the job has been 2644 // drained. A drained job terminated by stopping pulling from its input sources 2645 // and processing any data that remained in-flight when draining was requested. 2646 // This state is a terminal state, may only be set by the Cloud Dataflow 2647 // service, and only as a transition from `JOB_STATE_DRAINING`. 2648 // "JOB_STATE_PENDING" - `JOB_STATE_PENDING` indicates that the job has been 2649 // created but is not yet running. Jobs that are pending may only transition to 2650 // `JOB_STATE_RUNNING`, or `JOB_STATE_FAILED`. 2651 // "JOB_STATE_CANCELLING" - `JOB_STATE_CANCELLING` indicates that the job has 2652 // been explicitly cancelled and is in the process of stopping. Jobs that are 2653 // cancelling may only transition to `JOB_STATE_CANCELLED` or 2654 // `JOB_STATE_FAILED`. 2655 // "JOB_STATE_QUEUED" - `JOB_STATE_QUEUED` indicates that the job has been 2656 // created but is being delayed until launch. Jobs that are queued may only 2657 // transition to `JOB_STATE_PENDING` or `JOB_STATE_CANCELLED`. 2658 // "JOB_STATE_RESOURCE_CLEANING_UP" - `JOB_STATE_RESOURCE_CLEANING_UP` 2659 // indicates that the batch job's associated resources are currently being 2660 // cleaned up after a successful run. Currently, this is an opt-in feature, 2661 // please reach out to Cloud support team if you are interested. 2662 RequestedState string `json:"requestedState,omitempty"` 2663 // RuntimeUpdatableParams: This field may ONLY be modified at runtime using the 2664 // projects.jobs.update method to adjust job behavior. This field has no effect 2665 // when specified at job creation. 2666 RuntimeUpdatableParams *RuntimeUpdatableParams `json:"runtimeUpdatableParams,omitempty"` 2667 // SatisfiesPzi: Output only. Reserved for future use. This field is set only 2668 // in responses from the server; it is ignored if it is set in any requests. 2669 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` 2670 // SatisfiesPzs: Reserved for future use. This field is set only in responses 2671 // from the server; it is ignored if it is set in any requests. 2672 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` 2673 // StageStates: This field may be mutated by the Cloud Dataflow service; 2674 // callers cannot mutate it. 2675 StageStates []*ExecutionStageState `json:"stageStates,omitempty"` 2676 // StartTime: The timestamp when the job was started (transitioned to 2677 // JOB_STATE_PENDING). Flexible resource scheduling jobs are started with some 2678 // delay after job creation, so start_time is unset before start and is updated 2679 // when the job is started by the Cloud Dataflow service. For other jobs, 2680 // start_time always equals to create_time and is immutable and set by the 2681 // Cloud Dataflow service. 2682 StartTime string `json:"startTime,omitempty"` 2683 // Steps: Exactly one of step or steps_location should be specified. The 2684 // top-level steps that constitute the entire job. Only retrieved with 2685 // JOB_VIEW_ALL. 2686 Steps []*Step `json:"steps,omitempty"` 2687 // StepsLocation: The Cloud Storage location where the steps are stored. 2688 StepsLocation string `json:"stepsLocation,omitempty"` 2689 // TempFiles: A set of files the system should be aware of that are used for 2690 // temporary storage. These temporary files will be removed on job completion. 2691 // No duplicates are allowed. No file patterns are supported. The supported 2692 // files are: Google Cloud Storage: storage.googleapis.com/{bucket}/{object} 2693 // bucket.storage.googleapis.com/{object} 2694 TempFiles []string `json:"tempFiles,omitempty"` 2695 // TransformNameMapping: The map of transform name prefixes of the job to be 2696 // replaced to the corresponding name prefixes of the new job. 2697 TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"` 2698 // Type: Optional. The type of Dataflow job. 2699 // 2700 // Possible values: 2701 // "JOB_TYPE_UNKNOWN" - The type of the job is unspecified, or unknown. 2702 // "JOB_TYPE_BATCH" - A batch job with a well-defined end point: data is 2703 // read, data is processed, data is written, and the job is done. 2704 // "JOB_TYPE_STREAMING" - A continuously streaming job with no end: data is 2705 // read, processed, and written continuously. 2706 Type string `json:"type,omitempty"` 2707 2708 // ServerResponse contains the HTTP response code and headers from the server. 2709 googleapi.ServerResponse `json:"-"` 2710 // ForceSendFields is a list of field names (e.g. "ClientRequestId") to 2711 // unconditionally include in API requests. By default, fields with empty or 2712 // default values are omitted from API requests. See 2713 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2714 // details. 2715 ForceSendFields []string `json:"-"` 2716 // NullFields is a list of field names (e.g. "ClientRequestId") to include in 2717 // API requests with the JSON null value. By default, fields with empty values 2718 // are omitted from API requests. See 2719 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2720 NullFields []string `json:"-"` 2721 } 2722 2723 func (s *Job) MarshalJSON() ([]byte, error) { 2724 type NoMethod Job 2725 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2726 } 2727 2728 // JobExecutionDetails: Information about the execution of a job. 2729 type JobExecutionDetails struct { 2730 // NextPageToken: If present, this response does not contain all requested 2731 // tasks. To obtain the next page of results, repeat the request with 2732 // page_token set to this value. 2733 NextPageToken string `json:"nextPageToken,omitempty"` 2734 // Stages: The stages of the job execution. 2735 Stages []*StageSummary `json:"stages,omitempty"` 2736 2737 // ServerResponse contains the HTTP response code and headers from the server. 2738 googleapi.ServerResponse `json:"-"` 2739 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2740 // unconditionally include in API requests. By default, fields with empty or 2741 // default values are omitted from API requests. See 2742 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2743 // details. 2744 ForceSendFields []string `json:"-"` 2745 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2746 // requests with the JSON null value. By default, fields with empty values are 2747 // omitted from API requests. See 2748 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2749 NullFields []string `json:"-"` 2750 } 2751 2752 func (s *JobExecutionDetails) MarshalJSON() ([]byte, error) { 2753 type NoMethod JobExecutionDetails 2754 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2755 } 2756 2757 // JobExecutionInfo: Additional information about how a Cloud Dataflow job will 2758 // be executed that isn't contained in the submitted job. 2759 type JobExecutionInfo struct { 2760 // Stages: A mapping from each stage to the information about that stage. 2761 Stages map[string]JobExecutionStageInfo `json:"stages,omitempty"` 2762 // ForceSendFields is a list of field names (e.g. "Stages") to unconditionally 2763 // include in API requests. By default, fields with empty or default values are 2764 // omitted from API requests. See 2765 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2766 // details. 2767 ForceSendFields []string `json:"-"` 2768 // NullFields is a list of field names (e.g. "Stages") to include in API 2769 // requests with the JSON null value. By default, fields with empty values are 2770 // omitted from API requests. See 2771 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2772 NullFields []string `json:"-"` 2773 } 2774 2775 func (s *JobExecutionInfo) MarshalJSON() ([]byte, error) { 2776 type NoMethod JobExecutionInfo 2777 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2778 } 2779 2780 // JobExecutionStageInfo: Contains information about how a particular 2781 // google.dataflow.v1beta3.Step will be executed. 2782 type JobExecutionStageInfo struct { 2783 // StepName: The steps associated with the execution stage. Note that stages 2784 // may have several steps, and that a given step might be run by more than one 2785 // stage. 2786 StepName []string `json:"stepName,omitempty"` 2787 // ForceSendFields is a list of field names (e.g. "StepName") to 2788 // unconditionally include in API requests. By default, fields with empty or 2789 // default values are omitted from API requests. See 2790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2791 // details. 2792 ForceSendFields []string `json:"-"` 2793 // NullFields is a list of field names (e.g. "StepName") to include in API 2794 // requests with the JSON null value. By default, fields with empty values are 2795 // omitted from API requests. See 2796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2797 NullFields []string `json:"-"` 2798 } 2799 2800 func (s *JobExecutionStageInfo) MarshalJSON() ([]byte, error) { 2801 type NoMethod JobExecutionStageInfo 2802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2803 } 2804 2805 // JobMessage: A particular message pertaining to a Dataflow job. 2806 type JobMessage struct { 2807 // Id: Deprecated. 2808 Id string `json:"id,omitempty"` 2809 // MessageImportance: Importance level of the message. 2810 // 2811 // Possible values: 2812 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't specified, 2813 // or is unknown. 2814 // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: typically only 2815 // useful for software engineers working on the code the job is running. 2816 // Typically, Dataflow pipeline runners do not display log messages at this 2817 // level by default. 2818 // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: somewhat 2819 // verbose, but potentially useful to users. Typically, Dataflow pipeline 2820 // runners do not display log messages at this level by default. These messages 2821 // are displayed by default in the Dataflow monitoring UI. 2822 // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful for 2823 // keeping track of the execution of a Dataflow pipeline. Typically, Dataflow 2824 // pipeline runners display log messages at this level by default, and these 2825 // messages are displayed by default in the Dataflow monitoring UI. 2826 // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: indicating 2827 // a condition pertaining to a job which may require human intervention. 2828 // Typically, Dataflow pipeline runners display log messages at this level by 2829 // default, and these messages are displayed by default in the Dataflow 2830 // monitoring UI. 2831 // "JOB_MESSAGE_ERROR" - The message is at the 'error' level: indicating a 2832 // condition preventing a job from succeeding. Typically, Dataflow pipeline 2833 // runners display log messages at this level by default, and these messages 2834 // are displayed by default in the Dataflow monitoring UI. 2835 MessageImportance string `json:"messageImportance,omitempty"` 2836 // MessageText: The text of the message. 2837 MessageText string `json:"messageText,omitempty"` 2838 // Time: The timestamp of the message. 2839 Time string `json:"time,omitempty"` 2840 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 2841 // include in API requests. By default, fields with empty or default values are 2842 // omitted from API requests. See 2843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2844 // details. 2845 ForceSendFields []string `json:"-"` 2846 // NullFields is a list of field names (e.g. "Id") to include in API requests 2847 // with the JSON null value. By default, fields with empty values are omitted 2848 // from API requests. See 2849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2850 NullFields []string `json:"-"` 2851 } 2852 2853 func (s *JobMessage) MarshalJSON() ([]byte, error) { 2854 type NoMethod JobMessage 2855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2856 } 2857 2858 // JobMetadata: Metadata available primarily for filtering jobs. Will be 2859 // included in the ListJob response and Job SUMMARY view. 2860 type JobMetadata struct { 2861 // BigTableDetails: Identification of a Cloud Bigtable source used in the 2862 // Dataflow job. 2863 BigTableDetails []*BigTableIODetails `json:"bigTableDetails,omitempty"` 2864 // BigqueryDetails: Identification of a BigQuery source used in the Dataflow 2865 // job. 2866 BigqueryDetails []*BigQueryIODetails `json:"bigqueryDetails,omitempty"` 2867 // DatastoreDetails: Identification of a Datastore source used in the Dataflow 2868 // job. 2869 DatastoreDetails []*DatastoreIODetails `json:"datastoreDetails,omitempty"` 2870 // FileDetails: Identification of a File source used in the Dataflow job. 2871 FileDetails []*FileIODetails `json:"fileDetails,omitempty"` 2872 // PubsubDetails: Identification of a Pub/Sub source used in the Dataflow job. 2873 PubsubDetails []*PubSubIODetails `json:"pubsubDetails,omitempty"` 2874 // SdkVersion: The SDK version used to run the job. 2875 SdkVersion *SdkVersion `json:"sdkVersion,omitempty"` 2876 // SpannerDetails: Identification of a Spanner source used in the Dataflow job. 2877 SpannerDetails []*SpannerIODetails `json:"spannerDetails,omitempty"` 2878 // UserDisplayProperties: List of display properties to help UI filter jobs. 2879 UserDisplayProperties map[string]string `json:"userDisplayProperties,omitempty"` 2880 // ForceSendFields is a list of field names (e.g. "BigTableDetails") to 2881 // unconditionally include in API requests. By default, fields with empty or 2882 // default values are omitted from API requests. See 2883 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2884 // details. 2885 ForceSendFields []string `json:"-"` 2886 // NullFields is a list of field names (e.g. "BigTableDetails") to include in 2887 // API requests with the JSON null value. By default, fields with empty values 2888 // are omitted from API requests. See 2889 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2890 NullFields []string `json:"-"` 2891 } 2892 2893 func (s *JobMetadata) MarshalJSON() ([]byte, error) { 2894 type NoMethod JobMetadata 2895 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2896 } 2897 2898 // JobMetrics: JobMetrics contains a collection of metrics describing the 2899 // detailed progress of a Dataflow job. Metrics correspond to user-defined and 2900 // system-defined metrics in the job. For more information, see [Dataflow job 2901 // metrics] 2902 // (https://cloud.google.com/dataflow/docs/guides/using-monitoring-intf). This 2903 // resource captures only the most recent values of each metric; time-series 2904 // data can be queried for them (under the same metric names) from Cloud 2905 // Monitoring. 2906 type JobMetrics struct { 2907 // MetricTime: Timestamp as of which metric values are current. 2908 MetricTime string `json:"metricTime,omitempty"` 2909 // Metrics: All metrics for this job. 2910 Metrics []*MetricUpdate `json:"metrics,omitempty"` 2911 2912 // ServerResponse contains the HTTP response code and headers from the server. 2913 googleapi.ServerResponse `json:"-"` 2914 // ForceSendFields is a list of field names (e.g. "MetricTime") to 2915 // unconditionally include in API requests. By default, fields with empty or 2916 // default values are omitted from API requests. See 2917 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2918 // details. 2919 ForceSendFields []string `json:"-"` 2920 // NullFields is a list of field names (e.g. "MetricTime") to include in API 2921 // requests with the JSON null value. By default, fields with empty values are 2922 // omitted from API requests. See 2923 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2924 NullFields []string `json:"-"` 2925 } 2926 2927 func (s *JobMetrics) MarshalJSON() ([]byte, error) { 2928 type NoMethod JobMetrics 2929 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2930 } 2931 2932 // KeyRangeDataDiskAssignment: Data disk assignment information for a specific 2933 // key-range of a sharded computation. Currently we only support UTF-8 2934 // character splits to simplify encoding into JSON. 2935 type KeyRangeDataDiskAssignment struct { 2936 // DataDisk: The name of the data disk where data for this range is stored. 2937 // This name is local to the Google Cloud Platform project and uniquely 2938 // identifies the disk within that project, for example 2939 // "myproject-1014-104817-4c2-harness-0-disk-1". 2940 DataDisk string `json:"dataDisk,omitempty"` 2941 // End: The end (exclusive) of the key range. 2942 End string `json:"end,omitempty"` 2943 // Start: The start (inclusive) of the key range. 2944 Start string `json:"start,omitempty"` 2945 // ForceSendFields is a list of field names (e.g. "DataDisk") to 2946 // unconditionally include in API requests. By default, fields with empty or 2947 // default values are omitted from API requests. See 2948 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2949 // details. 2950 ForceSendFields []string `json:"-"` 2951 // NullFields is a list of field names (e.g. "DataDisk") to include in API 2952 // requests with the JSON null value. By default, fields with empty values are 2953 // omitted from API requests. See 2954 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2955 NullFields []string `json:"-"` 2956 } 2957 2958 func (s *KeyRangeDataDiskAssignment) MarshalJSON() ([]byte, error) { 2959 type NoMethod KeyRangeDataDiskAssignment 2960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2961 } 2962 2963 // KeyRangeLocation: Location information for a specific key-range of a sharded 2964 // computation. Currently we only support UTF-8 character splits to simplify 2965 // encoding into JSON. 2966 type KeyRangeLocation struct { 2967 // DataDisk: The name of the data disk where data for this range is stored. 2968 // This name is local to the Google Cloud Platform project and uniquely 2969 // identifies the disk within that project, for example 2970 // "myproject-1014-104817-4c2-harness-0-disk-1". 2971 DataDisk string `json:"dataDisk,omitempty"` 2972 // DeliveryEndpoint: The physical location of this range assignment to be used 2973 // for streaming computation cross-worker message delivery. 2974 DeliveryEndpoint string `json:"deliveryEndpoint,omitempty"` 2975 // DeprecatedPersistentDirectory: DEPRECATED. The location of the persistent 2976 // state for this range, as a persistent directory in the worker local 2977 // filesystem. 2978 DeprecatedPersistentDirectory string `json:"deprecatedPersistentDirectory,omitempty"` 2979 // End: The end (exclusive) of the key range. 2980 End string `json:"end,omitempty"` 2981 // Start: The start (inclusive) of the key range. 2982 Start string `json:"start,omitempty"` 2983 // ForceSendFields is a list of field names (e.g. "DataDisk") to 2984 // unconditionally include in API requests. By default, fields with empty or 2985 // default values are omitted from API requests. See 2986 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2987 // details. 2988 ForceSendFields []string `json:"-"` 2989 // NullFields is a list of field names (e.g. "DataDisk") to include in API 2990 // requests with the JSON null value. By default, fields with empty values are 2991 // omitted from API requests. See 2992 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2993 NullFields []string `json:"-"` 2994 } 2995 2996 func (s *KeyRangeLocation) MarshalJSON() ([]byte, error) { 2997 type NoMethod KeyRangeLocation 2998 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2999 } 3000 3001 // LaunchFlexTemplateParameter: Launch FlexTemplate Parameter. 3002 type LaunchFlexTemplateParameter struct { 3003 // ContainerSpec: Spec about the container image to launch. 3004 ContainerSpec *ContainerSpec `json:"containerSpec,omitempty"` 3005 // ContainerSpecGcsPath: Cloud Storage path to a file with json serialized 3006 // ContainerSpec as content. 3007 ContainerSpecGcsPath string `json:"containerSpecGcsPath,omitempty"` 3008 // Environment: The runtime environment for the FlexTemplate job 3009 Environment *FlexTemplateRuntimeEnvironment `json:"environment,omitempty"` 3010 // JobName: Required. The job name to use for the created job. For update job 3011 // request, job name should be same as the existing running job. 3012 JobName string `json:"jobName,omitempty"` 3013 // LaunchOptions: Launch options for this flex template job. This is a common 3014 // set of options across languages and templates. This should not be used to 3015 // pass job parameters. 3016 LaunchOptions map[string]string `json:"launchOptions,omitempty"` 3017 // Parameters: The parameters for FlexTemplate. Ex. {"num_workers":"5"} 3018 Parameters map[string]string `json:"parameters,omitempty"` 3019 // TransformNameMappings: Use this to pass transform_name_mappings for 3020 // streaming update jobs. Ex:{"oldTransformName":"newTransformName",...}' 3021 TransformNameMappings map[string]string `json:"transformNameMappings,omitempty"` 3022 // Update: Set this to true if you are sending a request to update a running 3023 // streaming job. When set, the job name should be the same as the running job. 3024 Update bool `json:"update,omitempty"` 3025 // ForceSendFields is a list of field names (e.g. "ContainerSpec") to 3026 // unconditionally include in API requests. By default, fields with empty or 3027 // default values are omitted from API requests. See 3028 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3029 // details. 3030 ForceSendFields []string `json:"-"` 3031 // NullFields is a list of field names (e.g. "ContainerSpec") to include in API 3032 // requests with the JSON null value. By default, fields with empty values are 3033 // omitted from API requests. See 3034 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3035 NullFields []string `json:"-"` 3036 } 3037 3038 func (s *LaunchFlexTemplateParameter) MarshalJSON() ([]byte, error) { 3039 type NoMethod LaunchFlexTemplateParameter 3040 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3041 } 3042 3043 // LaunchFlexTemplateRequest: A request to launch a Cloud Dataflow job from a 3044 // FlexTemplate. 3045 type LaunchFlexTemplateRequest struct { 3046 // LaunchParameter: Required. Parameter to launch a job form Flex Template. 3047 LaunchParameter *LaunchFlexTemplateParameter `json:"launchParameter,omitempty"` 3048 // ValidateOnly: If true, the request is validated but not actually executed. 3049 // Defaults to false. 3050 ValidateOnly bool `json:"validateOnly,omitempty"` 3051 // ForceSendFields is a list of field names (e.g. "LaunchParameter") to 3052 // unconditionally include in API requests. By default, fields with empty or 3053 // default values are omitted from API requests. See 3054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3055 // details. 3056 ForceSendFields []string `json:"-"` 3057 // NullFields is a list of field names (e.g. "LaunchParameter") to include in 3058 // API requests with the JSON null value. By default, fields with empty values 3059 // are omitted from API requests. See 3060 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3061 NullFields []string `json:"-"` 3062 } 3063 3064 func (s *LaunchFlexTemplateRequest) MarshalJSON() ([]byte, error) { 3065 type NoMethod LaunchFlexTemplateRequest 3066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3067 } 3068 3069 // LaunchFlexTemplateResponse: Response to the request to launch a job from 3070 // Flex Template. 3071 type LaunchFlexTemplateResponse struct { 3072 // Job: The job that was launched, if the request was not a dry run and the job 3073 // was successfully launched. 3074 Job *Job `json:"job,omitempty"` 3075 3076 // ServerResponse contains the HTTP response code and headers from the server. 3077 googleapi.ServerResponse `json:"-"` 3078 // ForceSendFields is a list of field names (e.g. "Job") to unconditionally 3079 // include in API requests. By default, fields with empty or default values are 3080 // omitted from API requests. See 3081 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3082 // details. 3083 ForceSendFields []string `json:"-"` 3084 // NullFields is a list of field names (e.g. "Job") to include in API requests 3085 // with the JSON null value. By default, fields with empty values are omitted 3086 // from API requests. See 3087 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3088 NullFields []string `json:"-"` 3089 } 3090 3091 func (s *LaunchFlexTemplateResponse) MarshalJSON() ([]byte, error) { 3092 type NoMethod LaunchFlexTemplateResponse 3093 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3094 } 3095 3096 // LaunchTemplateParameters: Parameters to provide to the template being 3097 // launched. Note that the [metadata in the pipeline code] 3098 // (https://cloud.google.com/dataflow/docs/guides/templates/creating-templates#metadata) 3099 // determines which runtime parameters are valid. 3100 type LaunchTemplateParameters struct { 3101 // Environment: The runtime environment for the job. 3102 Environment *RuntimeEnvironment `json:"environment,omitempty"` 3103 // JobName: Required. The job name to use for the created job. The name must 3104 // match the regular expression `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?` 3105 JobName string `json:"jobName,omitempty"` 3106 // Parameters: The runtime parameters to pass to the job. 3107 Parameters map[string]string `json:"parameters,omitempty"` 3108 // TransformNameMapping: Only applicable when updating a pipeline. Map of 3109 // transform name prefixes of the job to be replaced to the corresponding name 3110 // prefixes of the new job. 3111 TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"` 3112 // Update: If set, replace the existing pipeline with the name specified by 3113 // jobName with this pipeline, preserving state. 3114 Update bool `json:"update,omitempty"` 3115 // ForceSendFields is a list of field names (e.g. "Environment") to 3116 // unconditionally include in API requests. By default, fields with empty or 3117 // default values are omitted from API requests. See 3118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3119 // details. 3120 ForceSendFields []string `json:"-"` 3121 // NullFields is a list of field names (e.g. "Environment") to include in API 3122 // requests with the JSON null value. By default, fields with empty values are 3123 // omitted from API requests. See 3124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3125 NullFields []string `json:"-"` 3126 } 3127 3128 func (s *LaunchTemplateParameters) MarshalJSON() ([]byte, error) { 3129 type NoMethod LaunchTemplateParameters 3130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3131 } 3132 3133 // LaunchTemplateResponse: Response to the request to launch a template. 3134 type LaunchTemplateResponse struct { 3135 // Job: The job that was launched, if the request was not a dry run and the job 3136 // was successfully launched. 3137 Job *Job `json:"job,omitempty"` 3138 3139 // ServerResponse contains the HTTP response code and headers from the server. 3140 googleapi.ServerResponse `json:"-"` 3141 // ForceSendFields is a list of field names (e.g. "Job") to unconditionally 3142 // include in API requests. By default, fields with empty or default values are 3143 // omitted from API requests. See 3144 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3145 // details. 3146 ForceSendFields []string `json:"-"` 3147 // NullFields is a list of field names (e.g. "Job") to include in API requests 3148 // with the JSON null value. By default, fields with empty values are omitted 3149 // from API requests. See 3150 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3151 NullFields []string `json:"-"` 3152 } 3153 3154 func (s *LaunchTemplateResponse) MarshalJSON() ([]byte, error) { 3155 type NoMethod LaunchTemplateResponse 3156 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3157 } 3158 3159 // LeaseWorkItemRequest: Request to lease WorkItems. 3160 type LeaseWorkItemRequest struct { 3161 // CurrentWorkerTime: The current timestamp at the worker. 3162 CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` 3163 // Location: The [regional endpoint] 3164 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 3165 // contains the WorkItem's job. 3166 Location string `json:"location,omitempty"` 3167 // RequestedLeaseDuration: The initial lease period. 3168 RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` 3169 // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkRequest from 3170 // UnifiedWorker. 3171 UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` 3172 // WorkItemTypes: Filter for WorkItem type. 3173 WorkItemTypes []string `json:"workItemTypes,omitempty"` 3174 // WorkerCapabilities: Worker capabilities. WorkItems might be limited to 3175 // workers with specific capabilities. 3176 WorkerCapabilities []string `json:"workerCapabilities,omitempty"` 3177 // WorkerId: Identifies the worker leasing work -- typically the ID of the 3178 // virtual machine running the worker. 3179 WorkerId string `json:"workerId,omitempty"` 3180 // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime") to 3181 // unconditionally include in API requests. By default, fields with empty or 3182 // default values are omitted from API requests. See 3183 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3184 // details. 3185 ForceSendFields []string `json:"-"` 3186 // NullFields is a list of field names (e.g. "CurrentWorkerTime") to include in 3187 // API requests with the JSON null value. By default, fields with empty values 3188 // are omitted from API requests. See 3189 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3190 NullFields []string `json:"-"` 3191 } 3192 3193 func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) { 3194 type NoMethod LeaseWorkItemRequest 3195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3196 } 3197 3198 // LeaseWorkItemResponse: Response to a request to lease WorkItems. 3199 type LeaseWorkItemResponse struct { 3200 // UnifiedWorkerResponse: Untranslated bag-of-bytes WorkResponse for 3201 // UnifiedWorker. 3202 UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` 3203 // WorkItems: A list of the leased WorkItems. 3204 WorkItems []*WorkItem `json:"workItems,omitempty"` 3205 3206 // ServerResponse contains the HTTP response code and headers from the server. 3207 googleapi.ServerResponse `json:"-"` 3208 // ForceSendFields is a list of field names (e.g. "UnifiedWorkerResponse") to 3209 // unconditionally include in API requests. By default, fields with empty or 3210 // default values are omitted from API requests. See 3211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3212 // details. 3213 ForceSendFields []string `json:"-"` 3214 // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to 3215 // include in API requests with the JSON null value. By default, fields with 3216 // empty values are omitted from API requests. See 3217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3218 NullFields []string `json:"-"` 3219 } 3220 3221 func (s *LeaseWorkItemResponse) MarshalJSON() ([]byte, error) { 3222 type NoMethod LeaseWorkItemResponse 3223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3224 } 3225 3226 // Linear: Linear buckets with the following boundaries for indices in 0 to 3227 // n-1. - i in [0, n-1]: [start + (i)*width, start + (i+1)*width) 3228 type Linear struct { 3229 // NumberOfBuckets: Must be greater than 0. 3230 NumberOfBuckets int64 `json:"numberOfBuckets,omitempty"` 3231 // Start: Lower bound of the first bucket. 3232 Start float64 `json:"start,omitempty"` 3233 // Width: Distance between bucket boundaries. Must be greater than 0. 3234 Width float64 `json:"width,omitempty"` 3235 // ForceSendFields is a list of field names (e.g. "NumberOfBuckets") to 3236 // unconditionally include in API requests. By default, fields with empty or 3237 // default values are omitted from API requests. See 3238 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3239 // details. 3240 ForceSendFields []string `json:"-"` 3241 // NullFields is a list of field names (e.g. "NumberOfBuckets") to include in 3242 // API requests with the JSON null value. By default, fields with empty values 3243 // are omitted from API requests. See 3244 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3245 NullFields []string `json:"-"` 3246 } 3247 3248 func (s *Linear) MarshalJSON() ([]byte, error) { 3249 type NoMethod Linear 3250 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3251 } 3252 3253 func (s *Linear) UnmarshalJSON(data []byte) error { 3254 type NoMethod Linear 3255 var s1 struct { 3256 Start gensupport.JSONFloat64 `json:"start"` 3257 Width gensupport.JSONFloat64 `json:"width"` 3258 *NoMethod 3259 } 3260 s1.NoMethod = (*NoMethod)(s) 3261 if err := json.Unmarshal(data, &s1); err != nil { 3262 return err 3263 } 3264 s.Start = float64(s1.Start) 3265 s.Width = float64(s1.Width) 3266 return nil 3267 } 3268 3269 // ListJobMessagesResponse: Response to a request to list job messages. 3270 type ListJobMessagesResponse struct { 3271 // AutoscalingEvents: Autoscaling events in ascending timestamp order. 3272 AutoscalingEvents []*AutoscalingEvent `json:"autoscalingEvents,omitempty"` 3273 // JobMessages: Messages in ascending timestamp order. 3274 JobMessages []*JobMessage `json:"jobMessages,omitempty"` 3275 // NextPageToken: The token to obtain the next page of results if there are 3276 // more. 3277 NextPageToken string `json:"nextPageToken,omitempty"` 3278 3279 // ServerResponse contains the HTTP response code and headers from the server. 3280 googleapi.ServerResponse `json:"-"` 3281 // ForceSendFields is a list of field names (e.g. "AutoscalingEvents") to 3282 // unconditionally include in API requests. By default, fields with empty or 3283 // default values are omitted from API requests. See 3284 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3285 // details. 3286 ForceSendFields []string `json:"-"` 3287 // NullFields is a list of field names (e.g. "AutoscalingEvents") to include in 3288 // API requests with the JSON null value. By default, fields with empty values 3289 // are omitted from API requests. See 3290 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3291 NullFields []string `json:"-"` 3292 } 3293 3294 func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) { 3295 type NoMethod ListJobMessagesResponse 3296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3297 } 3298 3299 // ListJobsResponse: Response to a request to list Cloud Dataflow jobs in a 3300 // project. This might be a partial response, depending on the page size in the 3301 // ListJobsRequest. However, if the project does not have any jobs, an instance 3302 // of ListJobsResponse is not returned and the requests's response body is 3303 // empty {}. 3304 type ListJobsResponse struct { 3305 // FailedLocation: Zero or more messages describing the [regional endpoints] 3306 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 3307 // failed to respond. 3308 FailedLocation []*FailedLocation `json:"failedLocation,omitempty"` 3309 // Jobs: A subset of the requested job information. 3310 Jobs []*Job `json:"jobs,omitempty"` 3311 // NextPageToken: Set if there may be more results than fit in this response. 3312 NextPageToken string `json:"nextPageToken,omitempty"` 3313 3314 // ServerResponse contains the HTTP response code and headers from the server. 3315 googleapi.ServerResponse `json:"-"` 3316 // ForceSendFields is a list of field names (e.g. "FailedLocation") to 3317 // unconditionally include in API requests. By default, fields with empty or 3318 // default values are omitted from API requests. See 3319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3320 // details. 3321 ForceSendFields []string `json:"-"` 3322 // NullFields is a list of field names (e.g. "FailedLocation") to include in 3323 // API requests with the JSON null value. By default, fields with empty values 3324 // are omitted from API requests. See 3325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3326 NullFields []string `json:"-"` 3327 } 3328 3329 func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { 3330 type NoMethod ListJobsResponse 3331 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3332 } 3333 3334 // ListSnapshotsResponse: List of snapshots. 3335 type ListSnapshotsResponse struct { 3336 // Snapshots: Returned snapshots. 3337 Snapshots []*Snapshot `json:"snapshots,omitempty"` 3338 3339 // ServerResponse contains the HTTP response code and headers from the server. 3340 googleapi.ServerResponse `json:"-"` 3341 // ForceSendFields is a list of field names (e.g. "Snapshots") to 3342 // unconditionally include in API requests. By default, fields with empty or 3343 // default values are omitted from API requests. See 3344 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3345 // details. 3346 ForceSendFields []string `json:"-"` 3347 // NullFields is a list of field names (e.g. "Snapshots") to include in API 3348 // requests with the JSON null value. By default, fields with empty values are 3349 // omitted from API requests. See 3350 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3351 NullFields []string `json:"-"` 3352 } 3353 3354 func (s *ListSnapshotsResponse) MarshalJSON() ([]byte, error) { 3355 type NoMethod ListSnapshotsResponse 3356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3357 } 3358 3359 // MapTask: MapTask consists of an ordered set of instructions, each of which 3360 // describes one particular low-level operation for the worker to perform in 3361 // order to accomplish the MapTask's WorkItem. Each instruction must appear in 3362 // the list before any instructions which depends on its output. 3363 type MapTask struct { 3364 // CounterPrefix: Counter prefix that can be used to prefix counters. Not 3365 // currently used in Dataflow. 3366 CounterPrefix string `json:"counterPrefix,omitempty"` 3367 // Instructions: The instructions in the MapTask. 3368 Instructions []*ParallelInstruction `json:"instructions,omitempty"` 3369 // StageName: System-defined name of the stage containing this MapTask. Unique 3370 // across the workflow. 3371 StageName string `json:"stageName,omitempty"` 3372 // SystemName: System-defined name of this MapTask. Unique across the workflow. 3373 SystemName string `json:"systemName,omitempty"` 3374 // ForceSendFields is a list of field names (e.g. "CounterPrefix") to 3375 // unconditionally include in API requests. By default, fields with empty or 3376 // default values are omitted from API requests. See 3377 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3378 // details. 3379 ForceSendFields []string `json:"-"` 3380 // NullFields is a list of field names (e.g. "CounterPrefix") to include in API 3381 // requests with the JSON null value. By default, fields with empty values are 3382 // omitted from API requests. See 3383 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3384 NullFields []string `json:"-"` 3385 } 3386 3387 func (s *MapTask) MarshalJSON() ([]byte, error) { 3388 type NoMethod MapTask 3389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3390 } 3391 3392 // MemInfo: Information about the memory usage of a worker or a container 3393 // within a worker. 3394 type MemInfo struct { 3395 // CurrentLimitBytes: Instantenous memory limit in bytes. 3396 CurrentLimitBytes uint64 `json:"currentLimitBytes,omitempty,string"` 3397 // CurrentOoms: Number of Out of Memory (OOM) events recorded since the 3398 // previous measurement. 3399 CurrentOoms int64 `json:"currentOoms,omitempty,string"` 3400 // CurrentRssBytes: Instantenous memory (RSS) size in bytes. 3401 CurrentRssBytes uint64 `json:"currentRssBytes,omitempty,string"` 3402 // Timestamp: Timestamp of the measurement. 3403 Timestamp string `json:"timestamp,omitempty"` 3404 // TotalGbMs: Total memory (RSS) usage since start up in GB * ms. 3405 TotalGbMs uint64 `json:"totalGbMs,omitempty,string"` 3406 // ForceSendFields is a list of field names (e.g. "CurrentLimitBytes") to 3407 // unconditionally include in API requests. By default, fields with empty or 3408 // default values are omitted from API requests. See 3409 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3410 // details. 3411 ForceSendFields []string `json:"-"` 3412 // NullFields is a list of field names (e.g. "CurrentLimitBytes") to include in 3413 // API requests with the JSON null value. By default, fields with empty values 3414 // are omitted from API requests. See 3415 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3416 NullFields []string `json:"-"` 3417 } 3418 3419 func (s *MemInfo) MarshalJSON() ([]byte, error) { 3420 type NoMethod MemInfo 3421 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3422 } 3423 3424 // MetricShortId: The metric short id is returned to the user alongside an 3425 // offset into ReportWorkItemStatusRequest 3426 type MetricShortId struct { 3427 // MetricIndex: The index of the corresponding metric in the 3428 // ReportWorkItemStatusRequest. Required. 3429 MetricIndex int64 `json:"metricIndex,omitempty"` 3430 // ShortId: The service-generated short identifier for the metric. 3431 ShortId int64 `json:"shortId,omitempty,string"` 3432 // ForceSendFields is a list of field names (e.g. "MetricIndex") to 3433 // unconditionally include in API requests. By default, fields with empty or 3434 // default values are omitted from API requests. See 3435 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3436 // details. 3437 ForceSendFields []string `json:"-"` 3438 // NullFields is a list of field names (e.g. "MetricIndex") to include in API 3439 // requests with the JSON null value. By default, fields with empty values are 3440 // omitted from API requests. See 3441 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3442 NullFields []string `json:"-"` 3443 } 3444 3445 func (s *MetricShortId) MarshalJSON() ([]byte, error) { 3446 type NoMethod MetricShortId 3447 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3448 } 3449 3450 // MetricStructuredName: Identifies a metric, by describing the source which 3451 // generated the metric. 3452 type MetricStructuredName struct { 3453 // Context: Zero or more labeled fields which identify the part of the job this 3454 // metric is associated with, such as the name of a step or collection. For 3455 // example, built-in counters associated with steps will have context['step'] = 3456 // . Counters associated with PCollections in the SDK will have 3457 // context['pcollection'] = . 3458 Context map[string]string `json:"context,omitempty"` 3459 // Name: Worker-defined metric name. 3460 Name string `json:"name,omitempty"` 3461 // Origin: Origin (namespace) of metric name. May be blank for user-define 3462 // metrics; will be "dataflow" for metrics defined by the Dataflow service or 3463 // SDK. 3464 Origin string `json:"origin,omitempty"` 3465 // ForceSendFields is a list of field names (e.g. "Context") to unconditionally 3466 // include in API requests. By default, fields with empty or default values are 3467 // omitted from API requests. See 3468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3469 // details. 3470 ForceSendFields []string `json:"-"` 3471 // NullFields is a list of field names (e.g. "Context") to include in API 3472 // requests with the JSON null value. By default, fields with empty values are 3473 // omitted from API requests. See 3474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3475 NullFields []string `json:"-"` 3476 } 3477 3478 func (s *MetricStructuredName) MarshalJSON() ([]byte, error) { 3479 type NoMethod MetricStructuredName 3480 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3481 } 3482 3483 // MetricUpdate: Describes the state of a metric. 3484 type MetricUpdate struct { 3485 // Cumulative: True if this metric is reported as the total cumulative 3486 // aggregate value accumulated since the worker started working on this 3487 // WorkItem. By default this is false, indicating that this metric is reported 3488 // as a delta that is not associated with any WorkItem. 3489 Cumulative bool `json:"cumulative,omitempty"` 3490 // Distribution: A struct value describing properties of a distribution of 3491 // numeric values. 3492 Distribution interface{} `json:"distribution,omitempty"` 3493 // Gauge: A struct value describing properties of a Gauge. Metrics of gauge 3494 // type show the value of a metric across time, and is aggregated based on the 3495 // newest value. 3496 Gauge interface{} `json:"gauge,omitempty"` 3497 // Internal: Worker-computed aggregate value for internal use by the Dataflow 3498 // service. 3499 Internal interface{} `json:"internal,omitempty"` 3500 // Kind: Metric aggregation kind. The possible metric aggregation kinds are 3501 // "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution". The 3502 // specified aggregation kind is case-insensitive. If omitted, this is not an 3503 // aggregated value but instead a single metric sample value. 3504 Kind string `json:"kind,omitempty"` 3505 // MeanCount: Worker-computed aggregate value for the "Mean" aggregation kind. 3506 // This holds the count of the aggregated values and is used in combination 3507 // with mean_sum above to obtain the actual mean aggregate value. The only 3508 // possible value type is Long. 3509 MeanCount interface{} `json:"meanCount,omitempty"` 3510 // MeanSum: Worker-computed aggregate value for the "Mean" aggregation kind. 3511 // This holds the sum of the aggregated values and is used in combination with 3512 // mean_count below to obtain the actual mean aggregate value. The only 3513 // possible value types are Long and Double. 3514 MeanSum interface{} `json:"meanSum,omitempty"` 3515 // Name: Name of the metric. 3516 Name *MetricStructuredName `json:"name,omitempty"` 3517 // Scalar: Worker-computed aggregate value for aggregation kinds "Sum", "Max", 3518 // "Min", "And", and "Or". The possible value types are Long, Double, and 3519 // Boolean. 3520 Scalar interface{} `json:"scalar,omitempty"` 3521 // Set: Worker-computed aggregate value for the "Set" aggregation kind. The 3522 // only possible value type is a list of Values whose type can be Long, Double, 3523 // or String, according to the metric's type. All Values in the list must be of 3524 // the same type. 3525 Set interface{} `json:"set,omitempty"` 3526 // UpdateTime: Timestamp associated with the metric value. Optional when 3527 // workers are reporting work progress; it will be filled in responses from the 3528 // metrics API. 3529 UpdateTime string `json:"updateTime,omitempty"` 3530 // ForceSendFields is a list of field names (e.g. "Cumulative") to 3531 // unconditionally include in API requests. By default, fields with empty or 3532 // default values are omitted from API requests. See 3533 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3534 // details. 3535 ForceSendFields []string `json:"-"` 3536 // NullFields is a list of field names (e.g. "Cumulative") to include in API 3537 // requests with the JSON null value. By default, fields with empty values are 3538 // omitted from API requests. See 3539 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3540 NullFields []string `json:"-"` 3541 } 3542 3543 func (s *MetricUpdate) MarshalJSON() ([]byte, error) { 3544 type NoMethod MetricUpdate 3545 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3546 } 3547 3548 // MetricValue: The value of a metric along with its name and labels. 3549 type MetricValue struct { 3550 // Metric: Base name for this metric. 3551 Metric string `json:"metric,omitempty"` 3552 // MetricLabels: Optional. Set of metric labels for this metric. 3553 MetricLabels map[string]string `json:"metricLabels,omitempty"` 3554 // ValueHistogram: Histogram value of this metric. 3555 ValueHistogram *DataflowHistogramValue `json:"valueHistogram,omitempty"` 3556 // ValueInt64: Integer value of this metric. 3557 ValueInt64 int64 `json:"valueInt64,omitempty,string"` 3558 // ForceSendFields is a list of field names (e.g. "Metric") to unconditionally 3559 // include in API requests. By default, fields with empty or default values are 3560 // omitted from API requests. See 3561 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3562 // details. 3563 ForceSendFields []string `json:"-"` 3564 // NullFields is a list of field names (e.g. "Metric") to include in API 3565 // requests with the JSON null value. By default, fields with empty values are 3566 // omitted from API requests. See 3567 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3568 NullFields []string `json:"-"` 3569 } 3570 3571 func (s *MetricValue) MarshalJSON() ([]byte, error) { 3572 type NoMethod MetricValue 3573 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3574 } 3575 3576 // MountedDataDisk: Describes mounted data disk. 3577 type MountedDataDisk struct { 3578 // DataDisk: The name of the data disk. This name is local to the Google Cloud 3579 // Platform project and uniquely identifies the disk within that project, for 3580 // example "myproject-1014-104817-4c2-harness-0-disk-1". 3581 DataDisk string `json:"dataDisk,omitempty"` 3582 // ForceSendFields is a list of field names (e.g. "DataDisk") to 3583 // unconditionally include in API requests. By default, fields with empty or 3584 // default values are omitted from API requests. See 3585 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3586 // details. 3587 ForceSendFields []string `json:"-"` 3588 // NullFields is a list of field names (e.g. "DataDisk") to include in API 3589 // requests with the JSON null value. By default, fields with empty values are 3590 // omitted from API requests. See 3591 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3592 NullFields []string `json:"-"` 3593 } 3594 3595 func (s *MountedDataDisk) MarshalJSON() ([]byte, error) { 3596 type NoMethod MountedDataDisk 3597 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3598 } 3599 3600 // MultiOutputInfo: Information about an output of a multi-output DoFn. 3601 type MultiOutputInfo struct { 3602 // Tag: The id of the tag the user code will emit to this output by; this 3603 // should correspond to the tag of some SideInputInfo. 3604 Tag string `json:"tag,omitempty"` 3605 // ForceSendFields is a list of field names (e.g. "Tag") to unconditionally 3606 // include in API requests. By default, fields with empty or default values are 3607 // omitted from API requests. See 3608 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3609 // details. 3610 ForceSendFields []string `json:"-"` 3611 // NullFields is a list of field names (e.g. "Tag") to include in API requests 3612 // with the JSON null value. By default, fields with empty values are omitted 3613 // from API requests. See 3614 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3615 NullFields []string `json:"-"` 3616 } 3617 3618 func (s *MultiOutputInfo) MarshalJSON() ([]byte, error) { 3619 type NoMethod MultiOutputInfo 3620 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3621 } 3622 3623 // NameAndKind: Basic metadata about a counter. 3624 type NameAndKind struct { 3625 // Kind: Counter aggregation kind. 3626 // 3627 // Possible values: 3628 // "INVALID" - Counter aggregation kind was not set. 3629 // "SUM" - Aggregated value is the sum of all contributed values. 3630 // "MAX" - Aggregated value is the max of all contributed values. 3631 // "MIN" - Aggregated value is the min of all contributed values. 3632 // "MEAN" - Aggregated value is the mean of all contributed values. 3633 // "OR" - Aggregated value represents the logical 'or' of all contributed 3634 // values. 3635 // "AND" - Aggregated value represents the logical 'and' of all contributed 3636 // values. 3637 // "SET" - Aggregated value is a set of unique contributed values. 3638 // "DISTRIBUTION" - Aggregated value captures statistics about a 3639 // distribution. 3640 // "LATEST_VALUE" - Aggregated value tracks the latest value of a variable. 3641 Kind string `json:"kind,omitempty"` 3642 // Name: Name of the counter. 3643 Name string `json:"name,omitempty"` 3644 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 3645 // include in API requests. By default, fields with empty or default values are 3646 // omitted from API requests. See 3647 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3648 // details. 3649 ForceSendFields []string `json:"-"` 3650 // NullFields is a list of field names (e.g. "Kind") to include in API requests 3651 // with the JSON null value. By default, fields with empty values are omitted 3652 // from API requests. See 3653 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3654 NullFields []string `json:"-"` 3655 } 3656 3657 func (s *NameAndKind) MarshalJSON() ([]byte, error) { 3658 type NoMethod NameAndKind 3659 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3660 } 3661 3662 // OutlierStats: Statistics for the underflow and overflow bucket. 3663 type OutlierStats struct { 3664 // OverflowCount: Number of values that are larger than the upper bound of the 3665 // largest bucket. 3666 OverflowCount int64 `json:"overflowCount,omitempty,string"` 3667 // OverflowMean: Mean of values in the overflow bucket. 3668 OverflowMean float64 `json:"overflowMean,omitempty"` 3669 // UnderflowCount: Number of values that are smaller than the lower bound of 3670 // the smallest bucket. 3671 UnderflowCount int64 `json:"underflowCount,omitempty,string"` 3672 // UnderflowMean: Mean of values in the undeflow bucket. 3673 UnderflowMean float64 `json:"underflowMean,omitempty"` 3674 // ForceSendFields is a list of field names (e.g. "OverflowCount") to 3675 // unconditionally include in API requests. By default, fields with empty or 3676 // default values are omitted from API requests. See 3677 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3678 // details. 3679 ForceSendFields []string `json:"-"` 3680 // NullFields is a list of field names (e.g. "OverflowCount") to include in API 3681 // requests with the JSON null value. By default, fields with empty values are 3682 // omitted from API requests. See 3683 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3684 NullFields []string `json:"-"` 3685 } 3686 3687 func (s *OutlierStats) MarshalJSON() ([]byte, error) { 3688 type NoMethod OutlierStats 3689 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3690 } 3691 3692 func (s *OutlierStats) UnmarshalJSON(data []byte) error { 3693 type NoMethod OutlierStats 3694 var s1 struct { 3695 OverflowMean gensupport.JSONFloat64 `json:"overflowMean"` 3696 UnderflowMean gensupport.JSONFloat64 `json:"underflowMean"` 3697 *NoMethod 3698 } 3699 s1.NoMethod = (*NoMethod)(s) 3700 if err := json.Unmarshal(data, &s1); err != nil { 3701 return err 3702 } 3703 s.OverflowMean = float64(s1.OverflowMean) 3704 s.UnderflowMean = float64(s1.UnderflowMean) 3705 return nil 3706 } 3707 3708 // Package: The packages that must be installed in order for a worker to run 3709 // the steps of the Cloud Dataflow job that will be assigned to its worker 3710 // pool. This is the mechanism by which the Cloud Dataflow SDK causes code to 3711 // be loaded onto the workers. For example, the Cloud Dataflow Java SDK might 3712 // use this to install jars containing the user's code and all of the various 3713 // dependencies (libraries, data files, etc.) required in order for that code 3714 // to run. 3715 type Package struct { 3716 // Location: The resource to read the package from. The supported resource type 3717 // is: Google Cloud Storage: storage.googleapis.com/{bucket} 3718 // bucket.storage.googleapis.com/ 3719 Location string `json:"location,omitempty"` 3720 // Name: The name of the package. 3721 Name string `json:"name,omitempty"` 3722 // ForceSendFields is a list of field names (e.g. "Location") to 3723 // unconditionally include in API requests. By default, fields with empty or 3724 // default values are omitted from API requests. See 3725 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3726 // details. 3727 ForceSendFields []string `json:"-"` 3728 // NullFields is a list of field names (e.g. "Location") to include in API 3729 // requests with the JSON null value. By default, fields with empty values are 3730 // omitted from API requests. See 3731 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3732 NullFields []string `json:"-"` 3733 } 3734 3735 func (s *Package) MarshalJSON() ([]byte, error) { 3736 type NoMethod Package 3737 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3738 } 3739 3740 // ParDoInstruction: An instruction that does a ParDo operation. Takes one main 3741 // input and zero or more side inputs, and produces zero or more outputs. Runs 3742 // user code. 3743 type ParDoInstruction struct { 3744 // Input: The input. 3745 Input *InstructionInput `json:"input,omitempty"` 3746 // MultiOutputInfos: Information about each of the outputs, if user_fn is a 3747 // MultiDoFn. 3748 MultiOutputInfos []*MultiOutputInfo `json:"multiOutputInfos,omitempty"` 3749 // NumOutputs: The number of outputs. 3750 NumOutputs int64 `json:"numOutputs,omitempty"` 3751 // SideInputs: Zero or more side inputs. 3752 SideInputs []*SideInputInfo `json:"sideInputs,omitempty"` 3753 // UserFn: The user function to invoke. 3754 UserFn googleapi.RawMessage `json:"userFn,omitempty"` 3755 // ForceSendFields is a list of field names (e.g. "Input") to unconditionally 3756 // include in API requests. By default, fields with empty or default values are 3757 // omitted from API requests. See 3758 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3759 // details. 3760 ForceSendFields []string `json:"-"` 3761 // NullFields is a list of field names (e.g. "Input") to include in API 3762 // requests with the JSON null value. By default, fields with empty values are 3763 // omitted from API requests. See 3764 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3765 NullFields []string `json:"-"` 3766 } 3767 3768 func (s *ParDoInstruction) MarshalJSON() ([]byte, error) { 3769 type NoMethod ParDoInstruction 3770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3771 } 3772 3773 // ParallelInstruction: Describes a particular operation comprising a MapTask. 3774 type ParallelInstruction struct { 3775 // Flatten: Additional information for Flatten instructions. 3776 Flatten *FlattenInstruction `json:"flatten,omitempty"` 3777 // Name: User-provided name of this operation. 3778 Name string `json:"name,omitempty"` 3779 // OriginalName: System-defined name for the operation in the original workflow 3780 // graph. 3781 OriginalName string `json:"originalName,omitempty"` 3782 // Outputs: Describes the outputs of the instruction. 3783 Outputs []*InstructionOutput `json:"outputs,omitempty"` 3784 // ParDo: Additional information for ParDo instructions. 3785 ParDo *ParDoInstruction `json:"parDo,omitempty"` 3786 // PartialGroupByKey: Additional information for PartialGroupByKey 3787 // instructions. 3788 PartialGroupByKey *PartialGroupByKeyInstruction `json:"partialGroupByKey,omitempty"` 3789 // Read: Additional information for Read instructions. 3790 Read *ReadInstruction `json:"read,omitempty"` 3791 // SystemName: System-defined name of this operation. Unique across the 3792 // workflow. 3793 SystemName string `json:"systemName,omitempty"` 3794 // Write: Additional information for Write instructions. 3795 Write *WriteInstruction `json:"write,omitempty"` 3796 // ForceSendFields is a list of field names (e.g. "Flatten") to unconditionally 3797 // include in API requests. By default, fields with empty or default values are 3798 // omitted from API requests. See 3799 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3800 // details. 3801 ForceSendFields []string `json:"-"` 3802 // NullFields is a list of field names (e.g. "Flatten") to include in API 3803 // requests with the JSON null value. By default, fields with empty values are 3804 // omitted from API requests. See 3805 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3806 NullFields []string `json:"-"` 3807 } 3808 3809 func (s *ParallelInstruction) MarshalJSON() ([]byte, error) { 3810 type NoMethod ParallelInstruction 3811 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3812 } 3813 3814 // Parameter: Structured data associated with this message. 3815 type Parameter struct { 3816 // Key: Key or name for this parameter. 3817 Key string `json:"key,omitempty"` 3818 // Value: Value for this parameter. 3819 Value interface{} `json:"value,omitempty"` 3820 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally 3821 // include in API requests. By default, fields with empty or default values are 3822 // omitted from API requests. See 3823 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3824 // details. 3825 ForceSendFields []string `json:"-"` 3826 // NullFields is a list of field names (e.g. "Key") to include in API requests 3827 // with the JSON null value. By default, fields with empty values are omitted 3828 // from API requests. See 3829 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3830 NullFields []string `json:"-"` 3831 } 3832 3833 func (s *Parameter) MarshalJSON() ([]byte, error) { 3834 type NoMethod Parameter 3835 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3836 } 3837 3838 // ParameterMetadata: Metadata for a specific parameter. 3839 type ParameterMetadata struct { 3840 // CustomMetadata: Optional. Additional metadata for describing this parameter. 3841 CustomMetadata map[string]string `json:"customMetadata,omitempty"` 3842 // DefaultValue: Optional. The default values will pre-populate the parameter 3843 // with the given value from the proto. If default_value is left empty, the 3844 // parameter will be populated with a default of the relevant type, e.g. false 3845 // for a boolean. 3846 DefaultValue string `json:"defaultValue,omitempty"` 3847 // EnumOptions: Optional. The options shown when ENUM ParameterType is 3848 // specified. 3849 EnumOptions []*ParameterMetadataEnumOption `json:"enumOptions,omitempty"` 3850 // GroupName: Optional. Specifies a group name for this parameter to be 3851 // rendered under. Group header text will be rendered exactly as specified in 3852 // this field. Only considered when parent_name is NOT provided. 3853 GroupName string `json:"groupName,omitempty"` 3854 // HelpText: Required. The help text to display for the parameter. 3855 HelpText string `json:"helpText,omitempty"` 3856 // HiddenUi: Optional. Whether the parameter should be hidden in the UI. 3857 HiddenUi bool `json:"hiddenUi,omitempty"` 3858 // IsOptional: Optional. Whether the parameter is optional. Defaults to false. 3859 IsOptional bool `json:"isOptional,omitempty"` 3860 // Label: Required. The label to display for the parameter. 3861 Label string `json:"label,omitempty"` 3862 // Name: Required. The name of the parameter. 3863 Name string `json:"name,omitempty"` 3864 // ParamType: Optional. The type of the parameter. Used for selecting input 3865 // picker. 3866 // 3867 // Possible values: 3868 // "DEFAULT" - Default input type. 3869 // "TEXT" - The parameter specifies generic text input. 3870 // "GCS_READ_BUCKET" - The parameter specifies a Cloud Storage Bucket to read 3871 // from. 3872 // "GCS_WRITE_BUCKET" - The parameter specifies a Cloud Storage Bucket to 3873 // write to. 3874 // "GCS_READ_FILE" - The parameter specifies a Cloud Storage file path to 3875 // read from. 3876 // "GCS_WRITE_FILE" - The parameter specifies a Cloud Storage file path to 3877 // write to. 3878 // "GCS_READ_FOLDER" - The parameter specifies a Cloud Storage folder path to 3879 // read from. 3880 // "GCS_WRITE_FOLDER" - The parameter specifies a Cloud Storage folder to 3881 // write to. 3882 // "PUBSUB_TOPIC" - The parameter specifies a Pub/Sub Topic. 3883 // "PUBSUB_SUBSCRIPTION" - The parameter specifies a Pub/Sub Subscription. 3884 // "BIGQUERY_TABLE" - The parameter specifies a BigQuery table. 3885 // "JAVASCRIPT_UDF_FILE" - The parameter specifies a JavaScript UDF in Cloud 3886 // Storage. 3887 // "SERVICE_ACCOUNT" - The parameter specifies a Service Account email. 3888 // "MACHINE_TYPE" - The parameter specifies a Machine Type. 3889 // "KMS_KEY_NAME" - The parameter specifies a KMS Key name. 3890 // "WORKER_REGION" - The parameter specifies a Worker Region. 3891 // "WORKER_ZONE" - The parameter specifies a Worker Zone. 3892 // "BOOLEAN" - The parameter specifies a boolean input. 3893 // "ENUM" - The parameter specifies an enum input. 3894 // "NUMBER" - The parameter specifies a number input. 3895 // "KAFKA_TOPIC" - The parameter specifies the fully-qualified name of an 3896 // Apache Kafka topic. This can be either a Google Managed Kafka topic or a 3897 // non-managed Kafka topic. 3898 ParamType string `json:"paramType,omitempty"` 3899 // ParentName: Optional. Specifies the name of the parent parameter. Used in 3900 // conjunction with 'parent_trigger_values' to make this parameter conditional 3901 // (will only be rendered conditionally). Should be mappable to a 3902 // ParameterMetadata.name field. 3903 ParentName string `json:"parentName,omitempty"` 3904 // ParentTriggerValues: Optional. The value(s) of the 'parent_name' parameter 3905 // which will trigger this parameter to be shown. If left empty, ANY non-empty 3906 // value in parent_name will trigger this parameter to be shown. Only 3907 // considered when this parameter is conditional (when 'parent_name' has been 3908 // provided). 3909 ParentTriggerValues []string `json:"parentTriggerValues,omitempty"` 3910 // Regexes: Optional. Regexes that the parameter must match. 3911 Regexes []string `json:"regexes,omitempty"` 3912 // ForceSendFields is a list of field names (e.g. "CustomMetadata") to 3913 // unconditionally include in API requests. By default, fields with empty or 3914 // default values are omitted from API requests. See 3915 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3916 // details. 3917 ForceSendFields []string `json:"-"` 3918 // NullFields is a list of field names (e.g. "CustomMetadata") to include in 3919 // API requests with the JSON null value. By default, fields with empty values 3920 // are omitted from API requests. See 3921 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3922 NullFields []string `json:"-"` 3923 } 3924 3925 func (s *ParameterMetadata) MarshalJSON() ([]byte, error) { 3926 type NoMethod ParameterMetadata 3927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3928 } 3929 3930 // ParameterMetadataEnumOption: ParameterMetadataEnumOption specifies the 3931 // option shown in the enum form. 3932 type ParameterMetadataEnumOption struct { 3933 // Description: Optional. The description to display for the enum option. 3934 Description string `json:"description,omitempty"` 3935 // Label: Optional. The label to display for the enum option. 3936 Label string `json:"label,omitempty"` 3937 // Value: Required. The value of the enum option. 3938 Value string `json:"value,omitempty"` 3939 // ForceSendFields is a list of field names (e.g. "Description") to 3940 // unconditionally include in API requests. By default, fields with empty or 3941 // default values are omitted from API requests. See 3942 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3943 // details. 3944 ForceSendFields []string `json:"-"` 3945 // NullFields is a list of field names (e.g. "Description") to include in API 3946 // requests with the JSON null value. By default, fields with empty values are 3947 // omitted from API requests. See 3948 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3949 NullFields []string `json:"-"` 3950 } 3951 3952 func (s *ParameterMetadataEnumOption) MarshalJSON() ([]byte, error) { 3953 type NoMethod ParameterMetadataEnumOption 3954 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3955 } 3956 3957 // PartialGroupByKeyInstruction: An instruction that does a partial 3958 // group-by-key. One input and one output. 3959 type PartialGroupByKeyInstruction struct { 3960 // Input: Describes the input to the partial group-by-key instruction. 3961 Input *InstructionInput `json:"input,omitempty"` 3962 // InputElementCodec: The codec to use for interpreting an element in the input 3963 // PTable. 3964 InputElementCodec googleapi.RawMessage `json:"inputElementCodec,omitempty"` 3965 // OriginalCombineValuesInputStoreName: If this instruction includes a 3966 // combining function this is the name of the intermediate store between the 3967 // GBK and the CombineValues. 3968 OriginalCombineValuesInputStoreName string `json:"originalCombineValuesInputStoreName,omitempty"` 3969 // OriginalCombineValuesStepName: If this instruction includes a combining 3970 // function, this is the name of the CombineValues instruction lifted into this 3971 // instruction. 3972 OriginalCombineValuesStepName string `json:"originalCombineValuesStepName,omitempty"` 3973 // SideInputs: Zero or more side inputs. 3974 SideInputs []*SideInputInfo `json:"sideInputs,omitempty"` 3975 // ValueCombiningFn: The value combining function to invoke. 3976 ValueCombiningFn googleapi.RawMessage `json:"valueCombiningFn,omitempty"` 3977 // ForceSendFields is a list of field names (e.g. "Input") to unconditionally 3978 // include in API requests. By default, fields with empty or default values are 3979 // omitted from API requests. See 3980 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3981 // details. 3982 ForceSendFields []string `json:"-"` 3983 // NullFields is a list of field names (e.g. "Input") to include in API 3984 // requests with the JSON null value. By default, fields with empty values are 3985 // omitted from API requests. See 3986 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3987 NullFields []string `json:"-"` 3988 } 3989 3990 func (s *PartialGroupByKeyInstruction) MarshalJSON() ([]byte, error) { 3991 type NoMethod PartialGroupByKeyInstruction 3992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3993 } 3994 3995 // PerStepNamespaceMetrics: Metrics for a particular unfused step and 3996 // namespace. A metric is uniquely identified by the `metrics_namespace`, 3997 // `original_step`, `metric name` and `metric_labels`. 3998 type PerStepNamespaceMetrics struct { 3999 // MetricValues: Optional. Metrics that are recorded for this namespace and 4000 // unfused step. 4001 MetricValues []*MetricValue `json:"metricValues,omitempty"` 4002 // MetricsNamespace: The namespace of these metrics on the worker. 4003 MetricsNamespace string `json:"metricsNamespace,omitempty"` 4004 // OriginalStep: The original system name of the unfused step that these 4005 // metrics are reported from. 4006 OriginalStep string `json:"originalStep,omitempty"` 4007 // ForceSendFields is a list of field names (e.g. "MetricValues") to 4008 // unconditionally include in API requests. By default, fields with empty or 4009 // default values are omitted from API requests. See 4010 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4011 // details. 4012 ForceSendFields []string `json:"-"` 4013 // NullFields is a list of field names (e.g. "MetricValues") to include in API 4014 // requests with the JSON null value. By default, fields with empty values are 4015 // omitted from API requests. See 4016 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4017 NullFields []string `json:"-"` 4018 } 4019 4020 func (s *PerStepNamespaceMetrics) MarshalJSON() ([]byte, error) { 4021 type NoMethod PerStepNamespaceMetrics 4022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4023 } 4024 4025 // PerWorkerMetrics: Per worker metrics. 4026 type PerWorkerMetrics struct { 4027 // PerStepNamespaceMetrics: Optional. Metrics for a particular unfused step and 4028 // namespace. 4029 PerStepNamespaceMetrics []*PerStepNamespaceMetrics `json:"perStepNamespaceMetrics,omitempty"` 4030 // ForceSendFields is a list of field names (e.g. "PerStepNamespaceMetrics") to 4031 // unconditionally include in API requests. By default, fields with empty or 4032 // default values are omitted from API requests. See 4033 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4034 // details. 4035 ForceSendFields []string `json:"-"` 4036 // NullFields is a list of field names (e.g. "PerStepNamespaceMetrics") to 4037 // include in API requests with the JSON null value. By default, fields with 4038 // empty values are omitted from API requests. See 4039 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4040 NullFields []string `json:"-"` 4041 } 4042 4043 func (s *PerWorkerMetrics) MarshalJSON() ([]byte, error) { 4044 type NoMethod PerWorkerMetrics 4045 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4046 } 4047 4048 // PipelineDescription: A descriptive representation of submitted pipeline as 4049 // well as the executed form. This data is provided by the Dataflow service for 4050 // ease of visualizing the pipeline and interpreting Dataflow provided metrics. 4051 type PipelineDescription struct { 4052 // DisplayData: Pipeline level display data. 4053 DisplayData []*DisplayData `json:"displayData,omitempty"` 4054 // ExecutionPipelineStage: Description of each stage of execution of the 4055 // pipeline. 4056 ExecutionPipelineStage []*ExecutionStageSummary `json:"executionPipelineStage,omitempty"` 4057 // OriginalPipelineTransform: Description of each transform in the pipeline and 4058 // collections between them. 4059 OriginalPipelineTransform []*TransformSummary `json:"originalPipelineTransform,omitempty"` 4060 // StepNamesHash: A hash value of the submitted pipeline portable graph step 4061 // names if exists. 4062 StepNamesHash string `json:"stepNamesHash,omitempty"` 4063 // ForceSendFields is a list of field names (e.g. "DisplayData") to 4064 // unconditionally include in API requests. By default, fields with empty or 4065 // default values are omitted from API requests. See 4066 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4067 // details. 4068 ForceSendFields []string `json:"-"` 4069 // NullFields is a list of field names (e.g. "DisplayData") to include in API 4070 // requests with the JSON null value. By default, fields with empty values are 4071 // omitted from API requests. See 4072 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4073 NullFields []string `json:"-"` 4074 } 4075 4076 func (s *PipelineDescription) MarshalJSON() ([]byte, error) { 4077 type NoMethod PipelineDescription 4078 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4079 } 4080 4081 // Point: A point in the timeseries. 4082 type Point struct { 4083 // Time: The timestamp of the point. 4084 Time string `json:"time,omitempty"` 4085 // Value: The value of the point. 4086 Value float64 `json:"value,omitempty"` 4087 // ForceSendFields is a list of field names (e.g. "Time") to unconditionally 4088 // include in API requests. By default, fields with empty or default values are 4089 // omitted from API requests. See 4090 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4091 // details. 4092 ForceSendFields []string `json:"-"` 4093 // NullFields is a list of field names (e.g. "Time") to include in API requests 4094 // with the JSON null value. By default, fields with empty values are omitted 4095 // from API requests. See 4096 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4097 NullFields []string `json:"-"` 4098 } 4099 4100 func (s *Point) MarshalJSON() ([]byte, error) { 4101 type NoMethod Point 4102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4103 } 4104 4105 func (s *Point) UnmarshalJSON(data []byte) error { 4106 type NoMethod Point 4107 var s1 struct { 4108 Value gensupport.JSONFloat64 `json:"value"` 4109 *NoMethod 4110 } 4111 s1.NoMethod = (*NoMethod)(s) 4112 if err := json.Unmarshal(data, &s1); err != nil { 4113 return err 4114 } 4115 s.Value = float64(s1.Value) 4116 return nil 4117 } 4118 4119 // Position: Position defines a position within a collection of data. The value 4120 // can be either the end position, a key (used with ordered collections), a 4121 // byte offset, or a record index. 4122 type Position struct { 4123 // ByteOffset: Position is a byte offset. 4124 ByteOffset int64 `json:"byteOffset,omitempty,string"` 4125 // ConcatPosition: CloudPosition is a concat position. 4126 ConcatPosition *ConcatPosition `json:"concatPosition,omitempty"` 4127 // End: Position is past all other positions. Also useful for the end position 4128 // of an unbounded range. 4129 End bool `json:"end,omitempty"` 4130 // Key: Position is a string key, ordered lexicographically. 4131 Key string `json:"key,omitempty"` 4132 // RecordIndex: Position is a record index. 4133 RecordIndex int64 `json:"recordIndex,omitempty,string"` 4134 // ShufflePosition: CloudPosition is a base64 encoded BatchShufflePosition 4135 // (with FIXED sharding). 4136 ShufflePosition string `json:"shufflePosition,omitempty"` 4137 // ForceSendFields is a list of field names (e.g. "ByteOffset") to 4138 // unconditionally include in API requests. By default, fields with empty or 4139 // default values are omitted from API requests. See 4140 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4141 // details. 4142 ForceSendFields []string `json:"-"` 4143 // NullFields is a list of field names (e.g. "ByteOffset") to include in API 4144 // requests with the JSON null value. By default, fields with empty values are 4145 // omitted from API requests. See 4146 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4147 NullFields []string `json:"-"` 4148 } 4149 4150 func (s *Position) MarshalJSON() ([]byte, error) { 4151 type NoMethod Position 4152 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4153 } 4154 4155 // ProgressTimeseries: Information about the progress of some component of job 4156 // execution. 4157 type ProgressTimeseries struct { 4158 // CurrentProgress: The current progress of the component, in the range [0,1]. 4159 CurrentProgress float64 `json:"currentProgress,omitempty"` 4160 // DataPoints: History of progress for the component. Points are sorted by 4161 // time. 4162 DataPoints []*Point `json:"dataPoints,omitempty"` 4163 // ForceSendFields is a list of field names (e.g. "CurrentProgress") to 4164 // unconditionally include in API requests. By default, fields with empty or 4165 // default values are omitted from API requests. See 4166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4167 // details. 4168 ForceSendFields []string `json:"-"` 4169 // NullFields is a list of field names (e.g. "CurrentProgress") to include in 4170 // API requests with the JSON null value. By default, fields with empty values 4171 // are omitted from API requests. See 4172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4173 NullFields []string `json:"-"` 4174 } 4175 4176 func (s *ProgressTimeseries) MarshalJSON() ([]byte, error) { 4177 type NoMethod ProgressTimeseries 4178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4179 } 4180 4181 func (s *ProgressTimeseries) UnmarshalJSON(data []byte) error { 4182 type NoMethod ProgressTimeseries 4183 var s1 struct { 4184 CurrentProgress gensupport.JSONFloat64 `json:"currentProgress"` 4185 *NoMethod 4186 } 4187 s1.NoMethod = (*NoMethod)(s) 4188 if err := json.Unmarshal(data, &s1); err != nil { 4189 return err 4190 } 4191 s.CurrentProgress = float64(s1.CurrentProgress) 4192 return nil 4193 } 4194 4195 // PubSubIODetails: Metadata for a Pub/Sub connector used by the job. 4196 type PubSubIODetails struct { 4197 // Subscription: Subscription used in the connection. 4198 Subscription string `json:"subscription,omitempty"` 4199 // Topic: Topic accessed in the connection. 4200 Topic string `json:"topic,omitempty"` 4201 // ForceSendFields is a list of field names (e.g. "Subscription") to 4202 // unconditionally include in API requests. By default, fields with empty or 4203 // default values are omitted from API requests. See 4204 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4205 // details. 4206 ForceSendFields []string `json:"-"` 4207 // NullFields is a list of field names (e.g. "Subscription") to include in API 4208 // requests with the JSON null value. By default, fields with empty values are 4209 // omitted from API requests. See 4210 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4211 NullFields []string `json:"-"` 4212 } 4213 4214 func (s *PubSubIODetails) MarshalJSON() ([]byte, error) { 4215 type NoMethod PubSubIODetails 4216 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4217 } 4218 4219 // PubsubLocation: Identifies a pubsub location to use for transferring data 4220 // into or out of a streaming Dataflow job. 4221 type PubsubLocation struct { 4222 // DropLateData: Indicates whether the pipeline allows late-arriving data. 4223 DropLateData bool `json:"dropLateData,omitempty"` 4224 // DynamicDestinations: If true, then this location represents dynamic topics. 4225 DynamicDestinations bool `json:"dynamicDestinations,omitempty"` 4226 // IdLabel: If set, contains a pubsub label from which to extract record ids. 4227 // If left empty, record deduplication will be strictly best effort. 4228 IdLabel string `json:"idLabel,omitempty"` 4229 // Subscription: A pubsub subscription, in the form of 4230 // "pubsub.googleapis.com/subscriptions//" 4231 Subscription string `json:"subscription,omitempty"` 4232 // TimestampLabel: If set, contains a pubsub label from which to extract record 4233 // timestamps. If left empty, record timestamps will be generated upon arrival. 4234 TimestampLabel string `json:"timestampLabel,omitempty"` 4235 // Topic: A pubsub topic, in the form of "pubsub.googleapis.com/topics//" 4236 Topic string `json:"topic,omitempty"` 4237 // TrackingSubscription: If set, specifies the pubsub subscription that will be 4238 // used for tracking custom time timestamps for watermark estimation. 4239 TrackingSubscription string `json:"trackingSubscription,omitempty"` 4240 // WithAttributes: If true, then the client has requested to get pubsub 4241 // attributes. 4242 WithAttributes bool `json:"withAttributes,omitempty"` 4243 // ForceSendFields is a list of field names (e.g. "DropLateData") to 4244 // unconditionally include in API requests. By default, fields with empty or 4245 // default values are omitted from API requests. See 4246 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4247 // details. 4248 ForceSendFields []string `json:"-"` 4249 // NullFields is a list of field names (e.g. "DropLateData") to include in API 4250 // requests with the JSON null value. By default, fields with empty values are 4251 // omitted from API requests. See 4252 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4253 NullFields []string `json:"-"` 4254 } 4255 4256 func (s *PubsubLocation) MarshalJSON() ([]byte, error) { 4257 type NoMethod PubsubLocation 4258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4259 } 4260 4261 // PubsubSnapshotMetadata: Represents a Pubsub snapshot. 4262 type PubsubSnapshotMetadata struct { 4263 // ExpireTime: The expire time of the Pubsub snapshot. 4264 ExpireTime string `json:"expireTime,omitempty"` 4265 // SnapshotName: The name of the Pubsub snapshot. 4266 SnapshotName string `json:"snapshotName,omitempty"` 4267 // TopicName: The name of the Pubsub topic. 4268 TopicName string `json:"topicName,omitempty"` 4269 // ForceSendFields is a list of field names (e.g. "ExpireTime") to 4270 // unconditionally include in API requests. By default, fields with empty or 4271 // default values are omitted from API requests. See 4272 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4273 // details. 4274 ForceSendFields []string `json:"-"` 4275 // NullFields is a list of field names (e.g. "ExpireTime") to include in API 4276 // requests with the JSON null value. By default, fields with empty values are 4277 // omitted from API requests. See 4278 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4279 NullFields []string `json:"-"` 4280 } 4281 4282 func (s *PubsubSnapshotMetadata) MarshalJSON() ([]byte, error) { 4283 type NoMethod PubsubSnapshotMetadata 4284 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4285 } 4286 4287 // ReadInstruction: An instruction that reads records. Takes no inputs, 4288 // produces one output. 4289 type ReadInstruction struct { 4290 // Source: The source to read from. 4291 Source *Source `json:"source,omitempty"` 4292 // ForceSendFields is a list of field names (e.g. "Source") to unconditionally 4293 // include in API requests. By default, fields with empty or default values are 4294 // omitted from API requests. See 4295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4296 // details. 4297 ForceSendFields []string `json:"-"` 4298 // NullFields is a list of field names (e.g. "Source") to include in API 4299 // requests with the JSON null value. By default, fields with empty values are 4300 // omitted from API requests. See 4301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4302 NullFields []string `json:"-"` 4303 } 4304 4305 func (s *ReadInstruction) MarshalJSON() ([]byte, error) { 4306 type NoMethod ReadInstruction 4307 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4308 } 4309 4310 // ReportWorkItemStatusRequest: Request to report the status of WorkItems. 4311 type ReportWorkItemStatusRequest struct { 4312 // CurrentWorkerTime: The current timestamp at the worker. 4313 CurrentWorkerTime string `json:"currentWorkerTime,omitempty"` 4314 // Location: The [regional endpoint] 4315 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 4316 // contains the WorkItem's job. 4317 Location string `json:"location,omitempty"` 4318 // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkProgressUpdateRequest 4319 // from UnifiedWorker. 4320 UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` 4321 // WorkItemStatuses: The order is unimportant, except that the order of the 4322 // WorkItemServiceState messages in the ReportWorkItemStatusResponse 4323 // corresponds to the order of WorkItemStatus messages here. 4324 WorkItemStatuses []*WorkItemStatus `json:"workItemStatuses,omitempty"` 4325 // WorkerId: The ID of the worker reporting the WorkItem status. If this does 4326 // not match the ID of the worker which the Dataflow service believes currently 4327 // has the lease on the WorkItem, the report will be dropped (with an error 4328 // response). 4329 WorkerId string `json:"workerId,omitempty"` 4330 // ForceSendFields is a list of field names (e.g. "CurrentWorkerTime") to 4331 // unconditionally include in API requests. By default, fields with empty or 4332 // default values are omitted from API requests. See 4333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4334 // details. 4335 ForceSendFields []string `json:"-"` 4336 // NullFields is a list of field names (e.g. "CurrentWorkerTime") to include in 4337 // API requests with the JSON null value. By default, fields with empty values 4338 // are omitted from API requests. See 4339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4340 NullFields []string `json:"-"` 4341 } 4342 4343 func (s *ReportWorkItemStatusRequest) MarshalJSON() ([]byte, error) { 4344 type NoMethod ReportWorkItemStatusRequest 4345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4346 } 4347 4348 // ReportWorkItemStatusResponse: Response from a request to report the status 4349 // of WorkItems. 4350 type ReportWorkItemStatusResponse struct { 4351 // UnifiedWorkerResponse: Untranslated bag-of-bytes WorkProgressUpdateResponse 4352 // for UnifiedWorker. 4353 UnifiedWorkerResponse googleapi.RawMessage `json:"unifiedWorkerResponse,omitempty"` 4354 // WorkItemServiceStates: A set of messages indicating the service-side state 4355 // for each WorkItem whose status was reported, in the same order as the 4356 // WorkItemStatus messages in the ReportWorkItemStatusRequest which resulting 4357 // in this response. 4358 WorkItemServiceStates []*WorkItemServiceState `json:"workItemServiceStates,omitempty"` 4359 4360 // ServerResponse contains the HTTP response code and headers from the server. 4361 googleapi.ServerResponse `json:"-"` 4362 // ForceSendFields is a list of field names (e.g. "UnifiedWorkerResponse") to 4363 // unconditionally include in API requests. By default, fields with empty or 4364 // default values are omitted from API requests. See 4365 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4366 // details. 4367 ForceSendFields []string `json:"-"` 4368 // NullFields is a list of field names (e.g. "UnifiedWorkerResponse") to 4369 // include in API requests with the JSON null value. By default, fields with 4370 // empty values are omitted from API requests. See 4371 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4372 NullFields []string `json:"-"` 4373 } 4374 4375 func (s *ReportWorkItemStatusResponse) MarshalJSON() ([]byte, error) { 4376 type NoMethod ReportWorkItemStatusResponse 4377 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4378 } 4379 4380 // ReportedParallelism: Represents the level of parallelism in a WorkItem's 4381 // input, reported by the worker. 4382 type ReportedParallelism struct { 4383 // IsInfinite: Specifies whether the parallelism is infinite. If true, "value" 4384 // is ignored. Infinite parallelism means the service will assume that the work 4385 // item can always be split into more non-empty work items by dynamic 4386 // splitting. This is a work-around for lack of support for infinity by the 4387 // current JSON-based Java RPC stack. 4388 IsInfinite bool `json:"isInfinite,omitempty"` 4389 // Value: Specifies the level of parallelism in case it is finite. 4390 Value float64 `json:"value,omitempty"` 4391 // ForceSendFields is a list of field names (e.g. "IsInfinite") to 4392 // unconditionally include in API requests. By default, fields with empty or 4393 // default values are omitted from API requests. See 4394 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4395 // details. 4396 ForceSendFields []string `json:"-"` 4397 // NullFields is a list of field names (e.g. "IsInfinite") to include in API 4398 // requests with the JSON null value. By default, fields with empty values are 4399 // omitted from API requests. See 4400 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4401 NullFields []string `json:"-"` 4402 } 4403 4404 func (s *ReportedParallelism) MarshalJSON() ([]byte, error) { 4405 type NoMethod ReportedParallelism 4406 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4407 } 4408 4409 func (s *ReportedParallelism) UnmarshalJSON(data []byte) error { 4410 type NoMethod ReportedParallelism 4411 var s1 struct { 4412 Value gensupport.JSONFloat64 `json:"value"` 4413 *NoMethod 4414 } 4415 s1.NoMethod = (*NoMethod)(s) 4416 if err := json.Unmarshal(data, &s1); err != nil { 4417 return err 4418 } 4419 s.Value = float64(s1.Value) 4420 return nil 4421 } 4422 4423 // ResourceUtilizationReport: Worker metrics exported from workers. This 4424 // contains resource utilization metrics accumulated from a variety of sources. 4425 // For more information, see go/df-resource-signals. 4426 type ResourceUtilizationReport struct { 4427 // Containers: Per container information. Key: container name. 4428 Containers map[string]ResourceUtilizationReport `json:"containers,omitempty"` 4429 // CpuTime: CPU utilization samples. 4430 CpuTime []*CPUTime `json:"cpuTime,omitempty"` 4431 // MemoryInfo: Memory utilization samples. 4432 MemoryInfo []*MemInfo `json:"memoryInfo,omitempty"` 4433 // ForceSendFields is a list of field names (e.g. "Containers") to 4434 // unconditionally include in API requests. By default, fields with empty or 4435 // default values are omitted from API requests. See 4436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4437 // details. 4438 ForceSendFields []string `json:"-"` 4439 // NullFields is a list of field names (e.g. "Containers") to include in API 4440 // requests with the JSON null value. By default, fields with empty values are 4441 // omitted from API requests. See 4442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4443 NullFields []string `json:"-"` 4444 } 4445 4446 func (s *ResourceUtilizationReport) MarshalJSON() ([]byte, error) { 4447 type NoMethod ResourceUtilizationReport 4448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4449 } 4450 4451 // ResourceUtilizationReportResponse: Service-side response to WorkerMessage 4452 // reporting resource utilization. 4453 type ResourceUtilizationReportResponse struct { 4454 } 4455 4456 // RuntimeEnvironment: The environment values to set at runtime. LINT.IfChange 4457 type RuntimeEnvironment struct { 4458 // AdditionalExperiments: Optional. Additional experiment flags for the job, 4459 // specified with the `--experiments` option. 4460 AdditionalExperiments []string `json:"additionalExperiments,omitempty"` 4461 // AdditionalUserLabels: Optional. Additional user labels to be specified for 4462 // the job. Keys and values should follow the restrictions specified in the 4463 // labeling restrictions 4464 // (https://cloud.google.com/compute/docs/labeling-resources#restrictions) 4465 // page. An object containing a list of "key": value pairs. Example: { "name": 4466 // "wrench", "mass": "1kg", "count": "3" }. 4467 AdditionalUserLabels map[string]string `json:"additionalUserLabels,omitempty"` 4468 // BypassTempDirValidation: Optional. Whether to bypass the safety checks for 4469 // the job's temporary directory. Use with caution. 4470 BypassTempDirValidation bool `json:"bypassTempDirValidation,omitempty"` 4471 // DiskSizeGb: Optional. The disk size, in gigabytes, to use on each remote 4472 // Compute Engine worker instance. 4473 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 4474 // EnableStreamingEngine: Optional. Whether to enable Streaming Engine for the 4475 // job. 4476 EnableStreamingEngine bool `json:"enableStreamingEngine,omitempty"` 4477 // IpConfiguration: Optional. Configuration for VM IPs. 4478 // 4479 // Possible values: 4480 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or unspecified. 4481 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 4482 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 4483 IpConfiguration string `json:"ipConfiguration,omitempty"` 4484 // KmsKeyName: Optional. Name for the Cloud KMS key for the job. Key format is: 4485 // projects//locations//keyRings//cryptoKeys/ 4486 KmsKeyName string `json:"kmsKeyName,omitempty"` 4487 // MachineType: Optional. The machine type to use for the job. Defaults to the 4488 // value from the template if not specified. 4489 MachineType string `json:"machineType,omitempty"` 4490 // MaxWorkers: Optional. The maximum number of Google Compute Engine instances 4491 // to be made available to your pipeline during execution, from 1 to 1000. The 4492 // default value is 1. 4493 MaxWorkers int64 `json:"maxWorkers,omitempty"` 4494 // Network: Optional. Network to which VMs will be assigned. If empty or 4495 // unspecified, the service will use the network "default". 4496 Network string `json:"network,omitempty"` 4497 // NumWorkers: Optional. The initial number of Google Compute Engine instances 4498 // for the job. The default value is 11. 4499 NumWorkers int64 `json:"numWorkers,omitempty"` 4500 // ServiceAccountEmail: Optional. The email address of the service account to 4501 // run the job as. 4502 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 4503 // StreamingMode: Optional. Specifies the Streaming Engine message processing 4504 // guarantees. Reduces cost and latency but might result in duplicate messages 4505 // committed to storage. Designed to run simple mapping streaming ETL jobs at 4506 // the lowest cost. For example, Change Data Capture (CDC) to BigQuery is a 4507 // canonical use case. For more information, see Set the pipeline streaming 4508 // mode (https://cloud.google.com/dataflow/docs/guides/streaming-modes). 4509 // 4510 // Possible values: 4511 // "STREAMING_MODE_UNSPECIFIED" - Run in the default mode. 4512 // "STREAMING_MODE_EXACTLY_ONCE" - In this mode, message deduplication is 4513 // performed against persistent state to make sure each message is processed 4514 // and committed to storage exactly once. 4515 // "STREAMING_MODE_AT_LEAST_ONCE" - Message deduplication is not performed. 4516 // Messages might be processed multiple times, and the results are applied 4517 // multiple times. Note: Setting this value also enables Streaming Engine and 4518 // Streaming Engine resource-based billing. 4519 StreamingMode string `json:"streamingMode,omitempty"` 4520 // Subnetwork: Optional. Subnetwork to which VMs will be assigned, if desired. 4521 // You can specify a subnetwork using either a complete URL or an abbreviated 4522 // path. Expected to be of the form 4523 // "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGIO 4524 // N/subnetworks/SUBNETWORK" or "regions/REGION/subnetworks/SUBNETWORK". If the 4525 // subnetwork is located in a Shared VPC network, you must use the complete 4526 // URL. 4527 Subnetwork string `json:"subnetwork,omitempty"` 4528 // TempLocation: Required. The Cloud Storage path to use for temporary files. 4529 // Must be a valid Cloud Storage URL, beginning with `gs://`. 4530 TempLocation string `json:"tempLocation,omitempty"` 4531 // WorkerRegion: Required. The Compute Engine region 4532 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which 4533 // worker processing should occur, e.g. "us-west1". Mutually exclusive with 4534 // worker_zone. If neither worker_region nor worker_zone is specified, default 4535 // to the control plane's region. 4536 WorkerRegion string `json:"workerRegion,omitempty"` 4537 // WorkerZone: Optional. The Compute Engine zone 4538 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in which 4539 // worker processing should occur, e.g. "us-west1-a". Mutually exclusive with 4540 // worker_region. If neither worker_region nor worker_zone is specified, a zone 4541 // in the control plane's region is chosen based on available capacity. If both 4542 // `worker_zone` and `zone` are set, `worker_zone` takes precedence. 4543 WorkerZone string `json:"workerZone,omitempty"` 4544 // Zone: Optional. The Compute Engine availability zone 4545 // (https://cloud.google.com/compute/docs/regions-zones/regions-zones) for 4546 // launching worker instances to run your pipeline. In the future, worker_zone 4547 // will take precedence. 4548 Zone string `json:"zone,omitempty"` 4549 // ForceSendFields is a list of field names (e.g. "AdditionalExperiments") to 4550 // unconditionally include in API requests. By default, fields with empty or 4551 // default values are omitted from API requests. See 4552 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4553 // details. 4554 ForceSendFields []string `json:"-"` 4555 // NullFields is a list of field names (e.g. "AdditionalExperiments") to 4556 // include in API requests with the JSON null value. By default, fields with 4557 // empty values are omitted from API requests. See 4558 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4559 NullFields []string `json:"-"` 4560 } 4561 4562 func (s *RuntimeEnvironment) MarshalJSON() ([]byte, error) { 4563 type NoMethod RuntimeEnvironment 4564 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4565 } 4566 4567 // RuntimeMetadata: RuntimeMetadata describing a runtime environment. 4568 type RuntimeMetadata struct { 4569 // Parameters: The parameters for the template. 4570 Parameters []*ParameterMetadata `json:"parameters,omitempty"` 4571 // SdkInfo: SDK Info for the template. 4572 SdkInfo *SDKInfo `json:"sdkInfo,omitempty"` 4573 // ForceSendFields is a list of field names (e.g. "Parameters") to 4574 // unconditionally include in API requests. By default, fields with empty or 4575 // default values are omitted from API requests. See 4576 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4577 // details. 4578 ForceSendFields []string `json:"-"` 4579 // NullFields is a list of field names (e.g. "Parameters") to include in API 4580 // requests with the JSON null value. By default, fields with empty values are 4581 // omitted from API requests. See 4582 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4583 NullFields []string `json:"-"` 4584 } 4585 4586 func (s *RuntimeMetadata) MarshalJSON() ([]byte, error) { 4587 type NoMethod RuntimeMetadata 4588 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4589 } 4590 4591 // RuntimeUpdatableParams: Additional job parameters that can only be updated 4592 // during runtime using the projects.jobs.update method. These fields have no 4593 // effect when specified during job creation. 4594 type RuntimeUpdatableParams struct { 4595 // MaxNumWorkers: The maximum number of workers to cap autoscaling at. This 4596 // field is currently only supported for Streaming Engine jobs. 4597 MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"` 4598 // MinNumWorkers: The minimum number of workers to scale down to. This field is 4599 // currently only supported for Streaming Engine jobs. 4600 MinNumWorkers int64 `json:"minNumWorkers,omitempty"` 4601 // WorkerUtilizationHint: Target worker utilization, compared against the 4602 // aggregate utilization of the worker pool by autoscaler, to determine 4603 // upscaling and downscaling when absent other constraints such as backlog. For 4604 // more information, see Update an existing pipeline 4605 // (https://cloud.google.com/dataflow/docs/guides/updating-a-pipeline). 4606 WorkerUtilizationHint float64 `json:"workerUtilizationHint,omitempty"` 4607 // ForceSendFields is a list of field names (e.g. "MaxNumWorkers") to 4608 // unconditionally include in API requests. By default, fields with empty or 4609 // default values are omitted from API requests. See 4610 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4611 // details. 4612 ForceSendFields []string `json:"-"` 4613 // NullFields is a list of field names (e.g. "MaxNumWorkers") to include in API 4614 // requests with the JSON null value. By default, fields with empty values are 4615 // omitted from API requests. See 4616 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4617 NullFields []string `json:"-"` 4618 } 4619 4620 func (s *RuntimeUpdatableParams) MarshalJSON() ([]byte, error) { 4621 type NoMethod RuntimeUpdatableParams 4622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4623 } 4624 4625 func (s *RuntimeUpdatableParams) UnmarshalJSON(data []byte) error { 4626 type NoMethod RuntimeUpdatableParams 4627 var s1 struct { 4628 WorkerUtilizationHint gensupport.JSONFloat64 `json:"workerUtilizationHint"` 4629 *NoMethod 4630 } 4631 s1.NoMethod = (*NoMethod)(s) 4632 if err := json.Unmarshal(data, &s1); err != nil { 4633 return err 4634 } 4635 s.WorkerUtilizationHint = float64(s1.WorkerUtilizationHint) 4636 return nil 4637 } 4638 4639 // SDKInfo: SDK Information. 4640 type SDKInfo struct { 4641 // Language: Required. The SDK Language. 4642 // 4643 // Possible values: 4644 // "UNKNOWN" - UNKNOWN Language. 4645 // "JAVA" - Java. 4646 // "PYTHON" - Python. 4647 // "GO" - Go. 4648 Language string `json:"language,omitempty"` 4649 // Version: Optional. The SDK version. 4650 Version string `json:"version,omitempty"` 4651 // ForceSendFields is a list of field names (e.g. "Language") to 4652 // unconditionally include in API requests. By default, fields with empty or 4653 // default values are omitted from API requests. See 4654 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4655 // details. 4656 ForceSendFields []string `json:"-"` 4657 // NullFields is a list of field names (e.g. "Language") to include in API 4658 // requests with the JSON null value. By default, fields with empty values are 4659 // omitted from API requests. See 4660 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4661 NullFields []string `json:"-"` 4662 } 4663 4664 func (s *SDKInfo) MarshalJSON() ([]byte, error) { 4665 type NoMethod SDKInfo 4666 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4667 } 4668 4669 // SdkBug: A bug found in the Dataflow SDK. 4670 type SdkBug struct { 4671 // Severity: Output only. How severe the SDK bug is. 4672 // 4673 // Possible values: 4674 // "SEVERITY_UNSPECIFIED" - A bug of unknown severity. 4675 // "NOTICE" - A minor bug that that may reduce reliability or performance for 4676 // some jobs. Impact will be minimal or non-existent for most jobs. 4677 // "WARNING" - A bug that has some likelihood of causing performance 4678 // degradation, data loss, or job failures. 4679 // "SEVERE" - A bug with extremely significant impact. Jobs may fail 4680 // erroneously, performance may be severely degraded, and data loss may be very 4681 // likely. 4682 Severity string `json:"severity,omitempty"` 4683 // Type: Output only. Describes the impact of this SDK bug. 4684 // 4685 // Possible values: 4686 // "TYPE_UNSPECIFIED" - Unknown issue with this SDK. 4687 // "GENERAL" - Catch-all for SDK bugs that don't fit in the below categories. 4688 // "PERFORMANCE" - Using this version of the SDK may result in degraded 4689 // performance. 4690 // "DATALOSS" - Using this version of the SDK may cause data loss. 4691 Type string `json:"type,omitempty"` 4692 // Uri: Output only. Link to more information on the bug. 4693 Uri string `json:"uri,omitempty"` 4694 // ForceSendFields is a list of field names (e.g. "Severity") to 4695 // unconditionally include in API requests. By default, fields with empty or 4696 // default values are omitted from API requests. See 4697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4698 // details. 4699 ForceSendFields []string `json:"-"` 4700 // NullFields is a list of field names (e.g. "Severity") to include in API 4701 // requests with the JSON null value. By default, fields with empty values are 4702 // omitted from API requests. See 4703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4704 NullFields []string `json:"-"` 4705 } 4706 4707 func (s *SdkBug) MarshalJSON() ([]byte, error) { 4708 type NoMethod SdkBug 4709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4710 } 4711 4712 // SdkHarnessContainerImage: Defines an SDK harness container for executing 4713 // Dataflow pipelines. 4714 type SdkHarnessContainerImage struct { 4715 // Capabilities: The set of capabilities enumerated in the above Environment 4716 // proto. See also beam_runner_api.proto 4717 // (https://github.com/apache/beam/blob/master/model/pipeline/src/main/proto/org/apache/beam/model/pipeline/v1/beam_runner_api.proto) 4718 Capabilities []string `json:"capabilities,omitempty"` 4719 // ContainerImage: A docker container image that resides in Google Container 4720 // Registry. 4721 ContainerImage string `json:"containerImage,omitempty"` 4722 // EnvironmentId: Environment ID for the Beam runner API proto Environment that 4723 // corresponds to the current SDK Harness. 4724 EnvironmentId string `json:"environmentId,omitempty"` 4725 // UseSingleCorePerContainer: If true, recommends the Dataflow service to use 4726 // only one core per SDK container instance with this image. If false (or 4727 // unset) recommends using more than one core per SDK container instance with 4728 // this image for efficiency. Note that Dataflow service may choose to override 4729 // this property if needed. 4730 UseSingleCorePerContainer bool `json:"useSingleCorePerContainer,omitempty"` 4731 // ForceSendFields is a list of field names (e.g. "Capabilities") to 4732 // unconditionally include in API requests. By default, fields with empty or 4733 // default values are omitted from API requests. See 4734 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4735 // details. 4736 ForceSendFields []string `json:"-"` 4737 // NullFields is a list of field names (e.g. "Capabilities") to include in API 4738 // requests with the JSON null value. By default, fields with empty values are 4739 // omitted from API requests. See 4740 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4741 NullFields []string `json:"-"` 4742 } 4743 4744 func (s *SdkHarnessContainerImage) MarshalJSON() ([]byte, error) { 4745 type NoMethod SdkHarnessContainerImage 4746 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4747 } 4748 4749 // SdkVersion: The version of the SDK used to run the job. 4750 type SdkVersion struct { 4751 // Bugs: Output only. Known bugs found in this SDK version. 4752 Bugs []*SdkBug `json:"bugs,omitempty"` 4753 // SdkSupportStatus: The support status for this SDK version. 4754 // 4755 // Possible values: 4756 // "UNKNOWN" - Cloud Dataflow is unaware of this version. 4757 // "SUPPORTED" - This is a known version of an SDK, and is supported. 4758 // "STALE" - A newer version of the SDK family exists, and an update is 4759 // recommended. 4760 // "DEPRECATED" - This version of the SDK is deprecated and will eventually 4761 // be unsupported. 4762 // "UNSUPPORTED" - Support for this SDK version has ended and it should no 4763 // longer be used. 4764 SdkSupportStatus string `json:"sdkSupportStatus,omitempty"` 4765 // Version: The version of the SDK used to run the job. 4766 Version string `json:"version,omitempty"` 4767 // VersionDisplayName: A readable string describing the version of the SDK. 4768 VersionDisplayName string `json:"versionDisplayName,omitempty"` 4769 // ForceSendFields is a list of field names (e.g. "Bugs") to unconditionally 4770 // include in API requests. By default, fields with empty or default values are 4771 // omitted from API requests. See 4772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4773 // details. 4774 ForceSendFields []string `json:"-"` 4775 // NullFields is a list of field names (e.g. "Bugs") to include in API requests 4776 // with the JSON null value. By default, fields with empty values are omitted 4777 // from API requests. See 4778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4779 NullFields []string `json:"-"` 4780 } 4781 4782 func (s *SdkVersion) MarshalJSON() ([]byte, error) { 4783 type NoMethod SdkVersion 4784 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4785 } 4786 4787 // SendDebugCaptureRequest: Request to send encoded debug information. Next ID: 4788 // 8 4789 type SendDebugCaptureRequest struct { 4790 // ComponentId: The internal component id for which debug information is sent. 4791 ComponentId string `json:"componentId,omitempty"` 4792 // Data: The encoded debug information. 4793 Data string `json:"data,omitempty"` 4794 // DataFormat: Format for the data field above (id=5). 4795 // 4796 // Possible values: 4797 // "DATA_FORMAT_UNSPECIFIED" - Format unspecified, parsing is determined 4798 // based upon page type and legacy encoding. 4799 // (go/protodosdonts#do-include-an-unspecified-value-in-an-enum) 4800 // "RAW" - Raw HTML string. 4801 // "JSON" - JSON-encoded string. 4802 // "ZLIB" - Websafe encoded zlib-compressed string. 4803 // "BROTLI" - Websafe encoded brotli-compressed string. 4804 DataFormat string `json:"dataFormat,omitempty"` 4805 // Location: The [regional endpoint] 4806 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 4807 // contains the job specified by job_id. 4808 Location string `json:"location,omitempty"` 4809 // WorkerId: The worker id, i.e., VM hostname. 4810 WorkerId string `json:"workerId,omitempty"` 4811 // ForceSendFields is a list of field names (e.g. "ComponentId") to 4812 // unconditionally include in API requests. By default, fields with empty or 4813 // default values are omitted from API requests. See 4814 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4815 // details. 4816 ForceSendFields []string `json:"-"` 4817 // NullFields is a list of field names (e.g. "ComponentId") to include in API 4818 // requests with the JSON null value. By default, fields with empty values are 4819 // omitted from API requests. See 4820 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4821 NullFields []string `json:"-"` 4822 } 4823 4824 func (s *SendDebugCaptureRequest) MarshalJSON() ([]byte, error) { 4825 type NoMethod SendDebugCaptureRequest 4826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4827 } 4828 4829 // SendDebugCaptureResponse: Response to a send capture request. nothing 4830 type SendDebugCaptureResponse struct { 4831 // ServerResponse contains the HTTP response code and headers from the server. 4832 googleapi.ServerResponse `json:"-"` 4833 } 4834 4835 // SendWorkerMessagesRequest: A request for sending worker messages to the 4836 // service. 4837 type SendWorkerMessagesRequest struct { 4838 // Location: The [regional endpoint] 4839 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 4840 // contains the job. 4841 Location string `json:"location,omitempty"` 4842 // WorkerMessages: The WorkerMessages to send. 4843 WorkerMessages []*WorkerMessage `json:"workerMessages,omitempty"` 4844 // ForceSendFields is a list of field names (e.g. "Location") to 4845 // unconditionally include in API requests. By default, fields with empty or 4846 // default values are omitted from API requests. See 4847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4848 // details. 4849 ForceSendFields []string `json:"-"` 4850 // NullFields is a list of field names (e.g. "Location") to include in API 4851 // requests with the JSON null value. By default, fields with empty values are 4852 // omitted from API requests. See 4853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4854 NullFields []string `json:"-"` 4855 } 4856 4857 func (s *SendWorkerMessagesRequest) MarshalJSON() ([]byte, error) { 4858 type NoMethod SendWorkerMessagesRequest 4859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4860 } 4861 4862 // SendWorkerMessagesResponse: The response to the worker messages. 4863 type SendWorkerMessagesResponse struct { 4864 // WorkerMessageResponses: The servers response to the worker messages. 4865 WorkerMessageResponses []*WorkerMessageResponse `json:"workerMessageResponses,omitempty"` 4866 4867 // ServerResponse contains the HTTP response code and headers from the server. 4868 googleapi.ServerResponse `json:"-"` 4869 // ForceSendFields is a list of field names (e.g. "WorkerMessageResponses") to 4870 // unconditionally include in API requests. By default, fields with empty or 4871 // default values are omitted from API requests. See 4872 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4873 // details. 4874 ForceSendFields []string `json:"-"` 4875 // NullFields is a list of field names (e.g. "WorkerMessageResponses") to 4876 // include in API requests with the JSON null value. By default, fields with 4877 // empty values are omitted from API requests. See 4878 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4879 NullFields []string `json:"-"` 4880 } 4881 4882 func (s *SendWorkerMessagesResponse) MarshalJSON() ([]byte, error) { 4883 type NoMethod SendWorkerMessagesResponse 4884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4885 } 4886 4887 // SeqMapTask: Describes a particular function to invoke. 4888 type SeqMapTask struct { 4889 // Inputs: Information about each of the inputs. 4890 Inputs []*SideInputInfo `json:"inputs,omitempty"` 4891 // Name: The user-provided name of the SeqDo operation. 4892 Name string `json:"name,omitempty"` 4893 // OutputInfos: Information about each of the outputs. 4894 OutputInfos []*SeqMapTaskOutputInfo `json:"outputInfos,omitempty"` 4895 // StageName: System-defined name of the stage containing the SeqDo operation. 4896 // Unique across the workflow. 4897 StageName string `json:"stageName,omitempty"` 4898 // SystemName: System-defined name of the SeqDo operation. Unique across the 4899 // workflow. 4900 SystemName string `json:"systemName,omitempty"` 4901 // UserFn: The user function to invoke. 4902 UserFn googleapi.RawMessage `json:"userFn,omitempty"` 4903 // ForceSendFields is a list of field names (e.g. "Inputs") to unconditionally 4904 // include in API requests. By default, fields with empty or default values are 4905 // omitted from API requests. See 4906 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4907 // details. 4908 ForceSendFields []string `json:"-"` 4909 // NullFields is a list of field names (e.g. "Inputs") to include in API 4910 // requests with the JSON null value. By default, fields with empty values are 4911 // omitted from API requests. See 4912 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4913 NullFields []string `json:"-"` 4914 } 4915 4916 func (s *SeqMapTask) MarshalJSON() ([]byte, error) { 4917 type NoMethod SeqMapTask 4918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4919 } 4920 4921 // SeqMapTaskOutputInfo: Information about an output of a SeqMapTask. 4922 type SeqMapTaskOutputInfo struct { 4923 // Sink: The sink to write the output value to. 4924 Sink *Sink `json:"sink,omitempty"` 4925 // Tag: The id of the TupleTag the user code will tag the output value by. 4926 Tag string `json:"tag,omitempty"` 4927 // ForceSendFields is a list of field names (e.g. "Sink") to unconditionally 4928 // include in API requests. By default, fields with empty or default values are 4929 // omitted from API requests. See 4930 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4931 // details. 4932 ForceSendFields []string `json:"-"` 4933 // NullFields is a list of field names (e.g. "Sink") to include in API requests 4934 // with the JSON null value. By default, fields with empty values are omitted 4935 // from API requests. See 4936 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4937 NullFields []string `json:"-"` 4938 } 4939 4940 func (s *SeqMapTaskOutputInfo) MarshalJSON() ([]byte, error) { 4941 type NoMethod SeqMapTaskOutputInfo 4942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4943 } 4944 4945 // ShellTask: A task which consists of a shell command for the worker to 4946 // execute. 4947 type ShellTask struct { 4948 // Command: The shell command to run. 4949 Command string `json:"command,omitempty"` 4950 // ExitCode: Exit code for the task. 4951 ExitCode int64 `json:"exitCode,omitempty"` 4952 // ForceSendFields is a list of field names (e.g. "Command") to unconditionally 4953 // include in API requests. By default, fields with empty or default values are 4954 // omitted from API requests. See 4955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4956 // details. 4957 ForceSendFields []string `json:"-"` 4958 // NullFields is a list of field names (e.g. "Command") to include in API 4959 // requests with the JSON null value. By default, fields with empty values are 4960 // omitted from API requests. See 4961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4962 NullFields []string `json:"-"` 4963 } 4964 4965 func (s *ShellTask) MarshalJSON() ([]byte, error) { 4966 type NoMethod ShellTask 4967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4968 } 4969 4970 // SideInputInfo: Information about a side input of a DoFn or an input of a 4971 // SeqDoFn. 4972 type SideInputInfo struct { 4973 // Kind: How to interpret the source element(s) as a side input value. 4974 Kind googleapi.RawMessage `json:"kind,omitempty"` 4975 // Sources: The source(s) to read element(s) from to get the value of this side 4976 // input. If more than one source, then the elements are taken from the 4977 // sources, in the specified order if order matters. At least one source is 4978 // required. 4979 Sources []*Source `json:"sources,omitempty"` 4980 // Tag: The id of the tag the user code will access this side input by; this 4981 // should correspond to the tag of some MultiOutputInfo. 4982 Tag string `json:"tag,omitempty"` 4983 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 4984 // include in API requests. By default, fields with empty or default values are 4985 // omitted from API requests. See 4986 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4987 // details. 4988 ForceSendFields []string `json:"-"` 4989 // NullFields is a list of field names (e.g. "Kind") to include in API requests 4990 // with the JSON null value. By default, fields with empty values are omitted 4991 // from API requests. See 4992 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4993 NullFields []string `json:"-"` 4994 } 4995 4996 func (s *SideInputInfo) MarshalJSON() ([]byte, error) { 4997 type NoMethod SideInputInfo 4998 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4999 } 5000 5001 // Sink: A sink that records can be encoded and written to. 5002 type Sink struct { 5003 // Codec: The codec to use to encode data written to the sink. 5004 Codec googleapi.RawMessage `json:"codec,omitempty"` 5005 // Spec: The sink to write to, plus its parameters. 5006 Spec googleapi.RawMessage `json:"spec,omitempty"` 5007 // ForceSendFields is a list of field names (e.g. "Codec") to unconditionally 5008 // include in API requests. By default, fields with empty or default values are 5009 // omitted from API requests. See 5010 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5011 // details. 5012 ForceSendFields []string `json:"-"` 5013 // NullFields is a list of field names (e.g. "Codec") to include in API 5014 // requests with the JSON null value. By default, fields with empty values are 5015 // omitted from API requests. See 5016 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5017 NullFields []string `json:"-"` 5018 } 5019 5020 func (s *Sink) MarshalJSON() ([]byte, error) { 5021 type NoMethod Sink 5022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5023 } 5024 5025 // Snapshot: Represents a snapshot of a job. 5026 type Snapshot struct { 5027 // CreationTime: The time this snapshot was created. 5028 CreationTime string `json:"creationTime,omitempty"` 5029 // Description: User specified description of the snapshot. Maybe empty. 5030 Description string `json:"description,omitempty"` 5031 // DiskSizeBytes: The disk byte size of the snapshot. Only available for 5032 // snapshots in READY state. 5033 DiskSizeBytes int64 `json:"diskSizeBytes,omitempty,string"` 5034 // Id: The unique ID of this snapshot. 5035 Id string `json:"id,omitempty"` 5036 // ProjectId: The project this snapshot belongs to. 5037 ProjectId string `json:"projectId,omitempty"` 5038 // PubsubMetadata: Pub/Sub snapshot metadata. 5039 PubsubMetadata []*PubsubSnapshotMetadata `json:"pubsubMetadata,omitempty"` 5040 // Region: Cloud region where this snapshot lives in, e.g., "us-central1". 5041 Region string `json:"region,omitempty"` 5042 // SourceJobId: The job this snapshot was created from. 5043 SourceJobId string `json:"sourceJobId,omitempty"` 5044 // State: State of the snapshot. 5045 // 5046 // Possible values: 5047 // "UNKNOWN_SNAPSHOT_STATE" - Unknown state. 5048 // "PENDING" - Snapshot intent to create has been persisted, snapshotting of 5049 // state has not yet started. 5050 // "RUNNING" - Snapshotting is being performed. 5051 // "READY" - Snapshot has been created and is ready to be used. 5052 // "FAILED" - Snapshot failed to be created. 5053 // "DELETED" - Snapshot has been deleted. 5054 State string `json:"state,omitempty"` 5055 // Ttl: The time after which this snapshot will be automatically deleted. 5056 Ttl string `json:"ttl,omitempty"` 5057 5058 // ServerResponse contains the HTTP response code and headers from the server. 5059 googleapi.ServerResponse `json:"-"` 5060 // ForceSendFields is a list of field names (e.g. "CreationTime") to 5061 // unconditionally include in API requests. By default, fields with empty or 5062 // default values are omitted from API requests. See 5063 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5064 // details. 5065 ForceSendFields []string `json:"-"` 5066 // NullFields is a list of field names (e.g. "CreationTime") to include in API 5067 // requests with the JSON null value. By default, fields with empty values are 5068 // omitted from API requests. See 5069 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5070 NullFields []string `json:"-"` 5071 } 5072 5073 func (s *Snapshot) MarshalJSON() ([]byte, error) { 5074 type NoMethod Snapshot 5075 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5076 } 5077 5078 // SnapshotJobRequest: Request to create a snapshot of a job. 5079 type SnapshotJobRequest struct { 5080 // Description: User specified description of the snapshot. Maybe empty. 5081 Description string `json:"description,omitempty"` 5082 // Location: The location that contains this job. 5083 Location string `json:"location,omitempty"` 5084 // SnapshotSources: If true, perform snapshots for sources which support this. 5085 SnapshotSources bool `json:"snapshotSources,omitempty"` 5086 // Ttl: TTL for the snapshot. 5087 Ttl string `json:"ttl,omitempty"` 5088 // ForceSendFields is a list of field names (e.g. "Description") to 5089 // unconditionally include in API requests. By default, fields with empty or 5090 // default values are omitted from API requests. See 5091 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5092 // details. 5093 ForceSendFields []string `json:"-"` 5094 // NullFields is a list of field names (e.g. "Description") to include in API 5095 // requests with the JSON null value. By default, fields with empty values are 5096 // omitted from API requests. See 5097 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5098 NullFields []string `json:"-"` 5099 } 5100 5101 func (s *SnapshotJobRequest) MarshalJSON() ([]byte, error) { 5102 type NoMethod SnapshotJobRequest 5103 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5104 } 5105 5106 // Source: A source that records can be read and decoded from. 5107 type Source struct { 5108 // BaseSpecs: While splitting, sources may specify the produced bundles as 5109 // differences against another source, in order to save backend-side memory and 5110 // allow bigger jobs. For details, see SourceSplitRequest. To support this use 5111 // case, the full set of parameters of the source is logically obtained by 5112 // taking the latest explicitly specified value of each parameter in the order: 5113 // base_specs (later items win), spec (overrides anything in base_specs). 5114 BaseSpecs []googleapi.RawMessage `json:"baseSpecs,omitempty"` 5115 // Codec: The codec to use to decode data read from the source. 5116 Codec googleapi.RawMessage `json:"codec,omitempty"` 5117 // DoesNotNeedSplitting: Setting this value to true hints to the framework that 5118 // the source doesn't need splitting, and using SourceSplitRequest on it would 5119 // yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. E.g. a file splitter may set this to 5120 // true when splitting a single file into a set of byte ranges of appropriate 5121 // size, and set this to false when splitting a filepattern into individual 5122 // files. However, for efficiency, a file splitter may decide to produce file 5123 // subranges directly from the filepattern to avoid a splitting round-trip. See 5124 // SourceSplitRequest for an overview of the splitting process. This field is 5125 // meaningful only in the Source objects populated by the user (e.g. when 5126 // filling in a DerivedSource). Source objects supplied by the framework to the 5127 // user don't have this field populated. 5128 DoesNotNeedSplitting bool `json:"doesNotNeedSplitting,omitempty"` 5129 // Metadata: Optionally, metadata for this source can be supplied right away, 5130 // avoiding a SourceGetMetadataOperation roundtrip (see 5131 // SourceOperationRequest). This field is meaningful only in the Source objects 5132 // populated by the user (e.g. when filling in a DerivedSource). Source objects 5133 // supplied by the framework to the user don't have this field populated. 5134 Metadata *SourceMetadata `json:"metadata,omitempty"` 5135 // Spec: The source to read from, plus its parameters. 5136 Spec googleapi.RawMessage `json:"spec,omitempty"` 5137 // ForceSendFields is a list of field names (e.g. "BaseSpecs") to 5138 // unconditionally include in API requests. By default, fields with empty or 5139 // default values are omitted from API requests. See 5140 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5141 // details. 5142 ForceSendFields []string `json:"-"` 5143 // NullFields is a list of field names (e.g. "BaseSpecs") to include in API 5144 // requests with the JSON null value. By default, fields with empty values are 5145 // omitted from API requests. See 5146 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5147 NullFields []string `json:"-"` 5148 } 5149 5150 func (s *Source) MarshalJSON() ([]byte, error) { 5151 type NoMethod Source 5152 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5153 } 5154 5155 // SourceFork: DEPRECATED in favor of DynamicSourceSplit. 5156 type SourceFork struct { 5157 // Primary: DEPRECATED 5158 Primary *SourceSplitShard `json:"primary,omitempty"` 5159 // PrimarySource: DEPRECATED 5160 PrimarySource *DerivedSource `json:"primarySource,omitempty"` 5161 // Residual: DEPRECATED 5162 Residual *SourceSplitShard `json:"residual,omitempty"` 5163 // ResidualSource: DEPRECATED 5164 ResidualSource *DerivedSource `json:"residualSource,omitempty"` 5165 // ForceSendFields is a list of field names (e.g. "Primary") to unconditionally 5166 // include in API requests. By default, fields with empty or default values are 5167 // omitted from API requests. See 5168 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5169 // details. 5170 ForceSendFields []string `json:"-"` 5171 // NullFields is a list of field names (e.g. "Primary") to include in API 5172 // requests with the JSON null value. By default, fields with empty values are 5173 // omitted from API requests. See 5174 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5175 NullFields []string `json:"-"` 5176 } 5177 5178 func (s *SourceFork) MarshalJSON() ([]byte, error) { 5179 type NoMethod SourceFork 5180 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5181 } 5182 5183 // SourceGetMetadataRequest: A request to compute the SourceMetadata of a 5184 // Source. 5185 type SourceGetMetadataRequest struct { 5186 // Source: Specification of the source whose metadata should be computed. 5187 Source *Source `json:"source,omitempty"` 5188 // ForceSendFields is a list of field names (e.g. "Source") to unconditionally 5189 // include in API requests. By default, fields with empty or default values are 5190 // omitted from API requests. See 5191 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5192 // details. 5193 ForceSendFields []string `json:"-"` 5194 // NullFields is a list of field names (e.g. "Source") to include in API 5195 // requests with the JSON null value. By default, fields with empty values are 5196 // omitted from API requests. See 5197 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5198 NullFields []string `json:"-"` 5199 } 5200 5201 func (s *SourceGetMetadataRequest) MarshalJSON() ([]byte, error) { 5202 type NoMethod SourceGetMetadataRequest 5203 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5204 } 5205 5206 // SourceGetMetadataResponse: The result of a SourceGetMetadataOperation. 5207 type SourceGetMetadataResponse struct { 5208 // Metadata: The computed metadata. 5209 Metadata *SourceMetadata `json:"metadata,omitempty"` 5210 // ForceSendFields is a list of field names (e.g. "Metadata") to 5211 // unconditionally include in API requests. By default, fields with empty or 5212 // default values are omitted from API requests. See 5213 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5214 // details. 5215 ForceSendFields []string `json:"-"` 5216 // NullFields is a list of field names (e.g. "Metadata") to include in API 5217 // requests with the JSON null value. By default, fields with empty values are 5218 // omitted from API requests. See 5219 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5220 NullFields []string `json:"-"` 5221 } 5222 5223 func (s *SourceGetMetadataResponse) MarshalJSON() ([]byte, error) { 5224 type NoMethod SourceGetMetadataResponse 5225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5226 } 5227 5228 // SourceMetadata: Metadata about a Source useful for automatically optimizing 5229 // and tuning the pipeline, etc. 5230 type SourceMetadata struct { 5231 // EstimatedSizeBytes: An estimate of the total size (in bytes) of the data 5232 // that would be read from this source. This estimate is in terms of external 5233 // storage size, before any decompression or other processing done by the 5234 // reader. 5235 EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"` 5236 // Infinite: Specifies that the size of this source is known to be infinite 5237 // (this is a streaming source). 5238 Infinite bool `json:"infinite,omitempty"` 5239 // ProducesSortedKeys: Whether this source is known to produce key/value pairs 5240 // with the (encoded) keys in lexicographically sorted order. 5241 ProducesSortedKeys bool `json:"producesSortedKeys,omitempty"` 5242 // ForceSendFields is a list of field names (e.g. "EstimatedSizeBytes") to 5243 // unconditionally include in API requests. By default, fields with empty or 5244 // default values are omitted from API requests. See 5245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5246 // details. 5247 ForceSendFields []string `json:"-"` 5248 // NullFields is a list of field names (e.g. "EstimatedSizeBytes") to include 5249 // in API requests with the JSON null value. By default, fields with empty 5250 // values are omitted from API requests. See 5251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5252 NullFields []string `json:"-"` 5253 } 5254 5255 func (s *SourceMetadata) MarshalJSON() ([]byte, error) { 5256 type NoMethod SourceMetadata 5257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5258 } 5259 5260 // SourceOperationRequest: A work item that represents the different operations 5261 // that can be performed on a user-defined Source specification. 5262 type SourceOperationRequest struct { 5263 // GetMetadata: Information about a request to get metadata about a source. 5264 GetMetadata *SourceGetMetadataRequest `json:"getMetadata,omitempty"` 5265 // Name: User-provided name of the Read instruction for this source. 5266 Name string `json:"name,omitempty"` 5267 // OriginalName: System-defined name for the Read instruction for this source 5268 // in the original workflow graph. 5269 OriginalName string `json:"originalName,omitempty"` 5270 // Split: Information about a request to split a source. 5271 Split *SourceSplitRequest `json:"split,omitempty"` 5272 // StageName: System-defined name of the stage containing the source operation. 5273 // Unique across the workflow. 5274 StageName string `json:"stageName,omitempty"` 5275 // SystemName: System-defined name of the Read instruction for this source. 5276 // Unique across the workflow. 5277 SystemName string `json:"systemName,omitempty"` 5278 // ForceSendFields is a list of field names (e.g. "GetMetadata") to 5279 // unconditionally include in API requests. By default, fields with empty or 5280 // default values are omitted from API requests. See 5281 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5282 // details. 5283 ForceSendFields []string `json:"-"` 5284 // NullFields is a list of field names (e.g. "GetMetadata") to include in API 5285 // requests with the JSON null value. By default, fields with empty values are 5286 // omitted from API requests. See 5287 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5288 NullFields []string `json:"-"` 5289 } 5290 5291 func (s *SourceOperationRequest) MarshalJSON() ([]byte, error) { 5292 type NoMethod SourceOperationRequest 5293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5294 } 5295 5296 // SourceOperationResponse: The result of a SourceOperationRequest, specified 5297 // in ReportWorkItemStatusRequest.source_operation when the work item is 5298 // completed. 5299 type SourceOperationResponse struct { 5300 // GetMetadata: A response to a request to get metadata about a source. 5301 GetMetadata *SourceGetMetadataResponse `json:"getMetadata,omitempty"` 5302 // Split: A response to a request to split a source. 5303 Split *SourceSplitResponse `json:"split,omitempty"` 5304 // ForceSendFields is a list of field names (e.g. "GetMetadata") to 5305 // unconditionally include in API requests. By default, fields with empty or 5306 // default values are omitted from API requests. See 5307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5308 // details. 5309 ForceSendFields []string `json:"-"` 5310 // NullFields is a list of field names (e.g. "GetMetadata") to include in API 5311 // requests with the JSON null value. By default, fields with empty values are 5312 // omitted from API requests. See 5313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5314 NullFields []string `json:"-"` 5315 } 5316 5317 func (s *SourceOperationResponse) MarshalJSON() ([]byte, error) { 5318 type NoMethod SourceOperationResponse 5319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5320 } 5321 5322 // SourceSplitOptions: Hints for splitting a Source into bundles (parts for 5323 // parallel processing) using SourceSplitRequest. 5324 type SourceSplitOptions struct { 5325 // DesiredBundleSizeBytes: The source should be split into a set of bundles 5326 // where the estimated size of each is approximately this many bytes. 5327 DesiredBundleSizeBytes int64 `json:"desiredBundleSizeBytes,omitempty,string"` 5328 // DesiredShardSizeBytes: DEPRECATED in favor of desired_bundle_size_bytes. 5329 DesiredShardSizeBytes int64 `json:"desiredShardSizeBytes,omitempty,string"` 5330 // ForceSendFields is a list of field names (e.g. "DesiredBundleSizeBytes") to 5331 // unconditionally include in API requests. By default, fields with empty or 5332 // default values are omitted from API requests. See 5333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5334 // details. 5335 ForceSendFields []string `json:"-"` 5336 // NullFields is a list of field names (e.g. "DesiredBundleSizeBytes") to 5337 // include in API requests with the JSON null value. By default, fields with 5338 // empty values are omitted from API requests. See 5339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5340 NullFields []string `json:"-"` 5341 } 5342 5343 func (s *SourceSplitOptions) MarshalJSON() ([]byte, error) { 5344 type NoMethod SourceSplitOptions 5345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5346 } 5347 5348 // SourceSplitRequest: Represents the operation to split a high-level Source 5349 // specification into bundles (parts for parallel processing). At a high level, 5350 // splitting of a source into bundles happens as follows: SourceSplitRequest is 5351 // applied to the source. If it returns SOURCE_SPLIT_OUTCOME_USE_CURRENT, no 5352 // further splitting happens and the source is used "as is". Otherwise, 5353 // splitting is applied recursively to each produced DerivedSource. As an 5354 // optimization, for any Source, if its does_not_need_splitting is true, the 5355 // framework assumes that splitting this source would return 5356 // SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. 5357 // This applies both to the initial source being split and to bundles produced 5358 // from it. 5359 type SourceSplitRequest struct { 5360 // Options: Hints for tuning the splitting process. 5361 Options *SourceSplitOptions `json:"options,omitempty"` 5362 // Source: Specification of the source to be split. 5363 Source *Source `json:"source,omitempty"` 5364 // ForceSendFields is a list of field names (e.g. "Options") to unconditionally 5365 // include in API requests. By default, fields with empty or default values are 5366 // omitted from API requests. See 5367 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5368 // details. 5369 ForceSendFields []string `json:"-"` 5370 // NullFields is a list of field names (e.g. "Options") to include in API 5371 // requests with the JSON null value. By default, fields with empty values are 5372 // omitted from API requests. See 5373 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5374 NullFields []string `json:"-"` 5375 } 5376 5377 func (s *SourceSplitRequest) MarshalJSON() ([]byte, error) { 5378 type NoMethod SourceSplitRequest 5379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5380 } 5381 5382 // SourceSplitResponse: The response to a SourceSplitRequest. 5383 type SourceSplitResponse struct { 5384 // Bundles: If outcome is SPLITTING_HAPPENED, then this is a list of bundles 5385 // into which the source was split. Otherwise this field is ignored. This list 5386 // can be empty, which means the source represents an empty input. 5387 Bundles []*DerivedSource `json:"bundles,omitempty"` 5388 // Outcome: Indicates whether splitting happened and produced a list of 5389 // bundles. If this is USE_CURRENT_SOURCE_AS_IS, the current source should be 5390 // processed "as is" without splitting. "bundles" is ignored in this case. If 5391 // this is SPLITTING_HAPPENED, then "bundles" contains a list of bundles into 5392 // which the source was split. 5393 // 5394 // Possible values: 5395 // "SOURCE_SPLIT_OUTCOME_UNKNOWN" - The source split outcome is unknown, or 5396 // unspecified. 5397 // "SOURCE_SPLIT_OUTCOME_USE_CURRENT" - The current source should be 5398 // processed "as is" without splitting. 5399 // "SOURCE_SPLIT_OUTCOME_SPLITTING_HAPPENED" - Splitting produced a list of 5400 // bundles. 5401 Outcome string `json:"outcome,omitempty"` 5402 // Shards: DEPRECATED in favor of bundles. 5403 Shards []*SourceSplitShard `json:"shards,omitempty"` 5404 // ForceSendFields is a list of field names (e.g. "Bundles") to unconditionally 5405 // include in API requests. By default, fields with empty or default values are 5406 // omitted from API requests. See 5407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5408 // details. 5409 ForceSendFields []string `json:"-"` 5410 // NullFields is a list of field names (e.g. "Bundles") to include in API 5411 // requests with the JSON null value. By default, fields with empty values are 5412 // omitted from API requests. See 5413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5414 NullFields []string `json:"-"` 5415 } 5416 5417 func (s *SourceSplitResponse) MarshalJSON() ([]byte, error) { 5418 type NoMethod SourceSplitResponse 5419 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5420 } 5421 5422 // SourceSplitShard: DEPRECATED in favor of DerivedSource. 5423 type SourceSplitShard struct { 5424 // DerivationMode: DEPRECATED 5425 // 5426 // Possible values: 5427 // "SOURCE_DERIVATION_MODE_UNKNOWN" - The source derivation is unknown, or 5428 // unspecified. 5429 // "SOURCE_DERIVATION_MODE_INDEPENDENT" - Produce a completely independent 5430 // Source with no base. 5431 // "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT" - Produce a Source based on the 5432 // Source being split. 5433 // "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - Produce a Source based on 5434 // the base of the Source being split. 5435 DerivationMode string `json:"derivationMode,omitempty"` 5436 // Source: DEPRECATED 5437 Source *Source `json:"source,omitempty"` 5438 // ForceSendFields is a list of field names (e.g. "DerivationMode") to 5439 // unconditionally include in API requests. By default, fields with empty or 5440 // default values are omitted from API requests. See 5441 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5442 // details. 5443 ForceSendFields []string `json:"-"` 5444 // NullFields is a list of field names (e.g. "DerivationMode") to include in 5445 // API requests with the JSON null value. By default, fields with empty values 5446 // are omitted from API requests. See 5447 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5448 NullFields []string `json:"-"` 5449 } 5450 5451 func (s *SourceSplitShard) MarshalJSON() ([]byte, error) { 5452 type NoMethod SourceSplitShard 5453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5454 } 5455 5456 // SpannerIODetails: Metadata for a Spanner connector used by the job. 5457 type SpannerIODetails struct { 5458 // DatabaseId: DatabaseId accessed in the connection. 5459 DatabaseId string `json:"databaseId,omitempty"` 5460 // InstanceId: InstanceId accessed in the connection. 5461 InstanceId string `json:"instanceId,omitempty"` 5462 // ProjectId: ProjectId accessed in the connection. 5463 ProjectId string `json:"projectId,omitempty"` 5464 // ForceSendFields is a list of field names (e.g. "DatabaseId") to 5465 // unconditionally include in API requests. By default, fields with empty or 5466 // default values are omitted from API requests. See 5467 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5468 // details. 5469 ForceSendFields []string `json:"-"` 5470 // NullFields is a list of field names (e.g. "DatabaseId") to include in API 5471 // requests with the JSON null value. By default, fields with empty values are 5472 // omitted from API requests. See 5473 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5474 NullFields []string `json:"-"` 5475 } 5476 5477 func (s *SpannerIODetails) MarshalJSON() ([]byte, error) { 5478 type NoMethod SpannerIODetails 5479 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5480 } 5481 5482 // SplitInt64: A representation of an int64, n, that is immune to precision 5483 // loss when encoded in JSON. 5484 type SplitInt64 struct { 5485 // HighBits: The high order bits, including the sign: n >> 32. 5486 HighBits int64 `json:"highBits,omitempty"` 5487 // LowBits: The low order bits: n & 0xffffffff. 5488 LowBits int64 `json:"lowBits,omitempty"` 5489 // ForceSendFields is a list of field names (e.g. "HighBits") to 5490 // unconditionally include in API requests. By default, fields with empty or 5491 // default values are omitted from API requests. See 5492 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5493 // details. 5494 ForceSendFields []string `json:"-"` 5495 // NullFields is a list of field names (e.g. "HighBits") to include in API 5496 // requests with the JSON null value. By default, fields with empty values are 5497 // omitted from API requests. See 5498 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5499 NullFields []string `json:"-"` 5500 } 5501 5502 func (s *SplitInt64) MarshalJSON() ([]byte, error) { 5503 type NoMethod SplitInt64 5504 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5505 } 5506 5507 // StageExecutionDetails: Information about the workers and work items within a 5508 // stage. 5509 type StageExecutionDetails struct { 5510 // NextPageToken: If present, this response does not contain all requested 5511 // tasks. To obtain the next page of results, repeat the request with 5512 // page_token set to this value. 5513 NextPageToken string `json:"nextPageToken,omitempty"` 5514 // Workers: Workers that have done work on the stage. 5515 Workers []*WorkerDetails `json:"workers,omitempty"` 5516 5517 // ServerResponse contains the HTTP response code and headers from the server. 5518 googleapi.ServerResponse `json:"-"` 5519 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 5520 // unconditionally include in API requests. By default, fields with empty or 5521 // default values are omitted from API requests. See 5522 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5523 // details. 5524 ForceSendFields []string `json:"-"` 5525 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 5526 // requests with the JSON null value. By default, fields with empty values are 5527 // omitted from API requests. See 5528 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5529 NullFields []string `json:"-"` 5530 } 5531 5532 func (s *StageExecutionDetails) MarshalJSON() ([]byte, error) { 5533 type NoMethod StageExecutionDetails 5534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5535 } 5536 5537 // StageSource: Description of an input or output of an execution stage. 5538 type StageSource struct { 5539 // Name: Dataflow service generated name for this source. 5540 Name string `json:"name,omitempty"` 5541 // OriginalTransformOrCollection: User name for the original user transform or 5542 // collection with which this source is most closely associated. 5543 OriginalTransformOrCollection string `json:"originalTransformOrCollection,omitempty"` 5544 // SizeBytes: Size of the source, if measurable. 5545 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 5546 // UserName: Human-readable name for this source; may be user or system 5547 // generated. 5548 UserName string `json:"userName,omitempty"` 5549 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 5550 // include in API requests. By default, fields with empty or default values are 5551 // omitted from API requests. See 5552 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5553 // details. 5554 ForceSendFields []string `json:"-"` 5555 // NullFields is a list of field names (e.g. "Name") to include in API requests 5556 // with the JSON null value. By default, fields with empty values are omitted 5557 // from API requests. See 5558 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5559 NullFields []string `json:"-"` 5560 } 5561 5562 func (s *StageSource) MarshalJSON() ([]byte, error) { 5563 type NoMethod StageSource 5564 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5565 } 5566 5567 // StageSummary: Information about a particular execution stage of a job. 5568 type StageSummary struct { 5569 // EndTime: End time of this stage. If the work item is completed, this is the 5570 // actual end time of the stage. Otherwise, it is the predicted end time. 5571 EndTime string `json:"endTime,omitempty"` 5572 // Metrics: Metrics for this stage. 5573 Metrics []*MetricUpdate `json:"metrics,omitempty"` 5574 // Progress: Progress for this stage. Only applicable to Batch jobs. 5575 Progress *ProgressTimeseries `json:"progress,omitempty"` 5576 // StageId: ID of this stage 5577 StageId string `json:"stageId,omitempty"` 5578 // StartTime: Start time of this stage. 5579 StartTime string `json:"startTime,omitempty"` 5580 // State: State of this stage. 5581 // 5582 // Possible values: 5583 // "EXECUTION_STATE_UNKNOWN" - The component state is unknown or unspecified. 5584 // "EXECUTION_STATE_NOT_STARTED" - The component is not yet running. 5585 // "EXECUTION_STATE_RUNNING" - The component is currently running. 5586 // "EXECUTION_STATE_SUCCEEDED" - The component succeeded. 5587 // "EXECUTION_STATE_FAILED" - The component failed. 5588 // "EXECUTION_STATE_CANCELLED" - Execution of the component was cancelled. 5589 State string `json:"state,omitempty"` 5590 // StragglerSummary: Straggler summary for this stage. 5591 StragglerSummary *StragglerSummary `json:"stragglerSummary,omitempty"` 5592 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 5593 // include in API requests. By default, fields with empty or default values are 5594 // omitted from API requests. See 5595 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5596 // details. 5597 ForceSendFields []string `json:"-"` 5598 // NullFields is a list of field names (e.g. "EndTime") to include in API 5599 // requests with the JSON null value. By default, fields with empty values are 5600 // omitted from API requests. See 5601 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5602 NullFields []string `json:"-"` 5603 } 5604 5605 func (s *StageSummary) MarshalJSON() ([]byte, error) { 5606 type NoMethod StageSummary 5607 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5608 } 5609 5610 // StateFamilyConfig: State family configuration. 5611 type StateFamilyConfig struct { 5612 // IsRead: If true, this family corresponds to a read operation. 5613 IsRead bool `json:"isRead,omitempty"` 5614 // StateFamily: The state family value. 5615 StateFamily string `json:"stateFamily,omitempty"` 5616 // ForceSendFields is a list of field names (e.g. "IsRead") to unconditionally 5617 // include in API requests. By default, fields with empty or default values are 5618 // omitted from API requests. See 5619 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5620 // details. 5621 ForceSendFields []string `json:"-"` 5622 // NullFields is a list of field names (e.g. "IsRead") to include in API 5623 // requests with the JSON null value. By default, fields with empty values are 5624 // omitted from API requests. See 5625 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5626 NullFields []string `json:"-"` 5627 } 5628 5629 func (s *StateFamilyConfig) MarshalJSON() ([]byte, error) { 5630 type NoMethod StateFamilyConfig 5631 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5632 } 5633 5634 // Status: The `Status` type defines a logical error model that is suitable for 5635 // different programming environments, including REST APIs and RPC APIs. It is 5636 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 5637 // pieces of data: error code, error message, and error details. You can find 5638 // out more about this error model and how to work with it in the API Design 5639 // Guide (https://cloud.google.com/apis/design/errors). 5640 type Status struct { 5641 // Code: The status code, which should be an enum value of google.rpc.Code. 5642 Code int64 `json:"code,omitempty"` 5643 // Details: A list of messages that carry the error details. There is a common 5644 // set of message types for APIs to use. 5645 Details []googleapi.RawMessage `json:"details,omitempty"` 5646 // Message: A developer-facing error message, which should be in English. Any 5647 // user-facing error message should be localized and sent in the 5648 // google.rpc.Status.details field, or localized by the client. 5649 Message string `json:"message,omitempty"` 5650 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 5651 // include in API requests. By default, fields with empty or default values are 5652 // omitted from API requests. See 5653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5654 // details. 5655 ForceSendFields []string `json:"-"` 5656 // NullFields is a list of field names (e.g. "Code") to include in API requests 5657 // with the JSON null value. By default, fields with empty values are omitted 5658 // from API requests. See 5659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5660 NullFields []string `json:"-"` 5661 } 5662 5663 func (s *Status) MarshalJSON() ([]byte, error) { 5664 type NoMethod Status 5665 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5666 } 5667 5668 // Step: Defines a particular step within a Cloud Dataflow job. A job consists 5669 // of multiple steps, each of which performs some specific operation as part of 5670 // the overall job. Data is typically passed from one step to another as part 5671 // of the job. **Note:** The properties of this object are not stable and might 5672 // change. Here's an example of a sequence of steps which together implement a 5673 // Map-Reduce job: * Read a collection of data from some source, parsing the 5674 // collection's elements. * Validate the elements. * Apply a user-defined 5675 // function to map each element to some value and extract an element-specific 5676 // key value. * Group elements with the same key into a single element with 5677 // that key, transforming a multiply-keyed collection into a uniquely-keyed 5678 // collection. * Write the elements out to some data sink. Note that the Cloud 5679 // Dataflow service may be used to run many different types of jobs, not just 5680 // Map-Reduce. 5681 type Step struct { 5682 // Kind: The kind of step in the Cloud Dataflow job. 5683 Kind string `json:"kind,omitempty"` 5684 // Name: The name that identifies the step. This must be unique for each step 5685 // with respect to all other steps in the Cloud Dataflow job. 5686 Name string `json:"name,omitempty"` 5687 // Properties: Named properties associated with the step. Each kind of 5688 // predefined step has its own required set of properties. Must be provided on 5689 // Create. Only retrieved with JOB_VIEW_ALL. 5690 Properties googleapi.RawMessage `json:"properties,omitempty"` 5691 // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally 5692 // include in API requests. By default, fields with empty or default values are 5693 // omitted from API requests. See 5694 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5695 // details. 5696 ForceSendFields []string `json:"-"` 5697 // NullFields is a list of field names (e.g. "Kind") to include in API requests 5698 // with the JSON null value. By default, fields with empty values are omitted 5699 // from API requests. See 5700 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5701 NullFields []string `json:"-"` 5702 } 5703 5704 func (s *Step) MarshalJSON() ([]byte, error) { 5705 type NoMethod Step 5706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5707 } 5708 5709 // Straggler: Information for a straggler. 5710 type Straggler struct { 5711 // BatchStraggler: Batch straggler identification and debugging information. 5712 BatchStraggler *StragglerInfo `json:"batchStraggler,omitempty"` 5713 // StreamingStraggler: Streaming straggler identification and debugging 5714 // information. 5715 StreamingStraggler *StreamingStragglerInfo `json:"streamingStraggler,omitempty"` 5716 // ForceSendFields is a list of field names (e.g. "BatchStraggler") to 5717 // unconditionally include in API requests. By default, fields with empty or 5718 // default values are omitted from API requests. See 5719 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5720 // details. 5721 ForceSendFields []string `json:"-"` 5722 // NullFields is a list of field names (e.g. "BatchStraggler") to include in 5723 // API requests with the JSON null value. By default, fields with empty values 5724 // are omitted from API requests. See 5725 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5726 NullFields []string `json:"-"` 5727 } 5728 5729 func (s *Straggler) MarshalJSON() ([]byte, error) { 5730 type NoMethod Straggler 5731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5732 } 5733 5734 // StragglerDebuggingInfo: Information useful for debugging a straggler. Each 5735 // type will provide specialized debugging information relevant for a 5736 // particular cause. The StragglerDebuggingInfo will be 1:1 mapping to the 5737 // StragglerCause enum. 5738 type StragglerDebuggingInfo struct { 5739 // HotKey: Hot key debugging details. 5740 HotKey *HotKeyDebuggingInfo `json:"hotKey,omitempty"` 5741 // ForceSendFields is a list of field names (e.g. "HotKey") to unconditionally 5742 // include in API requests. By default, fields with empty or default values are 5743 // omitted from API requests. See 5744 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5745 // details. 5746 ForceSendFields []string `json:"-"` 5747 // NullFields is a list of field names (e.g. "HotKey") to include in API 5748 // requests with the JSON null value. By default, fields with empty values are 5749 // omitted from API requests. See 5750 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5751 NullFields []string `json:"-"` 5752 } 5753 5754 func (s *StragglerDebuggingInfo) MarshalJSON() ([]byte, error) { 5755 type NoMethod StragglerDebuggingInfo 5756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5757 } 5758 5759 // StragglerInfo: Information useful for straggler identification and 5760 // debugging. 5761 type StragglerInfo struct { 5762 // Causes: The straggler causes, keyed by the string representation of the 5763 // StragglerCause enum and contains specialized debugging information for each 5764 // straggler cause. 5765 Causes map[string]StragglerDebuggingInfo `json:"causes,omitempty"` 5766 // StartTime: The time when the work item attempt became a straggler. 5767 StartTime string `json:"startTime,omitempty"` 5768 // ForceSendFields is a list of field names (e.g. "Causes") to unconditionally 5769 // include in API requests. By default, fields with empty or default values are 5770 // omitted from API requests. See 5771 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5772 // details. 5773 ForceSendFields []string `json:"-"` 5774 // NullFields is a list of field names (e.g. "Causes") to include in API 5775 // requests with the JSON null value. By default, fields with empty values are 5776 // omitted from API requests. See 5777 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5778 NullFields []string `json:"-"` 5779 } 5780 5781 func (s *StragglerInfo) MarshalJSON() ([]byte, error) { 5782 type NoMethod StragglerInfo 5783 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5784 } 5785 5786 // StragglerSummary: Summarized straggler identification details. 5787 type StragglerSummary struct { 5788 // RecentStragglers: The most recent stragglers. 5789 RecentStragglers []*Straggler `json:"recentStragglers,omitempty"` 5790 // StragglerCauseCount: Aggregated counts of straggler causes, keyed by the 5791 // string representation of the StragglerCause enum. 5792 StragglerCauseCount map[string]string `json:"stragglerCauseCount,omitempty"` 5793 // TotalStragglerCount: The total count of stragglers. 5794 TotalStragglerCount int64 `json:"totalStragglerCount,omitempty,string"` 5795 // ForceSendFields is a list of field names (e.g. "RecentStragglers") to 5796 // unconditionally include in API requests. By default, fields with empty or 5797 // default values are omitted from API requests. See 5798 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5799 // details. 5800 ForceSendFields []string `json:"-"` 5801 // NullFields is a list of field names (e.g. "RecentStragglers") to include in 5802 // API requests with the JSON null value. By default, fields with empty values 5803 // are omitted from API requests. See 5804 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5805 NullFields []string `json:"-"` 5806 } 5807 5808 func (s *StragglerSummary) MarshalJSON() ([]byte, error) { 5809 type NoMethod StragglerSummary 5810 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5811 } 5812 5813 // StreamLocation: Describes a stream of data, either as input to be processed 5814 // or as output of a streaming Dataflow job. 5815 type StreamLocation struct { 5816 // CustomSourceLocation: The stream is a custom source. 5817 CustomSourceLocation *CustomSourceLocation `json:"customSourceLocation,omitempty"` 5818 // PubsubLocation: The stream is a pubsub stream. 5819 PubsubLocation *PubsubLocation `json:"pubsubLocation,omitempty"` 5820 // SideInputLocation: The stream is a streaming side input. 5821 SideInputLocation *StreamingSideInputLocation `json:"sideInputLocation,omitempty"` 5822 // StreamingStageLocation: The stream is part of another computation within the 5823 // current streaming Dataflow job. 5824 StreamingStageLocation *StreamingStageLocation `json:"streamingStageLocation,omitempty"` 5825 // ForceSendFields is a list of field names (e.g. "CustomSourceLocation") to 5826 // unconditionally include in API requests. By default, fields with empty or 5827 // default values are omitted from API requests. See 5828 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5829 // details. 5830 ForceSendFields []string `json:"-"` 5831 // NullFields is a list of field names (e.g. "CustomSourceLocation") to include 5832 // in API requests with the JSON null value. By default, fields with empty 5833 // values are omitted from API requests. See 5834 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5835 NullFields []string `json:"-"` 5836 } 5837 5838 func (s *StreamLocation) MarshalJSON() ([]byte, error) { 5839 type NoMethod StreamLocation 5840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5841 } 5842 5843 // StreamingApplianceSnapshotConfig: Streaming appliance snapshot 5844 // configuration. 5845 type StreamingApplianceSnapshotConfig struct { 5846 // ImportStateEndpoint: Indicates which endpoint is used to import appliance 5847 // state. 5848 ImportStateEndpoint string `json:"importStateEndpoint,omitempty"` 5849 // SnapshotId: If set, indicates the snapshot id for the snapshot being 5850 // performed. 5851 SnapshotId string `json:"snapshotId,omitempty"` 5852 // ForceSendFields is a list of field names (e.g. "ImportStateEndpoint") to 5853 // unconditionally include in API requests. By default, fields with empty or 5854 // default values are omitted from API requests. See 5855 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5856 // details. 5857 ForceSendFields []string `json:"-"` 5858 // NullFields is a list of field names (e.g. "ImportStateEndpoint") to include 5859 // in API requests with the JSON null value. By default, fields with empty 5860 // values are omitted from API requests. See 5861 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5862 NullFields []string `json:"-"` 5863 } 5864 5865 func (s *StreamingApplianceSnapshotConfig) MarshalJSON() ([]byte, error) { 5866 type NoMethod StreamingApplianceSnapshotConfig 5867 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5868 } 5869 5870 // StreamingComputationConfig: Configuration information for a single streaming 5871 // computation. 5872 type StreamingComputationConfig struct { 5873 // ComputationId: Unique identifier for this computation. 5874 ComputationId string `json:"computationId,omitempty"` 5875 // Instructions: Instructions that comprise the computation. 5876 Instructions []*ParallelInstruction `json:"instructions,omitempty"` 5877 // StageName: Stage name of this computation. 5878 StageName string `json:"stageName,omitempty"` 5879 // SystemName: System defined name for this computation. 5880 SystemName string `json:"systemName,omitempty"` 5881 // TransformUserNameToStateFamily: Map from user name of stateful transforms in 5882 // this stage to their state family. 5883 TransformUserNameToStateFamily map[string]string `json:"transformUserNameToStateFamily,omitempty"` 5884 // ForceSendFields is a list of field names (e.g. "ComputationId") to 5885 // unconditionally include in API requests. By default, fields with empty or 5886 // default values are omitted from API requests. See 5887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5888 // details. 5889 ForceSendFields []string `json:"-"` 5890 // NullFields is a list of field names (e.g. "ComputationId") to include in API 5891 // requests with the JSON null value. By default, fields with empty values are 5892 // omitted from API requests. See 5893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5894 NullFields []string `json:"-"` 5895 } 5896 5897 func (s *StreamingComputationConfig) MarshalJSON() ([]byte, error) { 5898 type NoMethod StreamingComputationConfig 5899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5900 } 5901 5902 // StreamingComputationRanges: Describes full or partial data disk assignment 5903 // information of the computation ranges. 5904 type StreamingComputationRanges struct { 5905 // ComputationId: The ID of the computation. 5906 ComputationId string `json:"computationId,omitempty"` 5907 // RangeAssignments: Data disk assignments for ranges from this computation. 5908 RangeAssignments []*KeyRangeDataDiskAssignment `json:"rangeAssignments,omitempty"` 5909 // ForceSendFields is a list of field names (e.g. "ComputationId") to 5910 // unconditionally include in API requests. By default, fields with empty or 5911 // default values are omitted from API requests. See 5912 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5913 // details. 5914 ForceSendFields []string `json:"-"` 5915 // NullFields is a list of field names (e.g. "ComputationId") to include in API 5916 // requests with the JSON null value. By default, fields with empty values are 5917 // omitted from API requests. See 5918 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5919 NullFields []string `json:"-"` 5920 } 5921 5922 func (s *StreamingComputationRanges) MarshalJSON() ([]byte, error) { 5923 type NoMethod StreamingComputationRanges 5924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5925 } 5926 5927 // StreamingComputationTask: A task which describes what action should be 5928 // performed for the specified streaming computation ranges. 5929 type StreamingComputationTask struct { 5930 // ComputationRanges: Contains ranges of a streaming computation this task 5931 // should apply to. 5932 ComputationRanges []*StreamingComputationRanges `json:"computationRanges,omitempty"` 5933 // DataDisks: Describes the set of data disks this task should apply to. 5934 DataDisks []*MountedDataDisk `json:"dataDisks,omitempty"` 5935 // TaskType: A type of streaming computation task. 5936 // 5937 // Possible values: 5938 // "STREAMING_COMPUTATION_TASK_UNKNOWN" - The streaming computation task is 5939 // unknown, or unspecified. 5940 // "STREAMING_COMPUTATION_TASK_STOP" - Stop processing specified streaming 5941 // computation range(s). 5942 // "STREAMING_COMPUTATION_TASK_START" - Start processing specified streaming 5943 // computation range(s). 5944 TaskType string `json:"taskType,omitempty"` 5945 // ForceSendFields is a list of field names (e.g. "ComputationRanges") to 5946 // unconditionally include in API requests. By default, fields with empty or 5947 // default values are omitted from API requests. See 5948 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5949 // details. 5950 ForceSendFields []string `json:"-"` 5951 // NullFields is a list of field names (e.g. "ComputationRanges") to include in 5952 // API requests with the JSON null value. By default, fields with empty values 5953 // are omitted from API requests. See 5954 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5955 NullFields []string `json:"-"` 5956 } 5957 5958 func (s *StreamingComputationTask) MarshalJSON() ([]byte, error) { 5959 type NoMethod StreamingComputationTask 5960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5961 } 5962 5963 // StreamingConfigTask: A task that carries configuration information for 5964 // streaming computations. 5965 type StreamingConfigTask struct { 5966 // CommitStreamChunkSizeBytes: Chunk size for commit streams from the harness 5967 // to windmill. 5968 CommitStreamChunkSizeBytes int64 `json:"commitStreamChunkSizeBytes,omitempty,string"` 5969 // GetDataStreamChunkSizeBytes: Chunk size for get data streams from the 5970 // harness to windmill. 5971 GetDataStreamChunkSizeBytes int64 `json:"getDataStreamChunkSizeBytes,omitempty,string"` 5972 // MaxWorkItemCommitBytes: Maximum size for work item commit supported windmill 5973 // storage layer. 5974 MaxWorkItemCommitBytes int64 `json:"maxWorkItemCommitBytes,omitempty,string"` 5975 // OperationalLimits: Operational limits for the streaming job. Can be used by 5976 // the worker to validate outputs sent to the backend. 5977 OperationalLimits *StreamingOperationalLimits `json:"operationalLimits,omitempty"` 5978 // StreamingComputationConfigs: Set of computation configuration information. 5979 StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"` 5980 // UserStepToStateFamilyNameMap: Map from user step names to state families. 5981 UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"` 5982 // WindmillServiceEndpoint: If present, the worker must use this endpoint to 5983 // communicate with Windmill Service dispatchers, otherwise the worker must 5984 // continue to use whatever endpoint it had been using. 5985 WindmillServiceEndpoint string `json:"windmillServiceEndpoint,omitempty"` 5986 // WindmillServicePort: If present, the worker must use this port to 5987 // communicate with Windmill Service dispatchers. Only applicable when 5988 // windmill_service_endpoint is specified. 5989 WindmillServicePort int64 `json:"windmillServicePort,omitempty,string"` 5990 // ForceSendFields is a list of field names (e.g. "CommitStreamChunkSizeBytes") 5991 // to unconditionally include in API requests. By default, fields with empty or 5992 // default values are omitted from API requests. See 5993 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5994 // details. 5995 ForceSendFields []string `json:"-"` 5996 // NullFields is a list of field names (e.g. "CommitStreamChunkSizeBytes") to 5997 // include in API requests with the JSON null value. By default, fields with 5998 // empty values are omitted from API requests. See 5999 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6000 NullFields []string `json:"-"` 6001 } 6002 6003 func (s *StreamingConfigTask) MarshalJSON() ([]byte, error) { 6004 type NoMethod StreamingConfigTask 6005 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6006 } 6007 6008 // StreamingOperationalLimits: Operational limits imposed on streaming jobs by 6009 // the backend. 6010 type StreamingOperationalLimits struct { 6011 // MaxBagElementBytes: The maximum size for an element in bag state. 6012 MaxBagElementBytes int64 `json:"maxBagElementBytes,omitempty,string"` 6013 // MaxGlobalDataBytes: The maximum size for an element in global data. 6014 MaxGlobalDataBytes int64 `json:"maxGlobalDataBytes,omitempty,string"` 6015 // MaxKeyBytes: The maximum size allowed for a key. 6016 MaxKeyBytes int64 `json:"maxKeyBytes,omitempty,string"` 6017 // MaxProductionOutputBytes: The maximum size for a single output element. 6018 MaxProductionOutputBytes int64 `json:"maxProductionOutputBytes,omitempty,string"` 6019 // MaxSortedListElementBytes: The maximum size for an element in sorted list 6020 // state. 6021 MaxSortedListElementBytes int64 `json:"maxSortedListElementBytes,omitempty,string"` 6022 // MaxSourceStateBytes: The maximum size for a source state update. 6023 MaxSourceStateBytes int64 `json:"maxSourceStateBytes,omitempty,string"` 6024 // MaxTagBytes: The maximum size for a state tag. 6025 MaxTagBytes int64 `json:"maxTagBytes,omitempty,string"` 6026 // MaxValueBytes: The maximum size for a value state field. 6027 MaxValueBytes int64 `json:"maxValueBytes,omitempty,string"` 6028 // ForceSendFields is a list of field names (e.g. "MaxBagElementBytes") to 6029 // unconditionally include in API requests. By default, fields with empty or 6030 // default values are omitted from API requests. See 6031 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6032 // details. 6033 ForceSendFields []string `json:"-"` 6034 // NullFields is a list of field names (e.g. "MaxBagElementBytes") to include 6035 // in API requests with the JSON null value. By default, fields with empty 6036 // values are omitted from API requests. See 6037 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6038 NullFields []string `json:"-"` 6039 } 6040 6041 func (s *StreamingOperationalLimits) MarshalJSON() ([]byte, error) { 6042 type NoMethod StreamingOperationalLimits 6043 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6044 } 6045 6046 // StreamingScalingReport: Contains per-user worker telemetry used in streaming 6047 // autoscaling. 6048 type StreamingScalingReport struct { 6049 ActiveBundleCount int64 `json:"activeBundleCount,omitempty"` 6050 // ActiveThreadCount: Current acive thread count. 6051 ActiveThreadCount int64 `json:"activeThreadCount,omitempty"` 6052 // MaximumBundleCount: Maximum bundle count. 6053 MaximumBundleCount int64 `json:"maximumBundleCount,omitempty"` 6054 // MaximumBytes: Maximum bytes. 6055 MaximumBytes int64 `json:"maximumBytes,omitempty,string"` 6056 MaximumBytesCount int64 `json:"maximumBytesCount,omitempty"` 6057 // MaximumThreadCount: Maximum thread count limit. 6058 MaximumThreadCount int64 `json:"maximumThreadCount,omitempty"` 6059 // OutstandingBundleCount: Current outstanding bundle count. 6060 OutstandingBundleCount int64 `json:"outstandingBundleCount,omitempty"` 6061 // OutstandingBytes: Current outstanding bytes. 6062 OutstandingBytes int64 `json:"outstandingBytes,omitempty,string"` 6063 OutstandingBytesCount int64 `json:"outstandingBytesCount,omitempty"` 6064 // ForceSendFields is a list of field names (e.g. "ActiveBundleCount") to 6065 // unconditionally include in API requests. By default, fields with empty or 6066 // default values are omitted from API requests. See 6067 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6068 // details. 6069 ForceSendFields []string `json:"-"` 6070 // NullFields is a list of field names (e.g. "ActiveBundleCount") to include in 6071 // API requests with the JSON null value. By default, fields with empty values 6072 // are omitted from API requests. See 6073 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6074 NullFields []string `json:"-"` 6075 } 6076 6077 func (s *StreamingScalingReport) MarshalJSON() ([]byte, error) { 6078 type NoMethod StreamingScalingReport 6079 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6080 } 6081 6082 // StreamingScalingReportResponse: Contains per-user-worker streaming scaling 6083 // recommendation from the backend. 6084 type StreamingScalingReportResponse struct { 6085 // MaximumThreadCount: Maximum thread count limit; 6086 MaximumThreadCount int64 `json:"maximumThreadCount,omitempty"` 6087 // ForceSendFields is a list of field names (e.g. "MaximumThreadCount") to 6088 // unconditionally include in API requests. By default, fields with empty or 6089 // default values are omitted from API requests. See 6090 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6091 // details. 6092 ForceSendFields []string `json:"-"` 6093 // NullFields is a list of field names (e.g. "MaximumThreadCount") to include 6094 // in API requests with the JSON null value. By default, fields with empty 6095 // values are omitted from API requests. See 6096 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6097 NullFields []string `json:"-"` 6098 } 6099 6100 func (s *StreamingScalingReportResponse) MarshalJSON() ([]byte, error) { 6101 type NoMethod StreamingScalingReportResponse 6102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6103 } 6104 6105 // StreamingSetupTask: A task which initializes part of a streaming Dataflow 6106 // job. 6107 type StreamingSetupTask struct { 6108 // Drain: The user has requested drain. 6109 Drain bool `json:"drain,omitempty"` 6110 // ReceiveWorkPort: The TCP port on which the worker should listen for messages 6111 // from other streaming computation workers. 6112 ReceiveWorkPort int64 `json:"receiveWorkPort,omitempty"` 6113 // SnapshotConfig: Configures streaming appliance snapshot. 6114 SnapshotConfig *StreamingApplianceSnapshotConfig `json:"snapshotConfig,omitempty"` 6115 // StreamingComputationTopology: The global topology of the streaming Dataflow 6116 // job. 6117 StreamingComputationTopology *TopologyConfig `json:"streamingComputationTopology,omitempty"` 6118 // WorkerHarnessPort: The TCP port used by the worker to communicate with the 6119 // Dataflow worker harness. 6120 WorkerHarnessPort int64 `json:"workerHarnessPort,omitempty"` 6121 // ForceSendFields is a list of field names (e.g. "Drain") to unconditionally 6122 // include in API requests. By default, fields with empty or default values are 6123 // omitted from API requests. See 6124 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6125 // details. 6126 ForceSendFields []string `json:"-"` 6127 // NullFields is a list of field names (e.g. "Drain") to include in API 6128 // requests with the JSON null value. By default, fields with empty values are 6129 // omitted from API requests. See 6130 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6131 NullFields []string `json:"-"` 6132 } 6133 6134 func (s *StreamingSetupTask) MarshalJSON() ([]byte, error) { 6135 type NoMethod StreamingSetupTask 6136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6137 } 6138 6139 // StreamingSideInputLocation: Identifies the location of a streaming side 6140 // input. 6141 type StreamingSideInputLocation struct { 6142 // StateFamily: Identifies the state family where this side input is stored. 6143 StateFamily string `json:"stateFamily,omitempty"` 6144 // Tag: Identifies the particular side input within the streaming Dataflow job. 6145 Tag string `json:"tag,omitempty"` 6146 // ForceSendFields is a list of field names (e.g. "StateFamily") to 6147 // unconditionally include in API requests. By default, fields with empty or 6148 // default values are omitted from API requests. See 6149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6150 // details. 6151 ForceSendFields []string `json:"-"` 6152 // NullFields is a list of field names (e.g. "StateFamily") to include in API 6153 // requests with the JSON null value. By default, fields with empty values are 6154 // omitted from API requests. See 6155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6156 NullFields []string `json:"-"` 6157 } 6158 6159 func (s *StreamingSideInputLocation) MarshalJSON() ([]byte, error) { 6160 type NoMethod StreamingSideInputLocation 6161 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6162 } 6163 6164 // StreamingStageLocation: Identifies the location of a streaming computation 6165 // stage, for stage-to-stage communication. 6166 type StreamingStageLocation struct { 6167 // StreamId: Identifies the particular stream within the streaming Dataflow 6168 // job. 6169 StreamId string `json:"streamId,omitempty"` 6170 // ForceSendFields is a list of field names (e.g. "StreamId") to 6171 // unconditionally include in API requests. By default, fields with empty or 6172 // default values are omitted from API requests. See 6173 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6174 // details. 6175 ForceSendFields []string `json:"-"` 6176 // NullFields is a list of field names (e.g. "StreamId") to include in API 6177 // requests with the JSON null value. By default, fields with empty values are 6178 // omitted from API requests. See 6179 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6180 NullFields []string `json:"-"` 6181 } 6182 6183 func (s *StreamingStageLocation) MarshalJSON() ([]byte, error) { 6184 type NoMethod StreamingStageLocation 6185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6186 } 6187 6188 // StreamingStragglerInfo: Information useful for streaming straggler 6189 // identification and debugging. 6190 type StreamingStragglerInfo struct { 6191 // DataWatermarkLag: The event-time watermark lag at the time of the straggler 6192 // detection. 6193 DataWatermarkLag string `json:"dataWatermarkLag,omitempty"` 6194 // EndTime: End time of this straggler. 6195 EndTime string `json:"endTime,omitempty"` 6196 // StartTime: Start time of this straggler. 6197 StartTime string `json:"startTime,omitempty"` 6198 // SystemWatermarkLag: The system watermark lag at the time of the straggler 6199 // detection. 6200 SystemWatermarkLag string `json:"systemWatermarkLag,omitempty"` 6201 // WorkerName: Name of the worker where the straggler was detected. 6202 WorkerName string `json:"workerName,omitempty"` 6203 // ForceSendFields is a list of field names (e.g. "DataWatermarkLag") to 6204 // unconditionally include in API requests. By default, fields with empty or 6205 // default values are omitted from API requests. See 6206 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6207 // details. 6208 ForceSendFields []string `json:"-"` 6209 // NullFields is a list of field names (e.g. "DataWatermarkLag") to include in 6210 // API requests with the JSON null value. By default, fields with empty values 6211 // are omitted from API requests. See 6212 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6213 NullFields []string `json:"-"` 6214 } 6215 6216 func (s *StreamingStragglerInfo) MarshalJSON() ([]byte, error) { 6217 type NoMethod StreamingStragglerInfo 6218 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6219 } 6220 6221 // StringList: A metric value representing a list of strings. 6222 type StringList struct { 6223 // Elements: Elements of the list. 6224 Elements []string `json:"elements,omitempty"` 6225 // ForceSendFields is a list of field names (e.g. "Elements") to 6226 // unconditionally include in API requests. By default, fields with empty or 6227 // default values are omitted from API requests. See 6228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6229 // details. 6230 ForceSendFields []string `json:"-"` 6231 // NullFields is a list of field names (e.g. "Elements") to include in API 6232 // requests with the JSON null value. By default, fields with empty values are 6233 // omitted from API requests. See 6234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6235 NullFields []string `json:"-"` 6236 } 6237 6238 func (s *StringList) MarshalJSON() ([]byte, error) { 6239 type NoMethod StringList 6240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6241 } 6242 6243 // StructuredMessage: A rich message format, including a human readable string, 6244 // a key for identifying the message, and structured data associated with the 6245 // message for programmatic consumption. 6246 type StructuredMessage struct { 6247 // MessageKey: Identifier for this message type. Used by external systems to 6248 // internationalize or personalize message. 6249 MessageKey string `json:"messageKey,omitempty"` 6250 // MessageText: Human-readable version of message. 6251 MessageText string `json:"messageText,omitempty"` 6252 // Parameters: The structured data associated with this message. 6253 Parameters []*Parameter `json:"parameters,omitempty"` 6254 // ForceSendFields is a list of field names (e.g. "MessageKey") to 6255 // unconditionally include in API requests. By default, fields with empty or 6256 // default values are omitted from API requests. See 6257 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6258 // details. 6259 ForceSendFields []string `json:"-"` 6260 // NullFields is a list of field names (e.g. "MessageKey") to include in API 6261 // requests with the JSON null value. By default, fields with empty values are 6262 // omitted from API requests. See 6263 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6264 NullFields []string `json:"-"` 6265 } 6266 6267 func (s *StructuredMessage) MarshalJSON() ([]byte, error) { 6268 type NoMethod StructuredMessage 6269 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6270 } 6271 6272 // TaskRunnerSettings: Taskrunner configuration settings. 6273 type TaskRunnerSettings struct { 6274 // Alsologtostderr: Whether to also send taskrunner log info to stderr. 6275 Alsologtostderr bool `json:"alsologtostderr,omitempty"` 6276 // BaseTaskDir: The location on the worker for task-specific subdirectories. 6277 BaseTaskDir string `json:"baseTaskDir,omitempty"` 6278 // BaseUrl: The base URL for the taskrunner to use when accessing Google Cloud 6279 // APIs. When workers access Google Cloud APIs, they logically do so via 6280 // relative URLs. If this field is specified, it supplies the base URL to use 6281 // for resolving these relative URLs. The normative algorithm used is defined 6282 // by RFC 1808, "Relative Uniform Resource Locators". If not specified, the 6283 // default value is "http://www.googleapis.com/" 6284 BaseUrl string `json:"baseUrl,omitempty"` 6285 // CommandlinesFileName: The file to store preprocessing commands in. 6286 CommandlinesFileName string `json:"commandlinesFileName,omitempty"` 6287 // ContinueOnException: Whether to continue taskrunner if an exception is hit. 6288 ContinueOnException bool `json:"continueOnException,omitempty"` 6289 // DataflowApiVersion: The API version of endpoint, e.g. "v1b3" 6290 DataflowApiVersion string `json:"dataflowApiVersion,omitempty"` 6291 // HarnessCommand: The command to launch the worker harness. 6292 HarnessCommand string `json:"harnessCommand,omitempty"` 6293 // LanguageHint: The suggested backend language. 6294 LanguageHint string `json:"languageHint,omitempty"` 6295 // LogDir: The directory on the VM to store logs. 6296 LogDir string `json:"logDir,omitempty"` 6297 // LogToSerialconsole: Whether to send taskrunner log info to Google Compute 6298 // Engine VM serial console. 6299 LogToSerialconsole bool `json:"logToSerialconsole,omitempty"` 6300 // LogUploadLocation: Indicates where to put logs. If this is not specified, 6301 // the logs will not be uploaded. The supported resource type is: Google Cloud 6302 // Storage: storage.googleapis.com/{bucket}/{object} 6303 // bucket.storage.googleapis.com/{object} 6304 LogUploadLocation string `json:"logUploadLocation,omitempty"` 6305 // OauthScopes: The OAuth2 scopes to be requested by the taskrunner in order to 6306 // access the Cloud Dataflow API. 6307 OauthScopes []string `json:"oauthScopes,omitempty"` 6308 // ParallelWorkerSettings: The settings to pass to the parallel worker harness. 6309 ParallelWorkerSettings *WorkerSettings `json:"parallelWorkerSettings,omitempty"` 6310 // StreamingWorkerMainClass: The streaming worker main class name. 6311 StreamingWorkerMainClass string `json:"streamingWorkerMainClass,omitempty"` 6312 // TaskGroup: The UNIX group ID on the worker VM to use for tasks launched by 6313 // taskrunner; e.g. "wheel". 6314 TaskGroup string `json:"taskGroup,omitempty"` 6315 // TaskUser: The UNIX user ID on the worker VM to use for tasks launched by 6316 // taskrunner; e.g. "root". 6317 TaskUser string `json:"taskUser,omitempty"` 6318 // TempStoragePrefix: The prefix of the resources the taskrunner should use for 6319 // temporary storage. The supported resource type is: Google Cloud Storage: 6320 // storage.googleapis.com/{bucket}/{object} 6321 // bucket.storage.googleapis.com/{object} 6322 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 6323 // VmId: The ID string of the VM. 6324 VmId string `json:"vmId,omitempty"` 6325 // WorkflowFileName: The file to store the workflow in. 6326 WorkflowFileName string `json:"workflowFileName,omitempty"` 6327 // ForceSendFields is a list of field names (e.g. "Alsologtostderr") to 6328 // unconditionally include in API requests. By default, fields with empty or 6329 // default values are omitted from API requests. See 6330 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6331 // details. 6332 ForceSendFields []string `json:"-"` 6333 // NullFields is a list of field names (e.g. "Alsologtostderr") to include in 6334 // API requests with the JSON null value. By default, fields with empty values 6335 // are omitted from API requests. See 6336 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6337 NullFields []string `json:"-"` 6338 } 6339 6340 func (s *TaskRunnerSettings) MarshalJSON() ([]byte, error) { 6341 type NoMethod TaskRunnerSettings 6342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6343 } 6344 6345 // TemplateMetadata: Metadata describing a template. 6346 type TemplateMetadata struct { 6347 // DefaultStreamingMode: Optional. Indicates the default streaming mode for a 6348 // streaming template. Only valid if both supports_at_least_once and 6349 // supports_exactly_once are true. Possible values: UNSPECIFIED, EXACTLY_ONCE 6350 // and AT_LEAST_ONCE 6351 DefaultStreamingMode string `json:"defaultStreamingMode,omitempty"` 6352 // Description: Optional. A description of the template. 6353 Description string `json:"description,omitempty"` 6354 // Name: Required. The name of the template. 6355 Name string `json:"name,omitempty"` 6356 // Parameters: The parameters for the template. 6357 Parameters []*ParameterMetadata `json:"parameters,omitempty"` 6358 // Streaming: Optional. Indicates if the template is streaming or not. 6359 Streaming bool `json:"streaming,omitempty"` 6360 // SupportsAtLeastOnce: Optional. Indicates if the streaming template supports 6361 // at least once mode. 6362 SupportsAtLeastOnce bool `json:"supportsAtLeastOnce,omitempty"` 6363 // SupportsExactlyOnce: Optional. Indicates if the streaming template supports 6364 // exactly once mode. 6365 SupportsExactlyOnce bool `json:"supportsExactlyOnce,omitempty"` 6366 // ForceSendFields is a list of field names (e.g. "DefaultStreamingMode") to 6367 // unconditionally include in API requests. By default, fields with empty or 6368 // default values are omitted from API requests. See 6369 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6370 // details. 6371 ForceSendFields []string `json:"-"` 6372 // NullFields is a list of field names (e.g. "DefaultStreamingMode") to include 6373 // in API requests with the JSON null value. By default, fields with empty 6374 // values are omitted from API requests. See 6375 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6376 NullFields []string `json:"-"` 6377 } 6378 6379 func (s *TemplateMetadata) MarshalJSON() ([]byte, error) { 6380 type NoMethod TemplateMetadata 6381 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6382 } 6383 6384 // TopologyConfig: Global topology of the streaming Dataflow job, including all 6385 // computations and their sharded locations. 6386 type TopologyConfig struct { 6387 // Computations: The computations associated with a streaming Dataflow job. 6388 Computations []*ComputationTopology `json:"computations,omitempty"` 6389 // DataDiskAssignments: The disks assigned to a streaming Dataflow job. 6390 DataDiskAssignments []*DataDiskAssignment `json:"dataDiskAssignments,omitempty"` 6391 // ForwardingKeyBits: The size (in bits) of keys that will be assigned to 6392 // source messages. 6393 ForwardingKeyBits int64 `json:"forwardingKeyBits,omitempty"` 6394 // PersistentStateVersion: Version number for persistent state. 6395 PersistentStateVersion int64 `json:"persistentStateVersion,omitempty"` 6396 // UserStageToComputationNameMap: Maps user stage names to stable computation 6397 // names. 6398 UserStageToComputationNameMap map[string]string `json:"userStageToComputationNameMap,omitempty"` 6399 // ForceSendFields is a list of field names (e.g. "Computations") to 6400 // unconditionally include in API requests. By default, fields with empty or 6401 // default values are omitted from API requests. See 6402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6403 // details. 6404 ForceSendFields []string `json:"-"` 6405 // NullFields is a list of field names (e.g. "Computations") to include in API 6406 // requests with the JSON null value. By default, fields with empty values are 6407 // omitted from API requests. See 6408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6409 NullFields []string `json:"-"` 6410 } 6411 6412 func (s *TopologyConfig) MarshalJSON() ([]byte, error) { 6413 type NoMethod TopologyConfig 6414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6415 } 6416 6417 // TransformSummary: Description of the type, names/ids, and input/outputs for 6418 // a transform. 6419 type TransformSummary struct { 6420 // DisplayData: Transform-specific display data. 6421 DisplayData []*DisplayData `json:"displayData,omitempty"` 6422 // Id: SDK generated id of this transform instance. 6423 Id string `json:"id,omitempty"` 6424 // InputCollectionName: User names for all collection inputs to this transform. 6425 InputCollectionName []string `json:"inputCollectionName,omitempty"` 6426 // Kind: Type of transform. 6427 // 6428 // Possible values: 6429 // "UNKNOWN_KIND" - Unrecognized transform type. 6430 // "PAR_DO_KIND" - ParDo transform. 6431 // "GROUP_BY_KEY_KIND" - Group By Key transform. 6432 // "FLATTEN_KIND" - Flatten transform. 6433 // "READ_KIND" - Read transform. 6434 // "WRITE_KIND" - Write transform. 6435 // "CONSTANT_KIND" - Constructs from a constant value, such as with 6436 // Create.of. 6437 // "SINGLETON_KIND" - Creates a Singleton view of a collection. 6438 // "SHUFFLE_KIND" - Opening or closing a shuffle session, often as part of a 6439 // GroupByKey. 6440 Kind string `json:"kind,omitempty"` 6441 // Name: User provided name for this transform instance. 6442 Name string `json:"name,omitempty"` 6443 // OutputCollectionName: User names for all collection outputs to this 6444 // transform. 6445 OutputCollectionName []string `json:"outputCollectionName,omitempty"` 6446 // ForceSendFields is a list of field names (e.g. "DisplayData") to 6447 // unconditionally include in API requests. By default, fields with empty or 6448 // default values are omitted from API requests. See 6449 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6450 // details. 6451 ForceSendFields []string `json:"-"` 6452 // NullFields is a list of field names (e.g. "DisplayData") to include in API 6453 // requests with the JSON null value. By default, fields with empty values are 6454 // omitted from API requests. See 6455 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6456 NullFields []string `json:"-"` 6457 } 6458 6459 func (s *TransformSummary) MarshalJSON() ([]byte, error) { 6460 type NoMethod TransformSummary 6461 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6462 } 6463 6464 // WorkItem: WorkItem represents basic information about a WorkItem to be 6465 // executed in the cloud. 6466 type WorkItem struct { 6467 // Configuration: Work item-specific configuration as an opaque blob. 6468 Configuration string `json:"configuration,omitempty"` 6469 // Id: Identifies this WorkItem. 6470 Id int64 `json:"id,omitempty,string"` 6471 // InitialReportIndex: The initial index to use when reporting the status of 6472 // the WorkItem. 6473 InitialReportIndex int64 `json:"initialReportIndex,omitempty,string"` 6474 // JobId: Identifies the workflow job this WorkItem belongs to. 6475 JobId string `json:"jobId,omitempty"` 6476 // LeaseExpireTime: Time when the lease on this Work will expire. 6477 LeaseExpireTime string `json:"leaseExpireTime,omitempty"` 6478 // MapTask: Additional information for MapTask WorkItems. 6479 MapTask *MapTask `json:"mapTask,omitempty"` 6480 // Packages: Any required packages that need to be fetched in order to execute 6481 // this WorkItem. 6482 Packages []*Package `json:"packages,omitempty"` 6483 // ProjectId: Identifies the cloud project this WorkItem belongs to. 6484 ProjectId string `json:"projectId,omitempty"` 6485 // ReportStatusInterval: Recommended reporting interval. 6486 ReportStatusInterval string `json:"reportStatusInterval,omitempty"` 6487 // SeqMapTask: Additional information for SeqMapTask WorkItems. 6488 SeqMapTask *SeqMapTask `json:"seqMapTask,omitempty"` 6489 // ShellTask: Additional information for ShellTask WorkItems. 6490 ShellTask *ShellTask `json:"shellTask,omitempty"` 6491 // SourceOperationTask: Additional information for source operation WorkItems. 6492 SourceOperationTask *SourceOperationRequest `json:"sourceOperationTask,omitempty"` 6493 // StreamingComputationTask: Additional information for 6494 // StreamingComputationTask WorkItems. 6495 StreamingComputationTask *StreamingComputationTask `json:"streamingComputationTask,omitempty"` 6496 // StreamingConfigTask: Additional information for StreamingConfigTask 6497 // WorkItems. 6498 StreamingConfigTask *StreamingConfigTask `json:"streamingConfigTask,omitempty"` 6499 // StreamingSetupTask: Additional information for StreamingSetupTask WorkItems. 6500 StreamingSetupTask *StreamingSetupTask `json:"streamingSetupTask,omitempty"` 6501 // ForceSendFields is a list of field names (e.g. "Configuration") to 6502 // unconditionally include in API requests. By default, fields with empty or 6503 // default values are omitted from API requests. See 6504 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6505 // details. 6506 ForceSendFields []string `json:"-"` 6507 // NullFields is a list of field names (e.g. "Configuration") to include in API 6508 // requests with the JSON null value. By default, fields with empty values are 6509 // omitted from API requests. See 6510 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6511 NullFields []string `json:"-"` 6512 } 6513 6514 func (s *WorkItem) MarshalJSON() ([]byte, error) { 6515 type NoMethod WorkItem 6516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6517 } 6518 6519 // WorkItemDetails: Information about an individual work item execution. 6520 type WorkItemDetails struct { 6521 // AttemptId: Attempt ID of this work item 6522 AttemptId string `json:"attemptId,omitempty"` 6523 // EndTime: End time of this work item attempt. If the work item is completed, 6524 // this is the actual end time of the work item. Otherwise, it is the predicted 6525 // end time. 6526 EndTime string `json:"endTime,omitempty"` 6527 // Metrics: Metrics for this work item. 6528 Metrics []*MetricUpdate `json:"metrics,omitempty"` 6529 // Progress: Progress of this work item. 6530 Progress *ProgressTimeseries `json:"progress,omitempty"` 6531 // StartTime: Start time of this work item attempt. 6532 StartTime string `json:"startTime,omitempty"` 6533 // State: State of this work item. 6534 // 6535 // Possible values: 6536 // "EXECUTION_STATE_UNKNOWN" - The component state is unknown or unspecified. 6537 // "EXECUTION_STATE_NOT_STARTED" - The component is not yet running. 6538 // "EXECUTION_STATE_RUNNING" - The component is currently running. 6539 // "EXECUTION_STATE_SUCCEEDED" - The component succeeded. 6540 // "EXECUTION_STATE_FAILED" - The component failed. 6541 // "EXECUTION_STATE_CANCELLED" - Execution of the component was cancelled. 6542 State string `json:"state,omitempty"` 6543 // StragglerInfo: Information about straggler detections for this work item. 6544 StragglerInfo *StragglerInfo `json:"stragglerInfo,omitempty"` 6545 // TaskId: Name of this work item. 6546 TaskId string `json:"taskId,omitempty"` 6547 // ForceSendFields is a list of field names (e.g. "AttemptId") to 6548 // unconditionally include in API requests. By default, fields with empty or 6549 // default values are omitted from API requests. See 6550 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6551 // details. 6552 ForceSendFields []string `json:"-"` 6553 // NullFields is a list of field names (e.g. "AttemptId") to include in API 6554 // requests with the JSON null value. By default, fields with empty values are 6555 // omitted from API requests. See 6556 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6557 NullFields []string `json:"-"` 6558 } 6559 6560 func (s *WorkItemDetails) MarshalJSON() ([]byte, error) { 6561 type NoMethod WorkItemDetails 6562 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6563 } 6564 6565 // WorkItemServiceState: The Dataflow service's idea of the current state of a 6566 // WorkItem being processed by a worker. 6567 type WorkItemServiceState struct { 6568 // CompleteWorkStatus: If set, a request to complete the work item with the 6569 // given status. This will not be set to OK, unless supported by the specific 6570 // kind of WorkItem. It can be used for the backend to indicate a WorkItem must 6571 // terminate, e.g., for aborting work. 6572 CompleteWorkStatus *Status `json:"completeWorkStatus,omitempty"` 6573 // HarnessData: Other data returned by the service, specific to the particular 6574 // worker harness. 6575 HarnessData googleapi.RawMessage `json:"harnessData,omitempty"` 6576 // HotKeyDetection: A hot key is a symptom of poor data distribution in which 6577 // there are enough elements mapped to a single key to impact pipeline 6578 // performance. When present, this field includes metadata associated with any 6579 // hot key. 6580 HotKeyDetection *HotKeyDetection `json:"hotKeyDetection,omitempty"` 6581 // LeaseExpireTime: Time at which the current lease will expire. 6582 LeaseExpireTime string `json:"leaseExpireTime,omitempty"` 6583 // MetricShortId: The short ids that workers should use in subsequent metric 6584 // updates. Workers should strive to use short ids whenever possible, but it is 6585 // ok to request the short_id again if a worker lost track of it (e.g. if the 6586 // worker is recovering from a crash). NOTE: it is possible that the response 6587 // may have short ids for a subset of the metrics. 6588 MetricShortId []*MetricShortId `json:"metricShortId,omitempty"` 6589 // NextReportIndex: The index value to use for the next report sent by the 6590 // worker. Note: If the report call fails for whatever reason, the worker 6591 // should reuse this index for subsequent report attempts. 6592 NextReportIndex int64 `json:"nextReportIndex,omitempty,string"` 6593 // ReportStatusInterval: New recommended reporting interval. 6594 ReportStatusInterval string `json:"reportStatusInterval,omitempty"` 6595 // SplitRequest: The progress point in the WorkItem where the Dataflow service 6596 // suggests that the worker truncate the task. 6597 SplitRequest *ApproximateSplitRequest `json:"splitRequest,omitempty"` 6598 // SuggestedStopPoint: DEPRECATED in favor of split_request. 6599 SuggestedStopPoint *ApproximateProgress `json:"suggestedStopPoint,omitempty"` 6600 // SuggestedStopPosition: Obsolete, always empty. 6601 SuggestedStopPosition *Position `json:"suggestedStopPosition,omitempty"` 6602 // ForceSendFields is a list of field names (e.g. "CompleteWorkStatus") to 6603 // unconditionally include in API requests. By default, fields with empty or 6604 // default values are omitted from API requests. See 6605 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6606 // details. 6607 ForceSendFields []string `json:"-"` 6608 // NullFields is a list of field names (e.g. "CompleteWorkStatus") to include 6609 // in API requests with the JSON null value. By default, fields with empty 6610 // values are omitted from API requests. See 6611 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6612 NullFields []string `json:"-"` 6613 } 6614 6615 func (s *WorkItemServiceState) MarshalJSON() ([]byte, error) { 6616 type NoMethod WorkItemServiceState 6617 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6618 } 6619 6620 // WorkItemStatus: Conveys a worker's progress through the work described by a 6621 // WorkItem. 6622 type WorkItemStatus struct { 6623 // Completed: True if the WorkItem was completed (successfully or 6624 // unsuccessfully). 6625 Completed bool `json:"completed,omitempty"` 6626 // CounterUpdates: Worker output counters for this WorkItem. 6627 CounterUpdates []*CounterUpdate `json:"counterUpdates,omitempty"` 6628 // DynamicSourceSplit: See documentation of stop_position. 6629 DynamicSourceSplit *DynamicSourceSplit `json:"dynamicSourceSplit,omitempty"` 6630 // Errors: Specifies errors which occurred during processing. If errors are 6631 // provided, and completed = true, then the WorkItem is considered to have 6632 // failed. 6633 Errors []*Status `json:"errors,omitempty"` 6634 // MetricUpdates: DEPRECATED in favor of counter_updates. 6635 MetricUpdates []*MetricUpdate `json:"metricUpdates,omitempty"` 6636 // Progress: DEPRECATED in favor of reported_progress. 6637 Progress *ApproximateProgress `json:"progress,omitempty"` 6638 // ReportIndex: The report index. When a WorkItem is leased, the lease will 6639 // contain an initial report index. When a WorkItem's status is reported to the 6640 // system, the report should be sent with that report index, and the response 6641 // will contain the index the worker should use for the next report. Reports 6642 // received with unexpected index values will be rejected by the service. In 6643 // order to preserve idempotency, the worker should not alter the contents of a 6644 // report, even if the worker must submit the same report multiple times before 6645 // getting back a response. The worker should not submit a subsequent report 6646 // until the response for the previous report had been received from the 6647 // service. 6648 ReportIndex int64 `json:"reportIndex,omitempty,string"` 6649 // ReportedProgress: The worker's progress through this WorkItem. 6650 ReportedProgress *ApproximateReportedProgress `json:"reportedProgress,omitempty"` 6651 // RequestedLeaseDuration: Amount of time the worker requests for its lease. 6652 RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` 6653 // SourceFork: DEPRECATED in favor of dynamic_source_split. 6654 SourceFork *SourceFork `json:"sourceFork,omitempty"` 6655 // SourceOperationResponse: If the work item represented a 6656 // SourceOperationRequest, and the work is completed, contains the result of 6657 // the operation. 6658 SourceOperationResponse *SourceOperationResponse `json:"sourceOperationResponse,omitempty"` 6659 // StopPosition: A worker may split an active map task in two parts, "primary" 6660 // and "residual", continuing to process the primary part and returning the 6661 // residual part into the pool of available work. This event is called a 6662 // "dynamic split" and is critical to the dynamic work rebalancing feature. The 6663 // two obtained sub-tasks are called "parts" of the split. The parts, if 6664 // concatenated, must represent the same input as would be read by the current 6665 // task if the split did not happen. The exact way in which the original task 6666 // is decomposed into the two parts is specified either as a position 6667 // demarcating them (stop_position), or explicitly as two DerivedSources, if 6668 // this task consumes a user-defined source type (dynamic_source_split). The 6669 // "current" task is adjusted as a result of the split: after a task with range 6670 // [A, B) sends a stop_position update at C, its range is considered to be [A, 6671 // C), e.g.: * Progress should be interpreted relative to the new range, e.g. 6672 // "75% completed" means "75% of [A, C) completed" * The worker should 6673 // interpret proposed_stop_position relative to the new range, e.g. "split at 6674 // 68%" should be interpreted as "split at 68% of [A, C)". * If the worker 6675 // chooses to split again using stop_position, only stop_positions in [A, C) 6676 // will be accepted. * Etc. dynamic_source_split has similar semantics: e.g., 6677 // if a task with source S splits using dynamic_source_split into {P, R} (where 6678 // P and R must be together equivalent to S), then subsequent progress and 6679 // proposed_stop_position should be interpreted relative to P, and in a 6680 // potential subsequent dynamic_source_split into {P', R'}, P' and R' must be 6681 // together equivalent to P, etc. 6682 StopPosition *Position `json:"stopPosition,omitempty"` 6683 // TotalThrottlerWaitTimeSeconds: Total time the worker spent being throttled 6684 // by external systems. 6685 TotalThrottlerWaitTimeSeconds float64 `json:"totalThrottlerWaitTimeSeconds,omitempty"` 6686 // WorkItemId: Identifies the WorkItem. 6687 WorkItemId string `json:"workItemId,omitempty"` 6688 // ForceSendFields is a list of field names (e.g. "Completed") to 6689 // unconditionally include in API requests. By default, fields with empty or 6690 // default values are omitted from API requests. See 6691 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6692 // details. 6693 ForceSendFields []string `json:"-"` 6694 // NullFields is a list of field names (e.g. "Completed") to include in API 6695 // requests with the JSON null value. By default, fields with empty values are 6696 // omitted from API requests. See 6697 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6698 NullFields []string `json:"-"` 6699 } 6700 6701 func (s *WorkItemStatus) MarshalJSON() ([]byte, error) { 6702 type NoMethod WorkItemStatus 6703 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6704 } 6705 6706 func (s *WorkItemStatus) UnmarshalJSON(data []byte) error { 6707 type NoMethod WorkItemStatus 6708 var s1 struct { 6709 TotalThrottlerWaitTimeSeconds gensupport.JSONFloat64 `json:"totalThrottlerWaitTimeSeconds"` 6710 *NoMethod 6711 } 6712 s1.NoMethod = (*NoMethod)(s) 6713 if err := json.Unmarshal(data, &s1); err != nil { 6714 return err 6715 } 6716 s.TotalThrottlerWaitTimeSeconds = float64(s1.TotalThrottlerWaitTimeSeconds) 6717 return nil 6718 } 6719 6720 // WorkerDetails: Information about a worker 6721 type WorkerDetails struct { 6722 // WorkItems: Work items processed by this worker, sorted by time. 6723 WorkItems []*WorkItemDetails `json:"workItems,omitempty"` 6724 // WorkerName: Name of this worker 6725 WorkerName string `json:"workerName,omitempty"` 6726 // ForceSendFields is a list of field names (e.g. "WorkItems") to 6727 // unconditionally include in API requests. By default, fields with empty or 6728 // default values are omitted from API requests. See 6729 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6730 // details. 6731 ForceSendFields []string `json:"-"` 6732 // NullFields is a list of field names (e.g. "WorkItems") to include in API 6733 // requests with the JSON null value. By default, fields with empty values are 6734 // omitted from API requests. See 6735 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6736 NullFields []string `json:"-"` 6737 } 6738 6739 func (s *WorkerDetails) MarshalJSON() ([]byte, error) { 6740 type NoMethod WorkerDetails 6741 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6742 } 6743 6744 // WorkerHealthReport: WorkerHealthReport contains information about the health 6745 // of a worker. The VM should be identified by the labels attached to the 6746 // WorkerMessage that this health ping belongs to. 6747 type WorkerHealthReport struct { 6748 // Msg: Message describing any unusual health reports. 6749 Msg string `json:"msg,omitempty"` 6750 // Pods: The pods running on the worker. See: 6751 // http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod 6752 // This field is used by the worker to send the status of the indvidual 6753 // containers running on each worker. 6754 Pods []googleapi.RawMessage `json:"pods,omitempty"` 6755 // ReportInterval: The interval at which the worker is sending health reports. 6756 // The default value of 0 should be interpreted as the field is not being 6757 // explicitly set by the worker. 6758 ReportInterval string `json:"reportInterval,omitempty"` 6759 // VmBrokenCode: Code to describe a specific reason, if known, that a VM has 6760 // reported broken state. 6761 VmBrokenCode string `json:"vmBrokenCode,omitempty"` 6762 // VmIsBroken: Whether the VM is in a permanently broken state. Broken VMs 6763 // should be abandoned or deleted ASAP to avoid assigning or completing any 6764 // work. 6765 VmIsBroken bool `json:"vmIsBroken,omitempty"` 6766 // VmIsHealthy: Whether the VM is currently healthy. 6767 VmIsHealthy bool `json:"vmIsHealthy,omitempty"` 6768 // VmStartupTime: The time the VM was booted. 6769 VmStartupTime string `json:"vmStartupTime,omitempty"` 6770 // ForceSendFields is a list of field names (e.g. "Msg") to unconditionally 6771 // include in API requests. By default, fields with empty or default values are 6772 // omitted from API requests. See 6773 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6774 // details. 6775 ForceSendFields []string `json:"-"` 6776 // NullFields is a list of field names (e.g. "Msg") to include in API requests 6777 // with the JSON null value. By default, fields with empty values are omitted 6778 // from API requests. See 6779 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6780 NullFields []string `json:"-"` 6781 } 6782 6783 func (s *WorkerHealthReport) MarshalJSON() ([]byte, error) { 6784 type NoMethod WorkerHealthReport 6785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6786 } 6787 6788 // WorkerHealthReportResponse: WorkerHealthReportResponse contains information 6789 // returned to the worker in response to a health ping. 6790 type WorkerHealthReportResponse struct { 6791 // ReportInterval: A positive value indicates the worker should change its 6792 // reporting interval to the specified value. The default value of zero means 6793 // no change in report rate is requested by the server. 6794 ReportInterval string `json:"reportInterval,omitempty"` 6795 // ForceSendFields is a list of field names (e.g. "ReportInterval") to 6796 // unconditionally include in API requests. By default, fields with empty or 6797 // default values are omitted from API requests. See 6798 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6799 // details. 6800 ForceSendFields []string `json:"-"` 6801 // NullFields is a list of field names (e.g. "ReportInterval") to include in 6802 // API requests with the JSON null value. By default, fields with empty values 6803 // are omitted from API requests. See 6804 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6805 NullFields []string `json:"-"` 6806 } 6807 6808 func (s *WorkerHealthReportResponse) MarshalJSON() ([]byte, error) { 6809 type NoMethod WorkerHealthReportResponse 6810 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6811 } 6812 6813 // WorkerLifecycleEvent: A report of an event in a worker's lifecycle. The 6814 // proto contains one event, because the worker is expected to asynchronously 6815 // send each message immediately after the event. Due to this asynchrony, 6816 // messages may arrive out of order (or missing), and it is up to the consumer 6817 // to interpret. The timestamp of the event is in the enclosing WorkerMessage 6818 // proto. 6819 type WorkerLifecycleEvent struct { 6820 // ContainerStartTime: The start time of this container. All events will report 6821 // this so that events can be grouped together across container/VM restarts. 6822 ContainerStartTime string `json:"containerStartTime,omitempty"` 6823 // Event: The event being reported. 6824 // 6825 // Possible values: 6826 // "UNKNOWN_EVENT" - Invalid event. 6827 // "OS_START" - The time the VM started. 6828 // "CONTAINER_START" - Our container code starts running. Multiple containers 6829 // could be distinguished with WorkerMessage.labels if desired. 6830 // "NETWORK_UP" - The worker has a functional external network connection. 6831 // "STAGING_FILES_DOWNLOAD_START" - Started downloading staging files. 6832 // "STAGING_FILES_DOWNLOAD_FINISH" - Finished downloading all staging files. 6833 // "SDK_INSTALL_START" - For applicable SDKs, started installation of SDK and 6834 // worker packages. 6835 // "SDK_INSTALL_FINISH" - Finished installing SDK. 6836 Event string `json:"event,omitempty"` 6837 // Metadata: Other stats that can accompany an event. E.g. { "downloaded_bytes" 6838 // : "123456" } 6839 Metadata map[string]string `json:"metadata,omitempty"` 6840 // ForceSendFields is a list of field names (e.g. "ContainerStartTime") to 6841 // unconditionally include in API requests. By default, fields with empty or 6842 // default values are omitted from API requests. See 6843 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6844 // details. 6845 ForceSendFields []string `json:"-"` 6846 // NullFields is a list of field names (e.g. "ContainerStartTime") to include 6847 // in API requests with the JSON null value. By default, fields with empty 6848 // values are omitted from API requests. See 6849 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6850 NullFields []string `json:"-"` 6851 } 6852 6853 func (s *WorkerLifecycleEvent) MarshalJSON() ([]byte, error) { 6854 type NoMethod WorkerLifecycleEvent 6855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6856 } 6857 6858 // WorkerMessage: WorkerMessage provides information to the backend about a 6859 // worker. 6860 type WorkerMessage struct { 6861 // DataSamplingReport: Optional. Contains metrics related to 6862 // go/dataflow-data-sampling-telemetry. 6863 DataSamplingReport *DataSamplingReport `json:"dataSamplingReport,omitempty"` 6864 // Labels: Labels are used to group WorkerMessages. For example, a 6865 // worker_message about a particular container might have the labels: { 6866 // "JOB_ID": "2015-04-22", "WORKER_ID": "wordcount-vm-2015…" 6867 // "CONTAINER_TYPE": "worker", "CONTAINER_ID": "ac1234def"} Label tags 6868 // typically correspond to Label enum values. However, for ease of development 6869 // other strings can be used as tags. LABEL_UNSPECIFIED should not be used 6870 // here. 6871 Labels map[string]string `json:"labels,omitempty"` 6872 // PerWorkerMetrics: System defined metrics for this worker. 6873 PerWorkerMetrics *PerWorkerMetrics `json:"perWorkerMetrics,omitempty"` 6874 // StreamingScalingReport: Contains per-user worker telemetry used in streaming 6875 // autoscaling. 6876 StreamingScalingReport *StreamingScalingReport `json:"streamingScalingReport,omitempty"` 6877 // Time: The timestamp of the worker_message. 6878 Time string `json:"time,omitempty"` 6879 // WorkerHealthReport: The health of a worker. 6880 WorkerHealthReport *WorkerHealthReport `json:"workerHealthReport,omitempty"` 6881 // WorkerLifecycleEvent: Record of worker lifecycle events. 6882 WorkerLifecycleEvent *WorkerLifecycleEvent `json:"workerLifecycleEvent,omitempty"` 6883 // WorkerMessageCode: A worker message code. 6884 WorkerMessageCode *WorkerMessageCode `json:"workerMessageCode,omitempty"` 6885 // WorkerMetrics: Resource metrics reported by workers. 6886 WorkerMetrics *ResourceUtilizationReport `json:"workerMetrics,omitempty"` 6887 // WorkerShutdownNotice: Shutdown notice by workers. 6888 WorkerShutdownNotice *WorkerShutdownNotice `json:"workerShutdownNotice,omitempty"` 6889 // WorkerThreadScalingReport: Thread scaling information reported by workers. 6890 WorkerThreadScalingReport *WorkerThreadScalingReport `json:"workerThreadScalingReport,omitempty"` 6891 // ForceSendFields is a list of field names (e.g. "DataSamplingReport") to 6892 // unconditionally include in API requests. By default, fields with empty or 6893 // default values are omitted from API requests. See 6894 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6895 // details. 6896 ForceSendFields []string `json:"-"` 6897 // NullFields is a list of field names (e.g. "DataSamplingReport") to include 6898 // in API requests with the JSON null value. By default, fields with empty 6899 // values are omitted from API requests. See 6900 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6901 NullFields []string `json:"-"` 6902 } 6903 6904 func (s *WorkerMessage) MarshalJSON() ([]byte, error) { 6905 type NoMethod WorkerMessage 6906 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6907 } 6908 6909 // WorkerMessageCode: A message code is used to report status and error 6910 // messages to the service. The message codes are intended to be machine 6911 // readable. The service will take care of translating these into user 6912 // understandable messages if necessary. Example use cases: 1. Worker processes 6913 // reporting successful startup. 2. Worker processes reporting specific errors 6914 // (e.g. package staging failure). 6915 type WorkerMessageCode struct { 6916 // Code: The code is a string intended for consumption by a machine that 6917 // identifies the type of message being sent. Examples: 1. "HARNESS_STARTED" 6918 // might be used to indicate the worker harness has started. 2. 6919 // "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading a Cloud 6920 // Storage file as part of the boot process of one of the worker containers. 6921 // This is a string and not an enum to make it easy to add new codes without 6922 // waiting for an API change. 6923 Code string `json:"code,omitempty"` 6924 // Parameters: Parameters contains specific information about the code. This is 6925 // a struct to allow parameters of different types. Examples: 1. For a 6926 // "HARNESS_STARTED" message parameters might provide the name of the worker 6927 // and additional data like timing information. 2. For a "GCS_DOWNLOAD_ERROR" 6928 // parameters might contain fields listing the Cloud Storage objects being 6929 // downloaded and fields containing errors. In general complex data structures 6930 // should be avoided. If a worker needs to send a specific and complicated data 6931 // structure then please consider defining a new proto and adding it to the 6932 // data oneof in WorkerMessageResponse. Conventions: Parameters should only be 6933 // used for information that isn't typically passed as a label. hostname and 6934 // other worker identifiers should almost always be passed as labels since they 6935 // will be included on most messages. 6936 Parameters googleapi.RawMessage `json:"parameters,omitempty"` 6937 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 6938 // include in API requests. By default, fields with empty or default values are 6939 // omitted from API requests. See 6940 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6941 // details. 6942 ForceSendFields []string `json:"-"` 6943 // NullFields is a list of field names (e.g. "Code") to include in API requests 6944 // with the JSON null value. By default, fields with empty values are omitted 6945 // from API requests. See 6946 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6947 NullFields []string `json:"-"` 6948 } 6949 6950 func (s *WorkerMessageCode) MarshalJSON() ([]byte, error) { 6951 type NoMethod WorkerMessageCode 6952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6953 } 6954 6955 // WorkerMessageResponse: A worker_message response allows the server to pass 6956 // information to the sender. 6957 type WorkerMessageResponse struct { 6958 // StreamingScalingReportResponse: Service's streaming scaling response for 6959 // workers. 6960 StreamingScalingReportResponse *StreamingScalingReportResponse `json:"streamingScalingReportResponse,omitempty"` 6961 // WorkerHealthReportResponse: The service's response to a worker's health 6962 // report. 6963 WorkerHealthReportResponse *WorkerHealthReportResponse `json:"workerHealthReportResponse,omitempty"` 6964 // WorkerMetricsResponse: Service's response to reporting worker metrics 6965 // (currently empty). 6966 WorkerMetricsResponse *ResourceUtilizationReportResponse `json:"workerMetricsResponse,omitempty"` 6967 // WorkerShutdownNoticeResponse: Service's response to shutdown notice 6968 // (currently empty). 6969 WorkerShutdownNoticeResponse *WorkerShutdownNoticeResponse `json:"workerShutdownNoticeResponse,omitempty"` 6970 // WorkerThreadScalingReportResponse: Service's thread scaling recommendation 6971 // for workers. 6972 WorkerThreadScalingReportResponse *WorkerThreadScalingReportResponse `json:"workerThreadScalingReportResponse,omitempty"` 6973 // ForceSendFields is a list of field names (e.g. 6974 // "StreamingScalingReportResponse") to unconditionally include in API 6975 // requests. By default, fields with empty or default values are omitted from 6976 // API requests. See 6977 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6978 // details. 6979 ForceSendFields []string `json:"-"` 6980 // NullFields is a list of field names (e.g. "StreamingScalingReportResponse") 6981 // to include in API requests with the JSON null value. By default, fields with 6982 // empty values are omitted from API requests. See 6983 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6984 NullFields []string `json:"-"` 6985 } 6986 6987 func (s *WorkerMessageResponse) MarshalJSON() ([]byte, error) { 6988 type NoMethod WorkerMessageResponse 6989 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6990 } 6991 6992 // WorkerPool: Describes one particular pool of Cloud Dataflow workers to be 6993 // instantiated by the Cloud Dataflow service in order to perform the 6994 // computations required by a job. Note that a workflow job may use multiple 6995 // pools, in order to match the various computational requirements of the 6996 // various stages of the job. 6997 type WorkerPool struct { 6998 // AutoscalingSettings: Settings for autoscaling of this WorkerPool. 6999 AutoscalingSettings *AutoscalingSettings `json:"autoscalingSettings,omitempty"` 7000 // DataDisks: Data disks that are used by a VM in this workflow. 7001 DataDisks []*Disk `json:"dataDisks,omitempty"` 7002 // DefaultPackageSet: The default package set to install. This allows the 7003 // service to select a default set of packages which are useful to worker 7004 // harnesses written in a particular language. 7005 // 7006 // Possible values: 7007 // "DEFAULT_PACKAGE_SET_UNKNOWN" - The default set of packages to stage is 7008 // unknown, or unspecified. 7009 // "DEFAULT_PACKAGE_SET_NONE" - Indicates that no packages should be staged 7010 // at the worker unless explicitly specified by the job. 7011 // "DEFAULT_PACKAGE_SET_JAVA" - Stage packages typically useful to workers 7012 // written in Java. 7013 // "DEFAULT_PACKAGE_SET_PYTHON" - Stage packages typically useful to workers 7014 // written in Python. 7015 DefaultPackageSet string `json:"defaultPackageSet,omitempty"` 7016 // DiskSizeGb: Size of root disk for VMs, in GB. If zero or unspecified, the 7017 // service will attempt to choose a reasonable default. 7018 DiskSizeGb int64 `json:"diskSizeGb,omitempty"` 7019 // DiskSourceImage: Fully qualified source image for disks. 7020 DiskSourceImage string `json:"diskSourceImage,omitempty"` 7021 // DiskType: Type of root disk for VMs. If empty or unspecified, the service 7022 // will attempt to choose a reasonable default. 7023 DiskType string `json:"diskType,omitempty"` 7024 // IpConfiguration: Configuration for VM IPs. 7025 // 7026 // Possible values: 7027 // "WORKER_IP_UNSPECIFIED" - The configuration is unknown, or unspecified. 7028 // "WORKER_IP_PUBLIC" - Workers should have public IP addresses. 7029 // "WORKER_IP_PRIVATE" - Workers should have private IP addresses. 7030 IpConfiguration string `json:"ipConfiguration,omitempty"` 7031 // Kind: The kind of the worker pool; currently only `harness` and `shuffle` 7032 // are supported. 7033 Kind string `json:"kind,omitempty"` 7034 // MachineType: Machine type (e.g. "n1-standard-1"). If empty or unspecified, 7035 // the service will attempt to choose a reasonable default. 7036 MachineType string `json:"machineType,omitempty"` 7037 // Metadata: Metadata to set on the Google Compute Engine VMs. 7038 Metadata map[string]string `json:"metadata,omitempty"` 7039 // Network: Network to which VMs will be assigned. If empty or unspecified, the 7040 // service will use the network "default". 7041 Network string `json:"network,omitempty"` 7042 // NumThreadsPerWorker: The number of threads per worker harness. If empty or 7043 // unspecified, the service will choose a number of threads (according to the 7044 // number of cores on the selected machine type for batch, or 1 by convention 7045 // for streaming). 7046 NumThreadsPerWorker int64 `json:"numThreadsPerWorker,omitempty"` 7047 // NumWorkers: Number of Google Compute Engine workers in this pool needed to 7048 // execute the job. If zero or unspecified, the service will attempt to choose 7049 // a reasonable default. 7050 NumWorkers int64 `json:"numWorkers,omitempty"` 7051 // OnHostMaintenance: The action to take on host maintenance, as defined by the 7052 // Google Compute Engine API. 7053 OnHostMaintenance string `json:"onHostMaintenance,omitempty"` 7054 // Packages: Packages to be installed on workers. 7055 Packages []*Package `json:"packages,omitempty"` 7056 // PoolArgs: Extra arguments for this worker pool. 7057 PoolArgs googleapi.RawMessage `json:"poolArgs,omitempty"` 7058 // SdkHarnessContainerImages: Set of SDK harness containers needed to execute 7059 // this pipeline. This will only be set in the Fn API path. For 7060 // non-cross-language pipelines this should have only one entry. Cross-language 7061 // pipelines will have two or more entries. 7062 SdkHarnessContainerImages []*SdkHarnessContainerImage `json:"sdkHarnessContainerImages,omitempty"` 7063 // Subnetwork: Subnetwork to which VMs will be assigned, if desired. Expected 7064 // to be of the form "regions/REGION/subnetworks/SUBNETWORK". 7065 Subnetwork string `json:"subnetwork,omitempty"` 7066 // TaskrunnerSettings: Settings passed through to Google Compute Engine workers 7067 // when using the standard Dataflow task runner. Users should ignore this 7068 // field. 7069 TaskrunnerSettings *TaskRunnerSettings `json:"taskrunnerSettings,omitempty"` 7070 // TeardownPolicy: Sets the policy for determining when to turndown worker 7071 // pool. Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and 7072 // `TEARDOWN_NEVER`. `TEARDOWN_ALWAYS` means workers are always torn down 7073 // regardless of whether the job succeeds. `TEARDOWN_ON_SUCCESS` means workers 7074 // are torn down if the job succeeds. `TEARDOWN_NEVER` means the workers are 7075 // never torn down. If the workers are not torn down by the service, they will 7076 // continue to run and use Google Compute Engine VM resources in the user's 7077 // project until they are explicitly terminated by the user. Because of this, 7078 // Google recommends using the `TEARDOWN_ALWAYS` policy except for small, 7079 // manually supervised test jobs. If unknown or unspecified, the service will 7080 // attempt to choose a reasonable default. 7081 // 7082 // Possible values: 7083 // "TEARDOWN_POLICY_UNKNOWN" - The teardown policy isn't specified, or is 7084 // unknown. 7085 // "TEARDOWN_ALWAYS" - Always teardown the resource. 7086 // "TEARDOWN_ON_SUCCESS" - Teardown the resource on success. This is useful 7087 // for debugging failures. 7088 // "TEARDOWN_NEVER" - Never teardown the resource. This is useful for 7089 // debugging and development. 7090 TeardownPolicy string `json:"teardownPolicy,omitempty"` 7091 // WorkerHarnessContainerImage: Required. Docker container image that executes 7092 // the Cloud Dataflow worker harness, residing in Google Container Registry. 7093 // Deprecated for the Fn API path. Use sdk_harness_container_images instead. 7094 WorkerHarnessContainerImage string `json:"workerHarnessContainerImage,omitempty"` 7095 // Zone: Zone to run the worker pools in. If empty or unspecified, the service 7096 // will attempt to choose a reasonable default. 7097 Zone string `json:"zone,omitempty"` 7098 // ForceSendFields is a list of field names (e.g. "AutoscalingSettings") to 7099 // unconditionally include in API requests. By default, fields with empty or 7100 // default values are omitted from API requests. See 7101 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7102 // details. 7103 ForceSendFields []string `json:"-"` 7104 // NullFields is a list of field names (e.g. "AutoscalingSettings") to include 7105 // in API requests with the JSON null value. By default, fields with empty 7106 // values are omitted from API requests. See 7107 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7108 NullFields []string `json:"-"` 7109 } 7110 7111 func (s *WorkerPool) MarshalJSON() ([]byte, error) { 7112 type NoMethod WorkerPool 7113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7114 } 7115 7116 // WorkerSettings: Provides data to pass through to the worker harness. 7117 type WorkerSettings struct { 7118 // BaseUrl: The base URL for accessing Google Cloud APIs. When workers access 7119 // Google Cloud APIs, they logically do so via relative URLs. If this field is 7120 // specified, it supplies the base URL to use for resolving these relative 7121 // URLs. The normative algorithm used is defined by RFC 1808, "Relative Uniform 7122 // Resource Locators". If not specified, the default value is 7123 // "http://www.googleapis.com/" 7124 BaseUrl string `json:"baseUrl,omitempty"` 7125 // ReportingEnabled: Whether to send work progress updates to the service. 7126 ReportingEnabled bool `json:"reportingEnabled,omitempty"` 7127 // ServicePath: The Cloud Dataflow service path relative to the root URL, for 7128 // example, "dataflow/v1b3/projects". 7129 ServicePath string `json:"servicePath,omitempty"` 7130 // ShuffleServicePath: The Shuffle service path relative to the root URL, for 7131 // example, "shuffle/v1beta1". 7132 ShuffleServicePath string `json:"shuffleServicePath,omitempty"` 7133 // TempStoragePrefix: The prefix of the resources the system should use for 7134 // temporary storage. The supported resource type is: Google Cloud Storage: 7135 // storage.googleapis.com/{bucket}/{object} 7136 // bucket.storage.googleapis.com/{object} 7137 TempStoragePrefix string `json:"tempStoragePrefix,omitempty"` 7138 // WorkerId: The ID of the worker running this pipeline. 7139 WorkerId string `json:"workerId,omitempty"` 7140 // ForceSendFields is a list of field names (e.g. "BaseUrl") to unconditionally 7141 // include in API requests. By default, fields with empty or default values are 7142 // omitted from API requests. See 7143 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7144 // details. 7145 ForceSendFields []string `json:"-"` 7146 // NullFields is a list of field names (e.g. "BaseUrl") to include in API 7147 // requests with the JSON null value. By default, fields with empty values are 7148 // omitted from API requests. See 7149 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7150 NullFields []string `json:"-"` 7151 } 7152 7153 func (s *WorkerSettings) MarshalJSON() ([]byte, error) { 7154 type NoMethod WorkerSettings 7155 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7156 } 7157 7158 // WorkerShutdownNotice: Shutdown notification from workers. This is to be sent 7159 // by the shutdown script of the worker VM so that the backend knows that the 7160 // VM is being shut down. 7161 type WorkerShutdownNotice struct { 7162 // Reason: The reason for the worker shutdown. Current possible values are: 7163 // "UNKNOWN": shutdown reason is unknown. "PREEMPTION": shutdown reason is 7164 // preemption. Other possible reasons may be added in the future. 7165 Reason string `json:"reason,omitempty"` 7166 // ForceSendFields is a list of field names (e.g. "Reason") to unconditionally 7167 // include in API requests. By default, fields with empty or default values are 7168 // omitted from API requests. See 7169 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7170 // details. 7171 ForceSendFields []string `json:"-"` 7172 // NullFields is a list of field names (e.g. "Reason") to include in API 7173 // requests with the JSON null value. By default, fields with empty values are 7174 // omitted from API requests. See 7175 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7176 NullFields []string `json:"-"` 7177 } 7178 7179 func (s *WorkerShutdownNotice) MarshalJSON() ([]byte, error) { 7180 type NoMethod WorkerShutdownNotice 7181 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7182 } 7183 7184 // WorkerShutdownNoticeResponse: Service-side response to WorkerMessage issuing 7185 // shutdown notice. 7186 type WorkerShutdownNoticeResponse struct { 7187 } 7188 7189 // WorkerThreadScalingReport: Contains information about the thread scaling 7190 // information of a worker. 7191 type WorkerThreadScalingReport struct { 7192 // CurrentThreadCount: Current number of active threads in a worker. 7193 CurrentThreadCount int64 `json:"currentThreadCount,omitempty"` 7194 // ForceSendFields is a list of field names (e.g. "CurrentThreadCount") to 7195 // unconditionally include in API requests. By default, fields with empty or 7196 // default values are omitted from API requests. See 7197 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7198 // details. 7199 ForceSendFields []string `json:"-"` 7200 // NullFields is a list of field names (e.g. "CurrentThreadCount") to include 7201 // in API requests with the JSON null value. By default, fields with empty 7202 // values are omitted from API requests. See 7203 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7204 NullFields []string `json:"-"` 7205 } 7206 7207 func (s *WorkerThreadScalingReport) MarshalJSON() ([]byte, error) { 7208 type NoMethod WorkerThreadScalingReport 7209 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7210 } 7211 7212 // WorkerThreadScalingReportResponse: Contains the thread scaling 7213 // recommendation for a worker from the backend. 7214 type WorkerThreadScalingReportResponse struct { 7215 // RecommendedThreadCount: Recommended number of threads for a worker. 7216 RecommendedThreadCount int64 `json:"recommendedThreadCount,omitempty"` 7217 // ForceSendFields is a list of field names (e.g. "RecommendedThreadCount") to 7218 // unconditionally include in API requests. By default, fields with empty or 7219 // default values are omitted from API requests. See 7220 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7221 // details. 7222 ForceSendFields []string `json:"-"` 7223 // NullFields is a list of field names (e.g. "RecommendedThreadCount") to 7224 // include in API requests with the JSON null value. By default, fields with 7225 // empty values are omitted from API requests. See 7226 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7227 NullFields []string `json:"-"` 7228 } 7229 7230 func (s *WorkerThreadScalingReportResponse) MarshalJSON() ([]byte, error) { 7231 type NoMethod WorkerThreadScalingReportResponse 7232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7233 } 7234 7235 // WriteInstruction: An instruction that writes records. Takes one input, 7236 // produces no outputs. 7237 type WriteInstruction struct { 7238 // Input: The input. 7239 Input *InstructionInput `json:"input,omitempty"` 7240 // Sink: The sink to write to. 7241 Sink *Sink `json:"sink,omitempty"` 7242 // ForceSendFields is a list of field names (e.g. "Input") to unconditionally 7243 // include in API requests. By default, fields with empty or default values are 7244 // omitted from API requests. See 7245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7246 // details. 7247 ForceSendFields []string `json:"-"` 7248 // NullFields is a list of field names (e.g. "Input") to include in API 7249 // requests with the JSON null value. By default, fields with empty values are 7250 // omitted from API requests. See 7251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7252 NullFields []string `json:"-"` 7253 } 7254 7255 func (s *WriteInstruction) MarshalJSON() ([]byte, error) { 7256 type NoMethod WriteInstruction 7257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7258 } 7259 7260 type ProjectsDeleteSnapshotsCall struct { 7261 s *Service 7262 projectId string 7263 urlParams_ gensupport.URLParams 7264 ctx_ context.Context 7265 header_ http.Header 7266 } 7267 7268 // DeleteSnapshots: Deletes a snapshot. 7269 // 7270 // - projectId: The ID of the Cloud Platform project that the snapshot belongs 7271 // to. 7272 func (r *ProjectsService) DeleteSnapshots(projectId string) *ProjectsDeleteSnapshotsCall { 7273 c := &ProjectsDeleteSnapshotsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7274 c.projectId = projectId 7275 return c 7276 } 7277 7278 // Location sets the optional parameter "location": The location that contains 7279 // this snapshot. 7280 func (c *ProjectsDeleteSnapshotsCall) Location(location string) *ProjectsDeleteSnapshotsCall { 7281 c.urlParams_.Set("location", location) 7282 return c 7283 } 7284 7285 // SnapshotId sets the optional parameter "snapshotId": The ID of the snapshot. 7286 func (c *ProjectsDeleteSnapshotsCall) SnapshotId(snapshotId string) *ProjectsDeleteSnapshotsCall { 7287 c.urlParams_.Set("snapshotId", snapshotId) 7288 return c 7289 } 7290 7291 // Fields allows partial responses to be retrieved. See 7292 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7293 // details. 7294 func (c *ProjectsDeleteSnapshotsCall) Fields(s ...googleapi.Field) *ProjectsDeleteSnapshotsCall { 7295 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7296 return c 7297 } 7298 7299 // Context sets the context to be used in this call's Do method. 7300 func (c *ProjectsDeleteSnapshotsCall) Context(ctx context.Context) *ProjectsDeleteSnapshotsCall { 7301 c.ctx_ = ctx 7302 return c 7303 } 7304 7305 // Header returns a http.Header that can be modified by the caller to add 7306 // headers to the request. 7307 func (c *ProjectsDeleteSnapshotsCall) Header() http.Header { 7308 if c.header_ == nil { 7309 c.header_ = make(http.Header) 7310 } 7311 return c.header_ 7312 } 7313 7314 func (c *ProjectsDeleteSnapshotsCall) doRequest(alt string) (*http.Response, error) { 7315 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7316 var body io.Reader = nil 7317 c.urlParams_.Set("alt", alt) 7318 c.urlParams_.Set("prettyPrint", "false") 7319 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/snapshots") 7320 urls += "?" + c.urlParams_.Encode() 7321 req, err := http.NewRequest("DELETE", urls, body) 7322 if err != nil { 7323 return nil, err 7324 } 7325 req.Header = reqHeaders 7326 googleapi.Expand(req.URL, map[string]string{ 7327 "projectId": c.projectId, 7328 }) 7329 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7330 } 7331 7332 // Do executes the "dataflow.projects.deleteSnapshots" call. 7333 // Any non-2xx status code is an error. Response headers are in either 7334 // *DeleteSnapshotResponse.ServerResponse.Header or (if a response was returned 7335 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7336 // check whether the returned error was because http.StatusNotModified was 7337 // returned. 7338 func (c *ProjectsDeleteSnapshotsCall) Do(opts ...googleapi.CallOption) (*DeleteSnapshotResponse, error) { 7339 gensupport.SetOptions(c.urlParams_, opts...) 7340 res, err := c.doRequest("json") 7341 if res != nil && res.StatusCode == http.StatusNotModified { 7342 if res.Body != nil { 7343 res.Body.Close() 7344 } 7345 return nil, gensupport.WrapError(&googleapi.Error{ 7346 Code: res.StatusCode, 7347 Header: res.Header, 7348 }) 7349 } 7350 if err != nil { 7351 return nil, err 7352 } 7353 defer googleapi.CloseBody(res) 7354 if err := googleapi.CheckResponse(res); err != nil { 7355 return nil, gensupport.WrapError(err) 7356 } 7357 ret := &DeleteSnapshotResponse{ 7358 ServerResponse: googleapi.ServerResponse{ 7359 Header: res.Header, 7360 HTTPStatusCode: res.StatusCode, 7361 }, 7362 } 7363 target := &ret 7364 if err := gensupport.DecodeResponse(target, res); err != nil { 7365 return nil, err 7366 } 7367 return ret, nil 7368 } 7369 7370 type ProjectsWorkerMessagesCall struct { 7371 s *Service 7372 projectId string 7373 sendworkermessagesrequest *SendWorkerMessagesRequest 7374 urlParams_ gensupport.URLParams 7375 ctx_ context.Context 7376 header_ http.Header 7377 } 7378 7379 // WorkerMessages: Send a worker_message to the service. 7380 // 7381 // - projectId: The project to send the WorkerMessages to. 7382 func (r *ProjectsService) WorkerMessages(projectId string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsWorkerMessagesCall { 7383 c := &ProjectsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7384 c.projectId = projectId 7385 c.sendworkermessagesrequest = sendworkermessagesrequest 7386 return c 7387 } 7388 7389 // Fields allows partial responses to be retrieved. See 7390 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7391 // details. 7392 func (c *ProjectsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsWorkerMessagesCall { 7393 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7394 return c 7395 } 7396 7397 // Context sets the context to be used in this call's Do method. 7398 func (c *ProjectsWorkerMessagesCall) Context(ctx context.Context) *ProjectsWorkerMessagesCall { 7399 c.ctx_ = ctx 7400 return c 7401 } 7402 7403 // Header returns a http.Header that can be modified by the caller to add 7404 // headers to the request. 7405 func (c *ProjectsWorkerMessagesCall) Header() http.Header { 7406 if c.header_ == nil { 7407 c.header_ = make(http.Header) 7408 } 7409 return c.header_ 7410 } 7411 7412 func (c *ProjectsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) { 7413 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7414 var body io.Reader = nil 7415 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest) 7416 if err != nil { 7417 return nil, err 7418 } 7419 c.urlParams_.Set("alt", alt) 7420 c.urlParams_.Set("prettyPrint", "false") 7421 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/WorkerMessages") 7422 urls += "?" + c.urlParams_.Encode() 7423 req, err := http.NewRequest("POST", urls, body) 7424 if err != nil { 7425 return nil, err 7426 } 7427 req.Header = reqHeaders 7428 googleapi.Expand(req.URL, map[string]string{ 7429 "projectId": c.projectId, 7430 }) 7431 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7432 } 7433 7434 // Do executes the "dataflow.projects.workerMessages" call. 7435 // Any non-2xx status code is an error. Response headers are in either 7436 // *SendWorkerMessagesResponse.ServerResponse.Header or (if a response was 7437 // returned at all) in error.(*googleapi.Error).Header. Use 7438 // googleapi.IsNotModified to check whether the returned error was because 7439 // http.StatusNotModified was returned. 7440 func (c *ProjectsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) { 7441 gensupport.SetOptions(c.urlParams_, opts...) 7442 res, err := c.doRequest("json") 7443 if res != nil && res.StatusCode == http.StatusNotModified { 7444 if res.Body != nil { 7445 res.Body.Close() 7446 } 7447 return nil, gensupport.WrapError(&googleapi.Error{ 7448 Code: res.StatusCode, 7449 Header: res.Header, 7450 }) 7451 } 7452 if err != nil { 7453 return nil, err 7454 } 7455 defer googleapi.CloseBody(res) 7456 if err := googleapi.CheckResponse(res); err != nil { 7457 return nil, gensupport.WrapError(err) 7458 } 7459 ret := &SendWorkerMessagesResponse{ 7460 ServerResponse: googleapi.ServerResponse{ 7461 Header: res.Header, 7462 HTTPStatusCode: res.StatusCode, 7463 }, 7464 } 7465 target := &ret 7466 if err := gensupport.DecodeResponse(target, res); err != nil { 7467 return nil, err 7468 } 7469 return ret, nil 7470 } 7471 7472 type ProjectsJobsAggregatedCall struct { 7473 s *Service 7474 projectId string 7475 urlParams_ gensupport.URLParams 7476 ifNoneMatch_ string 7477 ctx_ context.Context 7478 header_ http.Header 7479 } 7480 7481 // Aggregated: List the jobs of a project across all regions. **Note:** This 7482 // method doesn't support filtering the list of jobs by name. 7483 // 7484 // - projectId: The project which owns the jobs. 7485 func (r *ProjectsJobsService) Aggregated(projectId string) *ProjectsJobsAggregatedCall { 7486 c := &ProjectsJobsAggregatedCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7487 c.projectId = projectId 7488 return c 7489 } 7490 7491 // Filter sets the optional parameter "filter": The kind of filter to use. 7492 // 7493 // Possible values: 7494 // 7495 // "UNKNOWN" - The filter isn't specified, or is unknown. This returns all 7496 // 7497 // jobs ordered on descending `JobUuid`. 7498 // 7499 // "ALL" - Returns all running jobs first ordered on creation timestamp, then 7500 // 7501 // returns all terminated jobs ordered on the termination timestamp. 7502 // 7503 // "TERMINATED" - Filters the jobs that have a terminated state, ordered on 7504 // 7505 // the termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, 7506 // `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. 7507 // 7508 // "ACTIVE" - Filters the jobs that are running ordered on the creation 7509 // 7510 // timestamp. 7511 func (c *ProjectsJobsAggregatedCall) Filter(filter string) *ProjectsJobsAggregatedCall { 7512 c.urlParams_.Set("filter", filter) 7513 return c 7514 } 7515 7516 // Location sets the optional parameter "location": The [regional endpoint] 7517 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 7518 // contains this job. 7519 func (c *ProjectsJobsAggregatedCall) Location(location string) *ProjectsJobsAggregatedCall { 7520 c.urlParams_.Set("location", location) 7521 return c 7522 } 7523 7524 // Name sets the optional parameter "name": The job name. 7525 func (c *ProjectsJobsAggregatedCall) Name(name string) *ProjectsJobsAggregatedCall { 7526 c.urlParams_.Set("name", name) 7527 return c 7528 } 7529 7530 // PageSize sets the optional parameter "pageSize": If there are many jobs, 7531 // limit response to at most this many. The actual number of jobs returned will 7532 // be the lesser of max_responses and an unspecified server-defined limit. 7533 func (c *ProjectsJobsAggregatedCall) PageSize(pageSize int64) *ProjectsJobsAggregatedCall { 7534 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7535 return c 7536 } 7537 7538 // PageToken sets the optional parameter "pageToken": Set this to the 7539 // 'next_page_token' field of a previous response to request additional results 7540 // in a long list. 7541 func (c *ProjectsJobsAggregatedCall) PageToken(pageToken string) *ProjectsJobsAggregatedCall { 7542 c.urlParams_.Set("pageToken", pageToken) 7543 return c 7544 } 7545 7546 // View sets the optional parameter "view": Deprecated. ListJobs always returns 7547 // summaries now. Use GetJob for other JobViews. 7548 // 7549 // Possible values: 7550 // 7551 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 7552 // 7553 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 7554 // and may contain additional information. 7555 // 7556 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 7557 // 7558 // job name, job type, job status, start/end time, and Cloud SDK version 7559 // details. 7560 // 7561 // "JOB_VIEW_ALL" - Request all information available for this job. When the 7562 // 7563 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 7564 // running, and not all job information is available. For complete job 7565 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 7566 // information, see 7567 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 7568 // s.jobs#jobstate). 7569 // 7570 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 7571 // 7572 // data for steps, labels and environment. 7573 func (c *ProjectsJobsAggregatedCall) View(view string) *ProjectsJobsAggregatedCall { 7574 c.urlParams_.Set("view", view) 7575 return c 7576 } 7577 7578 // Fields allows partial responses to be retrieved. See 7579 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7580 // details. 7581 func (c *ProjectsJobsAggregatedCall) Fields(s ...googleapi.Field) *ProjectsJobsAggregatedCall { 7582 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7583 return c 7584 } 7585 7586 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7587 // object's ETag matches the given value. This is useful for getting updates 7588 // only after the object has changed since the last request. 7589 func (c *ProjectsJobsAggregatedCall) IfNoneMatch(entityTag string) *ProjectsJobsAggregatedCall { 7590 c.ifNoneMatch_ = entityTag 7591 return c 7592 } 7593 7594 // Context sets the context to be used in this call's Do method. 7595 func (c *ProjectsJobsAggregatedCall) Context(ctx context.Context) *ProjectsJobsAggregatedCall { 7596 c.ctx_ = ctx 7597 return c 7598 } 7599 7600 // Header returns a http.Header that can be modified by the caller to add 7601 // headers to the request. 7602 func (c *ProjectsJobsAggregatedCall) Header() http.Header { 7603 if c.header_ == nil { 7604 c.header_ = make(http.Header) 7605 } 7606 return c.header_ 7607 } 7608 7609 func (c *ProjectsJobsAggregatedCall) doRequest(alt string) (*http.Response, error) { 7610 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7611 if c.ifNoneMatch_ != "" { 7612 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7613 } 7614 var body io.Reader = nil 7615 c.urlParams_.Set("alt", alt) 7616 c.urlParams_.Set("prettyPrint", "false") 7617 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs:aggregated") 7618 urls += "?" + c.urlParams_.Encode() 7619 req, err := http.NewRequest("GET", urls, body) 7620 if err != nil { 7621 return nil, err 7622 } 7623 req.Header = reqHeaders 7624 googleapi.Expand(req.URL, map[string]string{ 7625 "projectId": c.projectId, 7626 }) 7627 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7628 } 7629 7630 // Do executes the "dataflow.projects.jobs.aggregated" call. 7631 // Any non-2xx status code is an error. Response headers are in either 7632 // *ListJobsResponse.ServerResponse.Header or (if a response was returned at 7633 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7634 // check whether the returned error was because http.StatusNotModified was 7635 // returned. 7636 func (c *ProjectsJobsAggregatedCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 7637 gensupport.SetOptions(c.urlParams_, opts...) 7638 res, err := c.doRequest("json") 7639 if res != nil && res.StatusCode == http.StatusNotModified { 7640 if res.Body != nil { 7641 res.Body.Close() 7642 } 7643 return nil, gensupport.WrapError(&googleapi.Error{ 7644 Code: res.StatusCode, 7645 Header: res.Header, 7646 }) 7647 } 7648 if err != nil { 7649 return nil, err 7650 } 7651 defer googleapi.CloseBody(res) 7652 if err := googleapi.CheckResponse(res); err != nil { 7653 return nil, gensupport.WrapError(err) 7654 } 7655 ret := &ListJobsResponse{ 7656 ServerResponse: googleapi.ServerResponse{ 7657 Header: res.Header, 7658 HTTPStatusCode: res.StatusCode, 7659 }, 7660 } 7661 target := &ret 7662 if err := gensupport.DecodeResponse(target, res); err != nil { 7663 return nil, err 7664 } 7665 return ret, nil 7666 } 7667 7668 // Pages invokes f for each page of results. 7669 // A non-nil error returned from f will halt the iteration. 7670 // The provided context supersedes any context provided to the Context method. 7671 func (c *ProjectsJobsAggregatedCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 7672 c.ctx_ = ctx 7673 defer c.PageToken(c.urlParams_.Get("pageToken")) 7674 for { 7675 x, err := c.Do() 7676 if err != nil { 7677 return err 7678 } 7679 if err := f(x); err != nil { 7680 return err 7681 } 7682 if x.NextPageToken == "" { 7683 return nil 7684 } 7685 c.PageToken(x.NextPageToken) 7686 } 7687 } 7688 7689 type ProjectsJobsCreateCall struct { 7690 s *Service 7691 projectId string 7692 job *Job 7693 urlParams_ gensupport.URLParams 7694 ctx_ context.Context 7695 header_ http.Header 7696 } 7697 7698 // Create: Creates a Cloud Dataflow job. To create a job, we recommend using 7699 // `projects.locations.jobs.create` with a [regional endpoint] 7700 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 7701 // `projects.jobs.create` is not recommended, as your job will always start in 7702 // `us-central1`. Do not enter confidential information when you supply string 7703 // values using the API. 7704 // 7705 // - projectId: The ID of the Cloud Platform project that the job belongs to. 7706 func (r *ProjectsJobsService) Create(projectId string, job *Job) *ProjectsJobsCreateCall { 7707 c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7708 c.projectId = projectId 7709 c.job = job 7710 return c 7711 } 7712 7713 // Location sets the optional parameter "location": The [regional endpoint] 7714 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 7715 // contains this job. 7716 func (c *ProjectsJobsCreateCall) Location(location string) *ProjectsJobsCreateCall { 7717 c.urlParams_.Set("location", location) 7718 return c 7719 } 7720 7721 // ReplaceJobId sets the optional parameter "replaceJobId": Deprecated. This 7722 // field is now in the Job message. 7723 func (c *ProjectsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsJobsCreateCall { 7724 c.urlParams_.Set("replaceJobId", replaceJobId) 7725 return c 7726 } 7727 7728 // View sets the optional parameter "view": The level of information requested 7729 // in response. 7730 // 7731 // Possible values: 7732 // 7733 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 7734 // 7735 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 7736 // and may contain additional information. 7737 // 7738 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 7739 // 7740 // job name, job type, job status, start/end time, and Cloud SDK version 7741 // details. 7742 // 7743 // "JOB_VIEW_ALL" - Request all information available for this job. When the 7744 // 7745 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 7746 // running, and not all job information is available. For complete job 7747 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 7748 // information, see 7749 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 7750 // s.jobs#jobstate). 7751 // 7752 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 7753 // 7754 // data for steps, labels and environment. 7755 func (c *ProjectsJobsCreateCall) View(view string) *ProjectsJobsCreateCall { 7756 c.urlParams_.Set("view", view) 7757 return c 7758 } 7759 7760 // Fields allows partial responses to be retrieved. See 7761 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7762 // details. 7763 func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall { 7764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7765 return c 7766 } 7767 7768 // Context sets the context to be used in this call's Do method. 7769 func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall { 7770 c.ctx_ = ctx 7771 return c 7772 } 7773 7774 // Header returns a http.Header that can be modified by the caller to add 7775 // headers to the request. 7776 func (c *ProjectsJobsCreateCall) Header() http.Header { 7777 if c.header_ == nil { 7778 c.header_ = make(http.Header) 7779 } 7780 return c.header_ 7781 } 7782 7783 func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) { 7784 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7785 var body io.Reader = nil 7786 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 7787 if err != nil { 7788 return nil, err 7789 } 7790 c.urlParams_.Set("alt", alt) 7791 c.urlParams_.Set("prettyPrint", "false") 7792 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") 7793 urls += "?" + c.urlParams_.Encode() 7794 req, err := http.NewRequest("POST", urls, body) 7795 if err != nil { 7796 return nil, err 7797 } 7798 req.Header = reqHeaders 7799 googleapi.Expand(req.URL, map[string]string{ 7800 "projectId": c.projectId, 7801 }) 7802 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7803 } 7804 7805 // Do executes the "dataflow.projects.jobs.create" call. 7806 // Any non-2xx status code is an error. Response headers are in either 7807 // *Job.ServerResponse.Header or (if a response was returned at all) in 7808 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7809 // whether the returned error was because http.StatusNotModified was returned. 7810 func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 7811 gensupport.SetOptions(c.urlParams_, opts...) 7812 res, err := c.doRequest("json") 7813 if res != nil && res.StatusCode == http.StatusNotModified { 7814 if res.Body != nil { 7815 res.Body.Close() 7816 } 7817 return nil, gensupport.WrapError(&googleapi.Error{ 7818 Code: res.StatusCode, 7819 Header: res.Header, 7820 }) 7821 } 7822 if err != nil { 7823 return nil, err 7824 } 7825 defer googleapi.CloseBody(res) 7826 if err := googleapi.CheckResponse(res); err != nil { 7827 return nil, gensupport.WrapError(err) 7828 } 7829 ret := &Job{ 7830 ServerResponse: googleapi.ServerResponse{ 7831 Header: res.Header, 7832 HTTPStatusCode: res.StatusCode, 7833 }, 7834 } 7835 target := &ret 7836 if err := gensupport.DecodeResponse(target, res); err != nil { 7837 return nil, err 7838 } 7839 return ret, nil 7840 } 7841 7842 type ProjectsJobsGetCall struct { 7843 s *Service 7844 projectId string 7845 jobId string 7846 urlParams_ gensupport.URLParams 7847 ifNoneMatch_ string 7848 ctx_ context.Context 7849 header_ http.Header 7850 } 7851 7852 // Get: Gets the state of the specified Cloud Dataflow job. To get the state of 7853 // a job, we recommend using `projects.locations.jobs.get` with a [regional 7854 // endpoint] 7855 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 7856 // `projects.jobs.get` is not recommended, as you can only get the state of 7857 // jobs that are running in `us-central1`. 7858 // 7859 // - jobId: The job ID. 7860 // - projectId: The ID of the Cloud Platform project that the job belongs to. 7861 func (r *ProjectsJobsService) Get(projectId string, jobId string) *ProjectsJobsGetCall { 7862 c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7863 c.projectId = projectId 7864 c.jobId = jobId 7865 return c 7866 } 7867 7868 // Location sets the optional parameter "location": The [regional endpoint] 7869 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 7870 // contains this job. 7871 func (c *ProjectsJobsGetCall) Location(location string) *ProjectsJobsGetCall { 7872 c.urlParams_.Set("location", location) 7873 return c 7874 } 7875 7876 // View sets the optional parameter "view": The level of information requested 7877 // in response. 7878 // 7879 // Possible values: 7880 // 7881 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 7882 // 7883 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 7884 // and may contain additional information. 7885 // 7886 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 7887 // 7888 // job name, job type, job status, start/end time, and Cloud SDK version 7889 // details. 7890 // 7891 // "JOB_VIEW_ALL" - Request all information available for this job. When the 7892 // 7893 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 7894 // running, and not all job information is available. For complete job 7895 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 7896 // information, see 7897 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 7898 // s.jobs#jobstate). 7899 // 7900 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 7901 // 7902 // data for steps, labels and environment. 7903 func (c *ProjectsJobsGetCall) View(view string) *ProjectsJobsGetCall { 7904 c.urlParams_.Set("view", view) 7905 return c 7906 } 7907 7908 // Fields allows partial responses to be retrieved. See 7909 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7910 // details. 7911 func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall { 7912 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7913 return c 7914 } 7915 7916 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7917 // object's ETag matches the given value. This is useful for getting updates 7918 // only after the object has changed since the last request. 7919 func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall { 7920 c.ifNoneMatch_ = entityTag 7921 return c 7922 } 7923 7924 // Context sets the context to be used in this call's Do method. 7925 func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall { 7926 c.ctx_ = ctx 7927 return c 7928 } 7929 7930 // Header returns a http.Header that can be modified by the caller to add 7931 // headers to the request. 7932 func (c *ProjectsJobsGetCall) Header() http.Header { 7933 if c.header_ == nil { 7934 c.header_ = make(http.Header) 7935 } 7936 return c.header_ 7937 } 7938 7939 func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) { 7940 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7941 if c.ifNoneMatch_ != "" { 7942 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7943 } 7944 var body io.Reader = nil 7945 c.urlParams_.Set("alt", alt) 7946 c.urlParams_.Set("prettyPrint", "false") 7947 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") 7948 urls += "?" + c.urlParams_.Encode() 7949 req, err := http.NewRequest("GET", urls, body) 7950 if err != nil { 7951 return nil, err 7952 } 7953 req.Header = reqHeaders 7954 googleapi.Expand(req.URL, map[string]string{ 7955 "projectId": c.projectId, 7956 "jobId": c.jobId, 7957 }) 7958 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7959 } 7960 7961 // Do executes the "dataflow.projects.jobs.get" call. 7962 // Any non-2xx status code is an error. Response headers are in either 7963 // *Job.ServerResponse.Header or (if a response was returned at all) in 7964 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7965 // whether the returned error was because http.StatusNotModified was returned. 7966 func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 7967 gensupport.SetOptions(c.urlParams_, opts...) 7968 res, err := c.doRequest("json") 7969 if res != nil && res.StatusCode == http.StatusNotModified { 7970 if res.Body != nil { 7971 res.Body.Close() 7972 } 7973 return nil, gensupport.WrapError(&googleapi.Error{ 7974 Code: res.StatusCode, 7975 Header: res.Header, 7976 }) 7977 } 7978 if err != nil { 7979 return nil, err 7980 } 7981 defer googleapi.CloseBody(res) 7982 if err := googleapi.CheckResponse(res); err != nil { 7983 return nil, gensupport.WrapError(err) 7984 } 7985 ret := &Job{ 7986 ServerResponse: googleapi.ServerResponse{ 7987 Header: res.Header, 7988 HTTPStatusCode: res.StatusCode, 7989 }, 7990 } 7991 target := &ret 7992 if err := gensupport.DecodeResponse(target, res); err != nil { 7993 return nil, err 7994 } 7995 return ret, nil 7996 } 7997 7998 type ProjectsJobsGetMetricsCall struct { 7999 s *Service 8000 projectId string 8001 jobId string 8002 urlParams_ gensupport.URLParams 8003 ifNoneMatch_ string 8004 ctx_ context.Context 8005 header_ http.Header 8006 } 8007 8008 // GetMetrics: Request the job status. To request the status of a job, we 8009 // recommend using `projects.locations.jobs.getMetrics` with a [regional 8010 // endpoint] 8011 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 8012 // `projects.jobs.getMetrics` is not recommended, as you can only request the 8013 // status of jobs that are running in `us-central1`. 8014 // 8015 // - jobId: The job to get metrics for. 8016 // - projectId: A project id. 8017 func (r *ProjectsJobsService) GetMetrics(projectId string, jobId string) *ProjectsJobsGetMetricsCall { 8018 c := &ProjectsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8019 c.projectId = projectId 8020 c.jobId = jobId 8021 return c 8022 } 8023 8024 // Location sets the optional parameter "location": The [regional endpoint] 8025 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 8026 // contains the job specified by job_id. 8027 func (c *ProjectsJobsGetMetricsCall) Location(location string) *ProjectsJobsGetMetricsCall { 8028 c.urlParams_.Set("location", location) 8029 return c 8030 } 8031 8032 // StartTime sets the optional parameter "startTime": Return only metric data 8033 // that has changed since this time. Default is to return all information about 8034 // all metrics for the job. 8035 func (c *ProjectsJobsGetMetricsCall) StartTime(startTime string) *ProjectsJobsGetMetricsCall { 8036 c.urlParams_.Set("startTime", startTime) 8037 return c 8038 } 8039 8040 // Fields allows partial responses to be retrieved. See 8041 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8042 // details. 8043 func (c *ProjectsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsJobsGetMetricsCall { 8044 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8045 return c 8046 } 8047 8048 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8049 // object's ETag matches the given value. This is useful for getting updates 8050 // only after the object has changed since the last request. 8051 func (c *ProjectsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsJobsGetMetricsCall { 8052 c.ifNoneMatch_ = entityTag 8053 return c 8054 } 8055 8056 // Context sets the context to be used in this call's Do method. 8057 func (c *ProjectsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsJobsGetMetricsCall { 8058 c.ctx_ = ctx 8059 return c 8060 } 8061 8062 // Header returns a http.Header that can be modified by the caller to add 8063 // headers to the request. 8064 func (c *ProjectsJobsGetMetricsCall) Header() http.Header { 8065 if c.header_ == nil { 8066 c.header_ = make(http.Header) 8067 } 8068 return c.header_ 8069 } 8070 8071 func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) { 8072 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8073 if c.ifNoneMatch_ != "" { 8074 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8075 } 8076 var body io.Reader = nil 8077 c.urlParams_.Set("alt", alt) 8078 c.urlParams_.Set("prettyPrint", "false") 8079 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/metrics") 8080 urls += "?" + c.urlParams_.Encode() 8081 req, err := http.NewRequest("GET", urls, body) 8082 if err != nil { 8083 return nil, err 8084 } 8085 req.Header = reqHeaders 8086 googleapi.Expand(req.URL, map[string]string{ 8087 "projectId": c.projectId, 8088 "jobId": c.jobId, 8089 }) 8090 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8091 } 8092 8093 // Do executes the "dataflow.projects.jobs.getMetrics" call. 8094 // Any non-2xx status code is an error. Response headers are in either 8095 // *JobMetrics.ServerResponse.Header or (if a response was returned at all) in 8096 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8097 // whether the returned error was because http.StatusNotModified was returned. 8098 func (c *ProjectsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) { 8099 gensupport.SetOptions(c.urlParams_, opts...) 8100 res, err := c.doRequest("json") 8101 if res != nil && res.StatusCode == http.StatusNotModified { 8102 if res.Body != nil { 8103 res.Body.Close() 8104 } 8105 return nil, gensupport.WrapError(&googleapi.Error{ 8106 Code: res.StatusCode, 8107 Header: res.Header, 8108 }) 8109 } 8110 if err != nil { 8111 return nil, err 8112 } 8113 defer googleapi.CloseBody(res) 8114 if err := googleapi.CheckResponse(res); err != nil { 8115 return nil, gensupport.WrapError(err) 8116 } 8117 ret := &JobMetrics{ 8118 ServerResponse: googleapi.ServerResponse{ 8119 Header: res.Header, 8120 HTTPStatusCode: res.StatusCode, 8121 }, 8122 } 8123 target := &ret 8124 if err := gensupport.DecodeResponse(target, res); err != nil { 8125 return nil, err 8126 } 8127 return ret, nil 8128 } 8129 8130 type ProjectsJobsListCall struct { 8131 s *Service 8132 projectId string 8133 urlParams_ gensupport.URLParams 8134 ifNoneMatch_ string 8135 ctx_ context.Context 8136 header_ http.Header 8137 } 8138 8139 // List: List the jobs of a project. To list the jobs of a project in a region, 8140 // we recommend using `projects.locations.jobs.list` with a [regional endpoint] 8141 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To 8142 // list the all jobs across all regions, use `projects.jobs.aggregated`. Using 8143 // `projects.jobs.list` is not recommended, because you can only get the list 8144 // of jobs that are running in `us-central1`. `projects.locations.jobs.list` 8145 // and `projects.jobs.list` support filtering the list of jobs by name. 8146 // Filtering by name isn't supported by `projects.jobs.aggregated`. 8147 // 8148 // - projectId: The project which owns the jobs. 8149 func (r *ProjectsJobsService) List(projectId string) *ProjectsJobsListCall { 8150 c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8151 c.projectId = projectId 8152 return c 8153 } 8154 8155 // Filter sets the optional parameter "filter": The kind of filter to use. 8156 // 8157 // Possible values: 8158 // 8159 // "UNKNOWN" - The filter isn't specified, or is unknown. This returns all 8160 // 8161 // jobs ordered on descending `JobUuid`. 8162 // 8163 // "ALL" - Returns all running jobs first ordered on creation timestamp, then 8164 // 8165 // returns all terminated jobs ordered on the termination timestamp. 8166 // 8167 // "TERMINATED" - Filters the jobs that have a terminated state, ordered on 8168 // 8169 // the termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, 8170 // `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. 8171 // 8172 // "ACTIVE" - Filters the jobs that are running ordered on the creation 8173 // 8174 // timestamp. 8175 func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall { 8176 c.urlParams_.Set("filter", filter) 8177 return c 8178 } 8179 8180 // Location sets the optional parameter "location": The [regional endpoint] 8181 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 8182 // contains this job. 8183 func (c *ProjectsJobsListCall) Location(location string) *ProjectsJobsListCall { 8184 c.urlParams_.Set("location", location) 8185 return c 8186 } 8187 8188 // Name sets the optional parameter "name": The job name. 8189 func (c *ProjectsJobsListCall) Name(name string) *ProjectsJobsListCall { 8190 c.urlParams_.Set("name", name) 8191 return c 8192 } 8193 8194 // PageSize sets the optional parameter "pageSize": If there are many jobs, 8195 // limit response to at most this many. The actual number of jobs returned will 8196 // be the lesser of max_responses and an unspecified server-defined limit. 8197 func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall { 8198 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8199 return c 8200 } 8201 8202 // PageToken sets the optional parameter "pageToken": Set this to the 8203 // 'next_page_token' field of a previous response to request additional results 8204 // in a long list. 8205 func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall { 8206 c.urlParams_.Set("pageToken", pageToken) 8207 return c 8208 } 8209 8210 // View sets the optional parameter "view": Deprecated. ListJobs always returns 8211 // summaries now. Use GetJob for other JobViews. 8212 // 8213 // Possible values: 8214 // 8215 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 8216 // 8217 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 8218 // and may contain additional information. 8219 // 8220 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 8221 // 8222 // job name, job type, job status, start/end time, and Cloud SDK version 8223 // details. 8224 // 8225 // "JOB_VIEW_ALL" - Request all information available for this job. When the 8226 // 8227 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 8228 // running, and not all job information is available. For complete job 8229 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 8230 // information, see 8231 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 8232 // s.jobs#jobstate). 8233 // 8234 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 8235 // 8236 // data for steps, labels and environment. 8237 func (c *ProjectsJobsListCall) View(view string) *ProjectsJobsListCall { 8238 c.urlParams_.Set("view", view) 8239 return c 8240 } 8241 8242 // Fields allows partial responses to be retrieved. See 8243 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8244 // details. 8245 func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall { 8246 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8247 return c 8248 } 8249 8250 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8251 // object's ETag matches the given value. This is useful for getting updates 8252 // only after the object has changed since the last request. 8253 func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall { 8254 c.ifNoneMatch_ = entityTag 8255 return c 8256 } 8257 8258 // Context sets the context to be used in this call's Do method. 8259 func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall { 8260 c.ctx_ = ctx 8261 return c 8262 } 8263 8264 // Header returns a http.Header that can be modified by the caller to add 8265 // headers to the request. 8266 func (c *ProjectsJobsListCall) Header() http.Header { 8267 if c.header_ == nil { 8268 c.header_ = make(http.Header) 8269 } 8270 return c.header_ 8271 } 8272 8273 func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) { 8274 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8275 if c.ifNoneMatch_ != "" { 8276 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8277 } 8278 var body io.Reader = nil 8279 c.urlParams_.Set("alt", alt) 8280 c.urlParams_.Set("prettyPrint", "false") 8281 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs") 8282 urls += "?" + c.urlParams_.Encode() 8283 req, err := http.NewRequest("GET", urls, body) 8284 if err != nil { 8285 return nil, err 8286 } 8287 req.Header = reqHeaders 8288 googleapi.Expand(req.URL, map[string]string{ 8289 "projectId": c.projectId, 8290 }) 8291 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8292 } 8293 8294 // Do executes the "dataflow.projects.jobs.list" call. 8295 // Any non-2xx status code is an error. Response headers are in either 8296 // *ListJobsResponse.ServerResponse.Header or (if a response was returned at 8297 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8298 // check whether the returned error was because http.StatusNotModified was 8299 // returned. 8300 func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 8301 gensupport.SetOptions(c.urlParams_, opts...) 8302 res, err := c.doRequest("json") 8303 if res != nil && res.StatusCode == http.StatusNotModified { 8304 if res.Body != nil { 8305 res.Body.Close() 8306 } 8307 return nil, gensupport.WrapError(&googleapi.Error{ 8308 Code: res.StatusCode, 8309 Header: res.Header, 8310 }) 8311 } 8312 if err != nil { 8313 return nil, err 8314 } 8315 defer googleapi.CloseBody(res) 8316 if err := googleapi.CheckResponse(res); err != nil { 8317 return nil, gensupport.WrapError(err) 8318 } 8319 ret := &ListJobsResponse{ 8320 ServerResponse: googleapi.ServerResponse{ 8321 Header: res.Header, 8322 HTTPStatusCode: res.StatusCode, 8323 }, 8324 } 8325 target := &ret 8326 if err := gensupport.DecodeResponse(target, res); err != nil { 8327 return nil, err 8328 } 8329 return ret, nil 8330 } 8331 8332 // Pages invokes f for each page of results. 8333 // A non-nil error returned from f will halt the iteration. 8334 // The provided context supersedes any context provided to the Context method. 8335 func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 8336 c.ctx_ = ctx 8337 defer c.PageToken(c.urlParams_.Get("pageToken")) 8338 for { 8339 x, err := c.Do() 8340 if err != nil { 8341 return err 8342 } 8343 if err := f(x); err != nil { 8344 return err 8345 } 8346 if x.NextPageToken == "" { 8347 return nil 8348 } 8349 c.PageToken(x.NextPageToken) 8350 } 8351 } 8352 8353 type ProjectsJobsSnapshotCall struct { 8354 s *Service 8355 projectId string 8356 jobId string 8357 snapshotjobrequest *SnapshotJobRequest 8358 urlParams_ gensupport.URLParams 8359 ctx_ context.Context 8360 header_ http.Header 8361 } 8362 8363 // Snapshot: Snapshot the state of a streaming job. 8364 // 8365 // - jobId: The job to be snapshotted. 8366 // - projectId: The project which owns the job to be snapshotted. 8367 func (r *ProjectsJobsService) Snapshot(projectId string, jobId string, snapshotjobrequest *SnapshotJobRequest) *ProjectsJobsSnapshotCall { 8368 c := &ProjectsJobsSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8369 c.projectId = projectId 8370 c.jobId = jobId 8371 c.snapshotjobrequest = snapshotjobrequest 8372 return c 8373 } 8374 8375 // Fields allows partial responses to be retrieved. See 8376 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8377 // details. 8378 func (c *ProjectsJobsSnapshotCall) Fields(s ...googleapi.Field) *ProjectsJobsSnapshotCall { 8379 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8380 return c 8381 } 8382 8383 // Context sets the context to be used in this call's Do method. 8384 func (c *ProjectsJobsSnapshotCall) Context(ctx context.Context) *ProjectsJobsSnapshotCall { 8385 c.ctx_ = ctx 8386 return c 8387 } 8388 8389 // Header returns a http.Header that can be modified by the caller to add 8390 // headers to the request. 8391 func (c *ProjectsJobsSnapshotCall) Header() http.Header { 8392 if c.header_ == nil { 8393 c.header_ = make(http.Header) 8394 } 8395 return c.header_ 8396 } 8397 8398 func (c *ProjectsJobsSnapshotCall) doRequest(alt string) (*http.Response, error) { 8399 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8400 var body io.Reader = nil 8401 body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotjobrequest) 8402 if err != nil { 8403 return nil, err 8404 } 8405 c.urlParams_.Set("alt", alt) 8406 c.urlParams_.Set("prettyPrint", "false") 8407 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}:snapshot") 8408 urls += "?" + c.urlParams_.Encode() 8409 req, err := http.NewRequest("POST", urls, body) 8410 if err != nil { 8411 return nil, err 8412 } 8413 req.Header = reqHeaders 8414 googleapi.Expand(req.URL, map[string]string{ 8415 "projectId": c.projectId, 8416 "jobId": c.jobId, 8417 }) 8418 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8419 } 8420 8421 // Do executes the "dataflow.projects.jobs.snapshot" call. 8422 // Any non-2xx status code is an error. Response headers are in either 8423 // *Snapshot.ServerResponse.Header or (if a response was returned at all) in 8424 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8425 // whether the returned error was because http.StatusNotModified was returned. 8426 func (c *ProjectsJobsSnapshotCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 8427 gensupport.SetOptions(c.urlParams_, opts...) 8428 res, err := c.doRequest("json") 8429 if res != nil && res.StatusCode == http.StatusNotModified { 8430 if res.Body != nil { 8431 res.Body.Close() 8432 } 8433 return nil, gensupport.WrapError(&googleapi.Error{ 8434 Code: res.StatusCode, 8435 Header: res.Header, 8436 }) 8437 } 8438 if err != nil { 8439 return nil, err 8440 } 8441 defer googleapi.CloseBody(res) 8442 if err := googleapi.CheckResponse(res); err != nil { 8443 return nil, gensupport.WrapError(err) 8444 } 8445 ret := &Snapshot{ 8446 ServerResponse: googleapi.ServerResponse{ 8447 Header: res.Header, 8448 HTTPStatusCode: res.StatusCode, 8449 }, 8450 } 8451 target := &ret 8452 if err := gensupport.DecodeResponse(target, res); err != nil { 8453 return nil, err 8454 } 8455 return ret, nil 8456 } 8457 8458 type ProjectsJobsUpdateCall struct { 8459 s *Service 8460 projectId string 8461 jobId string 8462 job *Job 8463 urlParams_ gensupport.URLParams 8464 ctx_ context.Context 8465 header_ http.Header 8466 } 8467 8468 // Update: Updates the state of an existing Cloud Dataflow job. To update the 8469 // state of an existing job, we recommend using 8470 // `projects.locations.jobs.update` with a [regional endpoint] 8471 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 8472 // `projects.jobs.update` is not recommended, as you can only update the state 8473 // of jobs that are running in `us-central1`. 8474 // 8475 // - jobId: The job ID. 8476 // - projectId: The ID of the Cloud Platform project that the job belongs to. 8477 func (r *ProjectsJobsService) Update(projectId string, jobId string, job *Job) *ProjectsJobsUpdateCall { 8478 c := &ProjectsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8479 c.projectId = projectId 8480 c.jobId = jobId 8481 c.job = job 8482 return c 8483 } 8484 8485 // Location sets the optional parameter "location": The [regional endpoint] 8486 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 8487 // contains this job. 8488 func (c *ProjectsJobsUpdateCall) Location(location string) *ProjectsJobsUpdateCall { 8489 c.urlParams_.Set("location", location) 8490 return c 8491 } 8492 8493 // UpdateMask sets the optional parameter "updateMask": The list of fields to 8494 // update relative to Job. If empty, only RequestedJobState will be considered 8495 // for update. If the FieldMask is not empty and RequestedJobState is 8496 // none/empty, The fields specified in the update mask will be the only ones 8497 // considered for update. If both RequestedJobState and update_mask are 8498 // specified, an error will be returned as we cannot update both state and 8499 // mask. 8500 func (c *ProjectsJobsUpdateCall) UpdateMask(updateMask string) *ProjectsJobsUpdateCall { 8501 c.urlParams_.Set("updateMask", updateMask) 8502 return c 8503 } 8504 8505 // Fields allows partial responses to be retrieved. See 8506 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8507 // details. 8508 func (c *ProjectsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsJobsUpdateCall { 8509 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8510 return c 8511 } 8512 8513 // Context sets the context to be used in this call's Do method. 8514 func (c *ProjectsJobsUpdateCall) Context(ctx context.Context) *ProjectsJobsUpdateCall { 8515 c.ctx_ = ctx 8516 return c 8517 } 8518 8519 // Header returns a http.Header that can be modified by the caller to add 8520 // headers to the request. 8521 func (c *ProjectsJobsUpdateCall) Header() http.Header { 8522 if c.header_ == nil { 8523 c.header_ = make(http.Header) 8524 } 8525 return c.header_ 8526 } 8527 8528 func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { 8529 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8530 var body io.Reader = nil 8531 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 8532 if err != nil { 8533 return nil, err 8534 } 8535 c.urlParams_.Set("alt", alt) 8536 c.urlParams_.Set("prettyPrint", "false") 8537 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}") 8538 urls += "?" + c.urlParams_.Encode() 8539 req, err := http.NewRequest("PUT", urls, body) 8540 if err != nil { 8541 return nil, err 8542 } 8543 req.Header = reqHeaders 8544 googleapi.Expand(req.URL, map[string]string{ 8545 "projectId": c.projectId, 8546 "jobId": c.jobId, 8547 }) 8548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8549 } 8550 8551 // Do executes the "dataflow.projects.jobs.update" call. 8552 // Any non-2xx status code is an error. Response headers are in either 8553 // *Job.ServerResponse.Header or (if a response was returned at all) in 8554 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 8555 // whether the returned error was because http.StatusNotModified was returned. 8556 func (c *ProjectsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 8557 gensupport.SetOptions(c.urlParams_, opts...) 8558 res, err := c.doRequest("json") 8559 if res != nil && res.StatusCode == http.StatusNotModified { 8560 if res.Body != nil { 8561 res.Body.Close() 8562 } 8563 return nil, gensupport.WrapError(&googleapi.Error{ 8564 Code: res.StatusCode, 8565 Header: res.Header, 8566 }) 8567 } 8568 if err != nil { 8569 return nil, err 8570 } 8571 defer googleapi.CloseBody(res) 8572 if err := googleapi.CheckResponse(res); err != nil { 8573 return nil, gensupport.WrapError(err) 8574 } 8575 ret := &Job{ 8576 ServerResponse: googleapi.ServerResponse{ 8577 Header: res.Header, 8578 HTTPStatusCode: res.StatusCode, 8579 }, 8580 } 8581 target := &ret 8582 if err := gensupport.DecodeResponse(target, res); err != nil { 8583 return nil, err 8584 } 8585 return ret, nil 8586 } 8587 8588 type ProjectsJobsDebugGetConfigCall struct { 8589 s *Service 8590 projectId string 8591 jobId string 8592 getdebugconfigrequest *GetDebugConfigRequest 8593 urlParams_ gensupport.URLParams 8594 ctx_ context.Context 8595 header_ http.Header 8596 } 8597 8598 // GetConfig: Get encoded debug configuration for component. Not cacheable. 8599 // 8600 // - jobId: The job id. 8601 // - projectId: The project id. 8602 func (r *ProjectsJobsDebugService) GetConfig(projectId string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsJobsDebugGetConfigCall { 8603 c := &ProjectsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8604 c.projectId = projectId 8605 c.jobId = jobId 8606 c.getdebugconfigrequest = getdebugconfigrequest 8607 return c 8608 } 8609 8610 // Fields allows partial responses to be retrieved. See 8611 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8612 // details. 8613 func (c *ProjectsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugGetConfigCall { 8614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8615 return c 8616 } 8617 8618 // Context sets the context to be used in this call's Do method. 8619 func (c *ProjectsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsJobsDebugGetConfigCall { 8620 c.ctx_ = ctx 8621 return c 8622 } 8623 8624 // Header returns a http.Header that can be modified by the caller to add 8625 // headers to the request. 8626 func (c *ProjectsJobsDebugGetConfigCall) Header() http.Header { 8627 if c.header_ == nil { 8628 c.header_ = make(http.Header) 8629 } 8630 return c.header_ 8631 } 8632 8633 func (c *ProjectsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) { 8634 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8635 var body io.Reader = nil 8636 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest) 8637 if err != nil { 8638 return nil, err 8639 } 8640 c.urlParams_.Set("alt", alt) 8641 c.urlParams_.Set("prettyPrint", "false") 8642 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig") 8643 urls += "?" + c.urlParams_.Encode() 8644 req, err := http.NewRequest("POST", urls, body) 8645 if err != nil { 8646 return nil, err 8647 } 8648 req.Header = reqHeaders 8649 googleapi.Expand(req.URL, map[string]string{ 8650 "projectId": c.projectId, 8651 "jobId": c.jobId, 8652 }) 8653 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8654 } 8655 8656 // Do executes the "dataflow.projects.jobs.debug.getConfig" call. 8657 // Any non-2xx status code is an error. Response headers are in either 8658 // *GetDebugConfigResponse.ServerResponse.Header or (if a response was returned 8659 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8660 // check whether the returned error was because http.StatusNotModified was 8661 // returned. 8662 func (c *ProjectsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) { 8663 gensupport.SetOptions(c.urlParams_, opts...) 8664 res, err := c.doRequest("json") 8665 if res != nil && res.StatusCode == http.StatusNotModified { 8666 if res.Body != nil { 8667 res.Body.Close() 8668 } 8669 return nil, gensupport.WrapError(&googleapi.Error{ 8670 Code: res.StatusCode, 8671 Header: res.Header, 8672 }) 8673 } 8674 if err != nil { 8675 return nil, err 8676 } 8677 defer googleapi.CloseBody(res) 8678 if err := googleapi.CheckResponse(res); err != nil { 8679 return nil, gensupport.WrapError(err) 8680 } 8681 ret := &GetDebugConfigResponse{ 8682 ServerResponse: googleapi.ServerResponse{ 8683 Header: res.Header, 8684 HTTPStatusCode: res.StatusCode, 8685 }, 8686 } 8687 target := &ret 8688 if err := gensupport.DecodeResponse(target, res); err != nil { 8689 return nil, err 8690 } 8691 return ret, nil 8692 } 8693 8694 type ProjectsJobsDebugSendCaptureCall struct { 8695 s *Service 8696 projectId string 8697 jobId string 8698 senddebugcapturerequest *SendDebugCaptureRequest 8699 urlParams_ gensupport.URLParams 8700 ctx_ context.Context 8701 header_ http.Header 8702 } 8703 8704 // SendCapture: Send encoded debug capture data for component. 8705 // 8706 // - jobId: The job id. 8707 // - projectId: The project id. 8708 func (r *ProjectsJobsDebugService) SendCapture(projectId string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsJobsDebugSendCaptureCall { 8709 c := &ProjectsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8710 c.projectId = projectId 8711 c.jobId = jobId 8712 c.senddebugcapturerequest = senddebugcapturerequest 8713 return c 8714 } 8715 8716 // Fields allows partial responses to be retrieved. See 8717 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8718 // details. 8719 func (c *ProjectsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsJobsDebugSendCaptureCall { 8720 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8721 return c 8722 } 8723 8724 // Context sets the context to be used in this call's Do method. 8725 func (c *ProjectsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsJobsDebugSendCaptureCall { 8726 c.ctx_ = ctx 8727 return c 8728 } 8729 8730 // Header returns a http.Header that can be modified by the caller to add 8731 // headers to the request. 8732 func (c *ProjectsJobsDebugSendCaptureCall) Header() http.Header { 8733 if c.header_ == nil { 8734 c.header_ = make(http.Header) 8735 } 8736 return c.header_ 8737 } 8738 8739 func (c *ProjectsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) { 8740 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8741 var body io.Reader = nil 8742 body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest) 8743 if err != nil { 8744 return nil, err 8745 } 8746 c.urlParams_.Set("alt", alt) 8747 c.urlParams_.Set("prettyPrint", "false") 8748 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture") 8749 urls += "?" + c.urlParams_.Encode() 8750 req, err := http.NewRequest("POST", urls, body) 8751 if err != nil { 8752 return nil, err 8753 } 8754 req.Header = reqHeaders 8755 googleapi.Expand(req.URL, map[string]string{ 8756 "projectId": c.projectId, 8757 "jobId": c.jobId, 8758 }) 8759 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8760 } 8761 8762 // Do executes the "dataflow.projects.jobs.debug.sendCapture" call. 8763 // Any non-2xx status code is an error. Response headers are in either 8764 // *SendDebugCaptureResponse.ServerResponse.Header or (if a response was 8765 // returned at all) in error.(*googleapi.Error).Header. Use 8766 // googleapi.IsNotModified to check whether the returned error was because 8767 // http.StatusNotModified was returned. 8768 func (c *ProjectsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, 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, gensupport.WrapError(&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, gensupport.WrapError(err) 8786 } 8787 ret := &SendDebugCaptureResponse{ 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 8800 type ProjectsJobsMessagesListCall struct { 8801 s *Service 8802 projectId string 8803 jobId string 8804 urlParams_ gensupport.URLParams 8805 ifNoneMatch_ string 8806 ctx_ context.Context 8807 header_ http.Header 8808 } 8809 8810 // List: Request the job status. To request the status of a job, we recommend 8811 // using `projects.locations.jobs.messages.list` with a [regional endpoint] 8812 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 8813 // `projects.jobs.messages.list` is not recommended, as you can only request 8814 // the status of jobs that are running in `us-central1`. 8815 // 8816 // - jobId: The job to get messages about. 8817 // - projectId: A project id. 8818 func (r *ProjectsJobsMessagesService) List(projectId string, jobId string) *ProjectsJobsMessagesListCall { 8819 c := &ProjectsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8820 c.projectId = projectId 8821 c.jobId = jobId 8822 return c 8823 } 8824 8825 // EndTime sets the optional parameter "endTime": Return only messages with 8826 // timestamps < end_time. The default is now (i.e. return up to the latest 8827 // messages available). 8828 func (c *ProjectsJobsMessagesListCall) EndTime(endTime string) *ProjectsJobsMessagesListCall { 8829 c.urlParams_.Set("endTime", endTime) 8830 return c 8831 } 8832 8833 // Location sets the optional parameter "location": The [regional endpoint] 8834 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 8835 // contains the job specified by job_id. 8836 func (c *ProjectsJobsMessagesListCall) Location(location string) *ProjectsJobsMessagesListCall { 8837 c.urlParams_.Set("location", location) 8838 return c 8839 } 8840 8841 // MinimumImportance sets the optional parameter "minimumImportance": Filter to 8842 // only get messages with importance >= level 8843 // 8844 // Possible values: 8845 // 8846 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't specified, 8847 // 8848 // or is unknown. 8849 // 8850 // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: typically only 8851 // 8852 // useful for software engineers working on the code the job is running. 8853 // Typically, Dataflow pipeline runners do not display log messages at this 8854 // level by default. 8855 // 8856 // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: somewhat 8857 // 8858 // verbose, but potentially useful to users. Typically, Dataflow pipeline 8859 // runners do not display log messages at this level by default. These messages 8860 // are displayed by default in the Dataflow monitoring UI. 8861 // 8862 // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful for 8863 // 8864 // keeping track of the execution of a Dataflow pipeline. Typically, Dataflow 8865 // pipeline runners display log messages at this level by default, and these 8866 // messages are displayed by default in the Dataflow monitoring UI. 8867 // 8868 // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: indicating 8869 // 8870 // a condition pertaining to a job which may require human intervention. 8871 // Typically, Dataflow pipeline runners display log messages at this level by 8872 // default, and these messages are displayed by default in the Dataflow 8873 // monitoring UI. 8874 // 8875 // "JOB_MESSAGE_ERROR" - The message is at the 'error' level: indicating a 8876 // 8877 // condition preventing a job from succeeding. Typically, Dataflow pipeline 8878 // runners display log messages at this level by default, and these messages 8879 // are displayed by default in the Dataflow monitoring UI. 8880 func (c *ProjectsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsJobsMessagesListCall { 8881 c.urlParams_.Set("minimumImportance", minimumImportance) 8882 return c 8883 } 8884 8885 // PageSize sets the optional parameter "pageSize": If specified, determines 8886 // the maximum number of messages to return. If unspecified, the service may 8887 // choose an appropriate default, or may return an arbitrarily large number of 8888 // results. 8889 func (c *ProjectsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsJobsMessagesListCall { 8890 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8891 return c 8892 } 8893 8894 // PageToken sets the optional parameter "pageToken": If supplied, this should 8895 // be the value of next_page_token returned by an earlier call. This will cause 8896 // the next page of results to be returned. 8897 func (c *ProjectsJobsMessagesListCall) PageToken(pageToken string) *ProjectsJobsMessagesListCall { 8898 c.urlParams_.Set("pageToken", pageToken) 8899 return c 8900 } 8901 8902 // StartTime sets the optional parameter "startTime": If specified, return only 8903 // messages with timestamps >= start_time. The default is the job creation time 8904 // (i.e. beginning of messages). 8905 func (c *ProjectsJobsMessagesListCall) StartTime(startTime string) *ProjectsJobsMessagesListCall { 8906 c.urlParams_.Set("startTime", startTime) 8907 return c 8908 } 8909 8910 // Fields allows partial responses to be retrieved. See 8911 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8912 // details. 8913 func (c *ProjectsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsJobsMessagesListCall { 8914 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8915 return c 8916 } 8917 8918 // IfNoneMatch sets an optional parameter which makes the operation fail if the 8919 // object's ETag matches the given value. This is useful for getting updates 8920 // only after the object has changed since the last request. 8921 func (c *ProjectsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsJobsMessagesListCall { 8922 c.ifNoneMatch_ = entityTag 8923 return c 8924 } 8925 8926 // Context sets the context to be used in this call's Do method. 8927 func (c *ProjectsJobsMessagesListCall) Context(ctx context.Context) *ProjectsJobsMessagesListCall { 8928 c.ctx_ = ctx 8929 return c 8930 } 8931 8932 // Header returns a http.Header that can be modified by the caller to add 8933 // headers to the request. 8934 func (c *ProjectsJobsMessagesListCall) Header() http.Header { 8935 if c.header_ == nil { 8936 c.header_ = make(http.Header) 8937 } 8938 return c.header_ 8939 } 8940 8941 func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) { 8942 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 8943 if c.ifNoneMatch_ != "" { 8944 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8945 } 8946 var body io.Reader = nil 8947 c.urlParams_.Set("alt", alt) 8948 c.urlParams_.Set("prettyPrint", "false") 8949 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/messages") 8950 urls += "?" + c.urlParams_.Encode() 8951 req, err := http.NewRequest("GET", urls, body) 8952 if err != nil { 8953 return nil, err 8954 } 8955 req.Header = reqHeaders 8956 googleapi.Expand(req.URL, map[string]string{ 8957 "projectId": c.projectId, 8958 "jobId": c.jobId, 8959 }) 8960 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8961 } 8962 8963 // Do executes the "dataflow.projects.jobs.messages.list" call. 8964 // Any non-2xx status code is an error. Response headers are in either 8965 // *ListJobMessagesResponse.ServerResponse.Header or (if a response was 8966 // returned at all) in error.(*googleapi.Error).Header. Use 8967 // googleapi.IsNotModified to check whether the returned error was because 8968 // http.StatusNotModified was returned. 8969 func (c *ProjectsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) { 8970 gensupport.SetOptions(c.urlParams_, opts...) 8971 res, err := c.doRequest("json") 8972 if res != nil && res.StatusCode == http.StatusNotModified { 8973 if res.Body != nil { 8974 res.Body.Close() 8975 } 8976 return nil, gensupport.WrapError(&googleapi.Error{ 8977 Code: res.StatusCode, 8978 Header: res.Header, 8979 }) 8980 } 8981 if err != nil { 8982 return nil, err 8983 } 8984 defer googleapi.CloseBody(res) 8985 if err := googleapi.CheckResponse(res); err != nil { 8986 return nil, gensupport.WrapError(err) 8987 } 8988 ret := &ListJobMessagesResponse{ 8989 ServerResponse: googleapi.ServerResponse{ 8990 Header: res.Header, 8991 HTTPStatusCode: res.StatusCode, 8992 }, 8993 } 8994 target := &ret 8995 if err := gensupport.DecodeResponse(target, res); err != nil { 8996 return nil, err 8997 } 8998 return ret, nil 8999 } 9000 9001 // Pages invokes f for each page of results. 9002 // A non-nil error returned from f will halt the iteration. 9003 // The provided context supersedes any context provided to the Context method. 9004 func (c *ProjectsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error { 9005 c.ctx_ = ctx 9006 defer c.PageToken(c.urlParams_.Get("pageToken")) 9007 for { 9008 x, err := c.Do() 9009 if err != nil { 9010 return err 9011 } 9012 if err := f(x); err != nil { 9013 return err 9014 } 9015 if x.NextPageToken == "" { 9016 return nil 9017 } 9018 c.PageToken(x.NextPageToken) 9019 } 9020 } 9021 9022 type ProjectsJobsWorkItemsLeaseCall struct { 9023 s *Service 9024 projectId string 9025 jobId string 9026 leaseworkitemrequest *LeaseWorkItemRequest 9027 urlParams_ gensupport.URLParams 9028 ctx_ context.Context 9029 header_ http.Header 9030 } 9031 9032 // Lease: Leases a dataflow WorkItem to run. 9033 // 9034 // - jobId: Identifies the workflow job this worker belongs to. 9035 // - projectId: Identifies the project this worker belongs to. 9036 func (r *ProjectsJobsWorkItemsService) Lease(projectId string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsJobsWorkItemsLeaseCall { 9037 c := &ProjectsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9038 c.projectId = projectId 9039 c.jobId = jobId 9040 c.leaseworkitemrequest = leaseworkitemrequest 9041 return c 9042 } 9043 9044 // Fields allows partial responses to be retrieved. See 9045 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9046 // details. 9047 func (c *ProjectsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsLeaseCall { 9048 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9049 return c 9050 } 9051 9052 // Context sets the context to be used in this call's Do method. 9053 func (c *ProjectsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsJobsWorkItemsLeaseCall { 9054 c.ctx_ = ctx 9055 return c 9056 } 9057 9058 // Header returns a http.Header that can be modified by the caller to add 9059 // headers to the request. 9060 func (c *ProjectsJobsWorkItemsLeaseCall) Header() http.Header { 9061 if c.header_ == nil { 9062 c.header_ = make(http.Header) 9063 } 9064 return c.header_ 9065 } 9066 9067 func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) { 9068 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9069 var body io.Reader = nil 9070 body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest) 9071 if err != nil { 9072 return nil, err 9073 } 9074 c.urlParams_.Set("alt", alt) 9075 c.urlParams_.Set("prettyPrint", "false") 9076 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease") 9077 urls += "?" + c.urlParams_.Encode() 9078 req, err := http.NewRequest("POST", urls, body) 9079 if err != nil { 9080 return nil, err 9081 } 9082 req.Header = reqHeaders 9083 googleapi.Expand(req.URL, map[string]string{ 9084 "projectId": c.projectId, 9085 "jobId": c.jobId, 9086 }) 9087 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9088 } 9089 9090 // Do executes the "dataflow.projects.jobs.workItems.lease" call. 9091 // Any non-2xx status code is an error. Response headers are in either 9092 // *LeaseWorkItemResponse.ServerResponse.Header or (if a response was returned 9093 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9094 // check whether the returned error was because http.StatusNotModified was 9095 // returned. 9096 func (c *ProjectsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) { 9097 gensupport.SetOptions(c.urlParams_, opts...) 9098 res, err := c.doRequest("json") 9099 if res != nil && res.StatusCode == http.StatusNotModified { 9100 if res.Body != nil { 9101 res.Body.Close() 9102 } 9103 return nil, gensupport.WrapError(&googleapi.Error{ 9104 Code: res.StatusCode, 9105 Header: res.Header, 9106 }) 9107 } 9108 if err != nil { 9109 return nil, err 9110 } 9111 defer googleapi.CloseBody(res) 9112 if err := googleapi.CheckResponse(res); err != nil { 9113 return nil, gensupport.WrapError(err) 9114 } 9115 ret := &LeaseWorkItemResponse{ 9116 ServerResponse: googleapi.ServerResponse{ 9117 Header: res.Header, 9118 HTTPStatusCode: res.StatusCode, 9119 }, 9120 } 9121 target := &ret 9122 if err := gensupport.DecodeResponse(target, res); err != nil { 9123 return nil, err 9124 } 9125 return ret, nil 9126 } 9127 9128 type ProjectsJobsWorkItemsReportStatusCall struct { 9129 s *Service 9130 projectId string 9131 jobId string 9132 reportworkitemstatusrequest *ReportWorkItemStatusRequest 9133 urlParams_ gensupport.URLParams 9134 ctx_ context.Context 9135 header_ http.Header 9136 } 9137 9138 // ReportStatus: Reports the status of dataflow WorkItems leased by a worker. 9139 // 9140 // - jobId: The job which the WorkItem is part of. 9141 // - projectId: The project which owns the WorkItem's job. 9142 func (r *ProjectsJobsWorkItemsService) ReportStatus(projectId string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsJobsWorkItemsReportStatusCall { 9143 c := &ProjectsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9144 c.projectId = projectId 9145 c.jobId = jobId 9146 c.reportworkitemstatusrequest = reportworkitemstatusrequest 9147 return c 9148 } 9149 9150 // Fields allows partial responses to be retrieved. See 9151 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9152 // details. 9153 func (c *ProjectsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsJobsWorkItemsReportStatusCall { 9154 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9155 return c 9156 } 9157 9158 // Context sets the context to be used in this call's Do method. 9159 func (c *ProjectsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsJobsWorkItemsReportStatusCall { 9160 c.ctx_ = ctx 9161 return c 9162 } 9163 9164 // Header returns a http.Header that can be modified by the caller to add 9165 // headers to the request. 9166 func (c *ProjectsJobsWorkItemsReportStatusCall) Header() http.Header { 9167 if c.header_ == nil { 9168 c.header_ = make(http.Header) 9169 } 9170 return c.header_ 9171 } 9172 9173 func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) { 9174 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9175 var body io.Reader = nil 9176 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest) 9177 if err != nil { 9178 return nil, err 9179 } 9180 c.urlParams_.Set("alt", alt) 9181 c.urlParams_.Set("prettyPrint", "false") 9182 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus") 9183 urls += "?" + c.urlParams_.Encode() 9184 req, err := http.NewRequest("POST", urls, body) 9185 if err != nil { 9186 return nil, err 9187 } 9188 req.Header = reqHeaders 9189 googleapi.Expand(req.URL, map[string]string{ 9190 "projectId": c.projectId, 9191 "jobId": c.jobId, 9192 }) 9193 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9194 } 9195 9196 // Do executes the "dataflow.projects.jobs.workItems.reportStatus" call. 9197 // Any non-2xx status code is an error. Response headers are in either 9198 // *ReportWorkItemStatusResponse.ServerResponse.Header or (if a response was 9199 // returned at all) in error.(*googleapi.Error).Header. Use 9200 // googleapi.IsNotModified to check whether the returned error was because 9201 // http.StatusNotModified was returned. 9202 func (c *ProjectsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) { 9203 gensupport.SetOptions(c.urlParams_, opts...) 9204 res, err := c.doRequest("json") 9205 if res != nil && res.StatusCode == http.StatusNotModified { 9206 if res.Body != nil { 9207 res.Body.Close() 9208 } 9209 return nil, gensupport.WrapError(&googleapi.Error{ 9210 Code: res.StatusCode, 9211 Header: res.Header, 9212 }) 9213 } 9214 if err != nil { 9215 return nil, err 9216 } 9217 defer googleapi.CloseBody(res) 9218 if err := googleapi.CheckResponse(res); err != nil { 9219 return nil, gensupport.WrapError(err) 9220 } 9221 ret := &ReportWorkItemStatusResponse{ 9222 ServerResponse: googleapi.ServerResponse{ 9223 Header: res.Header, 9224 HTTPStatusCode: res.StatusCode, 9225 }, 9226 } 9227 target := &ret 9228 if err := gensupport.DecodeResponse(target, res); err != nil { 9229 return nil, err 9230 } 9231 return ret, nil 9232 } 9233 9234 type ProjectsLocationsWorkerMessagesCall struct { 9235 s *Service 9236 projectId string 9237 location string 9238 sendworkermessagesrequest *SendWorkerMessagesRequest 9239 urlParams_ gensupport.URLParams 9240 ctx_ context.Context 9241 header_ http.Header 9242 } 9243 9244 // WorkerMessages: Send a worker_message to the service. 9245 // 9246 // - location: The [regional endpoint] 9247 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 9248 // contains the job. 9249 // - projectId: The project to send the WorkerMessages to. 9250 func (r *ProjectsLocationsService) WorkerMessages(projectId string, location string, sendworkermessagesrequest *SendWorkerMessagesRequest) *ProjectsLocationsWorkerMessagesCall { 9251 c := &ProjectsLocationsWorkerMessagesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9252 c.projectId = projectId 9253 c.location = location 9254 c.sendworkermessagesrequest = sendworkermessagesrequest 9255 return c 9256 } 9257 9258 // Fields allows partial responses to be retrieved. See 9259 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9260 // details. 9261 func (c *ProjectsLocationsWorkerMessagesCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkerMessagesCall { 9262 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9263 return c 9264 } 9265 9266 // Context sets the context to be used in this call's Do method. 9267 func (c *ProjectsLocationsWorkerMessagesCall) Context(ctx context.Context) *ProjectsLocationsWorkerMessagesCall { 9268 c.ctx_ = ctx 9269 return c 9270 } 9271 9272 // Header returns a http.Header that can be modified by the caller to add 9273 // headers to the request. 9274 func (c *ProjectsLocationsWorkerMessagesCall) Header() http.Header { 9275 if c.header_ == nil { 9276 c.header_ = make(http.Header) 9277 } 9278 return c.header_ 9279 } 9280 9281 func (c *ProjectsLocationsWorkerMessagesCall) doRequest(alt string) (*http.Response, error) { 9282 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9283 var body io.Reader = nil 9284 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendworkermessagesrequest) 9285 if err != nil { 9286 return nil, err 9287 } 9288 c.urlParams_.Set("alt", alt) 9289 c.urlParams_.Set("prettyPrint", "false") 9290 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/WorkerMessages") 9291 urls += "?" + c.urlParams_.Encode() 9292 req, err := http.NewRequest("POST", urls, body) 9293 if err != nil { 9294 return nil, err 9295 } 9296 req.Header = reqHeaders 9297 googleapi.Expand(req.URL, map[string]string{ 9298 "projectId": c.projectId, 9299 "location": c.location, 9300 }) 9301 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9302 } 9303 9304 // Do executes the "dataflow.projects.locations.workerMessages" call. 9305 // Any non-2xx status code is an error. Response headers are in either 9306 // *SendWorkerMessagesResponse.ServerResponse.Header or (if a response was 9307 // returned at all) in error.(*googleapi.Error).Header. Use 9308 // googleapi.IsNotModified to check whether the returned error was because 9309 // http.StatusNotModified was returned. 9310 func (c *ProjectsLocationsWorkerMessagesCall) Do(opts ...googleapi.CallOption) (*SendWorkerMessagesResponse, error) { 9311 gensupport.SetOptions(c.urlParams_, opts...) 9312 res, err := c.doRequest("json") 9313 if res != nil && res.StatusCode == http.StatusNotModified { 9314 if res.Body != nil { 9315 res.Body.Close() 9316 } 9317 return nil, gensupport.WrapError(&googleapi.Error{ 9318 Code: res.StatusCode, 9319 Header: res.Header, 9320 }) 9321 } 9322 if err != nil { 9323 return nil, err 9324 } 9325 defer googleapi.CloseBody(res) 9326 if err := googleapi.CheckResponse(res); err != nil { 9327 return nil, gensupport.WrapError(err) 9328 } 9329 ret := &SendWorkerMessagesResponse{ 9330 ServerResponse: googleapi.ServerResponse{ 9331 Header: res.Header, 9332 HTTPStatusCode: res.StatusCode, 9333 }, 9334 } 9335 target := &ret 9336 if err := gensupport.DecodeResponse(target, res); err != nil { 9337 return nil, err 9338 } 9339 return ret, nil 9340 } 9341 9342 type ProjectsLocationsFlexTemplatesLaunchCall struct { 9343 s *Service 9344 projectId string 9345 location string 9346 launchflextemplaterequest *LaunchFlexTemplateRequest 9347 urlParams_ gensupport.URLParams 9348 ctx_ context.Context 9349 header_ http.Header 9350 } 9351 9352 // Launch: Launch a job with a FlexTemplate. 9353 // 9354 // - location: The [regional endpoint] 9355 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 9356 // which to direct the request. E.g., us-central1, us-west1. 9357 // - projectId: The ID of the Cloud Platform project that the job belongs to. 9358 func (r *ProjectsLocationsFlexTemplatesService) Launch(projectId string, location string, launchflextemplaterequest *LaunchFlexTemplateRequest) *ProjectsLocationsFlexTemplatesLaunchCall { 9359 c := &ProjectsLocationsFlexTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9360 c.projectId = projectId 9361 c.location = location 9362 c.launchflextemplaterequest = launchflextemplaterequest 9363 return c 9364 } 9365 9366 // Fields allows partial responses to be retrieved. See 9367 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9368 // details. 9369 func (c *ProjectsLocationsFlexTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFlexTemplatesLaunchCall { 9370 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9371 return c 9372 } 9373 9374 // Context sets the context to be used in this call's Do method. 9375 func (c *ProjectsLocationsFlexTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsFlexTemplatesLaunchCall { 9376 c.ctx_ = ctx 9377 return c 9378 } 9379 9380 // Header returns a http.Header that can be modified by the caller to add 9381 // headers to the request. 9382 func (c *ProjectsLocationsFlexTemplatesLaunchCall) Header() http.Header { 9383 if c.header_ == nil { 9384 c.header_ = make(http.Header) 9385 } 9386 return c.header_ 9387 } 9388 9389 func (c *ProjectsLocationsFlexTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 9390 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9391 var body io.Reader = nil 9392 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchflextemplaterequest) 9393 if err != nil { 9394 return nil, err 9395 } 9396 c.urlParams_.Set("alt", alt) 9397 c.urlParams_.Set("prettyPrint", "false") 9398 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/flexTemplates:launch") 9399 urls += "?" + c.urlParams_.Encode() 9400 req, err := http.NewRequest("POST", urls, body) 9401 if err != nil { 9402 return nil, err 9403 } 9404 req.Header = reqHeaders 9405 googleapi.Expand(req.URL, map[string]string{ 9406 "projectId": c.projectId, 9407 "location": c.location, 9408 }) 9409 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9410 } 9411 9412 // Do executes the "dataflow.projects.locations.flexTemplates.launch" call. 9413 // Any non-2xx status code is an error. Response headers are in either 9414 // *LaunchFlexTemplateResponse.ServerResponse.Header or (if a response was 9415 // returned at all) in error.(*googleapi.Error).Header. Use 9416 // googleapi.IsNotModified to check whether the returned error was because 9417 // http.StatusNotModified was returned. 9418 func (c *ProjectsLocationsFlexTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchFlexTemplateResponse, error) { 9419 gensupport.SetOptions(c.urlParams_, opts...) 9420 res, err := c.doRequest("json") 9421 if res != nil && res.StatusCode == http.StatusNotModified { 9422 if res.Body != nil { 9423 res.Body.Close() 9424 } 9425 return nil, gensupport.WrapError(&googleapi.Error{ 9426 Code: res.StatusCode, 9427 Header: res.Header, 9428 }) 9429 } 9430 if err != nil { 9431 return nil, err 9432 } 9433 defer googleapi.CloseBody(res) 9434 if err := googleapi.CheckResponse(res); err != nil { 9435 return nil, gensupport.WrapError(err) 9436 } 9437 ret := &LaunchFlexTemplateResponse{ 9438 ServerResponse: googleapi.ServerResponse{ 9439 Header: res.Header, 9440 HTTPStatusCode: res.StatusCode, 9441 }, 9442 } 9443 target := &ret 9444 if err := gensupport.DecodeResponse(target, res); err != nil { 9445 return nil, err 9446 } 9447 return ret, nil 9448 } 9449 9450 type ProjectsLocationsJobsCreateCall struct { 9451 s *Service 9452 projectId string 9453 location string 9454 job *Job 9455 urlParams_ gensupport.URLParams 9456 ctx_ context.Context 9457 header_ http.Header 9458 } 9459 9460 // Create: Creates a Cloud Dataflow job. To create a job, we recommend using 9461 // `projects.locations.jobs.create` with a [regional endpoint] 9462 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 9463 // `projects.jobs.create` is not recommended, as your job will always start in 9464 // `us-central1`. Do not enter confidential information when you supply string 9465 // values using the API. 9466 // 9467 // - location: The [regional endpoint] 9468 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 9469 // contains this job. 9470 // - projectId: The ID of the Cloud Platform project that the job belongs to. 9471 func (r *ProjectsLocationsJobsService) Create(projectId string, location string, job *Job) *ProjectsLocationsJobsCreateCall { 9472 c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9473 c.projectId = projectId 9474 c.location = location 9475 c.job = job 9476 return c 9477 } 9478 9479 // ReplaceJobId sets the optional parameter "replaceJobId": Deprecated. This 9480 // field is now in the Job message. 9481 func (c *ProjectsLocationsJobsCreateCall) ReplaceJobId(replaceJobId string) *ProjectsLocationsJobsCreateCall { 9482 c.urlParams_.Set("replaceJobId", replaceJobId) 9483 return c 9484 } 9485 9486 // View sets the optional parameter "view": The level of information requested 9487 // in response. 9488 // 9489 // Possible values: 9490 // 9491 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 9492 // 9493 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 9494 // and may contain additional information. 9495 // 9496 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 9497 // 9498 // job name, job type, job status, start/end time, and Cloud SDK version 9499 // details. 9500 // 9501 // "JOB_VIEW_ALL" - Request all information available for this job. When the 9502 // 9503 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 9504 // running, and not all job information is available. For complete job 9505 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 9506 // information, see 9507 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 9508 // s.jobs#jobstate). 9509 // 9510 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 9511 // 9512 // data for steps, labels and environment. 9513 func (c *ProjectsLocationsJobsCreateCall) View(view string) *ProjectsLocationsJobsCreateCall { 9514 c.urlParams_.Set("view", view) 9515 return c 9516 } 9517 9518 // Fields allows partial responses to be retrieved. See 9519 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9520 // details. 9521 func (c *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall { 9522 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9523 return c 9524 } 9525 9526 // Context sets the context to be used in this call's Do method. 9527 func (c *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall { 9528 c.ctx_ = ctx 9529 return c 9530 } 9531 9532 // Header returns a http.Header that can be modified by the caller to add 9533 // headers to the request. 9534 func (c *ProjectsLocationsJobsCreateCall) Header() http.Header { 9535 if c.header_ == nil { 9536 c.header_ = make(http.Header) 9537 } 9538 return c.header_ 9539 } 9540 9541 func (c *ProjectsLocationsJobsCreateCall) doRequest(alt string) (*http.Response, error) { 9542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9543 var body io.Reader = nil 9544 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 9545 if err != nil { 9546 return nil, err 9547 } 9548 c.urlParams_.Set("alt", alt) 9549 c.urlParams_.Set("prettyPrint", "false") 9550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") 9551 urls += "?" + c.urlParams_.Encode() 9552 req, err := http.NewRequest("POST", urls, body) 9553 if err != nil { 9554 return nil, err 9555 } 9556 req.Header = reqHeaders 9557 googleapi.Expand(req.URL, map[string]string{ 9558 "projectId": c.projectId, 9559 "location": c.location, 9560 }) 9561 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9562 } 9563 9564 // Do executes the "dataflow.projects.locations.jobs.create" call. 9565 // Any non-2xx status code is an error. Response headers are in either 9566 // *Job.ServerResponse.Header or (if a response was returned at all) in 9567 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9568 // whether the returned error was because http.StatusNotModified was returned. 9569 func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 9570 gensupport.SetOptions(c.urlParams_, opts...) 9571 res, err := c.doRequest("json") 9572 if res != nil && res.StatusCode == http.StatusNotModified { 9573 if res.Body != nil { 9574 res.Body.Close() 9575 } 9576 return nil, gensupport.WrapError(&googleapi.Error{ 9577 Code: res.StatusCode, 9578 Header: res.Header, 9579 }) 9580 } 9581 if err != nil { 9582 return nil, err 9583 } 9584 defer googleapi.CloseBody(res) 9585 if err := googleapi.CheckResponse(res); err != nil { 9586 return nil, gensupport.WrapError(err) 9587 } 9588 ret := &Job{ 9589 ServerResponse: googleapi.ServerResponse{ 9590 Header: res.Header, 9591 HTTPStatusCode: res.StatusCode, 9592 }, 9593 } 9594 target := &ret 9595 if err := gensupport.DecodeResponse(target, res); err != nil { 9596 return nil, err 9597 } 9598 return ret, nil 9599 } 9600 9601 type ProjectsLocationsJobsGetCall struct { 9602 s *Service 9603 projectId string 9604 location string 9605 jobId string 9606 urlParams_ gensupport.URLParams 9607 ifNoneMatch_ string 9608 ctx_ context.Context 9609 header_ http.Header 9610 } 9611 9612 // Get: Gets the state of the specified Cloud Dataflow job. To get the state of 9613 // a job, we recommend using `projects.locations.jobs.get` with a [regional 9614 // endpoint] 9615 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 9616 // `projects.jobs.get` is not recommended, as you can only get the state of 9617 // jobs that are running in `us-central1`. 9618 // 9619 // - jobId: The job ID. 9620 // - location: The [regional endpoint] 9621 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 9622 // contains this job. 9623 // - projectId: The ID of the Cloud Platform project that the job belongs to. 9624 func (r *ProjectsLocationsJobsService) Get(projectId string, location string, jobId string) *ProjectsLocationsJobsGetCall { 9625 c := &ProjectsLocationsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9626 c.projectId = projectId 9627 c.location = location 9628 c.jobId = jobId 9629 return c 9630 } 9631 9632 // View sets the optional parameter "view": The level of information requested 9633 // in response. 9634 // 9635 // Possible values: 9636 // 9637 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 9638 // 9639 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 9640 // and may contain additional information. 9641 // 9642 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 9643 // 9644 // job name, job type, job status, start/end time, and Cloud SDK version 9645 // details. 9646 // 9647 // "JOB_VIEW_ALL" - Request all information available for this job. When the 9648 // 9649 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 9650 // running, and not all job information is available. For complete job 9651 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 9652 // information, see 9653 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 9654 // s.jobs#jobstate). 9655 // 9656 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 9657 // 9658 // data for steps, labels and environment. 9659 func (c *ProjectsLocationsJobsGetCall) View(view string) *ProjectsLocationsJobsGetCall { 9660 c.urlParams_.Set("view", view) 9661 return c 9662 } 9663 9664 // Fields allows partial responses to be retrieved. See 9665 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9666 // details. 9667 func (c *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall { 9668 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9669 return c 9670 } 9671 9672 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9673 // object's ETag matches the given value. This is useful for getting updates 9674 // only after the object has changed since the last request. 9675 func (c *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall { 9676 c.ifNoneMatch_ = entityTag 9677 return c 9678 } 9679 9680 // Context sets the context to be used in this call's Do method. 9681 func (c *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall { 9682 c.ctx_ = ctx 9683 return c 9684 } 9685 9686 // Header returns a http.Header that can be modified by the caller to add 9687 // headers to the request. 9688 func (c *ProjectsLocationsJobsGetCall) Header() http.Header { 9689 if c.header_ == nil { 9690 c.header_ = make(http.Header) 9691 } 9692 return c.header_ 9693 } 9694 9695 func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) { 9696 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9697 if c.ifNoneMatch_ != "" { 9698 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9699 } 9700 var body io.Reader = nil 9701 c.urlParams_.Set("alt", alt) 9702 c.urlParams_.Set("prettyPrint", "false") 9703 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") 9704 urls += "?" + c.urlParams_.Encode() 9705 req, err := http.NewRequest("GET", urls, body) 9706 if err != nil { 9707 return nil, err 9708 } 9709 req.Header = reqHeaders 9710 googleapi.Expand(req.URL, map[string]string{ 9711 "projectId": c.projectId, 9712 "location": c.location, 9713 "jobId": c.jobId, 9714 }) 9715 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9716 } 9717 9718 // Do executes the "dataflow.projects.locations.jobs.get" call. 9719 // Any non-2xx status code is an error. Response headers are in either 9720 // *Job.ServerResponse.Header or (if a response was returned at all) in 9721 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 9722 // whether the returned error was because http.StatusNotModified was returned. 9723 func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 9724 gensupport.SetOptions(c.urlParams_, opts...) 9725 res, err := c.doRequest("json") 9726 if res != nil && res.StatusCode == http.StatusNotModified { 9727 if res.Body != nil { 9728 res.Body.Close() 9729 } 9730 return nil, gensupport.WrapError(&googleapi.Error{ 9731 Code: res.StatusCode, 9732 Header: res.Header, 9733 }) 9734 } 9735 if err != nil { 9736 return nil, err 9737 } 9738 defer googleapi.CloseBody(res) 9739 if err := googleapi.CheckResponse(res); err != nil { 9740 return nil, gensupport.WrapError(err) 9741 } 9742 ret := &Job{ 9743 ServerResponse: googleapi.ServerResponse{ 9744 Header: res.Header, 9745 HTTPStatusCode: res.StatusCode, 9746 }, 9747 } 9748 target := &ret 9749 if err := gensupport.DecodeResponse(target, res); err != nil { 9750 return nil, err 9751 } 9752 return ret, nil 9753 } 9754 9755 type ProjectsLocationsJobsGetExecutionDetailsCall struct { 9756 s *Service 9757 projectId string 9758 location string 9759 jobId string 9760 urlParams_ gensupport.URLParams 9761 ifNoneMatch_ string 9762 ctx_ context.Context 9763 header_ http.Header 9764 } 9765 9766 // GetExecutionDetails: Request detailed information about the execution status 9767 // of the job. EXPERIMENTAL. This API is subject to change or removal without 9768 // notice. 9769 // 9770 // - jobId: The job to get execution details for. 9771 // - location: The [regional endpoint] 9772 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 9773 // contains the job specified by job_id. 9774 // - projectId: A project id. 9775 func (r *ProjectsLocationsJobsService) GetExecutionDetails(projectId string, location string, jobId string) *ProjectsLocationsJobsGetExecutionDetailsCall { 9776 c := &ProjectsLocationsJobsGetExecutionDetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9777 c.projectId = projectId 9778 c.location = location 9779 c.jobId = jobId 9780 return c 9781 } 9782 9783 // PageSize sets the optional parameter "pageSize": If specified, determines 9784 // the maximum number of stages to return. If unspecified, the service may 9785 // choose an appropriate default, or may return an arbitrarily large number of 9786 // results. 9787 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) PageSize(pageSize int64) *ProjectsLocationsJobsGetExecutionDetailsCall { 9788 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9789 return c 9790 } 9791 9792 // PageToken sets the optional parameter "pageToken": If supplied, this should 9793 // be the value of next_page_token returned by an earlier call. This will cause 9794 // the next page of results to be returned. 9795 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) PageToken(pageToken string) *ProjectsLocationsJobsGetExecutionDetailsCall { 9796 c.urlParams_.Set("pageToken", pageToken) 9797 return c 9798 } 9799 9800 // Fields allows partial responses to be retrieved. See 9801 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9802 // details. 9803 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetExecutionDetailsCall { 9804 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9805 return c 9806 } 9807 9808 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9809 // object's ETag matches the given value. This is useful for getting updates 9810 // only after the object has changed since the last request. 9811 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetExecutionDetailsCall { 9812 c.ifNoneMatch_ = entityTag 9813 return c 9814 } 9815 9816 // Context sets the context to be used in this call's Do method. 9817 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetExecutionDetailsCall { 9818 c.ctx_ = ctx 9819 return c 9820 } 9821 9822 // Header returns a http.Header that can be modified by the caller to add 9823 // headers to the request. 9824 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Header() http.Header { 9825 if c.header_ == nil { 9826 c.header_ = make(http.Header) 9827 } 9828 return c.header_ 9829 } 9830 9831 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) doRequest(alt string) (*http.Response, error) { 9832 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9833 if c.ifNoneMatch_ != "" { 9834 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9835 } 9836 var body io.Reader = nil 9837 c.urlParams_.Set("alt", alt) 9838 c.urlParams_.Set("prettyPrint", "false") 9839 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/executionDetails") 9840 urls += "?" + c.urlParams_.Encode() 9841 req, err := http.NewRequest("GET", urls, body) 9842 if err != nil { 9843 return nil, err 9844 } 9845 req.Header = reqHeaders 9846 googleapi.Expand(req.URL, map[string]string{ 9847 "projectId": c.projectId, 9848 "location": c.location, 9849 "jobId": c.jobId, 9850 }) 9851 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9852 } 9853 9854 // Do executes the "dataflow.projects.locations.jobs.getExecutionDetails" call. 9855 // Any non-2xx status code is an error. Response headers are in either 9856 // *JobExecutionDetails.ServerResponse.Header or (if a response was returned at 9857 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9858 // check whether the returned error was because http.StatusNotModified was 9859 // returned. 9860 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Do(opts ...googleapi.CallOption) (*JobExecutionDetails, error) { 9861 gensupport.SetOptions(c.urlParams_, opts...) 9862 res, err := c.doRequest("json") 9863 if res != nil && res.StatusCode == http.StatusNotModified { 9864 if res.Body != nil { 9865 res.Body.Close() 9866 } 9867 return nil, gensupport.WrapError(&googleapi.Error{ 9868 Code: res.StatusCode, 9869 Header: res.Header, 9870 }) 9871 } 9872 if err != nil { 9873 return nil, err 9874 } 9875 defer googleapi.CloseBody(res) 9876 if err := googleapi.CheckResponse(res); err != nil { 9877 return nil, gensupport.WrapError(err) 9878 } 9879 ret := &JobExecutionDetails{ 9880 ServerResponse: googleapi.ServerResponse{ 9881 Header: res.Header, 9882 HTTPStatusCode: res.StatusCode, 9883 }, 9884 } 9885 target := &ret 9886 if err := gensupport.DecodeResponse(target, res); err != nil { 9887 return nil, err 9888 } 9889 return ret, nil 9890 } 9891 9892 // Pages invokes f for each page of results. 9893 // A non-nil error returned from f will halt the iteration. 9894 // The provided context supersedes any context provided to the Context method. 9895 func (c *ProjectsLocationsJobsGetExecutionDetailsCall) Pages(ctx context.Context, f func(*JobExecutionDetails) error) error { 9896 c.ctx_ = ctx 9897 defer c.PageToken(c.urlParams_.Get("pageToken")) 9898 for { 9899 x, err := c.Do() 9900 if err != nil { 9901 return err 9902 } 9903 if err := f(x); err != nil { 9904 return err 9905 } 9906 if x.NextPageToken == "" { 9907 return nil 9908 } 9909 c.PageToken(x.NextPageToken) 9910 } 9911 } 9912 9913 type ProjectsLocationsJobsGetMetricsCall struct { 9914 s *Service 9915 projectId string 9916 location string 9917 jobId string 9918 urlParams_ gensupport.URLParams 9919 ifNoneMatch_ string 9920 ctx_ context.Context 9921 header_ http.Header 9922 } 9923 9924 // GetMetrics: Request the job status. To request the status of a job, we 9925 // recommend using `projects.locations.jobs.getMetrics` with a [regional 9926 // endpoint] 9927 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 9928 // `projects.jobs.getMetrics` is not recommended, as you can only request the 9929 // status of jobs that are running in `us-central1`. 9930 // 9931 // - jobId: The job to get metrics for. 9932 // - location: The [regional endpoint] 9933 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 9934 // contains the job specified by job_id. 9935 // - projectId: A project id. 9936 func (r *ProjectsLocationsJobsService) GetMetrics(projectId string, location string, jobId string) *ProjectsLocationsJobsGetMetricsCall { 9937 c := &ProjectsLocationsJobsGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9938 c.projectId = projectId 9939 c.location = location 9940 c.jobId = jobId 9941 return c 9942 } 9943 9944 // StartTime sets the optional parameter "startTime": Return only metric data 9945 // that has changed since this time. Default is to return all information about 9946 // all metrics for the job. 9947 func (c *ProjectsLocationsJobsGetMetricsCall) StartTime(startTime string) *ProjectsLocationsJobsGetMetricsCall { 9948 c.urlParams_.Set("startTime", startTime) 9949 return c 9950 } 9951 9952 // Fields allows partial responses to be retrieved. See 9953 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9954 // details. 9955 func (c *ProjectsLocationsJobsGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetMetricsCall { 9956 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9957 return c 9958 } 9959 9960 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9961 // object's ETag matches the given value. This is useful for getting updates 9962 // only after the object has changed since the last request. 9963 func (c *ProjectsLocationsJobsGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetMetricsCall { 9964 c.ifNoneMatch_ = entityTag 9965 return c 9966 } 9967 9968 // Context sets the context to be used in this call's Do method. 9969 func (c *ProjectsLocationsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsLocationsJobsGetMetricsCall { 9970 c.ctx_ = ctx 9971 return c 9972 } 9973 9974 // Header returns a http.Header that can be modified by the caller to add 9975 // headers to the request. 9976 func (c *ProjectsLocationsJobsGetMetricsCall) Header() http.Header { 9977 if c.header_ == nil { 9978 c.header_ = make(http.Header) 9979 } 9980 return c.header_ 9981 } 9982 9983 func (c *ProjectsLocationsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) { 9984 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9985 if c.ifNoneMatch_ != "" { 9986 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9987 } 9988 var body io.Reader = nil 9989 c.urlParams_.Set("alt", alt) 9990 c.urlParams_.Set("prettyPrint", "false") 9991 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics") 9992 urls += "?" + c.urlParams_.Encode() 9993 req, err := http.NewRequest("GET", urls, body) 9994 if err != nil { 9995 return nil, err 9996 } 9997 req.Header = reqHeaders 9998 googleapi.Expand(req.URL, map[string]string{ 9999 "projectId": c.projectId, 10000 "location": c.location, 10001 "jobId": c.jobId, 10002 }) 10003 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10004 } 10005 10006 // Do executes the "dataflow.projects.locations.jobs.getMetrics" call. 10007 // Any non-2xx status code is an error. Response headers are in either 10008 // *JobMetrics.ServerResponse.Header or (if a response was returned at all) in 10009 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10010 // whether the returned error was because http.StatusNotModified was returned. 10011 func (c *ProjectsLocationsJobsGetMetricsCall) Do(opts ...googleapi.CallOption) (*JobMetrics, error) { 10012 gensupport.SetOptions(c.urlParams_, opts...) 10013 res, err := c.doRequest("json") 10014 if res != nil && res.StatusCode == http.StatusNotModified { 10015 if res.Body != nil { 10016 res.Body.Close() 10017 } 10018 return nil, gensupport.WrapError(&googleapi.Error{ 10019 Code: res.StatusCode, 10020 Header: res.Header, 10021 }) 10022 } 10023 if err != nil { 10024 return nil, err 10025 } 10026 defer googleapi.CloseBody(res) 10027 if err := googleapi.CheckResponse(res); err != nil { 10028 return nil, gensupport.WrapError(err) 10029 } 10030 ret := &JobMetrics{ 10031 ServerResponse: googleapi.ServerResponse{ 10032 Header: res.Header, 10033 HTTPStatusCode: res.StatusCode, 10034 }, 10035 } 10036 target := &ret 10037 if err := gensupport.DecodeResponse(target, res); err != nil { 10038 return nil, err 10039 } 10040 return ret, nil 10041 } 10042 10043 type ProjectsLocationsJobsListCall struct { 10044 s *Service 10045 projectId string 10046 location string 10047 urlParams_ gensupport.URLParams 10048 ifNoneMatch_ string 10049 ctx_ context.Context 10050 header_ http.Header 10051 } 10052 10053 // List: List the jobs of a project. To list the jobs of a project in a region, 10054 // we recommend using `projects.locations.jobs.list` with a [regional endpoint] 10055 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). To 10056 // list the all jobs across all regions, use `projects.jobs.aggregated`. Using 10057 // `projects.jobs.list` is not recommended, because you can only get the list 10058 // of jobs that are running in `us-central1`. `projects.locations.jobs.list` 10059 // and `projects.jobs.list` support filtering the list of jobs by name. 10060 // Filtering by name isn't supported by `projects.jobs.aggregated`. 10061 // 10062 // - location: The [regional endpoint] 10063 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 10064 // contains this job. 10065 // - projectId: The project which owns the jobs. 10066 func (r *ProjectsLocationsJobsService) List(projectId string, location string) *ProjectsLocationsJobsListCall { 10067 c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10068 c.projectId = projectId 10069 c.location = location 10070 return c 10071 } 10072 10073 // Filter sets the optional parameter "filter": The kind of filter to use. 10074 // 10075 // Possible values: 10076 // 10077 // "UNKNOWN" - The filter isn't specified, or is unknown. This returns all 10078 // 10079 // jobs ordered on descending `JobUuid`. 10080 // 10081 // "ALL" - Returns all running jobs first ordered on creation timestamp, then 10082 // 10083 // returns all terminated jobs ordered on the termination timestamp. 10084 // 10085 // "TERMINATED" - Filters the jobs that have a terminated state, ordered on 10086 // 10087 // the termination timestamp. Example terminated states: `JOB_STATE_STOPPED`, 10088 // `JOB_STATE_UPDATED`, `JOB_STATE_DRAINED`, etc. 10089 // 10090 // "ACTIVE" - Filters the jobs that are running ordered on the creation 10091 // 10092 // timestamp. 10093 func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall { 10094 c.urlParams_.Set("filter", filter) 10095 return c 10096 } 10097 10098 // Name sets the optional parameter "name": The job name. 10099 func (c *ProjectsLocationsJobsListCall) Name(name string) *ProjectsLocationsJobsListCall { 10100 c.urlParams_.Set("name", name) 10101 return c 10102 } 10103 10104 // PageSize sets the optional parameter "pageSize": If there are many jobs, 10105 // limit response to at most this many. The actual number of jobs returned will 10106 // be the lesser of max_responses and an unspecified server-defined limit. 10107 func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall { 10108 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10109 return c 10110 } 10111 10112 // PageToken sets the optional parameter "pageToken": Set this to the 10113 // 'next_page_token' field of a previous response to request additional results 10114 // in a long list. 10115 func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall { 10116 c.urlParams_.Set("pageToken", pageToken) 10117 return c 10118 } 10119 10120 // View sets the optional parameter "view": Deprecated. ListJobs always returns 10121 // summaries now. Use GetJob for other JobViews. 10122 // 10123 // Possible values: 10124 // 10125 // "JOB_VIEW_UNKNOWN" - The job view to return isn't specified, or is 10126 // 10127 // unknown. Responses will contain at least the `JOB_VIEW_SUMMARY` information, 10128 // and may contain additional information. 10129 // 10130 // "JOB_VIEW_SUMMARY" - Request summary information only: Project ID, Job ID, 10131 // 10132 // job name, job type, job status, start/end time, and Cloud SDK version 10133 // details. 10134 // 10135 // "JOB_VIEW_ALL" - Request all information available for this job. When the 10136 // 10137 // job is in `JOB_STATE_PENDING`, the job has been created but is not yet 10138 // running, and not all job information is available. For complete job 10139 // information, wait until the job in is `JOB_STATE_RUNNING`. For more 10140 // information, see 10141 // [JobState](https://cloud.google.com/dataflow/docs/reference/rest/v1b3/project 10142 // s.jobs#jobstate). 10143 // 10144 // "JOB_VIEW_DESCRIPTION" - Request summary info and limited job description 10145 // 10146 // data for steps, labels and environment. 10147 func (c *ProjectsLocationsJobsListCall) View(view string) *ProjectsLocationsJobsListCall { 10148 c.urlParams_.Set("view", view) 10149 return c 10150 } 10151 10152 // Fields allows partial responses to be retrieved. See 10153 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10154 // details. 10155 func (c *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall { 10156 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10157 return c 10158 } 10159 10160 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10161 // object's ETag matches the given value. This is useful for getting updates 10162 // only after the object has changed since the last request. 10163 func (c *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall { 10164 c.ifNoneMatch_ = entityTag 10165 return c 10166 } 10167 10168 // Context sets the context to be used in this call's Do method. 10169 func (c *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall { 10170 c.ctx_ = ctx 10171 return c 10172 } 10173 10174 // Header returns a http.Header that can be modified by the caller to add 10175 // headers to the request. 10176 func (c *ProjectsLocationsJobsListCall) Header() http.Header { 10177 if c.header_ == nil { 10178 c.header_ = make(http.Header) 10179 } 10180 return c.header_ 10181 } 10182 10183 func (c *ProjectsLocationsJobsListCall) doRequest(alt string) (*http.Response, error) { 10184 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10185 if c.ifNoneMatch_ != "" { 10186 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10187 } 10188 var body io.Reader = nil 10189 c.urlParams_.Set("alt", alt) 10190 c.urlParams_.Set("prettyPrint", "false") 10191 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs") 10192 urls += "?" + c.urlParams_.Encode() 10193 req, err := http.NewRequest("GET", urls, body) 10194 if err != nil { 10195 return nil, err 10196 } 10197 req.Header = reqHeaders 10198 googleapi.Expand(req.URL, map[string]string{ 10199 "projectId": c.projectId, 10200 "location": c.location, 10201 }) 10202 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10203 } 10204 10205 // Do executes the "dataflow.projects.locations.jobs.list" call. 10206 // Any non-2xx status code is an error. Response headers are in either 10207 // *ListJobsResponse.ServerResponse.Header or (if a response was returned at 10208 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10209 // check whether the returned error was because http.StatusNotModified was 10210 // returned. 10211 func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 10212 gensupport.SetOptions(c.urlParams_, opts...) 10213 res, err := c.doRequest("json") 10214 if res != nil && res.StatusCode == http.StatusNotModified { 10215 if res.Body != nil { 10216 res.Body.Close() 10217 } 10218 return nil, gensupport.WrapError(&googleapi.Error{ 10219 Code: res.StatusCode, 10220 Header: res.Header, 10221 }) 10222 } 10223 if err != nil { 10224 return nil, err 10225 } 10226 defer googleapi.CloseBody(res) 10227 if err := googleapi.CheckResponse(res); err != nil { 10228 return nil, gensupport.WrapError(err) 10229 } 10230 ret := &ListJobsResponse{ 10231 ServerResponse: googleapi.ServerResponse{ 10232 Header: res.Header, 10233 HTTPStatusCode: res.StatusCode, 10234 }, 10235 } 10236 target := &ret 10237 if err := gensupport.DecodeResponse(target, res); err != nil { 10238 return nil, err 10239 } 10240 return ret, nil 10241 } 10242 10243 // Pages invokes f for each page of results. 10244 // A non-nil error returned from f will halt the iteration. 10245 // The provided context supersedes any context provided to the Context method. 10246 func (c *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 10247 c.ctx_ = ctx 10248 defer c.PageToken(c.urlParams_.Get("pageToken")) 10249 for { 10250 x, err := c.Do() 10251 if err != nil { 10252 return err 10253 } 10254 if err := f(x); err != nil { 10255 return err 10256 } 10257 if x.NextPageToken == "" { 10258 return nil 10259 } 10260 c.PageToken(x.NextPageToken) 10261 } 10262 } 10263 10264 type ProjectsLocationsJobsSnapshotCall struct { 10265 s *Service 10266 projectId string 10267 location string 10268 jobId string 10269 snapshotjobrequest *SnapshotJobRequest 10270 urlParams_ gensupport.URLParams 10271 ctx_ context.Context 10272 header_ http.Header 10273 } 10274 10275 // Snapshot: Snapshot the state of a streaming job. 10276 // 10277 // - jobId: The job to be snapshotted. 10278 // - location: The location that contains this job. 10279 // - projectId: The project which owns the job to be snapshotted. 10280 func (r *ProjectsLocationsJobsService) Snapshot(projectId string, location string, jobId string, snapshotjobrequest *SnapshotJobRequest) *ProjectsLocationsJobsSnapshotCall { 10281 c := &ProjectsLocationsJobsSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10282 c.projectId = projectId 10283 c.location = location 10284 c.jobId = jobId 10285 c.snapshotjobrequest = snapshotjobrequest 10286 return c 10287 } 10288 10289 // Fields allows partial responses to be retrieved. See 10290 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10291 // details. 10292 func (c *ProjectsLocationsJobsSnapshotCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsSnapshotCall { 10293 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10294 return c 10295 } 10296 10297 // Context sets the context to be used in this call's Do method. 10298 func (c *ProjectsLocationsJobsSnapshotCall) Context(ctx context.Context) *ProjectsLocationsJobsSnapshotCall { 10299 c.ctx_ = ctx 10300 return c 10301 } 10302 10303 // Header returns a http.Header that can be modified by the caller to add 10304 // headers to the request. 10305 func (c *ProjectsLocationsJobsSnapshotCall) Header() http.Header { 10306 if c.header_ == nil { 10307 c.header_ = make(http.Header) 10308 } 10309 return c.header_ 10310 } 10311 10312 func (c *ProjectsLocationsJobsSnapshotCall) doRequest(alt string) (*http.Response, error) { 10313 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10314 var body io.Reader = nil 10315 body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshotjobrequest) 10316 if err != nil { 10317 return nil, err 10318 } 10319 c.urlParams_.Set("alt", alt) 10320 c.urlParams_.Set("prettyPrint", "false") 10321 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}:snapshot") 10322 urls += "?" + c.urlParams_.Encode() 10323 req, err := http.NewRequest("POST", urls, body) 10324 if err != nil { 10325 return nil, err 10326 } 10327 req.Header = reqHeaders 10328 googleapi.Expand(req.URL, map[string]string{ 10329 "projectId": c.projectId, 10330 "location": c.location, 10331 "jobId": c.jobId, 10332 }) 10333 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10334 } 10335 10336 // Do executes the "dataflow.projects.locations.jobs.snapshot" call. 10337 // Any non-2xx status code is an error. Response headers are in either 10338 // *Snapshot.ServerResponse.Header or (if a response was returned at all) in 10339 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10340 // whether the returned error was because http.StatusNotModified was returned. 10341 func (c *ProjectsLocationsJobsSnapshotCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 10342 gensupport.SetOptions(c.urlParams_, opts...) 10343 res, err := c.doRequest("json") 10344 if res != nil && res.StatusCode == http.StatusNotModified { 10345 if res.Body != nil { 10346 res.Body.Close() 10347 } 10348 return nil, gensupport.WrapError(&googleapi.Error{ 10349 Code: res.StatusCode, 10350 Header: res.Header, 10351 }) 10352 } 10353 if err != nil { 10354 return nil, err 10355 } 10356 defer googleapi.CloseBody(res) 10357 if err := googleapi.CheckResponse(res); err != nil { 10358 return nil, gensupport.WrapError(err) 10359 } 10360 ret := &Snapshot{ 10361 ServerResponse: googleapi.ServerResponse{ 10362 Header: res.Header, 10363 HTTPStatusCode: res.StatusCode, 10364 }, 10365 } 10366 target := &ret 10367 if err := gensupport.DecodeResponse(target, res); err != nil { 10368 return nil, err 10369 } 10370 return ret, nil 10371 } 10372 10373 type ProjectsLocationsJobsUpdateCall struct { 10374 s *Service 10375 projectId string 10376 location string 10377 jobId string 10378 job *Job 10379 urlParams_ gensupport.URLParams 10380 ctx_ context.Context 10381 header_ http.Header 10382 } 10383 10384 // Update: Updates the state of an existing Cloud Dataflow job. To update the 10385 // state of an existing job, we recommend using 10386 // `projects.locations.jobs.update` with a [regional endpoint] 10387 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 10388 // `projects.jobs.update` is not recommended, as you can only update the state 10389 // of jobs that are running in `us-central1`. 10390 // 10391 // - jobId: The job ID. 10392 // - location: The [regional endpoint] 10393 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 10394 // contains this job. 10395 // - projectId: The ID of the Cloud Platform project that the job belongs to. 10396 func (r *ProjectsLocationsJobsService) Update(projectId string, location string, jobId string, job *Job) *ProjectsLocationsJobsUpdateCall { 10397 c := &ProjectsLocationsJobsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10398 c.projectId = projectId 10399 c.location = location 10400 c.jobId = jobId 10401 c.job = job 10402 return c 10403 } 10404 10405 // UpdateMask sets the optional parameter "updateMask": The list of fields to 10406 // update relative to Job. If empty, only RequestedJobState will be considered 10407 // for update. If the FieldMask is not empty and RequestedJobState is 10408 // none/empty, The fields specified in the update mask will be the only ones 10409 // considered for update. If both RequestedJobState and update_mask are 10410 // specified, an error will be returned as we cannot update both state and 10411 // mask. 10412 func (c *ProjectsLocationsJobsUpdateCall) UpdateMask(updateMask string) *ProjectsLocationsJobsUpdateCall { 10413 c.urlParams_.Set("updateMask", updateMask) 10414 return c 10415 } 10416 10417 // Fields allows partial responses to be retrieved. See 10418 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10419 // details. 10420 func (c *ProjectsLocationsJobsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsUpdateCall { 10421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10422 return c 10423 } 10424 10425 // Context sets the context to be used in this call's Do method. 10426 func (c *ProjectsLocationsJobsUpdateCall) Context(ctx context.Context) *ProjectsLocationsJobsUpdateCall { 10427 c.ctx_ = ctx 10428 return c 10429 } 10430 10431 // Header returns a http.Header that can be modified by the caller to add 10432 // headers to the request. 10433 func (c *ProjectsLocationsJobsUpdateCall) Header() http.Header { 10434 if c.header_ == nil { 10435 c.header_ = make(http.Header) 10436 } 10437 return c.header_ 10438 } 10439 10440 func (c *ProjectsLocationsJobsUpdateCall) doRequest(alt string) (*http.Response, error) { 10441 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10442 var body io.Reader = nil 10443 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job) 10444 if err != nil { 10445 return nil, err 10446 } 10447 c.urlParams_.Set("alt", alt) 10448 c.urlParams_.Set("prettyPrint", "false") 10449 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}") 10450 urls += "?" + c.urlParams_.Encode() 10451 req, err := http.NewRequest("PUT", urls, body) 10452 if err != nil { 10453 return nil, err 10454 } 10455 req.Header = reqHeaders 10456 googleapi.Expand(req.URL, map[string]string{ 10457 "projectId": c.projectId, 10458 "location": c.location, 10459 "jobId": c.jobId, 10460 }) 10461 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10462 } 10463 10464 // Do executes the "dataflow.projects.locations.jobs.update" call. 10465 // Any non-2xx status code is an error. Response headers are in either 10466 // *Job.ServerResponse.Header or (if a response was returned at all) in 10467 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 10468 // whether the returned error was because http.StatusNotModified was returned. 10469 func (c *ProjectsLocationsJobsUpdateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 10470 gensupport.SetOptions(c.urlParams_, opts...) 10471 res, err := c.doRequest("json") 10472 if res != nil && res.StatusCode == http.StatusNotModified { 10473 if res.Body != nil { 10474 res.Body.Close() 10475 } 10476 return nil, gensupport.WrapError(&googleapi.Error{ 10477 Code: res.StatusCode, 10478 Header: res.Header, 10479 }) 10480 } 10481 if err != nil { 10482 return nil, err 10483 } 10484 defer googleapi.CloseBody(res) 10485 if err := googleapi.CheckResponse(res); err != nil { 10486 return nil, gensupport.WrapError(err) 10487 } 10488 ret := &Job{ 10489 ServerResponse: googleapi.ServerResponse{ 10490 Header: res.Header, 10491 HTTPStatusCode: res.StatusCode, 10492 }, 10493 } 10494 target := &ret 10495 if err := gensupport.DecodeResponse(target, res); err != nil { 10496 return nil, err 10497 } 10498 return ret, nil 10499 } 10500 10501 type ProjectsLocationsJobsDebugGetConfigCall struct { 10502 s *Service 10503 projectId string 10504 location string 10505 jobId string 10506 getdebugconfigrequest *GetDebugConfigRequest 10507 urlParams_ gensupport.URLParams 10508 ctx_ context.Context 10509 header_ http.Header 10510 } 10511 10512 // GetConfig: Get encoded debug configuration for component. Not cacheable. 10513 // 10514 // - jobId: The job id. 10515 // - location: The [regional endpoint] 10516 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 10517 // contains the job specified by job_id. 10518 // - projectId: The project id. 10519 func (r *ProjectsLocationsJobsDebugService) GetConfig(projectId string, location string, jobId string, getdebugconfigrequest *GetDebugConfigRequest) *ProjectsLocationsJobsDebugGetConfigCall { 10520 c := &ProjectsLocationsJobsDebugGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10521 c.projectId = projectId 10522 c.location = location 10523 c.jobId = jobId 10524 c.getdebugconfigrequest = getdebugconfigrequest 10525 return c 10526 } 10527 10528 // Fields allows partial responses to be retrieved. See 10529 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10530 // details. 10531 func (c *ProjectsLocationsJobsDebugGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugGetConfigCall { 10532 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10533 return c 10534 } 10535 10536 // Context sets the context to be used in this call's Do method. 10537 func (c *ProjectsLocationsJobsDebugGetConfigCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugGetConfigCall { 10538 c.ctx_ = ctx 10539 return c 10540 } 10541 10542 // Header returns a http.Header that can be modified by the caller to add 10543 // headers to the request. 10544 func (c *ProjectsLocationsJobsDebugGetConfigCall) Header() http.Header { 10545 if c.header_ == nil { 10546 c.header_ = make(http.Header) 10547 } 10548 return c.header_ 10549 } 10550 10551 func (c *ProjectsLocationsJobsDebugGetConfigCall) doRequest(alt string) (*http.Response, error) { 10552 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10553 var body io.Reader = nil 10554 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdebugconfigrequest) 10555 if err != nil { 10556 return nil, err 10557 } 10558 c.urlParams_.Set("alt", alt) 10559 c.urlParams_.Set("prettyPrint", "false") 10560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig") 10561 urls += "?" + c.urlParams_.Encode() 10562 req, err := http.NewRequest("POST", urls, body) 10563 if err != nil { 10564 return nil, err 10565 } 10566 req.Header = reqHeaders 10567 googleapi.Expand(req.URL, map[string]string{ 10568 "projectId": c.projectId, 10569 "location": c.location, 10570 "jobId": c.jobId, 10571 }) 10572 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10573 } 10574 10575 // Do executes the "dataflow.projects.locations.jobs.debug.getConfig" call. 10576 // Any non-2xx status code is an error. Response headers are in either 10577 // *GetDebugConfigResponse.ServerResponse.Header or (if a response was returned 10578 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10579 // check whether the returned error was because http.StatusNotModified was 10580 // returned. 10581 func (c *ProjectsLocationsJobsDebugGetConfigCall) Do(opts ...googleapi.CallOption) (*GetDebugConfigResponse, error) { 10582 gensupport.SetOptions(c.urlParams_, opts...) 10583 res, err := c.doRequest("json") 10584 if res != nil && res.StatusCode == http.StatusNotModified { 10585 if res.Body != nil { 10586 res.Body.Close() 10587 } 10588 return nil, gensupport.WrapError(&googleapi.Error{ 10589 Code: res.StatusCode, 10590 Header: res.Header, 10591 }) 10592 } 10593 if err != nil { 10594 return nil, err 10595 } 10596 defer googleapi.CloseBody(res) 10597 if err := googleapi.CheckResponse(res); err != nil { 10598 return nil, gensupport.WrapError(err) 10599 } 10600 ret := &GetDebugConfigResponse{ 10601 ServerResponse: googleapi.ServerResponse{ 10602 Header: res.Header, 10603 HTTPStatusCode: res.StatusCode, 10604 }, 10605 } 10606 target := &ret 10607 if err := gensupport.DecodeResponse(target, res); err != nil { 10608 return nil, err 10609 } 10610 return ret, nil 10611 } 10612 10613 type ProjectsLocationsJobsDebugSendCaptureCall struct { 10614 s *Service 10615 projectId string 10616 location string 10617 jobId string 10618 senddebugcapturerequest *SendDebugCaptureRequest 10619 urlParams_ gensupport.URLParams 10620 ctx_ context.Context 10621 header_ http.Header 10622 } 10623 10624 // SendCapture: Send encoded debug capture data for component. 10625 // 10626 // - jobId: The job id. 10627 // - location: The [regional endpoint] 10628 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 10629 // contains the job specified by job_id. 10630 // - projectId: The project id. 10631 func (r *ProjectsLocationsJobsDebugService) SendCapture(projectId string, location string, jobId string, senddebugcapturerequest *SendDebugCaptureRequest) *ProjectsLocationsJobsDebugSendCaptureCall { 10632 c := &ProjectsLocationsJobsDebugSendCaptureCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10633 c.projectId = projectId 10634 c.location = location 10635 c.jobId = jobId 10636 c.senddebugcapturerequest = senddebugcapturerequest 10637 return c 10638 } 10639 10640 // Fields allows partial responses to be retrieved. See 10641 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10642 // details. 10643 func (c *ProjectsLocationsJobsDebugSendCaptureCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDebugSendCaptureCall { 10644 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10645 return c 10646 } 10647 10648 // Context sets the context to be used in this call's Do method. 10649 func (c *ProjectsLocationsJobsDebugSendCaptureCall) Context(ctx context.Context) *ProjectsLocationsJobsDebugSendCaptureCall { 10650 c.ctx_ = ctx 10651 return c 10652 } 10653 10654 // Header returns a http.Header that can be modified by the caller to add 10655 // headers to the request. 10656 func (c *ProjectsLocationsJobsDebugSendCaptureCall) Header() http.Header { 10657 if c.header_ == nil { 10658 c.header_ = make(http.Header) 10659 } 10660 return c.header_ 10661 } 10662 10663 func (c *ProjectsLocationsJobsDebugSendCaptureCall) doRequest(alt string) (*http.Response, error) { 10664 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10665 var body io.Reader = nil 10666 body, err := googleapi.WithoutDataWrapper.JSONReader(c.senddebugcapturerequest) 10667 if err != nil { 10668 return nil, err 10669 } 10670 c.urlParams_.Set("alt", alt) 10671 c.urlParams_.Set("prettyPrint", "false") 10672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture") 10673 urls += "?" + c.urlParams_.Encode() 10674 req, err := http.NewRequest("POST", urls, body) 10675 if err != nil { 10676 return nil, err 10677 } 10678 req.Header = reqHeaders 10679 googleapi.Expand(req.URL, map[string]string{ 10680 "projectId": c.projectId, 10681 "location": c.location, 10682 "jobId": c.jobId, 10683 }) 10684 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10685 } 10686 10687 // Do executes the "dataflow.projects.locations.jobs.debug.sendCapture" call. 10688 // Any non-2xx status code is an error. Response headers are in either 10689 // *SendDebugCaptureResponse.ServerResponse.Header or (if a response was 10690 // returned at all) in error.(*googleapi.Error).Header. Use 10691 // googleapi.IsNotModified to check whether the returned error was because 10692 // http.StatusNotModified was returned. 10693 func (c *ProjectsLocationsJobsDebugSendCaptureCall) Do(opts ...googleapi.CallOption) (*SendDebugCaptureResponse, error) { 10694 gensupport.SetOptions(c.urlParams_, opts...) 10695 res, err := c.doRequest("json") 10696 if res != nil && res.StatusCode == http.StatusNotModified { 10697 if res.Body != nil { 10698 res.Body.Close() 10699 } 10700 return nil, gensupport.WrapError(&googleapi.Error{ 10701 Code: res.StatusCode, 10702 Header: res.Header, 10703 }) 10704 } 10705 if err != nil { 10706 return nil, err 10707 } 10708 defer googleapi.CloseBody(res) 10709 if err := googleapi.CheckResponse(res); err != nil { 10710 return nil, gensupport.WrapError(err) 10711 } 10712 ret := &SendDebugCaptureResponse{ 10713 ServerResponse: googleapi.ServerResponse{ 10714 Header: res.Header, 10715 HTTPStatusCode: res.StatusCode, 10716 }, 10717 } 10718 target := &ret 10719 if err := gensupport.DecodeResponse(target, res); err != nil { 10720 return nil, err 10721 } 10722 return ret, nil 10723 } 10724 10725 type ProjectsLocationsJobsMessagesListCall struct { 10726 s *Service 10727 projectId string 10728 location string 10729 jobId string 10730 urlParams_ gensupport.URLParams 10731 ifNoneMatch_ string 10732 ctx_ context.Context 10733 header_ http.Header 10734 } 10735 10736 // List: Request the job status. To request the status of a job, we recommend 10737 // using `projects.locations.jobs.messages.list` with a [regional endpoint] 10738 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using 10739 // `projects.jobs.messages.list` is not recommended, as you can only request 10740 // the status of jobs that are running in `us-central1`. 10741 // 10742 // - jobId: The job to get messages about. 10743 // - location: The [regional endpoint] 10744 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 10745 // contains the job specified by job_id. 10746 // - projectId: A project id. 10747 func (r *ProjectsLocationsJobsMessagesService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsMessagesListCall { 10748 c := &ProjectsLocationsJobsMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10749 c.projectId = projectId 10750 c.location = location 10751 c.jobId = jobId 10752 return c 10753 } 10754 10755 // EndTime sets the optional parameter "endTime": Return only messages with 10756 // timestamps < end_time. The default is now (i.e. return up to the latest 10757 // messages available). 10758 func (c *ProjectsLocationsJobsMessagesListCall) EndTime(endTime string) *ProjectsLocationsJobsMessagesListCall { 10759 c.urlParams_.Set("endTime", endTime) 10760 return c 10761 } 10762 10763 // MinimumImportance sets the optional parameter "minimumImportance": Filter to 10764 // only get messages with importance >= level 10765 // 10766 // Possible values: 10767 // 10768 // "JOB_MESSAGE_IMPORTANCE_UNKNOWN" - The message importance isn't specified, 10769 // 10770 // or is unknown. 10771 // 10772 // "JOB_MESSAGE_DEBUG" - The message is at the 'debug' level: typically only 10773 // 10774 // useful for software engineers working on the code the job is running. 10775 // Typically, Dataflow pipeline runners do not display log messages at this 10776 // level by default. 10777 // 10778 // "JOB_MESSAGE_DETAILED" - The message is at the 'detailed' level: somewhat 10779 // 10780 // verbose, but potentially useful to users. Typically, Dataflow pipeline 10781 // runners do not display log messages at this level by default. These messages 10782 // are displayed by default in the Dataflow monitoring UI. 10783 // 10784 // "JOB_MESSAGE_BASIC" - The message is at the 'basic' level: useful for 10785 // 10786 // keeping track of the execution of a Dataflow pipeline. Typically, Dataflow 10787 // pipeline runners display log messages at this level by default, and these 10788 // messages are displayed by default in the Dataflow monitoring UI. 10789 // 10790 // "JOB_MESSAGE_WARNING" - The message is at the 'warning' level: indicating 10791 // 10792 // a condition pertaining to a job which may require human intervention. 10793 // Typically, Dataflow pipeline runners display log messages at this level by 10794 // default, and these messages are displayed by default in the Dataflow 10795 // monitoring UI. 10796 // 10797 // "JOB_MESSAGE_ERROR" - The message is at the 'error' level: indicating a 10798 // 10799 // condition preventing a job from succeeding. Typically, Dataflow pipeline 10800 // runners display log messages at this level by default, and these messages 10801 // are displayed by default in the Dataflow monitoring UI. 10802 func (c *ProjectsLocationsJobsMessagesListCall) MinimumImportance(minimumImportance string) *ProjectsLocationsJobsMessagesListCall { 10803 c.urlParams_.Set("minimumImportance", minimumImportance) 10804 return c 10805 } 10806 10807 // PageSize sets the optional parameter "pageSize": If specified, determines 10808 // the maximum number of messages to return. If unspecified, the service may 10809 // choose an appropriate default, or may return an arbitrarily large number of 10810 // results. 10811 func (c *ProjectsLocationsJobsMessagesListCall) PageSize(pageSize int64) *ProjectsLocationsJobsMessagesListCall { 10812 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10813 return c 10814 } 10815 10816 // PageToken sets the optional parameter "pageToken": If supplied, this should 10817 // be the value of next_page_token returned by an earlier call. This will cause 10818 // the next page of results to be returned. 10819 func (c *ProjectsLocationsJobsMessagesListCall) PageToken(pageToken string) *ProjectsLocationsJobsMessagesListCall { 10820 c.urlParams_.Set("pageToken", pageToken) 10821 return c 10822 } 10823 10824 // StartTime sets the optional parameter "startTime": If specified, return only 10825 // messages with timestamps >= start_time. The default is the job creation time 10826 // (i.e. beginning of messages). 10827 func (c *ProjectsLocationsJobsMessagesListCall) StartTime(startTime string) *ProjectsLocationsJobsMessagesListCall { 10828 c.urlParams_.Set("startTime", startTime) 10829 return c 10830 } 10831 10832 // Fields allows partial responses to be retrieved. See 10833 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10834 // details. 10835 func (c *ProjectsLocationsJobsMessagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsMessagesListCall { 10836 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10837 return c 10838 } 10839 10840 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10841 // object's ETag matches the given value. This is useful for getting updates 10842 // only after the object has changed since the last request. 10843 func (c *ProjectsLocationsJobsMessagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsMessagesListCall { 10844 c.ifNoneMatch_ = entityTag 10845 return c 10846 } 10847 10848 // Context sets the context to be used in this call's Do method. 10849 func (c *ProjectsLocationsJobsMessagesListCall) Context(ctx context.Context) *ProjectsLocationsJobsMessagesListCall { 10850 c.ctx_ = ctx 10851 return c 10852 } 10853 10854 // Header returns a http.Header that can be modified by the caller to add 10855 // headers to the request. 10856 func (c *ProjectsLocationsJobsMessagesListCall) Header() http.Header { 10857 if c.header_ == nil { 10858 c.header_ = make(http.Header) 10859 } 10860 return c.header_ 10861 } 10862 10863 func (c *ProjectsLocationsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) { 10864 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10865 if c.ifNoneMatch_ != "" { 10866 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10867 } 10868 var body io.Reader = nil 10869 c.urlParams_.Set("alt", alt) 10870 c.urlParams_.Set("prettyPrint", "false") 10871 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages") 10872 urls += "?" + c.urlParams_.Encode() 10873 req, err := http.NewRequest("GET", urls, body) 10874 if err != nil { 10875 return nil, err 10876 } 10877 req.Header = reqHeaders 10878 googleapi.Expand(req.URL, map[string]string{ 10879 "projectId": c.projectId, 10880 "location": c.location, 10881 "jobId": c.jobId, 10882 }) 10883 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10884 } 10885 10886 // Do executes the "dataflow.projects.locations.jobs.messages.list" call. 10887 // Any non-2xx status code is an error. Response headers are in either 10888 // *ListJobMessagesResponse.ServerResponse.Header or (if a response was 10889 // returned at all) in error.(*googleapi.Error).Header. Use 10890 // googleapi.IsNotModified to check whether the returned error was because 10891 // http.StatusNotModified was returned. 10892 func (c *ProjectsLocationsJobsMessagesListCall) Do(opts ...googleapi.CallOption) (*ListJobMessagesResponse, error) { 10893 gensupport.SetOptions(c.urlParams_, opts...) 10894 res, err := c.doRequest("json") 10895 if res != nil && res.StatusCode == http.StatusNotModified { 10896 if res.Body != nil { 10897 res.Body.Close() 10898 } 10899 return nil, gensupport.WrapError(&googleapi.Error{ 10900 Code: res.StatusCode, 10901 Header: res.Header, 10902 }) 10903 } 10904 if err != nil { 10905 return nil, err 10906 } 10907 defer googleapi.CloseBody(res) 10908 if err := googleapi.CheckResponse(res); err != nil { 10909 return nil, gensupport.WrapError(err) 10910 } 10911 ret := &ListJobMessagesResponse{ 10912 ServerResponse: googleapi.ServerResponse{ 10913 Header: res.Header, 10914 HTTPStatusCode: res.StatusCode, 10915 }, 10916 } 10917 target := &ret 10918 if err := gensupport.DecodeResponse(target, res); err != nil { 10919 return nil, err 10920 } 10921 return ret, nil 10922 } 10923 10924 // Pages invokes f for each page of results. 10925 // A non-nil error returned from f will halt the iteration. 10926 // The provided context supersedes any context provided to the Context method. 10927 func (c *ProjectsLocationsJobsMessagesListCall) Pages(ctx context.Context, f func(*ListJobMessagesResponse) error) error { 10928 c.ctx_ = ctx 10929 defer c.PageToken(c.urlParams_.Get("pageToken")) 10930 for { 10931 x, err := c.Do() 10932 if err != nil { 10933 return err 10934 } 10935 if err := f(x); err != nil { 10936 return err 10937 } 10938 if x.NextPageToken == "" { 10939 return nil 10940 } 10941 c.PageToken(x.NextPageToken) 10942 } 10943 } 10944 10945 type ProjectsLocationsJobsSnapshotsListCall struct { 10946 s *Service 10947 projectId string 10948 location string 10949 jobId string 10950 urlParams_ gensupport.URLParams 10951 ifNoneMatch_ string 10952 ctx_ context.Context 10953 header_ http.Header 10954 } 10955 10956 // List: Lists snapshots. 10957 // 10958 // - jobId: If specified, list snapshots created from this job. 10959 // - location: The location to list snapshots in. 10960 // - projectId: The project ID to list snapshots for. 10961 func (r *ProjectsLocationsJobsSnapshotsService) List(projectId string, location string, jobId string) *ProjectsLocationsJobsSnapshotsListCall { 10962 c := &ProjectsLocationsJobsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10963 c.projectId = projectId 10964 c.location = location 10965 c.jobId = jobId 10966 return c 10967 } 10968 10969 // Fields allows partial responses to be retrieved. See 10970 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10971 // details. 10972 func (c *ProjectsLocationsJobsSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsSnapshotsListCall { 10973 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10974 return c 10975 } 10976 10977 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10978 // object's ETag matches the given value. This is useful for getting updates 10979 // only after the object has changed since the last request. 10980 func (c *ProjectsLocationsJobsSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsSnapshotsListCall { 10981 c.ifNoneMatch_ = entityTag 10982 return c 10983 } 10984 10985 // Context sets the context to be used in this call's Do method. 10986 func (c *ProjectsLocationsJobsSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsJobsSnapshotsListCall { 10987 c.ctx_ = ctx 10988 return c 10989 } 10990 10991 // Header returns a http.Header that can be modified by the caller to add 10992 // headers to the request. 10993 func (c *ProjectsLocationsJobsSnapshotsListCall) Header() http.Header { 10994 if c.header_ == nil { 10995 c.header_ = make(http.Header) 10996 } 10997 return c.header_ 10998 } 10999 11000 func (c *ProjectsLocationsJobsSnapshotsListCall) doRequest(alt string) (*http.Response, error) { 11001 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11002 if c.ifNoneMatch_ != "" { 11003 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11004 } 11005 var body io.Reader = nil 11006 c.urlParams_.Set("alt", alt) 11007 c.urlParams_.Set("prettyPrint", "false") 11008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/snapshots") 11009 urls += "?" + c.urlParams_.Encode() 11010 req, err := http.NewRequest("GET", urls, body) 11011 if err != nil { 11012 return nil, err 11013 } 11014 req.Header = reqHeaders 11015 googleapi.Expand(req.URL, map[string]string{ 11016 "projectId": c.projectId, 11017 "location": c.location, 11018 "jobId": c.jobId, 11019 }) 11020 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11021 } 11022 11023 // Do executes the "dataflow.projects.locations.jobs.snapshots.list" call. 11024 // Any non-2xx status code is an error. Response headers are in either 11025 // *ListSnapshotsResponse.ServerResponse.Header or (if a response was returned 11026 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11027 // check whether the returned error was because http.StatusNotModified was 11028 // returned. 11029 func (c *ProjectsLocationsJobsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) { 11030 gensupport.SetOptions(c.urlParams_, opts...) 11031 res, err := c.doRequest("json") 11032 if res != nil && res.StatusCode == http.StatusNotModified { 11033 if res.Body != nil { 11034 res.Body.Close() 11035 } 11036 return nil, gensupport.WrapError(&googleapi.Error{ 11037 Code: res.StatusCode, 11038 Header: res.Header, 11039 }) 11040 } 11041 if err != nil { 11042 return nil, err 11043 } 11044 defer googleapi.CloseBody(res) 11045 if err := googleapi.CheckResponse(res); err != nil { 11046 return nil, gensupport.WrapError(err) 11047 } 11048 ret := &ListSnapshotsResponse{ 11049 ServerResponse: googleapi.ServerResponse{ 11050 Header: res.Header, 11051 HTTPStatusCode: res.StatusCode, 11052 }, 11053 } 11054 target := &ret 11055 if err := gensupport.DecodeResponse(target, res); err != nil { 11056 return nil, err 11057 } 11058 return ret, nil 11059 } 11060 11061 type ProjectsLocationsJobsStagesGetExecutionDetailsCall struct { 11062 s *Service 11063 projectId string 11064 location string 11065 jobId string 11066 stageId string 11067 urlParams_ gensupport.URLParams 11068 ifNoneMatch_ string 11069 ctx_ context.Context 11070 header_ http.Header 11071 } 11072 11073 // GetExecutionDetails: Request detailed information about the execution status 11074 // of a stage of the job. EXPERIMENTAL. This API is subject to change or 11075 // removal without notice. 11076 // 11077 // - jobId: The job to get execution details for. 11078 // - location: The [regional endpoint] 11079 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 11080 // contains the job specified by job_id. 11081 // - projectId: A project id. 11082 // - stageId: The stage for which to fetch information. 11083 func (r *ProjectsLocationsJobsStagesService) GetExecutionDetails(projectId string, location string, jobId string, stageId string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11084 c := &ProjectsLocationsJobsStagesGetExecutionDetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11085 c.projectId = projectId 11086 c.location = location 11087 c.jobId = jobId 11088 c.stageId = stageId 11089 return c 11090 } 11091 11092 // EndTime sets the optional parameter "endTime": Upper time bound of work 11093 // items to include, by start time. 11094 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) EndTime(endTime string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11095 c.urlParams_.Set("endTime", endTime) 11096 return c 11097 } 11098 11099 // PageSize sets the optional parameter "pageSize": If specified, determines 11100 // the maximum number of work items to return. If unspecified, the service may 11101 // choose an appropriate default, or may return an arbitrarily large number of 11102 // results. 11103 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) PageSize(pageSize int64) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11104 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11105 return c 11106 } 11107 11108 // PageToken sets the optional parameter "pageToken": If supplied, this should 11109 // be the value of next_page_token returned by an earlier call. This will cause 11110 // the next page of results to be returned. 11111 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) PageToken(pageToken string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11112 c.urlParams_.Set("pageToken", pageToken) 11113 return c 11114 } 11115 11116 // StartTime sets the optional parameter "startTime": Lower time bound of work 11117 // items to include, by start time. 11118 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) StartTime(startTime string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11119 c.urlParams_.Set("startTime", startTime) 11120 return c 11121 } 11122 11123 // Fields allows partial responses to be retrieved. See 11124 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11125 // details. 11126 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11127 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11128 return c 11129 } 11130 11131 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11132 // object's ETag matches the given value. This is useful for getting updates 11133 // only after the object has changed since the last request. 11134 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11135 c.ifNoneMatch_ = entityTag 11136 return c 11137 } 11138 11139 // Context sets the context to be used in this call's Do method. 11140 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Context(ctx context.Context) *ProjectsLocationsJobsStagesGetExecutionDetailsCall { 11141 c.ctx_ = ctx 11142 return c 11143 } 11144 11145 // Header returns a http.Header that can be modified by the caller to add 11146 // headers to the request. 11147 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Header() http.Header { 11148 if c.header_ == nil { 11149 c.header_ = make(http.Header) 11150 } 11151 return c.header_ 11152 } 11153 11154 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) doRequest(alt string) (*http.Response, error) { 11155 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11156 if c.ifNoneMatch_ != "" { 11157 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11158 } 11159 var body io.Reader = nil 11160 c.urlParams_.Set("alt", alt) 11161 c.urlParams_.Set("prettyPrint", "false") 11162 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/stages/{stageId}/executionDetails") 11163 urls += "?" + c.urlParams_.Encode() 11164 req, err := http.NewRequest("GET", urls, body) 11165 if err != nil { 11166 return nil, err 11167 } 11168 req.Header = reqHeaders 11169 googleapi.Expand(req.URL, map[string]string{ 11170 "projectId": c.projectId, 11171 "location": c.location, 11172 "jobId": c.jobId, 11173 "stageId": c.stageId, 11174 }) 11175 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11176 } 11177 11178 // Do executes the "dataflow.projects.locations.jobs.stages.getExecutionDetails" call. 11179 // Any non-2xx status code is an error. Response headers are in either 11180 // *StageExecutionDetails.ServerResponse.Header or (if a response was returned 11181 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11182 // check whether the returned error was because http.StatusNotModified was 11183 // returned. 11184 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Do(opts ...googleapi.CallOption) (*StageExecutionDetails, error) { 11185 gensupport.SetOptions(c.urlParams_, opts...) 11186 res, err := c.doRequest("json") 11187 if res != nil && res.StatusCode == http.StatusNotModified { 11188 if res.Body != nil { 11189 res.Body.Close() 11190 } 11191 return nil, gensupport.WrapError(&googleapi.Error{ 11192 Code: res.StatusCode, 11193 Header: res.Header, 11194 }) 11195 } 11196 if err != nil { 11197 return nil, err 11198 } 11199 defer googleapi.CloseBody(res) 11200 if err := googleapi.CheckResponse(res); err != nil { 11201 return nil, gensupport.WrapError(err) 11202 } 11203 ret := &StageExecutionDetails{ 11204 ServerResponse: googleapi.ServerResponse{ 11205 Header: res.Header, 11206 HTTPStatusCode: res.StatusCode, 11207 }, 11208 } 11209 target := &ret 11210 if err := gensupport.DecodeResponse(target, res); err != nil { 11211 return nil, err 11212 } 11213 return ret, nil 11214 } 11215 11216 // Pages invokes f for each page of results. 11217 // A non-nil error returned from f will halt the iteration. 11218 // The provided context supersedes any context provided to the Context method. 11219 func (c *ProjectsLocationsJobsStagesGetExecutionDetailsCall) Pages(ctx context.Context, f func(*StageExecutionDetails) error) error { 11220 c.ctx_ = ctx 11221 defer c.PageToken(c.urlParams_.Get("pageToken")) 11222 for { 11223 x, err := c.Do() 11224 if err != nil { 11225 return err 11226 } 11227 if err := f(x); err != nil { 11228 return err 11229 } 11230 if x.NextPageToken == "" { 11231 return nil 11232 } 11233 c.PageToken(x.NextPageToken) 11234 } 11235 } 11236 11237 type ProjectsLocationsJobsWorkItemsLeaseCall struct { 11238 s *Service 11239 projectId string 11240 location string 11241 jobId string 11242 leaseworkitemrequest *LeaseWorkItemRequest 11243 urlParams_ gensupport.URLParams 11244 ctx_ context.Context 11245 header_ http.Header 11246 } 11247 11248 // Lease: Leases a dataflow WorkItem to run. 11249 // 11250 // - jobId: Identifies the workflow job this worker belongs to. 11251 // - location: The [regional endpoint] 11252 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 11253 // contains the WorkItem's job. 11254 // - projectId: Identifies the project this worker belongs to. 11255 func (r *ProjectsLocationsJobsWorkItemsService) Lease(projectId string, location string, jobId string, leaseworkitemrequest *LeaseWorkItemRequest) *ProjectsLocationsJobsWorkItemsLeaseCall { 11256 c := &ProjectsLocationsJobsWorkItemsLeaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11257 c.projectId = projectId 11258 c.location = location 11259 c.jobId = jobId 11260 c.leaseworkitemrequest = leaseworkitemrequest 11261 return c 11262 } 11263 11264 // Fields allows partial responses to be retrieved. See 11265 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11266 // details. 11267 func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsLeaseCall { 11268 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11269 return c 11270 } 11271 11272 // Context sets the context to be used in this call's Do method. 11273 func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsLeaseCall { 11274 c.ctx_ = ctx 11275 return c 11276 } 11277 11278 // Header returns a http.Header that can be modified by the caller to add 11279 // headers to the request. 11280 func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Header() http.Header { 11281 if c.header_ == nil { 11282 c.header_ = make(http.Header) 11283 } 11284 return c.header_ 11285 } 11286 11287 func (c *ProjectsLocationsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) { 11288 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11289 var body io.Reader = nil 11290 body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest) 11291 if err != nil { 11292 return nil, err 11293 } 11294 c.urlParams_.Set("alt", alt) 11295 c.urlParams_.Set("prettyPrint", "false") 11296 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease") 11297 urls += "?" + c.urlParams_.Encode() 11298 req, err := http.NewRequest("POST", urls, body) 11299 if err != nil { 11300 return nil, err 11301 } 11302 req.Header = reqHeaders 11303 googleapi.Expand(req.URL, map[string]string{ 11304 "projectId": c.projectId, 11305 "location": c.location, 11306 "jobId": c.jobId, 11307 }) 11308 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11309 } 11310 11311 // Do executes the "dataflow.projects.locations.jobs.workItems.lease" call. 11312 // Any non-2xx status code is an error. Response headers are in either 11313 // *LeaseWorkItemResponse.ServerResponse.Header or (if a response was returned 11314 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11315 // check whether the returned error was because http.StatusNotModified was 11316 // returned. 11317 func (c *ProjectsLocationsJobsWorkItemsLeaseCall) Do(opts ...googleapi.CallOption) (*LeaseWorkItemResponse, error) { 11318 gensupport.SetOptions(c.urlParams_, opts...) 11319 res, err := c.doRequest("json") 11320 if res != nil && res.StatusCode == http.StatusNotModified { 11321 if res.Body != nil { 11322 res.Body.Close() 11323 } 11324 return nil, gensupport.WrapError(&googleapi.Error{ 11325 Code: res.StatusCode, 11326 Header: res.Header, 11327 }) 11328 } 11329 if err != nil { 11330 return nil, err 11331 } 11332 defer googleapi.CloseBody(res) 11333 if err := googleapi.CheckResponse(res); err != nil { 11334 return nil, gensupport.WrapError(err) 11335 } 11336 ret := &LeaseWorkItemResponse{ 11337 ServerResponse: googleapi.ServerResponse{ 11338 Header: res.Header, 11339 HTTPStatusCode: res.StatusCode, 11340 }, 11341 } 11342 target := &ret 11343 if err := gensupport.DecodeResponse(target, res); err != nil { 11344 return nil, err 11345 } 11346 return ret, nil 11347 } 11348 11349 type ProjectsLocationsJobsWorkItemsReportStatusCall struct { 11350 s *Service 11351 projectId string 11352 location string 11353 jobId string 11354 reportworkitemstatusrequest *ReportWorkItemStatusRequest 11355 urlParams_ gensupport.URLParams 11356 ctx_ context.Context 11357 header_ http.Header 11358 } 11359 11360 // ReportStatus: Reports the status of dataflow WorkItems leased by a worker. 11361 // 11362 // - jobId: The job which the WorkItem is part of. 11363 // - location: The [regional endpoint] 11364 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that 11365 // contains the WorkItem's job. 11366 // - projectId: The project which owns the WorkItem's job. 11367 func (r *ProjectsLocationsJobsWorkItemsService) ReportStatus(projectId string, location string, jobId string, reportworkitemstatusrequest *ReportWorkItemStatusRequest) *ProjectsLocationsJobsWorkItemsReportStatusCall { 11368 c := &ProjectsLocationsJobsWorkItemsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11369 c.projectId = projectId 11370 c.location = location 11371 c.jobId = jobId 11372 c.reportworkitemstatusrequest = reportworkitemstatusrequest 11373 return c 11374 } 11375 11376 // Fields allows partial responses to be retrieved. See 11377 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11378 // details. 11379 func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsWorkItemsReportStatusCall { 11380 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11381 return c 11382 } 11383 11384 // Context sets the context to be used in this call's Do method. 11385 func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsJobsWorkItemsReportStatusCall { 11386 c.ctx_ = ctx 11387 return c 11388 } 11389 11390 // Header returns a http.Header that can be modified by the caller to add 11391 // headers to the request. 11392 func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Header() http.Header { 11393 if c.header_ == nil { 11394 c.header_ = make(http.Header) 11395 } 11396 return c.header_ 11397 } 11398 11399 func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) { 11400 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11401 var body io.Reader = nil 11402 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest) 11403 if err != nil { 11404 return nil, err 11405 } 11406 c.urlParams_.Set("alt", alt) 11407 c.urlParams_.Set("prettyPrint", "false") 11408 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus") 11409 urls += "?" + c.urlParams_.Encode() 11410 req, err := http.NewRequest("POST", urls, body) 11411 if err != nil { 11412 return nil, err 11413 } 11414 req.Header = reqHeaders 11415 googleapi.Expand(req.URL, map[string]string{ 11416 "projectId": c.projectId, 11417 "location": c.location, 11418 "jobId": c.jobId, 11419 }) 11420 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11421 } 11422 11423 // Do executes the "dataflow.projects.locations.jobs.workItems.reportStatus" call. 11424 // Any non-2xx status code is an error. Response headers are in either 11425 // *ReportWorkItemStatusResponse.ServerResponse.Header or (if a response was 11426 // returned at all) in error.(*googleapi.Error).Header. Use 11427 // googleapi.IsNotModified to check whether the returned error was because 11428 // http.StatusNotModified was returned. 11429 func (c *ProjectsLocationsJobsWorkItemsReportStatusCall) Do(opts ...googleapi.CallOption) (*ReportWorkItemStatusResponse, error) { 11430 gensupport.SetOptions(c.urlParams_, opts...) 11431 res, err := c.doRequest("json") 11432 if res != nil && res.StatusCode == http.StatusNotModified { 11433 if res.Body != nil { 11434 res.Body.Close() 11435 } 11436 return nil, gensupport.WrapError(&googleapi.Error{ 11437 Code: res.StatusCode, 11438 Header: res.Header, 11439 }) 11440 } 11441 if err != nil { 11442 return nil, err 11443 } 11444 defer googleapi.CloseBody(res) 11445 if err := googleapi.CheckResponse(res); err != nil { 11446 return nil, gensupport.WrapError(err) 11447 } 11448 ret := &ReportWorkItemStatusResponse{ 11449 ServerResponse: googleapi.ServerResponse{ 11450 Header: res.Header, 11451 HTTPStatusCode: res.StatusCode, 11452 }, 11453 } 11454 target := &ret 11455 if err := gensupport.DecodeResponse(target, res); err != nil { 11456 return nil, err 11457 } 11458 return ret, nil 11459 } 11460 11461 type ProjectsLocationsSnapshotsDeleteCall struct { 11462 s *Service 11463 projectId string 11464 location string 11465 snapshotId string 11466 urlParams_ gensupport.URLParams 11467 ctx_ context.Context 11468 header_ http.Header 11469 } 11470 11471 // Delete: Deletes a snapshot. 11472 // 11473 // - location: The location that contains this snapshot. 11474 // - projectId: The ID of the Cloud Platform project that the snapshot belongs 11475 // to. 11476 // - snapshotId: The ID of the snapshot. 11477 func (r *ProjectsLocationsSnapshotsService) Delete(projectId string, location string, snapshotId string) *ProjectsLocationsSnapshotsDeleteCall { 11478 c := &ProjectsLocationsSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11479 c.projectId = projectId 11480 c.location = location 11481 c.snapshotId = snapshotId 11482 return c 11483 } 11484 11485 // Fields allows partial responses to be retrieved. See 11486 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11487 // details. 11488 func (c *ProjectsLocationsSnapshotsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSnapshotsDeleteCall { 11489 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11490 return c 11491 } 11492 11493 // Context sets the context to be used in this call's Do method. 11494 func (c *ProjectsLocationsSnapshotsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSnapshotsDeleteCall { 11495 c.ctx_ = ctx 11496 return c 11497 } 11498 11499 // Header returns a http.Header that can be modified by the caller to add 11500 // headers to the request. 11501 func (c *ProjectsLocationsSnapshotsDeleteCall) Header() http.Header { 11502 if c.header_ == nil { 11503 c.header_ = make(http.Header) 11504 } 11505 return c.header_ 11506 } 11507 11508 func (c *ProjectsLocationsSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { 11509 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11510 var body io.Reader = nil 11511 c.urlParams_.Set("alt", alt) 11512 c.urlParams_.Set("prettyPrint", "false") 11513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}") 11514 urls += "?" + c.urlParams_.Encode() 11515 req, err := http.NewRequest("DELETE", urls, body) 11516 if err != nil { 11517 return nil, err 11518 } 11519 req.Header = reqHeaders 11520 googleapi.Expand(req.URL, map[string]string{ 11521 "projectId": c.projectId, 11522 "location": c.location, 11523 "snapshotId": c.snapshotId, 11524 }) 11525 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11526 } 11527 11528 // Do executes the "dataflow.projects.locations.snapshots.delete" call. 11529 // Any non-2xx status code is an error. Response headers are in either 11530 // *DeleteSnapshotResponse.ServerResponse.Header or (if a response was returned 11531 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11532 // check whether the returned error was because http.StatusNotModified was 11533 // returned. 11534 func (c *ProjectsLocationsSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteSnapshotResponse, error) { 11535 gensupport.SetOptions(c.urlParams_, opts...) 11536 res, err := c.doRequest("json") 11537 if res != nil && res.StatusCode == http.StatusNotModified { 11538 if res.Body != nil { 11539 res.Body.Close() 11540 } 11541 return nil, gensupport.WrapError(&googleapi.Error{ 11542 Code: res.StatusCode, 11543 Header: res.Header, 11544 }) 11545 } 11546 if err != nil { 11547 return nil, err 11548 } 11549 defer googleapi.CloseBody(res) 11550 if err := googleapi.CheckResponse(res); err != nil { 11551 return nil, gensupport.WrapError(err) 11552 } 11553 ret := &DeleteSnapshotResponse{ 11554 ServerResponse: googleapi.ServerResponse{ 11555 Header: res.Header, 11556 HTTPStatusCode: res.StatusCode, 11557 }, 11558 } 11559 target := &ret 11560 if err := gensupport.DecodeResponse(target, res); err != nil { 11561 return nil, err 11562 } 11563 return ret, nil 11564 } 11565 11566 type ProjectsLocationsSnapshotsGetCall struct { 11567 s *Service 11568 projectId string 11569 location string 11570 snapshotId string 11571 urlParams_ gensupport.URLParams 11572 ifNoneMatch_ string 11573 ctx_ context.Context 11574 header_ http.Header 11575 } 11576 11577 // Get: Gets information about a snapshot. 11578 // 11579 // - location: The location that contains this snapshot. 11580 // - projectId: The ID of the Cloud Platform project that the snapshot belongs 11581 // to. 11582 // - snapshotId: The ID of the snapshot. 11583 func (r *ProjectsLocationsSnapshotsService) Get(projectId string, location string, snapshotId string) *ProjectsLocationsSnapshotsGetCall { 11584 c := &ProjectsLocationsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11585 c.projectId = projectId 11586 c.location = location 11587 c.snapshotId = snapshotId 11588 return c 11589 } 11590 11591 // Fields allows partial responses to be retrieved. See 11592 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11593 // details. 11594 func (c *ProjectsLocationsSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSnapshotsGetCall { 11595 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11596 return c 11597 } 11598 11599 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11600 // object's ETag matches the given value. This is useful for getting updates 11601 // only after the object has changed since the last request. 11602 func (c *ProjectsLocationsSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSnapshotsGetCall { 11603 c.ifNoneMatch_ = entityTag 11604 return c 11605 } 11606 11607 // Context sets the context to be used in this call's Do method. 11608 func (c *ProjectsLocationsSnapshotsGetCall) Context(ctx context.Context) *ProjectsLocationsSnapshotsGetCall { 11609 c.ctx_ = ctx 11610 return c 11611 } 11612 11613 // Header returns a http.Header that can be modified by the caller to add 11614 // headers to the request. 11615 func (c *ProjectsLocationsSnapshotsGetCall) Header() http.Header { 11616 if c.header_ == nil { 11617 c.header_ = make(http.Header) 11618 } 11619 return c.header_ 11620 } 11621 11622 func (c *ProjectsLocationsSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { 11623 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11624 if c.ifNoneMatch_ != "" { 11625 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11626 } 11627 var body io.Reader = nil 11628 c.urlParams_.Set("alt", alt) 11629 c.urlParams_.Set("prettyPrint", "false") 11630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/snapshots/{snapshotId}") 11631 urls += "?" + c.urlParams_.Encode() 11632 req, err := http.NewRequest("GET", urls, body) 11633 if err != nil { 11634 return nil, err 11635 } 11636 req.Header = reqHeaders 11637 googleapi.Expand(req.URL, map[string]string{ 11638 "projectId": c.projectId, 11639 "location": c.location, 11640 "snapshotId": c.snapshotId, 11641 }) 11642 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11643 } 11644 11645 // Do executes the "dataflow.projects.locations.snapshots.get" call. 11646 // Any non-2xx status code is an error. Response headers are in either 11647 // *Snapshot.ServerResponse.Header or (if a response was returned at all) in 11648 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11649 // whether the returned error was because http.StatusNotModified was returned. 11650 func (c *ProjectsLocationsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 11651 gensupport.SetOptions(c.urlParams_, opts...) 11652 res, err := c.doRequest("json") 11653 if res != nil && res.StatusCode == http.StatusNotModified { 11654 if res.Body != nil { 11655 res.Body.Close() 11656 } 11657 return nil, gensupport.WrapError(&googleapi.Error{ 11658 Code: res.StatusCode, 11659 Header: res.Header, 11660 }) 11661 } 11662 if err != nil { 11663 return nil, err 11664 } 11665 defer googleapi.CloseBody(res) 11666 if err := googleapi.CheckResponse(res); err != nil { 11667 return nil, gensupport.WrapError(err) 11668 } 11669 ret := &Snapshot{ 11670 ServerResponse: googleapi.ServerResponse{ 11671 Header: res.Header, 11672 HTTPStatusCode: res.StatusCode, 11673 }, 11674 } 11675 target := &ret 11676 if err := gensupport.DecodeResponse(target, res); err != nil { 11677 return nil, err 11678 } 11679 return ret, nil 11680 } 11681 11682 type ProjectsLocationsSnapshotsListCall struct { 11683 s *Service 11684 projectId string 11685 location string 11686 urlParams_ gensupport.URLParams 11687 ifNoneMatch_ string 11688 ctx_ context.Context 11689 header_ http.Header 11690 } 11691 11692 // List: Lists snapshots. 11693 // 11694 // - location: The location to list snapshots in. 11695 // - projectId: The project ID to list snapshots for. 11696 func (r *ProjectsLocationsSnapshotsService) List(projectId string, location string) *ProjectsLocationsSnapshotsListCall { 11697 c := &ProjectsLocationsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11698 c.projectId = projectId 11699 c.location = location 11700 return c 11701 } 11702 11703 // JobId sets the optional parameter "jobId": If specified, list snapshots 11704 // created from this job. 11705 func (c *ProjectsLocationsSnapshotsListCall) JobId(jobId string) *ProjectsLocationsSnapshotsListCall { 11706 c.urlParams_.Set("jobId", jobId) 11707 return c 11708 } 11709 11710 // Fields allows partial responses to be retrieved. See 11711 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11712 // details. 11713 func (c *ProjectsLocationsSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSnapshotsListCall { 11714 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11715 return c 11716 } 11717 11718 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11719 // object's ETag matches the given value. This is useful for getting updates 11720 // only after the object has changed since the last request. 11721 func (c *ProjectsLocationsSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSnapshotsListCall { 11722 c.ifNoneMatch_ = entityTag 11723 return c 11724 } 11725 11726 // Context sets the context to be used in this call's Do method. 11727 func (c *ProjectsLocationsSnapshotsListCall) Context(ctx context.Context) *ProjectsLocationsSnapshotsListCall { 11728 c.ctx_ = ctx 11729 return c 11730 } 11731 11732 // Header returns a http.Header that can be modified by the caller to add 11733 // headers to the request. 11734 func (c *ProjectsLocationsSnapshotsListCall) Header() http.Header { 11735 if c.header_ == nil { 11736 c.header_ = make(http.Header) 11737 } 11738 return c.header_ 11739 } 11740 11741 func (c *ProjectsLocationsSnapshotsListCall) doRequest(alt string) (*http.Response, error) { 11742 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11743 if c.ifNoneMatch_ != "" { 11744 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11745 } 11746 var body io.Reader = nil 11747 c.urlParams_.Set("alt", alt) 11748 c.urlParams_.Set("prettyPrint", "false") 11749 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/snapshots") 11750 urls += "?" + c.urlParams_.Encode() 11751 req, err := http.NewRequest("GET", urls, body) 11752 if err != nil { 11753 return nil, err 11754 } 11755 req.Header = reqHeaders 11756 googleapi.Expand(req.URL, map[string]string{ 11757 "projectId": c.projectId, 11758 "location": c.location, 11759 }) 11760 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11761 } 11762 11763 // Do executes the "dataflow.projects.locations.snapshots.list" call. 11764 // Any non-2xx status code is an error. Response headers are in either 11765 // *ListSnapshotsResponse.ServerResponse.Header or (if a response was returned 11766 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 11767 // check whether the returned error was because http.StatusNotModified was 11768 // returned. 11769 func (c *ProjectsLocationsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) { 11770 gensupport.SetOptions(c.urlParams_, opts...) 11771 res, err := c.doRequest("json") 11772 if res != nil && res.StatusCode == http.StatusNotModified { 11773 if res.Body != nil { 11774 res.Body.Close() 11775 } 11776 return nil, gensupport.WrapError(&googleapi.Error{ 11777 Code: res.StatusCode, 11778 Header: res.Header, 11779 }) 11780 } 11781 if err != nil { 11782 return nil, err 11783 } 11784 defer googleapi.CloseBody(res) 11785 if err := googleapi.CheckResponse(res); err != nil { 11786 return nil, gensupport.WrapError(err) 11787 } 11788 ret := &ListSnapshotsResponse{ 11789 ServerResponse: googleapi.ServerResponse{ 11790 Header: res.Header, 11791 HTTPStatusCode: res.StatusCode, 11792 }, 11793 } 11794 target := &ret 11795 if err := gensupport.DecodeResponse(target, res); err != nil { 11796 return nil, err 11797 } 11798 return ret, nil 11799 } 11800 11801 type ProjectsLocationsTemplatesCreateCall struct { 11802 s *Service 11803 projectId string 11804 location string 11805 createjobfromtemplaterequest *CreateJobFromTemplateRequest 11806 urlParams_ gensupport.URLParams 11807 ctx_ context.Context 11808 header_ http.Header 11809 } 11810 11811 // Create: Creates a Cloud Dataflow job from a template. Do not enter 11812 // confidential information when you supply string values using the API. 11813 // 11814 // - location: The [regional endpoint] 11815 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 11816 // which to direct the request. 11817 // - projectId: The ID of the Cloud Platform project that the job belongs to. 11818 func (r *ProjectsLocationsTemplatesService) Create(projectId string, location string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsLocationsTemplatesCreateCall { 11819 c := &ProjectsLocationsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11820 c.projectId = projectId 11821 c.location = location 11822 c.createjobfromtemplaterequest = createjobfromtemplaterequest 11823 return c 11824 } 11825 11826 // Fields allows partial responses to be retrieved. See 11827 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11828 // details. 11829 func (c *ProjectsLocationsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesCreateCall { 11830 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11831 return c 11832 } 11833 11834 // Context sets the context to be used in this call's Do method. 11835 func (c *ProjectsLocationsTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsTemplatesCreateCall { 11836 c.ctx_ = ctx 11837 return c 11838 } 11839 11840 // Header returns a http.Header that can be modified by the caller to add 11841 // headers to the request. 11842 func (c *ProjectsLocationsTemplatesCreateCall) Header() http.Header { 11843 if c.header_ == nil { 11844 c.header_ = make(http.Header) 11845 } 11846 return c.header_ 11847 } 11848 11849 func (c *ProjectsLocationsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 11850 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11851 var body io.Reader = nil 11852 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest) 11853 if err != nil { 11854 return nil, err 11855 } 11856 c.urlParams_.Set("alt", alt) 11857 c.urlParams_.Set("prettyPrint", "false") 11858 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates") 11859 urls += "?" + c.urlParams_.Encode() 11860 req, err := http.NewRequest("POST", urls, body) 11861 if err != nil { 11862 return nil, err 11863 } 11864 req.Header = reqHeaders 11865 googleapi.Expand(req.URL, map[string]string{ 11866 "projectId": c.projectId, 11867 "location": c.location, 11868 }) 11869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11870 } 11871 11872 // Do executes the "dataflow.projects.locations.templates.create" call. 11873 // Any non-2xx status code is an error. Response headers are in either 11874 // *Job.ServerResponse.Header or (if a response was returned at all) in 11875 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11876 // whether the returned error was because http.StatusNotModified was returned. 11877 func (c *ProjectsLocationsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 11878 gensupport.SetOptions(c.urlParams_, opts...) 11879 res, err := c.doRequest("json") 11880 if res != nil && res.StatusCode == http.StatusNotModified { 11881 if res.Body != nil { 11882 res.Body.Close() 11883 } 11884 return nil, gensupport.WrapError(&googleapi.Error{ 11885 Code: res.StatusCode, 11886 Header: res.Header, 11887 }) 11888 } 11889 if err != nil { 11890 return nil, err 11891 } 11892 defer googleapi.CloseBody(res) 11893 if err := googleapi.CheckResponse(res); err != nil { 11894 return nil, gensupport.WrapError(err) 11895 } 11896 ret := &Job{ 11897 ServerResponse: googleapi.ServerResponse{ 11898 Header: res.Header, 11899 HTTPStatusCode: res.StatusCode, 11900 }, 11901 } 11902 target := &ret 11903 if err := gensupport.DecodeResponse(target, res); err != nil { 11904 return nil, err 11905 } 11906 return ret, nil 11907 } 11908 11909 type ProjectsLocationsTemplatesGetCall struct { 11910 s *Service 11911 projectId string 11912 location string 11913 urlParams_ gensupport.URLParams 11914 ifNoneMatch_ string 11915 ctx_ context.Context 11916 header_ http.Header 11917 } 11918 11919 // Get: Get the template associated with a template. 11920 // 11921 // - location: The [regional endpoint] 11922 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 11923 // which to direct the request. 11924 // - projectId: The ID of the Cloud Platform project that the job belongs to. 11925 func (r *ProjectsLocationsTemplatesService) Get(projectId string, location string) *ProjectsLocationsTemplatesGetCall { 11926 c := &ProjectsLocationsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11927 c.projectId = projectId 11928 c.location = location 11929 return c 11930 } 11931 11932 // GcsPath sets the optional parameter "gcsPath": Required. A Cloud Storage 11933 // path to the template from which to create the job. Must be valid Cloud 11934 // Storage URL, beginning with 'gs://'. 11935 func (c *ProjectsLocationsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesGetCall { 11936 c.urlParams_.Set("gcsPath", gcsPath) 11937 return c 11938 } 11939 11940 // View sets the optional parameter "view": The view to retrieve. Defaults to 11941 // METADATA_ONLY. 11942 // 11943 // Possible values: 11944 // 11945 // "METADATA_ONLY" - Template view that retrieves only the metadata 11946 // 11947 // associated with the template. 11948 func (c *ProjectsLocationsTemplatesGetCall) View(view string) *ProjectsLocationsTemplatesGetCall { 11949 c.urlParams_.Set("view", view) 11950 return c 11951 } 11952 11953 // Fields allows partial responses to be retrieved. See 11954 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11955 // details. 11956 func (c *ProjectsLocationsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesGetCall { 11957 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11958 return c 11959 } 11960 11961 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11962 // object's ETag matches the given value. This is useful for getting updates 11963 // only after the object has changed since the last request. 11964 func (c *ProjectsLocationsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTemplatesGetCall { 11965 c.ifNoneMatch_ = entityTag 11966 return c 11967 } 11968 11969 // Context sets the context to be used in this call's Do method. 11970 func (c *ProjectsLocationsTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsTemplatesGetCall { 11971 c.ctx_ = ctx 11972 return c 11973 } 11974 11975 // Header returns a http.Header that can be modified by the caller to add 11976 // headers to the request. 11977 func (c *ProjectsLocationsTemplatesGetCall) Header() http.Header { 11978 if c.header_ == nil { 11979 c.header_ = make(http.Header) 11980 } 11981 return c.header_ 11982 } 11983 11984 func (c *ProjectsLocationsTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 11985 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11986 if c.ifNoneMatch_ != "" { 11987 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11988 } 11989 var body io.Reader = nil 11990 c.urlParams_.Set("alt", alt) 11991 c.urlParams_.Set("prettyPrint", "false") 11992 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:get") 11993 urls += "?" + c.urlParams_.Encode() 11994 req, err := http.NewRequest("GET", urls, body) 11995 if err != nil { 11996 return nil, err 11997 } 11998 req.Header = reqHeaders 11999 googleapi.Expand(req.URL, map[string]string{ 12000 "projectId": c.projectId, 12001 "location": c.location, 12002 }) 12003 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12004 } 12005 12006 // Do executes the "dataflow.projects.locations.templates.get" call. 12007 // Any non-2xx status code is an error. Response headers are in either 12008 // *GetTemplateResponse.ServerResponse.Header or (if a response was returned at 12009 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12010 // check whether the returned error was because http.StatusNotModified was 12011 // returned. 12012 func (c *ProjectsLocationsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) { 12013 gensupport.SetOptions(c.urlParams_, opts...) 12014 res, err := c.doRequest("json") 12015 if res != nil && res.StatusCode == http.StatusNotModified { 12016 if res.Body != nil { 12017 res.Body.Close() 12018 } 12019 return nil, gensupport.WrapError(&googleapi.Error{ 12020 Code: res.StatusCode, 12021 Header: res.Header, 12022 }) 12023 } 12024 if err != nil { 12025 return nil, err 12026 } 12027 defer googleapi.CloseBody(res) 12028 if err := googleapi.CheckResponse(res); err != nil { 12029 return nil, gensupport.WrapError(err) 12030 } 12031 ret := &GetTemplateResponse{ 12032 ServerResponse: googleapi.ServerResponse{ 12033 Header: res.Header, 12034 HTTPStatusCode: res.StatusCode, 12035 }, 12036 } 12037 target := &ret 12038 if err := gensupport.DecodeResponse(target, res); err != nil { 12039 return nil, err 12040 } 12041 return ret, nil 12042 } 12043 12044 type ProjectsLocationsTemplatesLaunchCall struct { 12045 s *Service 12046 projectId string 12047 location string 12048 launchtemplateparameters *LaunchTemplateParameters 12049 urlParams_ gensupport.URLParams 12050 ctx_ context.Context 12051 header_ http.Header 12052 } 12053 12054 // Launch: Launch a template. 12055 // 12056 // - location: The [regional endpoint] 12057 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 12058 // which to direct the request. 12059 // - projectId: The ID of the Cloud Platform project that the job belongs to. 12060 func (r *ProjectsLocationsTemplatesService) Launch(projectId string, location string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsLocationsTemplatesLaunchCall { 12061 c := &ProjectsLocationsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12062 c.projectId = projectId 12063 c.location = location 12064 c.launchtemplateparameters = launchtemplateparameters 12065 return c 12066 } 12067 12068 // DynamicTemplateGcsPath sets the optional parameter 12069 // "dynamicTemplate.gcsPath": Path to the dynamic template specification file 12070 // on Cloud Storage. The file must be a JSON serialized 12071 // `DynamicTemplateFileSpec` object. 12072 func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsLocationsTemplatesLaunchCall { 12073 c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath) 12074 return c 12075 } 12076 12077 // DynamicTemplateStagingLocation sets the optional parameter 12078 // "dynamicTemplate.stagingLocation": Cloud Storage path for staging 12079 // dependencies. Must be a valid Cloud Storage URL, beginning with `gs://`. 12080 func (c *ProjectsLocationsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsLocationsTemplatesLaunchCall { 12081 c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation) 12082 return c 12083 } 12084 12085 // GcsPath sets the optional parameter "gcsPath": A Cloud Storage path to the 12086 // template to use to create the job. Must be valid Cloud Storage URL, 12087 // beginning with `gs://`. 12088 func (c *ProjectsLocationsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsLocationsTemplatesLaunchCall { 12089 c.urlParams_.Set("gcsPath", gcsPath) 12090 return c 12091 } 12092 12093 // ValidateOnly sets the optional parameter "validateOnly": If true, the 12094 // request is validated but not actually executed. Defaults to false. 12095 func (c *ProjectsLocationsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTemplatesLaunchCall { 12096 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 12097 return c 12098 } 12099 12100 // Fields allows partial responses to be retrieved. See 12101 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12102 // details. 12103 func (c *ProjectsLocationsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTemplatesLaunchCall { 12104 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12105 return c 12106 } 12107 12108 // Context sets the context to be used in this call's Do method. 12109 func (c *ProjectsLocationsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsLocationsTemplatesLaunchCall { 12110 c.ctx_ = ctx 12111 return c 12112 } 12113 12114 // Header returns a http.Header that can be modified by the caller to add 12115 // headers to the request. 12116 func (c *ProjectsLocationsTemplatesLaunchCall) Header() http.Header { 12117 if c.header_ == nil { 12118 c.header_ = make(http.Header) 12119 } 12120 return c.header_ 12121 } 12122 12123 func (c *ProjectsLocationsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 12124 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12125 var body io.Reader = nil 12126 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters) 12127 if err != nil { 12128 return nil, err 12129 } 12130 c.urlParams_.Set("alt", alt) 12131 c.urlParams_.Set("prettyPrint", "false") 12132 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/locations/{location}/templates:launch") 12133 urls += "?" + c.urlParams_.Encode() 12134 req, err := http.NewRequest("POST", urls, body) 12135 if err != nil { 12136 return nil, err 12137 } 12138 req.Header = reqHeaders 12139 googleapi.Expand(req.URL, map[string]string{ 12140 "projectId": c.projectId, 12141 "location": c.location, 12142 }) 12143 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12144 } 12145 12146 // Do executes the "dataflow.projects.locations.templates.launch" call. 12147 // Any non-2xx status code is an error. Response headers are in either 12148 // *LaunchTemplateResponse.ServerResponse.Header or (if a response was returned 12149 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12150 // check whether the returned error was because http.StatusNotModified was 12151 // returned. 12152 func (c *ProjectsLocationsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) { 12153 gensupport.SetOptions(c.urlParams_, opts...) 12154 res, err := c.doRequest("json") 12155 if res != nil && res.StatusCode == http.StatusNotModified { 12156 if res.Body != nil { 12157 res.Body.Close() 12158 } 12159 return nil, gensupport.WrapError(&googleapi.Error{ 12160 Code: res.StatusCode, 12161 Header: res.Header, 12162 }) 12163 } 12164 if err != nil { 12165 return nil, err 12166 } 12167 defer googleapi.CloseBody(res) 12168 if err := googleapi.CheckResponse(res); err != nil { 12169 return nil, gensupport.WrapError(err) 12170 } 12171 ret := &LaunchTemplateResponse{ 12172 ServerResponse: googleapi.ServerResponse{ 12173 Header: res.Header, 12174 HTTPStatusCode: res.StatusCode, 12175 }, 12176 } 12177 target := &ret 12178 if err := gensupport.DecodeResponse(target, res); err != nil { 12179 return nil, err 12180 } 12181 return ret, nil 12182 } 12183 12184 type ProjectsSnapshotsGetCall struct { 12185 s *Service 12186 projectId string 12187 snapshotId string 12188 urlParams_ gensupport.URLParams 12189 ifNoneMatch_ string 12190 ctx_ context.Context 12191 header_ http.Header 12192 } 12193 12194 // Get: Gets information about a snapshot. 12195 // 12196 // - projectId: The ID of the Cloud Platform project that the snapshot belongs 12197 // to. 12198 // - snapshotId: The ID of the snapshot. 12199 func (r *ProjectsSnapshotsService) Get(projectId string, snapshotId string) *ProjectsSnapshotsGetCall { 12200 c := &ProjectsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12201 c.projectId = projectId 12202 c.snapshotId = snapshotId 12203 return c 12204 } 12205 12206 // Location sets the optional parameter "location": The location that contains 12207 // this snapshot. 12208 func (c *ProjectsSnapshotsGetCall) Location(location string) *ProjectsSnapshotsGetCall { 12209 c.urlParams_.Set("location", location) 12210 return c 12211 } 12212 12213 // Fields allows partial responses to be retrieved. See 12214 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12215 // details. 12216 func (c *ProjectsSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsGetCall { 12217 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12218 return c 12219 } 12220 12221 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12222 // object's ETag matches the given value. This is useful for getting updates 12223 // only after the object has changed since the last request. 12224 func (c *ProjectsSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsSnapshotsGetCall { 12225 c.ifNoneMatch_ = entityTag 12226 return c 12227 } 12228 12229 // Context sets the context to be used in this call's Do method. 12230 func (c *ProjectsSnapshotsGetCall) Context(ctx context.Context) *ProjectsSnapshotsGetCall { 12231 c.ctx_ = ctx 12232 return c 12233 } 12234 12235 // Header returns a http.Header that can be modified by the caller to add 12236 // headers to the request. 12237 func (c *ProjectsSnapshotsGetCall) Header() http.Header { 12238 if c.header_ == nil { 12239 c.header_ = make(http.Header) 12240 } 12241 return c.header_ 12242 } 12243 12244 func (c *ProjectsSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { 12245 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12246 if c.ifNoneMatch_ != "" { 12247 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12248 } 12249 var body io.Reader = nil 12250 c.urlParams_.Set("alt", alt) 12251 c.urlParams_.Set("prettyPrint", "false") 12252 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/snapshots/{snapshotId}") 12253 urls += "?" + c.urlParams_.Encode() 12254 req, err := http.NewRequest("GET", urls, body) 12255 if err != nil { 12256 return nil, err 12257 } 12258 req.Header = reqHeaders 12259 googleapi.Expand(req.URL, map[string]string{ 12260 "projectId": c.projectId, 12261 "snapshotId": c.snapshotId, 12262 }) 12263 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12264 } 12265 12266 // Do executes the "dataflow.projects.snapshots.get" call. 12267 // Any non-2xx status code is an error. Response headers are in either 12268 // *Snapshot.ServerResponse.Header or (if a response was returned at all) in 12269 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12270 // whether the returned error was because http.StatusNotModified was returned. 12271 func (c *ProjectsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) { 12272 gensupport.SetOptions(c.urlParams_, opts...) 12273 res, err := c.doRequest("json") 12274 if res != nil && res.StatusCode == http.StatusNotModified { 12275 if res.Body != nil { 12276 res.Body.Close() 12277 } 12278 return nil, gensupport.WrapError(&googleapi.Error{ 12279 Code: res.StatusCode, 12280 Header: res.Header, 12281 }) 12282 } 12283 if err != nil { 12284 return nil, err 12285 } 12286 defer googleapi.CloseBody(res) 12287 if err := googleapi.CheckResponse(res); err != nil { 12288 return nil, gensupport.WrapError(err) 12289 } 12290 ret := &Snapshot{ 12291 ServerResponse: googleapi.ServerResponse{ 12292 Header: res.Header, 12293 HTTPStatusCode: res.StatusCode, 12294 }, 12295 } 12296 target := &ret 12297 if err := gensupport.DecodeResponse(target, res); err != nil { 12298 return nil, err 12299 } 12300 return ret, nil 12301 } 12302 12303 type ProjectsSnapshotsListCall struct { 12304 s *Service 12305 projectId string 12306 urlParams_ gensupport.URLParams 12307 ifNoneMatch_ string 12308 ctx_ context.Context 12309 header_ http.Header 12310 } 12311 12312 // List: Lists snapshots. 12313 // 12314 // - projectId: The project ID to list snapshots for. 12315 func (r *ProjectsSnapshotsService) List(projectId string) *ProjectsSnapshotsListCall { 12316 c := &ProjectsSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12317 c.projectId = projectId 12318 return c 12319 } 12320 12321 // JobId sets the optional parameter "jobId": If specified, list snapshots 12322 // created from this job. 12323 func (c *ProjectsSnapshotsListCall) JobId(jobId string) *ProjectsSnapshotsListCall { 12324 c.urlParams_.Set("jobId", jobId) 12325 return c 12326 } 12327 12328 // Location sets the optional parameter "location": The location to list 12329 // snapshots in. 12330 func (c *ProjectsSnapshotsListCall) Location(location string) *ProjectsSnapshotsListCall { 12331 c.urlParams_.Set("location", location) 12332 return c 12333 } 12334 12335 // Fields allows partial responses to be retrieved. See 12336 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12337 // details. 12338 func (c *ProjectsSnapshotsListCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsListCall { 12339 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12340 return c 12341 } 12342 12343 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12344 // object's ETag matches the given value. This is useful for getting updates 12345 // only after the object has changed since the last request. 12346 func (c *ProjectsSnapshotsListCall) IfNoneMatch(entityTag string) *ProjectsSnapshotsListCall { 12347 c.ifNoneMatch_ = entityTag 12348 return c 12349 } 12350 12351 // Context sets the context to be used in this call's Do method. 12352 func (c *ProjectsSnapshotsListCall) Context(ctx context.Context) *ProjectsSnapshotsListCall { 12353 c.ctx_ = ctx 12354 return c 12355 } 12356 12357 // Header returns a http.Header that can be modified by the caller to add 12358 // headers to the request. 12359 func (c *ProjectsSnapshotsListCall) Header() http.Header { 12360 if c.header_ == nil { 12361 c.header_ = make(http.Header) 12362 } 12363 return c.header_ 12364 } 12365 12366 func (c *ProjectsSnapshotsListCall) doRequest(alt string) (*http.Response, error) { 12367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12368 if c.ifNoneMatch_ != "" { 12369 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12370 } 12371 var body io.Reader = nil 12372 c.urlParams_.Set("alt", alt) 12373 c.urlParams_.Set("prettyPrint", "false") 12374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/snapshots") 12375 urls += "?" + c.urlParams_.Encode() 12376 req, err := http.NewRequest("GET", urls, body) 12377 if err != nil { 12378 return nil, err 12379 } 12380 req.Header = reqHeaders 12381 googleapi.Expand(req.URL, map[string]string{ 12382 "projectId": c.projectId, 12383 }) 12384 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12385 } 12386 12387 // Do executes the "dataflow.projects.snapshots.list" call. 12388 // Any non-2xx status code is an error. Response headers are in either 12389 // *ListSnapshotsResponse.ServerResponse.Header or (if a response was returned 12390 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12391 // check whether the returned error was because http.StatusNotModified was 12392 // returned. 12393 func (c *ProjectsSnapshotsListCall) Do(opts ...googleapi.CallOption) (*ListSnapshotsResponse, error) { 12394 gensupport.SetOptions(c.urlParams_, opts...) 12395 res, err := c.doRequest("json") 12396 if res != nil && res.StatusCode == http.StatusNotModified { 12397 if res.Body != nil { 12398 res.Body.Close() 12399 } 12400 return nil, gensupport.WrapError(&googleapi.Error{ 12401 Code: res.StatusCode, 12402 Header: res.Header, 12403 }) 12404 } 12405 if err != nil { 12406 return nil, err 12407 } 12408 defer googleapi.CloseBody(res) 12409 if err := googleapi.CheckResponse(res); err != nil { 12410 return nil, gensupport.WrapError(err) 12411 } 12412 ret := &ListSnapshotsResponse{ 12413 ServerResponse: googleapi.ServerResponse{ 12414 Header: res.Header, 12415 HTTPStatusCode: res.StatusCode, 12416 }, 12417 } 12418 target := &ret 12419 if err := gensupport.DecodeResponse(target, res); err != nil { 12420 return nil, err 12421 } 12422 return ret, nil 12423 } 12424 12425 type ProjectsTemplatesCreateCall struct { 12426 s *Service 12427 projectId string 12428 createjobfromtemplaterequest *CreateJobFromTemplateRequest 12429 urlParams_ gensupport.URLParams 12430 ctx_ context.Context 12431 header_ http.Header 12432 } 12433 12434 // Create: Creates a Cloud Dataflow job from a template. Do not enter 12435 // confidential information when you supply string values using the API. 12436 // 12437 // - projectId: The ID of the Cloud Platform project that the job belongs to. 12438 func (r *ProjectsTemplatesService) Create(projectId string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsTemplatesCreateCall { 12439 c := &ProjectsTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12440 c.projectId = projectId 12441 c.createjobfromtemplaterequest = createjobfromtemplaterequest 12442 return c 12443 } 12444 12445 // Fields allows partial responses to be retrieved. See 12446 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12447 // details. 12448 func (c *ProjectsTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsTemplatesCreateCall { 12449 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12450 return c 12451 } 12452 12453 // Context sets the context to be used in this call's Do method. 12454 func (c *ProjectsTemplatesCreateCall) Context(ctx context.Context) *ProjectsTemplatesCreateCall { 12455 c.ctx_ = ctx 12456 return c 12457 } 12458 12459 // Header returns a http.Header that can be modified by the caller to add 12460 // headers to the request. 12461 func (c *ProjectsTemplatesCreateCall) Header() http.Header { 12462 if c.header_ == nil { 12463 c.header_ = make(http.Header) 12464 } 12465 return c.header_ 12466 } 12467 12468 func (c *ProjectsTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { 12469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12470 var body io.Reader = nil 12471 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobfromtemplaterequest) 12472 if err != nil { 12473 return nil, err 12474 } 12475 c.urlParams_.Set("alt", alt) 12476 c.urlParams_.Set("prettyPrint", "false") 12477 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates") 12478 urls += "?" + c.urlParams_.Encode() 12479 req, err := http.NewRequest("POST", urls, body) 12480 if err != nil { 12481 return nil, err 12482 } 12483 req.Header = reqHeaders 12484 googleapi.Expand(req.URL, map[string]string{ 12485 "projectId": c.projectId, 12486 }) 12487 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12488 } 12489 12490 // Do executes the "dataflow.projects.templates.create" call. 12491 // Any non-2xx status code is an error. Response headers are in either 12492 // *Job.ServerResponse.Header or (if a response was returned at all) in 12493 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12494 // whether the returned error was because http.StatusNotModified was returned. 12495 func (c *ProjectsTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 12496 gensupport.SetOptions(c.urlParams_, opts...) 12497 res, err := c.doRequest("json") 12498 if res != nil && res.StatusCode == http.StatusNotModified { 12499 if res.Body != nil { 12500 res.Body.Close() 12501 } 12502 return nil, gensupport.WrapError(&googleapi.Error{ 12503 Code: res.StatusCode, 12504 Header: res.Header, 12505 }) 12506 } 12507 if err != nil { 12508 return nil, err 12509 } 12510 defer googleapi.CloseBody(res) 12511 if err := googleapi.CheckResponse(res); err != nil { 12512 return nil, gensupport.WrapError(err) 12513 } 12514 ret := &Job{ 12515 ServerResponse: googleapi.ServerResponse{ 12516 Header: res.Header, 12517 HTTPStatusCode: res.StatusCode, 12518 }, 12519 } 12520 target := &ret 12521 if err := gensupport.DecodeResponse(target, res); err != nil { 12522 return nil, err 12523 } 12524 return ret, nil 12525 } 12526 12527 type ProjectsTemplatesGetCall struct { 12528 s *Service 12529 projectId string 12530 urlParams_ gensupport.URLParams 12531 ifNoneMatch_ string 12532 ctx_ context.Context 12533 header_ http.Header 12534 } 12535 12536 // Get: Get the template associated with a template. 12537 // 12538 // - projectId: The ID of the Cloud Platform project that the job belongs to. 12539 func (r *ProjectsTemplatesService) Get(projectId string) *ProjectsTemplatesGetCall { 12540 c := &ProjectsTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12541 c.projectId = projectId 12542 return c 12543 } 12544 12545 // GcsPath sets the optional parameter "gcsPath": Required. A Cloud Storage 12546 // path to the template from which to create the job. Must be valid Cloud 12547 // Storage URL, beginning with 'gs://'. 12548 func (c *ProjectsTemplatesGetCall) GcsPath(gcsPath string) *ProjectsTemplatesGetCall { 12549 c.urlParams_.Set("gcsPath", gcsPath) 12550 return c 12551 } 12552 12553 // Location sets the optional parameter "location": The [regional endpoint] 12554 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 12555 // which to direct the request. 12556 func (c *ProjectsTemplatesGetCall) Location(location string) *ProjectsTemplatesGetCall { 12557 c.urlParams_.Set("location", location) 12558 return c 12559 } 12560 12561 // View sets the optional parameter "view": The view to retrieve. Defaults to 12562 // METADATA_ONLY. 12563 // 12564 // Possible values: 12565 // 12566 // "METADATA_ONLY" - Template view that retrieves only the metadata 12567 // 12568 // associated with the template. 12569 func (c *ProjectsTemplatesGetCall) View(view string) *ProjectsTemplatesGetCall { 12570 c.urlParams_.Set("view", view) 12571 return c 12572 } 12573 12574 // Fields allows partial responses to be retrieved. See 12575 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12576 // details. 12577 func (c *ProjectsTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsTemplatesGetCall { 12578 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12579 return c 12580 } 12581 12582 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12583 // object's ETag matches the given value. This is useful for getting updates 12584 // only after the object has changed since the last request. 12585 func (c *ProjectsTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsTemplatesGetCall { 12586 c.ifNoneMatch_ = entityTag 12587 return c 12588 } 12589 12590 // Context sets the context to be used in this call's Do method. 12591 func (c *ProjectsTemplatesGetCall) Context(ctx context.Context) *ProjectsTemplatesGetCall { 12592 c.ctx_ = ctx 12593 return c 12594 } 12595 12596 // Header returns a http.Header that can be modified by the caller to add 12597 // headers to the request. 12598 func (c *ProjectsTemplatesGetCall) Header() http.Header { 12599 if c.header_ == nil { 12600 c.header_ = make(http.Header) 12601 } 12602 return c.header_ 12603 } 12604 12605 func (c *ProjectsTemplatesGetCall) doRequest(alt string) (*http.Response, error) { 12606 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12607 if c.ifNoneMatch_ != "" { 12608 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12609 } 12610 var body io.Reader = nil 12611 c.urlParams_.Set("alt", alt) 12612 c.urlParams_.Set("prettyPrint", "false") 12613 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:get") 12614 urls += "?" + c.urlParams_.Encode() 12615 req, err := http.NewRequest("GET", urls, body) 12616 if err != nil { 12617 return nil, err 12618 } 12619 req.Header = reqHeaders 12620 googleapi.Expand(req.URL, map[string]string{ 12621 "projectId": c.projectId, 12622 }) 12623 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12624 } 12625 12626 // Do executes the "dataflow.projects.templates.get" call. 12627 // Any non-2xx status code is an error. Response headers are in either 12628 // *GetTemplateResponse.ServerResponse.Header or (if a response was returned at 12629 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12630 // check whether the returned error was because http.StatusNotModified was 12631 // returned. 12632 func (c *ProjectsTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GetTemplateResponse, error) { 12633 gensupport.SetOptions(c.urlParams_, opts...) 12634 res, err := c.doRequest("json") 12635 if res != nil && res.StatusCode == http.StatusNotModified { 12636 if res.Body != nil { 12637 res.Body.Close() 12638 } 12639 return nil, gensupport.WrapError(&googleapi.Error{ 12640 Code: res.StatusCode, 12641 Header: res.Header, 12642 }) 12643 } 12644 if err != nil { 12645 return nil, err 12646 } 12647 defer googleapi.CloseBody(res) 12648 if err := googleapi.CheckResponse(res); err != nil { 12649 return nil, gensupport.WrapError(err) 12650 } 12651 ret := &GetTemplateResponse{ 12652 ServerResponse: googleapi.ServerResponse{ 12653 Header: res.Header, 12654 HTTPStatusCode: res.StatusCode, 12655 }, 12656 } 12657 target := &ret 12658 if err := gensupport.DecodeResponse(target, res); err != nil { 12659 return nil, err 12660 } 12661 return ret, nil 12662 } 12663 12664 type ProjectsTemplatesLaunchCall struct { 12665 s *Service 12666 projectId string 12667 launchtemplateparameters *LaunchTemplateParameters 12668 urlParams_ gensupport.URLParams 12669 ctx_ context.Context 12670 header_ http.Header 12671 } 12672 12673 // Launch: Launch a template. 12674 // 12675 // - projectId: The ID of the Cloud Platform project that the job belongs to. 12676 func (r *ProjectsTemplatesService) Launch(projectId string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsTemplatesLaunchCall { 12677 c := &ProjectsTemplatesLaunchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12678 c.projectId = projectId 12679 c.launchtemplateparameters = launchtemplateparameters 12680 return c 12681 } 12682 12683 // DynamicTemplateGcsPath sets the optional parameter 12684 // "dynamicTemplate.gcsPath": Path to the dynamic template specification file 12685 // on Cloud Storage. The file must be a JSON serialized 12686 // `DynamicTemplateFileSpec` object. 12687 func (c *ProjectsTemplatesLaunchCall) DynamicTemplateGcsPath(dynamicTemplateGcsPath string) *ProjectsTemplatesLaunchCall { 12688 c.urlParams_.Set("dynamicTemplate.gcsPath", dynamicTemplateGcsPath) 12689 return c 12690 } 12691 12692 // DynamicTemplateStagingLocation sets the optional parameter 12693 // "dynamicTemplate.stagingLocation": Cloud Storage path for staging 12694 // dependencies. Must be a valid Cloud Storage URL, beginning with `gs://`. 12695 func (c *ProjectsTemplatesLaunchCall) DynamicTemplateStagingLocation(dynamicTemplateStagingLocation string) *ProjectsTemplatesLaunchCall { 12696 c.urlParams_.Set("dynamicTemplate.stagingLocation", dynamicTemplateStagingLocation) 12697 return c 12698 } 12699 12700 // GcsPath sets the optional parameter "gcsPath": A Cloud Storage path to the 12701 // template to use to create the job. Must be valid Cloud Storage URL, 12702 // beginning with `gs://`. 12703 func (c *ProjectsTemplatesLaunchCall) GcsPath(gcsPath string) *ProjectsTemplatesLaunchCall { 12704 c.urlParams_.Set("gcsPath", gcsPath) 12705 return c 12706 } 12707 12708 // Location sets the optional parameter "location": The [regional endpoint] 12709 // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to 12710 // which to direct the request. 12711 func (c *ProjectsTemplatesLaunchCall) Location(location string) *ProjectsTemplatesLaunchCall { 12712 c.urlParams_.Set("location", location) 12713 return c 12714 } 12715 12716 // ValidateOnly sets the optional parameter "validateOnly": If true, the 12717 // request is validated but not actually executed. Defaults to false. 12718 func (c *ProjectsTemplatesLaunchCall) ValidateOnly(validateOnly bool) *ProjectsTemplatesLaunchCall { 12719 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 12720 return c 12721 } 12722 12723 // Fields allows partial responses to be retrieved. See 12724 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12725 // details. 12726 func (c *ProjectsTemplatesLaunchCall) Fields(s ...googleapi.Field) *ProjectsTemplatesLaunchCall { 12727 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12728 return c 12729 } 12730 12731 // Context sets the context to be used in this call's Do method. 12732 func (c *ProjectsTemplatesLaunchCall) Context(ctx context.Context) *ProjectsTemplatesLaunchCall { 12733 c.ctx_ = ctx 12734 return c 12735 } 12736 12737 // Header returns a http.Header that can be modified by the caller to add 12738 // headers to the request. 12739 func (c *ProjectsTemplatesLaunchCall) Header() http.Header { 12740 if c.header_ == nil { 12741 c.header_ = make(http.Header) 12742 } 12743 return c.header_ 12744 } 12745 12746 func (c *ProjectsTemplatesLaunchCall) doRequest(alt string) (*http.Response, error) { 12747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12748 var body io.Reader = nil 12749 body, err := googleapi.WithoutDataWrapper.JSONReader(c.launchtemplateparameters) 12750 if err != nil { 12751 return nil, err 12752 } 12753 c.urlParams_.Set("alt", alt) 12754 c.urlParams_.Set("prettyPrint", "false") 12755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1b3/projects/{projectId}/templates:launch") 12756 urls += "?" + c.urlParams_.Encode() 12757 req, err := http.NewRequest("POST", urls, body) 12758 if err != nil { 12759 return nil, err 12760 } 12761 req.Header = reqHeaders 12762 googleapi.Expand(req.URL, map[string]string{ 12763 "projectId": c.projectId, 12764 }) 12765 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12766 } 12767 12768 // Do executes the "dataflow.projects.templates.launch" call. 12769 // Any non-2xx status code is an error. Response headers are in either 12770 // *LaunchTemplateResponse.ServerResponse.Header or (if a response was returned 12771 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12772 // check whether the returned error was because http.StatusNotModified was 12773 // returned. 12774 func (c *ProjectsTemplatesLaunchCall) Do(opts ...googleapi.CallOption) (*LaunchTemplateResponse, error) { 12775 gensupport.SetOptions(c.urlParams_, opts...) 12776 res, err := c.doRequest("json") 12777 if res != nil && res.StatusCode == http.StatusNotModified { 12778 if res.Body != nil { 12779 res.Body.Close() 12780 } 12781 return nil, gensupport.WrapError(&googleapi.Error{ 12782 Code: res.StatusCode, 12783 Header: res.Header, 12784 }) 12785 } 12786 if err != nil { 12787 return nil, err 12788 } 12789 defer googleapi.CloseBody(res) 12790 if err := googleapi.CheckResponse(res); err != nil { 12791 return nil, gensupport.WrapError(err) 12792 } 12793 ret := &LaunchTemplateResponse{ 12794 ServerResponse: googleapi.ServerResponse{ 12795 Header: res.Header, 12796 HTTPStatusCode: res.StatusCode, 12797 }, 12798 } 12799 target := &ret 12800 if err := gensupport.DecodeResponse(target, res); err != nil { 12801 return nil, err 12802 } 12803 return ret, nil 12804 } 12805