forked from distribution/distribution
/
dataflow-gen.go
4050 lines (3508 loc) · 152 KB
/
dataflow-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package dataflow provides access to the Google Dataflow API.
//
// See https://cloud.google.com/dataflow
//
// Usage example:
//
// import "google.golang.org/api/dataflow/v1b3"
// ...
// dataflowService, err := dataflow.New(oauthHttpClient)
package dataflow // import "google.golang.org/api/dataflow/v1b3"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"google.golang.org/api/internal"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = internal.MarshalJSON
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "dataflow:v1b3"
const apiName = "dataflow"
const apiVersion = "v1b3"
const basePath = "https://dataflow.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// View your email address
UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.email"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Jobs = NewProjectsJobsService(s)
return rs
}
type ProjectsService struct {
s *Service
Jobs *ProjectsJobsService
}
func NewProjectsJobsService(s *Service) *ProjectsJobsService {
rs := &ProjectsJobsService{s: s}
rs.Messages = NewProjectsJobsMessagesService(s)
rs.WorkItems = NewProjectsJobsWorkItemsService(s)
return rs
}
type ProjectsJobsService struct {
s *Service
Messages *ProjectsJobsMessagesService
WorkItems *ProjectsJobsWorkItemsService
}
func NewProjectsJobsMessagesService(s *Service) *ProjectsJobsMessagesService {
rs := &ProjectsJobsMessagesService{s: s}
return rs
}
type ProjectsJobsMessagesService struct {
s *Service
}
func NewProjectsJobsWorkItemsService(s *Service) *ProjectsJobsWorkItemsService {
rs := &ProjectsJobsWorkItemsService{s: s}
return rs
}
type ProjectsJobsWorkItemsService struct {
s *Service
}
// ApproximateProgress: A progress measurement of a WorkItem by a
// worker.
type ApproximateProgress struct {
// PercentComplete: Completion as percentage of the work, from 0.0
// (beginning, nothing complete), to 1.0 (end of the work range, entire
// WorkItem complete).
PercentComplete float64 `json:"percentComplete,omitempty"`
// Position: A Position within the work to represent a progress.
Position *Position `json:"position,omitempty"`
// RemainingTime: Completion as an estimated time remaining.
RemainingTime string `json:"remainingTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "PercentComplete") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ApproximateProgress) MarshalJSON() ([]byte, error) {
type noMethod ApproximateProgress
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// AutoscalingSettings: Settings for WorkerPool autoscaling.
type AutoscalingSettings struct {
// Algorithm: The algorithm to use for autoscaling.
//
// Possible values:
// "AUTOSCALING_ALGORITHM_UNKNOWN"
// "AUTOSCALING_ALGORITHM_NONE"
// "AUTOSCALING_ALGORITHM_BASIC"
Algorithm string `json:"algorithm,omitempty"`
// MaxNumWorkers: The maximum number of workers to cap scaling at.
MaxNumWorkers int64 `json:"maxNumWorkers,omitempty"`
// ForceSendFields is a list of field names (e.g. "Algorithm") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AutoscalingSettings) MarshalJSON() ([]byte, error) {
type noMethod AutoscalingSettings
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ComputationTopology: All configuration data for a particular
// Computation.
type ComputationTopology struct {
// ComputationId: The ID of the computation.
ComputationId string `json:"computationId,omitempty"`
// Inputs: The inputs to the computation.
Inputs []*StreamLocation `json:"inputs,omitempty"`
// KeyRanges: The key ranges processed by the computation.
KeyRanges []*KeyRangeLocation `json:"keyRanges,omitempty"`
// Outputs: The outputs from the computation.
Outputs []*StreamLocation `json:"outputs,omitempty"`
// StateFamilies: The state family values.
StateFamilies []*StateFamilyConfig `json:"stateFamilies,omitempty"`
// SystemStageName: The system stage name.
SystemStageName string `json:"systemStageName,omitempty"`
// UserStageName: The user stage name.
UserStageName string `json:"userStageName,omitempty"`
// ForceSendFields is a list of field names (e.g. "ComputationId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ComputationTopology) MarshalJSON() ([]byte, error) {
type noMethod ComputationTopology
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ConcatPosition: A position that encapsulates an inner position and an
// index for the inner position. A ConcatPosition can be used by a
// reader of a source that encapsulates a set of other sources.
type ConcatPosition struct {
// Index: Index of the inner source.
Index int64 `json:"index,omitempty"`
// Position: Position within the inner source.
Position *Position `json:"position,omitempty"`
// ForceSendFields is a list of field names (e.g. "Index") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ConcatPosition) MarshalJSON() ([]byte, error) {
type noMethod ConcatPosition
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// CustomSourceLocation: Identifies the location of a custom souce.
type CustomSourceLocation struct {
// Stateful: Whether this source is stateful.
Stateful bool `json:"stateful,omitempty"`
// ForceSendFields is a list of field names (e.g. "Stateful") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *CustomSourceLocation) MarshalJSON() ([]byte, error) {
type noMethod CustomSourceLocation
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// DataDiskAssignment: Data disk assignment for a given VM instance.
type DataDiskAssignment struct {
// DataDisks: Mounted data disks. The order is important a data disk's
// 0-based index in this list defines which persistent directory the
// disk is mounted to, for example the list of {
// "myproject-1014-104817-4c2-harness-0-disk-0" }, {
// "myproject-1014-104817-4c2-harness-0-disk-1" }.
DataDisks []string `json:"dataDisks,omitempty"`
// VmInstance: VM instance name the data disks mounted to, for example
// "myproject-1014-104817-4c2-harness-0".
VmInstance string `json:"vmInstance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DataDisks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *DataDiskAssignment) MarshalJSON() ([]byte, error) {
type noMethod DataDiskAssignment
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// DerivedSource: Specification of one of the bundles produced as a
// result of splitting a Source (e.g. when executing a
// SourceSplitRequest, or when splitting an active task using
// WorkItemStatus.dynamic_source_split), relative to the source being
// split.
type DerivedSource struct {
// DerivationMode: What source to base the produced source on (if any).
//
// Possible values:
// "SOURCE_DERIVATION_MODE_UNKNOWN"
// "SOURCE_DERIVATION_MODE_INDEPENDENT"
// "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT"
// "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT"
DerivationMode string `json:"derivationMode,omitempty"`
// Source: Specification of the source.
Source *Source `json:"source,omitempty"`
// ForceSendFields is a list of field names (e.g. "DerivationMode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *DerivedSource) MarshalJSON() ([]byte, error) {
type noMethod DerivedSource
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Disk: Describes the data disk used by a workflow job.
type Disk struct {
// DiskType: Disk storage type, as defined by Google Compute Engine.
// This must be a disk type appropriate to the project and zone in which
// the workers will run. If unknown or unspecified, the service will
// attempt to choose a reasonable default. For example, the standard
// persistent disk type is a resource name typically ending in
// "pd-standard". If SSD persistent disks are available, the resource
// name typically ends with "pd-ssd". The actual valid values are
// defined the Google Compute Engine API, not by the Dataflow API;
// consult the Google Compute Engine documentation for more information
// about determining the set of available disk types for a particular
// project and zone. Google Compute Engine Disk types are local to a
// particular project in a particular zone, and so the resource name
// will typically look something like this:
// compute.googleapis.com/projects/
// /zones//diskTypes/pd-standard
DiskType string `json:"diskType,omitempty"`
// MountPoint: Directory in a VM where disk is mounted.
MountPoint string `json:"mountPoint,omitempty"`
// SizeGb: Size of disk in GB. If zero or unspecified, the service will
// attempt to choose a reasonable default.
SizeGb int64 `json:"sizeGb,omitempty"`
// ForceSendFields is a list of field names (e.g. "DiskType") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Disk) MarshalJSON() ([]byte, error) {
type noMethod Disk
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// DynamicSourceSplit: When a task splits using
// WorkItemStatus.dynamic_source_split, this message describes the two
// parts of the split relative to the description of the current task's
// input.
type DynamicSourceSplit struct {
// Primary: Primary part (continued to be processed by worker).
// Specified relative to the previously-current source. Becomes current.
Primary *DerivedSource `json:"primary,omitempty"`
// Residual: Residual part (returned to the pool of work). Specified
// relative to the previously-current source.
Residual *DerivedSource `json:"residual,omitempty"`
// ForceSendFields is a list of field names (e.g. "Primary") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *DynamicSourceSplit) MarshalJSON() ([]byte, error) {
type noMethod DynamicSourceSplit
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// Environment: Describes the environment in which a Dataflow Job runs.
type Environment struct {
// ClusterManagerApiService: The type of cluster manager API to use. If
// unknown or unspecified, the service will attempt to choose a
// reasonable default. This should be in the form of the API service
// name, e.g. "compute.googleapis.com".
ClusterManagerApiService string `json:"clusterManagerApiService,omitempty"`
// Dataset: The dataset for the current project where various workflow
// related tables are stored. The supported resource type is: Google
// BigQuery: bigquery.googleapis.com/{dataset}
Dataset string `json:"dataset,omitempty"`
// Experiments: The list of experiments to enable.
Experiments []string `json:"experiments,omitempty"`
// InternalExperiments: Experimental settings.
InternalExperiments EnvironmentInternalExperiments `json:"internalExperiments,omitempty"`
// SdkPipelineOptions: The Dataflow SDK pipeline options specified by
// the user. These options are passed through the service and are used
// to recreate the SDK pipeline options on the worker in a language
// agnostic and platform independent way.
SdkPipelineOptions EnvironmentSdkPipelineOptions `json:"sdkPipelineOptions,omitempty"`
// TempStoragePrefix: The prefix of the resources the system should use
// for temporary storage. The system will append the suffix
// "/temp-{JOBNAME} to this resource prefix, where {JOBNAME} is the
// value of the job_name field. The resulting bucket and object prefix
// is used as the prefix of the resources used to store temporary data
// needed during the job execution. NOTE: This will override the value
// in taskrunner_settings. The supported resource type is: Google Cloud
// Storage: storage.googleapis.com/{bucket}/{object}
// bucket.storage.googleapis.com/{object}
TempStoragePrefix string `json:"tempStoragePrefix,omitempty"`
// UserAgent: A description of the process that generated the request.
UserAgent EnvironmentUserAgent `json:"userAgent,omitempty"`
// Version: A structure describing which components and their versions
// of the service are required in order to run the job.
Version EnvironmentVersion `json:"version,omitempty"`
// WorkerPools: Worker pools. At least one "harness" worker pool must be
// specified in order for the job to have workers.
WorkerPools []*WorkerPool `json:"workerPools,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ClusterManagerApiService") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Environment) MarshalJSON() ([]byte, error) {
type noMethod Environment
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
type EnvironmentInternalExperiments interface{}
type EnvironmentSdkPipelineOptions interface{}
type EnvironmentUserAgent interface{}
type EnvironmentVersion interface{}
// FlattenInstruction: An instruction that copies its inputs (zero or
// more) to its (single) output.
type FlattenInstruction struct {
// Inputs: Describes the inputs to the flatten instruction.
Inputs []*InstructionInput `json:"inputs,omitempty"`
// ForceSendFields is a list of field names (e.g. "Inputs") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *FlattenInstruction) MarshalJSON() ([]byte, error) {
type noMethod FlattenInstruction
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// InstructionInput: An input of an instruction, as a reference to an
// output of a producer instruction.
type InstructionInput struct {
// OutputNum: The output index (origin zero) within the producer.
OutputNum int64 `json:"outputNum,omitempty"`
// ProducerInstructionIndex: The index (origin zero) of the parallel
// instruction that produces the output to be consumed by this input.
// This index is relative to the list of instructions in this input's
// instruction's containing MapTask.
ProducerInstructionIndex int64 `json:"producerInstructionIndex,omitempty"`
// ForceSendFields is a list of field names (e.g. "OutputNum") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *InstructionInput) MarshalJSON() ([]byte, error) {
type noMethod InstructionInput
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// InstructionOutput: An output of an instruction.
type InstructionOutput struct {
// Codec: The codec to use to encode data being written via this output.
Codec InstructionOutputCodec `json:"codec,omitempty"`
// Name: The user-provided name of this output.
Name string `json:"name,omitempty"`
// SystemName: System-defined name of this output. Unique across the
// workflow.
SystemName string `json:"systemName,omitempty"`
// ForceSendFields is a list of field names (e.g. "Codec") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *InstructionOutput) MarshalJSON() ([]byte, error) {
type noMethod InstructionOutput
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
type InstructionOutputCodec interface{}
// Job: Defines a job to be run by the Dataflow service.
type Job struct {
// ClientRequestId: Client's unique identifier of the job, re-used by
// SDK across retried attempts. If this field is set, the service will
// ensure its uniqueness. That is, the request to create a job will fail
// if the service has knowledge of a previously submitted job with the
// same client's id and job name. The caller may, for example, use this
// field to ensure idempotence of job creation across retried attempts
// to create a job. By default, the field is empty and, in that case,
// the service ignores it.
ClientRequestId string `json:"clientRequestId,omitempty"`
// CreateTime: Timestamp when job was initially created. Immutable, set
// by the Dataflow service.
CreateTime string `json:"createTime,omitempty"`
// CurrentState: The current state of the job. Jobs are created in the
// JOB_STATE_STOPPED state unless otherwise specified. A job in the
// JOB_STATE_RUNNING state may asynchronously enter a terminal state.
// Once a job has reached a terminal state, no further state updates may
// be made. This field may be mutated by the Dataflow service; callers
// cannot mutate it.
//
// Possible values:
// "JOB_STATE_UNKNOWN"
// "JOB_STATE_STOPPED"
// "JOB_STATE_RUNNING"
// "JOB_STATE_DONE"
// "JOB_STATE_FAILED"
// "JOB_STATE_CANCELLED"
// "JOB_STATE_UPDATED"
CurrentState string `json:"currentState,omitempty"`
// CurrentStateTime: The timestamp associated with the current state.
CurrentStateTime string `json:"currentStateTime,omitempty"`
// Environment: Environment for the job.
Environment *Environment `json:"environment,omitempty"`
// ExecutionInfo: Information about how the Dataflow service will
// actually run the job.
ExecutionInfo *JobExecutionInfo `json:"executionInfo,omitempty"`
// Id: The unique ID of this job. This field is set by the Dataflow
// service when the Job is created, and is immutable for the life of the
// Job.
Id string `json:"id,omitempty"`
// Name: The user-specified Dataflow job name. Only one Job with a given
// name may exist in a project at any given time. If a caller attempts
// to create a Job with the same name as an already-existing Job, the
// attempt will return the existing Job. The name must match the regular
// expression [a-z]([-a-z0-9]{0,38}[a-z0-9])?
Name string `json:"name,omitempty"`
// ProjectId: The project which owns the job.
ProjectId string `json:"projectId,omitempty"`
// ReplaceJobId: If this job is an update of an existing job, this field
// will be the ID of the job it replaced. When sending a
// CreateJobRequest, you can update a job by specifying it here. The job
// named here will be stopped, and its intermediate state transferred to
// this job.
ReplaceJobId string `json:"replaceJobId,omitempty"`
// ReplacedByJobId: If another job is an update of this job (and thus,
// this job is in JOB_STATE_UPDATED), this field will contain the ID of
// that job.
ReplacedByJobId string `json:"replacedByJobId,omitempty"`
// RequestedState: The job's requested state. UpdateJob may be used to
// switch between the JOB_STATE_STOPPED and JOB_STATE_RUNNING states, by
// setting requested_state. UpdateJob may also be used to directly set a
// job's requested state to JOB_STATE_CANCELLED or JOB_STATE_DONE,
// irrevocably terminating the job if it has not already reached a
// terminal state.
//
// Possible values:
// "JOB_STATE_UNKNOWN"
// "JOB_STATE_STOPPED"
// "JOB_STATE_RUNNING"
// "JOB_STATE_DONE"
// "JOB_STATE_FAILED"
// "JOB_STATE_CANCELLED"
// "JOB_STATE_UPDATED"
RequestedState string `json:"requestedState,omitempty"`
// Steps: The top-level steps that constitute the entire job.
Steps []*Step `json:"steps,omitempty"`
// TransformNameMapping: Map of transform name prefixes of the job to be
// replaced to the corresponding name prefixes of the new job.
TransformNameMapping map[string]string `json:"transformNameMapping,omitempty"`
// Type: The type of dataflow job.
//
// Possible values:
// "JOB_TYPE_UNKNOWN"
// "JOB_TYPE_BATCH"
// "JOB_TYPE_STREAMING"
Type string `json:"type,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ClientRequestId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *Job) MarshalJSON() ([]byte, error) {
type noMethod Job
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// JobExecutionInfo: Additional information about how a Dataflow job
// will be executed which isn’t contained in the submitted job.
type JobExecutionInfo struct {
// Stages: A mapping from each stage to the information about that
// stage.
Stages map[string]JobExecutionStageInfo `json:"stages,omitempty"`
// ForceSendFields is a list of field names (e.g. "Stages") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *JobExecutionInfo) MarshalJSON() ([]byte, error) {
type noMethod JobExecutionInfo
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// JobExecutionStageInfo: Contains information about how a particular
// [google.dataflow.v1beta3.Step][google.dataflow.v1beta3.Step] will be
// executed.
type JobExecutionStageInfo struct {
// StepName: The steps associated with the execution stage. Note that
// stages may have several steps, and that a given step might be run by
// more than one stage.
StepName []string `json:"stepName,omitempty"`
// ForceSendFields is a list of field names (e.g. "StepName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *JobExecutionStageInfo) MarshalJSON() ([]byte, error) {
type noMethod JobExecutionStageInfo
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// JobMessage: A particular message pertaining to a Dataflow job.
type JobMessage struct {
// Id: Identifies the message. This is automatically generated by the
// service; the caller should treat it as an opaque string.
Id string `json:"id,omitempty"`
// MessageImportance: Importance level of the message.
//
// Possible values:
// "JOB_MESSAGE_IMPORTANCE_UNKNOWN"
// "JOB_MESSAGE_DEBUG"
// "JOB_MESSAGE_DETAILED"
// "JOB_MESSAGE_BASIC"
// "JOB_MESSAGE_WARNING"
// "JOB_MESSAGE_ERROR"
MessageImportance string `json:"messageImportance,omitempty"`
// MessageText: The text of the message.
MessageText string `json:"messageText,omitempty"`
// Time: The timestamp of the message.
Time string `json:"time,omitempty"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *JobMessage) MarshalJSON() ([]byte, error) {
type noMethod JobMessage
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// JobMetrics: JobMetrics contains a collection of metrics descibing the
// detailed progress of a Dataflow job. Metrics correspond to
// user-defined and system-defined metrics in the job. This resource
// captures only the most recent values of each metric; time-series data
// can be queried for them (under the same metric names) from Cloud
// Monitoring.
type JobMetrics struct {
// MetricTime: Timestamp as of which metric values are current.
MetricTime string `json:"metricTime,omitempty"`
// Metrics: All metrics for this job.
Metrics []*MetricUpdate `json:"metrics,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "MetricTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *JobMetrics) MarshalJSON() ([]byte, error) {
type noMethod JobMetrics
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// KeyRangeDataDiskAssignment: Data disk assignment information for a
// specific key-range of a sharded computation. Currently we only
// support UTF-8 character splits to simplify encoding into JSON.
type KeyRangeDataDiskAssignment struct {
// DataDisk: The name of the data disk where data for this range is
// stored. This name is local to the Google Cloud Platform project and
// uniquely identifies the disk within that project, for example
// "myproject-1014-104817-4c2-harness-0-disk-1".
DataDisk string `json:"dataDisk,omitempty"`
// End: The end (exclusive) of the key range.
End string `json:"end,omitempty"`
// Start: The start (inclusive) of the key range.
Start string `json:"start,omitempty"`
// ForceSendFields is a list of field names (e.g. "DataDisk") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *KeyRangeDataDiskAssignment) MarshalJSON() ([]byte, error) {
type noMethod KeyRangeDataDiskAssignment
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// KeyRangeLocation: Location information for a specific key-range of a
// sharded computation. Currently we only support UTF-8 character splits
// to simplify encoding into JSON.
type KeyRangeLocation struct {
// DataDisk: The name of the data disk where data for this range is
// stored. This name is local to the Google Cloud Platform project and
// uniquely identifies the disk within that project, for example
// "myproject-1014-104817-4c2-harness-0-disk-1".
DataDisk string `json:"dataDisk,omitempty"`
// DeliveryEndpoint: The physical location of this range assignment to
// be used for streaming computation cross-worker message delivery.
DeliveryEndpoint string `json:"deliveryEndpoint,omitempty"`
// End: The end (exclusive) of the key range.
End string `json:"end,omitempty"`
// PersistentDirectory: The location of the persistent state for this
// range, as a persistent directory in the worker local filesystem.
PersistentDirectory string `json:"persistentDirectory,omitempty"`
// Start: The start (inclusive) of the key range.
Start string `json:"start,omitempty"`
// ForceSendFields is a list of field names (e.g. "DataDisk") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *KeyRangeLocation) MarshalJSON() ([]byte, error) {
type noMethod KeyRangeLocation
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// LeaseWorkItemRequest: Request to lease WorkItems.
type LeaseWorkItemRequest struct {
// CurrentWorkerTime: The current timestamp at the worker.
CurrentWorkerTime string `json:"currentWorkerTime,omitempty"`
// RequestedLeaseDuration: The initial lease period.
RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"`
// WorkItemTypes: Filter for WorkItem type.
WorkItemTypes []string `json:"workItemTypes,omitempty"`
// WorkerCapabilities: Worker capabilities. WorkItems might be limited
// to workers with specific capabilities.
WorkerCapabilities []string `json:"workerCapabilities,omitempty"`
// WorkerId: Identifies the worker leasing work -- typically the ID of
// the virtual machine running the worker.
WorkerId string `json:"workerId,omitempty"`
// ForceSendFields is a list of field names (e.g. "CurrentWorkerTime")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LeaseWorkItemRequest) MarshalJSON() ([]byte, error) {
type noMethod LeaseWorkItemRequest
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// LeaseWorkItemResponse: Response to a request to lease WorkItems.
type LeaseWorkItemResponse struct {
// WorkItems: A list of the leased WorkItems.
WorkItems []*WorkItem `json:"workItems,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "WorkItems") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *LeaseWorkItemResponse) MarshalJSON() ([]byte, error) {
type noMethod LeaseWorkItemResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListJobMessagesResponse: Response to a request to list job messages.
type ListJobMessagesResponse struct {
// JobMessages: Messages in ascending timestamp order.
JobMessages []*JobMessage `json:"jobMessages,omitempty"`
// NextPageToken: The token to obtain the next page of results if there
// are more.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "JobMessages") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListJobMessagesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListJobMessagesResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// ListJobsResponse: Response to a request to list Dataflow jobs. This
// may be a partial response, depending on the page size in the
// ListJobsRequest.
type ListJobsResponse struct {
// Jobs: A subset of the requested job information.
Jobs []*Job `json:"jobs,omitempty"`
// NextPageToken: Set if there may be more results than fit in this
// response.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Jobs") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListJobsResponse
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// MapTask: MapTask consists of an ordered set of instructions, each of
// which describes one particular low-level operation for the worker to
// perform in order to accomplish the MapTask's WorkItem. Each
// instruction must appear in the list before any instructions which
// depends on its output.
type MapTask struct {
// Instructions: The instructions in the MapTask.
Instructions []*ParallelInstruction `json:"instructions,omitempty"`
// StageName: System-defined name of the stage containing this MapTask.
// Unique across the workflow.
StageName string `json:"stageName,omitempty"`
// SystemName: System-defined name of this MapTask. Unique across the
// workflow.
SystemName string `json:"systemName,omitempty"`
// ForceSendFields is a list of field names (e.g. "Instructions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *MapTask) MarshalJSON() ([]byte, error) {
type noMethod MapTask
raw := noMethod(*s)
return internal.MarshalJSON(raw, s.ForceSendFields)
}
// MetricStructuredName: Identifies a metric, by describing the source