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 package recommendationengine
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "recommendationengine:v1beta1"
90 const apiName = "recommendationengine"
91 const apiVersion = "v1beta1"
92 const basePath = "https://recommendationengine.googleapis.com/"
93 const basePathTemplate = "https://recommendationengine.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://recommendationengine.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Catalogs = NewProjectsLocationsCatalogsService(s)
172 return rs
173 }
174
175 type ProjectsLocationsService struct {
176 s *Service
177
178 Catalogs *ProjectsLocationsCatalogsService
179 }
180
181 func NewProjectsLocationsCatalogsService(s *Service) *ProjectsLocationsCatalogsService {
182 rs := &ProjectsLocationsCatalogsService{s: s}
183 rs.CatalogItems = NewProjectsLocationsCatalogsCatalogItemsService(s)
184 rs.EventStores = NewProjectsLocationsCatalogsEventStoresService(s)
185 rs.Operations = NewProjectsLocationsCatalogsOperationsService(s)
186 return rs
187 }
188
189 type ProjectsLocationsCatalogsService struct {
190 s *Service
191
192 CatalogItems *ProjectsLocationsCatalogsCatalogItemsService
193
194 EventStores *ProjectsLocationsCatalogsEventStoresService
195
196 Operations *ProjectsLocationsCatalogsOperationsService
197 }
198
199 func NewProjectsLocationsCatalogsCatalogItemsService(s *Service) *ProjectsLocationsCatalogsCatalogItemsService {
200 rs := &ProjectsLocationsCatalogsCatalogItemsService{s: s}
201 return rs
202 }
203
204 type ProjectsLocationsCatalogsCatalogItemsService struct {
205 s *Service
206 }
207
208 func NewProjectsLocationsCatalogsEventStoresService(s *Service) *ProjectsLocationsCatalogsEventStoresService {
209 rs := &ProjectsLocationsCatalogsEventStoresService{s: s}
210 rs.Operations = NewProjectsLocationsCatalogsEventStoresOperationsService(s)
211 rs.Placements = NewProjectsLocationsCatalogsEventStoresPlacementsService(s)
212 rs.PredictionApiKeyRegistrations = NewProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService(s)
213 rs.UserEvents = NewProjectsLocationsCatalogsEventStoresUserEventsService(s)
214 return rs
215 }
216
217 type ProjectsLocationsCatalogsEventStoresService struct {
218 s *Service
219
220 Operations *ProjectsLocationsCatalogsEventStoresOperationsService
221
222 Placements *ProjectsLocationsCatalogsEventStoresPlacementsService
223
224 PredictionApiKeyRegistrations *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService
225
226 UserEvents *ProjectsLocationsCatalogsEventStoresUserEventsService
227 }
228
229 func NewProjectsLocationsCatalogsEventStoresOperationsService(s *Service) *ProjectsLocationsCatalogsEventStoresOperationsService {
230 rs := &ProjectsLocationsCatalogsEventStoresOperationsService{s: s}
231 return rs
232 }
233
234 type ProjectsLocationsCatalogsEventStoresOperationsService struct {
235 s *Service
236 }
237
238 func NewProjectsLocationsCatalogsEventStoresPlacementsService(s *Service) *ProjectsLocationsCatalogsEventStoresPlacementsService {
239 rs := &ProjectsLocationsCatalogsEventStoresPlacementsService{s: s}
240 return rs
241 }
242
243 type ProjectsLocationsCatalogsEventStoresPlacementsService struct {
244 s *Service
245 }
246
247 func NewProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService(s *Service) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService {
248 rs := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService{s: s}
249 return rs
250 }
251
252 type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService struct {
253 s *Service
254 }
255
256 func NewProjectsLocationsCatalogsEventStoresUserEventsService(s *Service) *ProjectsLocationsCatalogsEventStoresUserEventsService {
257 rs := &ProjectsLocationsCatalogsEventStoresUserEventsService{s: s}
258 return rs
259 }
260
261 type ProjectsLocationsCatalogsEventStoresUserEventsService struct {
262 s *Service
263 }
264
265 func NewProjectsLocationsCatalogsOperationsService(s *Service) *ProjectsLocationsCatalogsOperationsService {
266 rs := &ProjectsLocationsCatalogsOperationsService{s: s}
267 return rs
268 }
269
270 type ProjectsLocationsCatalogsOperationsService struct {
271 s *Service
272 }
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291 type GoogleApiHttpBody struct {
292
293
294 ContentType string `json:"contentType,omitempty"`
295
296 Data string `json:"data,omitempty"`
297
298
299 Extensions []googleapi.RawMessage `json:"extensions,omitempty"`
300
301
302 googleapi.ServerResponse `json:"-"`
303
304
305
306
307
308 ForceSendFields []string `json:"-"`
309
310
311
312
313 NullFields []string `json:"-"`
314 }
315
316 func (s *GoogleApiHttpBody) MarshalJSON() ([]byte, error) {
317 type NoMethod GoogleApiHttpBody
318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
319 }
320
321
322
323 type GoogleCloudRecommendationengineV1alphaRejoinCatalogMetadata struct {
324 }
325
326
327
328 type GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse struct {
329
330
331 RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
332
333
334
335
336
337 ForceSendFields []string `json:"-"`
338
339
340
341
342 NullFields []string `json:"-"`
343 }
344
345 func (s *GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse) MarshalJSON() ([]byte, error) {
346 type NoMethod GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse
347 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
348 }
349
350
351
352 type GoogleCloudRecommendationengineV1alphaTuningMetadata struct {
353
354
355
356
357 RecommendationModel string `json:"recommendationModel,omitempty"`
358
359
360
361
362
363 ForceSendFields []string `json:"-"`
364
365
366
367
368 NullFields []string `json:"-"`
369 }
370
371 func (s *GoogleCloudRecommendationengineV1alphaTuningMetadata) MarshalJSON() ([]byte, error) {
372 type NoMethod GoogleCloudRecommendationengineV1alphaTuningMetadata
373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
374 }
375
376
377
378 type GoogleCloudRecommendationengineV1alphaTuningResponse struct {
379 }
380
381
382
383 type GoogleCloudRecommendationengineV1beta1BigQuerySource struct {
384
385
386
387
388
389
390
391
392
393
394 DataSchema string `json:"dataSchema,omitempty"`
395
396 DatasetId string `json:"datasetId,omitempty"`
397
398
399
400 GcsStagingDir string `json:"gcsStagingDir,omitempty"`
401
402
403
404 ProjectId string `json:"projectId,omitempty"`
405
406 TableId string `json:"tableId,omitempty"`
407
408
409
410
411
412 ForceSendFields []string `json:"-"`
413
414
415
416
417 NullFields []string `json:"-"`
418 }
419
420 func (s *GoogleCloudRecommendationengineV1beta1BigQuerySource) MarshalJSON() ([]byte, error) {
421 type NoMethod GoogleCloudRecommendationengineV1beta1BigQuerySource
422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
423 }
424
425
426
427 type GoogleCloudRecommendationengineV1beta1Catalog struct {
428
429 CatalogItemLevelConfig *GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig `json:"catalogItemLevelConfig,omitempty"`
430
431 DefaultEventStoreId string `json:"defaultEventStoreId,omitempty"`
432
433 DisplayName string `json:"displayName,omitempty"`
434
435 Name string `json:"name,omitempty"`
436
437
438 googleapi.ServerResponse `json:"-"`
439
440
441
442
443
444 ForceSendFields []string `json:"-"`
445
446
447
448
449 NullFields []string `json:"-"`
450 }
451
452 func (s *GoogleCloudRecommendationengineV1beta1Catalog) MarshalJSON() ([]byte, error) {
453 type NoMethod GoogleCloudRecommendationengineV1beta1Catalog
454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
455 }
456
457
458
459 type GoogleCloudRecommendationengineV1beta1CatalogInlineSource struct {
460
461
462 CatalogItems []*GoogleCloudRecommendationengineV1beta1CatalogItem `json:"catalogItems,omitempty"`
463
464
465
466
467
468 ForceSendFields []string `json:"-"`
469
470
471
472
473 NullFields []string `json:"-"`
474 }
475
476 func (s *GoogleCloudRecommendationengineV1beta1CatalogInlineSource) MarshalJSON() ([]byte, error) {
477 type NoMethod GoogleCloudRecommendationengineV1beta1CatalogInlineSource
478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
479 }
480
481
482
483 type GoogleCloudRecommendationengineV1beta1CatalogItem struct {
484
485
486
487
488
489
490
491 CategoryHierarchies []*GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy `json:"categoryHierarchies,omitempty"`
492
493
494 Description string `json:"description,omitempty"`
495
496
497
498
499 Id string `json:"id,omitempty"`
500
501
502
503
504
505 ItemAttributes *GoogleCloudRecommendationengineV1beta1FeatureMap `json:"itemAttributes,omitempty"`
506
507
508
509
510 ItemGroupId string `json:"itemGroupId,omitempty"`
511
512
513
514
515 LanguageCode string `json:"languageCode,omitempty"`
516
517 ProductMetadata *GoogleCloudRecommendationengineV1beta1ProductCatalogItem `json:"productMetadata,omitempty"`
518
519
520
521
522 Tags []string `json:"tags,omitempty"`
523
524
525 Title string `json:"title,omitempty"`
526
527
528 googleapi.ServerResponse `json:"-"`
529
530
531
532
533
534 ForceSendFields []string `json:"-"`
535
536
537
538
539 NullFields []string `json:"-"`
540 }
541
542 func (s *GoogleCloudRecommendationengineV1beta1CatalogItem) MarshalJSON() ([]byte, error) {
543 type NoMethod GoogleCloudRecommendationengineV1beta1CatalogItem
544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
545 }
546
547
548
549 type GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy struct {
550
551
552
553 Categories []string `json:"categories,omitempty"`
554
555
556
557
558
559 ForceSendFields []string `json:"-"`
560
561
562
563
564 NullFields []string `json:"-"`
565 }
566
567 func (s *GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy) MarshalJSON() ([]byte, error) {
568 type NoMethod GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy
569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
570 }
571
572
573
574
575 type GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig struct {
576
577
578
579
580
581
582
583
584 EventItemLevel string `json:"eventItemLevel,omitempty"`
585
586
587
588
589
590
591
592
593
594 PredictItemLevel string `json:"predictItemLevel,omitempty"`
595
596
597
598
599
600 ForceSendFields []string `json:"-"`
601
602
603
604
605 NullFields []string `json:"-"`
606 }
607
608 func (s *GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig) MarshalJSON() ([]byte, error) {
609 type NoMethod GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig
610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
611 }
612
613
614
615 type GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest struct {
616
617 PredictionApiKeyRegistration *GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration `json:"predictionApiKeyRegistration,omitempty"`
618
619
620
621
622
623 ForceSendFields []string `json:"-"`
624
625
626
627
628 NullFields []string `json:"-"`
629 }
630
631 func (s *GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest) MarshalJSON() ([]byte, error) {
632 type NoMethod GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest
633 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
634 }
635
636
637
638 type GoogleCloudRecommendationengineV1beta1EventDetail struct {
639
640
641
642
643
644 EventAttributes *GoogleCloudRecommendationengineV1beta1FeatureMap `json:"eventAttributes,omitempty"`
645
646
647
648
649 ExperimentIds []string `json:"experimentIds,omitempty"`
650
651
652
653
654
655
656 PageViewId string `json:"pageViewId,omitempty"`
657
658
659
660
661
662
663
664
665
666
667
668 RecommendationToken string `json:"recommendationToken,omitempty"`
669
670
671 ReferrerUri string `json:"referrerUri,omitempty"`
672
673
674
675 Uri string `json:"uri,omitempty"`
676
677
678
679
680
681 ForceSendFields []string `json:"-"`
682
683
684
685
686 NullFields []string `json:"-"`
687 }
688
689 func (s *GoogleCloudRecommendationengineV1beta1EventDetail) MarshalJSON() ([]byte, error) {
690 type NoMethod GoogleCloudRecommendationengineV1beta1EventDetail
691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
692 }
693
694
695
696
697 type GoogleCloudRecommendationengineV1beta1FeatureMap struct {
698
699
700
701
702
703 CategoricalFeatures map[string]GoogleCloudRecommendationengineV1beta1FeatureMapStringList `json:"categoricalFeatures,omitempty"`
704
705
706
707
708 NumericalFeatures map[string]GoogleCloudRecommendationengineV1beta1FeatureMapFloatList `json:"numericalFeatures,omitempty"`
709
710
711
712
713
714 ForceSendFields []string `json:"-"`
715
716
717
718
719 NullFields []string `json:"-"`
720 }
721
722 func (s *GoogleCloudRecommendationengineV1beta1FeatureMap) MarshalJSON() ([]byte, error) {
723 type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMap
724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
725 }
726
727
728
729 type GoogleCloudRecommendationengineV1beta1FeatureMapFloatList struct {
730
731 Value []float64 `json:"value,omitempty"`
732
733
734
735
736
737 ForceSendFields []string `json:"-"`
738
739
740
741
742 NullFields []string `json:"-"`
743 }
744
745 func (s *GoogleCloudRecommendationengineV1beta1FeatureMapFloatList) MarshalJSON() ([]byte, error) {
746 type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMapFloatList
747 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
748 }
749
750 func (s *GoogleCloudRecommendationengineV1beta1FeatureMapFloatList) UnmarshalJSON(data []byte) error {
751 type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMapFloatList
752 var s1 struct {
753 Value []gensupport.JSONFloat64 `json:"value"`
754 *NoMethod
755 }
756 s1.NoMethod = (*NoMethod)(s)
757 if err := json.Unmarshal(data, &s1); err != nil {
758 return err
759 }
760 s.Value = make([]float64, len(s1.Value))
761 for i := range s1.Value {
762 s.Value[i] = float64(s1.Value[i])
763 }
764 return nil
765 }
766
767
768
769 type GoogleCloudRecommendationengineV1beta1FeatureMapStringList struct {
770
771 Value []string `json:"value,omitempty"`
772
773
774
775
776
777 ForceSendFields []string `json:"-"`
778
779
780
781
782 NullFields []string `json:"-"`
783 }
784
785 func (s *GoogleCloudRecommendationengineV1beta1FeatureMapStringList) MarshalJSON() ([]byte, error) {
786 type NoMethod GoogleCloudRecommendationengineV1beta1FeatureMapStringList
787 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
788 }
789
790
791
792 type GoogleCloudRecommendationengineV1beta1GcsSource struct {
793
794
795
796
797
798
799
800 InputUris []string `json:"inputUris,omitempty"`
801
802
803
804
805
806
807
808
809
810
811 JsonSchema string `json:"jsonSchema,omitempty"`
812
813
814
815
816
817 ForceSendFields []string `json:"-"`
818
819
820
821
822 NullFields []string `json:"-"`
823 }
824
825 func (s *GoogleCloudRecommendationengineV1beta1GcsSource) MarshalJSON() ([]byte, error) {
826 type NoMethod GoogleCloudRecommendationengineV1beta1GcsSource
827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
828 }
829
830
831
832 type GoogleCloudRecommendationengineV1beta1Image struct {
833
834 Height int64 `json:"height,omitempty"`
835
836 Uri string `json:"uri,omitempty"`
837
838 Width int64 `json:"width,omitempty"`
839
840
841
842
843
844 ForceSendFields []string `json:"-"`
845
846
847
848
849 NullFields []string `json:"-"`
850 }
851
852 func (s *GoogleCloudRecommendationengineV1beta1Image) MarshalJSON() ([]byte, error) {
853 type NoMethod GoogleCloudRecommendationengineV1beta1Image
854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
855 }
856
857
858
859 type GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest struct {
860
861
862 ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
863
864 InputConfig *GoogleCloudRecommendationengineV1beta1InputConfig `json:"inputConfig,omitempty"`
865
866
867
868
869 RequestId string `json:"requestId,omitempty"`
870
871
872 UpdateMask string `json:"updateMask,omitempty"`
873
874
875
876
877
878 ForceSendFields []string `json:"-"`
879
880
881
882
883 NullFields []string `json:"-"`
884 }
885
886 func (s *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest) MarshalJSON() ([]byte, error) {
887 type NoMethod GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest
888 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
889 }
890
891
892
893
894
895 type GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse struct {
896
897 ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
898
899
900 ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
901
902
903
904
905
906 ForceSendFields []string `json:"-"`
907
908
909
910
911 NullFields []string `json:"-"`
912 }
913
914 func (s *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse) MarshalJSON() ([]byte, error) {
915 type NoMethod GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse
916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
917 }
918
919
920
921 type GoogleCloudRecommendationengineV1beta1ImportErrorsConfig struct {
922
923
924
925
926 GcsPrefix string `json:"gcsPrefix,omitempty"`
927
928
929
930
931
932 ForceSendFields []string `json:"-"`
933
934
935
936
937 NullFields []string `json:"-"`
938 }
939
940 func (s *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig) MarshalJSON() ([]byte, error) {
941 type NoMethod GoogleCloudRecommendationengineV1beta1ImportErrorsConfig
942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
943 }
944
945
946
947
948 type GoogleCloudRecommendationengineV1beta1ImportMetadata struct {
949
950 CreateTime string `json:"createTime,omitempty"`
951
952 FailureCount int64 `json:"failureCount,omitempty,string"`
953
954 OperationName string `json:"operationName,omitempty"`
955
956
957 RequestId string `json:"requestId,omitempty"`
958
959 SuccessCount int64 `json:"successCount,omitempty,string"`
960
961
962 UpdateTime string `json:"updateTime,omitempty"`
963
964
965
966
967
968 ForceSendFields []string `json:"-"`
969
970
971
972
973 NullFields []string `json:"-"`
974 }
975
976 func (s *GoogleCloudRecommendationengineV1beta1ImportMetadata) MarshalJSON() ([]byte, error) {
977 type NoMethod GoogleCloudRecommendationengineV1beta1ImportMetadata
978 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
979 }
980
981
982
983 type GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest struct {
984
985
986 ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
987
988 InputConfig *GoogleCloudRecommendationengineV1beta1InputConfig `json:"inputConfig,omitempty"`
989
990
991
992
993
994
995 RequestId string `json:"requestId,omitempty"`
996
997
998
999
1000
1001 ForceSendFields []string `json:"-"`
1002
1003
1004
1005
1006 NullFields []string `json:"-"`
1007 }
1008
1009 func (s *GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest) MarshalJSON() ([]byte, error) {
1010 type NoMethod GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest
1011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1012 }
1013
1014
1015
1016
1017
1018 type GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse struct {
1019
1020 ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"`
1021
1022
1023 ErrorsConfig *GoogleCloudRecommendationengineV1beta1ImportErrorsConfig `json:"errorsConfig,omitempty"`
1024
1025 ImportSummary *GoogleCloudRecommendationengineV1beta1UserEventImportSummary `json:"importSummary,omitempty"`
1026
1027
1028
1029
1030
1031 ForceSendFields []string `json:"-"`
1032
1033
1034
1035
1036 NullFields []string `json:"-"`
1037 }
1038
1039 func (s *GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse) MarshalJSON() ([]byte, error) {
1040 type NoMethod GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse
1041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1042 }
1043
1044
1045 type GoogleCloudRecommendationengineV1beta1InputConfig struct {
1046
1047 BigQuerySource *GoogleCloudRecommendationengineV1beta1BigQuerySource `json:"bigQuerySource,omitempty"`
1048
1049
1050 CatalogInlineSource *GoogleCloudRecommendationengineV1beta1CatalogInlineSource `json:"catalogInlineSource,omitempty"`
1051
1052 GcsSource *GoogleCloudRecommendationengineV1beta1GcsSource `json:"gcsSource,omitempty"`
1053
1054
1055 UserEventInlineSource *GoogleCloudRecommendationengineV1beta1UserEventInlineSource `json:"userEventInlineSource,omitempty"`
1056
1057
1058
1059
1060
1061 ForceSendFields []string `json:"-"`
1062
1063
1064
1065
1066 NullFields []string `json:"-"`
1067 }
1068
1069 func (s *GoogleCloudRecommendationengineV1beta1InputConfig) MarshalJSON() ([]byte, error) {
1070 type NoMethod GoogleCloudRecommendationengineV1beta1InputConfig
1071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1072 }
1073
1074
1075
1076 type GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse struct {
1077
1078 CatalogItems []*GoogleCloudRecommendationengineV1beta1CatalogItem `json:"catalogItems,omitempty"`
1079
1080
1081 NextPageToken string `json:"nextPageToken,omitempty"`
1082
1083
1084 googleapi.ServerResponse `json:"-"`
1085
1086
1087
1088
1089
1090 ForceSendFields []string `json:"-"`
1091
1092
1093
1094
1095 NullFields []string `json:"-"`
1096 }
1097
1098 func (s *GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse) MarshalJSON() ([]byte, error) {
1099 type NoMethod GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse
1100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1101 }
1102
1103
1104
1105 type GoogleCloudRecommendationengineV1beta1ListCatalogsResponse struct {
1106
1107 Catalogs []*GoogleCloudRecommendationengineV1beta1Catalog `json:"catalogs,omitempty"`
1108
1109 NextPageToken string `json:"nextPageToken,omitempty"`
1110
1111
1112 googleapi.ServerResponse `json:"-"`
1113
1114
1115
1116
1117
1118 ForceSendFields []string `json:"-"`
1119
1120
1121
1122
1123 NullFields []string `json:"-"`
1124 }
1125
1126 func (s *GoogleCloudRecommendationengineV1beta1ListCatalogsResponse) MarshalJSON() ([]byte, error) {
1127 type NoMethod GoogleCloudRecommendationengineV1beta1ListCatalogsResponse
1128 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1129 }
1130
1131
1132
1133 type GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse struct {
1134
1135
1136 NextPageToken string `json:"nextPageToken,omitempty"`
1137
1138 PredictionApiKeyRegistrations []*GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration `json:"predictionApiKeyRegistrations,omitempty"`
1139
1140
1141 googleapi.ServerResponse `json:"-"`
1142
1143
1144
1145
1146
1147 ForceSendFields []string `json:"-"`
1148
1149
1150
1151
1152 NullFields []string `json:"-"`
1153 }
1154
1155 func (s *GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse) MarshalJSON() ([]byte, error) {
1156 type NoMethod GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse
1157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1158 }
1159
1160
1161
1162 type GoogleCloudRecommendationengineV1beta1ListUserEventsResponse struct {
1163
1164
1165 NextPageToken string `json:"nextPageToken,omitempty"`
1166
1167 UserEvents []*GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEvents,omitempty"`
1168
1169
1170 googleapi.ServerResponse `json:"-"`
1171
1172
1173
1174
1175
1176 ForceSendFields []string `json:"-"`
1177
1178
1179
1180
1181 NullFields []string `json:"-"`
1182 }
1183
1184 func (s *GoogleCloudRecommendationengineV1beta1ListUserEventsResponse) MarshalJSON() ([]byte, error) {
1185 type NoMethod GoogleCloudRecommendationengineV1beta1ListUserEventsResponse
1186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1187 }
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211 type GoogleCloudRecommendationengineV1beta1PredictRequest struct {
1212
1213
1214
1215
1216 DryRun bool `json:"dryRun,omitempty"`
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231 Filter string `json:"filter,omitempty"`
1232
1233
1234
1235
1236
1237
1238
1239 Labels map[string]string `json:"labels,omitempty"`
1240
1241
1242
1243 PageSize int64 `json:"pageSize,omitempty"`
1244
1245 PageToken string `json:"pageToken,omitempty"`
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265 Params googleapi.RawMessage `json:"params,omitempty"`
1266
1267
1268
1269
1270
1271
1272
1273
1274 UserEvent *GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEvent,omitempty"`
1275
1276
1277
1278
1279
1280 ForceSendFields []string `json:"-"`
1281
1282
1283
1284
1285 NullFields []string `json:"-"`
1286 }
1287
1288 func (s *GoogleCloudRecommendationengineV1beta1PredictRequest) MarshalJSON() ([]byte, error) {
1289 type NoMethod GoogleCloudRecommendationengineV1beta1PredictRequest
1290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1291 }
1292
1293
1294
1295 type GoogleCloudRecommendationengineV1beta1PredictResponse struct {
1296
1297 DryRun bool `json:"dryRun,omitempty"`
1298
1299
1300 ItemsMissingInCatalog []string `json:"itemsMissingInCatalog,omitempty"`
1301
1302 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1303
1304
1305 NextPageToken string `json:"nextPageToken,omitempty"`
1306
1307
1308
1309 RecommendationToken string `json:"recommendationToken,omitempty"`
1310
1311
1312 Results []*GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult `json:"results,omitempty"`
1313
1314
1315 googleapi.ServerResponse `json:"-"`
1316
1317
1318
1319
1320
1321 ForceSendFields []string `json:"-"`
1322
1323
1324
1325
1326 NullFields []string `json:"-"`
1327 }
1328
1329 func (s *GoogleCloudRecommendationengineV1beta1PredictResponse) MarshalJSON() ([]byte, error) {
1330 type NoMethod GoogleCloudRecommendationengineV1beta1PredictResponse
1331 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1332 }
1333
1334
1335
1336 type GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult struct {
1337
1338 Id string `json:"id,omitempty"`
1339
1340
1341
1342
1343
1344 ItemMetadata googleapi.RawMessage `json:"itemMetadata,omitempty"`
1345
1346
1347
1348
1349
1350 ForceSendFields []string `json:"-"`
1351
1352
1353
1354
1355 NullFields []string `json:"-"`
1356 }
1357
1358 func (s *GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult) MarshalJSON() ([]byte, error) {
1359 type NoMethod GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult
1360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1361 }
1362
1363
1364
1365 type GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration struct {
1366
1367 ApiKey string `json:"apiKey,omitempty"`
1368
1369
1370 googleapi.ServerResponse `json:"-"`
1371
1372
1373
1374
1375
1376 ForceSendFields []string `json:"-"`
1377
1378
1379
1380
1381 NullFields []string `json:"-"`
1382 }
1383
1384 func (s *GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration) MarshalJSON() ([]byte, error) {
1385 type NoMethod GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration
1386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1387 }
1388
1389
1390
1391 type GoogleCloudRecommendationengineV1beta1ProductCatalogItem struct {
1392
1393 AvailableQuantity int64 `json:"availableQuantity,omitempty,string"`
1394
1395
1396 CanonicalProductUri string `json:"canonicalProductUri,omitempty"`
1397
1398
1399
1400
1401 Costs map[string]float64 `json:"costs,omitempty"`
1402
1403
1404 CurrencyCode string `json:"currencyCode,omitempty"`
1405
1406 ExactPrice *GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice `json:"exactPrice,omitempty"`
1407
1408 Images []*GoogleCloudRecommendationengineV1beta1Image `json:"images,omitempty"`
1409
1410 PriceRange *GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange `json:"priceRange,omitempty"`
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421 StockState string `json:"stockState,omitempty"`
1422
1423
1424
1425
1426
1427 ForceSendFields []string `json:"-"`
1428
1429
1430
1431
1432 NullFields []string `json:"-"`
1433 }
1434
1435 func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItem) MarshalJSON() ([]byte, error) {
1436 type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItem
1437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1438 }
1439
1440
1441
1442 type GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice struct {
1443
1444 DisplayPrice float64 `json:"displayPrice,omitempty"`
1445
1446
1447 OriginalPrice float64 `json:"originalPrice,omitempty"`
1448
1449
1450
1451
1452
1453 ForceSendFields []string `json:"-"`
1454
1455
1456
1457
1458 NullFields []string `json:"-"`
1459 }
1460
1461 func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice) MarshalJSON() ([]byte, error) {
1462 type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
1463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1464 }
1465
1466 func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice) UnmarshalJSON(data []byte) error {
1467 type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice
1468 var s1 struct {
1469 DisplayPrice gensupport.JSONFloat64 `json:"displayPrice"`
1470 OriginalPrice gensupport.JSONFloat64 `json:"originalPrice"`
1471 *NoMethod
1472 }
1473 s1.NoMethod = (*NoMethod)(s)
1474 if err := json.Unmarshal(data, &s1); err != nil {
1475 return err
1476 }
1477 s.DisplayPrice = float64(s1.DisplayPrice)
1478 s.OriginalPrice = float64(s1.OriginalPrice)
1479 return nil
1480 }
1481
1482
1483
1484
1485 type GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange struct {
1486
1487 Max float64 `json:"max,omitempty"`
1488
1489 Min float64 `json:"min,omitempty"`
1490
1491
1492
1493
1494
1495 ForceSendFields []string `json:"-"`
1496
1497
1498
1499
1500 NullFields []string `json:"-"`
1501 }
1502
1503 func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange) MarshalJSON() ([]byte, error) {
1504 type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
1505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1506 }
1507
1508 func (s *GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange) UnmarshalJSON(data []byte) error {
1509 type NoMethod GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange
1510 var s1 struct {
1511 Max gensupport.JSONFloat64 `json:"max"`
1512 Min gensupport.JSONFloat64 `json:"min"`
1513 *NoMethod
1514 }
1515 s1.NoMethod = (*NoMethod)(s)
1516 if err := json.Unmarshal(data, &s1); err != nil {
1517 return err
1518 }
1519 s.Max = float64(s1.Max)
1520 s.Min = float64(s1.Min)
1521 return nil
1522 }
1523
1524
1525
1526 type GoogleCloudRecommendationengineV1beta1ProductDetail struct {
1527
1528
1529
1530
1531
1532
1533 AvailableQuantity int64 `json:"availableQuantity,omitempty"`
1534
1535
1536 CurrencyCode string `json:"currencyCode,omitempty"`
1537
1538
1539
1540 DisplayPrice float64 `json:"displayPrice,omitempty"`
1541
1542
1543 Id string `json:"id,omitempty"`
1544
1545
1546 ItemAttributes *GoogleCloudRecommendationengineV1beta1FeatureMap `json:"itemAttributes,omitempty"`
1547
1548
1549 OriginalPrice float64 `json:"originalPrice,omitempty"`
1550
1551
1552
1553
1554
1555 Quantity int64 `json:"quantity,omitempty"`
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566 StockState string `json:"stockState,omitempty"`
1567
1568
1569
1570
1571
1572 ForceSendFields []string `json:"-"`
1573
1574
1575
1576
1577 NullFields []string `json:"-"`
1578 }
1579
1580 func (s *GoogleCloudRecommendationengineV1beta1ProductDetail) MarshalJSON() ([]byte, error) {
1581 type NoMethod GoogleCloudRecommendationengineV1beta1ProductDetail
1582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1583 }
1584
1585 func (s *GoogleCloudRecommendationengineV1beta1ProductDetail) UnmarshalJSON(data []byte) error {
1586 type NoMethod GoogleCloudRecommendationengineV1beta1ProductDetail
1587 var s1 struct {
1588 DisplayPrice gensupport.JSONFloat64 `json:"displayPrice"`
1589 OriginalPrice gensupport.JSONFloat64 `json:"originalPrice"`
1590 *NoMethod
1591 }
1592 s1.NoMethod = (*NoMethod)(s)
1593 if err := json.Unmarshal(data, &s1); err != nil {
1594 return err
1595 }
1596 s.DisplayPrice = float64(s1.DisplayPrice)
1597 s.OriginalPrice = float64(s1.OriginalPrice)
1598 return nil
1599 }
1600
1601
1602
1603 type GoogleCloudRecommendationengineV1beta1ProductEventDetail struct {
1604
1605
1606
1607
1608 CartId string `json:"cartId,omitempty"`
1609
1610
1611
1612 ListId string `json:"listId,omitempty"`
1613
1614
1615
1616
1617
1618
1619 PageCategories []*GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy `json:"pageCategories,omitempty"`
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634 ProductDetails []*GoogleCloudRecommendationengineV1beta1ProductDetail `json:"productDetails,omitempty"`
1635
1636
1637
1638 PurchaseTransaction *GoogleCloudRecommendationengineV1beta1PurchaseTransaction `json:"purchaseTransaction,omitempty"`
1639
1640
1641
1642 SearchQuery string `json:"searchQuery,omitempty"`
1643
1644
1645
1646
1647
1648 ForceSendFields []string `json:"-"`
1649
1650
1651
1652
1653 NullFields []string `json:"-"`
1654 }
1655
1656 func (s *GoogleCloudRecommendationengineV1beta1ProductEventDetail) MarshalJSON() ([]byte, error) {
1657 type NoMethod GoogleCloudRecommendationengineV1beta1ProductEventDetail
1658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1659 }
1660
1661
1662
1663 type GoogleCloudRecommendationengineV1beta1PurchaseTransaction struct {
1664
1665
1666
1667
1668
1669
1670
1671 Costs map[string]float64 `json:"costs,omitempty"`
1672
1673
1674 CurrencyCode string `json:"currencyCode,omitempty"`
1675
1676 Id string `json:"id,omitempty"`
1677
1678
1679
1680
1681 Revenue float64 `json:"revenue,omitempty"`
1682
1683 Taxes map[string]float64 `json:"taxes,omitempty"`
1684
1685
1686
1687
1688
1689 ForceSendFields []string `json:"-"`
1690
1691
1692
1693
1694 NullFields []string `json:"-"`
1695 }
1696
1697 func (s *GoogleCloudRecommendationengineV1beta1PurchaseTransaction) MarshalJSON() ([]byte, error) {
1698 type NoMethod GoogleCloudRecommendationengineV1beta1PurchaseTransaction
1699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1700 }
1701
1702 func (s *GoogleCloudRecommendationengineV1beta1PurchaseTransaction) UnmarshalJSON(data []byte) error {
1703 type NoMethod GoogleCloudRecommendationengineV1beta1PurchaseTransaction
1704 var s1 struct {
1705 Revenue gensupport.JSONFloat64 `json:"revenue"`
1706 *NoMethod
1707 }
1708 s1.NoMethod = (*NoMethod)(s)
1709 if err := json.Unmarshal(data, &s1); err != nil {
1710 return err
1711 }
1712 s.Revenue = float64(s1.Revenue)
1713 return nil
1714 }
1715
1716
1717
1718
1719 type GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata struct {
1720
1721 CreateTime string `json:"createTime,omitempty"`
1722
1723 OperationName string `json:"operationName,omitempty"`
1724
1725
1726
1727
1728
1729 ForceSendFields []string `json:"-"`
1730
1731
1732
1733
1734 NullFields []string `json:"-"`
1735 }
1736
1737 func (s *GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata) MarshalJSON() ([]byte, error) {
1738 type NoMethod GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata
1739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1740 }
1741
1742
1743
1744 type GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest struct {
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757 Filter string `json:"filter,omitempty"`
1758
1759
1760
1761 Force bool `json:"force,omitempty"`
1762
1763
1764
1765
1766
1767 ForceSendFields []string `json:"-"`
1768
1769
1770
1771
1772 NullFields []string `json:"-"`
1773 }
1774
1775 func (s *GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest) MarshalJSON() ([]byte, error) {
1776 type NoMethod GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest
1777 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1778 }
1779
1780
1781
1782
1783
1784 type GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse struct {
1785
1786
1787 PurgedEventsCount int64 `json:"purgedEventsCount,omitempty,string"`
1788
1789
1790
1791 UserEventsSample []*GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEventsSample,omitempty"`
1792
1793
1794
1795
1796
1797 ForceSendFields []string `json:"-"`
1798
1799
1800
1801
1802 NullFields []string `json:"-"`
1803 }
1804
1805 func (s *GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse) MarshalJSON() ([]byte, error) {
1806 type NoMethod GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse
1807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1808 }
1809
1810
1811
1812 type GoogleCloudRecommendationengineV1beta1RejoinUserEventsMetadata struct {
1813 }
1814
1815
1816
1817 type GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest struct {
1818
1819
1820
1821
1822
1823
1824
1825
1826 UserEventRejoinScope string `json:"userEventRejoinScope,omitempty"`
1827
1828
1829
1830
1831
1832 ForceSendFields []string `json:"-"`
1833
1834
1835
1836
1837 NullFields []string `json:"-"`
1838 }
1839
1840 func (s *GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest) MarshalJSON() ([]byte, error) {
1841 type NoMethod GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest
1842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1843 }
1844
1845
1846
1847 type GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse struct {
1848
1849
1850 RejoinedUserEventsCount int64 `json:"rejoinedUserEventsCount,omitempty,string"`
1851
1852
1853
1854
1855
1856 ForceSendFields []string `json:"-"`
1857
1858
1859
1860
1861 NullFields []string `json:"-"`
1862 }
1863
1864 func (s *GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse) MarshalJSON() ([]byte, error) {
1865 type NoMethod GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse
1866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1867 }
1868
1869
1870
1871
1872 type GoogleCloudRecommendationengineV1beta1UserEvent struct {
1873
1874
1875 EventDetail *GoogleCloudRecommendationengineV1beta1EventDetail `json:"eventDetail,omitempty"`
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886 EventSource string `json:"eventSource,omitempty"`
1887
1888
1889 EventTime string `json:"eventTime,omitempty"`
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902 EventType string `json:"eventType,omitempty"`
1903
1904
1905
1906
1907
1908
1909
1910
1911 ProductEventDetail *GoogleCloudRecommendationengineV1beta1ProductEventDetail `json:"productEventDetail,omitempty"`
1912
1913 UserInfo *GoogleCloudRecommendationengineV1beta1UserInfo `json:"userInfo,omitempty"`
1914
1915
1916 googleapi.ServerResponse `json:"-"`
1917
1918
1919
1920
1921
1922 ForceSendFields []string `json:"-"`
1923
1924
1925
1926
1927 NullFields []string `json:"-"`
1928 }
1929
1930 func (s *GoogleCloudRecommendationengineV1beta1UserEvent) MarshalJSON() ([]byte, error) {
1931 type NoMethod GoogleCloudRecommendationengineV1beta1UserEvent
1932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1933 }
1934
1935
1936
1937
1938 type GoogleCloudRecommendationengineV1beta1UserEventImportSummary struct {
1939
1940
1941 JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"`
1942
1943
1944 UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"`
1945
1946
1947
1948
1949
1950 ForceSendFields []string `json:"-"`
1951
1952
1953
1954
1955 NullFields []string `json:"-"`
1956 }
1957
1958 func (s *GoogleCloudRecommendationengineV1beta1UserEventImportSummary) MarshalJSON() ([]byte, error) {
1959 type NoMethod GoogleCloudRecommendationengineV1beta1UserEventImportSummary
1960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1961 }
1962
1963
1964
1965 type GoogleCloudRecommendationengineV1beta1UserEventInlineSource struct {
1966
1967
1968 UserEvents []*GoogleCloudRecommendationengineV1beta1UserEvent `json:"userEvents,omitempty"`
1969
1970
1971
1972
1973
1974 ForceSendFields []string `json:"-"`
1975
1976
1977
1978
1979 NullFields []string `json:"-"`
1980 }
1981
1982 func (s *GoogleCloudRecommendationengineV1beta1UserEventInlineSource) MarshalJSON() ([]byte, error) {
1983 type NoMethod GoogleCloudRecommendationengineV1beta1UserEventInlineSource
1984 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1985 }
1986
1987
1988 type GoogleCloudRecommendationengineV1beta1UserInfo struct {
1989
1990
1991
1992
1993
1994
1995 DirectUserRequest bool `json:"directUserRequest,omitempty"`
1996
1997
1998
1999
2000
2001 IpAddress string `json:"ipAddress,omitempty"`
2002
2003
2004
2005 UserAgent string `json:"userAgent,omitempty"`
2006
2007
2008
2009
2010
2011 UserId string `json:"userId,omitempty"`
2012
2013
2014
2015
2016
2017
2018
2019 VisitorId string `json:"visitorId,omitempty"`
2020
2021
2022
2023
2024
2025 ForceSendFields []string `json:"-"`
2026
2027
2028
2029
2030 NullFields []string `json:"-"`
2031 }
2032
2033 func (s *GoogleCloudRecommendationengineV1beta1UserInfo) MarshalJSON() ([]byte, error) {
2034 type NoMethod GoogleCloudRecommendationengineV1beta1UserInfo
2035 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2036 }
2037
2038
2039
2040 type GoogleLongrunningListOperationsResponse struct {
2041
2042 NextPageToken string `json:"nextPageToken,omitempty"`
2043
2044
2045 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
2046
2047
2048 googleapi.ServerResponse `json:"-"`
2049
2050
2051
2052
2053
2054 ForceSendFields []string `json:"-"`
2055
2056
2057
2058
2059 NullFields []string `json:"-"`
2060 }
2061
2062 func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
2063 type NoMethod GoogleLongrunningListOperationsResponse
2064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2065 }
2066
2067
2068
2069 type GoogleLongrunningOperation struct {
2070
2071
2072
2073 Done bool `json:"done,omitempty"`
2074
2075 Error *GoogleRpcStatus `json:"error,omitempty"`
2076
2077
2078
2079
2080 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2081
2082
2083
2084 Name string `json:"name,omitempty"`
2085
2086
2087
2088
2089
2090
2091
2092 Response googleapi.RawMessage `json:"response,omitempty"`
2093
2094
2095 googleapi.ServerResponse `json:"-"`
2096
2097
2098
2099
2100
2101 ForceSendFields []string `json:"-"`
2102
2103
2104
2105
2106 NullFields []string `json:"-"`
2107 }
2108
2109 func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
2110 type NoMethod GoogleLongrunningOperation
2111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2112 }
2113
2114
2115
2116
2117
2118
2119 type GoogleProtobufEmpty struct {
2120
2121 googleapi.ServerResponse `json:"-"`
2122 }
2123
2124
2125
2126
2127
2128
2129
2130 type GoogleRpcStatus struct {
2131
2132 Code int64 `json:"code,omitempty"`
2133
2134
2135 Details []googleapi.RawMessage `json:"details,omitempty"`
2136
2137
2138
2139 Message string `json:"message,omitempty"`
2140
2141
2142
2143
2144
2145 ForceSendFields []string `json:"-"`
2146
2147
2148
2149
2150 NullFields []string `json:"-"`
2151 }
2152
2153 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
2154 type NoMethod GoogleRpcStatus
2155 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2156 }
2157
2158 type ProjectsLocationsCatalogsListCall struct {
2159 s *Service
2160 parent string
2161 urlParams_ gensupport.URLParams
2162 ifNoneMatch_ string
2163 ctx_ context.Context
2164 header_ http.Header
2165 }
2166
2167
2168
2169
2170 func (r *ProjectsLocationsCatalogsService) List(parent string) *ProjectsLocationsCatalogsListCall {
2171 c := &ProjectsLocationsCatalogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2172 c.parent = parent
2173 return c
2174 }
2175
2176
2177
2178 func (c *ProjectsLocationsCatalogsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsListCall {
2179 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2180 return c
2181 }
2182
2183
2184
2185
2186 func (c *ProjectsLocationsCatalogsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsListCall {
2187 c.urlParams_.Set("pageToken", pageToken)
2188 return c
2189 }
2190
2191
2192
2193
2194 func (c *ProjectsLocationsCatalogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsListCall {
2195 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2196 return c
2197 }
2198
2199
2200
2201
2202 func (c *ProjectsLocationsCatalogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsListCall {
2203 c.ifNoneMatch_ = entityTag
2204 return c
2205 }
2206
2207
2208 func (c *ProjectsLocationsCatalogsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsListCall {
2209 c.ctx_ = ctx
2210 return c
2211 }
2212
2213
2214
2215 func (c *ProjectsLocationsCatalogsListCall) Header() http.Header {
2216 if c.header_ == nil {
2217 c.header_ = make(http.Header)
2218 }
2219 return c.header_
2220 }
2221
2222 func (c *ProjectsLocationsCatalogsListCall) doRequest(alt string) (*http.Response, error) {
2223 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2224 if c.ifNoneMatch_ != "" {
2225 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2226 }
2227 var body io.Reader = nil
2228 c.urlParams_.Set("alt", alt)
2229 c.urlParams_.Set("prettyPrint", "false")
2230 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogs")
2231 urls += "?" + c.urlParams_.Encode()
2232 req, err := http.NewRequest("GET", urls, body)
2233 if err != nil {
2234 return nil, err
2235 }
2236 req.Header = reqHeaders
2237 googleapi.Expand(req.URL, map[string]string{
2238 "parent": c.parent,
2239 })
2240 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2241 }
2242
2243
2244
2245
2246
2247
2248
2249 func (c *ProjectsLocationsCatalogsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListCatalogsResponse, error) {
2250 gensupport.SetOptions(c.urlParams_, opts...)
2251 res, err := c.doRequest("json")
2252 if res != nil && res.StatusCode == http.StatusNotModified {
2253 if res.Body != nil {
2254 res.Body.Close()
2255 }
2256 return nil, gensupport.WrapError(&googleapi.Error{
2257 Code: res.StatusCode,
2258 Header: res.Header,
2259 })
2260 }
2261 if err != nil {
2262 return nil, err
2263 }
2264 defer googleapi.CloseBody(res)
2265 if err := googleapi.CheckResponse(res); err != nil {
2266 return nil, gensupport.WrapError(err)
2267 }
2268 ret := &GoogleCloudRecommendationengineV1beta1ListCatalogsResponse{
2269 ServerResponse: googleapi.ServerResponse{
2270 Header: res.Header,
2271 HTTPStatusCode: res.StatusCode,
2272 },
2273 }
2274 target := &ret
2275 if err := gensupport.DecodeResponse(target, res); err != nil {
2276 return nil, err
2277 }
2278 return ret, nil
2279 }
2280
2281
2282
2283
2284 func (c *ProjectsLocationsCatalogsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListCatalogsResponse) error) error {
2285 c.ctx_ = ctx
2286 defer c.PageToken(c.urlParams_.Get("pageToken"))
2287 for {
2288 x, err := c.Do()
2289 if err != nil {
2290 return err
2291 }
2292 if err := f(x); err != nil {
2293 return err
2294 }
2295 if x.NextPageToken == "" {
2296 return nil
2297 }
2298 c.PageToken(x.NextPageToken)
2299 }
2300 }
2301
2302 type ProjectsLocationsCatalogsPatchCall struct {
2303 s *Service
2304 name string
2305 googlecloudrecommendationenginev1beta1catalog *GoogleCloudRecommendationengineV1beta1Catalog
2306 urlParams_ gensupport.URLParams
2307 ctx_ context.Context
2308 header_ http.Header
2309 }
2310
2311
2312
2313
2314 func (r *ProjectsLocationsCatalogsService) Patch(name string, googlecloudrecommendationenginev1beta1catalog *GoogleCloudRecommendationengineV1beta1Catalog) *ProjectsLocationsCatalogsPatchCall {
2315 c := &ProjectsLocationsCatalogsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2316 c.name = name
2317 c.googlecloudrecommendationenginev1beta1catalog = googlecloudrecommendationenginev1beta1catalog
2318 return c
2319 }
2320
2321
2322
2323
2324
2325 func (c *ProjectsLocationsCatalogsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsPatchCall {
2326 c.urlParams_.Set("updateMask", updateMask)
2327 return c
2328 }
2329
2330
2331
2332
2333 func (c *ProjectsLocationsCatalogsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsPatchCall {
2334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2335 return c
2336 }
2337
2338
2339 func (c *ProjectsLocationsCatalogsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsPatchCall {
2340 c.ctx_ = ctx
2341 return c
2342 }
2343
2344
2345
2346 func (c *ProjectsLocationsCatalogsPatchCall) Header() http.Header {
2347 if c.header_ == nil {
2348 c.header_ = make(http.Header)
2349 }
2350 return c.header_
2351 }
2352
2353 func (c *ProjectsLocationsCatalogsPatchCall) doRequest(alt string) (*http.Response, error) {
2354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2355 var body io.Reader = nil
2356 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1catalog)
2357 if err != nil {
2358 return nil, err
2359 }
2360 c.urlParams_.Set("alt", alt)
2361 c.urlParams_.Set("prettyPrint", "false")
2362 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2363 urls += "?" + c.urlParams_.Encode()
2364 req, err := http.NewRequest("PATCH", urls, body)
2365 if err != nil {
2366 return nil, err
2367 }
2368 req.Header = reqHeaders
2369 googleapi.Expand(req.URL, map[string]string{
2370 "name": c.name,
2371 })
2372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2373 }
2374
2375
2376
2377
2378
2379
2380
2381 func (c *ProjectsLocationsCatalogsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1Catalog, error) {
2382 gensupport.SetOptions(c.urlParams_, opts...)
2383 res, err := c.doRequest("json")
2384 if res != nil && res.StatusCode == http.StatusNotModified {
2385 if res.Body != nil {
2386 res.Body.Close()
2387 }
2388 return nil, gensupport.WrapError(&googleapi.Error{
2389 Code: res.StatusCode,
2390 Header: res.Header,
2391 })
2392 }
2393 if err != nil {
2394 return nil, err
2395 }
2396 defer googleapi.CloseBody(res)
2397 if err := googleapi.CheckResponse(res); err != nil {
2398 return nil, gensupport.WrapError(err)
2399 }
2400 ret := &GoogleCloudRecommendationengineV1beta1Catalog{
2401 ServerResponse: googleapi.ServerResponse{
2402 Header: res.Header,
2403 HTTPStatusCode: res.StatusCode,
2404 },
2405 }
2406 target := &ret
2407 if err := gensupport.DecodeResponse(target, res); err != nil {
2408 return nil, err
2409 }
2410 return ret, nil
2411 }
2412
2413 type ProjectsLocationsCatalogsCatalogItemsCreateCall struct {
2414 s *Service
2415 parent string
2416 googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem
2417 urlParams_ gensupport.URLParams
2418 ctx_ context.Context
2419 header_ http.Header
2420 }
2421
2422
2423
2424
2425
2426 func (r *ProjectsLocationsCatalogsCatalogItemsService) Create(parent string, googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem) *ProjectsLocationsCatalogsCatalogItemsCreateCall {
2427 c := &ProjectsLocationsCatalogsCatalogItemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2428 c.parent = parent
2429 c.googlecloudrecommendationenginev1beta1catalogitem = googlecloudrecommendationenginev1beta1catalogitem
2430 return c
2431 }
2432
2433
2434
2435
2436 func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsCreateCall {
2437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2438 return c
2439 }
2440
2441
2442 func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsCreateCall {
2443 c.ctx_ = ctx
2444 return c
2445 }
2446
2447
2448
2449 func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Header() http.Header {
2450 if c.header_ == nil {
2451 c.header_ = make(http.Header)
2452 }
2453 return c.header_
2454 }
2455
2456 func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) doRequest(alt string) (*http.Response, error) {
2457 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2458 var body io.Reader = nil
2459 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1catalogitem)
2460 if err != nil {
2461 return nil, err
2462 }
2463 c.urlParams_.Set("alt", alt)
2464 c.urlParams_.Set("prettyPrint", "false")
2465 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogItems")
2466 urls += "?" + c.urlParams_.Encode()
2467 req, err := http.NewRequest("POST", urls, body)
2468 if err != nil {
2469 return nil, err
2470 }
2471 req.Header = reqHeaders
2472 googleapi.Expand(req.URL, map[string]string{
2473 "parent": c.parent,
2474 })
2475 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2476 }
2477
2478
2479
2480
2481
2482
2483
2484 func (c *ProjectsLocationsCatalogsCatalogItemsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1CatalogItem, error) {
2485 gensupport.SetOptions(c.urlParams_, opts...)
2486 res, err := c.doRequest("json")
2487 if res != nil && res.StatusCode == http.StatusNotModified {
2488 if res.Body != nil {
2489 res.Body.Close()
2490 }
2491 return nil, gensupport.WrapError(&googleapi.Error{
2492 Code: res.StatusCode,
2493 Header: res.Header,
2494 })
2495 }
2496 if err != nil {
2497 return nil, err
2498 }
2499 defer googleapi.CloseBody(res)
2500 if err := googleapi.CheckResponse(res); err != nil {
2501 return nil, gensupport.WrapError(err)
2502 }
2503 ret := &GoogleCloudRecommendationengineV1beta1CatalogItem{
2504 ServerResponse: googleapi.ServerResponse{
2505 Header: res.Header,
2506 HTTPStatusCode: res.StatusCode,
2507 },
2508 }
2509 target := &ret
2510 if err := gensupport.DecodeResponse(target, res); err != nil {
2511 return nil, err
2512 }
2513 return ret, nil
2514 }
2515
2516 type ProjectsLocationsCatalogsCatalogItemsDeleteCall struct {
2517 s *Service
2518 name string
2519 urlParams_ gensupport.URLParams
2520 ctx_ context.Context
2521 header_ http.Header
2522 }
2523
2524
2525
2526
2527
2528
2529 func (r *ProjectsLocationsCatalogsCatalogItemsService) Delete(name string) *ProjectsLocationsCatalogsCatalogItemsDeleteCall {
2530 c := &ProjectsLocationsCatalogsCatalogItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2531 c.name = name
2532 return c
2533 }
2534
2535
2536
2537
2538 func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsDeleteCall {
2539 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2540 return c
2541 }
2542
2543
2544 func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsDeleteCall {
2545 c.ctx_ = ctx
2546 return c
2547 }
2548
2549
2550
2551 func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Header() http.Header {
2552 if c.header_ == nil {
2553 c.header_ = make(http.Header)
2554 }
2555 return c.header_
2556 }
2557
2558 func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
2559 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2560 var body io.Reader = nil
2561 c.urlParams_.Set("alt", alt)
2562 c.urlParams_.Set("prettyPrint", "false")
2563 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2564 urls += "?" + c.urlParams_.Encode()
2565 req, err := http.NewRequest("DELETE", urls, body)
2566 if err != nil {
2567 return nil, err
2568 }
2569 req.Header = reqHeaders
2570 googleapi.Expand(req.URL, map[string]string{
2571 "name": c.name,
2572 })
2573 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2574 }
2575
2576
2577
2578
2579
2580
2581
2582 func (c *ProjectsLocationsCatalogsCatalogItemsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
2583 gensupport.SetOptions(c.urlParams_, opts...)
2584 res, err := c.doRequest("json")
2585 if res != nil && res.StatusCode == http.StatusNotModified {
2586 if res.Body != nil {
2587 res.Body.Close()
2588 }
2589 return nil, gensupport.WrapError(&googleapi.Error{
2590 Code: res.StatusCode,
2591 Header: res.Header,
2592 })
2593 }
2594 if err != nil {
2595 return nil, err
2596 }
2597 defer googleapi.CloseBody(res)
2598 if err := googleapi.CheckResponse(res); err != nil {
2599 return nil, gensupport.WrapError(err)
2600 }
2601 ret := &GoogleProtobufEmpty{
2602 ServerResponse: googleapi.ServerResponse{
2603 Header: res.Header,
2604 HTTPStatusCode: res.StatusCode,
2605 },
2606 }
2607 target := &ret
2608 if err := gensupport.DecodeResponse(target, res); err != nil {
2609 return nil, err
2610 }
2611 return ret, nil
2612 }
2613
2614 type ProjectsLocationsCatalogsCatalogItemsGetCall struct {
2615 s *Service
2616 name string
2617 urlParams_ gensupport.URLParams
2618 ifNoneMatch_ string
2619 ctx_ context.Context
2620 header_ http.Header
2621 }
2622
2623
2624
2625
2626
2627
2628 func (r *ProjectsLocationsCatalogsCatalogItemsService) Get(name string) *ProjectsLocationsCatalogsCatalogItemsGetCall {
2629 c := &ProjectsLocationsCatalogsCatalogItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2630 c.name = name
2631 return c
2632 }
2633
2634
2635
2636
2637 func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsGetCall {
2638 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2639 return c
2640 }
2641
2642
2643
2644
2645 func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsCatalogItemsGetCall {
2646 c.ifNoneMatch_ = entityTag
2647 return c
2648 }
2649
2650
2651 func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsGetCall {
2652 c.ctx_ = ctx
2653 return c
2654 }
2655
2656
2657
2658 func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Header() http.Header {
2659 if c.header_ == nil {
2660 c.header_ = make(http.Header)
2661 }
2662 return c.header_
2663 }
2664
2665 func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) doRequest(alt string) (*http.Response, error) {
2666 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2667 if c.ifNoneMatch_ != "" {
2668 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2669 }
2670 var body io.Reader = nil
2671 c.urlParams_.Set("alt", alt)
2672 c.urlParams_.Set("prettyPrint", "false")
2673 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2674 urls += "?" + c.urlParams_.Encode()
2675 req, err := http.NewRequest("GET", urls, body)
2676 if err != nil {
2677 return nil, err
2678 }
2679 req.Header = reqHeaders
2680 googleapi.Expand(req.URL, map[string]string{
2681 "name": c.name,
2682 })
2683 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2684 }
2685
2686
2687
2688
2689
2690
2691
2692 func (c *ProjectsLocationsCatalogsCatalogItemsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1CatalogItem, error) {
2693 gensupport.SetOptions(c.urlParams_, opts...)
2694 res, err := c.doRequest("json")
2695 if res != nil && res.StatusCode == http.StatusNotModified {
2696 if res.Body != nil {
2697 res.Body.Close()
2698 }
2699 return nil, gensupport.WrapError(&googleapi.Error{
2700 Code: res.StatusCode,
2701 Header: res.Header,
2702 })
2703 }
2704 if err != nil {
2705 return nil, err
2706 }
2707 defer googleapi.CloseBody(res)
2708 if err := googleapi.CheckResponse(res); err != nil {
2709 return nil, gensupport.WrapError(err)
2710 }
2711 ret := &GoogleCloudRecommendationengineV1beta1CatalogItem{
2712 ServerResponse: googleapi.ServerResponse{
2713 Header: res.Header,
2714 HTTPStatusCode: res.StatusCode,
2715 },
2716 }
2717 target := &ret
2718 if err := gensupport.DecodeResponse(target, res); err != nil {
2719 return nil, err
2720 }
2721 return ret, nil
2722 }
2723
2724 type ProjectsLocationsCatalogsCatalogItemsImportCall struct {
2725 s *Service
2726 parent string
2727 googlecloudrecommendationenginev1beta1importcatalogitemsrequest *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest
2728 urlParams_ gensupport.URLParams
2729 ctx_ context.Context
2730 header_ http.Header
2731 }
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741 func (r *ProjectsLocationsCatalogsCatalogItemsService) Import(parent string, googlecloudrecommendationenginev1beta1importcatalogitemsrequest *GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest) *ProjectsLocationsCatalogsCatalogItemsImportCall {
2742 c := &ProjectsLocationsCatalogsCatalogItemsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2743 c.parent = parent
2744 c.googlecloudrecommendationenginev1beta1importcatalogitemsrequest = googlecloudrecommendationenginev1beta1importcatalogitemsrequest
2745 return c
2746 }
2747
2748
2749
2750
2751 func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsImportCall {
2752 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2753 return c
2754 }
2755
2756
2757 func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsImportCall {
2758 c.ctx_ = ctx
2759 return c
2760 }
2761
2762
2763
2764 func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Header() http.Header {
2765 if c.header_ == nil {
2766 c.header_ = make(http.Header)
2767 }
2768 return c.header_
2769 }
2770
2771 func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) doRequest(alt string) (*http.Response, error) {
2772 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2773 var body io.Reader = nil
2774 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1importcatalogitemsrequest)
2775 if err != nil {
2776 return nil, err
2777 }
2778 c.urlParams_.Set("alt", alt)
2779 c.urlParams_.Set("prettyPrint", "false")
2780 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogItems:import")
2781 urls += "?" + c.urlParams_.Encode()
2782 req, err := http.NewRequest("POST", urls, body)
2783 if err != nil {
2784 return nil, err
2785 }
2786 req.Header = reqHeaders
2787 googleapi.Expand(req.URL, map[string]string{
2788 "parent": c.parent,
2789 })
2790 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2791 }
2792
2793
2794
2795
2796
2797
2798
2799 func (c *ProjectsLocationsCatalogsCatalogItemsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2800 gensupport.SetOptions(c.urlParams_, opts...)
2801 res, err := c.doRequest("json")
2802 if res != nil && res.StatusCode == http.StatusNotModified {
2803 if res.Body != nil {
2804 res.Body.Close()
2805 }
2806 return nil, gensupport.WrapError(&googleapi.Error{
2807 Code: res.StatusCode,
2808 Header: res.Header,
2809 })
2810 }
2811 if err != nil {
2812 return nil, err
2813 }
2814 defer googleapi.CloseBody(res)
2815 if err := googleapi.CheckResponse(res); err != nil {
2816 return nil, gensupport.WrapError(err)
2817 }
2818 ret := &GoogleLongrunningOperation{
2819 ServerResponse: googleapi.ServerResponse{
2820 Header: res.Header,
2821 HTTPStatusCode: res.StatusCode,
2822 },
2823 }
2824 target := &ret
2825 if err := gensupport.DecodeResponse(target, res); err != nil {
2826 return nil, err
2827 }
2828 return ret, nil
2829 }
2830
2831 type ProjectsLocationsCatalogsCatalogItemsListCall struct {
2832 s *Service
2833 parent string
2834 urlParams_ gensupport.URLParams
2835 ifNoneMatch_ string
2836 ctx_ context.Context
2837 header_ http.Header
2838 }
2839
2840
2841
2842
2843
2844 func (r *ProjectsLocationsCatalogsCatalogItemsService) List(parent string) *ProjectsLocationsCatalogsCatalogItemsListCall {
2845 c := &ProjectsLocationsCatalogsCatalogItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2846 c.parent = parent
2847 return c
2848 }
2849
2850
2851
2852 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Filter(filter string) *ProjectsLocationsCatalogsCatalogItemsListCall {
2853 c.urlParams_.Set("filter", filter)
2854 return c
2855 }
2856
2857
2858
2859 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsCatalogItemsListCall {
2860 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2861 return c
2862 }
2863
2864
2865
2866 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsCatalogItemsListCall {
2867 c.urlParams_.Set("pageToken", pageToken)
2868 return c
2869 }
2870
2871
2872
2873
2874 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsListCall {
2875 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2876 return c
2877 }
2878
2879
2880
2881
2882 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsCatalogItemsListCall {
2883 c.ifNoneMatch_ = entityTag
2884 return c
2885 }
2886
2887
2888 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsListCall {
2889 c.ctx_ = ctx
2890 return c
2891 }
2892
2893
2894
2895 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Header() http.Header {
2896 if c.header_ == nil {
2897 c.header_ = make(http.Header)
2898 }
2899 return c.header_
2900 }
2901
2902 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) doRequest(alt string) (*http.Response, error) {
2903 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2904 if c.ifNoneMatch_ != "" {
2905 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2906 }
2907 var body io.Reader = nil
2908 c.urlParams_.Set("alt", alt)
2909 c.urlParams_.Set("prettyPrint", "false")
2910 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/catalogItems")
2911 urls += "?" + c.urlParams_.Encode()
2912 req, err := http.NewRequest("GET", urls, body)
2913 if err != nil {
2914 return nil, err
2915 }
2916 req.Header = reqHeaders
2917 googleapi.Expand(req.URL, map[string]string{
2918 "parent": c.parent,
2919 })
2920 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2921 }
2922
2923
2924
2925
2926
2927
2928
2929 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse, error) {
2930 gensupport.SetOptions(c.urlParams_, opts...)
2931 res, err := c.doRequest("json")
2932 if res != nil && res.StatusCode == http.StatusNotModified {
2933 if res.Body != nil {
2934 res.Body.Close()
2935 }
2936 return nil, gensupport.WrapError(&googleapi.Error{
2937 Code: res.StatusCode,
2938 Header: res.Header,
2939 })
2940 }
2941 if err != nil {
2942 return nil, err
2943 }
2944 defer googleapi.CloseBody(res)
2945 if err := googleapi.CheckResponse(res); err != nil {
2946 return nil, gensupport.WrapError(err)
2947 }
2948 ret := &GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse{
2949 ServerResponse: googleapi.ServerResponse{
2950 Header: res.Header,
2951 HTTPStatusCode: res.StatusCode,
2952 },
2953 }
2954 target := &ret
2955 if err := gensupport.DecodeResponse(target, res); err != nil {
2956 return nil, err
2957 }
2958 return ret, nil
2959 }
2960
2961
2962
2963
2964 func (c *ProjectsLocationsCatalogsCatalogItemsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse) error) error {
2965 c.ctx_ = ctx
2966 defer c.PageToken(c.urlParams_.Get("pageToken"))
2967 for {
2968 x, err := c.Do()
2969 if err != nil {
2970 return err
2971 }
2972 if err := f(x); err != nil {
2973 return err
2974 }
2975 if x.NextPageToken == "" {
2976 return nil
2977 }
2978 c.PageToken(x.NextPageToken)
2979 }
2980 }
2981
2982 type ProjectsLocationsCatalogsCatalogItemsPatchCall struct {
2983 s *Service
2984 name string
2985 googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem
2986 urlParams_ gensupport.URLParams
2987 ctx_ context.Context
2988 header_ http.Header
2989 }
2990
2991
2992
2993
2994
2995
2996
2997 func (r *ProjectsLocationsCatalogsCatalogItemsService) Patch(name string, googlecloudrecommendationenginev1beta1catalogitem *GoogleCloudRecommendationengineV1beta1CatalogItem) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
2998 c := &ProjectsLocationsCatalogsCatalogItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2999 c.name = name
3000 c.googlecloudrecommendationenginev1beta1catalogitem = googlecloudrecommendationenginev1beta1catalogitem
3001 return c
3002 }
3003
3004
3005
3006
3007 func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3008 c.urlParams_.Set("updateMask", updateMask)
3009 return c
3010 }
3011
3012
3013
3014
3015 func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3016 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3017 return c
3018 }
3019
3020
3021 func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Context(ctx context.Context) *ProjectsLocationsCatalogsCatalogItemsPatchCall {
3022 c.ctx_ = ctx
3023 return c
3024 }
3025
3026
3027
3028 func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Header() http.Header {
3029 if c.header_ == nil {
3030 c.header_ = make(http.Header)
3031 }
3032 return c.header_
3033 }
3034
3035 func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) doRequest(alt string) (*http.Response, error) {
3036 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3037 var body io.Reader = nil
3038 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1catalogitem)
3039 if err != nil {
3040 return nil, err
3041 }
3042 c.urlParams_.Set("alt", alt)
3043 c.urlParams_.Set("prettyPrint", "false")
3044 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3045 urls += "?" + c.urlParams_.Encode()
3046 req, err := http.NewRequest("PATCH", urls, body)
3047 if err != nil {
3048 return nil, err
3049 }
3050 req.Header = reqHeaders
3051 googleapi.Expand(req.URL, map[string]string{
3052 "name": c.name,
3053 })
3054 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3055 }
3056
3057
3058
3059
3060
3061
3062
3063 func (c *ProjectsLocationsCatalogsCatalogItemsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1CatalogItem, error) {
3064 gensupport.SetOptions(c.urlParams_, opts...)
3065 res, err := c.doRequest("json")
3066 if res != nil && res.StatusCode == http.StatusNotModified {
3067 if res.Body != nil {
3068 res.Body.Close()
3069 }
3070 return nil, gensupport.WrapError(&googleapi.Error{
3071 Code: res.StatusCode,
3072 Header: res.Header,
3073 })
3074 }
3075 if err != nil {
3076 return nil, err
3077 }
3078 defer googleapi.CloseBody(res)
3079 if err := googleapi.CheckResponse(res); err != nil {
3080 return nil, gensupport.WrapError(err)
3081 }
3082 ret := &GoogleCloudRecommendationengineV1beta1CatalogItem{
3083 ServerResponse: googleapi.ServerResponse{
3084 Header: res.Header,
3085 HTTPStatusCode: res.StatusCode,
3086 },
3087 }
3088 target := &ret
3089 if err := gensupport.DecodeResponse(target, res); err != nil {
3090 return nil, err
3091 }
3092 return ret, nil
3093 }
3094
3095 type ProjectsLocationsCatalogsEventStoresOperationsGetCall struct {
3096 s *Service
3097 name string
3098 urlParams_ gensupport.URLParams
3099 ifNoneMatch_ string
3100 ctx_ context.Context
3101 header_ http.Header
3102 }
3103
3104
3105
3106
3107
3108
3109 func (r *ProjectsLocationsCatalogsEventStoresOperationsService) Get(name string) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3110 c := &ProjectsLocationsCatalogsEventStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3111 c.name = name
3112 return c
3113 }
3114
3115
3116
3117
3118 func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3120 return c
3121 }
3122
3123
3124
3125
3126 func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3127 c.ifNoneMatch_ = entityTag
3128 return c
3129 }
3130
3131
3132 func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresOperationsGetCall {
3133 c.ctx_ = ctx
3134 return c
3135 }
3136
3137
3138
3139 func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Header() http.Header {
3140 if c.header_ == nil {
3141 c.header_ = make(http.Header)
3142 }
3143 return c.header_
3144 }
3145
3146 func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3148 if c.ifNoneMatch_ != "" {
3149 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3150 }
3151 var body io.Reader = nil
3152 c.urlParams_.Set("alt", alt)
3153 c.urlParams_.Set("prettyPrint", "false")
3154 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3155 urls += "?" + c.urlParams_.Encode()
3156 req, err := http.NewRequest("GET", urls, body)
3157 if err != nil {
3158 return nil, err
3159 }
3160 req.Header = reqHeaders
3161 googleapi.Expand(req.URL, map[string]string{
3162 "name": c.name,
3163 })
3164 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3165 }
3166
3167
3168
3169
3170
3171
3172
3173 func (c *ProjectsLocationsCatalogsEventStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3174 gensupport.SetOptions(c.urlParams_, opts...)
3175 res, err := c.doRequest("json")
3176 if res != nil && res.StatusCode == http.StatusNotModified {
3177 if res.Body != nil {
3178 res.Body.Close()
3179 }
3180 return nil, gensupport.WrapError(&googleapi.Error{
3181 Code: res.StatusCode,
3182 Header: res.Header,
3183 })
3184 }
3185 if err != nil {
3186 return nil, err
3187 }
3188 defer googleapi.CloseBody(res)
3189 if err := googleapi.CheckResponse(res); err != nil {
3190 return nil, gensupport.WrapError(err)
3191 }
3192 ret := &GoogleLongrunningOperation{
3193 ServerResponse: googleapi.ServerResponse{
3194 Header: res.Header,
3195 HTTPStatusCode: res.StatusCode,
3196 },
3197 }
3198 target := &ret
3199 if err := gensupport.DecodeResponse(target, res); err != nil {
3200 return nil, err
3201 }
3202 return ret, nil
3203 }
3204
3205 type ProjectsLocationsCatalogsEventStoresOperationsListCall struct {
3206 s *Service
3207 name string
3208 urlParams_ gensupport.URLParams
3209 ifNoneMatch_ string
3210 ctx_ context.Context
3211 header_ http.Header
3212 }
3213
3214
3215
3216
3217
3218 func (r *ProjectsLocationsCatalogsEventStoresOperationsService) List(name string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3219 c := &ProjectsLocationsCatalogsEventStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3220 c.name = name
3221 return c
3222 }
3223
3224
3225 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3226 c.urlParams_.Set("filter", filter)
3227 return c
3228 }
3229
3230
3231
3232 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3233 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3234 return c
3235 }
3236
3237
3238
3239 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3240 c.urlParams_.Set("pageToken", pageToken)
3241 return c
3242 }
3243
3244
3245
3246
3247 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3248 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3249 return c
3250 }
3251
3252
3253
3254
3255 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3256 c.ifNoneMatch_ = entityTag
3257 return c
3258 }
3259
3260
3261 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresOperationsListCall {
3262 c.ctx_ = ctx
3263 return c
3264 }
3265
3266
3267
3268 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Header() http.Header {
3269 if c.header_ == nil {
3270 c.header_ = make(http.Header)
3271 }
3272 return c.header_
3273 }
3274
3275 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) doRequest(alt string) (*http.Response, error) {
3276 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3277 if c.ifNoneMatch_ != "" {
3278 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3279 }
3280 var body io.Reader = nil
3281 c.urlParams_.Set("alt", alt)
3282 c.urlParams_.Set("prettyPrint", "false")
3283 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
3284 urls += "?" + c.urlParams_.Encode()
3285 req, err := http.NewRequest("GET", urls, body)
3286 if err != nil {
3287 return nil, err
3288 }
3289 req.Header = reqHeaders
3290 googleapi.Expand(req.URL, map[string]string{
3291 "name": c.name,
3292 })
3293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3294 }
3295
3296
3297
3298
3299
3300
3301
3302 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
3303 gensupport.SetOptions(c.urlParams_, opts...)
3304 res, err := c.doRequest("json")
3305 if res != nil && res.StatusCode == http.StatusNotModified {
3306 if res.Body != nil {
3307 res.Body.Close()
3308 }
3309 return nil, gensupport.WrapError(&googleapi.Error{
3310 Code: res.StatusCode,
3311 Header: res.Header,
3312 })
3313 }
3314 if err != nil {
3315 return nil, err
3316 }
3317 defer googleapi.CloseBody(res)
3318 if err := googleapi.CheckResponse(res); err != nil {
3319 return nil, gensupport.WrapError(err)
3320 }
3321 ret := &GoogleLongrunningListOperationsResponse{
3322 ServerResponse: googleapi.ServerResponse{
3323 Header: res.Header,
3324 HTTPStatusCode: res.StatusCode,
3325 },
3326 }
3327 target := &ret
3328 if err := gensupport.DecodeResponse(target, res); err != nil {
3329 return nil, err
3330 }
3331 return ret, nil
3332 }
3333
3334
3335
3336
3337 func (c *ProjectsLocationsCatalogsEventStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
3338 c.ctx_ = ctx
3339 defer c.PageToken(c.urlParams_.Get("pageToken"))
3340 for {
3341 x, err := c.Do()
3342 if err != nil {
3343 return err
3344 }
3345 if err := f(x); err != nil {
3346 return err
3347 }
3348 if x.NextPageToken == "" {
3349 return nil
3350 }
3351 c.PageToken(x.NextPageToken)
3352 }
3353 }
3354
3355 type ProjectsLocationsCatalogsEventStoresPlacementsPredictCall struct {
3356 s *Service
3357 name string
3358 googlecloudrecommendationenginev1beta1predictrequest *GoogleCloudRecommendationengineV1beta1PredictRequest
3359 urlParams_ gensupport.URLParams
3360 ctx_ context.Context
3361 header_ http.Header
3362 }
3363
3364
3365
3366
3367
3368
3369
3370 func (r *ProjectsLocationsCatalogsEventStoresPlacementsService) Predict(name string, googlecloudrecommendationenginev1beta1predictrequest *GoogleCloudRecommendationengineV1beta1PredictRequest) *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall {
3371 c := &ProjectsLocationsCatalogsEventStoresPlacementsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3372 c.name = name
3373 c.googlecloudrecommendationenginev1beta1predictrequest = googlecloudrecommendationenginev1beta1predictrequest
3374 return c
3375 }
3376
3377
3378
3379
3380 func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall {
3381 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3382 return c
3383 }
3384
3385
3386 func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall {
3387 c.ctx_ = ctx
3388 return c
3389 }
3390
3391
3392
3393 func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Header() http.Header {
3394 if c.header_ == nil {
3395 c.header_ = make(http.Header)
3396 }
3397 return c.header_
3398 }
3399
3400 func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) doRequest(alt string) (*http.Response, error) {
3401 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3402 var body io.Reader = nil
3403 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1predictrequest)
3404 if err != nil {
3405 return nil, err
3406 }
3407 c.urlParams_.Set("alt", alt)
3408 c.urlParams_.Set("prettyPrint", "false")
3409 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:predict")
3410 urls += "?" + c.urlParams_.Encode()
3411 req, err := http.NewRequest("POST", urls, body)
3412 if err != nil {
3413 return nil, err
3414 }
3415 req.Header = reqHeaders
3416 googleapi.Expand(req.URL, map[string]string{
3417 "name": c.name,
3418 })
3419 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3420 }
3421
3422
3423
3424
3425
3426
3427
3428 func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1PredictResponse, error) {
3429 gensupport.SetOptions(c.urlParams_, opts...)
3430 res, err := c.doRequest("json")
3431 if res != nil && res.StatusCode == http.StatusNotModified {
3432 if res.Body != nil {
3433 res.Body.Close()
3434 }
3435 return nil, gensupport.WrapError(&googleapi.Error{
3436 Code: res.StatusCode,
3437 Header: res.Header,
3438 })
3439 }
3440 if err != nil {
3441 return nil, err
3442 }
3443 defer googleapi.CloseBody(res)
3444 if err := googleapi.CheckResponse(res); err != nil {
3445 return nil, gensupport.WrapError(err)
3446 }
3447 ret := &GoogleCloudRecommendationengineV1beta1PredictResponse{
3448 ServerResponse: googleapi.ServerResponse{
3449 Header: res.Header,
3450 HTTPStatusCode: res.StatusCode,
3451 },
3452 }
3453 target := &ret
3454 if err := gensupport.DecodeResponse(target, res); err != nil {
3455 return nil, err
3456 }
3457 return ret, nil
3458 }
3459
3460
3461
3462
3463 func (c *ProjectsLocationsCatalogsEventStoresPlacementsPredictCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1PredictResponse) error) error {
3464 c.ctx_ = ctx
3465 defer func(pt string) { c.googlecloudrecommendationenginev1beta1predictrequest.PageToken = pt }(c.googlecloudrecommendationenginev1beta1predictrequest.PageToken)
3466 for {
3467 x, err := c.Do()
3468 if err != nil {
3469 return err
3470 }
3471 if err := f(x); err != nil {
3472 return err
3473 }
3474 if x.NextPageToken == "" {
3475 return nil
3476 }
3477 c.googlecloudrecommendationenginev1beta1predictrequest.PageToken = x.NextPageToken
3478 }
3479 }
3480
3481 type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall struct {
3482 s *Service
3483 parent string
3484 googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest *GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest
3485 urlParams_ gensupport.URLParams
3486 ctx_ context.Context
3487 header_ http.Header
3488 }
3489
3490
3491
3492
3493
3494
3495 func (r *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService) Create(parent string, googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest *GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall {
3496 c := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3497 c.parent = parent
3498 c.googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest = googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest
3499 return c
3500 }
3501
3502
3503
3504
3505 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall {
3506 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3507 return c
3508 }
3509
3510
3511 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall {
3512 c.ctx_ = ctx
3513 return c
3514 }
3515
3516
3517
3518 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Header() http.Header {
3519 if c.header_ == nil {
3520 c.header_ = make(http.Header)
3521 }
3522 return c.header_
3523 }
3524
3525 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) doRequest(alt string) (*http.Response, error) {
3526 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3527 var body io.Reader = nil
3528 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1createpredictionapikeyregistrationrequest)
3529 if err != nil {
3530 return nil, err
3531 }
3532 c.urlParams_.Set("alt", alt)
3533 c.urlParams_.Set("prettyPrint", "false")
3534 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/predictionApiKeyRegistrations")
3535 urls += "?" + c.urlParams_.Encode()
3536 req, err := http.NewRequest("POST", urls, body)
3537 if err != nil {
3538 return nil, err
3539 }
3540 req.Header = reqHeaders
3541 googleapi.Expand(req.URL, map[string]string{
3542 "parent": c.parent,
3543 })
3544 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3545 }
3546
3547
3548
3549
3550
3551
3552
3553 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration, error) {
3554 gensupport.SetOptions(c.urlParams_, opts...)
3555 res, err := c.doRequest("json")
3556 if res != nil && res.StatusCode == http.StatusNotModified {
3557 if res.Body != nil {
3558 res.Body.Close()
3559 }
3560 return nil, gensupport.WrapError(&googleapi.Error{
3561 Code: res.StatusCode,
3562 Header: res.Header,
3563 })
3564 }
3565 if err != nil {
3566 return nil, err
3567 }
3568 defer googleapi.CloseBody(res)
3569 if err := googleapi.CheckResponse(res); err != nil {
3570 return nil, gensupport.WrapError(err)
3571 }
3572 ret := &GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration{
3573 ServerResponse: googleapi.ServerResponse{
3574 Header: res.Header,
3575 HTTPStatusCode: res.StatusCode,
3576 },
3577 }
3578 target := &ret
3579 if err := gensupport.DecodeResponse(target, res); err != nil {
3580 return nil, err
3581 }
3582 return ret, nil
3583 }
3584
3585 type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall struct {
3586 s *Service
3587 name string
3588 urlParams_ gensupport.URLParams
3589 ctx_ context.Context
3590 header_ http.Header
3591 }
3592
3593
3594
3595
3596
3597
3598 func (r *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService) Delete(name string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall {
3599 c := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3600 c.name = name
3601 return c
3602 }
3603
3604
3605
3606
3607 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall {
3608 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3609 return c
3610 }
3611
3612
3613 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall {
3614 c.ctx_ = ctx
3615 return c
3616 }
3617
3618
3619
3620 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Header() http.Header {
3621 if c.header_ == nil {
3622 c.header_ = make(http.Header)
3623 }
3624 return c.header_
3625 }
3626
3627 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3628 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3629 var body io.Reader = nil
3630 c.urlParams_.Set("alt", alt)
3631 c.urlParams_.Set("prettyPrint", "false")
3632 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3633 urls += "?" + c.urlParams_.Encode()
3634 req, err := http.NewRequest("DELETE", urls, body)
3635 if err != nil {
3636 return nil, err
3637 }
3638 req.Header = reqHeaders
3639 googleapi.Expand(req.URL, map[string]string{
3640 "name": c.name,
3641 })
3642 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3643 }
3644
3645
3646
3647
3648
3649
3650
3651 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
3652 gensupport.SetOptions(c.urlParams_, opts...)
3653 res, err := c.doRequest("json")
3654 if res != nil && res.StatusCode == http.StatusNotModified {
3655 if res.Body != nil {
3656 res.Body.Close()
3657 }
3658 return nil, gensupport.WrapError(&googleapi.Error{
3659 Code: res.StatusCode,
3660 Header: res.Header,
3661 })
3662 }
3663 if err != nil {
3664 return nil, err
3665 }
3666 defer googleapi.CloseBody(res)
3667 if err := googleapi.CheckResponse(res); err != nil {
3668 return nil, gensupport.WrapError(err)
3669 }
3670 ret := &GoogleProtobufEmpty{
3671 ServerResponse: googleapi.ServerResponse{
3672 Header: res.Header,
3673 HTTPStatusCode: res.StatusCode,
3674 },
3675 }
3676 target := &ret
3677 if err := gensupport.DecodeResponse(target, res); err != nil {
3678 return nil, err
3679 }
3680 return ret, nil
3681 }
3682
3683 type ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall struct {
3684 s *Service
3685 parent string
3686 urlParams_ gensupport.URLParams
3687 ifNoneMatch_ string
3688 ctx_ context.Context
3689 header_ http.Header
3690 }
3691
3692
3693
3694
3695
3696
3697 func (r *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsService) List(parent string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
3698 c := &ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3699 c.parent = parent
3700 return c
3701 }
3702
3703
3704
3705 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
3706 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3707 return c
3708 }
3709
3710
3711
3712 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
3713 c.urlParams_.Set("pageToken", pageToken)
3714 return c
3715 }
3716
3717
3718
3719
3720 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
3721 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3722 return c
3723 }
3724
3725
3726
3727
3728 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
3729 c.ifNoneMatch_ = entityTag
3730 return c
3731 }
3732
3733
3734 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall {
3735 c.ctx_ = ctx
3736 return c
3737 }
3738
3739
3740
3741 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Header() http.Header {
3742 if c.header_ == nil {
3743 c.header_ = make(http.Header)
3744 }
3745 return c.header_
3746 }
3747
3748 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) doRequest(alt string) (*http.Response, error) {
3749 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3750 if c.ifNoneMatch_ != "" {
3751 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3752 }
3753 var body io.Reader = nil
3754 c.urlParams_.Set("alt", alt)
3755 c.urlParams_.Set("prettyPrint", "false")
3756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/predictionApiKeyRegistrations")
3757 urls += "?" + c.urlParams_.Encode()
3758 req, err := http.NewRequest("GET", urls, body)
3759 if err != nil {
3760 return nil, err
3761 }
3762 req.Header = reqHeaders
3763 googleapi.Expand(req.URL, map[string]string{
3764 "parent": c.parent,
3765 })
3766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3767 }
3768
3769
3770
3771
3772
3773
3774
3775 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse, error) {
3776 gensupport.SetOptions(c.urlParams_, opts...)
3777 res, err := c.doRequest("json")
3778 if res != nil && res.StatusCode == http.StatusNotModified {
3779 if res.Body != nil {
3780 res.Body.Close()
3781 }
3782 return nil, gensupport.WrapError(&googleapi.Error{
3783 Code: res.StatusCode,
3784 Header: res.Header,
3785 })
3786 }
3787 if err != nil {
3788 return nil, err
3789 }
3790 defer googleapi.CloseBody(res)
3791 if err := googleapi.CheckResponse(res); err != nil {
3792 return nil, gensupport.WrapError(err)
3793 }
3794 ret := &GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse{
3795 ServerResponse: googleapi.ServerResponse{
3796 Header: res.Header,
3797 HTTPStatusCode: res.StatusCode,
3798 },
3799 }
3800 target := &ret
3801 if err := gensupport.DecodeResponse(target, res); err != nil {
3802 return nil, err
3803 }
3804 return ret, nil
3805 }
3806
3807
3808
3809
3810 func (c *ProjectsLocationsCatalogsEventStoresPredictionApiKeyRegistrationsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse) error) error {
3811 c.ctx_ = ctx
3812 defer c.PageToken(c.urlParams_.Get("pageToken"))
3813 for {
3814 x, err := c.Do()
3815 if err != nil {
3816 return err
3817 }
3818 if err := f(x); err != nil {
3819 return err
3820 }
3821 if x.NextPageToken == "" {
3822 return nil
3823 }
3824 c.PageToken(x.NextPageToken)
3825 }
3826 }
3827
3828 type ProjectsLocationsCatalogsEventStoresUserEventsCollectCall struct {
3829 s *Service
3830 parent string
3831 urlParams_ gensupport.URLParams
3832 ifNoneMatch_ string
3833 ctx_ context.Context
3834 header_ http.Header
3835 }
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845 func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Collect(parent string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3846 c := &ProjectsLocationsCatalogsEventStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3847 c.parent = parent
3848 return c
3849 }
3850
3851
3852
3853
3854 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3855 c.urlParams_.Set("ets", fmt.Sprint(ets))
3856 return c
3857 }
3858
3859
3860
3861
3862
3863
3864 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3865 c.urlParams_.Set("uri", uri)
3866 return c
3867 }
3868
3869
3870
3871 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3872 c.urlParams_.Set("userEvent", userEvent)
3873 return c
3874 }
3875
3876
3877
3878
3879 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3880 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3881 return c
3882 }
3883
3884
3885
3886
3887 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3888 c.ifNoneMatch_ = entityTag
3889 return c
3890 }
3891
3892
3893 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall {
3894 c.ctx_ = ctx
3895 return c
3896 }
3897
3898
3899
3900 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Header() http.Header {
3901 if c.header_ == nil {
3902 c.header_ = make(http.Header)
3903 }
3904 return c.header_
3905 }
3906
3907 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) {
3908 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3909 if c.ifNoneMatch_ != "" {
3910 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3911 }
3912 var body io.Reader = nil
3913 c.urlParams_.Set("alt", alt)
3914 c.urlParams_.Set("prettyPrint", "false")
3915 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:collect")
3916 urls += "?" + c.urlParams_.Encode()
3917 req, err := http.NewRequest("GET", urls, body)
3918 if err != nil {
3919 return nil, err
3920 }
3921 req.Header = reqHeaders
3922 googleapi.Expand(req.URL, map[string]string{
3923 "parent": c.parent,
3924 })
3925 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3926 }
3927
3928
3929
3930
3931
3932
3933
3934 func (c *ProjectsLocationsCatalogsEventStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) {
3935 gensupport.SetOptions(c.urlParams_, opts...)
3936 res, err := c.doRequest("json")
3937 if res != nil && res.StatusCode == http.StatusNotModified {
3938 if res.Body != nil {
3939 res.Body.Close()
3940 }
3941 return nil, gensupport.WrapError(&googleapi.Error{
3942 Code: res.StatusCode,
3943 Header: res.Header,
3944 })
3945 }
3946 if err != nil {
3947 return nil, err
3948 }
3949 defer googleapi.CloseBody(res)
3950 if err := googleapi.CheckResponse(res); err != nil {
3951 return nil, gensupport.WrapError(err)
3952 }
3953 ret := &GoogleApiHttpBody{
3954 ServerResponse: googleapi.ServerResponse{
3955 Header: res.Header,
3956 HTTPStatusCode: res.StatusCode,
3957 },
3958 }
3959 target := &ret
3960 if err := gensupport.DecodeResponse(target, res); err != nil {
3961 return nil, err
3962 }
3963 return ret, nil
3964 }
3965
3966 type ProjectsLocationsCatalogsEventStoresUserEventsImportCall struct {
3967 s *Service
3968 parent string
3969 googlecloudrecommendationenginev1beta1importusereventsrequest *GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest
3970 urlParams_ gensupport.URLParams
3971 ctx_ context.Context
3972 header_ http.Header
3973 }
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984 func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Import(parent string, googlecloudrecommendationenginev1beta1importusereventsrequest *GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest) *ProjectsLocationsCatalogsEventStoresUserEventsImportCall {
3985 c := &ProjectsLocationsCatalogsEventStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3986 c.parent = parent
3987 c.googlecloudrecommendationenginev1beta1importusereventsrequest = googlecloudrecommendationenginev1beta1importusereventsrequest
3988 return c
3989 }
3990
3991
3992
3993
3994 func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsImportCall {
3995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3996 return c
3997 }
3998
3999
4000 func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsImportCall {
4001 c.ctx_ = ctx
4002 return c
4003 }
4004
4005
4006
4007 func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Header() http.Header {
4008 if c.header_ == nil {
4009 c.header_ = make(http.Header)
4010 }
4011 return c.header_
4012 }
4013
4014 func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) {
4015 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4016 var body io.Reader = nil
4017 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1importusereventsrequest)
4018 if err != nil {
4019 return nil, err
4020 }
4021 c.urlParams_.Set("alt", alt)
4022 c.urlParams_.Set("prettyPrint", "false")
4023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:import")
4024 urls += "?" + c.urlParams_.Encode()
4025 req, err := http.NewRequest("POST", urls, body)
4026 if err != nil {
4027 return nil, err
4028 }
4029 req.Header = reqHeaders
4030 googleapi.Expand(req.URL, map[string]string{
4031 "parent": c.parent,
4032 })
4033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4034 }
4035
4036
4037
4038
4039
4040
4041
4042 func (c *ProjectsLocationsCatalogsEventStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4043 gensupport.SetOptions(c.urlParams_, opts...)
4044 res, err := c.doRequest("json")
4045 if res != nil && res.StatusCode == http.StatusNotModified {
4046 if res.Body != nil {
4047 res.Body.Close()
4048 }
4049 return nil, gensupport.WrapError(&googleapi.Error{
4050 Code: res.StatusCode,
4051 Header: res.Header,
4052 })
4053 }
4054 if err != nil {
4055 return nil, err
4056 }
4057 defer googleapi.CloseBody(res)
4058 if err := googleapi.CheckResponse(res); err != nil {
4059 return nil, gensupport.WrapError(err)
4060 }
4061 ret := &GoogleLongrunningOperation{
4062 ServerResponse: googleapi.ServerResponse{
4063 Header: res.Header,
4064 HTTPStatusCode: res.StatusCode,
4065 },
4066 }
4067 target := &ret
4068 if err := gensupport.DecodeResponse(target, res); err != nil {
4069 return nil, err
4070 }
4071 return ret, nil
4072 }
4073
4074 type ProjectsLocationsCatalogsEventStoresUserEventsListCall struct {
4075 s *Service
4076 parent string
4077 urlParams_ gensupport.URLParams
4078 ifNoneMatch_ string
4079 ctx_ context.Context
4080 header_ http.Header
4081 }
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094 func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) List(parent string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4095 c := &ProjectsLocationsCatalogsEventStoresUserEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4096 c.parent = parent
4097 return c
4098 }
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Filter(filter string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4122 c.urlParams_.Set("filter", filter)
4123 return c
4124 }
4125
4126
4127
4128 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4129 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4130 return c
4131 }
4132
4133
4134
4135 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4136 c.urlParams_.Set("pageToken", pageToken)
4137 return c
4138 }
4139
4140
4141
4142
4143 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4144 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4145 return c
4146 }
4147
4148
4149
4150
4151 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4152 c.ifNoneMatch_ = entityTag
4153 return c
4154 }
4155
4156
4157 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsListCall {
4158 c.ctx_ = ctx
4159 return c
4160 }
4161
4162
4163
4164 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Header() http.Header {
4165 if c.header_ == nil {
4166 c.header_ = make(http.Header)
4167 }
4168 return c.header_
4169 }
4170
4171 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) doRequest(alt string) (*http.Response, error) {
4172 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4173 if c.ifNoneMatch_ != "" {
4174 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4175 }
4176 var body io.Reader = nil
4177 c.urlParams_.Set("alt", alt)
4178 c.urlParams_.Set("prettyPrint", "false")
4179 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents")
4180 urls += "?" + c.urlParams_.Encode()
4181 req, err := http.NewRequest("GET", urls, body)
4182 if err != nil {
4183 return nil, err
4184 }
4185 req.Header = reqHeaders
4186 googleapi.Expand(req.URL, map[string]string{
4187 "parent": c.parent,
4188 })
4189 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4190 }
4191
4192
4193
4194
4195
4196
4197
4198 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1ListUserEventsResponse, error) {
4199 gensupport.SetOptions(c.urlParams_, opts...)
4200 res, err := c.doRequest("json")
4201 if res != nil && res.StatusCode == http.StatusNotModified {
4202 if res.Body != nil {
4203 res.Body.Close()
4204 }
4205 return nil, gensupport.WrapError(&googleapi.Error{
4206 Code: res.StatusCode,
4207 Header: res.Header,
4208 })
4209 }
4210 if err != nil {
4211 return nil, err
4212 }
4213 defer googleapi.CloseBody(res)
4214 if err := googleapi.CheckResponse(res); err != nil {
4215 return nil, gensupport.WrapError(err)
4216 }
4217 ret := &GoogleCloudRecommendationengineV1beta1ListUserEventsResponse{
4218 ServerResponse: googleapi.ServerResponse{
4219 Header: res.Header,
4220 HTTPStatusCode: res.StatusCode,
4221 },
4222 }
4223 target := &ret
4224 if err := gensupport.DecodeResponse(target, res); err != nil {
4225 return nil, err
4226 }
4227 return ret, nil
4228 }
4229
4230
4231
4232
4233 func (c *ProjectsLocationsCatalogsEventStoresUserEventsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommendationengineV1beta1ListUserEventsResponse) error) error {
4234 c.ctx_ = ctx
4235 defer c.PageToken(c.urlParams_.Get("pageToken"))
4236 for {
4237 x, err := c.Do()
4238 if err != nil {
4239 return err
4240 }
4241 if err := f(x); err != nil {
4242 return err
4243 }
4244 if x.NextPageToken == "" {
4245 return nil
4246 }
4247 c.PageToken(x.NextPageToken)
4248 }
4249 }
4250
4251 type ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall struct {
4252 s *Service
4253 parent string
4254 googlecloudrecommendationenginev1beta1purgeusereventsrequest *GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest
4255 urlParams_ gensupport.URLParams
4256 ctx_ context.Context
4257 header_ http.Header
4258 }
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269 func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Purge(parent string, googlecloudrecommendationenginev1beta1purgeusereventsrequest *GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest) *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall {
4270 c := &ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4271 c.parent = parent
4272 c.googlecloudrecommendationenginev1beta1purgeusereventsrequest = googlecloudrecommendationenginev1beta1purgeusereventsrequest
4273 return c
4274 }
4275
4276
4277
4278
4279 func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall {
4280 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4281 return c
4282 }
4283
4284
4285 func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall {
4286 c.ctx_ = ctx
4287 return c
4288 }
4289
4290
4291
4292 func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Header() http.Header {
4293 if c.header_ == nil {
4294 c.header_ = make(http.Header)
4295 }
4296 return c.header_
4297 }
4298
4299 func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) {
4300 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4301 var body io.Reader = nil
4302 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1purgeusereventsrequest)
4303 if err != nil {
4304 return nil, err
4305 }
4306 c.urlParams_.Set("alt", alt)
4307 c.urlParams_.Set("prettyPrint", "false")
4308 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:purge")
4309 urls += "?" + c.urlParams_.Encode()
4310 req, err := http.NewRequest("POST", urls, body)
4311 if err != nil {
4312 return nil, err
4313 }
4314 req.Header = reqHeaders
4315 googleapi.Expand(req.URL, map[string]string{
4316 "parent": c.parent,
4317 })
4318 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4319 }
4320
4321
4322
4323
4324
4325
4326
4327 func (c *ProjectsLocationsCatalogsEventStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4328 gensupport.SetOptions(c.urlParams_, opts...)
4329 res, err := c.doRequest("json")
4330 if res != nil && res.StatusCode == http.StatusNotModified {
4331 if res.Body != nil {
4332 res.Body.Close()
4333 }
4334 return nil, gensupport.WrapError(&googleapi.Error{
4335 Code: res.StatusCode,
4336 Header: res.Header,
4337 })
4338 }
4339 if err != nil {
4340 return nil, err
4341 }
4342 defer googleapi.CloseBody(res)
4343 if err := googleapi.CheckResponse(res); err != nil {
4344 return nil, gensupport.WrapError(err)
4345 }
4346 ret := &GoogleLongrunningOperation{
4347 ServerResponse: googleapi.ServerResponse{
4348 Header: res.Header,
4349 HTTPStatusCode: res.StatusCode,
4350 },
4351 }
4352 target := &ret
4353 if err := gensupport.DecodeResponse(target, res); err != nil {
4354 return nil, err
4355 }
4356 return ret, nil
4357 }
4358
4359 type ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall struct {
4360 s *Service
4361 parent string
4362 googlecloudrecommendationenginev1beta1rejoinusereventsrequest *GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest
4363 urlParams_ gensupport.URLParams
4364 ctx_ context.Context
4365 header_ http.Header
4366 }
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379 func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Rejoin(parent string, googlecloudrecommendationenginev1beta1rejoinusereventsrequest *GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest) *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall {
4380 c := &ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4381 c.parent = parent
4382 c.googlecloudrecommendationenginev1beta1rejoinusereventsrequest = googlecloudrecommendationenginev1beta1rejoinusereventsrequest
4383 return c
4384 }
4385
4386
4387
4388
4389 func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall {
4390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4391 return c
4392 }
4393
4394
4395 func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall {
4396 c.ctx_ = ctx
4397 return c
4398 }
4399
4400
4401
4402 func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Header() http.Header {
4403 if c.header_ == nil {
4404 c.header_ = make(http.Header)
4405 }
4406 return c.header_
4407 }
4408
4409 func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) doRequest(alt string) (*http.Response, error) {
4410 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4411 var body io.Reader = nil
4412 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1rejoinusereventsrequest)
4413 if err != nil {
4414 return nil, err
4415 }
4416 c.urlParams_.Set("alt", alt)
4417 c.urlParams_.Set("prettyPrint", "false")
4418 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:rejoin")
4419 urls += "?" + c.urlParams_.Encode()
4420 req, err := http.NewRequest("POST", urls, body)
4421 if err != nil {
4422 return nil, err
4423 }
4424 req.Header = reqHeaders
4425 googleapi.Expand(req.URL, map[string]string{
4426 "parent": c.parent,
4427 })
4428 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4429 }
4430
4431
4432
4433
4434
4435
4436
4437 func (c *ProjectsLocationsCatalogsEventStoresUserEventsRejoinCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4438 gensupport.SetOptions(c.urlParams_, opts...)
4439 res, err := c.doRequest("json")
4440 if res != nil && res.StatusCode == http.StatusNotModified {
4441 if res.Body != nil {
4442 res.Body.Close()
4443 }
4444 return nil, gensupport.WrapError(&googleapi.Error{
4445 Code: res.StatusCode,
4446 Header: res.Header,
4447 })
4448 }
4449 if err != nil {
4450 return nil, err
4451 }
4452 defer googleapi.CloseBody(res)
4453 if err := googleapi.CheckResponse(res); err != nil {
4454 return nil, gensupport.WrapError(err)
4455 }
4456 ret := &GoogleLongrunningOperation{
4457 ServerResponse: googleapi.ServerResponse{
4458 Header: res.Header,
4459 HTTPStatusCode: res.StatusCode,
4460 },
4461 }
4462 target := &ret
4463 if err := gensupport.DecodeResponse(target, res); err != nil {
4464 return nil, err
4465 }
4466 return ret, nil
4467 }
4468
4469 type ProjectsLocationsCatalogsEventStoresUserEventsWriteCall struct {
4470 s *Service
4471 parent string
4472 googlecloudrecommendationenginev1beta1userevent *GoogleCloudRecommendationengineV1beta1UserEvent
4473 urlParams_ gensupport.URLParams
4474 ctx_ context.Context
4475 header_ http.Header
4476 }
4477
4478
4479
4480
4481
4482
4483 func (r *ProjectsLocationsCatalogsEventStoresUserEventsService) Write(parent string, googlecloudrecommendationenginev1beta1userevent *GoogleCloudRecommendationengineV1beta1UserEvent) *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall {
4484 c := &ProjectsLocationsCatalogsEventStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4485 c.parent = parent
4486 c.googlecloudrecommendationenginev1beta1userevent = googlecloudrecommendationenginev1beta1userevent
4487 return c
4488 }
4489
4490
4491
4492
4493 func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall {
4494 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4495 return c
4496 }
4497
4498
4499 func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall {
4500 c.ctx_ = ctx
4501 return c
4502 }
4503
4504
4505
4506 func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Header() http.Header {
4507 if c.header_ == nil {
4508 c.header_ = make(http.Header)
4509 }
4510 return c.header_
4511 }
4512
4513 func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) {
4514 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4515 var body io.Reader = nil
4516 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommendationenginev1beta1userevent)
4517 if err != nil {
4518 return nil, err
4519 }
4520 c.urlParams_.Set("alt", alt)
4521 c.urlParams_.Set("prettyPrint", "false")
4522 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/userEvents:write")
4523 urls += "?" + c.urlParams_.Encode()
4524 req, err := http.NewRequest("POST", urls, body)
4525 if err != nil {
4526 return nil, err
4527 }
4528 req.Header = reqHeaders
4529 googleapi.Expand(req.URL, map[string]string{
4530 "parent": c.parent,
4531 })
4532 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4533 }
4534
4535
4536
4537
4538
4539
4540
4541 func (c *ProjectsLocationsCatalogsEventStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommendationengineV1beta1UserEvent, error) {
4542 gensupport.SetOptions(c.urlParams_, opts...)
4543 res, err := c.doRequest("json")
4544 if res != nil && res.StatusCode == http.StatusNotModified {
4545 if res.Body != nil {
4546 res.Body.Close()
4547 }
4548 return nil, gensupport.WrapError(&googleapi.Error{
4549 Code: res.StatusCode,
4550 Header: res.Header,
4551 })
4552 }
4553 if err != nil {
4554 return nil, err
4555 }
4556 defer googleapi.CloseBody(res)
4557 if err := googleapi.CheckResponse(res); err != nil {
4558 return nil, gensupport.WrapError(err)
4559 }
4560 ret := &GoogleCloudRecommendationengineV1beta1UserEvent{
4561 ServerResponse: googleapi.ServerResponse{
4562 Header: res.Header,
4563 HTTPStatusCode: res.StatusCode,
4564 },
4565 }
4566 target := &ret
4567 if err := gensupport.DecodeResponse(target, res); err != nil {
4568 return nil, err
4569 }
4570 return ret, nil
4571 }
4572
4573 type ProjectsLocationsCatalogsOperationsGetCall struct {
4574 s *Service
4575 name string
4576 urlParams_ gensupport.URLParams
4577 ifNoneMatch_ string
4578 ctx_ context.Context
4579 header_ http.Header
4580 }
4581
4582
4583
4584
4585
4586
4587 func (r *ProjectsLocationsCatalogsOperationsService) Get(name string) *ProjectsLocationsCatalogsOperationsGetCall {
4588 c := &ProjectsLocationsCatalogsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4589 c.name = name
4590 return c
4591 }
4592
4593
4594
4595
4596 func (c *ProjectsLocationsCatalogsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsOperationsGetCall {
4597 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4598 return c
4599 }
4600
4601
4602
4603
4604 func (c *ProjectsLocationsCatalogsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsOperationsGetCall {
4605 c.ifNoneMatch_ = entityTag
4606 return c
4607 }
4608
4609
4610 func (c *ProjectsLocationsCatalogsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCatalogsOperationsGetCall {
4611 c.ctx_ = ctx
4612 return c
4613 }
4614
4615
4616
4617 func (c *ProjectsLocationsCatalogsOperationsGetCall) Header() http.Header {
4618 if c.header_ == nil {
4619 c.header_ = make(http.Header)
4620 }
4621 return c.header_
4622 }
4623
4624 func (c *ProjectsLocationsCatalogsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4625 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4626 if c.ifNoneMatch_ != "" {
4627 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4628 }
4629 var body io.Reader = nil
4630 c.urlParams_.Set("alt", alt)
4631 c.urlParams_.Set("prettyPrint", "false")
4632 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4633 urls += "?" + c.urlParams_.Encode()
4634 req, err := http.NewRequest("GET", urls, body)
4635 if err != nil {
4636 return nil, err
4637 }
4638 req.Header = reqHeaders
4639 googleapi.Expand(req.URL, map[string]string{
4640 "name": c.name,
4641 })
4642 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4643 }
4644
4645
4646
4647
4648
4649
4650
4651 func (c *ProjectsLocationsCatalogsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4652 gensupport.SetOptions(c.urlParams_, opts...)
4653 res, err := c.doRequest("json")
4654 if res != nil && res.StatusCode == http.StatusNotModified {
4655 if res.Body != nil {
4656 res.Body.Close()
4657 }
4658 return nil, gensupport.WrapError(&googleapi.Error{
4659 Code: res.StatusCode,
4660 Header: res.Header,
4661 })
4662 }
4663 if err != nil {
4664 return nil, err
4665 }
4666 defer googleapi.CloseBody(res)
4667 if err := googleapi.CheckResponse(res); err != nil {
4668 return nil, gensupport.WrapError(err)
4669 }
4670 ret := &GoogleLongrunningOperation{
4671 ServerResponse: googleapi.ServerResponse{
4672 Header: res.Header,
4673 HTTPStatusCode: res.StatusCode,
4674 },
4675 }
4676 target := &ret
4677 if err := gensupport.DecodeResponse(target, res); err != nil {
4678 return nil, err
4679 }
4680 return ret, nil
4681 }
4682
4683 type ProjectsLocationsCatalogsOperationsListCall struct {
4684 s *Service
4685 name string
4686 urlParams_ gensupport.URLParams
4687 ifNoneMatch_ string
4688 ctx_ context.Context
4689 header_ http.Header
4690 }
4691
4692
4693
4694
4695
4696 func (r *ProjectsLocationsCatalogsOperationsService) List(name string) *ProjectsLocationsCatalogsOperationsListCall {
4697 c := &ProjectsLocationsCatalogsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4698 c.name = name
4699 return c
4700 }
4701
4702
4703 func (c *ProjectsLocationsCatalogsOperationsListCall) Filter(filter string) *ProjectsLocationsCatalogsOperationsListCall {
4704 c.urlParams_.Set("filter", filter)
4705 return c
4706 }
4707
4708
4709
4710 func (c *ProjectsLocationsCatalogsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCatalogsOperationsListCall {
4711 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4712 return c
4713 }
4714
4715
4716
4717 func (c *ProjectsLocationsCatalogsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCatalogsOperationsListCall {
4718 c.urlParams_.Set("pageToken", pageToken)
4719 return c
4720 }
4721
4722
4723
4724
4725 func (c *ProjectsLocationsCatalogsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsOperationsListCall {
4726 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4727 return c
4728 }
4729
4730
4731
4732
4733 func (c *ProjectsLocationsCatalogsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCatalogsOperationsListCall {
4734 c.ifNoneMatch_ = entityTag
4735 return c
4736 }
4737
4738
4739 func (c *ProjectsLocationsCatalogsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCatalogsOperationsListCall {
4740 c.ctx_ = ctx
4741 return c
4742 }
4743
4744
4745
4746 func (c *ProjectsLocationsCatalogsOperationsListCall) Header() http.Header {
4747 if c.header_ == nil {
4748 c.header_ = make(http.Header)
4749 }
4750 return c.header_
4751 }
4752
4753 func (c *ProjectsLocationsCatalogsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4754 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4755 if c.ifNoneMatch_ != "" {
4756 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4757 }
4758 var body io.Reader = nil
4759 c.urlParams_.Set("alt", alt)
4760 c.urlParams_.Set("prettyPrint", "false")
4761 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
4762 urls += "?" + c.urlParams_.Encode()
4763 req, err := http.NewRequest("GET", urls, body)
4764 if err != nil {
4765 return nil, err
4766 }
4767 req.Header = reqHeaders
4768 googleapi.Expand(req.URL, map[string]string{
4769 "name": c.name,
4770 })
4771 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4772 }
4773
4774
4775
4776
4777
4778
4779
4780 func (c *ProjectsLocationsCatalogsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
4781 gensupport.SetOptions(c.urlParams_, opts...)
4782 res, err := c.doRequest("json")
4783 if res != nil && res.StatusCode == http.StatusNotModified {
4784 if res.Body != nil {
4785 res.Body.Close()
4786 }
4787 return nil, gensupport.WrapError(&googleapi.Error{
4788 Code: res.StatusCode,
4789 Header: res.Header,
4790 })
4791 }
4792 if err != nil {
4793 return nil, err
4794 }
4795 defer googleapi.CloseBody(res)
4796 if err := googleapi.CheckResponse(res); err != nil {
4797 return nil, gensupport.WrapError(err)
4798 }
4799 ret := &GoogleLongrunningListOperationsResponse{
4800 ServerResponse: googleapi.ServerResponse{
4801 Header: res.Header,
4802 HTTPStatusCode: res.StatusCode,
4803 },
4804 }
4805 target := &ret
4806 if err := gensupport.DecodeResponse(target, res); err != nil {
4807 return nil, err
4808 }
4809 return ret, nil
4810 }
4811
4812
4813
4814
4815 func (c *ProjectsLocationsCatalogsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
4816 c.ctx_ = ctx
4817 defer c.PageToken(c.urlParams_.Get("pageToken"))
4818 for {
4819 x, err := c.Do()
4820 if err != nil {
4821 return err
4822 }
4823 if err := f(x); err != nil {
4824 return err
4825 }
4826 if x.NextPageToken == "" {
4827 return nil
4828 }
4829 c.PageToken(x.NextPageToken)
4830 }
4831 }
4832
View as plain text