-
Notifications
You must be signed in to change notification settings - Fork 460
Expand file tree
/
Copy pathJob.php
More file actions
1404 lines (1291 loc) · 50.8 KB
/
Job.php
File metadata and controls
1404 lines (1291 loc) · 50.8 KB
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
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/dataflow/v1beta3/jobs.proto
namespace Google\Cloud\Dataflow\V1beta3;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;
/**
* Defines a job to be run by the Cloud Dataflow service. Do not enter
* confidential information when you supply string values using the API.
*
* Generated from protobuf message <code>google.dataflow.v1beta3.Job</code>
*/
class Job extends \Google\Protobuf\Internal\Message
{
/**
* 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.
*
* Generated from protobuf field <code>string id = 1;</code>
*/
protected $id = '';
/**
* The ID of the Google Cloud project that the job belongs to.
*
* Generated from protobuf field <code>string project_id = 2;</code>
*/
protected $project_id = '';
/**
* Optional. The user-specified Dataflow job name.
* Only one active job with a given name can exist in a project within one
* region at
* any given time. Jobs in different regions can have the same name.
* If a caller attempts to create a job with the same
* name as an active job that already exists, the attempt returns the
* existing job.
* The name must match the regular expression
* `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?`
*
* Generated from protobuf field <code>string name = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $name = '';
/**
* Optional. The type of Dataflow job.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobType type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $type = 0;
/**
* Optional. The environment for the job.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.Environment environment = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $environment = null;
/**
* Exactly one of step or steps_location should be specified.
* The top-level steps that constitute the entire job. Only retrieved with
* JOB_VIEW_ALL.
*
* Generated from protobuf field <code>repeated .google.dataflow.v1beta3.Step steps = 6;</code>
*/
private $steps;
/**
* The Cloud Storage location where the steps are stored.
*
* Generated from protobuf field <code>string steps_location = 24;</code>
*/
protected $steps_location = '';
/**
* 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. After a job has reached a terminal state, no
* further state updates may be made.
* This field might be mutated by the Dataflow service;
* callers cannot mutate it.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobState current_state = 7;</code>
*/
protected $current_state = 0;
/**
* The timestamp associated with the current state.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp current_state_time = 8;</code>
*/
protected $current_state_time = null;
/**
* The job's requested state. Applies to `UpdateJob` requests.
* Set `requested_state` with `UpdateJob` requests to switch between the
* states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use
* `UpdateJob` requests to change a job's
* state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`,
* `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably
* terminate the job if it hasn't already reached a terminal state.
* This field has no effect on `CreateJob` requests.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobState requested_state = 9;</code>
*/
protected $requested_state = 0;
/**
* Deprecated.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobExecutionInfo execution_info = 10;</code>
*/
protected $execution_info = null;
/**
* The timestamp when the job was initially created. Immutable and set by the
* Cloud Dataflow service.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 11;</code>
*/
protected $create_time = null;
/**
* If this job is an update of an existing job, this field is the job ID
* of the job it replaced.
* When sending a `CreateJobRequest`, you can update a job by specifying it
* here. The job named here is stopped, and its intermediate state is
* transferred to this job.
*
* Generated from protobuf field <code>string replace_job_id = 12;</code>
*/
protected $replace_job_id = '';
/**
* Optional. The map of transform name prefixes of the job to be replaced to
* the corresponding name prefixes of the new job.
*
* Generated from protobuf field <code>map<string, string> transform_name_mapping = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
private $transform_name_mapping;
/**
* The client's unique identifier of the job, re-used across retried attempts.
* If this field is set, the service will ensure its uniqueness.
* 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 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.
*
* Generated from protobuf field <code>string client_request_id = 14;</code>
*/
protected $client_request_id = '';
/**
* If another job is an update of this job (and thus, this job is in
* `JOB_STATE_UPDATED`), this field contains the ID of that job.
*
* Generated from protobuf field <code>string replaced_by_job_id = 15;</code>
*/
protected $replaced_by_job_id = '';
/**
* A set of files the system should be aware of that are used
* for temporary storage. These temporary files will be
* removed on job completion.
* No duplicates are allowed.
* No file patterns are supported.
* The supported files are:
* Google Cloud Storage:
* storage.googleapis.com/{bucket}/{object}
* bucket.storage.googleapis.com/{object}
*
* Generated from protobuf field <code>repeated string temp_files = 16;</code>
*/
private $temp_files;
/**
* User-defined labels for this job.
* The labels map can contain no more than 64 entries. Entries of the labels
* map are UTF8 strings that comply with the following restrictions:
* * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
* * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
* * Both keys and values are additionally constrained to be <= 128 bytes in
* size.
*
* Generated from protobuf field <code>map<string, string> labels = 17;</code>
*/
private $labels;
/**
* Optional. The [regional endpoint]
* (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
* contains this job.
*
* Generated from protobuf field <code>string location = 18 [(.google.api.field_behavior) = OPTIONAL];</code>
*/
protected $location = '';
/**
* Preliminary field: The format of this data may change at any time.
* A description of the user pipeline and stages through which it is executed.
* Created by Cloud Dataflow service. Only retrieved with
* JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.PipelineDescription pipeline_description = 19;</code>
*/
protected $pipeline_description = null;
/**
* This field may be mutated by the Cloud Dataflow service;
* callers cannot mutate it.
*
* Generated from protobuf field <code>repeated .google.dataflow.v1beta3.ExecutionStageState stage_states = 20;</code>
*/
private $stage_states;
/**
* This field is populated by the Dataflow service to support filtering jobs
* by the metadata values provided here. Populated for ListJobs and all GetJob
* views SUMMARY and higher.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobMetadata job_metadata = 21;</code>
*/
protected $job_metadata = null;
/**
* The timestamp when the job was started (transitioned to JOB_STATE_PENDING).
* Flexible resource scheduling jobs are started with some delay after job
* creation, so start_time is unset before start and is updated when the
* job is started by the Cloud Dataflow service. For other jobs, start_time
* always equals to create_time and is immutable and set by the Cloud Dataflow
* service.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 22;</code>
*/
protected $start_time = null;
/**
* If this is specified, the job's initial state is populated from the given
* snapshot.
*
* Generated from protobuf field <code>string created_from_snapshot_id = 23;</code>
*/
protected $created_from_snapshot_id = '';
/**
* Reserved for future use. This field is set only in responses from the
* server; it is ignored if it is set in any requests.
*
* Generated from protobuf field <code>bool satisfies_pzs = 25;</code>
*/
protected $satisfies_pzs = false;
/**
* This field may ONLY be modified at runtime using the projects.jobs.update
* method to adjust job behavior. This field has no effect when specified at
* job creation.
*
* Generated from protobuf field <code>optional .google.dataflow.v1beta3.RuntimeUpdatableParams runtime_updatable_params = 26;</code>
*/
protected $runtime_updatable_params = null;
/**
* Output only. Reserved for future use. This field is set only in responses
* from the server; it is ignored if it is set in any requests.
*
* Generated from protobuf field <code>optional bool satisfies_pzi = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $satisfies_pzi = null;
/**
* Output only. Resources used by the Dataflow Service to run the job.
*
* Generated from protobuf field <code>optional .google.dataflow.v1beta3.ServiceResources service_resources = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $service_resources = null;
/**
* Output only. Indicates whether the job can be paused.
*
* Generated from protobuf field <code>bool pausable = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
*/
protected $pausable = false;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $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.
* @type string $project_id
* The ID of the Google Cloud project that the job belongs to.
* @type string $name
* Optional. The user-specified Dataflow job name.
* Only one active job with a given name can exist in a project within one
* region at
* any given time. Jobs in different regions can have the same name.
* If a caller attempts to create a job with the same
* name as an active job that already exists, the attempt returns the
* existing job.
* The name must match the regular expression
* `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?`
* @type int $type
* Optional. The type of Dataflow job.
* @type \Google\Cloud\Dataflow\V1beta3\Environment $environment
* Optional. The environment for the job.
* @type \Google\Cloud\Dataflow\V1beta3\Step[] $steps
* Exactly one of step or steps_location should be specified.
* The top-level steps that constitute the entire job. Only retrieved with
* JOB_VIEW_ALL.
* @type string $steps_location
* The Cloud Storage location where the steps are stored.
* @type int $current_state
* 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. After a job has reached a terminal state, no
* further state updates may be made.
* This field might be mutated by the Dataflow service;
* callers cannot mutate it.
* @type \Google\Protobuf\Timestamp $current_state_time
* The timestamp associated with the current state.
* @type int $requested_state
* The job's requested state. Applies to `UpdateJob` requests.
* Set `requested_state` with `UpdateJob` requests to switch between the
* states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use
* `UpdateJob` requests to change a job's
* state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`,
* `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably
* terminate the job if it hasn't already reached a terminal state.
* This field has no effect on `CreateJob` requests.
* @type \Google\Cloud\Dataflow\V1beta3\JobExecutionInfo $execution_info
* Deprecated.
* @type \Google\Protobuf\Timestamp $create_time
* The timestamp when the job was initially created. Immutable and set by the
* Cloud Dataflow service.
* @type string $replace_job_id
* If this job is an update of an existing job, this field is the job ID
* of the job it replaced.
* When sending a `CreateJobRequest`, you can update a job by specifying it
* here. The job named here is stopped, and its intermediate state is
* transferred to this job.
* @type array|\Google\Protobuf\Internal\MapField $transform_name_mapping
* Optional. The map of transform name prefixes of the job to be replaced to
* the corresponding name prefixes of the new job.
* @type string $client_request_id
* The client's unique identifier of the job, re-used across retried attempts.
* If this field is set, the service will ensure its uniqueness.
* 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 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.
* @type string $replaced_by_job_id
* If another job is an update of this job (and thus, this job is in
* `JOB_STATE_UPDATED`), this field contains the ID of that job.
* @type string[] $temp_files
* A set of files the system should be aware of that are used
* for temporary storage. These temporary files will be
* removed on job completion.
* No duplicates are allowed.
* No file patterns are supported.
* The supported files are:
* Google Cloud Storage:
* storage.googleapis.com/{bucket}/{object}
* bucket.storage.googleapis.com/{object}
* @type array|\Google\Protobuf\Internal\MapField $labels
* User-defined labels for this job.
* The labels map can contain no more than 64 entries. Entries of the labels
* map are UTF8 strings that comply with the following restrictions:
* * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
* * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
* * Both keys and values are additionally constrained to be <= 128 bytes in
* size.
* @type string $location
* Optional. The [regional endpoint]
* (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
* contains this job.
* @type \Google\Cloud\Dataflow\V1beta3\PipelineDescription $pipeline_description
* Preliminary field: The format of this data may change at any time.
* A description of the user pipeline and stages through which it is executed.
* Created by Cloud Dataflow service. Only retrieved with
* JOB_VIEW_DESCRIPTION or JOB_VIEW_ALL.
* @type \Google\Cloud\Dataflow\V1beta3\ExecutionStageState[] $stage_states
* This field may be mutated by the Cloud Dataflow service;
* callers cannot mutate it.
* @type \Google\Cloud\Dataflow\V1beta3\JobMetadata $job_metadata
* This field is populated by the Dataflow service to support filtering jobs
* by the metadata values provided here. Populated for ListJobs and all GetJob
* views SUMMARY and higher.
* @type \Google\Protobuf\Timestamp $start_time
* The timestamp when the job was started (transitioned to JOB_STATE_PENDING).
* Flexible resource scheduling jobs are started with some delay after job
* creation, so start_time is unset before start and is updated when the
* job is started by the Cloud Dataflow service. For other jobs, start_time
* always equals to create_time and is immutable and set by the Cloud Dataflow
* service.
* @type string $created_from_snapshot_id
* If this is specified, the job's initial state is populated from the given
* snapshot.
* @type bool $satisfies_pzs
* Reserved for future use. This field is set only in responses from the
* server; it is ignored if it is set in any requests.
* @type \Google\Cloud\Dataflow\V1beta3\RuntimeUpdatableParams $runtime_updatable_params
* This field may ONLY be modified at runtime using the projects.jobs.update
* method to adjust job behavior. This field has no effect when specified at
* job creation.
* @type bool $satisfies_pzi
* Output only. Reserved for future use. This field is set only in responses
* from the server; it is ignored if it is set in any requests.
* @type \Google\Cloud\Dataflow\V1beta3\ServiceResources $service_resources
* Output only. Resources used by the Dataflow Service to run the job.
* @type bool $pausable
* Output only. Indicates whether the job can be paused.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Dataflow\V1Beta3\Jobs::initOnce();
parent::__construct($data);
}
/**
* 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.
*
* Generated from protobuf field <code>string id = 1;</code>
* @return string
*/
public function getId()
{
return $this->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.
*
* Generated from protobuf field <code>string id = 1;</code>
* @param string $var
* @return $this
*/
public function setId($var)
{
GPBUtil::checkString($var, True);
$this->id = $var;
return $this;
}
/**
* The ID of the Google Cloud project that the job belongs to.
*
* Generated from protobuf field <code>string project_id = 2;</code>
* @return string
*/
public function getProjectId()
{
return $this->project_id;
}
/**
* The ID of the Google Cloud project that the job belongs to.
*
* Generated from protobuf field <code>string project_id = 2;</code>
* @param string $var
* @return $this
*/
public function setProjectId($var)
{
GPBUtil::checkString($var, True);
$this->project_id = $var;
return $this;
}
/**
* Optional. The user-specified Dataflow job name.
* Only one active job with a given name can exist in a project within one
* region at
* any given time. Jobs in different regions can have the same name.
* If a caller attempts to create a job with the same
* name as an active job that already exists, the attempt returns the
* existing job.
* The name must match the regular expression
* `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?`
*
* Generated from protobuf field <code>string name = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Optional. The user-specified Dataflow job name.
* Only one active job with a given name can exist in a project within one
* region at
* any given time. Jobs in different regions can have the same name.
* If a caller attempts to create a job with the same
* name as an active job that already exists, the attempt returns the
* existing job.
* The name must match the regular expression
* `[a-z]([-a-z0-9]{0,1022}[a-z0-9])?`
*
* Generated from protobuf field <code>string name = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param string $var
* @return $this
*/
public function setName($var)
{
GPBUtil::checkString($var, True);
$this->name = $var;
return $this;
}
/**
* Optional. The type of Dataflow job.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobType type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return int
*/
public function getType()
{
return $this->type;
}
/**
* Optional. The type of Dataflow job.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobType type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param int $var
* @return $this
*/
public function setType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dataflow\V1beta3\JobType::class);
$this->type = $var;
return $this;
}
/**
* Optional. The environment for the job.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.Environment environment = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return \Google\Cloud\Dataflow\V1beta3\Environment|null
*/
public function getEnvironment()
{
return $this->environment;
}
public function hasEnvironment()
{
return isset($this->environment);
}
public function clearEnvironment()
{
unset($this->environment);
}
/**
* Optional. The environment for the job.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.Environment environment = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param \Google\Cloud\Dataflow\V1beta3\Environment $var
* @return $this
*/
public function setEnvironment($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataflow\V1beta3\Environment::class);
$this->environment = $var;
return $this;
}
/**
* Exactly one of step or steps_location should be specified.
* The top-level steps that constitute the entire job. Only retrieved with
* JOB_VIEW_ALL.
*
* Generated from protobuf field <code>repeated .google.dataflow.v1beta3.Step steps = 6;</code>
* @return RepeatedField<\Google\Cloud\Dataflow\V1beta3\Step>
*/
public function getSteps()
{
return $this->steps;
}
/**
* Exactly one of step or steps_location should be specified.
* The top-level steps that constitute the entire job. Only retrieved with
* JOB_VIEW_ALL.
*
* Generated from protobuf field <code>repeated .google.dataflow.v1beta3.Step steps = 6;</code>
* @param \Google\Cloud\Dataflow\V1beta3\Step[] $var
* @return $this
*/
public function setSteps($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dataflow\V1beta3\Step::class);
$this->steps = $arr;
return $this;
}
/**
* The Cloud Storage location where the steps are stored.
*
* Generated from protobuf field <code>string steps_location = 24;</code>
* @return string
*/
public function getStepsLocation()
{
return $this->steps_location;
}
/**
* The Cloud Storage location where the steps are stored.
*
* Generated from protobuf field <code>string steps_location = 24;</code>
* @param string $var
* @return $this
*/
public function setStepsLocation($var)
{
GPBUtil::checkString($var, True);
$this->steps_location = $var;
return $this;
}
/**
* 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. After a job has reached a terminal state, no
* further state updates may be made.
* This field might be mutated by the Dataflow service;
* callers cannot mutate it.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobState current_state = 7;</code>
* @return int
*/
public function getCurrentState()
{
return $this->current_state;
}
/**
* 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. After a job has reached a terminal state, no
* further state updates may be made.
* This field might be mutated by the Dataflow service;
* callers cannot mutate it.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobState current_state = 7;</code>
* @param int $var
* @return $this
*/
public function setCurrentState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dataflow\V1beta3\JobState::class);
$this->current_state = $var;
return $this;
}
/**
* The timestamp associated with the current state.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp current_state_time = 8;</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getCurrentStateTime()
{
return $this->current_state_time;
}
public function hasCurrentStateTime()
{
return isset($this->current_state_time);
}
public function clearCurrentStateTime()
{
unset($this->current_state_time);
}
/**
* The timestamp associated with the current state.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp current_state_time = 8;</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setCurrentStateTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->current_state_time = $var;
return $this;
}
/**
* The job's requested state. Applies to `UpdateJob` requests.
* Set `requested_state` with `UpdateJob` requests to switch between the
* states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use
* `UpdateJob` requests to change a job's
* state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`,
* `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably
* terminate the job if it hasn't already reached a terminal state.
* This field has no effect on `CreateJob` requests.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobState requested_state = 9;</code>
* @return int
*/
public function getRequestedState()
{
return $this->requested_state;
}
/**
* The job's requested state. Applies to `UpdateJob` requests.
* Set `requested_state` with `UpdateJob` requests to switch between the
* states `JOB_STATE_STOPPED` and `JOB_STATE_RUNNING`. You can also use
* `UpdateJob` requests to change a job's
* state from `JOB_STATE_RUNNING` to `JOB_STATE_CANCELLED`,
* `JOB_STATE_DONE`, or `JOB_STATE_DRAINED`. These states irrevocably
* terminate the job if it hasn't already reached a terminal state.
* This field has no effect on `CreateJob` requests.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobState requested_state = 9;</code>
* @param int $var
* @return $this
*/
public function setRequestedState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dataflow\V1beta3\JobState::class);
$this->requested_state = $var;
return $this;
}
/**
* Deprecated.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobExecutionInfo execution_info = 10;</code>
* @return \Google\Cloud\Dataflow\V1beta3\JobExecutionInfo|null
*/
public function getExecutionInfo()
{
return $this->execution_info;
}
public function hasExecutionInfo()
{
return isset($this->execution_info);
}
public function clearExecutionInfo()
{
unset($this->execution_info);
}
/**
* Deprecated.
*
* Generated from protobuf field <code>.google.dataflow.v1beta3.JobExecutionInfo execution_info = 10;</code>
* @param \Google\Cloud\Dataflow\V1beta3\JobExecutionInfo $var
* @return $this
*/
public function setExecutionInfo($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataflow\V1beta3\JobExecutionInfo::class);
$this->execution_info = $var;
return $this;
}
/**
* The timestamp when the job was initially created. Immutable and set by the
* Cloud Dataflow service.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 11;</code>
* @return \Google\Protobuf\Timestamp|null
*/
public function getCreateTime()
{
return $this->create_time;
}
public function hasCreateTime()
{
return isset($this->create_time);
}
public function clearCreateTime()
{
unset($this->create_time);
}
/**
* The timestamp when the job was initially created. Immutable and set by the
* Cloud Dataflow service.
*
* Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 11;</code>
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setCreateTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->create_time = $var;
return $this;
}
/**
* If this job is an update of an existing job, this field is the job ID
* of the job it replaced.
* When sending a `CreateJobRequest`, you can update a job by specifying it
* here. The job named here is stopped, and its intermediate state is
* transferred to this job.
*
* Generated from protobuf field <code>string replace_job_id = 12;</code>
* @return string
*/
public function getReplaceJobId()
{
return $this->replace_job_id;
}
/**
* If this job is an update of an existing job, this field is the job ID
* of the job it replaced.
* When sending a `CreateJobRequest`, you can update a job by specifying it
* here. The job named here is stopped, and its intermediate state is
* transferred to this job.
*
* Generated from protobuf field <code>string replace_job_id = 12;</code>
* @param string $var
* @return $this
*/
public function setReplaceJobId($var)
{
GPBUtil::checkString($var, True);
$this->replace_job_id = $var;
return $this;
}
/**
* Optional. The map of transform name prefixes of the job to be replaced to
* the corresponding name prefixes of the new job.
*
* Generated from protobuf field <code>map<string, string> transform_name_mapping = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getTransformNameMapping()
{
return $this->transform_name_mapping;
}
/**
* Optional. The map of transform name prefixes of the job to be replaced to
* the corresponding name prefixes of the new job.
*
* Generated from protobuf field <code>map<string, string> transform_name_mapping = 13 [(.google.api.field_behavior) = OPTIONAL];</code>
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setTransformNameMapping($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->transform_name_mapping = $arr;
return $this;
}
/**
* The client's unique identifier of the job, re-used across retried attempts.
* If this field is set, the service will ensure its uniqueness.
* 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 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.
*
* Generated from protobuf field <code>string client_request_id = 14;</code>
* @return string
*/
public function getClientRequestId()
{
return $this->client_request_id;
}
/**
* The client's unique identifier of the job, re-used across retried attempts.
* If this field is set, the service will ensure its uniqueness.
* 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 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.
*
* Generated from protobuf field <code>string client_request_id = 14;</code>
* @param string $var
* @return $this
*/
public function setClientRequestId($var)
{
GPBUtil::checkString($var, True);
$this->client_request_id = $var;
return $this;
}
/**
* If another job is an update of this job (and thus, this job is in
* `JOB_STATE_UPDATED`), this field contains the ID of that job.
*
* Generated from protobuf field <code>string replaced_by_job_id = 15;</code>
* @return string
*/
public function getReplacedByJobId()
{
return $this->replaced_by_job_id;
}
/**
* If another job is an update of this job (and thus, this job is in
* `JOB_STATE_UPDATED`), this field contains the ID of that job.
*
* Generated from protobuf field <code>string replaced_by_job_id = 15;</code>
* @param string $var
* @return $this
*/
public function setReplacedByJobId($var)
{
GPBUtil::checkString($var, True);
$this->replaced_by_job_id = $var;
return $this;
}
/**
* A set of files the system should be aware of that are used
* for temporary storage. These temporary files will be
* removed on job completion.
* No duplicates are allowed.
* No file patterns are supported.
* The supported files are:
* Google Cloud Storage:
* storage.googleapis.com/{bucket}/{object}
* bucket.storage.googleapis.com/{object}
*
* Generated from protobuf field <code>repeated string temp_files = 16;</code>
* @return RepeatedField<string>
*/
public function getTempFiles()
{
return $this->temp_files;
}
/**
* A set of files the system should be aware of that are used
* for temporary storage. These temporary files will be
* removed on job completion.
* No duplicates are allowed.
* No file patterns are supported.
* The supported files are:
* Google Cloud Storage:
* storage.googleapis.com/{bucket}/{object}
* bucket.storage.googleapis.com/{object}
*
* Generated from protobuf field <code>repeated string temp_files = 16;</code>
* @param string[] $var
* @return $this
*/
public function setTempFiles($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->temp_files = $arr;
return $this;
}
/**
* User-defined labels for this job.
* The labels map can contain no more than 64 entries. Entries of the labels
* map are UTF8 strings that comply with the following restrictions:
* * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
* * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63}
* * Both keys and values are additionally constrained to be <= 128 bytes in
* size.
*
* Generated from protobuf field <code>map<string, string> labels = 17;</code>
* @return \Google\Protobuf\Internal\MapField
*/
public function getLabels()
{
return $this->labels;
}
/**