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