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 package ml
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
79
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 = "ml:v1"
95 const apiName = "ml"
96 const apiVersion = "v1"
97 const basePath = "https://ml.googleapis.com/"
98 const basePathTemplate = "https://ml.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://ml.mtls.googleapis.com/"
100
101
102 const (
103
104
105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
106
107
108
109 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
110 )
111
112
113 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
114 scopesOption := internaloption.WithDefaultScopes(
115 "https://www.googleapis.com/auth/cloud-platform",
116 "https://www.googleapis.com/auth/cloud-platform.read-only",
117 )
118
119 opts = append([]option.ClientOption{scopesOption}, opts...)
120 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
121 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
122 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
123 opts = append(opts, internaloption.EnableNewAuthLibrary())
124 client, endpoint, err := htransport.NewClient(ctx, opts...)
125 if err != nil {
126 return nil, err
127 }
128 s, err := New(client)
129 if err != nil {
130 return nil, err
131 }
132 if endpoint != "" {
133 s.BasePath = endpoint
134 }
135 return s, nil
136 }
137
138
139
140
141
142
143 func New(client *http.Client) (*Service, error) {
144 if client == nil {
145 return nil, errors.New("client is nil")
146 }
147 s := &Service{client: client, BasePath: basePath}
148 s.Projects = NewProjectsService(s)
149 return s, nil
150 }
151
152 type Service struct {
153 client *http.Client
154 BasePath string
155 UserAgent string
156
157 Projects *ProjectsService
158 }
159
160 func (s *Service) userAgent() string {
161 if s.UserAgent == "" {
162 return googleapi.UserAgent
163 }
164 return googleapi.UserAgent + " " + s.UserAgent
165 }
166
167 func NewProjectsService(s *Service) *ProjectsService {
168 rs := &ProjectsService{s: s}
169 rs.Jobs = NewProjectsJobsService(s)
170 rs.Locations = NewProjectsLocationsService(s)
171 rs.Models = NewProjectsModelsService(s)
172 rs.Operations = NewProjectsOperationsService(s)
173 return rs
174 }
175
176 type ProjectsService struct {
177 s *Service
178
179 Jobs *ProjectsJobsService
180
181 Locations *ProjectsLocationsService
182
183 Models *ProjectsModelsService
184
185 Operations *ProjectsOperationsService
186 }
187
188 func NewProjectsJobsService(s *Service) *ProjectsJobsService {
189 rs := &ProjectsJobsService{s: s}
190 return rs
191 }
192
193 type ProjectsJobsService struct {
194 s *Service
195 }
196
197 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
198 rs := &ProjectsLocationsService{s: s}
199 rs.Operations = NewProjectsLocationsOperationsService(s)
200 rs.Studies = NewProjectsLocationsStudiesService(s)
201 return rs
202 }
203
204 type ProjectsLocationsService struct {
205 s *Service
206
207 Operations *ProjectsLocationsOperationsService
208
209 Studies *ProjectsLocationsStudiesService
210 }
211
212 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
213 rs := &ProjectsLocationsOperationsService{s: s}
214 return rs
215 }
216
217 type ProjectsLocationsOperationsService struct {
218 s *Service
219 }
220
221 func NewProjectsLocationsStudiesService(s *Service) *ProjectsLocationsStudiesService {
222 rs := &ProjectsLocationsStudiesService{s: s}
223 rs.Trials = NewProjectsLocationsStudiesTrialsService(s)
224 return rs
225 }
226
227 type ProjectsLocationsStudiesService struct {
228 s *Service
229
230 Trials *ProjectsLocationsStudiesTrialsService
231 }
232
233 func NewProjectsLocationsStudiesTrialsService(s *Service) *ProjectsLocationsStudiesTrialsService {
234 rs := &ProjectsLocationsStudiesTrialsService{s: s}
235 return rs
236 }
237
238 type ProjectsLocationsStudiesTrialsService struct {
239 s *Service
240 }
241
242 func NewProjectsModelsService(s *Service) *ProjectsModelsService {
243 rs := &ProjectsModelsService{s: s}
244 rs.Versions = NewProjectsModelsVersionsService(s)
245 return rs
246 }
247
248 type ProjectsModelsService struct {
249 s *Service
250
251 Versions *ProjectsModelsVersionsService
252 }
253
254 func NewProjectsModelsVersionsService(s *Service) *ProjectsModelsVersionsService {
255 rs := &ProjectsModelsVersionsService{s: s}
256 return rs
257 }
258
259 type ProjectsModelsVersionsService struct {
260 s *Service
261 }
262
263 func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
264 rs := &ProjectsOperationsService{s: s}
265 return rs
266 }
267
268 type ProjectsOperationsService struct {
269 s *Service
270 }
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289 type GoogleApi__HttpBody struct {
290
291
292 ContentType string `json:"contentType,omitempty"`
293
294 Data string `json:"data,omitempty"`
295
296
297 Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
298
299
300 googleapi.ServerResponse `json:"-"`
301
302
303
304
305
306 ForceSendFields []string `json:"-"`
307
308
309
310
311 NullFields []string `json:"-"`
312 }
313
314 func (s *GoogleApi__HttpBody) MarshalJSON() ([]byte, error) {
315 type NoMethod GoogleApi__HttpBody
316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
317 }
318
319 type GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig struct {
320
321
322
323 UseElapsedTime bool `json:"useElapsedTime,omitempty"`
324
325
326
327
328
329 ForceSendFields []string `json:"-"`
330
331
332
333
334 NullFields []string `json:"-"`
335 }
336
337 func (s *GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig) MarshalJSON() ([]byte, error) {
338 type NoMethod GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig
339 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
340 }
341
342
343
344
345
346
347
348 type GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig struct {
349
350
351
352
353 UseElapsedTime bool `json:"useElapsedTime,omitempty"`
354
355
356
357
358
359 ForceSendFields []string `json:"-"`
360
361
362
363
364 NullFields []string `json:"-"`
365 }
366
367 func (s *GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig) MarshalJSON() ([]byte, error) {
368 type NoMethod GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig
369 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
370 }
371
372
373
374 type GoogleCloudMlV1HyperparameterOutputHyperparameterMetric struct {
375
376 ObjectiveValue float64 `json:"objectiveValue,omitempty"`
377
378 TrainingStep int64 `json:"trainingStep,omitempty,string"`
379
380
381
382
383
384 ForceSendFields []string `json:"-"`
385
386
387
388
389 NullFields []string `json:"-"`
390 }
391
392 func (s *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric) MarshalJSON() ([]byte, error) {
393 type NoMethod GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
394 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
395 }
396
397 func (s *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric) UnmarshalJSON(data []byte) error {
398 type NoMethod GoogleCloudMlV1HyperparameterOutputHyperparameterMetric
399 var s1 struct {
400 ObjectiveValue gensupport.JSONFloat64 `json:"objectiveValue"`
401 *NoMethod
402 }
403 s1.NoMethod = (*NoMethod)(s)
404 if err := json.Unmarshal(data, &s1); err != nil {
405 return err
406 }
407 s.ObjectiveValue = float64(s1.ObjectiveValue)
408 return nil
409 }
410
411
412
413 type GoogleCloudMlV1MeasurementMetric struct {
414
415 Metric string `json:"metric,omitempty"`
416
417 Value float64 `json:"value,omitempty"`
418
419
420
421
422
423 ForceSendFields []string `json:"-"`
424
425
426
427
428 NullFields []string `json:"-"`
429 }
430
431 func (s *GoogleCloudMlV1MeasurementMetric) MarshalJSON() ([]byte, error) {
432 type NoMethod GoogleCloudMlV1MeasurementMetric
433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
434 }
435
436 func (s *GoogleCloudMlV1MeasurementMetric) UnmarshalJSON(data []byte) error {
437 type NoMethod GoogleCloudMlV1MeasurementMetric
438 var s1 struct {
439 Value gensupport.JSONFloat64 `json:"value"`
440 *NoMethod
441 }
442 s1.NoMethod = (*NoMethod)(s)
443 if err := json.Unmarshal(data, &s1); err != nil {
444 return err
445 }
446 s.Value = float64(s1.Value)
447 return nil
448 }
449
450 type GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec struct {
451
452
453 Values []string `json:"values,omitempty"`
454
455
456
457
458
459 ForceSendFields []string `json:"-"`
460
461
462
463
464 NullFields []string `json:"-"`
465 }
466
467 func (s *GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec) MarshalJSON() ([]byte, error) {
468 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec
469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
470 }
471
472 type GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec struct {
473
474
475
476
477 Values []float64 `json:"values,omitempty"`
478
479
480
481
482
483 ForceSendFields []string `json:"-"`
484
485
486
487
488 NullFields []string `json:"-"`
489 }
490
491 func (s *GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec) MarshalJSON() ([]byte, error) {
492 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec
493 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
494 }
495
496 func (s *GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec) UnmarshalJSON(data []byte) error {
497 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec
498 var s1 struct {
499 Values []gensupport.JSONFloat64 `json:"values"`
500 *NoMethod
501 }
502 s1.NoMethod = (*NoMethod)(s)
503 if err := json.Unmarshal(data, &s1); err != nil {
504 return err
505 }
506 s.Values = make([]float64, len(s1.Values))
507 for i := range s1.Values {
508 s.Values[i] = float64(s1.Values[i])
509 }
510 return nil
511 }
512
513 type GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec struct {
514
515
516 MaxValue float64 `json:"maxValue,omitempty"`
517
518
519 MinValue float64 `json:"minValue,omitempty"`
520
521
522
523
524
525 ForceSendFields []string `json:"-"`
526
527
528
529
530 NullFields []string `json:"-"`
531 }
532
533 func (s *GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec) MarshalJSON() ([]byte, error) {
534 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec
535 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
536 }
537
538 func (s *GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec) UnmarshalJSON(data []byte) error {
539 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec
540 var s1 struct {
541 MaxValue gensupport.JSONFloat64 `json:"maxValue"`
542 MinValue gensupport.JSONFloat64 `json:"minValue"`
543 *NoMethod
544 }
545 s1.NoMethod = (*NoMethod)(s)
546 if err := json.Unmarshal(data, &s1); err != nil {
547 return err
548 }
549 s.MaxValue = float64(s1.MaxValue)
550 s.MinValue = float64(s1.MinValue)
551 return nil
552 }
553
554 type GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec struct {
555
556
557 MaxValue int64 `json:"maxValue,omitempty,string"`
558
559
560 MinValue int64 `json:"minValue,omitempty,string"`
561
562
563
564
565
566 ForceSendFields []string `json:"-"`
567
568
569
570
571 NullFields []string `json:"-"`
572 }
573
574 func (s *GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec) MarshalJSON() ([]byte, error) {
575 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec
576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
577 }
578
579
580
581 type GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec struct {
582
583
584 Values []string `json:"values,omitempty"`
585
586
587
588
589
590 ForceSendFields []string `json:"-"`
591
592
593
594
595 NullFields []string `json:"-"`
596 }
597
598 func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec) MarshalJSON() ([]byte, error) {
599 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec
600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
601 }
602
603
604
605 type GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec struct {
606
607
608 Values []float64 `json:"values,omitempty"`
609
610
611
612
613
614 ForceSendFields []string `json:"-"`
615
616
617
618
619 NullFields []string `json:"-"`
620 }
621
622 func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec) MarshalJSON() ([]byte, error) {
623 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec
624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
625 }
626
627 func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec) UnmarshalJSON(data []byte) error {
628 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec
629 var s1 struct {
630 Values []gensupport.JSONFloat64 `json:"values"`
631 *NoMethod
632 }
633 s1.NoMethod = (*NoMethod)(s)
634 if err := json.Unmarshal(data, &s1); err != nil {
635 return err
636 }
637 s.Values = make([]float64, len(s1.Values))
638 for i := range s1.Values {
639 s.Values[i] = float64(s1.Values[i])
640 }
641 return nil
642 }
643
644
645
646 type GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec struct {
647
648
649 Values googleapi.Int64s `json:"values,omitempty"`
650
651
652
653
654
655 ForceSendFields []string `json:"-"`
656
657
658
659
660 NullFields []string `json:"-"`
661 }
662
663 func (s *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec) MarshalJSON() ([]byte, error) {
664 type NoMethod GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec
665 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
666 }
667
668
669 type GoogleCloudMlV1StudyConfigMetricSpec struct {
670
671
672
673
674
675
676 Goal string `json:"goal,omitempty"`
677
678 Metric string `json:"metric,omitempty"`
679
680
681
682
683
684 ForceSendFields []string `json:"-"`
685
686
687
688
689 NullFields []string `json:"-"`
690 }
691
692 func (s *GoogleCloudMlV1StudyConfigMetricSpec) MarshalJSON() ([]byte, error) {
693 type NoMethod GoogleCloudMlV1StudyConfigMetricSpec
694 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
695 }
696
697
698
699 type GoogleCloudMlV1StudyConfigParameterSpec struct {
700
701 CategoricalValueSpec *GoogleCloudMlV1StudyConfigParameterSpecCategoricalValueSpec `json:"categoricalValueSpec,omitempty"`
702
703
704
705
706 ChildParameterSpecs []*GoogleCloudMlV1StudyConfigParameterSpec `json:"childParameterSpecs,omitempty"`
707
708 DiscreteValueSpec *GoogleCloudMlV1StudyConfigParameterSpecDiscreteValueSpec `json:"discreteValueSpec,omitempty"`
709
710 DoubleValueSpec *GoogleCloudMlV1StudyConfigParameterSpecDoubleValueSpec `json:"doubleValueSpec,omitempty"`
711
712 IntegerValueSpec *GoogleCloudMlV1StudyConfigParameterSpecIntegerValueSpec `json:"integerValueSpec,omitempty"`
713
714
715 Parameter string `json:"parameter,omitempty"`
716 ParentCategoricalValues *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentCategoricalValueSpec `json:"parentCategoricalValues,omitempty"`
717 ParentDiscreteValues *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentDiscreteValueSpec `json:"parentDiscreteValues,omitempty"`
718 ParentIntValues *GoogleCloudMlV1StudyConfigParameterSpecMatchingParentIntValueSpec `json:"parentIntValues,omitempty"`
719
720
721
722
723
724
725
726
727
728
729
730
731 ScaleType string `json:"scaleType,omitempty"`
732
733
734
735
736
737
738
739
740
741
742
743
744 Type string `json:"type,omitempty"`
745
746
747
748
749
750 ForceSendFields []string `json:"-"`
751
752
753
754
755 NullFields []string `json:"-"`
756 }
757
758 func (s *GoogleCloudMlV1StudyConfigParameterSpec) MarshalJSON() ([]byte, error) {
759 type NoMethod GoogleCloudMlV1StudyConfigParameterSpec
760 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
761 }
762
763
764
765
766 type GoogleCloudMlV1TrialParameter struct {
767
768 FloatValue float64 `json:"floatValue,omitempty"`
769
770 IntValue int64 `json:"intValue,omitempty,string"`
771
772 Parameter string `json:"parameter,omitempty"`
773
774 StringValue string `json:"stringValue,omitempty"`
775
776
777
778
779
780 ForceSendFields []string `json:"-"`
781
782
783
784
785 NullFields []string `json:"-"`
786 }
787
788 func (s *GoogleCloudMlV1TrialParameter) MarshalJSON() ([]byte, error) {
789 type NoMethod GoogleCloudMlV1TrialParameter
790 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
791 }
792
793 func (s *GoogleCloudMlV1TrialParameter) UnmarshalJSON(data []byte) error {
794 type NoMethod GoogleCloudMlV1TrialParameter
795 var s1 struct {
796 FloatValue gensupport.JSONFloat64 `json:"floatValue"`
797 *NoMethod
798 }
799 s1.NoMethod = (*NoMethod)(s)
800 if err := json.Unmarshal(data, &s1); err != nil {
801 return err
802 }
803 s.FloatValue = float64(s1.FloatValue)
804 return nil
805 }
806
807
808
809
810
811
812 type GoogleCloudMlV1__AcceleratorConfig struct {
813
814 Count int64 `json:"count,omitempty,string"`
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831 Type string `json:"type,omitempty"`
832
833
834
835
836
837 ForceSendFields []string `json:"-"`
838
839
840
841
842 NullFields []string `json:"-"`
843 }
844
845 func (s *GoogleCloudMlV1__AcceleratorConfig) MarshalJSON() ([]byte, error) {
846 type NoMethod GoogleCloudMlV1__AcceleratorConfig
847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
848 }
849
850
851
852 type GoogleCloudMlV1__AddTrialMeasurementRequest struct {
853
854 Measurement *GoogleCloudMlV1__Measurement `json:"measurement,omitempty"`
855
856
857
858
859
860 ForceSendFields []string `json:"-"`
861
862
863
864
865 NullFields []string `json:"-"`
866 }
867
868 func (s *GoogleCloudMlV1__AddTrialMeasurementRequest) MarshalJSON() ([]byte, error) {
869 type NoMethod GoogleCloudMlV1__AddTrialMeasurementRequest
870 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
871 }
872
873
874 type GoogleCloudMlV1__AutoScaling struct {
875
876
877 MaxNodes int64 `json:"maxNodes,omitempty"`
878
879
880 Metrics []*GoogleCloudMlV1__MetricSpec `json:"metrics,omitempty"`
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 MinNodes int64 `json:"minNodes,omitempty"`
906
907
908
909
910
911 ForceSendFields []string `json:"-"`
912
913
914
915
916 NullFields []string `json:"-"`
917 }
918
919 func (s *GoogleCloudMlV1__AutoScaling) MarshalJSON() ([]byte, error) {
920 type NoMethod GoogleCloudMlV1__AutoScaling
921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
922 }
923
924
925
926
927 type GoogleCloudMlV1__AutomatedStoppingConfig struct {
928 DecayCurveStoppingConfig *GoogleCloudMlV1AutomatedStoppingConfigDecayCurveAutomatedStoppingConfig `json:"decayCurveStoppingConfig,omitempty"`
929 MedianAutomatedStoppingConfig *GoogleCloudMlV1AutomatedStoppingConfigMedianAutomatedStoppingConfig `json:"medianAutomatedStoppingConfig,omitempty"`
930
931
932
933
934
935 ForceSendFields []string `json:"-"`
936
937
938
939
940 NullFields []string `json:"-"`
941 }
942
943 func (s *GoogleCloudMlV1__AutomatedStoppingConfig) MarshalJSON() ([]byte, error) {
944 type NoMethod GoogleCloudMlV1__AutomatedStoppingConfig
945 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
946 }
947
948
949
950 type GoogleCloudMlV1__BuiltInAlgorithmOutput struct {
951
952 Framework string `json:"framework,omitempty"`
953
954
955
956 ModelPath string `json:"modelPath,omitempty"`
957
958 PythonVersion string `json:"pythonVersion,omitempty"`
959
960
961 RuntimeVersion string `json:"runtimeVersion,omitempty"`
962
963
964
965
966
967 ForceSendFields []string `json:"-"`
968
969
970
971
972 NullFields []string `json:"-"`
973 }
974
975 func (s *GoogleCloudMlV1__BuiltInAlgorithmOutput) MarshalJSON() ([]byte, error) {
976 type NoMethod GoogleCloudMlV1__BuiltInAlgorithmOutput
977 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
978 }
979
980
981 type GoogleCloudMlV1__CancelJobRequest struct {
982 }
983
984 type GoogleCloudMlV1__Capability struct {
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001 AvailableAccelerators []string `json:"availableAccelerators,omitempty"`
1002
1003
1004
1005
1006
1007 Type string `json:"type,omitempty"`
1008
1009
1010
1011
1012
1013 ForceSendFields []string `json:"-"`
1014
1015
1016
1017
1018 NullFields []string `json:"-"`
1019 }
1020
1021 func (s *GoogleCloudMlV1__Capability) MarshalJSON() ([]byte, error) {
1022 type NoMethod GoogleCloudMlV1__Capability
1023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1024 }
1025
1026
1027
1028
1029 type GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata struct {
1030
1031 CreateTime string `json:"createTime,omitempty"`
1032
1033 Study string `json:"study,omitempty"`
1034
1035 Trial string `json:"trial,omitempty"`
1036
1037
1038
1039
1040
1041 ForceSendFields []string `json:"-"`
1042
1043
1044
1045
1046 NullFields []string `json:"-"`
1047 }
1048
1049 func (s *GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata) MarshalJSON() ([]byte, error) {
1050 type NoMethod GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata
1051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1052 }
1053
1054
1055
1056 type GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest struct {
1057 }
1058
1059
1060
1061
1062 type GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse struct {
1063
1064 EndTime string `json:"endTime,omitempty"`
1065
1066 ShouldStop bool `json:"shouldStop,omitempty"`
1067
1068 StartTime string `json:"startTime,omitempty"`
1069
1070
1071
1072
1073
1074 ForceSendFields []string `json:"-"`
1075
1076
1077
1078
1079 NullFields []string `json:"-"`
1080 }
1081
1082 func (s *GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse) MarshalJSON() ([]byte, error) {
1083 type NoMethod GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse
1084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1085 }
1086
1087
1088
1089 type GoogleCloudMlV1__CompleteTrialRequest struct {
1090
1091
1092
1093 FinalMeasurement *GoogleCloudMlV1__Measurement `json:"finalMeasurement,omitempty"`
1094
1095
1096 InfeasibleReason string `json:"infeasibleReason,omitempty"`
1097
1098
1099 TrialInfeasible bool `json:"trialInfeasible,omitempty"`
1100
1101
1102
1103
1104
1105 ForceSendFields []string `json:"-"`
1106
1107
1108
1109
1110 NullFields []string `json:"-"`
1111 }
1112
1113 func (s *GoogleCloudMlV1__CompleteTrialRequest) MarshalJSON() ([]byte, error) {
1114 type NoMethod GoogleCloudMlV1__CompleteTrialRequest
1115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1116 }
1117
1118 type GoogleCloudMlV1__Config struct {
1119
1120 TpuServiceAccount string `json:"tpuServiceAccount,omitempty"`
1121
1122
1123
1124
1125
1126 ForceSendFields []string `json:"-"`
1127
1128
1129
1130
1131 NullFields []string `json:"-"`
1132 }
1133
1134 func (s *GoogleCloudMlV1__Config) MarshalJSON() ([]byte, error) {
1135 type NoMethod GoogleCloudMlV1__Config
1136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1137 }
1138
1139
1140
1141
1142
1143 type GoogleCloudMlV1__ContainerPort struct {
1144
1145
1146 ContainerPort int64 `json:"containerPort,omitempty"`
1147
1148
1149
1150
1151
1152 ForceSendFields []string `json:"-"`
1153
1154
1155
1156
1157 NullFields []string `json:"-"`
1158 }
1159
1160 func (s *GoogleCloudMlV1__ContainerPort) MarshalJSON() ([]byte, error) {
1161 type NoMethod GoogleCloudMlV1__ContainerPort
1162 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1163 }
1164
1165
1166
1167
1168
1169 type GoogleCloudMlV1__ContainerSpec struct {
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198 Args []string `json:"args,omitempty"`
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229 Command []string `json:"command,omitempty"`
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241 Env []*GoogleCloudMlV1__EnvVar `json:"env,omitempty"`
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265 Image string `json:"image,omitempty"`
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275 Ports []*GoogleCloudMlV1__ContainerPort `json:"ports,omitempty"`
1276
1277
1278
1279
1280
1281 ForceSendFields []string `json:"-"`
1282
1283
1284
1285
1286 NullFields []string `json:"-"`
1287 }
1288
1289 func (s *GoogleCloudMlV1__ContainerSpec) MarshalJSON() ([]byte, error) {
1290 type NoMethod GoogleCloudMlV1__ContainerSpec
1291 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1292 }
1293
1294
1295 type GoogleCloudMlV1__DiskConfig struct {
1296
1297 BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
1298
1299
1300
1301 BootDiskType string `json:"bootDiskType,omitempty"`
1302
1303
1304
1305
1306
1307 ForceSendFields []string `json:"-"`
1308
1309
1310
1311
1312 NullFields []string `json:"-"`
1313 }
1314
1315 func (s *GoogleCloudMlV1__DiskConfig) MarshalJSON() ([]byte, error) {
1316 type NoMethod GoogleCloudMlV1__DiskConfig
1317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1318 }
1319
1320
1321
1322 type GoogleCloudMlV1__EncryptionConfig struct {
1323
1324
1325
1326
1327
1328 KmsKeyName string `json:"kmsKeyName,omitempty"`
1329
1330
1331
1332
1333
1334 ForceSendFields []string `json:"-"`
1335
1336
1337
1338
1339 NullFields []string `json:"-"`
1340 }
1341
1342 func (s *GoogleCloudMlV1__EncryptionConfig) MarshalJSON() ([]byte, error) {
1343 type NoMethod GoogleCloudMlV1__EncryptionConfig
1344 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1345 }
1346
1347
1348
1349
1350
1351 type GoogleCloudMlV1__EnvVar struct {
1352
1353
1354
1355 Name string `json:"name,omitempty"`
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368 Value string `json:"value,omitempty"`
1369
1370
1371
1372
1373
1374 ForceSendFields []string `json:"-"`
1375
1376
1377
1378
1379 NullFields []string `json:"-"`
1380 }
1381
1382 func (s *GoogleCloudMlV1__EnvVar) MarshalJSON() ([]byte, error) {
1383 type NoMethod GoogleCloudMlV1__EnvVar
1384 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1385 }
1386
1387
1388
1389 type GoogleCloudMlV1__ExplainRequest struct {
1390
1391 HttpBody *GoogleApi__HttpBody `json:"httpBody,omitempty"`
1392
1393
1394
1395
1396
1397 ForceSendFields []string `json:"-"`
1398
1399
1400
1401
1402 NullFields []string `json:"-"`
1403 }
1404
1405 func (s *GoogleCloudMlV1__ExplainRequest) MarshalJSON() ([]byte, error) {
1406 type NoMethod GoogleCloudMlV1__ExplainRequest
1407 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1408 }
1409
1410
1411
1412
1413
1414
1415 type GoogleCloudMlV1__ExplanationConfig struct {
1416
1417
1418
1419
1420 IntegratedGradientsAttribution *GoogleCloudMlV1__IntegratedGradientsAttribution `json:"integratedGradientsAttribution,omitempty"`
1421
1422
1423
1424
1425 SampledShapleyAttribution *GoogleCloudMlV1__SampledShapleyAttribution `json:"sampledShapleyAttribution,omitempty"`
1426
1427
1428
1429
1430 XraiAttribution *GoogleCloudMlV1__XraiAttribution `json:"xraiAttribution,omitempty"`
1431
1432
1433
1434
1435
1436
1437 ForceSendFields []string `json:"-"`
1438
1439
1440
1441
1442 NullFields []string `json:"-"`
1443 }
1444
1445 func (s *GoogleCloudMlV1__ExplanationConfig) MarshalJSON() ([]byte, error) {
1446 type NoMethod GoogleCloudMlV1__ExplanationConfig
1447 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1448 }
1449
1450
1451
1452 type GoogleCloudMlV1__GetConfigResponse struct {
1453 Config *GoogleCloudMlV1__Config `json:"config,omitempty"`
1454
1455
1456 ServiceAccount string `json:"serviceAccount,omitempty"`
1457
1458 ServiceAccountProject int64 `json:"serviceAccountProject,omitempty,string"`
1459
1460
1461 googleapi.ServerResponse `json:"-"`
1462
1463
1464
1465
1466
1467 ForceSendFields []string `json:"-"`
1468
1469
1470
1471
1472 NullFields []string `json:"-"`
1473 }
1474
1475 func (s *GoogleCloudMlV1__GetConfigResponse) MarshalJSON() ([]byte, error) {
1476 type NoMethod GoogleCloudMlV1__GetConfigResponse
1477 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1478 }
1479
1480
1481
1482
1483
1484
1485 type GoogleCloudMlV1__HyperparameterOutput struct {
1486
1487
1488 AllMetrics []*GoogleCloudMlV1HyperparameterOutputHyperparameterMetric `json:"allMetrics,omitempty"`
1489
1490
1491 BuiltInAlgorithmOutput *GoogleCloudMlV1__BuiltInAlgorithmOutput `json:"builtInAlgorithmOutput,omitempty"`
1492
1493 EndTime string `json:"endTime,omitempty"`
1494
1495 FinalMetric *GoogleCloudMlV1HyperparameterOutputHyperparameterMetric `json:"finalMetric,omitempty"`
1496
1497 Hyperparameters map[string]string `json:"hyperparameters,omitempty"`
1498
1499 IsTrialStoppedEarly bool `json:"isTrialStoppedEarly,omitempty"`
1500
1501 StartTime string `json:"startTime,omitempty"`
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516 State string `json:"state,omitempty"`
1517
1518 TrialId string `json:"trialId,omitempty"`
1519
1520
1521
1522
1523
1524
1525
1526
1527 WebAccessUris map[string]string `json:"webAccessUris,omitempty"`
1528
1529
1530
1531
1532
1533 ForceSendFields []string `json:"-"`
1534
1535
1536
1537
1538 NullFields []string `json:"-"`
1539 }
1540
1541 func (s *GoogleCloudMlV1__HyperparameterOutput) MarshalJSON() ([]byte, error) {
1542 type NoMethod GoogleCloudMlV1__HyperparameterOutput
1543 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1544 }
1545
1546
1547
1548 type GoogleCloudMlV1__HyperparameterSpec struct {
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559 Algorithm string `json:"algorithm,omitempty"`
1560
1561
1562 EnableTrialEarlyStopping bool `json:"enableTrialEarlyStopping,omitempty"`
1563
1564
1565
1566
1567
1568
1569
1570 Goal string `json:"goal,omitempty"`
1571
1572
1573
1574
1575
1576 HyperparameterMetricTag string `json:"hyperparameterMetricTag,omitempty"`
1577
1578
1579
1580
1581
1582 MaxFailedTrials int64 `json:"maxFailedTrials,omitempty"`
1583
1584
1585
1586
1587
1588
1589
1590 MaxParallelTrials int64 `json:"maxParallelTrials,omitempty"`
1591
1592
1593 MaxTrials int64 `json:"maxTrials,omitempty"`
1594
1595 Params []*GoogleCloudMlV1__ParameterSpec `json:"params,omitempty"`
1596
1597
1598
1599 ResumePreviousJobId string `json:"resumePreviousJobId,omitempty"`
1600
1601
1602
1603
1604
1605 ForceSendFields []string `json:"-"`
1606
1607
1608
1609
1610 NullFields []string `json:"-"`
1611 }
1612
1613 func (s *GoogleCloudMlV1__HyperparameterSpec) MarshalJSON() ([]byte, error) {
1614 type NoMethod GoogleCloudMlV1__HyperparameterSpec
1615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1616 }
1617
1618
1619
1620
1621
1622 type GoogleCloudMlV1__IntegratedGradientsAttribution struct {
1623
1624
1625
1626 NumIntegralSteps int64 `json:"numIntegralSteps,omitempty"`
1627
1628
1629
1630
1631
1632 ForceSendFields []string `json:"-"`
1633
1634
1635
1636
1637 NullFields []string `json:"-"`
1638 }
1639
1640 func (s *GoogleCloudMlV1__IntegratedGradientsAttribution) MarshalJSON() ([]byte, error) {
1641 type NoMethod GoogleCloudMlV1__IntegratedGradientsAttribution
1642 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1643 }
1644
1645
1646 type GoogleCloudMlV1__Job struct {
1647
1648 CreateTime string `json:"createTime,omitempty"`
1649
1650 EndTime string `json:"endTime,omitempty"`
1651
1652 ErrorMessage string `json:"errorMessage,omitempty"`
1653
1654
1655
1656
1657
1658
1659
1660 Etag string `json:"etag,omitempty"`
1661
1662 JobId string `json:"jobId,omitempty"`
1663
1664
1665
1666 JobPosition int64 `json:"jobPosition,omitempty,string"`
1667
1668
1669
1670
1671 Labels map[string]string `json:"labels,omitempty"`
1672
1673 PredictionInput *GoogleCloudMlV1__PredictionInput `json:"predictionInput,omitempty"`
1674
1675 PredictionOutput *GoogleCloudMlV1__PredictionOutput `json:"predictionOutput,omitempty"`
1676
1677 StartTime string `json:"startTime,omitempty"`
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692 State string `json:"state,omitempty"`
1693
1694 TrainingInput *GoogleCloudMlV1__TrainingInput `json:"trainingInput,omitempty"`
1695
1696 TrainingOutput *GoogleCloudMlV1__TrainingOutput `json:"trainingOutput,omitempty"`
1697
1698
1699 googleapi.ServerResponse `json:"-"`
1700
1701
1702
1703
1704
1705 ForceSendFields []string `json:"-"`
1706
1707
1708
1709
1710 NullFields []string `json:"-"`
1711 }
1712
1713 func (s *GoogleCloudMlV1__Job) MarshalJSON() ([]byte, error) {
1714 type NoMethod GoogleCloudMlV1__Job
1715 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1716 }
1717
1718
1719 type GoogleCloudMlV1__ListJobsResponse struct {
1720
1721 Jobs []*GoogleCloudMlV1__Job `json:"jobs,omitempty"`
1722
1723
1724 NextPageToken string `json:"nextPageToken,omitempty"`
1725
1726
1727 googleapi.ServerResponse `json:"-"`
1728
1729
1730
1731
1732
1733 ForceSendFields []string `json:"-"`
1734
1735
1736
1737
1738 NullFields []string `json:"-"`
1739 }
1740
1741 func (s *GoogleCloudMlV1__ListJobsResponse) MarshalJSON() ([]byte, error) {
1742 type NoMethod GoogleCloudMlV1__ListJobsResponse
1743 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1744 }
1745
1746 type GoogleCloudMlV1__ListLocationsResponse struct {
1747
1748
1749 Locations []*GoogleCloudMlV1__Location `json:"locations,omitempty"`
1750
1751
1752 NextPageToken string `json:"nextPageToken,omitempty"`
1753
1754
1755 googleapi.ServerResponse `json:"-"`
1756
1757
1758
1759
1760
1761 ForceSendFields []string `json:"-"`
1762
1763
1764
1765
1766 NullFields []string `json:"-"`
1767 }
1768
1769 func (s *GoogleCloudMlV1__ListLocationsResponse) MarshalJSON() ([]byte, error) {
1770 type NoMethod GoogleCloudMlV1__ListLocationsResponse
1771 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1772 }
1773
1774
1775
1776 type GoogleCloudMlV1__ListModelsResponse struct {
1777
1778 Models []*GoogleCloudMlV1__Model `json:"models,omitempty"`
1779
1780
1781 NextPageToken string `json:"nextPageToken,omitempty"`
1782
1783
1784 googleapi.ServerResponse `json:"-"`
1785
1786
1787
1788
1789
1790 ForceSendFields []string `json:"-"`
1791
1792
1793
1794
1795 NullFields []string `json:"-"`
1796 }
1797
1798 func (s *GoogleCloudMlV1__ListModelsResponse) MarshalJSON() ([]byte, error) {
1799 type NoMethod GoogleCloudMlV1__ListModelsResponse
1800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1801 }
1802
1803
1804
1805 type GoogleCloudMlV1__ListOptimalTrialsRequest struct {
1806 }
1807
1808
1809
1810 type GoogleCloudMlV1__ListOptimalTrialsResponse struct {
1811
1812
1813
1814 Trials []*GoogleCloudMlV1__Trial `json:"trials,omitempty"`
1815
1816
1817 googleapi.ServerResponse `json:"-"`
1818
1819
1820
1821
1822
1823 ForceSendFields []string `json:"-"`
1824
1825
1826
1827
1828 NullFields []string `json:"-"`
1829 }
1830
1831 func (s *GoogleCloudMlV1__ListOptimalTrialsResponse) MarshalJSON() ([]byte, error) {
1832 type NoMethod GoogleCloudMlV1__ListOptimalTrialsResponse
1833 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1834 }
1835
1836 type GoogleCloudMlV1__ListStudiesResponse struct {
1837
1838 Studies []*GoogleCloudMlV1__Study `json:"studies,omitempty"`
1839
1840
1841 googleapi.ServerResponse `json:"-"`
1842
1843
1844
1845
1846
1847 ForceSendFields []string `json:"-"`
1848
1849
1850
1851
1852 NullFields []string `json:"-"`
1853 }
1854
1855 func (s *GoogleCloudMlV1__ListStudiesResponse) MarshalJSON() ([]byte, error) {
1856 type NoMethod GoogleCloudMlV1__ListStudiesResponse
1857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1858 }
1859
1860
1861
1862 type GoogleCloudMlV1__ListTrialsResponse struct {
1863
1864 Trials []*GoogleCloudMlV1__Trial `json:"trials,omitempty"`
1865
1866
1867 googleapi.ServerResponse `json:"-"`
1868
1869
1870
1871
1872
1873 ForceSendFields []string `json:"-"`
1874
1875
1876
1877
1878 NullFields []string `json:"-"`
1879 }
1880
1881 func (s *GoogleCloudMlV1__ListTrialsResponse) MarshalJSON() ([]byte, error) {
1882 type NoMethod GoogleCloudMlV1__ListTrialsResponse
1883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1884 }
1885
1886
1887
1888 type GoogleCloudMlV1__ListVersionsResponse struct {
1889
1890
1891 NextPageToken string `json:"nextPageToken,omitempty"`
1892
1893 Versions []*GoogleCloudMlV1__Version `json:"versions,omitempty"`
1894
1895
1896 googleapi.ServerResponse `json:"-"`
1897
1898
1899
1900
1901
1902 ForceSendFields []string `json:"-"`
1903
1904
1905
1906
1907 NullFields []string `json:"-"`
1908 }
1909
1910 func (s *GoogleCloudMlV1__ListVersionsResponse) MarshalJSON() ([]byte, error) {
1911 type NoMethod GoogleCloudMlV1__ListVersionsResponse
1912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1913 }
1914
1915 type GoogleCloudMlV1__Location struct {
1916
1917 Capabilities []*GoogleCloudMlV1__Capability `json:"capabilities,omitempty"`
1918 Name string `json:"name,omitempty"`
1919
1920
1921 googleapi.ServerResponse `json:"-"`
1922
1923
1924
1925
1926
1927 ForceSendFields []string `json:"-"`
1928
1929
1930
1931
1932 NullFields []string `json:"-"`
1933 }
1934
1935 func (s *GoogleCloudMlV1__Location) MarshalJSON() ([]byte, error) {
1936 type NoMethod GoogleCloudMlV1__Location
1937 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1938 }
1939
1940
1941 type GoogleCloudMlV1__ManualScaling struct {
1942
1943
1944
1945
1946 Nodes int64 `json:"nodes,omitempty"`
1947
1948
1949
1950
1951
1952 ForceSendFields []string `json:"-"`
1953
1954
1955
1956
1957 NullFields []string `json:"-"`
1958 }
1959
1960 func (s *GoogleCloudMlV1__ManualScaling) MarshalJSON() ([]byte, error) {
1961 type NoMethod GoogleCloudMlV1__ManualScaling
1962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1963 }
1964
1965
1966 type GoogleCloudMlV1__Measurement struct {
1967
1968
1969 ElapsedTime string `json:"elapsedTime,omitempty"`
1970
1971
1972 Metrics []*GoogleCloudMlV1MeasurementMetric `json:"metrics,omitempty"`
1973
1974
1975 StepCount int64 `json:"stepCount,omitempty,string"`
1976
1977
1978
1979
1980
1981 ForceSendFields []string `json:"-"`
1982
1983
1984
1985
1986 NullFields []string `json:"-"`
1987 }
1988
1989 func (s *GoogleCloudMlV1__Measurement) MarshalJSON() ([]byte, error) {
1990 type NoMethod GoogleCloudMlV1__Measurement
1991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1992 }
1993
1994
1995
1996 type GoogleCloudMlV1__MetricSpec struct {
1997
1998
1999
2000
2001
2002
2003 Name string `json:"name,omitempty"`
2004
2005
2006
2007 Target int64 `json:"target,omitempty"`
2008
2009
2010
2011
2012
2013 ForceSendFields []string `json:"-"`
2014
2015
2016
2017
2018 NullFields []string `json:"-"`
2019 }
2020
2021 func (s *GoogleCloudMlV1__MetricSpec) MarshalJSON() ([]byte, error) {
2022 type NoMethod GoogleCloudMlV1__MetricSpec
2023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2024 }
2025
2026
2027
2028
2029 type GoogleCloudMlV1__Model struct {
2030
2031
2032
2033
2034 DefaultVersion *GoogleCloudMlV1__Version `json:"defaultVersion,omitempty"`
2035
2036
2037 Description string `json:"description,omitempty"`
2038
2039
2040
2041
2042
2043
2044
2045 Etag string `json:"etag,omitempty"`
2046
2047
2048
2049
2050
2051 Labels map[string]string `json:"labels,omitempty"`
2052
2053
2054 Name string `json:"name,omitempty"`
2055
2056
2057
2058
2059
2060
2061
2062 OnlinePredictionConsoleLogging bool `json:"onlinePredictionConsoleLogging,omitempty"`
2063
2064
2065
2066
2067
2068
2069 OnlinePredictionLogging bool `json:"onlinePredictionLogging,omitempty"`
2070
2071
2072
2073
2074
2075
2076
2077 Regions []string `json:"regions,omitempty"`
2078
2079
2080 googleapi.ServerResponse `json:"-"`
2081
2082
2083
2084
2085
2086 ForceSendFields []string `json:"-"`
2087
2088
2089
2090
2091 NullFields []string `json:"-"`
2092 }
2093
2094 func (s *GoogleCloudMlV1__Model) MarshalJSON() ([]byte, error) {
2095 type NoMethod GoogleCloudMlV1__Model
2096 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2097 }
2098
2099
2100
2101 type GoogleCloudMlV1__OperationMetadata struct {
2102
2103 CreateTime string `json:"createTime,omitempty"`
2104
2105 EndTime string `json:"endTime,omitempty"`
2106
2107
2108 IsCancellationRequested bool `json:"isCancellationRequested,omitempty"`
2109
2110
2111 Labels map[string]string `json:"labels,omitempty"`
2112
2113 ModelName string `json:"modelName,omitempty"`
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124 OperationType string `json:"operationType,omitempty"`
2125
2126 ProjectNumber int64 `json:"projectNumber,omitempty,string"`
2127
2128 StartTime string `json:"startTime,omitempty"`
2129
2130 Version *GoogleCloudMlV1__Version `json:"version,omitempty"`
2131
2132
2133
2134
2135
2136 ForceSendFields []string `json:"-"`
2137
2138
2139
2140
2141 NullFields []string `json:"-"`
2142 }
2143
2144 func (s *GoogleCloudMlV1__OperationMetadata) MarshalJSON() ([]byte, error) {
2145 type NoMethod GoogleCloudMlV1__OperationMetadata
2146 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2147 }
2148
2149
2150
2151 type GoogleCloudMlV1__ParameterSpec struct {
2152
2153
2154 CategoricalValues []string `json:"categoricalValues,omitempty"`
2155
2156
2157
2158
2159 DiscreteValues []float64 `json:"discreteValues,omitempty"`
2160
2161
2162
2163 MaxValue float64 `json:"maxValue,omitempty"`
2164
2165
2166
2167 MinValue float64 `json:"minValue,omitempty"`
2168
2169
2170 ParameterName string `json:"parameterName,omitempty"`
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184 ScaleType string `json:"scaleType,omitempty"`
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197 Type string `json:"type,omitempty"`
2198
2199
2200
2201
2202
2203 ForceSendFields []string `json:"-"`
2204
2205
2206
2207
2208 NullFields []string `json:"-"`
2209 }
2210
2211 func (s *GoogleCloudMlV1__ParameterSpec) MarshalJSON() ([]byte, error) {
2212 type NoMethod GoogleCloudMlV1__ParameterSpec
2213 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2214 }
2215
2216 func (s *GoogleCloudMlV1__ParameterSpec) UnmarshalJSON(data []byte) error {
2217 type NoMethod GoogleCloudMlV1__ParameterSpec
2218 var s1 struct {
2219 DiscreteValues []gensupport.JSONFloat64 `json:"discreteValues"`
2220 MaxValue gensupport.JSONFloat64 `json:"maxValue"`
2221 MinValue gensupport.JSONFloat64 `json:"minValue"`
2222 *NoMethod
2223 }
2224 s1.NoMethod = (*NoMethod)(s)
2225 if err := json.Unmarshal(data, &s1); err != nil {
2226 return err
2227 }
2228 s.DiscreteValues = make([]float64, len(s1.DiscreteValues))
2229 for i := range s1.DiscreteValues {
2230 s.DiscreteValues[i] = float64(s1.DiscreteValues[i])
2231 }
2232 s.MaxValue = float64(s1.MaxValue)
2233 s.MinValue = float64(s1.MinValue)
2234 return nil
2235 }
2236
2237
2238
2239 type GoogleCloudMlV1__PredictRequest struct {
2240
2241
2242
2243 HttpBody *GoogleApi__HttpBody `json:"httpBody,omitempty"`
2244
2245
2246
2247
2248
2249 ForceSendFields []string `json:"-"`
2250
2251
2252
2253
2254 NullFields []string `json:"-"`
2255 }
2256
2257 func (s *GoogleCloudMlV1__PredictRequest) MarshalJSON() ([]byte, error) {
2258 type NoMethod GoogleCloudMlV1__PredictRequest
2259 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2260 }
2261
2262
2263
2264 type GoogleCloudMlV1__PredictionInput struct {
2265
2266
2267
2268
2269 BatchSize int64 `json:"batchSize,omitempty,string"`
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283 DataFormat string `json:"dataFormat,omitempty"`
2284
2285
2286 InputPaths []string `json:"inputPaths,omitempty"`
2287
2288
2289 MaxWorkerCount int64 `json:"maxWorkerCount,omitempty,string"`
2290
2291
2292
2293 ModelName string `json:"modelName,omitempty"`
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308 OutputDataFormat string `json:"outputDataFormat,omitempty"`
2309
2310 OutputPath string `json:"outputPath,omitempty"`
2311
2312
2313 Region string `json:"region,omitempty"`
2314
2315
2316
2317
2318
2319 RuntimeVersion string `json:"runtimeVersion,omitempty"`
2320
2321
2322
2323
2324
2325
2326 SignatureName string `json:"signatureName,omitempty"`
2327
2328
2329 Uri string `json:"uri,omitempty"`
2330
2331
2332
2333
2334 VersionName string `json:"versionName,omitempty"`
2335
2336
2337
2338
2339
2340 ForceSendFields []string `json:"-"`
2341
2342
2343
2344
2345 NullFields []string `json:"-"`
2346 }
2347
2348 func (s *GoogleCloudMlV1__PredictionInput) MarshalJSON() ([]byte, error) {
2349 type NoMethod GoogleCloudMlV1__PredictionInput
2350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2351 }
2352
2353
2354 type GoogleCloudMlV1__PredictionOutput struct {
2355
2356 ErrorCount int64 `json:"errorCount,omitempty,string"`
2357
2358 NodeHours float64 `json:"nodeHours,omitempty"`
2359
2360
2361 OutputPath string `json:"outputPath,omitempty"`
2362
2363 PredictionCount int64 `json:"predictionCount,omitempty,string"`
2364
2365
2366
2367
2368
2369 ForceSendFields []string `json:"-"`
2370
2371
2372
2373
2374 NullFields []string `json:"-"`
2375 }
2376
2377 func (s *GoogleCloudMlV1__PredictionOutput) MarshalJSON() ([]byte, error) {
2378 type NoMethod GoogleCloudMlV1__PredictionOutput
2379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2380 }
2381
2382 func (s *GoogleCloudMlV1__PredictionOutput) UnmarshalJSON(data []byte) error {
2383 type NoMethod GoogleCloudMlV1__PredictionOutput
2384 var s1 struct {
2385 NodeHours gensupport.JSONFloat64 `json:"nodeHours"`
2386 *NoMethod
2387 }
2388 s1.NoMethod = (*NoMethod)(s)
2389 if err := json.Unmarshal(data, &s1); err != nil {
2390 return err
2391 }
2392 s.NodeHours = float64(s1.NodeHours)
2393 return nil
2394 }
2395
2396
2397
2398 type GoogleCloudMlV1__ReplicaConfig struct {
2399
2400
2401
2402
2403 AcceleratorConfig *GoogleCloudMlV1__AcceleratorConfig `json:"acceleratorConfig,omitempty"`
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416 ContainerArgs []string `json:"containerArgs,omitempty"`
2417
2418
2419
2420
2421
2422
2423 ContainerCommand []string `json:"containerCommand,omitempty"`
2424
2425 DiskConfig *GoogleCloudMlV1__DiskConfig `json:"diskConfig,omitempty"`
2426
2427
2428
2429 ImageUri string `json:"imageUri,omitempty"`
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443 TpuTfVersion string `json:"tpuTfVersion,omitempty"`
2444
2445
2446
2447
2448
2449 ForceSendFields []string `json:"-"`
2450
2451
2452
2453
2454 NullFields []string `json:"-"`
2455 }
2456
2457 func (s *GoogleCloudMlV1__ReplicaConfig) MarshalJSON() ([]byte, error) {
2458 type NoMethod GoogleCloudMlV1__ReplicaConfig
2459 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2460 }
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472 type GoogleCloudMlV1__RequestLoggingConfig struct {
2473
2474
2475
2476
2477
2478
2479
2480 BigqueryTableName string `json:"bigqueryTableName,omitempty"`
2481
2482
2483
2484
2485 SamplingPercentage float64 `json:"samplingPercentage,omitempty"`
2486
2487
2488
2489
2490
2491 ForceSendFields []string `json:"-"`
2492
2493
2494
2495
2496 NullFields []string `json:"-"`
2497 }
2498
2499 func (s *GoogleCloudMlV1__RequestLoggingConfig) MarshalJSON() ([]byte, error) {
2500 type NoMethod GoogleCloudMlV1__RequestLoggingConfig
2501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2502 }
2503
2504 func (s *GoogleCloudMlV1__RequestLoggingConfig) UnmarshalJSON(data []byte) error {
2505 type NoMethod GoogleCloudMlV1__RequestLoggingConfig
2506 var s1 struct {
2507 SamplingPercentage gensupport.JSONFloat64 `json:"samplingPercentage"`
2508 *NoMethod
2509 }
2510 s1.NoMethod = (*NoMethod)(s)
2511 if err := json.Unmarshal(data, &s1); err != nil {
2512 return err
2513 }
2514 s.SamplingPercentage = float64(s1.SamplingPercentage)
2515 return nil
2516 }
2517
2518
2519
2520
2521
2522
2523
2524
2525 type GoogleCloudMlV1__RouteMap struct {
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542 Health string `json:"health,omitempty"`
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559 Predict string `json:"predict,omitempty"`
2560
2561
2562
2563
2564
2565 ForceSendFields []string `json:"-"`
2566
2567
2568
2569
2570 NullFields []string `json:"-"`
2571 }
2572
2573 func (s *GoogleCloudMlV1__RouteMap) MarshalJSON() ([]byte, error) {
2574 type NoMethod GoogleCloudMlV1__RouteMap
2575 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2576 }
2577
2578
2579
2580
2581
2582 type GoogleCloudMlV1__SampledShapleyAttribution struct {
2583
2584
2585 NumPaths int64 `json:"numPaths,omitempty"`
2586
2587
2588
2589
2590
2591 ForceSendFields []string `json:"-"`
2592
2593
2594
2595
2596 NullFields []string `json:"-"`
2597 }
2598
2599 func (s *GoogleCloudMlV1__SampledShapleyAttribution) MarshalJSON() ([]byte, error) {
2600 type NoMethod GoogleCloudMlV1__SampledShapleyAttribution
2601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2602 }
2603
2604
2605
2606 type GoogleCloudMlV1__Scheduling struct {
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620 MaxRunningTime string `json:"maxRunningTime,omitempty"`
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643 MaxWaitTime string `json:"maxWaitTime,omitempty"`
2644
2645
2646
2647
2648
2649 Priority int64 `json:"priority,omitempty"`
2650
2651
2652
2653
2654
2655 ForceSendFields []string `json:"-"`
2656
2657
2658
2659
2660 NullFields []string `json:"-"`
2661 }
2662
2663 func (s *GoogleCloudMlV1__Scheduling) MarshalJSON() ([]byte, error) {
2664 type NoMethod GoogleCloudMlV1__Scheduling
2665 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2666 }
2667
2668
2669
2670 type GoogleCloudMlV1__SetDefaultVersionRequest struct {
2671 }
2672
2673 type GoogleCloudMlV1__StopTrialRequest struct {
2674 }
2675
2676
2677 type GoogleCloudMlV1__Study struct {
2678
2679 CreateTime string `json:"createTime,omitempty"`
2680
2681
2682 InactiveReason string `json:"inactiveReason,omitempty"`
2683
2684 Name string `json:"name,omitempty"`
2685
2686
2687
2688
2689
2690
2691
2692
2693 State string `json:"state,omitempty"`
2694
2695 StudyConfig *GoogleCloudMlV1__StudyConfig `json:"studyConfig,omitempty"`
2696
2697
2698 googleapi.ServerResponse `json:"-"`
2699
2700
2701
2702
2703
2704 ForceSendFields []string `json:"-"`
2705
2706
2707
2708
2709 NullFields []string `json:"-"`
2710 }
2711
2712 func (s *GoogleCloudMlV1__Study) MarshalJSON() ([]byte, error) {
2713 type NoMethod GoogleCloudMlV1__Study
2714 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2715 }
2716
2717
2718 type GoogleCloudMlV1__StudyConfig struct {
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728 Algorithm string `json:"algorithm,omitempty"`
2729
2730
2731 AutomatedStoppingConfig *GoogleCloudMlV1__AutomatedStoppingConfig `json:"automatedStoppingConfig,omitempty"`
2732
2733 Metrics []*GoogleCloudMlV1StudyConfigMetricSpec `json:"metrics,omitempty"`
2734
2735 Parameters []*GoogleCloudMlV1StudyConfigParameterSpec `json:"parameters,omitempty"`
2736
2737
2738
2739
2740
2741 ForceSendFields []string `json:"-"`
2742
2743
2744
2745
2746 NullFields []string `json:"-"`
2747 }
2748
2749 func (s *GoogleCloudMlV1__StudyConfig) MarshalJSON() ([]byte, error) {
2750 type NoMethod GoogleCloudMlV1__StudyConfig
2751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2752 }
2753
2754
2755
2756 type GoogleCloudMlV1__SuggestTrialsMetadata struct {
2757
2758 ClientId string `json:"clientId,omitempty"`
2759
2760 CreateTime string `json:"createTime,omitempty"`
2761
2762 Study string `json:"study,omitempty"`
2763
2764 SuggestionCount int64 `json:"suggestionCount,omitempty"`
2765
2766
2767
2768
2769
2770 ForceSendFields []string `json:"-"`
2771
2772
2773
2774
2775 NullFields []string `json:"-"`
2776 }
2777
2778 func (s *GoogleCloudMlV1__SuggestTrialsMetadata) MarshalJSON() ([]byte, error) {
2779 type NoMethod GoogleCloudMlV1__SuggestTrialsMetadata
2780 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2781 }
2782
2783
2784
2785 type GoogleCloudMlV1__SuggestTrialsRequest struct {
2786
2787
2788
2789
2790 ClientId string `json:"clientId,omitempty"`
2791
2792 SuggestionCount int64 `json:"suggestionCount,omitempty"`
2793
2794
2795
2796
2797
2798 ForceSendFields []string `json:"-"`
2799
2800
2801
2802
2803 NullFields []string `json:"-"`
2804 }
2805
2806 func (s *GoogleCloudMlV1__SuggestTrialsRequest) MarshalJSON() ([]byte, error) {
2807 type NoMethod GoogleCloudMlV1__SuggestTrialsRequest
2808 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2809 }
2810
2811
2812
2813
2814 type GoogleCloudMlV1__SuggestTrialsResponse struct {
2815
2816 EndTime string `json:"endTime,omitempty"`
2817
2818 StartTime string `json:"startTime,omitempty"`
2819
2820
2821
2822
2823
2824
2825
2826
2827 StudyState string `json:"studyState,omitempty"`
2828
2829 Trials []*GoogleCloudMlV1__Trial `json:"trials,omitempty"`
2830
2831
2832
2833
2834
2835 ForceSendFields []string `json:"-"`
2836
2837
2838
2839
2840 NullFields []string `json:"-"`
2841 }
2842
2843 func (s *GoogleCloudMlV1__SuggestTrialsResponse) MarshalJSON() ([]byte, error) {
2844 type NoMethod GoogleCloudMlV1__SuggestTrialsResponse
2845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2846 }
2847
2848
2849
2850
2851
2852
2853
2854 type GoogleCloudMlV1__TrainingInput struct {
2855
2856
2857
2858 Args []string `json:"args,omitempty"`
2859
2860
2861
2862
2863
2864
2865 EnableWebAccess bool `json:"enableWebAccess,omitempty"`
2866
2867
2868
2869
2870
2871
2872 EncryptionConfig *GoogleCloudMlV1__EncryptionConfig `json:"encryptionConfig,omitempty"`
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882 EvaluatorConfig *GoogleCloudMlV1__ReplicaConfig `json:"evaluatorConfig,omitempty"`
2883
2884
2885
2886
2887
2888 EvaluatorCount int64 `json:"evaluatorCount,omitempty,string"`
2889
2890
2891
2892
2893
2894
2895
2896 EvaluatorType string `json:"evaluatorType,omitempty"`
2897
2898 Hyperparameters *GoogleCloudMlV1__HyperparameterSpec `json:"hyperparameters,omitempty"`
2899
2900
2901
2902
2903
2904 JobDir string `json:"jobDir,omitempty"`
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914 MasterConfig *GoogleCloudMlV1__ReplicaConfig `json:"masterConfig,omitempty"`
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927 MasterType string `json:"masterType,omitempty"`
2928
2929
2930
2931
2932
2933
2934
2935
2936 Network string `json:"network,omitempty"`
2937
2938
2939
2940 PackageUris []string `json:"packageUris,omitempty"`
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951 ParameterServerConfig *GoogleCloudMlV1__ReplicaConfig `json:"parameterServerConfig,omitempty"`
2952
2953
2954
2955
2956
2957 ParameterServerCount int64 `json:"parameterServerCount,omitempty,string"`
2958
2959
2960
2961
2962
2963
2964
2965 ParameterServerType string `json:"parameterServerType,omitempty"`
2966
2967
2968 PythonModule string `json:"pythonModule,omitempty"`
2969
2970
2971
2972
2973
2974
2975
2976
2977 PythonVersion string `json:"pythonVersion,omitempty"`
2978
2979
2980 Region string `json:"region,omitempty"`
2981
2982
2983
2984
2985
2986 RuntimeVersion string `json:"runtimeVersion,omitempty"`
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014 ScaleTier string `json:"scaleTier,omitempty"`
3015
3016 Scheduling *GoogleCloudMlV1__Scheduling `json:"scheduling,omitempty"`
3017
3018
3019
3020
3021
3022
3023
3024
3025 ServiceAccount string `json:"serviceAccount,omitempty"`
3026
3027
3028
3029
3030
3031
3032 UseChiefInTfConfig bool `json:"useChiefInTfConfig,omitempty"`
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042 WorkerConfig *GoogleCloudMlV1__ReplicaConfig `json:"workerConfig,omitempty"`
3043
3044
3045
3046
3047
3048 WorkerCount int64 `json:"workerCount,omitempty,string"`
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059 WorkerType string `json:"workerType,omitempty"`
3060
3061
3062
3063
3064
3065 ForceSendFields []string `json:"-"`
3066
3067
3068
3069
3070 NullFields []string `json:"-"`
3071 }
3072
3073 func (s *GoogleCloudMlV1__TrainingInput) MarshalJSON() ([]byte, error) {
3074 type NoMethod GoogleCloudMlV1__TrainingInput
3075 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3076 }
3077
3078
3079
3080 type GoogleCloudMlV1__TrainingOutput struct {
3081
3082
3083 BuiltInAlgorithmOutput *GoogleCloudMlV1__BuiltInAlgorithmOutput `json:"builtInAlgorithmOutput,omitempty"`
3084
3085
3086 CompletedTrialCount int64 `json:"completedTrialCount,omitempty,string"`
3087
3088 ConsumedMLUnits float64 `json:"consumedMLUnits,omitempty"`
3089
3090
3091
3092
3093
3094 HyperparameterMetricTag string `json:"hyperparameterMetricTag,omitempty"`
3095
3096 IsBuiltInAlgorithmJob bool `json:"isBuiltInAlgorithmJob,omitempty"`
3097
3098 IsHyperparameterTuningJob bool `json:"isHyperparameterTuningJob,omitempty"`
3099
3100
3101 Trials []*GoogleCloudMlV1__HyperparameterOutput `json:"trials,omitempty"`
3102
3103
3104
3105
3106
3107
3108
3109 WebAccessUris map[string]string `json:"webAccessUris,omitempty"`
3110
3111
3112
3113
3114
3115 ForceSendFields []string `json:"-"`
3116
3117
3118
3119
3120 NullFields []string `json:"-"`
3121 }
3122
3123 func (s *GoogleCloudMlV1__TrainingOutput) MarshalJSON() ([]byte, error) {
3124 type NoMethod GoogleCloudMlV1__TrainingOutput
3125 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3126 }
3127
3128 func (s *GoogleCloudMlV1__TrainingOutput) UnmarshalJSON(data []byte) error {
3129 type NoMethod GoogleCloudMlV1__TrainingOutput
3130 var s1 struct {
3131 ConsumedMLUnits gensupport.JSONFloat64 `json:"consumedMLUnits"`
3132 *NoMethod
3133 }
3134 s1.NoMethod = (*NoMethod)(s)
3135 if err := json.Unmarshal(data, &s1); err != nil {
3136 return err
3137 }
3138 s.ConsumedMLUnits = float64(s1.ConsumedMLUnits)
3139 return nil
3140 }
3141
3142
3143 type GoogleCloudMlV1__Trial struct {
3144
3145
3146 ClientId string `json:"clientId,omitempty"`
3147
3148 EndTime string `json:"endTime,omitempty"`
3149
3150 FinalMeasurement *GoogleCloudMlV1__Measurement `json:"finalMeasurement,omitempty"`
3151
3152
3153 InfeasibleReason string `json:"infeasibleReason,omitempty"`
3154
3155
3156
3157 Measurements []*GoogleCloudMlV1__Measurement `json:"measurements,omitempty"`
3158
3159 Name string `json:"name,omitempty"`
3160
3161 Parameters []*GoogleCloudMlV1TrialParameter `json:"parameters,omitempty"`
3162
3163 StartTime string `json:"startTime,omitempty"`
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175 State string `json:"state,omitempty"`
3176
3177
3178 TrialInfeasible bool `json:"trialInfeasible,omitempty"`
3179
3180
3181 googleapi.ServerResponse `json:"-"`
3182
3183
3184
3185
3186
3187 ForceSendFields []string `json:"-"`
3188
3189
3190
3191
3192 NullFields []string `json:"-"`
3193 }
3194
3195 func (s *GoogleCloudMlV1__Trial) MarshalJSON() ([]byte, error) {
3196 type NoMethod GoogleCloudMlV1__Trial
3197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3198 }
3199
3200
3201
3202
3203
3204 type GoogleCloudMlV1__Version struct {
3205
3206
3207
3208
3209
3210 AcceleratorConfig *GoogleCloudMlV1__AcceleratorConfig `json:"acceleratorConfig,omitempty"`
3211
3212
3213
3214
3215 AutoScaling *GoogleCloudMlV1__AutoScaling `json:"autoScaling,omitempty"`
3216
3217
3218
3219
3220
3221 Container *GoogleCloudMlV1__ContainerSpec `json:"container,omitempty"`
3222
3223 CreateTime string `json:"createTime,omitempty"`
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236 DeploymentUri string `json:"deploymentUri,omitempty"`
3237
3238
3239 Description string `json:"description,omitempty"`
3240
3241 ErrorMessage string `json:"errorMessage,omitempty"`
3242
3243
3244
3245
3246
3247
3248
3249 Etag string `json:"etag,omitempty"`
3250
3251
3252
3253 ExplanationConfig *GoogleCloudMlV1__ExplanationConfig `json:"explanationConfig,omitempty"`
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270 Framework string `json:"framework,omitempty"`
3271
3272
3273
3274 IsDefault bool `json:"isDefault,omitempty"`
3275
3276
3277
3278
3279
3280 Labels map[string]string `json:"labels,omitempty"`
3281
3282
3283
3284
3285 LastMigrationModelId string `json:"lastMigrationModelId,omitempty"`
3286
3287
3288
3289 LastMigrationTime string `json:"lastMigrationTime,omitempty"`
3290
3291 LastUseTime string `json:"lastUseTime,omitempty"`
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301 MachineType string `json:"machineType,omitempty"`
3302
3303
3304
3305
3306
3307
3308 ManualScaling *GoogleCloudMlV1__ManualScaling `json:"manualScaling,omitempty"`
3309
3310
3311 Name string `json:"name,omitempty"`
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324 PackageUris []string `json:"packageUris,omitempty"`
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350 PredictionClass string `json:"predictionClass,omitempty"`
3351
3352
3353
3354
3355
3356
3357
3358 PythonVersion string `json:"pythonVersion,omitempty"`
3359
3360
3361
3362
3363 RequestLoggingConfig *GoogleCloudMlV1__RequestLoggingConfig `json:"requestLoggingConfig,omitempty"`
3364
3365
3366
3367
3368
3369
3370
3371 Routes *GoogleCloudMlV1__RouteMap `json:"routes,omitempty"`
3372
3373
3374
3375
3376 RuntimeVersion string `json:"runtimeVersion,omitempty"`
3377
3378
3379
3380
3381
3382 ServiceAccount string `json:"serviceAccount,omitempty"`
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396 State string `json:"state,omitempty"`
3397
3398
3399 googleapi.ServerResponse `json:"-"`
3400
3401
3402
3403
3404
3405 ForceSendFields []string `json:"-"`
3406
3407
3408
3409
3410 NullFields []string `json:"-"`
3411 }
3412
3413 func (s *GoogleCloudMlV1__Version) MarshalJSON() ([]byte, error) {
3414 type NoMethod GoogleCloudMlV1__Version
3415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3416 }
3417
3418
3419
3420
3421
3422 type GoogleCloudMlV1__XraiAttribution struct {
3423
3424
3425
3426 NumIntegralSteps int64 `json:"numIntegralSteps,omitempty"`
3427
3428
3429
3430
3431
3432 ForceSendFields []string `json:"-"`
3433
3434
3435
3436
3437 NullFields []string `json:"-"`
3438 }
3439
3440 func (s *GoogleCloudMlV1__XraiAttribution) MarshalJSON() ([]byte, error) {
3441 type NoMethod GoogleCloudMlV1__XraiAttribution
3442 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3443 }
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461 type GoogleIamV1__AuditConfig struct {
3462
3463 AuditLogConfigs []*GoogleIamV1__AuditLogConfig `json:"auditLogConfigs,omitempty"`
3464
3465
3466
3467 Service string `json:"service,omitempty"`
3468
3469
3470
3471
3472
3473 ForceSendFields []string `json:"-"`
3474
3475
3476
3477
3478 NullFields []string `json:"-"`
3479 }
3480
3481 func (s *GoogleIamV1__AuditConfig) MarshalJSON() ([]byte, error) {
3482 type NoMethod GoogleIamV1__AuditConfig
3483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3484 }
3485
3486
3487
3488
3489
3490
3491 type GoogleIamV1__AuditLogConfig struct {
3492
3493
3494 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
3495
3496
3497
3498
3499
3500
3501
3502 LogType string `json:"logType,omitempty"`
3503
3504
3505
3506
3507
3508 ForceSendFields []string `json:"-"`
3509
3510
3511
3512
3513 NullFields []string `json:"-"`
3514 }
3515
3516 func (s *GoogleIamV1__AuditLogConfig) MarshalJSON() ([]byte, error) {
3517 type NoMethod GoogleIamV1__AuditLogConfig
3518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3519 }
3520
3521
3522 type GoogleIamV1__Binding struct {
3523
3524
3525
3526
3527
3528
3529
3530
3531 Condition *GoogleType__Expr `json:"condition,omitempty"`
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594 Members []string `json:"members,omitempty"`
3595
3596
3597
3598
3599
3600
3601 Role string `json:"role,omitempty"`
3602
3603
3604
3605
3606
3607 ForceSendFields []string `json:"-"`
3608
3609
3610
3611
3612 NullFields []string `json:"-"`
3613 }
3614
3615 func (s *GoogleIamV1__Binding) MarshalJSON() ([]byte, error) {
3616 type NoMethod GoogleIamV1__Binding
3617 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3618 }
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650 type GoogleIamV1__Policy struct {
3651
3652 AuditConfigs []*GoogleIamV1__AuditConfig `json:"auditConfigs,omitempty"`
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662 Bindings []*GoogleIamV1__Binding `json:"bindings,omitempty"`
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674 Etag string `json:"etag,omitempty"`
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690 Version int64 `json:"version,omitempty"`
3691
3692
3693 googleapi.ServerResponse `json:"-"`
3694
3695
3696
3697
3698
3699 ForceSendFields []string `json:"-"`
3700
3701
3702
3703
3704 NullFields []string `json:"-"`
3705 }
3706
3707 func (s *GoogleIamV1__Policy) MarshalJSON() ([]byte, error) {
3708 type NoMethod GoogleIamV1__Policy
3709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3710 }
3711
3712
3713 type GoogleIamV1__SetIamPolicyRequest struct {
3714
3715
3716
3717
3718 Policy *GoogleIamV1__Policy `json:"policy,omitempty"`
3719
3720
3721
3722 UpdateMask string `json:"updateMask,omitempty"`
3723
3724
3725
3726
3727
3728 ForceSendFields []string `json:"-"`
3729
3730
3731
3732
3733 NullFields []string `json:"-"`
3734 }
3735
3736 func (s *GoogleIamV1__SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
3737 type NoMethod GoogleIamV1__SetIamPolicyRequest
3738 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3739 }
3740
3741
3742
3743 type GoogleIamV1__TestIamPermissionsRequest struct {
3744
3745
3746
3747
3748 Permissions []string `json:"permissions,omitempty"`
3749
3750
3751
3752
3753
3754 ForceSendFields []string `json:"-"`
3755
3756
3757
3758
3759 NullFields []string `json:"-"`
3760 }
3761
3762 func (s *GoogleIamV1__TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3763 type NoMethod GoogleIamV1__TestIamPermissionsRequest
3764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3765 }
3766
3767
3768
3769 type GoogleIamV1__TestIamPermissionsResponse struct {
3770
3771
3772 Permissions []string `json:"permissions,omitempty"`
3773
3774
3775 googleapi.ServerResponse `json:"-"`
3776
3777
3778
3779
3780
3781 ForceSendFields []string `json:"-"`
3782
3783
3784
3785
3786 NullFields []string `json:"-"`
3787 }
3788
3789 func (s *GoogleIamV1__TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3790 type NoMethod GoogleIamV1__TestIamPermissionsResponse
3791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3792 }
3793
3794
3795
3796 type GoogleLongrunning__ListOperationsResponse struct {
3797
3798 NextPageToken string `json:"nextPageToken,omitempty"`
3799
3800
3801 Operations []*GoogleLongrunning__Operation `json:"operations,omitempty"`
3802
3803
3804 googleapi.ServerResponse `json:"-"`
3805
3806
3807
3808
3809
3810 ForceSendFields []string `json:"-"`
3811
3812
3813
3814
3815 NullFields []string `json:"-"`
3816 }
3817
3818 func (s *GoogleLongrunning__ListOperationsResponse) MarshalJSON() ([]byte, error) {
3819 type NoMethod GoogleLongrunning__ListOperationsResponse
3820 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3821 }
3822
3823
3824
3825 type GoogleLongrunning__Operation struct {
3826
3827
3828
3829 Done bool `json:"done,omitempty"`
3830
3831 Error *GoogleRpc__Status `json:"error,omitempty"`
3832
3833
3834
3835
3836 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3837
3838
3839
3840 Name string `json:"name,omitempty"`
3841
3842
3843
3844
3845
3846
3847
3848 Response googleapi.RawMessage `json:"response,omitempty"`
3849
3850
3851 googleapi.ServerResponse `json:"-"`
3852
3853
3854
3855
3856
3857 ForceSendFields []string `json:"-"`
3858
3859
3860
3861
3862 NullFields []string `json:"-"`
3863 }
3864
3865 func (s *GoogleLongrunning__Operation) MarshalJSON() ([]byte, error) {
3866 type NoMethod GoogleLongrunning__Operation
3867 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3868 }
3869
3870
3871
3872
3873
3874
3875 type GoogleProtobuf__Empty struct {
3876
3877 googleapi.ServerResponse `json:"-"`
3878 }
3879
3880
3881
3882
3883
3884
3885
3886 type GoogleRpc__Status struct {
3887
3888 Code int64 `json:"code,omitempty"`
3889
3890
3891 Details []googleapi.RawMessage `json:"details,omitempty"`
3892
3893
3894
3895 Message string `json:"message,omitempty"`
3896
3897
3898
3899
3900
3901 ForceSendFields []string `json:"-"`
3902
3903
3904
3905
3906 NullFields []string `json:"-"`
3907 }
3908
3909 func (s *GoogleRpc__Status) MarshalJSON() ([]byte, error) {
3910 type NoMethod GoogleRpc__Status
3911 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3912 }
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930 type GoogleType__Expr struct {
3931
3932
3933 Description string `json:"description,omitempty"`
3934
3935
3936 Expression string `json:"expression,omitempty"`
3937
3938
3939 Location string `json:"location,omitempty"`
3940
3941
3942
3943 Title string `json:"title,omitempty"`
3944
3945
3946
3947
3948
3949 ForceSendFields []string `json:"-"`
3950
3951
3952
3953
3954 NullFields []string `json:"-"`
3955 }
3956
3957 func (s *GoogleType__Expr) MarshalJSON() ([]byte, error) {
3958 type NoMethod GoogleType__Expr
3959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3960 }
3961
3962 type ProjectsExplainCall struct {
3963 s *Service
3964 name string
3965 googlecloudmlv1__explainrequest *GoogleCloudMlV1__ExplainRequest
3966 urlParams_ gensupport.URLParams
3967 ctx_ context.Context
3968 header_ http.Header
3969 }
3970
3971
3972
3973
3974
3975
3976 func (r *ProjectsService) Explain(name string, googlecloudmlv1__explainrequest *GoogleCloudMlV1__ExplainRequest) *ProjectsExplainCall {
3977 c := &ProjectsExplainCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3978 c.name = name
3979 c.googlecloudmlv1__explainrequest = googlecloudmlv1__explainrequest
3980 return c
3981 }
3982
3983
3984
3985
3986 func (c *ProjectsExplainCall) Fields(s ...googleapi.Field) *ProjectsExplainCall {
3987 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3988 return c
3989 }
3990
3991
3992 func (c *ProjectsExplainCall) Context(ctx context.Context) *ProjectsExplainCall {
3993 c.ctx_ = ctx
3994 return c
3995 }
3996
3997
3998
3999 func (c *ProjectsExplainCall) Header() http.Header {
4000 if c.header_ == nil {
4001 c.header_ = make(http.Header)
4002 }
4003 return c.header_
4004 }
4005
4006 func (c *ProjectsExplainCall) doRequest(alt string) (*http.Response, error) {
4007 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4008 var body io.Reader = nil
4009 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__explainrequest)
4010 if err != nil {
4011 return nil, err
4012 }
4013 c.urlParams_.Set("alt", alt)
4014 c.urlParams_.Set("prettyPrint", "false")
4015 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:explain")
4016 urls += "?" + c.urlParams_.Encode()
4017 req, err := http.NewRequest("POST", urls, body)
4018 if err != nil {
4019 return nil, err
4020 }
4021 req.Header = reqHeaders
4022 googleapi.Expand(req.URL, map[string]string{
4023 "name": c.name,
4024 })
4025 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4026 }
4027
4028
4029
4030
4031
4032
4033
4034 func (c *ProjectsExplainCall) Do(opts ...googleapi.CallOption) (*GoogleApi__HttpBody, error) {
4035 gensupport.SetOptions(c.urlParams_, opts...)
4036 res, err := c.doRequest("json")
4037 if res != nil && res.StatusCode == http.StatusNotModified {
4038 if res.Body != nil {
4039 res.Body.Close()
4040 }
4041 return nil, gensupport.WrapError(&googleapi.Error{
4042 Code: res.StatusCode,
4043 Header: res.Header,
4044 })
4045 }
4046 if err != nil {
4047 return nil, err
4048 }
4049 defer googleapi.CloseBody(res)
4050 if err := googleapi.CheckResponse(res); err != nil {
4051 return nil, gensupport.WrapError(err)
4052 }
4053 ret := &GoogleApi__HttpBody{
4054 ServerResponse: googleapi.ServerResponse{
4055 Header: res.Header,
4056 HTTPStatusCode: res.StatusCode,
4057 },
4058 }
4059 target := &ret
4060 if err := gensupport.DecodeResponse(target, res); err != nil {
4061 return nil, err
4062 }
4063 return ret, nil
4064 }
4065
4066 type ProjectsGetConfigCall struct {
4067 s *Service
4068 name string
4069 urlParams_ gensupport.URLParams
4070 ifNoneMatch_ string
4071 ctx_ context.Context
4072 header_ http.Header
4073 }
4074
4075
4076
4077
4078
4079
4080
4081 func (r *ProjectsService) GetConfig(name string) *ProjectsGetConfigCall {
4082 c := &ProjectsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4083 c.name = name
4084 return c
4085 }
4086
4087
4088
4089
4090 func (c *ProjectsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsGetConfigCall {
4091 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4092 return c
4093 }
4094
4095
4096
4097
4098 func (c *ProjectsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsGetConfigCall {
4099 c.ifNoneMatch_ = entityTag
4100 return c
4101 }
4102
4103
4104 func (c *ProjectsGetConfigCall) Context(ctx context.Context) *ProjectsGetConfigCall {
4105 c.ctx_ = ctx
4106 return c
4107 }
4108
4109
4110
4111 func (c *ProjectsGetConfigCall) Header() http.Header {
4112 if c.header_ == nil {
4113 c.header_ = make(http.Header)
4114 }
4115 return c.header_
4116 }
4117
4118 func (c *ProjectsGetConfigCall) doRequest(alt string) (*http.Response, error) {
4119 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4120 if c.ifNoneMatch_ != "" {
4121 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4122 }
4123 var body io.Reader = nil
4124 c.urlParams_.Set("alt", alt)
4125 c.urlParams_.Set("prettyPrint", "false")
4126 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getConfig")
4127 urls += "?" + c.urlParams_.Encode()
4128 req, err := http.NewRequest("GET", urls, body)
4129 if err != nil {
4130 return nil, err
4131 }
4132 req.Header = reqHeaders
4133 googleapi.Expand(req.URL, map[string]string{
4134 "name": c.name,
4135 })
4136 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4137 }
4138
4139
4140
4141
4142
4143
4144
4145 func (c *ProjectsGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__GetConfigResponse, error) {
4146 gensupport.SetOptions(c.urlParams_, opts...)
4147 res, err := c.doRequest("json")
4148 if res != nil && res.StatusCode == http.StatusNotModified {
4149 if res.Body != nil {
4150 res.Body.Close()
4151 }
4152 return nil, gensupport.WrapError(&googleapi.Error{
4153 Code: res.StatusCode,
4154 Header: res.Header,
4155 })
4156 }
4157 if err != nil {
4158 return nil, err
4159 }
4160 defer googleapi.CloseBody(res)
4161 if err := googleapi.CheckResponse(res); err != nil {
4162 return nil, gensupport.WrapError(err)
4163 }
4164 ret := &GoogleCloudMlV1__GetConfigResponse{
4165 ServerResponse: googleapi.ServerResponse{
4166 Header: res.Header,
4167 HTTPStatusCode: res.StatusCode,
4168 },
4169 }
4170 target := &ret
4171 if err := gensupport.DecodeResponse(target, res); err != nil {
4172 return nil, err
4173 }
4174 return ret, nil
4175 }
4176
4177 type ProjectsPredictCall struct {
4178 s *Service
4179 name string
4180 googlecloudmlv1__predictrequest *GoogleCloudMlV1__PredictRequest
4181 urlParams_ gensupport.URLParams
4182 ctx_ context.Context
4183 header_ http.Header
4184 }
4185
4186
4187
4188
4189
4190
4191 func (r *ProjectsService) Predict(name string, googlecloudmlv1__predictrequest *GoogleCloudMlV1__PredictRequest) *ProjectsPredictCall {
4192 c := &ProjectsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4193 c.name = name
4194 c.googlecloudmlv1__predictrequest = googlecloudmlv1__predictrequest
4195 return c
4196 }
4197
4198
4199
4200
4201 func (c *ProjectsPredictCall) Fields(s ...googleapi.Field) *ProjectsPredictCall {
4202 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4203 return c
4204 }
4205
4206
4207 func (c *ProjectsPredictCall) Context(ctx context.Context) *ProjectsPredictCall {
4208 c.ctx_ = ctx
4209 return c
4210 }
4211
4212
4213
4214 func (c *ProjectsPredictCall) Header() http.Header {
4215 if c.header_ == nil {
4216 c.header_ = make(http.Header)
4217 }
4218 return c.header_
4219 }
4220
4221 func (c *ProjectsPredictCall) doRequest(alt string) (*http.Response, error) {
4222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4223 var body io.Reader = nil
4224 body = strings.NewReader(c.googlecloudmlv1__predictrequest.HttpBody.Data)
4225 c.urlParams_.Set("alt", alt)
4226 c.urlParams_.Set("prettyPrint", "false")
4227 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:predict")
4228 urls += "?" + c.urlParams_.Encode()
4229 req, err := http.NewRequest("POST", urls, body)
4230 if err != nil {
4231 return nil, err
4232 }
4233 req.Header = reqHeaders
4234 googleapi.Expand(req.URL, map[string]string{
4235 "name": c.name,
4236 })
4237 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4238 }
4239
4240
4241
4242
4243
4244
4245
4246 func (c *ProjectsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApi__HttpBody, error) {
4247 gensupport.SetOptions(c.urlParams_, opts...)
4248 res, err := c.doRequest("json")
4249 if res != nil && res.StatusCode == http.StatusNotModified {
4250 if res.Body != nil {
4251 res.Body.Close()
4252 }
4253 return nil, gensupport.WrapError(&googleapi.Error{
4254 Code: res.StatusCode,
4255 Header: res.Header,
4256 })
4257 }
4258 if err != nil {
4259 return nil, err
4260 }
4261 defer googleapi.CloseBody(res)
4262 if err := googleapi.CheckResponse(res); err != nil {
4263 return nil, gensupport.WrapError(err)
4264 }
4265 ret := &GoogleApi__HttpBody{
4266 ServerResponse: googleapi.ServerResponse{
4267 Header: res.Header,
4268 HTTPStatusCode: res.StatusCode,
4269 },
4270 }
4271 target := &ret
4272 var b bytes.Buffer
4273 if _, err := io.Copy(&b, res.Body); err != nil {
4274 return nil, err
4275 }
4276 if err := res.Body.Close(); err != nil {
4277 return nil, err
4278 }
4279 if err := json.NewDecoder(bytes.NewReader(b.Bytes())).Decode(target); err != nil {
4280 return nil, err
4281 }
4282 ret.Data = b.String()
4283 return ret, nil
4284 }
4285
4286 type ProjectsJobsCancelCall struct {
4287 s *Service
4288 name string
4289 googlecloudmlv1__canceljobrequest *GoogleCloudMlV1__CancelJobRequest
4290 urlParams_ gensupport.URLParams
4291 ctx_ context.Context
4292 header_ http.Header
4293 }
4294
4295
4296
4297
4298 func (r *ProjectsJobsService) Cancel(name string, googlecloudmlv1__canceljobrequest *GoogleCloudMlV1__CancelJobRequest) *ProjectsJobsCancelCall {
4299 c := &ProjectsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4300 c.name = name
4301 c.googlecloudmlv1__canceljobrequest = googlecloudmlv1__canceljobrequest
4302 return c
4303 }
4304
4305
4306
4307
4308 func (c *ProjectsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsJobsCancelCall {
4309 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4310 return c
4311 }
4312
4313
4314 func (c *ProjectsJobsCancelCall) Context(ctx context.Context) *ProjectsJobsCancelCall {
4315 c.ctx_ = ctx
4316 return c
4317 }
4318
4319
4320
4321 func (c *ProjectsJobsCancelCall) Header() http.Header {
4322 if c.header_ == nil {
4323 c.header_ = make(http.Header)
4324 }
4325 return c.header_
4326 }
4327
4328 func (c *ProjectsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
4329 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4330 var body io.Reader = nil
4331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__canceljobrequest)
4332 if err != nil {
4333 return nil, err
4334 }
4335 c.urlParams_.Set("alt", alt)
4336 c.urlParams_.Set("prettyPrint", "false")
4337 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4338 urls += "?" + c.urlParams_.Encode()
4339 req, err := http.NewRequest("POST", urls, body)
4340 if err != nil {
4341 return nil, err
4342 }
4343 req.Header = reqHeaders
4344 googleapi.Expand(req.URL, map[string]string{
4345 "name": c.name,
4346 })
4347 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4348 }
4349
4350
4351
4352
4353
4354
4355
4356 func (c *ProjectsJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
4357 gensupport.SetOptions(c.urlParams_, opts...)
4358 res, err := c.doRequest("json")
4359 if res != nil && res.StatusCode == http.StatusNotModified {
4360 if res.Body != nil {
4361 res.Body.Close()
4362 }
4363 return nil, gensupport.WrapError(&googleapi.Error{
4364 Code: res.StatusCode,
4365 Header: res.Header,
4366 })
4367 }
4368 if err != nil {
4369 return nil, err
4370 }
4371 defer googleapi.CloseBody(res)
4372 if err := googleapi.CheckResponse(res); err != nil {
4373 return nil, gensupport.WrapError(err)
4374 }
4375 ret := &GoogleProtobuf__Empty{
4376 ServerResponse: googleapi.ServerResponse{
4377 Header: res.Header,
4378 HTTPStatusCode: res.StatusCode,
4379 },
4380 }
4381 target := &ret
4382 if err := gensupport.DecodeResponse(target, res); err != nil {
4383 return nil, err
4384 }
4385 return ret, nil
4386 }
4387
4388 type ProjectsJobsCreateCall struct {
4389 s *Service
4390 parent string
4391 googlecloudmlv1__job *GoogleCloudMlV1__Job
4392 urlParams_ gensupport.URLParams
4393 ctx_ context.Context
4394 header_ http.Header
4395 }
4396
4397
4398
4399
4400 func (r *ProjectsJobsService) Create(parent string, googlecloudmlv1__job *GoogleCloudMlV1__Job) *ProjectsJobsCreateCall {
4401 c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4402 c.parent = parent
4403 c.googlecloudmlv1__job = googlecloudmlv1__job
4404 return c
4405 }
4406
4407
4408
4409
4410 func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall {
4411 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4412 return c
4413 }
4414
4415
4416 func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
4417 c.ctx_ = ctx
4418 return c
4419 }
4420
4421
4422
4423 func (c *ProjectsJobsCreateCall) Header() http.Header {
4424 if c.header_ == nil {
4425 c.header_ = make(http.Header)
4426 }
4427 return c.header_
4428 }
4429
4430 func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
4431 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4432 var body io.Reader = nil
4433 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__job)
4434 if err != nil {
4435 return nil, err
4436 }
4437 c.urlParams_.Set("alt", alt)
4438 c.urlParams_.Set("prettyPrint", "false")
4439 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
4440 urls += "?" + c.urlParams_.Encode()
4441 req, err := http.NewRequest("POST", urls, body)
4442 if err != nil {
4443 return nil, err
4444 }
4445 req.Header = reqHeaders
4446 googleapi.Expand(req.URL, map[string]string{
4447 "parent": c.parent,
4448 })
4449 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4450 }
4451
4452
4453
4454
4455
4456
4457
4458 func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
4459 gensupport.SetOptions(c.urlParams_, opts...)
4460 res, err := c.doRequest("json")
4461 if res != nil && res.StatusCode == http.StatusNotModified {
4462 if res.Body != nil {
4463 res.Body.Close()
4464 }
4465 return nil, gensupport.WrapError(&googleapi.Error{
4466 Code: res.StatusCode,
4467 Header: res.Header,
4468 })
4469 }
4470 if err != nil {
4471 return nil, err
4472 }
4473 defer googleapi.CloseBody(res)
4474 if err := googleapi.CheckResponse(res); err != nil {
4475 return nil, gensupport.WrapError(err)
4476 }
4477 ret := &GoogleCloudMlV1__Job{
4478 ServerResponse: googleapi.ServerResponse{
4479 Header: res.Header,
4480 HTTPStatusCode: res.StatusCode,
4481 },
4482 }
4483 target := &ret
4484 if err := gensupport.DecodeResponse(target, res); err != nil {
4485 return nil, err
4486 }
4487 return ret, nil
4488 }
4489
4490 type ProjectsJobsGetCall struct {
4491 s *Service
4492 name string
4493 urlParams_ gensupport.URLParams
4494 ifNoneMatch_ string
4495 ctx_ context.Context
4496 header_ http.Header
4497 }
4498
4499
4500
4501
4502 func (r *ProjectsJobsService) Get(name string) *ProjectsJobsGetCall {
4503 c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4504 c.name = name
4505 return c
4506 }
4507
4508
4509
4510
4511 func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall {
4512 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4513 return c
4514 }
4515
4516
4517
4518
4519 func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall {
4520 c.ifNoneMatch_ = entityTag
4521 return c
4522 }
4523
4524
4525 func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
4526 c.ctx_ = ctx
4527 return c
4528 }
4529
4530
4531
4532 func (c *ProjectsJobsGetCall) Header() http.Header {
4533 if c.header_ == nil {
4534 c.header_ = make(http.Header)
4535 }
4536 return c.header_
4537 }
4538
4539 func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
4540 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4541 if c.ifNoneMatch_ != "" {
4542 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4543 }
4544 var body io.Reader = nil
4545 c.urlParams_.Set("alt", alt)
4546 c.urlParams_.Set("prettyPrint", "false")
4547 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4548 urls += "?" + c.urlParams_.Encode()
4549 req, err := http.NewRequest("GET", urls, body)
4550 if err != nil {
4551 return nil, err
4552 }
4553 req.Header = reqHeaders
4554 googleapi.Expand(req.URL, map[string]string{
4555 "name": c.name,
4556 })
4557 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4558 }
4559
4560
4561
4562
4563
4564
4565
4566 func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
4567 gensupport.SetOptions(c.urlParams_, opts...)
4568 res, err := c.doRequest("json")
4569 if res != nil && res.StatusCode == http.StatusNotModified {
4570 if res.Body != nil {
4571 res.Body.Close()
4572 }
4573 return nil, gensupport.WrapError(&googleapi.Error{
4574 Code: res.StatusCode,
4575 Header: res.Header,
4576 })
4577 }
4578 if err != nil {
4579 return nil, err
4580 }
4581 defer googleapi.CloseBody(res)
4582 if err := googleapi.CheckResponse(res); err != nil {
4583 return nil, gensupport.WrapError(err)
4584 }
4585 ret := &GoogleCloudMlV1__Job{
4586 ServerResponse: googleapi.ServerResponse{
4587 Header: res.Header,
4588 HTTPStatusCode: res.StatusCode,
4589 },
4590 }
4591 target := &ret
4592 if err := gensupport.DecodeResponse(target, res); err != nil {
4593 return nil, err
4594 }
4595 return ret, nil
4596 }
4597
4598 type ProjectsJobsGetIamPolicyCall struct {
4599 s *Service
4600 resource string
4601 urlParams_ gensupport.URLParams
4602 ifNoneMatch_ string
4603 ctx_ context.Context
4604 header_ http.Header
4605 }
4606
4607
4608
4609
4610
4611
4612
4613 func (r *ProjectsJobsService) GetIamPolicy(resource string) *ProjectsJobsGetIamPolicyCall {
4614 c := &ProjectsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4615 c.resource = resource
4616 return c
4617 }
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631 func (c *ProjectsJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsJobsGetIamPolicyCall {
4632 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
4633 return c
4634 }
4635
4636
4637
4638
4639 func (c *ProjectsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsGetIamPolicyCall {
4640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4641 return c
4642 }
4643
4644
4645
4646
4647 func (c *ProjectsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsJobsGetIamPolicyCall {
4648 c.ifNoneMatch_ = entityTag
4649 return c
4650 }
4651
4652
4653 func (c *ProjectsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsGetIamPolicyCall {
4654 c.ctx_ = ctx
4655 return c
4656 }
4657
4658
4659
4660 func (c *ProjectsJobsGetIamPolicyCall) Header() http.Header {
4661 if c.header_ == nil {
4662 c.header_ = make(http.Header)
4663 }
4664 return c.header_
4665 }
4666
4667 func (c *ProjectsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4669 if c.ifNoneMatch_ != "" {
4670 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4671 }
4672 var body io.Reader = nil
4673 c.urlParams_.Set("alt", alt)
4674 c.urlParams_.Set("prettyPrint", "false")
4675 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
4676 urls += "?" + c.urlParams_.Encode()
4677 req, err := http.NewRequest("GET", urls, body)
4678 if err != nil {
4679 return nil, err
4680 }
4681 req.Header = reqHeaders
4682 googleapi.Expand(req.URL, map[string]string{
4683 "resource": c.resource,
4684 })
4685 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4686 }
4687
4688
4689
4690
4691
4692
4693
4694 func (c *ProjectsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
4695 gensupport.SetOptions(c.urlParams_, opts...)
4696 res, err := c.doRequest("json")
4697 if res != nil && res.StatusCode == http.StatusNotModified {
4698 if res.Body != nil {
4699 res.Body.Close()
4700 }
4701 return nil, gensupport.WrapError(&googleapi.Error{
4702 Code: res.StatusCode,
4703 Header: res.Header,
4704 })
4705 }
4706 if err != nil {
4707 return nil, err
4708 }
4709 defer googleapi.CloseBody(res)
4710 if err := googleapi.CheckResponse(res); err != nil {
4711 return nil, gensupport.WrapError(err)
4712 }
4713 ret := &GoogleIamV1__Policy{
4714 ServerResponse: googleapi.ServerResponse{
4715 Header: res.Header,
4716 HTTPStatusCode: res.StatusCode,
4717 },
4718 }
4719 target := &ret
4720 if err := gensupport.DecodeResponse(target, res); err != nil {
4721 return nil, err
4722 }
4723 return ret, nil
4724 }
4725
4726 type ProjectsJobsListCall struct {
4727 s *Service
4728 parent string
4729 urlParams_ gensupport.URLParams
4730 ifNoneMatch_ string
4731 ctx_ context.Context
4732 header_ http.Header
4733 }
4734
4735
4736
4737
4738
4739 func (r *ProjectsJobsService) List(parent string) *ProjectsJobsListCall {
4740 c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4741 c.parent = parent
4742 return c
4743 }
4744
4745
4746
4747
4748
4749
4750
4751
4752 func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall {
4753 c.urlParams_.Set("filter", filter)
4754 return c
4755 }
4756
4757
4758
4759
4760
4761
4762 func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall {
4763 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4764 return c
4765 }
4766
4767
4768
4769
4770 func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall {
4771 c.urlParams_.Set("pageToken", pageToken)
4772 return c
4773 }
4774
4775
4776
4777
4778 func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall {
4779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4780 return c
4781 }
4782
4783
4784
4785
4786 func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall {
4787 c.ifNoneMatch_ = entityTag
4788 return c
4789 }
4790
4791
4792 func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
4793 c.ctx_ = ctx
4794 return c
4795 }
4796
4797
4798
4799 func (c *ProjectsJobsListCall) Header() http.Header {
4800 if c.header_ == nil {
4801 c.header_ = make(http.Header)
4802 }
4803 return c.header_
4804 }
4805
4806 func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
4807 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4808 if c.ifNoneMatch_ != "" {
4809 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4810 }
4811 var body io.Reader = nil
4812 c.urlParams_.Set("alt", alt)
4813 c.urlParams_.Set("prettyPrint", "false")
4814 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs")
4815 urls += "?" + c.urlParams_.Encode()
4816 req, err := http.NewRequest("GET", urls, body)
4817 if err != nil {
4818 return nil, err
4819 }
4820 req.Header = reqHeaders
4821 googleapi.Expand(req.URL, map[string]string{
4822 "parent": c.parent,
4823 })
4824 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4825 }
4826
4827
4828
4829
4830
4831
4832
4833 func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListJobsResponse, error) {
4834 gensupport.SetOptions(c.urlParams_, opts...)
4835 res, err := c.doRequest("json")
4836 if res != nil && res.StatusCode == http.StatusNotModified {
4837 if res.Body != nil {
4838 res.Body.Close()
4839 }
4840 return nil, gensupport.WrapError(&googleapi.Error{
4841 Code: res.StatusCode,
4842 Header: res.Header,
4843 })
4844 }
4845 if err != nil {
4846 return nil, err
4847 }
4848 defer googleapi.CloseBody(res)
4849 if err := googleapi.CheckResponse(res); err != nil {
4850 return nil, gensupport.WrapError(err)
4851 }
4852 ret := &GoogleCloudMlV1__ListJobsResponse{
4853 ServerResponse: googleapi.ServerResponse{
4854 Header: res.Header,
4855 HTTPStatusCode: res.StatusCode,
4856 },
4857 }
4858 target := &ret
4859 if err := gensupport.DecodeResponse(target, res); err != nil {
4860 return nil, err
4861 }
4862 return ret, nil
4863 }
4864
4865
4866
4867
4868 func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListJobsResponse) error) error {
4869 c.ctx_ = ctx
4870 defer c.PageToken(c.urlParams_.Get("pageToken"))
4871 for {
4872 x, err := c.Do()
4873 if err != nil {
4874 return err
4875 }
4876 if err := f(x); err != nil {
4877 return err
4878 }
4879 if x.NextPageToken == "" {
4880 return nil
4881 }
4882 c.PageToken(x.NextPageToken)
4883 }
4884 }
4885
4886 type ProjectsJobsPatchCall struct {
4887 s *Service
4888 name string
4889 googlecloudmlv1__job *GoogleCloudMlV1__Job
4890 urlParams_ gensupport.URLParams
4891 ctx_ context.Context
4892 header_ http.Header
4893 }
4894
4895
4896
4897
4898
4899 func (r *ProjectsJobsService) Patch(name string, googlecloudmlv1__job *GoogleCloudMlV1__Job) *ProjectsJobsPatchCall {
4900 c := &ProjectsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4901 c.name = name
4902 c.googlecloudmlv1__job = googlecloudmlv1__job
4903 return c
4904 }
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917 func (c *ProjectsJobsPatchCall) UpdateMask(updateMask string) *ProjectsJobsPatchCall {
4918 c.urlParams_.Set("updateMask", updateMask)
4919 return c
4920 }
4921
4922
4923
4924
4925 func (c *ProjectsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsJobsPatchCall {
4926 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4927 return c
4928 }
4929
4930
4931 func (c *ProjectsJobsPatchCall) Context(ctx context.Context) *ProjectsJobsPatchCall {
4932 c.ctx_ = ctx
4933 return c
4934 }
4935
4936
4937
4938 func (c *ProjectsJobsPatchCall) Header() http.Header {
4939 if c.header_ == nil {
4940 c.header_ = make(http.Header)
4941 }
4942 return c.header_
4943 }
4944
4945 func (c *ProjectsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
4946 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4947 var body io.Reader = nil
4948 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__job)
4949 if err != nil {
4950 return nil, err
4951 }
4952 c.urlParams_.Set("alt", alt)
4953 c.urlParams_.Set("prettyPrint", "false")
4954 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4955 urls += "?" + c.urlParams_.Encode()
4956 req, err := http.NewRequest("PATCH", urls, body)
4957 if err != nil {
4958 return nil, err
4959 }
4960 req.Header = reqHeaders
4961 googleapi.Expand(req.URL, map[string]string{
4962 "name": c.name,
4963 })
4964 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4965 }
4966
4967
4968
4969
4970
4971
4972
4973 func (c *ProjectsJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Job, error) {
4974 gensupport.SetOptions(c.urlParams_, opts...)
4975 res, err := c.doRequest("json")
4976 if res != nil && res.StatusCode == http.StatusNotModified {
4977 if res.Body != nil {
4978 res.Body.Close()
4979 }
4980 return nil, gensupport.WrapError(&googleapi.Error{
4981 Code: res.StatusCode,
4982 Header: res.Header,
4983 })
4984 }
4985 if err != nil {
4986 return nil, err
4987 }
4988 defer googleapi.CloseBody(res)
4989 if err := googleapi.CheckResponse(res); err != nil {
4990 return nil, gensupport.WrapError(err)
4991 }
4992 ret := &GoogleCloudMlV1__Job{
4993 ServerResponse: googleapi.ServerResponse{
4994 Header: res.Header,
4995 HTTPStatusCode: res.StatusCode,
4996 },
4997 }
4998 target := &ret
4999 if err := gensupport.DecodeResponse(target, res); err != nil {
5000 return nil, err
5001 }
5002 return ret, nil
5003 }
5004
5005 type ProjectsJobsSetIamPolicyCall struct {
5006 s *Service
5007 resource string
5008 googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
5009 urlParams_ gensupport.URLParams
5010 ctx_ context.Context
5011 header_ http.Header
5012 }
5013
5014
5015
5016
5017
5018
5019
5020
5021 func (r *ProjectsJobsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsJobsSetIamPolicyCall {
5022 c := &ProjectsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5023 c.resource = resource
5024 c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
5025 return c
5026 }
5027
5028
5029
5030
5031 func (c *ProjectsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsJobsSetIamPolicyCall {
5032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5033 return c
5034 }
5035
5036
5037 func (c *ProjectsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsJobsSetIamPolicyCall {
5038 c.ctx_ = ctx
5039 return c
5040 }
5041
5042
5043
5044 func (c *ProjectsJobsSetIamPolicyCall) Header() http.Header {
5045 if c.header_ == nil {
5046 c.header_ = make(http.Header)
5047 }
5048 return c.header_
5049 }
5050
5051 func (c *ProjectsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5053 var body io.Reader = nil
5054 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
5055 if err != nil {
5056 return nil, err
5057 }
5058 c.urlParams_.Set("alt", alt)
5059 c.urlParams_.Set("prettyPrint", "false")
5060 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
5061 urls += "?" + c.urlParams_.Encode()
5062 req, err := http.NewRequest("POST", urls, body)
5063 if err != nil {
5064 return nil, err
5065 }
5066 req.Header = reqHeaders
5067 googleapi.Expand(req.URL, map[string]string{
5068 "resource": c.resource,
5069 })
5070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5071 }
5072
5073
5074
5075
5076
5077
5078
5079 func (c *ProjectsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
5080 gensupport.SetOptions(c.urlParams_, opts...)
5081 res, err := c.doRequest("json")
5082 if res != nil && res.StatusCode == http.StatusNotModified {
5083 if res.Body != nil {
5084 res.Body.Close()
5085 }
5086 return nil, gensupport.WrapError(&googleapi.Error{
5087 Code: res.StatusCode,
5088 Header: res.Header,
5089 })
5090 }
5091 if err != nil {
5092 return nil, err
5093 }
5094 defer googleapi.CloseBody(res)
5095 if err := googleapi.CheckResponse(res); err != nil {
5096 return nil, gensupport.WrapError(err)
5097 }
5098 ret := &GoogleIamV1__Policy{
5099 ServerResponse: googleapi.ServerResponse{
5100 Header: res.Header,
5101 HTTPStatusCode: res.StatusCode,
5102 },
5103 }
5104 target := &ret
5105 if err := gensupport.DecodeResponse(target, res); err != nil {
5106 return nil, err
5107 }
5108 return ret, nil
5109 }
5110
5111 type ProjectsJobsTestIamPermissionsCall struct {
5112 s *Service
5113 resource string
5114 googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
5115 urlParams_ gensupport.URLParams
5116 ctx_ context.Context
5117 header_ http.Header
5118 }
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130 func (r *ProjectsJobsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsJobsTestIamPermissionsCall {
5131 c := &ProjectsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5132 c.resource = resource
5133 c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
5134 return c
5135 }
5136
5137
5138
5139
5140 func (c *ProjectsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsJobsTestIamPermissionsCall {
5141 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5142 return c
5143 }
5144
5145
5146 func (c *ProjectsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsJobsTestIamPermissionsCall {
5147 c.ctx_ = ctx
5148 return c
5149 }
5150
5151
5152
5153 func (c *ProjectsJobsTestIamPermissionsCall) Header() http.Header {
5154 if c.header_ == nil {
5155 c.header_ = make(http.Header)
5156 }
5157 return c.header_
5158 }
5159
5160 func (c *ProjectsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5161 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5162 var body io.Reader = nil
5163 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
5164 if err != nil {
5165 return nil, err
5166 }
5167 c.urlParams_.Set("alt", alt)
5168 c.urlParams_.Set("prettyPrint", "false")
5169 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
5170 urls += "?" + c.urlParams_.Encode()
5171 req, err := http.NewRequest("POST", urls, body)
5172 if err != nil {
5173 return nil, err
5174 }
5175 req.Header = reqHeaders
5176 googleapi.Expand(req.URL, map[string]string{
5177 "resource": c.resource,
5178 })
5179 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5180 }
5181
5182
5183
5184
5185
5186
5187
5188 func (c *ProjectsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
5189 gensupport.SetOptions(c.urlParams_, opts...)
5190 res, err := c.doRequest("json")
5191 if res != nil && res.StatusCode == http.StatusNotModified {
5192 if res.Body != nil {
5193 res.Body.Close()
5194 }
5195 return nil, gensupport.WrapError(&googleapi.Error{
5196 Code: res.StatusCode,
5197 Header: res.Header,
5198 })
5199 }
5200 if err != nil {
5201 return nil, err
5202 }
5203 defer googleapi.CloseBody(res)
5204 if err := googleapi.CheckResponse(res); err != nil {
5205 return nil, gensupport.WrapError(err)
5206 }
5207 ret := &GoogleIamV1__TestIamPermissionsResponse{
5208 ServerResponse: googleapi.ServerResponse{
5209 Header: res.Header,
5210 HTTPStatusCode: res.StatusCode,
5211 },
5212 }
5213 target := &ret
5214 if err := gensupport.DecodeResponse(target, res); err != nil {
5215 return nil, err
5216 }
5217 return ret, nil
5218 }
5219
5220 type ProjectsLocationsGetCall struct {
5221 s *Service
5222 name string
5223 urlParams_ gensupport.URLParams
5224 ifNoneMatch_ string
5225 ctx_ context.Context
5226 header_ http.Header
5227 }
5228
5229
5230
5231
5232
5233 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
5234 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5235 c.name = name
5236 return c
5237 }
5238
5239
5240
5241
5242 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
5243 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5244 return c
5245 }
5246
5247
5248
5249
5250 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
5251 c.ifNoneMatch_ = entityTag
5252 return c
5253 }
5254
5255
5256 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
5257 c.ctx_ = ctx
5258 return c
5259 }
5260
5261
5262
5263 func (c *ProjectsLocationsGetCall) Header() http.Header {
5264 if c.header_ == nil {
5265 c.header_ = make(http.Header)
5266 }
5267 return c.header_
5268 }
5269
5270 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
5271 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5272 if c.ifNoneMatch_ != "" {
5273 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5274 }
5275 var body io.Reader = nil
5276 c.urlParams_.Set("alt", alt)
5277 c.urlParams_.Set("prettyPrint", "false")
5278 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5279 urls += "?" + c.urlParams_.Encode()
5280 req, err := http.NewRequest("GET", urls, body)
5281 if err != nil {
5282 return nil, err
5283 }
5284 req.Header = reqHeaders
5285 googleapi.Expand(req.URL, map[string]string{
5286 "name": c.name,
5287 })
5288 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5289 }
5290
5291
5292
5293
5294
5295
5296
5297 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Location, error) {
5298 gensupport.SetOptions(c.urlParams_, opts...)
5299 res, err := c.doRequest("json")
5300 if res != nil && res.StatusCode == http.StatusNotModified {
5301 if res.Body != nil {
5302 res.Body.Close()
5303 }
5304 return nil, gensupport.WrapError(&googleapi.Error{
5305 Code: res.StatusCode,
5306 Header: res.Header,
5307 })
5308 }
5309 if err != nil {
5310 return nil, err
5311 }
5312 defer googleapi.CloseBody(res)
5313 if err := googleapi.CheckResponse(res); err != nil {
5314 return nil, gensupport.WrapError(err)
5315 }
5316 ret := &GoogleCloudMlV1__Location{
5317 ServerResponse: googleapi.ServerResponse{
5318 Header: res.Header,
5319 HTTPStatusCode: res.StatusCode,
5320 },
5321 }
5322 target := &ret
5323 if err := gensupport.DecodeResponse(target, res); err != nil {
5324 return nil, err
5325 }
5326 return ret, nil
5327 }
5328
5329 type ProjectsLocationsListCall struct {
5330 s *Service
5331 parent string
5332 urlParams_ gensupport.URLParams
5333 ifNoneMatch_ string
5334 ctx_ context.Context
5335 header_ http.Header
5336 }
5337
5338
5339
5340
5341
5342 func (r *ProjectsLocationsService) List(parent string) *ProjectsLocationsListCall {
5343 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5344 c.parent = parent
5345 return c
5346 }
5347
5348
5349
5350
5351
5352
5353 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
5354 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5355 return c
5356 }
5357
5358
5359
5360
5361 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
5362 c.urlParams_.Set("pageToken", pageToken)
5363 return c
5364 }
5365
5366
5367
5368
5369 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
5370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5371 return c
5372 }
5373
5374
5375
5376
5377 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
5378 c.ifNoneMatch_ = entityTag
5379 return c
5380 }
5381
5382
5383 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
5384 c.ctx_ = ctx
5385 return c
5386 }
5387
5388
5389
5390 func (c *ProjectsLocationsListCall) Header() http.Header {
5391 if c.header_ == nil {
5392 c.header_ = make(http.Header)
5393 }
5394 return c.header_
5395 }
5396
5397 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
5398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5399 if c.ifNoneMatch_ != "" {
5400 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5401 }
5402 var body io.Reader = nil
5403 c.urlParams_.Set("alt", alt)
5404 c.urlParams_.Set("prettyPrint", "false")
5405 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/locations")
5406 urls += "?" + c.urlParams_.Encode()
5407 req, err := http.NewRequest("GET", urls, body)
5408 if err != nil {
5409 return nil, err
5410 }
5411 req.Header = reqHeaders
5412 googleapi.Expand(req.URL, map[string]string{
5413 "parent": c.parent,
5414 })
5415 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5416 }
5417
5418
5419
5420
5421
5422
5423
5424 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListLocationsResponse, error) {
5425 gensupport.SetOptions(c.urlParams_, opts...)
5426 res, err := c.doRequest("json")
5427 if res != nil && res.StatusCode == http.StatusNotModified {
5428 if res.Body != nil {
5429 res.Body.Close()
5430 }
5431 return nil, gensupport.WrapError(&googleapi.Error{
5432 Code: res.StatusCode,
5433 Header: res.Header,
5434 })
5435 }
5436 if err != nil {
5437 return nil, err
5438 }
5439 defer googleapi.CloseBody(res)
5440 if err := googleapi.CheckResponse(res); err != nil {
5441 return nil, gensupport.WrapError(err)
5442 }
5443 ret := &GoogleCloudMlV1__ListLocationsResponse{
5444 ServerResponse: googleapi.ServerResponse{
5445 Header: res.Header,
5446 HTTPStatusCode: res.StatusCode,
5447 },
5448 }
5449 target := &ret
5450 if err := gensupport.DecodeResponse(target, res); err != nil {
5451 return nil, err
5452 }
5453 return ret, nil
5454 }
5455
5456
5457
5458
5459 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListLocationsResponse) error) error {
5460 c.ctx_ = ctx
5461 defer c.PageToken(c.urlParams_.Get("pageToken"))
5462 for {
5463 x, err := c.Do()
5464 if err != nil {
5465 return err
5466 }
5467 if err := f(x); err != nil {
5468 return err
5469 }
5470 if x.NextPageToken == "" {
5471 return nil
5472 }
5473 c.PageToken(x.NextPageToken)
5474 }
5475 }
5476
5477 type ProjectsLocationsOperationsCancelCall struct {
5478 s *Service
5479 name string
5480 urlParams_ gensupport.URLParams
5481 ctx_ context.Context
5482 header_ http.Header
5483 }
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496 func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
5497 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5498 c.name = name
5499 return c
5500 }
5501
5502
5503
5504
5505 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
5506 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5507 return c
5508 }
5509
5510
5511 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
5512 c.ctx_ = ctx
5513 return c
5514 }
5515
5516
5517
5518 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
5519 if c.header_ == nil {
5520 c.header_ = make(http.Header)
5521 }
5522 return c.header_
5523 }
5524
5525 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
5526 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5527 var body io.Reader = nil
5528 c.urlParams_.Set("alt", alt)
5529 c.urlParams_.Set("prettyPrint", "false")
5530 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
5531 urls += "?" + c.urlParams_.Encode()
5532 req, err := http.NewRequest("POST", urls, body)
5533 if err != nil {
5534 return nil, err
5535 }
5536 req.Header = reqHeaders
5537 googleapi.Expand(req.URL, map[string]string{
5538 "name": c.name,
5539 })
5540 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5541 }
5542
5543
5544
5545
5546
5547
5548
5549 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
5550 gensupport.SetOptions(c.urlParams_, opts...)
5551 res, err := c.doRequest("json")
5552 if res != nil && res.StatusCode == http.StatusNotModified {
5553 if res.Body != nil {
5554 res.Body.Close()
5555 }
5556 return nil, gensupport.WrapError(&googleapi.Error{
5557 Code: res.StatusCode,
5558 Header: res.Header,
5559 })
5560 }
5561 if err != nil {
5562 return nil, err
5563 }
5564 defer googleapi.CloseBody(res)
5565 if err := googleapi.CheckResponse(res); err != nil {
5566 return nil, gensupport.WrapError(err)
5567 }
5568 ret := &GoogleProtobuf__Empty{
5569 ServerResponse: googleapi.ServerResponse{
5570 Header: res.Header,
5571 HTTPStatusCode: res.StatusCode,
5572 },
5573 }
5574 target := &ret
5575 if err := gensupport.DecodeResponse(target, res); err != nil {
5576 return nil, err
5577 }
5578 return ret, nil
5579 }
5580
5581 type ProjectsLocationsOperationsGetCall struct {
5582 s *Service
5583 name string
5584 urlParams_ gensupport.URLParams
5585 ifNoneMatch_ string
5586 ctx_ context.Context
5587 header_ http.Header
5588 }
5589
5590
5591
5592
5593
5594
5595 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
5596 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5597 c.name = name
5598 return c
5599 }
5600
5601
5602
5603
5604 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
5605 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5606 return c
5607 }
5608
5609
5610
5611
5612 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
5613 c.ifNoneMatch_ = entityTag
5614 return c
5615 }
5616
5617
5618 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
5619 c.ctx_ = ctx
5620 return c
5621 }
5622
5623
5624
5625 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
5626 if c.header_ == nil {
5627 c.header_ = make(http.Header)
5628 }
5629 return c.header_
5630 }
5631
5632 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
5633 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5634 if c.ifNoneMatch_ != "" {
5635 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5636 }
5637 var body io.Reader = nil
5638 c.urlParams_.Set("alt", alt)
5639 c.urlParams_.Set("prettyPrint", "false")
5640 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5641 urls += "?" + c.urlParams_.Encode()
5642 req, err := http.NewRequest("GET", urls, body)
5643 if err != nil {
5644 return nil, err
5645 }
5646 req.Header = reqHeaders
5647 googleapi.Expand(req.URL, map[string]string{
5648 "name": c.name,
5649 })
5650 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5651 }
5652
5653
5654
5655
5656
5657
5658
5659 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
5660 gensupport.SetOptions(c.urlParams_, opts...)
5661 res, err := c.doRequest("json")
5662 if res != nil && res.StatusCode == http.StatusNotModified {
5663 if res.Body != nil {
5664 res.Body.Close()
5665 }
5666 return nil, gensupport.WrapError(&googleapi.Error{
5667 Code: res.StatusCode,
5668 Header: res.Header,
5669 })
5670 }
5671 if err != nil {
5672 return nil, err
5673 }
5674 defer googleapi.CloseBody(res)
5675 if err := googleapi.CheckResponse(res); err != nil {
5676 return nil, gensupport.WrapError(err)
5677 }
5678 ret := &GoogleLongrunning__Operation{
5679 ServerResponse: googleapi.ServerResponse{
5680 Header: res.Header,
5681 HTTPStatusCode: res.StatusCode,
5682 },
5683 }
5684 target := &ret
5685 if err := gensupport.DecodeResponse(target, res); err != nil {
5686 return nil, err
5687 }
5688 return ret, nil
5689 }
5690
5691 type ProjectsLocationsStudiesCreateCall struct {
5692 s *Service
5693 parent string
5694 googlecloudmlv1__study *GoogleCloudMlV1__Study
5695 urlParams_ gensupport.URLParams
5696 ctx_ context.Context
5697 header_ http.Header
5698 }
5699
5700
5701
5702
5703
5704 func (r *ProjectsLocationsStudiesService) Create(parent string, googlecloudmlv1__study *GoogleCloudMlV1__Study) *ProjectsLocationsStudiesCreateCall {
5705 c := &ProjectsLocationsStudiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5706 c.parent = parent
5707 c.googlecloudmlv1__study = googlecloudmlv1__study
5708 return c
5709 }
5710
5711
5712
5713
5714 func (c *ProjectsLocationsStudiesCreateCall) StudyId(studyId string) *ProjectsLocationsStudiesCreateCall {
5715 c.urlParams_.Set("studyId", studyId)
5716 return c
5717 }
5718
5719
5720
5721
5722 func (c *ProjectsLocationsStudiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesCreateCall {
5723 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5724 return c
5725 }
5726
5727
5728 func (c *ProjectsLocationsStudiesCreateCall) Context(ctx context.Context) *ProjectsLocationsStudiesCreateCall {
5729 c.ctx_ = ctx
5730 return c
5731 }
5732
5733
5734
5735 func (c *ProjectsLocationsStudiesCreateCall) Header() http.Header {
5736 if c.header_ == nil {
5737 c.header_ = make(http.Header)
5738 }
5739 return c.header_
5740 }
5741
5742 func (c *ProjectsLocationsStudiesCreateCall) doRequest(alt string) (*http.Response, error) {
5743 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5744 var body io.Reader = nil
5745 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__study)
5746 if err != nil {
5747 return nil, err
5748 }
5749 c.urlParams_.Set("alt", alt)
5750 c.urlParams_.Set("prettyPrint", "false")
5751 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/studies")
5752 urls += "?" + c.urlParams_.Encode()
5753 req, err := http.NewRequest("POST", urls, body)
5754 if err != nil {
5755 return nil, err
5756 }
5757 req.Header = reqHeaders
5758 googleapi.Expand(req.URL, map[string]string{
5759 "parent": c.parent,
5760 })
5761 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5762 }
5763
5764
5765
5766
5767
5768
5769
5770 func (c *ProjectsLocationsStudiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Study, error) {
5771 gensupport.SetOptions(c.urlParams_, opts...)
5772 res, err := c.doRequest("json")
5773 if res != nil && res.StatusCode == http.StatusNotModified {
5774 if res.Body != nil {
5775 res.Body.Close()
5776 }
5777 return nil, gensupport.WrapError(&googleapi.Error{
5778 Code: res.StatusCode,
5779 Header: res.Header,
5780 })
5781 }
5782 if err != nil {
5783 return nil, err
5784 }
5785 defer googleapi.CloseBody(res)
5786 if err := googleapi.CheckResponse(res); err != nil {
5787 return nil, gensupport.WrapError(err)
5788 }
5789 ret := &GoogleCloudMlV1__Study{
5790 ServerResponse: googleapi.ServerResponse{
5791 Header: res.Header,
5792 HTTPStatusCode: res.StatusCode,
5793 },
5794 }
5795 target := &ret
5796 if err := gensupport.DecodeResponse(target, res); err != nil {
5797 return nil, err
5798 }
5799 return ret, nil
5800 }
5801
5802 type ProjectsLocationsStudiesDeleteCall struct {
5803 s *Service
5804 name string
5805 urlParams_ gensupport.URLParams
5806 ctx_ context.Context
5807 header_ http.Header
5808 }
5809
5810
5811
5812
5813 func (r *ProjectsLocationsStudiesService) Delete(name string) *ProjectsLocationsStudiesDeleteCall {
5814 c := &ProjectsLocationsStudiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5815 c.name = name
5816 return c
5817 }
5818
5819
5820
5821
5822 func (c *ProjectsLocationsStudiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesDeleteCall {
5823 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5824 return c
5825 }
5826
5827
5828 func (c *ProjectsLocationsStudiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStudiesDeleteCall {
5829 c.ctx_ = ctx
5830 return c
5831 }
5832
5833
5834
5835 func (c *ProjectsLocationsStudiesDeleteCall) Header() http.Header {
5836 if c.header_ == nil {
5837 c.header_ = make(http.Header)
5838 }
5839 return c.header_
5840 }
5841
5842 func (c *ProjectsLocationsStudiesDeleteCall) doRequest(alt string) (*http.Response, error) {
5843 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5844 var body io.Reader = nil
5845 c.urlParams_.Set("alt", alt)
5846 c.urlParams_.Set("prettyPrint", "false")
5847 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5848 urls += "?" + c.urlParams_.Encode()
5849 req, err := http.NewRequest("DELETE", urls, body)
5850 if err != nil {
5851 return nil, err
5852 }
5853 req.Header = reqHeaders
5854 googleapi.Expand(req.URL, map[string]string{
5855 "name": c.name,
5856 })
5857 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5858 }
5859
5860
5861
5862
5863
5864
5865
5866 func (c *ProjectsLocationsStudiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
5867 gensupport.SetOptions(c.urlParams_, opts...)
5868 res, err := c.doRequest("json")
5869 if res != nil && res.StatusCode == http.StatusNotModified {
5870 if res.Body != nil {
5871 res.Body.Close()
5872 }
5873 return nil, gensupport.WrapError(&googleapi.Error{
5874 Code: res.StatusCode,
5875 Header: res.Header,
5876 })
5877 }
5878 if err != nil {
5879 return nil, err
5880 }
5881 defer googleapi.CloseBody(res)
5882 if err := googleapi.CheckResponse(res); err != nil {
5883 return nil, gensupport.WrapError(err)
5884 }
5885 ret := &GoogleProtobuf__Empty{
5886 ServerResponse: googleapi.ServerResponse{
5887 Header: res.Header,
5888 HTTPStatusCode: res.StatusCode,
5889 },
5890 }
5891 target := &ret
5892 if err := gensupport.DecodeResponse(target, res); err != nil {
5893 return nil, err
5894 }
5895 return ret, nil
5896 }
5897
5898 type ProjectsLocationsStudiesGetCall struct {
5899 s *Service
5900 name string
5901 urlParams_ gensupport.URLParams
5902 ifNoneMatch_ string
5903 ctx_ context.Context
5904 header_ http.Header
5905 }
5906
5907
5908
5909
5910 func (r *ProjectsLocationsStudiesService) Get(name string) *ProjectsLocationsStudiesGetCall {
5911 c := &ProjectsLocationsStudiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5912 c.name = name
5913 return c
5914 }
5915
5916
5917
5918
5919 func (c *ProjectsLocationsStudiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesGetCall {
5920 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5921 return c
5922 }
5923
5924
5925
5926
5927 func (c *ProjectsLocationsStudiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesGetCall {
5928 c.ifNoneMatch_ = entityTag
5929 return c
5930 }
5931
5932
5933 func (c *ProjectsLocationsStudiesGetCall) Context(ctx context.Context) *ProjectsLocationsStudiesGetCall {
5934 c.ctx_ = ctx
5935 return c
5936 }
5937
5938
5939
5940 func (c *ProjectsLocationsStudiesGetCall) Header() http.Header {
5941 if c.header_ == nil {
5942 c.header_ = make(http.Header)
5943 }
5944 return c.header_
5945 }
5946
5947 func (c *ProjectsLocationsStudiesGetCall) doRequest(alt string) (*http.Response, error) {
5948 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5949 if c.ifNoneMatch_ != "" {
5950 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5951 }
5952 var body io.Reader = nil
5953 c.urlParams_.Set("alt", alt)
5954 c.urlParams_.Set("prettyPrint", "false")
5955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5956 urls += "?" + c.urlParams_.Encode()
5957 req, err := http.NewRequest("GET", urls, body)
5958 if err != nil {
5959 return nil, err
5960 }
5961 req.Header = reqHeaders
5962 googleapi.Expand(req.URL, map[string]string{
5963 "name": c.name,
5964 })
5965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5966 }
5967
5968
5969
5970
5971
5972
5973
5974 func (c *ProjectsLocationsStudiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Study, error) {
5975 gensupport.SetOptions(c.urlParams_, opts...)
5976 res, err := c.doRequest("json")
5977 if res != nil && res.StatusCode == http.StatusNotModified {
5978 if res.Body != nil {
5979 res.Body.Close()
5980 }
5981 return nil, gensupport.WrapError(&googleapi.Error{
5982 Code: res.StatusCode,
5983 Header: res.Header,
5984 })
5985 }
5986 if err != nil {
5987 return nil, err
5988 }
5989 defer googleapi.CloseBody(res)
5990 if err := googleapi.CheckResponse(res); err != nil {
5991 return nil, gensupport.WrapError(err)
5992 }
5993 ret := &GoogleCloudMlV1__Study{
5994 ServerResponse: googleapi.ServerResponse{
5995 Header: res.Header,
5996 HTTPStatusCode: res.StatusCode,
5997 },
5998 }
5999 target := &ret
6000 if err := gensupport.DecodeResponse(target, res); err != nil {
6001 return nil, err
6002 }
6003 return ret, nil
6004 }
6005
6006 type ProjectsLocationsStudiesListCall struct {
6007 s *Service
6008 parent string
6009 urlParams_ gensupport.URLParams
6010 ifNoneMatch_ string
6011 ctx_ context.Context
6012 header_ http.Header
6013 }
6014
6015
6016
6017
6018
6019 func (r *ProjectsLocationsStudiesService) List(parent string) *ProjectsLocationsStudiesListCall {
6020 c := &ProjectsLocationsStudiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6021 c.parent = parent
6022 return c
6023 }
6024
6025
6026
6027
6028 func (c *ProjectsLocationsStudiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesListCall {
6029 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6030 return c
6031 }
6032
6033
6034
6035
6036 func (c *ProjectsLocationsStudiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesListCall {
6037 c.ifNoneMatch_ = entityTag
6038 return c
6039 }
6040
6041
6042 func (c *ProjectsLocationsStudiesListCall) Context(ctx context.Context) *ProjectsLocationsStudiesListCall {
6043 c.ctx_ = ctx
6044 return c
6045 }
6046
6047
6048
6049 func (c *ProjectsLocationsStudiesListCall) Header() http.Header {
6050 if c.header_ == nil {
6051 c.header_ = make(http.Header)
6052 }
6053 return c.header_
6054 }
6055
6056 func (c *ProjectsLocationsStudiesListCall) doRequest(alt string) (*http.Response, error) {
6057 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6058 if c.ifNoneMatch_ != "" {
6059 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6060 }
6061 var body io.Reader = nil
6062 c.urlParams_.Set("alt", alt)
6063 c.urlParams_.Set("prettyPrint", "false")
6064 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/studies")
6065 urls += "?" + c.urlParams_.Encode()
6066 req, err := http.NewRequest("GET", urls, body)
6067 if err != nil {
6068 return nil, err
6069 }
6070 req.Header = reqHeaders
6071 googleapi.Expand(req.URL, map[string]string{
6072 "parent": c.parent,
6073 })
6074 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6075 }
6076
6077
6078
6079
6080
6081
6082
6083 func (c *ProjectsLocationsStudiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListStudiesResponse, error) {
6084 gensupport.SetOptions(c.urlParams_, opts...)
6085 res, err := c.doRequest("json")
6086 if res != nil && res.StatusCode == http.StatusNotModified {
6087 if res.Body != nil {
6088 res.Body.Close()
6089 }
6090 return nil, gensupport.WrapError(&googleapi.Error{
6091 Code: res.StatusCode,
6092 Header: res.Header,
6093 })
6094 }
6095 if err != nil {
6096 return nil, err
6097 }
6098 defer googleapi.CloseBody(res)
6099 if err := googleapi.CheckResponse(res); err != nil {
6100 return nil, gensupport.WrapError(err)
6101 }
6102 ret := &GoogleCloudMlV1__ListStudiesResponse{
6103 ServerResponse: googleapi.ServerResponse{
6104 Header: res.Header,
6105 HTTPStatusCode: res.StatusCode,
6106 },
6107 }
6108 target := &ret
6109 if err := gensupport.DecodeResponse(target, res); err != nil {
6110 return nil, err
6111 }
6112 return ret, nil
6113 }
6114
6115 type ProjectsLocationsStudiesTrialsAddMeasurementCall struct {
6116 s *Service
6117 name string
6118 googlecloudmlv1__addtrialmeasurementrequest *GoogleCloudMlV1__AddTrialMeasurementRequest
6119 urlParams_ gensupport.URLParams
6120 ctx_ context.Context
6121 header_ http.Header
6122 }
6123
6124
6125
6126
6127
6128 func (r *ProjectsLocationsStudiesTrialsService) AddMeasurement(name string, googlecloudmlv1__addtrialmeasurementrequest *GoogleCloudMlV1__AddTrialMeasurementRequest) *ProjectsLocationsStudiesTrialsAddMeasurementCall {
6129 c := &ProjectsLocationsStudiesTrialsAddMeasurementCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6130 c.name = name
6131 c.googlecloudmlv1__addtrialmeasurementrequest = googlecloudmlv1__addtrialmeasurementrequest
6132 return c
6133 }
6134
6135
6136
6137
6138 func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsAddMeasurementCall {
6139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6140 return c
6141 }
6142
6143
6144 func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsAddMeasurementCall {
6145 c.ctx_ = ctx
6146 return c
6147 }
6148
6149
6150
6151 func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Header() http.Header {
6152 if c.header_ == nil {
6153 c.header_ = make(http.Header)
6154 }
6155 return c.header_
6156 }
6157
6158 func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) doRequest(alt string) (*http.Response, error) {
6159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6160 var body io.Reader = nil
6161 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__addtrialmeasurementrequest)
6162 if err != nil {
6163 return nil, err
6164 }
6165 c.urlParams_.Set("alt", alt)
6166 c.urlParams_.Set("prettyPrint", "false")
6167 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:addMeasurement")
6168 urls += "?" + c.urlParams_.Encode()
6169 req, err := http.NewRequest("POST", urls, body)
6170 if err != nil {
6171 return nil, err
6172 }
6173 req.Header = reqHeaders
6174 googleapi.Expand(req.URL, map[string]string{
6175 "name": c.name,
6176 })
6177 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6178 }
6179
6180
6181
6182
6183
6184
6185
6186 func (c *ProjectsLocationsStudiesTrialsAddMeasurementCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
6187 gensupport.SetOptions(c.urlParams_, opts...)
6188 res, err := c.doRequest("json")
6189 if res != nil && res.StatusCode == http.StatusNotModified {
6190 if res.Body != nil {
6191 res.Body.Close()
6192 }
6193 return nil, gensupport.WrapError(&googleapi.Error{
6194 Code: res.StatusCode,
6195 Header: res.Header,
6196 })
6197 }
6198 if err != nil {
6199 return nil, err
6200 }
6201 defer googleapi.CloseBody(res)
6202 if err := googleapi.CheckResponse(res); err != nil {
6203 return nil, gensupport.WrapError(err)
6204 }
6205 ret := &GoogleCloudMlV1__Trial{
6206 ServerResponse: googleapi.ServerResponse{
6207 Header: res.Header,
6208 HTTPStatusCode: res.StatusCode,
6209 },
6210 }
6211 target := &ret
6212 if err := gensupport.DecodeResponse(target, res); err != nil {
6213 return nil, err
6214 }
6215 return ret, nil
6216 }
6217
6218 type ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall struct {
6219 s *Service
6220 name string
6221 googlecloudmlv1__checktrialearlystoppingstaterequest *GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest
6222 urlParams_ gensupport.URLParams
6223 ctx_ context.Context
6224 header_ http.Header
6225 }
6226
6227
6228
6229
6230
6231
6232 func (r *ProjectsLocationsStudiesTrialsService) CheckEarlyStoppingState(name string, googlecloudmlv1__checktrialearlystoppingstaterequest *GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest) *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall {
6233 c := &ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6234 c.name = name
6235 c.googlecloudmlv1__checktrialearlystoppingstaterequest = googlecloudmlv1__checktrialearlystoppingstaterequest
6236 return c
6237 }
6238
6239
6240
6241
6242 func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall {
6243 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6244 return c
6245 }
6246
6247
6248 func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall {
6249 c.ctx_ = ctx
6250 return c
6251 }
6252
6253
6254
6255 func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Header() http.Header {
6256 if c.header_ == nil {
6257 c.header_ = make(http.Header)
6258 }
6259 return c.header_
6260 }
6261
6262 func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) doRequest(alt string) (*http.Response, error) {
6263 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6264 var body io.Reader = nil
6265 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__checktrialearlystoppingstaterequest)
6266 if err != nil {
6267 return nil, err
6268 }
6269 c.urlParams_.Set("alt", alt)
6270 c.urlParams_.Set("prettyPrint", "false")
6271 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:checkEarlyStoppingState")
6272 urls += "?" + c.urlParams_.Encode()
6273 req, err := http.NewRequest("POST", urls, body)
6274 if err != nil {
6275 return nil, err
6276 }
6277 req.Header = reqHeaders
6278 googleapi.Expand(req.URL, map[string]string{
6279 "name": c.name,
6280 })
6281 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6282 }
6283
6284
6285
6286
6287
6288
6289
6290 func (c *ProjectsLocationsStudiesTrialsCheckEarlyStoppingStateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
6291 gensupport.SetOptions(c.urlParams_, opts...)
6292 res, err := c.doRequest("json")
6293 if res != nil && res.StatusCode == http.StatusNotModified {
6294 if res.Body != nil {
6295 res.Body.Close()
6296 }
6297 return nil, gensupport.WrapError(&googleapi.Error{
6298 Code: res.StatusCode,
6299 Header: res.Header,
6300 })
6301 }
6302 if err != nil {
6303 return nil, err
6304 }
6305 defer googleapi.CloseBody(res)
6306 if err := googleapi.CheckResponse(res); err != nil {
6307 return nil, gensupport.WrapError(err)
6308 }
6309 ret := &GoogleLongrunning__Operation{
6310 ServerResponse: googleapi.ServerResponse{
6311 Header: res.Header,
6312 HTTPStatusCode: res.StatusCode,
6313 },
6314 }
6315 target := &ret
6316 if err := gensupport.DecodeResponse(target, res); err != nil {
6317 return nil, err
6318 }
6319 return ret, nil
6320 }
6321
6322 type ProjectsLocationsStudiesTrialsCompleteCall struct {
6323 s *Service
6324 name string
6325 googlecloudmlv1__completetrialrequest *GoogleCloudMlV1__CompleteTrialRequest
6326 urlParams_ gensupport.URLParams
6327 ctx_ context.Context
6328 header_ http.Header
6329 }
6330
6331
6332
6333
6334 func (r *ProjectsLocationsStudiesTrialsService) Complete(name string, googlecloudmlv1__completetrialrequest *GoogleCloudMlV1__CompleteTrialRequest) *ProjectsLocationsStudiesTrialsCompleteCall {
6335 c := &ProjectsLocationsStudiesTrialsCompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6336 c.name = name
6337 c.googlecloudmlv1__completetrialrequest = googlecloudmlv1__completetrialrequest
6338 return c
6339 }
6340
6341
6342
6343
6344 func (c *ProjectsLocationsStudiesTrialsCompleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsCompleteCall {
6345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6346 return c
6347 }
6348
6349
6350 func (c *ProjectsLocationsStudiesTrialsCompleteCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsCompleteCall {
6351 c.ctx_ = ctx
6352 return c
6353 }
6354
6355
6356
6357 func (c *ProjectsLocationsStudiesTrialsCompleteCall) Header() http.Header {
6358 if c.header_ == nil {
6359 c.header_ = make(http.Header)
6360 }
6361 return c.header_
6362 }
6363
6364 func (c *ProjectsLocationsStudiesTrialsCompleteCall) doRequest(alt string) (*http.Response, error) {
6365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6366 var body io.Reader = nil
6367 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__completetrialrequest)
6368 if err != nil {
6369 return nil, err
6370 }
6371 c.urlParams_.Set("alt", alt)
6372 c.urlParams_.Set("prettyPrint", "false")
6373 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:complete")
6374 urls += "?" + c.urlParams_.Encode()
6375 req, err := http.NewRequest("POST", urls, body)
6376 if err != nil {
6377 return nil, err
6378 }
6379 req.Header = reqHeaders
6380 googleapi.Expand(req.URL, map[string]string{
6381 "name": c.name,
6382 })
6383 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6384 }
6385
6386
6387
6388
6389
6390
6391
6392 func (c *ProjectsLocationsStudiesTrialsCompleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
6393 gensupport.SetOptions(c.urlParams_, opts...)
6394 res, err := c.doRequest("json")
6395 if res != nil && res.StatusCode == http.StatusNotModified {
6396 if res.Body != nil {
6397 res.Body.Close()
6398 }
6399 return nil, gensupport.WrapError(&googleapi.Error{
6400 Code: res.StatusCode,
6401 Header: res.Header,
6402 })
6403 }
6404 if err != nil {
6405 return nil, err
6406 }
6407 defer googleapi.CloseBody(res)
6408 if err := googleapi.CheckResponse(res); err != nil {
6409 return nil, gensupport.WrapError(err)
6410 }
6411 ret := &GoogleCloudMlV1__Trial{
6412 ServerResponse: googleapi.ServerResponse{
6413 Header: res.Header,
6414 HTTPStatusCode: res.StatusCode,
6415 },
6416 }
6417 target := &ret
6418 if err := gensupport.DecodeResponse(target, res); err != nil {
6419 return nil, err
6420 }
6421 return ret, nil
6422 }
6423
6424 type ProjectsLocationsStudiesTrialsCreateCall struct {
6425 s *Service
6426 parent string
6427 googlecloudmlv1__trial *GoogleCloudMlV1__Trial
6428 urlParams_ gensupport.URLParams
6429 ctx_ context.Context
6430 header_ http.Header
6431 }
6432
6433
6434
6435
6436 func (r *ProjectsLocationsStudiesTrialsService) Create(parent string, googlecloudmlv1__trial *GoogleCloudMlV1__Trial) *ProjectsLocationsStudiesTrialsCreateCall {
6437 c := &ProjectsLocationsStudiesTrialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6438 c.parent = parent
6439 c.googlecloudmlv1__trial = googlecloudmlv1__trial
6440 return c
6441 }
6442
6443
6444
6445
6446 func (c *ProjectsLocationsStudiesTrialsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsCreateCall {
6447 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6448 return c
6449 }
6450
6451
6452 func (c *ProjectsLocationsStudiesTrialsCreateCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsCreateCall {
6453 c.ctx_ = ctx
6454 return c
6455 }
6456
6457
6458
6459 func (c *ProjectsLocationsStudiesTrialsCreateCall) Header() http.Header {
6460 if c.header_ == nil {
6461 c.header_ = make(http.Header)
6462 }
6463 return c.header_
6464 }
6465
6466 func (c *ProjectsLocationsStudiesTrialsCreateCall) doRequest(alt string) (*http.Response, error) {
6467 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6468 var body io.Reader = nil
6469 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__trial)
6470 if err != nil {
6471 return nil, err
6472 }
6473 c.urlParams_.Set("alt", alt)
6474 c.urlParams_.Set("prettyPrint", "false")
6475 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials")
6476 urls += "?" + c.urlParams_.Encode()
6477 req, err := http.NewRequest("POST", urls, body)
6478 if err != nil {
6479 return nil, err
6480 }
6481 req.Header = reqHeaders
6482 googleapi.Expand(req.URL, map[string]string{
6483 "parent": c.parent,
6484 })
6485 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6486 }
6487
6488
6489
6490
6491
6492
6493
6494 func (c *ProjectsLocationsStudiesTrialsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
6495 gensupport.SetOptions(c.urlParams_, opts...)
6496 res, err := c.doRequest("json")
6497 if res != nil && res.StatusCode == http.StatusNotModified {
6498 if res.Body != nil {
6499 res.Body.Close()
6500 }
6501 return nil, gensupport.WrapError(&googleapi.Error{
6502 Code: res.StatusCode,
6503 Header: res.Header,
6504 })
6505 }
6506 if err != nil {
6507 return nil, err
6508 }
6509 defer googleapi.CloseBody(res)
6510 if err := googleapi.CheckResponse(res); err != nil {
6511 return nil, gensupport.WrapError(err)
6512 }
6513 ret := &GoogleCloudMlV1__Trial{
6514 ServerResponse: googleapi.ServerResponse{
6515 Header: res.Header,
6516 HTTPStatusCode: res.StatusCode,
6517 },
6518 }
6519 target := &ret
6520 if err := gensupport.DecodeResponse(target, res); err != nil {
6521 return nil, err
6522 }
6523 return ret, nil
6524 }
6525
6526 type ProjectsLocationsStudiesTrialsDeleteCall struct {
6527 s *Service
6528 name string
6529 urlParams_ gensupport.URLParams
6530 ctx_ context.Context
6531 header_ http.Header
6532 }
6533
6534
6535
6536
6537 func (r *ProjectsLocationsStudiesTrialsService) Delete(name string) *ProjectsLocationsStudiesTrialsDeleteCall {
6538 c := &ProjectsLocationsStudiesTrialsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6539 c.name = name
6540 return c
6541 }
6542
6543
6544
6545
6546 func (c *ProjectsLocationsStudiesTrialsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsDeleteCall {
6547 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6548 return c
6549 }
6550
6551
6552 func (c *ProjectsLocationsStudiesTrialsDeleteCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsDeleteCall {
6553 c.ctx_ = ctx
6554 return c
6555 }
6556
6557
6558
6559 func (c *ProjectsLocationsStudiesTrialsDeleteCall) Header() http.Header {
6560 if c.header_ == nil {
6561 c.header_ = make(http.Header)
6562 }
6563 return c.header_
6564 }
6565
6566 func (c *ProjectsLocationsStudiesTrialsDeleteCall) doRequest(alt string) (*http.Response, error) {
6567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6568 var body io.Reader = nil
6569 c.urlParams_.Set("alt", alt)
6570 c.urlParams_.Set("prettyPrint", "false")
6571 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6572 urls += "?" + c.urlParams_.Encode()
6573 req, err := http.NewRequest("DELETE", urls, body)
6574 if err != nil {
6575 return nil, err
6576 }
6577 req.Header = reqHeaders
6578 googleapi.Expand(req.URL, map[string]string{
6579 "name": c.name,
6580 })
6581 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6582 }
6583
6584
6585
6586
6587
6588
6589
6590 func (c *ProjectsLocationsStudiesTrialsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
6591 gensupport.SetOptions(c.urlParams_, opts...)
6592 res, err := c.doRequest("json")
6593 if res != nil && res.StatusCode == http.StatusNotModified {
6594 if res.Body != nil {
6595 res.Body.Close()
6596 }
6597 return nil, gensupport.WrapError(&googleapi.Error{
6598 Code: res.StatusCode,
6599 Header: res.Header,
6600 })
6601 }
6602 if err != nil {
6603 return nil, err
6604 }
6605 defer googleapi.CloseBody(res)
6606 if err := googleapi.CheckResponse(res); err != nil {
6607 return nil, gensupport.WrapError(err)
6608 }
6609 ret := &GoogleProtobuf__Empty{
6610 ServerResponse: googleapi.ServerResponse{
6611 Header: res.Header,
6612 HTTPStatusCode: res.StatusCode,
6613 },
6614 }
6615 target := &ret
6616 if err := gensupport.DecodeResponse(target, res); err != nil {
6617 return nil, err
6618 }
6619 return ret, nil
6620 }
6621
6622 type ProjectsLocationsStudiesTrialsGetCall struct {
6623 s *Service
6624 name string
6625 urlParams_ gensupport.URLParams
6626 ifNoneMatch_ string
6627 ctx_ context.Context
6628 header_ http.Header
6629 }
6630
6631
6632
6633
6634 func (r *ProjectsLocationsStudiesTrialsService) Get(name string) *ProjectsLocationsStudiesTrialsGetCall {
6635 c := &ProjectsLocationsStudiesTrialsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6636 c.name = name
6637 return c
6638 }
6639
6640
6641
6642
6643 func (c *ProjectsLocationsStudiesTrialsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsGetCall {
6644 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6645 return c
6646 }
6647
6648
6649
6650
6651 func (c *ProjectsLocationsStudiesTrialsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesTrialsGetCall {
6652 c.ifNoneMatch_ = entityTag
6653 return c
6654 }
6655
6656
6657 func (c *ProjectsLocationsStudiesTrialsGetCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsGetCall {
6658 c.ctx_ = ctx
6659 return c
6660 }
6661
6662
6663
6664 func (c *ProjectsLocationsStudiesTrialsGetCall) Header() http.Header {
6665 if c.header_ == nil {
6666 c.header_ = make(http.Header)
6667 }
6668 return c.header_
6669 }
6670
6671 func (c *ProjectsLocationsStudiesTrialsGetCall) doRequest(alt string) (*http.Response, error) {
6672 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6673 if c.ifNoneMatch_ != "" {
6674 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6675 }
6676 var body io.Reader = nil
6677 c.urlParams_.Set("alt", alt)
6678 c.urlParams_.Set("prettyPrint", "false")
6679 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6680 urls += "?" + c.urlParams_.Encode()
6681 req, err := http.NewRequest("GET", urls, body)
6682 if err != nil {
6683 return nil, err
6684 }
6685 req.Header = reqHeaders
6686 googleapi.Expand(req.URL, map[string]string{
6687 "name": c.name,
6688 })
6689 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6690 }
6691
6692
6693
6694
6695
6696
6697
6698 func (c *ProjectsLocationsStudiesTrialsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
6699 gensupport.SetOptions(c.urlParams_, opts...)
6700 res, err := c.doRequest("json")
6701 if res != nil && res.StatusCode == http.StatusNotModified {
6702 if res.Body != nil {
6703 res.Body.Close()
6704 }
6705 return nil, gensupport.WrapError(&googleapi.Error{
6706 Code: res.StatusCode,
6707 Header: res.Header,
6708 })
6709 }
6710 if err != nil {
6711 return nil, err
6712 }
6713 defer googleapi.CloseBody(res)
6714 if err := googleapi.CheckResponse(res); err != nil {
6715 return nil, gensupport.WrapError(err)
6716 }
6717 ret := &GoogleCloudMlV1__Trial{
6718 ServerResponse: googleapi.ServerResponse{
6719 Header: res.Header,
6720 HTTPStatusCode: res.StatusCode,
6721 },
6722 }
6723 target := &ret
6724 if err := gensupport.DecodeResponse(target, res); err != nil {
6725 return nil, err
6726 }
6727 return ret, nil
6728 }
6729
6730 type ProjectsLocationsStudiesTrialsListCall struct {
6731 s *Service
6732 parent string
6733 urlParams_ gensupport.URLParams
6734 ifNoneMatch_ string
6735 ctx_ context.Context
6736 header_ http.Header
6737 }
6738
6739
6740
6741
6742 func (r *ProjectsLocationsStudiesTrialsService) List(parent string) *ProjectsLocationsStudiesTrialsListCall {
6743 c := &ProjectsLocationsStudiesTrialsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6744 c.parent = parent
6745 return c
6746 }
6747
6748
6749
6750
6751 func (c *ProjectsLocationsStudiesTrialsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsListCall {
6752 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6753 return c
6754 }
6755
6756
6757
6758
6759 func (c *ProjectsLocationsStudiesTrialsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStudiesTrialsListCall {
6760 c.ifNoneMatch_ = entityTag
6761 return c
6762 }
6763
6764
6765 func (c *ProjectsLocationsStudiesTrialsListCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsListCall {
6766 c.ctx_ = ctx
6767 return c
6768 }
6769
6770
6771
6772 func (c *ProjectsLocationsStudiesTrialsListCall) Header() http.Header {
6773 if c.header_ == nil {
6774 c.header_ = make(http.Header)
6775 }
6776 return c.header_
6777 }
6778
6779 func (c *ProjectsLocationsStudiesTrialsListCall) doRequest(alt string) (*http.Response, error) {
6780 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6781 if c.ifNoneMatch_ != "" {
6782 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6783 }
6784 var body io.Reader = nil
6785 c.urlParams_.Set("alt", alt)
6786 c.urlParams_.Set("prettyPrint", "false")
6787 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials")
6788 urls += "?" + c.urlParams_.Encode()
6789 req, err := http.NewRequest("GET", urls, body)
6790 if err != nil {
6791 return nil, err
6792 }
6793 req.Header = reqHeaders
6794 googleapi.Expand(req.URL, map[string]string{
6795 "parent": c.parent,
6796 })
6797 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6798 }
6799
6800
6801
6802
6803
6804
6805
6806 func (c *ProjectsLocationsStudiesTrialsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListTrialsResponse, error) {
6807 gensupport.SetOptions(c.urlParams_, opts...)
6808 res, err := c.doRequest("json")
6809 if res != nil && res.StatusCode == http.StatusNotModified {
6810 if res.Body != nil {
6811 res.Body.Close()
6812 }
6813 return nil, gensupport.WrapError(&googleapi.Error{
6814 Code: res.StatusCode,
6815 Header: res.Header,
6816 })
6817 }
6818 if err != nil {
6819 return nil, err
6820 }
6821 defer googleapi.CloseBody(res)
6822 if err := googleapi.CheckResponse(res); err != nil {
6823 return nil, gensupport.WrapError(err)
6824 }
6825 ret := &GoogleCloudMlV1__ListTrialsResponse{
6826 ServerResponse: googleapi.ServerResponse{
6827 Header: res.Header,
6828 HTTPStatusCode: res.StatusCode,
6829 },
6830 }
6831 target := &ret
6832 if err := gensupport.DecodeResponse(target, res); err != nil {
6833 return nil, err
6834 }
6835 return ret, nil
6836 }
6837
6838 type ProjectsLocationsStudiesTrialsListOptimalTrialsCall struct {
6839 s *Service
6840 parent string
6841 googlecloudmlv1__listoptimaltrialsrequest *GoogleCloudMlV1__ListOptimalTrialsRequest
6842 urlParams_ gensupport.URLParams
6843 ctx_ context.Context
6844 header_ http.Header
6845 }
6846
6847
6848
6849
6850
6851
6852
6853 func (r *ProjectsLocationsStudiesTrialsService) ListOptimalTrials(parent string, googlecloudmlv1__listoptimaltrialsrequest *GoogleCloudMlV1__ListOptimalTrialsRequest) *ProjectsLocationsStudiesTrialsListOptimalTrialsCall {
6854 c := &ProjectsLocationsStudiesTrialsListOptimalTrialsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6855 c.parent = parent
6856 c.googlecloudmlv1__listoptimaltrialsrequest = googlecloudmlv1__listoptimaltrialsrequest
6857 return c
6858 }
6859
6860
6861
6862
6863 func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsListOptimalTrialsCall {
6864 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6865 return c
6866 }
6867
6868
6869 func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsListOptimalTrialsCall {
6870 c.ctx_ = ctx
6871 return c
6872 }
6873
6874
6875
6876 func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Header() http.Header {
6877 if c.header_ == nil {
6878 c.header_ = make(http.Header)
6879 }
6880 return c.header_
6881 }
6882
6883 func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) doRequest(alt string) (*http.Response, error) {
6884 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6885 var body io.Reader = nil
6886 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__listoptimaltrialsrequest)
6887 if err != nil {
6888 return nil, err
6889 }
6890 c.urlParams_.Set("alt", alt)
6891 c.urlParams_.Set("prettyPrint", "false")
6892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials:listOptimalTrials")
6893 urls += "?" + c.urlParams_.Encode()
6894 req, err := http.NewRequest("POST", urls, body)
6895 if err != nil {
6896 return nil, err
6897 }
6898 req.Header = reqHeaders
6899 googleapi.Expand(req.URL, map[string]string{
6900 "parent": c.parent,
6901 })
6902 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6903 }
6904
6905
6906
6907
6908
6909
6910
6911 func (c *ProjectsLocationsStudiesTrialsListOptimalTrialsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListOptimalTrialsResponse, error) {
6912 gensupport.SetOptions(c.urlParams_, opts...)
6913 res, err := c.doRequest("json")
6914 if res != nil && res.StatusCode == http.StatusNotModified {
6915 if res.Body != nil {
6916 res.Body.Close()
6917 }
6918 return nil, gensupport.WrapError(&googleapi.Error{
6919 Code: res.StatusCode,
6920 Header: res.Header,
6921 })
6922 }
6923 if err != nil {
6924 return nil, err
6925 }
6926 defer googleapi.CloseBody(res)
6927 if err := googleapi.CheckResponse(res); err != nil {
6928 return nil, gensupport.WrapError(err)
6929 }
6930 ret := &GoogleCloudMlV1__ListOptimalTrialsResponse{
6931 ServerResponse: googleapi.ServerResponse{
6932 Header: res.Header,
6933 HTTPStatusCode: res.StatusCode,
6934 },
6935 }
6936 target := &ret
6937 if err := gensupport.DecodeResponse(target, res); err != nil {
6938 return nil, err
6939 }
6940 return ret, nil
6941 }
6942
6943 type ProjectsLocationsStudiesTrialsStopCall struct {
6944 s *Service
6945 name string
6946 googlecloudmlv1__stoptrialrequest *GoogleCloudMlV1__StopTrialRequest
6947 urlParams_ gensupport.URLParams
6948 ctx_ context.Context
6949 header_ http.Header
6950 }
6951
6952
6953
6954
6955 func (r *ProjectsLocationsStudiesTrialsService) Stop(name string, googlecloudmlv1__stoptrialrequest *GoogleCloudMlV1__StopTrialRequest) *ProjectsLocationsStudiesTrialsStopCall {
6956 c := &ProjectsLocationsStudiesTrialsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6957 c.name = name
6958 c.googlecloudmlv1__stoptrialrequest = googlecloudmlv1__stoptrialrequest
6959 return c
6960 }
6961
6962
6963
6964
6965 func (c *ProjectsLocationsStudiesTrialsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsStopCall {
6966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6967 return c
6968 }
6969
6970
6971 func (c *ProjectsLocationsStudiesTrialsStopCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsStopCall {
6972 c.ctx_ = ctx
6973 return c
6974 }
6975
6976
6977
6978 func (c *ProjectsLocationsStudiesTrialsStopCall) Header() http.Header {
6979 if c.header_ == nil {
6980 c.header_ = make(http.Header)
6981 }
6982 return c.header_
6983 }
6984
6985 func (c *ProjectsLocationsStudiesTrialsStopCall) doRequest(alt string) (*http.Response, error) {
6986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6987 var body io.Reader = nil
6988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__stoptrialrequest)
6989 if err != nil {
6990 return nil, err
6991 }
6992 c.urlParams_.Set("alt", alt)
6993 c.urlParams_.Set("prettyPrint", "false")
6994 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop")
6995 urls += "?" + c.urlParams_.Encode()
6996 req, err := http.NewRequest("POST", urls, body)
6997 if err != nil {
6998 return nil, err
6999 }
7000 req.Header = reqHeaders
7001 googleapi.Expand(req.URL, map[string]string{
7002 "name": c.name,
7003 })
7004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7005 }
7006
7007
7008
7009
7010
7011
7012
7013 func (c *ProjectsLocationsStudiesTrialsStopCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Trial, error) {
7014 gensupport.SetOptions(c.urlParams_, opts...)
7015 res, err := c.doRequest("json")
7016 if res != nil && res.StatusCode == http.StatusNotModified {
7017 if res.Body != nil {
7018 res.Body.Close()
7019 }
7020 return nil, gensupport.WrapError(&googleapi.Error{
7021 Code: res.StatusCode,
7022 Header: res.Header,
7023 })
7024 }
7025 if err != nil {
7026 return nil, err
7027 }
7028 defer googleapi.CloseBody(res)
7029 if err := googleapi.CheckResponse(res); err != nil {
7030 return nil, gensupport.WrapError(err)
7031 }
7032 ret := &GoogleCloudMlV1__Trial{
7033 ServerResponse: googleapi.ServerResponse{
7034 Header: res.Header,
7035 HTTPStatusCode: res.StatusCode,
7036 },
7037 }
7038 target := &ret
7039 if err := gensupport.DecodeResponse(target, res); err != nil {
7040 return nil, err
7041 }
7042 return ret, nil
7043 }
7044
7045 type ProjectsLocationsStudiesTrialsSuggestCall struct {
7046 s *Service
7047 parent string
7048 googlecloudmlv1__suggesttrialsrequest *GoogleCloudMlV1__SuggestTrialsRequest
7049 urlParams_ gensupport.URLParams
7050 ctx_ context.Context
7051 header_ http.Header
7052 }
7053
7054
7055
7056
7057
7058
7059
7060 func (r *ProjectsLocationsStudiesTrialsService) Suggest(parent string, googlecloudmlv1__suggesttrialsrequest *GoogleCloudMlV1__SuggestTrialsRequest) *ProjectsLocationsStudiesTrialsSuggestCall {
7061 c := &ProjectsLocationsStudiesTrialsSuggestCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7062 c.parent = parent
7063 c.googlecloudmlv1__suggesttrialsrequest = googlecloudmlv1__suggesttrialsrequest
7064 return c
7065 }
7066
7067
7068
7069
7070 func (c *ProjectsLocationsStudiesTrialsSuggestCall) Fields(s ...googleapi.Field) *ProjectsLocationsStudiesTrialsSuggestCall {
7071 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7072 return c
7073 }
7074
7075
7076 func (c *ProjectsLocationsStudiesTrialsSuggestCall) Context(ctx context.Context) *ProjectsLocationsStudiesTrialsSuggestCall {
7077 c.ctx_ = ctx
7078 return c
7079 }
7080
7081
7082
7083 func (c *ProjectsLocationsStudiesTrialsSuggestCall) Header() http.Header {
7084 if c.header_ == nil {
7085 c.header_ = make(http.Header)
7086 }
7087 return c.header_
7088 }
7089
7090 func (c *ProjectsLocationsStudiesTrialsSuggestCall) doRequest(alt string) (*http.Response, error) {
7091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7092 var body io.Reader = nil
7093 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__suggesttrialsrequest)
7094 if err != nil {
7095 return nil, err
7096 }
7097 c.urlParams_.Set("alt", alt)
7098 c.urlParams_.Set("prettyPrint", "false")
7099 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/trials:suggest")
7100 urls += "?" + c.urlParams_.Encode()
7101 req, err := http.NewRequest("POST", urls, body)
7102 if err != nil {
7103 return nil, err
7104 }
7105 req.Header = reqHeaders
7106 googleapi.Expand(req.URL, map[string]string{
7107 "parent": c.parent,
7108 })
7109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7110 }
7111
7112
7113
7114
7115
7116
7117
7118 func (c *ProjectsLocationsStudiesTrialsSuggestCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
7119 gensupport.SetOptions(c.urlParams_, opts...)
7120 res, err := c.doRequest("json")
7121 if res != nil && res.StatusCode == http.StatusNotModified {
7122 if res.Body != nil {
7123 res.Body.Close()
7124 }
7125 return nil, gensupport.WrapError(&googleapi.Error{
7126 Code: res.StatusCode,
7127 Header: res.Header,
7128 })
7129 }
7130 if err != nil {
7131 return nil, err
7132 }
7133 defer googleapi.CloseBody(res)
7134 if err := googleapi.CheckResponse(res); err != nil {
7135 return nil, gensupport.WrapError(err)
7136 }
7137 ret := &GoogleLongrunning__Operation{
7138 ServerResponse: googleapi.ServerResponse{
7139 Header: res.Header,
7140 HTTPStatusCode: res.StatusCode,
7141 },
7142 }
7143 target := &ret
7144 if err := gensupport.DecodeResponse(target, res); err != nil {
7145 return nil, err
7146 }
7147 return ret, nil
7148 }
7149
7150 type ProjectsModelsCreateCall struct {
7151 s *Service
7152 parent string
7153 googlecloudmlv1__model *GoogleCloudMlV1__Model
7154 urlParams_ gensupport.URLParams
7155 ctx_ context.Context
7156 header_ http.Header
7157 }
7158
7159
7160
7161
7162
7163
7164 func (r *ProjectsModelsService) Create(parent string, googlecloudmlv1__model *GoogleCloudMlV1__Model) *ProjectsModelsCreateCall {
7165 c := &ProjectsModelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7166 c.parent = parent
7167 c.googlecloudmlv1__model = googlecloudmlv1__model
7168 return c
7169 }
7170
7171
7172
7173
7174 func (c *ProjectsModelsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsCreateCall {
7175 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7176 return c
7177 }
7178
7179
7180 func (c *ProjectsModelsCreateCall) Context(ctx context.Context) *ProjectsModelsCreateCall {
7181 c.ctx_ = ctx
7182 return c
7183 }
7184
7185
7186
7187 func (c *ProjectsModelsCreateCall) Header() http.Header {
7188 if c.header_ == nil {
7189 c.header_ = make(http.Header)
7190 }
7191 return c.header_
7192 }
7193
7194 func (c *ProjectsModelsCreateCall) doRequest(alt string) (*http.Response, error) {
7195 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7196 var body io.Reader = nil
7197 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__model)
7198 if err != nil {
7199 return nil, err
7200 }
7201 c.urlParams_.Set("alt", alt)
7202 c.urlParams_.Set("prettyPrint", "false")
7203 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models")
7204 urls += "?" + c.urlParams_.Encode()
7205 req, err := http.NewRequest("POST", urls, body)
7206 if err != nil {
7207 return nil, err
7208 }
7209 req.Header = reqHeaders
7210 googleapi.Expand(req.URL, map[string]string{
7211 "parent": c.parent,
7212 })
7213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7214 }
7215
7216
7217
7218
7219
7220
7221
7222 func (c *ProjectsModelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Model, error) {
7223 gensupport.SetOptions(c.urlParams_, opts...)
7224 res, err := c.doRequest("json")
7225 if res != nil && res.StatusCode == http.StatusNotModified {
7226 if res.Body != nil {
7227 res.Body.Close()
7228 }
7229 return nil, gensupport.WrapError(&googleapi.Error{
7230 Code: res.StatusCode,
7231 Header: res.Header,
7232 })
7233 }
7234 if err != nil {
7235 return nil, err
7236 }
7237 defer googleapi.CloseBody(res)
7238 if err := googleapi.CheckResponse(res); err != nil {
7239 return nil, gensupport.WrapError(err)
7240 }
7241 ret := &GoogleCloudMlV1__Model{
7242 ServerResponse: googleapi.ServerResponse{
7243 Header: res.Header,
7244 HTTPStatusCode: res.StatusCode,
7245 },
7246 }
7247 target := &ret
7248 if err := gensupport.DecodeResponse(target, res); err != nil {
7249 return nil, err
7250 }
7251 return ret, nil
7252 }
7253
7254 type ProjectsModelsDeleteCall struct {
7255 s *Service
7256 name string
7257 urlParams_ gensupport.URLParams
7258 ctx_ context.Context
7259 header_ http.Header
7260 }
7261
7262
7263
7264
7265
7266
7267 func (r *ProjectsModelsService) Delete(name string) *ProjectsModelsDeleteCall {
7268 c := &ProjectsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7269 c.name = name
7270 return c
7271 }
7272
7273
7274
7275
7276 func (c *ProjectsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsDeleteCall {
7277 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7278 return c
7279 }
7280
7281
7282 func (c *ProjectsModelsDeleteCall) Context(ctx context.Context) *ProjectsModelsDeleteCall {
7283 c.ctx_ = ctx
7284 return c
7285 }
7286
7287
7288
7289 func (c *ProjectsModelsDeleteCall) Header() http.Header {
7290 if c.header_ == nil {
7291 c.header_ = make(http.Header)
7292 }
7293 return c.header_
7294 }
7295
7296 func (c *ProjectsModelsDeleteCall) doRequest(alt string) (*http.Response, error) {
7297 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7298 var body io.Reader = nil
7299 c.urlParams_.Set("alt", alt)
7300 c.urlParams_.Set("prettyPrint", "false")
7301 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7302 urls += "?" + c.urlParams_.Encode()
7303 req, err := http.NewRequest("DELETE", urls, body)
7304 if err != nil {
7305 return nil, err
7306 }
7307 req.Header = reqHeaders
7308 googleapi.Expand(req.URL, map[string]string{
7309 "name": c.name,
7310 })
7311 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7312 }
7313
7314
7315
7316
7317
7318
7319
7320 func (c *ProjectsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
7321 gensupport.SetOptions(c.urlParams_, opts...)
7322 res, err := c.doRequest("json")
7323 if res != nil && res.StatusCode == http.StatusNotModified {
7324 if res.Body != nil {
7325 res.Body.Close()
7326 }
7327 return nil, gensupport.WrapError(&googleapi.Error{
7328 Code: res.StatusCode,
7329 Header: res.Header,
7330 })
7331 }
7332 if err != nil {
7333 return nil, err
7334 }
7335 defer googleapi.CloseBody(res)
7336 if err := googleapi.CheckResponse(res); err != nil {
7337 return nil, gensupport.WrapError(err)
7338 }
7339 ret := &GoogleLongrunning__Operation{
7340 ServerResponse: googleapi.ServerResponse{
7341 Header: res.Header,
7342 HTTPStatusCode: res.StatusCode,
7343 },
7344 }
7345 target := &ret
7346 if err := gensupport.DecodeResponse(target, res); err != nil {
7347 return nil, err
7348 }
7349 return ret, nil
7350 }
7351
7352 type ProjectsModelsGetCall struct {
7353 s *Service
7354 name string
7355 urlParams_ gensupport.URLParams
7356 ifNoneMatch_ string
7357 ctx_ context.Context
7358 header_ http.Header
7359 }
7360
7361
7362
7363
7364
7365
7366 func (r *ProjectsModelsService) Get(name string) *ProjectsModelsGetCall {
7367 c := &ProjectsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7368 c.name = name
7369 return c
7370 }
7371
7372
7373
7374
7375 func (c *ProjectsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsGetCall {
7376 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7377 return c
7378 }
7379
7380
7381
7382
7383 func (c *ProjectsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsGetCall {
7384 c.ifNoneMatch_ = entityTag
7385 return c
7386 }
7387
7388
7389 func (c *ProjectsModelsGetCall) Context(ctx context.Context) *ProjectsModelsGetCall {
7390 c.ctx_ = ctx
7391 return c
7392 }
7393
7394
7395
7396 func (c *ProjectsModelsGetCall) Header() http.Header {
7397 if c.header_ == nil {
7398 c.header_ = make(http.Header)
7399 }
7400 return c.header_
7401 }
7402
7403 func (c *ProjectsModelsGetCall) doRequest(alt string) (*http.Response, error) {
7404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7405 if c.ifNoneMatch_ != "" {
7406 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7407 }
7408 var body io.Reader = nil
7409 c.urlParams_.Set("alt", alt)
7410 c.urlParams_.Set("prettyPrint", "false")
7411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7412 urls += "?" + c.urlParams_.Encode()
7413 req, err := http.NewRequest("GET", urls, body)
7414 if err != nil {
7415 return nil, err
7416 }
7417 req.Header = reqHeaders
7418 googleapi.Expand(req.URL, map[string]string{
7419 "name": c.name,
7420 })
7421 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7422 }
7423
7424
7425
7426
7427
7428
7429
7430 func (c *ProjectsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Model, error) {
7431 gensupport.SetOptions(c.urlParams_, opts...)
7432 res, err := c.doRequest("json")
7433 if res != nil && res.StatusCode == http.StatusNotModified {
7434 if res.Body != nil {
7435 res.Body.Close()
7436 }
7437 return nil, gensupport.WrapError(&googleapi.Error{
7438 Code: res.StatusCode,
7439 Header: res.Header,
7440 })
7441 }
7442 if err != nil {
7443 return nil, err
7444 }
7445 defer googleapi.CloseBody(res)
7446 if err := googleapi.CheckResponse(res); err != nil {
7447 return nil, gensupport.WrapError(err)
7448 }
7449 ret := &GoogleCloudMlV1__Model{
7450 ServerResponse: googleapi.ServerResponse{
7451 Header: res.Header,
7452 HTTPStatusCode: res.StatusCode,
7453 },
7454 }
7455 target := &ret
7456 if err := gensupport.DecodeResponse(target, res); err != nil {
7457 return nil, err
7458 }
7459 return ret, nil
7460 }
7461
7462 type ProjectsModelsGetIamPolicyCall struct {
7463 s *Service
7464 resource string
7465 urlParams_ gensupport.URLParams
7466 ifNoneMatch_ string
7467 ctx_ context.Context
7468 header_ http.Header
7469 }
7470
7471
7472
7473
7474
7475
7476
7477 func (r *ProjectsModelsService) GetIamPolicy(resource string) *ProjectsModelsGetIamPolicyCall {
7478 c := &ProjectsModelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7479 c.resource = resource
7480 return c
7481 }
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495 func (c *ProjectsModelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsModelsGetIamPolicyCall {
7496 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7497 return c
7498 }
7499
7500
7501
7502
7503 func (c *ProjectsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsGetIamPolicyCall {
7504 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7505 return c
7506 }
7507
7508
7509
7510
7511 func (c *ProjectsModelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsModelsGetIamPolicyCall {
7512 c.ifNoneMatch_ = entityTag
7513 return c
7514 }
7515
7516
7517 func (c *ProjectsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsGetIamPolicyCall {
7518 c.ctx_ = ctx
7519 return c
7520 }
7521
7522
7523
7524 func (c *ProjectsModelsGetIamPolicyCall) Header() http.Header {
7525 if c.header_ == nil {
7526 c.header_ = make(http.Header)
7527 }
7528 return c.header_
7529 }
7530
7531 func (c *ProjectsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7532 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7533 if c.ifNoneMatch_ != "" {
7534 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7535 }
7536 var body io.Reader = nil
7537 c.urlParams_.Set("alt", alt)
7538 c.urlParams_.Set("prettyPrint", "false")
7539 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
7540 urls += "?" + c.urlParams_.Encode()
7541 req, err := http.NewRequest("GET", urls, body)
7542 if err != nil {
7543 return nil, err
7544 }
7545 req.Header = reqHeaders
7546 googleapi.Expand(req.URL, map[string]string{
7547 "resource": c.resource,
7548 })
7549 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7550 }
7551
7552
7553
7554
7555
7556
7557
7558 func (c *ProjectsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
7559 gensupport.SetOptions(c.urlParams_, opts...)
7560 res, err := c.doRequest("json")
7561 if res != nil && res.StatusCode == http.StatusNotModified {
7562 if res.Body != nil {
7563 res.Body.Close()
7564 }
7565 return nil, gensupport.WrapError(&googleapi.Error{
7566 Code: res.StatusCode,
7567 Header: res.Header,
7568 })
7569 }
7570 if err != nil {
7571 return nil, err
7572 }
7573 defer googleapi.CloseBody(res)
7574 if err := googleapi.CheckResponse(res); err != nil {
7575 return nil, gensupport.WrapError(err)
7576 }
7577 ret := &GoogleIamV1__Policy{
7578 ServerResponse: googleapi.ServerResponse{
7579 Header: res.Header,
7580 HTTPStatusCode: res.StatusCode,
7581 },
7582 }
7583 target := &ret
7584 if err := gensupport.DecodeResponse(target, res); err != nil {
7585 return nil, err
7586 }
7587 return ret, nil
7588 }
7589
7590 type ProjectsModelsListCall struct {
7591 s *Service
7592 parent string
7593 urlParams_ gensupport.URLParams
7594 ifNoneMatch_ string
7595 ctx_ context.Context
7596 header_ http.Header
7597 }
7598
7599
7600
7601
7602
7603
7604
7605 func (r *ProjectsModelsService) List(parent string) *ProjectsModelsListCall {
7606 c := &ProjectsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7607 c.parent = parent
7608 return c
7609 }
7610
7611
7612
7613 func (c *ProjectsModelsListCall) Filter(filter string) *ProjectsModelsListCall {
7614 c.urlParams_.Set("filter", filter)
7615 return c
7616 }
7617
7618
7619
7620
7621
7622
7623 func (c *ProjectsModelsListCall) PageSize(pageSize int64) *ProjectsModelsListCall {
7624 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7625 return c
7626 }
7627
7628
7629
7630
7631 func (c *ProjectsModelsListCall) PageToken(pageToken string) *ProjectsModelsListCall {
7632 c.urlParams_.Set("pageToken", pageToken)
7633 return c
7634 }
7635
7636
7637
7638
7639 func (c *ProjectsModelsListCall) Fields(s ...googleapi.Field) *ProjectsModelsListCall {
7640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7641 return c
7642 }
7643
7644
7645
7646
7647 func (c *ProjectsModelsListCall) IfNoneMatch(entityTag string) *ProjectsModelsListCall {
7648 c.ifNoneMatch_ = entityTag
7649 return c
7650 }
7651
7652
7653 func (c *ProjectsModelsListCall) Context(ctx context.Context) *ProjectsModelsListCall {
7654 c.ctx_ = ctx
7655 return c
7656 }
7657
7658
7659
7660 func (c *ProjectsModelsListCall) Header() http.Header {
7661 if c.header_ == nil {
7662 c.header_ = make(http.Header)
7663 }
7664 return c.header_
7665 }
7666
7667 func (c *ProjectsModelsListCall) doRequest(alt string) (*http.Response, error) {
7668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7669 if c.ifNoneMatch_ != "" {
7670 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7671 }
7672 var body io.Reader = nil
7673 c.urlParams_.Set("alt", alt)
7674 c.urlParams_.Set("prettyPrint", "false")
7675 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models")
7676 urls += "?" + c.urlParams_.Encode()
7677 req, err := http.NewRequest("GET", urls, body)
7678 if err != nil {
7679 return nil, err
7680 }
7681 req.Header = reqHeaders
7682 googleapi.Expand(req.URL, map[string]string{
7683 "parent": c.parent,
7684 })
7685 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7686 }
7687
7688
7689
7690
7691
7692
7693
7694 func (c *ProjectsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListModelsResponse, error) {
7695 gensupport.SetOptions(c.urlParams_, opts...)
7696 res, err := c.doRequest("json")
7697 if res != nil && res.StatusCode == http.StatusNotModified {
7698 if res.Body != nil {
7699 res.Body.Close()
7700 }
7701 return nil, gensupport.WrapError(&googleapi.Error{
7702 Code: res.StatusCode,
7703 Header: res.Header,
7704 })
7705 }
7706 if err != nil {
7707 return nil, err
7708 }
7709 defer googleapi.CloseBody(res)
7710 if err := googleapi.CheckResponse(res); err != nil {
7711 return nil, gensupport.WrapError(err)
7712 }
7713 ret := &GoogleCloudMlV1__ListModelsResponse{
7714 ServerResponse: googleapi.ServerResponse{
7715 Header: res.Header,
7716 HTTPStatusCode: res.StatusCode,
7717 },
7718 }
7719 target := &ret
7720 if err := gensupport.DecodeResponse(target, res); err != nil {
7721 return nil, err
7722 }
7723 return ret, nil
7724 }
7725
7726
7727
7728
7729 func (c *ProjectsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListModelsResponse) error) error {
7730 c.ctx_ = ctx
7731 defer c.PageToken(c.urlParams_.Get("pageToken"))
7732 for {
7733 x, err := c.Do()
7734 if err != nil {
7735 return err
7736 }
7737 if err := f(x); err != nil {
7738 return err
7739 }
7740 if x.NextPageToken == "" {
7741 return nil
7742 }
7743 c.PageToken(x.NextPageToken)
7744 }
7745 }
7746
7747 type ProjectsModelsPatchCall struct {
7748 s *Service
7749 name string
7750 googlecloudmlv1__model *GoogleCloudMlV1__Model
7751 urlParams_ gensupport.URLParams
7752 ctx_ context.Context
7753 header_ http.Header
7754 }
7755
7756
7757
7758
7759
7760 func (r *ProjectsModelsService) Patch(name string, googlecloudmlv1__model *GoogleCloudMlV1__Model) *ProjectsModelsPatchCall {
7761 c := &ProjectsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7762 c.name = name
7763 c.googlecloudmlv1__model = googlecloudmlv1__model
7764 return c
7765 }
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775 func (c *ProjectsModelsPatchCall) UpdateMask(updateMask string) *ProjectsModelsPatchCall {
7776 c.urlParams_.Set("updateMask", updateMask)
7777 return c
7778 }
7779
7780
7781
7782
7783 func (c *ProjectsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsModelsPatchCall {
7784 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7785 return c
7786 }
7787
7788
7789 func (c *ProjectsModelsPatchCall) Context(ctx context.Context) *ProjectsModelsPatchCall {
7790 c.ctx_ = ctx
7791 return c
7792 }
7793
7794
7795
7796 func (c *ProjectsModelsPatchCall) Header() http.Header {
7797 if c.header_ == nil {
7798 c.header_ = make(http.Header)
7799 }
7800 return c.header_
7801 }
7802
7803 func (c *ProjectsModelsPatchCall) doRequest(alt string) (*http.Response, error) {
7804 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7805 var body io.Reader = nil
7806 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__model)
7807 if err != nil {
7808 return nil, err
7809 }
7810 c.urlParams_.Set("alt", alt)
7811 c.urlParams_.Set("prettyPrint", "false")
7812 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7813 urls += "?" + c.urlParams_.Encode()
7814 req, err := http.NewRequest("PATCH", urls, body)
7815 if err != nil {
7816 return nil, err
7817 }
7818 req.Header = reqHeaders
7819 googleapi.Expand(req.URL, map[string]string{
7820 "name": c.name,
7821 })
7822 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7823 }
7824
7825
7826
7827
7828
7829
7830
7831 func (c *ProjectsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
7832 gensupport.SetOptions(c.urlParams_, opts...)
7833 res, err := c.doRequest("json")
7834 if res != nil && res.StatusCode == http.StatusNotModified {
7835 if res.Body != nil {
7836 res.Body.Close()
7837 }
7838 return nil, gensupport.WrapError(&googleapi.Error{
7839 Code: res.StatusCode,
7840 Header: res.Header,
7841 })
7842 }
7843 if err != nil {
7844 return nil, err
7845 }
7846 defer googleapi.CloseBody(res)
7847 if err := googleapi.CheckResponse(res); err != nil {
7848 return nil, gensupport.WrapError(err)
7849 }
7850 ret := &GoogleLongrunning__Operation{
7851 ServerResponse: googleapi.ServerResponse{
7852 Header: res.Header,
7853 HTTPStatusCode: res.StatusCode,
7854 },
7855 }
7856 target := &ret
7857 if err := gensupport.DecodeResponse(target, res); err != nil {
7858 return nil, err
7859 }
7860 return ret, nil
7861 }
7862
7863 type ProjectsModelsSetIamPolicyCall struct {
7864 s *Service
7865 resource string
7866 googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest
7867 urlParams_ gensupport.URLParams
7868 ctx_ context.Context
7869 header_ http.Header
7870 }
7871
7872
7873
7874
7875
7876
7877
7878
7879 func (r *ProjectsModelsService) SetIamPolicy(resource string, googleiamv1__setiampolicyrequest *GoogleIamV1__SetIamPolicyRequest) *ProjectsModelsSetIamPolicyCall {
7880 c := &ProjectsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7881 c.resource = resource
7882 c.googleiamv1__setiampolicyrequest = googleiamv1__setiampolicyrequest
7883 return c
7884 }
7885
7886
7887
7888
7889 func (c *ProjectsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsModelsSetIamPolicyCall {
7890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7891 return c
7892 }
7893
7894
7895 func (c *ProjectsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsModelsSetIamPolicyCall {
7896 c.ctx_ = ctx
7897 return c
7898 }
7899
7900
7901
7902 func (c *ProjectsModelsSetIamPolicyCall) Header() http.Header {
7903 if c.header_ == nil {
7904 c.header_ = make(http.Header)
7905 }
7906 return c.header_
7907 }
7908
7909 func (c *ProjectsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7910 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7911 var body io.Reader = nil
7912 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__setiampolicyrequest)
7913 if err != nil {
7914 return nil, err
7915 }
7916 c.urlParams_.Set("alt", alt)
7917 c.urlParams_.Set("prettyPrint", "false")
7918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
7919 urls += "?" + c.urlParams_.Encode()
7920 req, err := http.NewRequest("POST", urls, body)
7921 if err != nil {
7922 return nil, err
7923 }
7924 req.Header = reqHeaders
7925 googleapi.Expand(req.URL, map[string]string{
7926 "resource": c.resource,
7927 })
7928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7929 }
7930
7931
7932
7933
7934
7935
7936
7937 func (c *ProjectsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__Policy, error) {
7938 gensupport.SetOptions(c.urlParams_, opts...)
7939 res, err := c.doRequest("json")
7940 if res != nil && res.StatusCode == http.StatusNotModified {
7941 if res.Body != nil {
7942 res.Body.Close()
7943 }
7944 return nil, gensupport.WrapError(&googleapi.Error{
7945 Code: res.StatusCode,
7946 Header: res.Header,
7947 })
7948 }
7949 if err != nil {
7950 return nil, err
7951 }
7952 defer googleapi.CloseBody(res)
7953 if err := googleapi.CheckResponse(res); err != nil {
7954 return nil, gensupport.WrapError(err)
7955 }
7956 ret := &GoogleIamV1__Policy{
7957 ServerResponse: googleapi.ServerResponse{
7958 Header: res.Header,
7959 HTTPStatusCode: res.StatusCode,
7960 },
7961 }
7962 target := &ret
7963 if err := gensupport.DecodeResponse(target, res); err != nil {
7964 return nil, err
7965 }
7966 return ret, nil
7967 }
7968
7969 type ProjectsModelsTestIamPermissionsCall struct {
7970 s *Service
7971 resource string
7972 googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest
7973 urlParams_ gensupport.URLParams
7974 ctx_ context.Context
7975 header_ http.Header
7976 }
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988 func (r *ProjectsModelsService) TestIamPermissions(resource string, googleiamv1__testiampermissionsrequest *GoogleIamV1__TestIamPermissionsRequest) *ProjectsModelsTestIamPermissionsCall {
7989 c := &ProjectsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7990 c.resource = resource
7991 c.googleiamv1__testiampermissionsrequest = googleiamv1__testiampermissionsrequest
7992 return c
7993 }
7994
7995
7996
7997
7998 func (c *ProjectsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsModelsTestIamPermissionsCall {
7999 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8000 return c
8001 }
8002
8003
8004 func (c *ProjectsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsModelsTestIamPermissionsCall {
8005 c.ctx_ = ctx
8006 return c
8007 }
8008
8009
8010
8011 func (c *ProjectsModelsTestIamPermissionsCall) Header() http.Header {
8012 if c.header_ == nil {
8013 c.header_ = make(http.Header)
8014 }
8015 return c.header_
8016 }
8017
8018 func (c *ProjectsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8019 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8020 var body io.Reader = nil
8021 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1__testiampermissionsrequest)
8022 if err != nil {
8023 return nil, err
8024 }
8025 c.urlParams_.Set("alt", alt)
8026 c.urlParams_.Set("prettyPrint", "false")
8027 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
8028 urls += "?" + c.urlParams_.Encode()
8029 req, err := http.NewRequest("POST", urls, body)
8030 if err != nil {
8031 return nil, err
8032 }
8033 req.Header = reqHeaders
8034 googleapi.Expand(req.URL, map[string]string{
8035 "resource": c.resource,
8036 })
8037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8038 }
8039
8040
8041
8042
8043
8044
8045
8046 func (c *ProjectsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1__TestIamPermissionsResponse, error) {
8047 gensupport.SetOptions(c.urlParams_, opts...)
8048 res, err := c.doRequest("json")
8049 if res != nil && res.StatusCode == http.StatusNotModified {
8050 if res.Body != nil {
8051 res.Body.Close()
8052 }
8053 return nil, gensupport.WrapError(&googleapi.Error{
8054 Code: res.StatusCode,
8055 Header: res.Header,
8056 })
8057 }
8058 if err != nil {
8059 return nil, err
8060 }
8061 defer googleapi.CloseBody(res)
8062 if err := googleapi.CheckResponse(res); err != nil {
8063 return nil, gensupport.WrapError(err)
8064 }
8065 ret := &GoogleIamV1__TestIamPermissionsResponse{
8066 ServerResponse: googleapi.ServerResponse{
8067 Header: res.Header,
8068 HTTPStatusCode: res.StatusCode,
8069 },
8070 }
8071 target := &ret
8072 if err := gensupport.DecodeResponse(target, res); err != nil {
8073 return nil, err
8074 }
8075 return ret, nil
8076 }
8077
8078 type ProjectsModelsVersionsCreateCall struct {
8079 s *Service
8080 parent string
8081 googlecloudmlv1__version *GoogleCloudMlV1__Version
8082 urlParams_ gensupport.URLParams
8083 ctx_ context.Context
8084 header_ http.Header
8085 }
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095 func (r *ProjectsModelsVersionsService) Create(parent string, googlecloudmlv1__version *GoogleCloudMlV1__Version) *ProjectsModelsVersionsCreateCall {
8096 c := &ProjectsModelsVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8097 c.parent = parent
8098 c.googlecloudmlv1__version = googlecloudmlv1__version
8099 return c
8100 }
8101
8102
8103
8104
8105 func (c *ProjectsModelsVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsCreateCall {
8106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8107 return c
8108 }
8109
8110
8111 func (c *ProjectsModelsVersionsCreateCall) Context(ctx context.Context) *ProjectsModelsVersionsCreateCall {
8112 c.ctx_ = ctx
8113 return c
8114 }
8115
8116
8117
8118 func (c *ProjectsModelsVersionsCreateCall) Header() http.Header {
8119 if c.header_ == nil {
8120 c.header_ = make(http.Header)
8121 }
8122 return c.header_
8123 }
8124
8125 func (c *ProjectsModelsVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
8126 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8127 var body io.Reader = nil
8128 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__version)
8129 if err != nil {
8130 return nil, err
8131 }
8132 c.urlParams_.Set("alt", alt)
8133 c.urlParams_.Set("prettyPrint", "false")
8134 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
8135 urls += "?" + c.urlParams_.Encode()
8136 req, err := http.NewRequest("POST", urls, body)
8137 if err != nil {
8138 return nil, err
8139 }
8140 req.Header = reqHeaders
8141 googleapi.Expand(req.URL, map[string]string{
8142 "parent": c.parent,
8143 })
8144 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8145 }
8146
8147
8148
8149
8150
8151
8152
8153 func (c *ProjectsModelsVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
8154 gensupport.SetOptions(c.urlParams_, opts...)
8155 res, err := c.doRequest("json")
8156 if res != nil && res.StatusCode == http.StatusNotModified {
8157 if res.Body != nil {
8158 res.Body.Close()
8159 }
8160 return nil, gensupport.WrapError(&googleapi.Error{
8161 Code: res.StatusCode,
8162 Header: res.Header,
8163 })
8164 }
8165 if err != nil {
8166 return nil, err
8167 }
8168 defer googleapi.CloseBody(res)
8169 if err := googleapi.CheckResponse(res); err != nil {
8170 return nil, gensupport.WrapError(err)
8171 }
8172 ret := &GoogleLongrunning__Operation{
8173 ServerResponse: googleapi.ServerResponse{
8174 Header: res.Header,
8175 HTTPStatusCode: res.StatusCode,
8176 },
8177 }
8178 target := &ret
8179 if err := gensupport.DecodeResponse(target, res); err != nil {
8180 return nil, err
8181 }
8182 return ret, nil
8183 }
8184
8185 type ProjectsModelsVersionsDeleteCall struct {
8186 s *Service
8187 name string
8188 urlParams_ gensupport.URLParams
8189 ctx_ context.Context
8190 header_ http.Header
8191 }
8192
8193
8194
8195
8196
8197
8198
8199
8200 func (r *ProjectsModelsVersionsService) Delete(name string) *ProjectsModelsVersionsDeleteCall {
8201 c := &ProjectsModelsVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8202 c.name = name
8203 return c
8204 }
8205
8206
8207
8208
8209 func (c *ProjectsModelsVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsDeleteCall {
8210 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8211 return c
8212 }
8213
8214
8215 func (c *ProjectsModelsVersionsDeleteCall) Context(ctx context.Context) *ProjectsModelsVersionsDeleteCall {
8216 c.ctx_ = ctx
8217 return c
8218 }
8219
8220
8221
8222 func (c *ProjectsModelsVersionsDeleteCall) Header() http.Header {
8223 if c.header_ == nil {
8224 c.header_ = make(http.Header)
8225 }
8226 return c.header_
8227 }
8228
8229 func (c *ProjectsModelsVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
8230 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8231 var body io.Reader = nil
8232 c.urlParams_.Set("alt", alt)
8233 c.urlParams_.Set("prettyPrint", "false")
8234 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8235 urls += "?" + c.urlParams_.Encode()
8236 req, err := http.NewRequest("DELETE", urls, body)
8237 if err != nil {
8238 return nil, err
8239 }
8240 req.Header = reqHeaders
8241 googleapi.Expand(req.URL, map[string]string{
8242 "name": c.name,
8243 })
8244 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8245 }
8246
8247
8248
8249
8250
8251
8252
8253 func (c *ProjectsModelsVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
8254 gensupport.SetOptions(c.urlParams_, opts...)
8255 res, err := c.doRequest("json")
8256 if res != nil && res.StatusCode == http.StatusNotModified {
8257 if res.Body != nil {
8258 res.Body.Close()
8259 }
8260 return nil, gensupport.WrapError(&googleapi.Error{
8261 Code: res.StatusCode,
8262 Header: res.Header,
8263 })
8264 }
8265 if err != nil {
8266 return nil, err
8267 }
8268 defer googleapi.CloseBody(res)
8269 if err := googleapi.CheckResponse(res); err != nil {
8270 return nil, gensupport.WrapError(err)
8271 }
8272 ret := &GoogleLongrunning__Operation{
8273 ServerResponse: googleapi.ServerResponse{
8274 Header: res.Header,
8275 HTTPStatusCode: res.StatusCode,
8276 },
8277 }
8278 target := &ret
8279 if err := gensupport.DecodeResponse(target, res); err != nil {
8280 return nil, err
8281 }
8282 return ret, nil
8283 }
8284
8285 type ProjectsModelsVersionsGetCall struct {
8286 s *Service
8287 name string
8288 urlParams_ gensupport.URLParams
8289 ifNoneMatch_ string
8290 ctx_ context.Context
8291 header_ http.Header
8292 }
8293
8294
8295
8296
8297
8298
8299 func (r *ProjectsModelsVersionsService) Get(name string) *ProjectsModelsVersionsGetCall {
8300 c := &ProjectsModelsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8301 c.name = name
8302 return c
8303 }
8304
8305
8306
8307
8308 func (c *ProjectsModelsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsGetCall {
8309 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8310 return c
8311 }
8312
8313
8314
8315
8316 func (c *ProjectsModelsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsGetCall {
8317 c.ifNoneMatch_ = entityTag
8318 return c
8319 }
8320
8321
8322 func (c *ProjectsModelsVersionsGetCall) Context(ctx context.Context) *ProjectsModelsVersionsGetCall {
8323 c.ctx_ = ctx
8324 return c
8325 }
8326
8327
8328
8329 func (c *ProjectsModelsVersionsGetCall) Header() http.Header {
8330 if c.header_ == nil {
8331 c.header_ = make(http.Header)
8332 }
8333 return c.header_
8334 }
8335
8336 func (c *ProjectsModelsVersionsGetCall) doRequest(alt string) (*http.Response, error) {
8337 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8338 if c.ifNoneMatch_ != "" {
8339 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8340 }
8341 var body io.Reader = nil
8342 c.urlParams_.Set("alt", alt)
8343 c.urlParams_.Set("prettyPrint", "false")
8344 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8345 urls += "?" + c.urlParams_.Encode()
8346 req, err := http.NewRequest("GET", urls, body)
8347 if err != nil {
8348 return nil, err
8349 }
8350 req.Header = reqHeaders
8351 googleapi.Expand(req.URL, map[string]string{
8352 "name": c.name,
8353 })
8354 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8355 }
8356
8357
8358
8359
8360
8361
8362
8363 func (c *ProjectsModelsVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Version, error) {
8364 gensupport.SetOptions(c.urlParams_, opts...)
8365 res, err := c.doRequest("json")
8366 if res != nil && res.StatusCode == http.StatusNotModified {
8367 if res.Body != nil {
8368 res.Body.Close()
8369 }
8370 return nil, gensupport.WrapError(&googleapi.Error{
8371 Code: res.StatusCode,
8372 Header: res.Header,
8373 })
8374 }
8375 if err != nil {
8376 return nil, err
8377 }
8378 defer googleapi.CloseBody(res)
8379 if err := googleapi.CheckResponse(res); err != nil {
8380 return nil, gensupport.WrapError(err)
8381 }
8382 ret := &GoogleCloudMlV1__Version{
8383 ServerResponse: googleapi.ServerResponse{
8384 Header: res.Header,
8385 HTTPStatusCode: res.StatusCode,
8386 },
8387 }
8388 target := &ret
8389 if err := gensupport.DecodeResponse(target, res); err != nil {
8390 return nil, err
8391 }
8392 return ret, nil
8393 }
8394
8395 type ProjectsModelsVersionsListCall struct {
8396 s *Service
8397 parent string
8398 urlParams_ gensupport.URLParams
8399 ifNoneMatch_ string
8400 ctx_ context.Context
8401 header_ http.Header
8402 }
8403
8404
8405
8406
8407
8408
8409
8410
8411 func (r *ProjectsModelsVersionsService) List(parent string) *ProjectsModelsVersionsListCall {
8412 c := &ProjectsModelsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8413 c.parent = parent
8414 return c
8415 }
8416
8417
8418
8419 func (c *ProjectsModelsVersionsListCall) Filter(filter string) *ProjectsModelsVersionsListCall {
8420 c.urlParams_.Set("filter", filter)
8421 return c
8422 }
8423
8424
8425
8426
8427
8428
8429 func (c *ProjectsModelsVersionsListCall) PageSize(pageSize int64) *ProjectsModelsVersionsListCall {
8430 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8431 return c
8432 }
8433
8434
8435
8436
8437 func (c *ProjectsModelsVersionsListCall) PageToken(pageToken string) *ProjectsModelsVersionsListCall {
8438 c.urlParams_.Set("pageToken", pageToken)
8439 return c
8440 }
8441
8442
8443
8444
8445 func (c *ProjectsModelsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsListCall {
8446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8447 return c
8448 }
8449
8450
8451
8452
8453 func (c *ProjectsModelsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsModelsVersionsListCall {
8454 c.ifNoneMatch_ = entityTag
8455 return c
8456 }
8457
8458
8459 func (c *ProjectsModelsVersionsListCall) Context(ctx context.Context) *ProjectsModelsVersionsListCall {
8460 c.ctx_ = ctx
8461 return c
8462 }
8463
8464
8465
8466 func (c *ProjectsModelsVersionsListCall) Header() http.Header {
8467 if c.header_ == nil {
8468 c.header_ = make(http.Header)
8469 }
8470 return c.header_
8471 }
8472
8473 func (c *ProjectsModelsVersionsListCall) doRequest(alt string) (*http.Response, error) {
8474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8475 if c.ifNoneMatch_ != "" {
8476 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8477 }
8478 var body io.Reader = nil
8479 c.urlParams_.Set("alt", alt)
8480 c.urlParams_.Set("prettyPrint", "false")
8481 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions")
8482 urls += "?" + c.urlParams_.Encode()
8483 req, err := http.NewRequest("GET", urls, body)
8484 if err != nil {
8485 return nil, err
8486 }
8487 req.Header = reqHeaders
8488 googleapi.Expand(req.URL, map[string]string{
8489 "parent": c.parent,
8490 })
8491 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8492 }
8493
8494
8495
8496
8497
8498
8499
8500 func (c *ProjectsModelsVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__ListVersionsResponse, error) {
8501 gensupport.SetOptions(c.urlParams_, opts...)
8502 res, err := c.doRequest("json")
8503 if res != nil && res.StatusCode == http.StatusNotModified {
8504 if res.Body != nil {
8505 res.Body.Close()
8506 }
8507 return nil, gensupport.WrapError(&googleapi.Error{
8508 Code: res.StatusCode,
8509 Header: res.Header,
8510 })
8511 }
8512 if err != nil {
8513 return nil, err
8514 }
8515 defer googleapi.CloseBody(res)
8516 if err := googleapi.CheckResponse(res); err != nil {
8517 return nil, gensupport.WrapError(err)
8518 }
8519 ret := &GoogleCloudMlV1__ListVersionsResponse{
8520 ServerResponse: googleapi.ServerResponse{
8521 Header: res.Header,
8522 HTTPStatusCode: res.StatusCode,
8523 },
8524 }
8525 target := &ret
8526 if err := gensupport.DecodeResponse(target, res); err != nil {
8527 return nil, err
8528 }
8529 return ret, nil
8530 }
8531
8532
8533
8534
8535 func (c *ProjectsModelsVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMlV1__ListVersionsResponse) error) error {
8536 c.ctx_ = ctx
8537 defer c.PageToken(c.urlParams_.Get("pageToken"))
8538 for {
8539 x, err := c.Do()
8540 if err != nil {
8541 return err
8542 }
8543 if err := f(x); err != nil {
8544 return err
8545 }
8546 if x.NextPageToken == "" {
8547 return nil
8548 }
8549 c.PageToken(x.NextPageToken)
8550 }
8551 }
8552
8553 type ProjectsModelsVersionsPatchCall struct {
8554 s *Service
8555 name string
8556 googlecloudmlv1__version *GoogleCloudMlV1__Version
8557 urlParams_ gensupport.URLParams
8558 ctx_ context.Context
8559 header_ http.Header
8560 }
8561
8562
8563
8564
8565
8566
8567 func (r *ProjectsModelsVersionsService) Patch(name string, googlecloudmlv1__version *GoogleCloudMlV1__Version) *ProjectsModelsVersionsPatchCall {
8568 c := &ProjectsModelsVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8569 c.name = name
8570 c.googlecloudmlv1__version = googlecloudmlv1__version
8571 return c
8572 }
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584 func (c *ProjectsModelsVersionsPatchCall) UpdateMask(updateMask string) *ProjectsModelsVersionsPatchCall {
8585 c.urlParams_.Set("updateMask", updateMask)
8586 return c
8587 }
8588
8589
8590
8591
8592 func (c *ProjectsModelsVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsPatchCall {
8593 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8594 return c
8595 }
8596
8597
8598 func (c *ProjectsModelsVersionsPatchCall) Context(ctx context.Context) *ProjectsModelsVersionsPatchCall {
8599 c.ctx_ = ctx
8600 return c
8601 }
8602
8603
8604
8605 func (c *ProjectsModelsVersionsPatchCall) Header() http.Header {
8606 if c.header_ == nil {
8607 c.header_ = make(http.Header)
8608 }
8609 return c.header_
8610 }
8611
8612 func (c *ProjectsModelsVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
8613 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8614 var body io.Reader = nil
8615 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__version)
8616 if err != nil {
8617 return nil, err
8618 }
8619 c.urlParams_.Set("alt", alt)
8620 c.urlParams_.Set("prettyPrint", "false")
8621 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8622 urls += "?" + c.urlParams_.Encode()
8623 req, err := http.NewRequest("PATCH", urls, body)
8624 if err != nil {
8625 return nil, err
8626 }
8627 req.Header = reqHeaders
8628 googleapi.Expand(req.URL, map[string]string{
8629 "name": c.name,
8630 })
8631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8632 }
8633
8634
8635
8636
8637
8638
8639
8640 func (c *ProjectsModelsVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
8641 gensupport.SetOptions(c.urlParams_, opts...)
8642 res, err := c.doRequest("json")
8643 if res != nil && res.StatusCode == http.StatusNotModified {
8644 if res.Body != nil {
8645 res.Body.Close()
8646 }
8647 return nil, gensupport.WrapError(&googleapi.Error{
8648 Code: res.StatusCode,
8649 Header: res.Header,
8650 })
8651 }
8652 if err != nil {
8653 return nil, err
8654 }
8655 defer googleapi.CloseBody(res)
8656 if err := googleapi.CheckResponse(res); err != nil {
8657 return nil, gensupport.WrapError(err)
8658 }
8659 ret := &GoogleLongrunning__Operation{
8660 ServerResponse: googleapi.ServerResponse{
8661 Header: res.Header,
8662 HTTPStatusCode: res.StatusCode,
8663 },
8664 }
8665 target := &ret
8666 if err := gensupport.DecodeResponse(target, res); err != nil {
8667 return nil, err
8668 }
8669 return ret, nil
8670 }
8671
8672 type ProjectsModelsVersionsSetDefaultCall struct {
8673 s *Service
8674 name string
8675 googlecloudmlv1__setdefaultversionrequest *GoogleCloudMlV1__SetDefaultVersionRequest
8676 urlParams_ gensupport.URLParams
8677 ctx_ context.Context
8678 header_ http.Header
8679 }
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690 func (r *ProjectsModelsVersionsService) SetDefault(name string, googlecloudmlv1__setdefaultversionrequest *GoogleCloudMlV1__SetDefaultVersionRequest) *ProjectsModelsVersionsSetDefaultCall {
8691 c := &ProjectsModelsVersionsSetDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8692 c.name = name
8693 c.googlecloudmlv1__setdefaultversionrequest = googlecloudmlv1__setdefaultversionrequest
8694 return c
8695 }
8696
8697
8698
8699
8700 func (c *ProjectsModelsVersionsSetDefaultCall) Fields(s ...googleapi.Field) *ProjectsModelsVersionsSetDefaultCall {
8701 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8702 return c
8703 }
8704
8705
8706 func (c *ProjectsModelsVersionsSetDefaultCall) Context(ctx context.Context) *ProjectsModelsVersionsSetDefaultCall {
8707 c.ctx_ = ctx
8708 return c
8709 }
8710
8711
8712
8713 func (c *ProjectsModelsVersionsSetDefaultCall) Header() http.Header {
8714 if c.header_ == nil {
8715 c.header_ = make(http.Header)
8716 }
8717 return c.header_
8718 }
8719
8720 func (c *ProjectsModelsVersionsSetDefaultCall) doRequest(alt string) (*http.Response, error) {
8721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8722 var body io.Reader = nil
8723 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmlv1__setdefaultversionrequest)
8724 if err != nil {
8725 return nil, err
8726 }
8727 c.urlParams_.Set("alt", alt)
8728 c.urlParams_.Set("prettyPrint", "false")
8729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setDefault")
8730 urls += "?" + c.urlParams_.Encode()
8731 req, err := http.NewRequest("POST", urls, body)
8732 if err != nil {
8733 return nil, err
8734 }
8735 req.Header = reqHeaders
8736 googleapi.Expand(req.URL, map[string]string{
8737 "name": c.name,
8738 })
8739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8740 }
8741
8742
8743
8744
8745
8746
8747
8748 func (c *ProjectsModelsVersionsSetDefaultCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMlV1__Version, error) {
8749 gensupport.SetOptions(c.urlParams_, opts...)
8750 res, err := c.doRequest("json")
8751 if res != nil && res.StatusCode == http.StatusNotModified {
8752 if res.Body != nil {
8753 res.Body.Close()
8754 }
8755 return nil, gensupport.WrapError(&googleapi.Error{
8756 Code: res.StatusCode,
8757 Header: res.Header,
8758 })
8759 }
8760 if err != nil {
8761 return nil, err
8762 }
8763 defer googleapi.CloseBody(res)
8764 if err := googleapi.CheckResponse(res); err != nil {
8765 return nil, gensupport.WrapError(err)
8766 }
8767 ret := &GoogleCloudMlV1__Version{
8768 ServerResponse: googleapi.ServerResponse{
8769 Header: res.Header,
8770 HTTPStatusCode: res.StatusCode,
8771 },
8772 }
8773 target := &ret
8774 if err := gensupport.DecodeResponse(target, res); err != nil {
8775 return nil, err
8776 }
8777 return ret, nil
8778 }
8779
8780 type ProjectsOperationsCancelCall struct {
8781 s *Service
8782 name string
8783 urlParams_ gensupport.URLParams
8784 ctx_ context.Context
8785 header_ http.Header
8786 }
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799 func (r *ProjectsOperationsService) Cancel(name string) *ProjectsOperationsCancelCall {
8800 c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8801 c.name = name
8802 return c
8803 }
8804
8805
8806
8807
8808 func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
8809 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8810 return c
8811 }
8812
8813
8814 func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
8815 c.ctx_ = ctx
8816 return c
8817 }
8818
8819
8820
8821 func (c *ProjectsOperationsCancelCall) Header() http.Header {
8822 if c.header_ == nil {
8823 c.header_ = make(http.Header)
8824 }
8825 return c.header_
8826 }
8827
8828 func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
8829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8830 var body io.Reader = nil
8831 c.urlParams_.Set("alt", alt)
8832 c.urlParams_.Set("prettyPrint", "false")
8833 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
8834 urls += "?" + c.urlParams_.Encode()
8835 req, err := http.NewRequest("POST", urls, body)
8836 if err != nil {
8837 return nil, err
8838 }
8839 req.Header = reqHeaders
8840 googleapi.Expand(req.URL, map[string]string{
8841 "name": c.name,
8842 })
8843 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8844 }
8845
8846
8847
8848
8849
8850
8851
8852 func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobuf__Empty, error) {
8853 gensupport.SetOptions(c.urlParams_, opts...)
8854 res, err := c.doRequest("json")
8855 if res != nil && res.StatusCode == http.StatusNotModified {
8856 if res.Body != nil {
8857 res.Body.Close()
8858 }
8859 return nil, gensupport.WrapError(&googleapi.Error{
8860 Code: res.StatusCode,
8861 Header: res.Header,
8862 })
8863 }
8864 if err != nil {
8865 return nil, err
8866 }
8867 defer googleapi.CloseBody(res)
8868 if err := googleapi.CheckResponse(res); err != nil {
8869 return nil, gensupport.WrapError(err)
8870 }
8871 ret := &GoogleProtobuf__Empty{
8872 ServerResponse: googleapi.ServerResponse{
8873 Header: res.Header,
8874 HTTPStatusCode: res.StatusCode,
8875 },
8876 }
8877 target := &ret
8878 if err := gensupport.DecodeResponse(target, res); err != nil {
8879 return nil, err
8880 }
8881 return ret, nil
8882 }
8883
8884 type ProjectsOperationsGetCall struct {
8885 s *Service
8886 name string
8887 urlParams_ gensupport.URLParams
8888 ifNoneMatch_ string
8889 ctx_ context.Context
8890 header_ http.Header
8891 }
8892
8893
8894
8895
8896
8897
8898 func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
8899 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8900 c.name = name
8901 return c
8902 }
8903
8904
8905
8906
8907 func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
8908 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8909 return c
8910 }
8911
8912
8913
8914
8915 func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
8916 c.ifNoneMatch_ = entityTag
8917 return c
8918 }
8919
8920
8921 func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
8922 c.ctx_ = ctx
8923 return c
8924 }
8925
8926
8927
8928 func (c *ProjectsOperationsGetCall) Header() http.Header {
8929 if c.header_ == nil {
8930 c.header_ = make(http.Header)
8931 }
8932 return c.header_
8933 }
8934
8935 func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
8936 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8937 if c.ifNoneMatch_ != "" {
8938 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8939 }
8940 var body io.Reader = nil
8941 c.urlParams_.Set("alt", alt)
8942 c.urlParams_.Set("prettyPrint", "false")
8943 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8944 urls += "?" + c.urlParams_.Encode()
8945 req, err := http.NewRequest("GET", urls, body)
8946 if err != nil {
8947 return nil, err
8948 }
8949 req.Header = reqHeaders
8950 googleapi.Expand(req.URL, map[string]string{
8951 "name": c.name,
8952 })
8953 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8954 }
8955
8956
8957
8958
8959
8960
8961
8962 func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__Operation, error) {
8963 gensupport.SetOptions(c.urlParams_, opts...)
8964 res, err := c.doRequest("json")
8965 if res != nil && res.StatusCode == http.StatusNotModified {
8966 if res.Body != nil {
8967 res.Body.Close()
8968 }
8969 return nil, gensupport.WrapError(&googleapi.Error{
8970 Code: res.StatusCode,
8971 Header: res.Header,
8972 })
8973 }
8974 if err != nil {
8975 return nil, err
8976 }
8977 defer googleapi.CloseBody(res)
8978 if err := googleapi.CheckResponse(res); err != nil {
8979 return nil, gensupport.WrapError(err)
8980 }
8981 ret := &GoogleLongrunning__Operation{
8982 ServerResponse: googleapi.ServerResponse{
8983 Header: res.Header,
8984 HTTPStatusCode: res.StatusCode,
8985 },
8986 }
8987 target := &ret
8988 if err := gensupport.DecodeResponse(target, res); err != nil {
8989 return nil, err
8990 }
8991 return ret, nil
8992 }
8993
8994 type ProjectsOperationsListCall struct {
8995 s *Service
8996 name string
8997 urlParams_ gensupport.URLParams
8998 ifNoneMatch_ string
8999 ctx_ context.Context
9000 header_ http.Header
9001 }
9002
9003
9004
9005
9006
9007 func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
9008 c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9009 c.name = name
9010 return c
9011 }
9012
9013
9014 func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
9015 c.urlParams_.Set("filter", filter)
9016 return c
9017 }
9018
9019
9020
9021 func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
9022 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9023 return c
9024 }
9025
9026
9027
9028 func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
9029 c.urlParams_.Set("pageToken", pageToken)
9030 return c
9031 }
9032
9033
9034
9035
9036 func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
9037 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9038 return c
9039 }
9040
9041
9042
9043
9044 func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
9045 c.ifNoneMatch_ = entityTag
9046 return c
9047 }
9048
9049
9050 func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
9051 c.ctx_ = ctx
9052 return c
9053 }
9054
9055
9056
9057 func (c *ProjectsOperationsListCall) Header() http.Header {
9058 if c.header_ == nil {
9059 c.header_ = make(http.Header)
9060 }
9061 return c.header_
9062 }
9063
9064 func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
9065 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9066 if c.ifNoneMatch_ != "" {
9067 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9068 }
9069 var body io.Reader = nil
9070 c.urlParams_.Set("alt", alt)
9071 c.urlParams_.Set("prettyPrint", "false")
9072 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
9073 urls += "?" + c.urlParams_.Encode()
9074 req, err := http.NewRequest("GET", urls, body)
9075 if err != nil {
9076 return nil, err
9077 }
9078 req.Header = reqHeaders
9079 googleapi.Expand(req.URL, map[string]string{
9080 "name": c.name,
9081 })
9082 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9083 }
9084
9085
9086
9087
9088
9089
9090
9091 func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning__ListOperationsResponse, error) {
9092 gensupport.SetOptions(c.urlParams_, opts...)
9093 res, err := c.doRequest("json")
9094 if res != nil && res.StatusCode == http.StatusNotModified {
9095 if res.Body != nil {
9096 res.Body.Close()
9097 }
9098 return nil, gensupport.WrapError(&googleapi.Error{
9099 Code: res.StatusCode,
9100 Header: res.Header,
9101 })
9102 }
9103 if err != nil {
9104 return nil, err
9105 }
9106 defer googleapi.CloseBody(res)
9107 if err := googleapi.CheckResponse(res); err != nil {
9108 return nil, gensupport.WrapError(err)
9109 }
9110 ret := &GoogleLongrunning__ListOperationsResponse{
9111 ServerResponse: googleapi.ServerResponse{
9112 Header: res.Header,
9113 HTTPStatusCode: res.StatusCode,
9114 },
9115 }
9116 target := &ret
9117 if err := gensupport.DecodeResponse(target, res); err != nil {
9118 return nil, err
9119 }
9120 return ret, nil
9121 }
9122
9123
9124
9125
9126 func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunning__ListOperationsResponse) error) error {
9127 c.ctx_ = ctx
9128 defer c.PageToken(c.urlParams_.Get("pageToken"))
9129 for {
9130 x, err := c.Do()
9131 if err != nil {
9132 return err
9133 }
9134 if err := f(x); err != nil {
9135 return err
9136 }
9137 if x.NextPageToken == "" {
9138 return nil
9139 }
9140 c.PageToken(x.NextPageToken)
9141 }
9142 }
9143
View as plain text