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 analytics
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 = "analytics:v3"
95 const apiName = "analytics"
96 const apiVersion = "v3"
97 const basePath = "https://analytics.googleapis.com/analytics/v3/"
98 const basePathTemplate = "https://analytics.UNIVERSE_DOMAIN/analytics/v3/"
99
100
101 const (
102
103 AnalyticsScope = "https://www.googleapis.com/auth/analytics"
104
105
106 AnalyticsEditScope = "https://www.googleapis.com/auth/analytics.edit"
107
108
109 AnalyticsManageUsersScope = "https://www.googleapis.com/auth/analytics.manage.users"
110
111
112 AnalyticsManageUsersReadonlyScope = "https://www.googleapis.com/auth/analytics.manage.users.readonly"
113
114
115
116 AnalyticsProvisionScope = "https://www.googleapis.com/auth/analytics.provision"
117
118
119 AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly"
120
121
122 AnalyticsUserDeletionScope = "https://www.googleapis.com/auth/analytics.user.deletion"
123 )
124
125
126 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
127 scopesOption := internaloption.WithDefaultScopes(
128 "https://www.googleapis.com/auth/analytics",
129 "https://www.googleapis.com/auth/analytics.edit",
130 "https://www.googleapis.com/auth/analytics.manage.users",
131 "https://www.googleapis.com/auth/analytics.manage.users.readonly",
132 "https://www.googleapis.com/auth/analytics.provision",
133 "https://www.googleapis.com/auth/analytics.readonly",
134 "https://www.googleapis.com/auth/analytics.user.deletion",
135 )
136
137 opts = append([]option.ClientOption{scopesOption}, opts...)
138 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
139 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
140 opts = append(opts, internaloption.EnableNewAuthLibrary())
141 client, endpoint, err := htransport.NewClient(ctx, opts...)
142 if err != nil {
143 return nil, err
144 }
145 s, err := New(client)
146 if err != nil {
147 return nil, err
148 }
149 if endpoint != "" {
150 s.BasePath = endpoint
151 }
152 return s, nil
153 }
154
155
156
157
158
159
160 func New(client *http.Client) (*Service, error) {
161 if client == nil {
162 return nil, errors.New("client is nil")
163 }
164 s := &Service{client: client, BasePath: basePath}
165 s.Data = NewDataService(s)
166 s.Management = NewManagementService(s)
167 s.Metadata = NewMetadataService(s)
168 s.Provisioning = NewProvisioningService(s)
169 s.UserDeletion = NewUserDeletionService(s)
170 return s, nil
171 }
172
173 type Service struct {
174 client *http.Client
175 BasePath string
176 UserAgent string
177
178 Data *DataService
179
180 Management *ManagementService
181
182 Metadata *MetadataService
183
184 Provisioning *ProvisioningService
185
186 UserDeletion *UserDeletionService
187 }
188
189 func (s *Service) userAgent() string {
190 if s.UserAgent == "" {
191 return googleapi.UserAgent
192 }
193 return googleapi.UserAgent + " " + s.UserAgent
194 }
195
196 func NewDataService(s *Service) *DataService {
197 rs := &DataService{s: s}
198 rs.Ga = NewDataGaService(s)
199 rs.Mcf = NewDataMcfService(s)
200 rs.Realtime = NewDataRealtimeService(s)
201 return rs
202 }
203
204 type DataService struct {
205 s *Service
206
207 Ga *DataGaService
208
209 Mcf *DataMcfService
210
211 Realtime *DataRealtimeService
212 }
213
214 func NewDataGaService(s *Service) *DataGaService {
215 rs := &DataGaService{s: s}
216 return rs
217 }
218
219 type DataGaService struct {
220 s *Service
221 }
222
223 func NewDataMcfService(s *Service) *DataMcfService {
224 rs := &DataMcfService{s: s}
225 return rs
226 }
227
228 type DataMcfService struct {
229 s *Service
230 }
231
232 func NewDataRealtimeService(s *Service) *DataRealtimeService {
233 rs := &DataRealtimeService{s: s}
234 return rs
235 }
236
237 type DataRealtimeService struct {
238 s *Service
239 }
240
241 func NewManagementService(s *Service) *ManagementService {
242 rs := &ManagementService{s: s}
243 rs.AccountSummaries = NewManagementAccountSummariesService(s)
244 rs.AccountUserLinks = NewManagementAccountUserLinksService(s)
245 rs.Accounts = NewManagementAccountsService(s)
246 rs.ClientId = NewManagementClientIdService(s)
247 rs.CustomDataSources = NewManagementCustomDataSourcesService(s)
248 rs.CustomDimensions = NewManagementCustomDimensionsService(s)
249 rs.CustomMetrics = NewManagementCustomMetricsService(s)
250 rs.Experiments = NewManagementExperimentsService(s)
251 rs.Filters = NewManagementFiltersService(s)
252 rs.Goals = NewManagementGoalsService(s)
253 rs.ProfileFilterLinks = NewManagementProfileFilterLinksService(s)
254 rs.ProfileUserLinks = NewManagementProfileUserLinksService(s)
255 rs.Profiles = NewManagementProfilesService(s)
256 rs.RemarketingAudience = NewManagementRemarketingAudienceService(s)
257 rs.Segments = NewManagementSegmentsService(s)
258 rs.UnsampledReports = NewManagementUnsampledReportsService(s)
259 rs.Uploads = NewManagementUploadsService(s)
260 rs.WebPropertyAdWordsLinks = NewManagementWebPropertyAdWordsLinksService(s)
261 rs.Webproperties = NewManagementWebpropertiesService(s)
262 rs.WebpropertyUserLinks = NewManagementWebpropertyUserLinksService(s)
263 return rs
264 }
265
266 type ManagementService struct {
267 s *Service
268
269 AccountSummaries *ManagementAccountSummariesService
270
271 AccountUserLinks *ManagementAccountUserLinksService
272
273 Accounts *ManagementAccountsService
274
275 ClientId *ManagementClientIdService
276
277 CustomDataSources *ManagementCustomDataSourcesService
278
279 CustomDimensions *ManagementCustomDimensionsService
280
281 CustomMetrics *ManagementCustomMetricsService
282
283 Experiments *ManagementExperimentsService
284
285 Filters *ManagementFiltersService
286
287 Goals *ManagementGoalsService
288
289 ProfileFilterLinks *ManagementProfileFilterLinksService
290
291 ProfileUserLinks *ManagementProfileUserLinksService
292
293 Profiles *ManagementProfilesService
294
295 RemarketingAudience *ManagementRemarketingAudienceService
296
297 Segments *ManagementSegmentsService
298
299 UnsampledReports *ManagementUnsampledReportsService
300
301 Uploads *ManagementUploadsService
302
303 WebPropertyAdWordsLinks *ManagementWebPropertyAdWordsLinksService
304
305 Webproperties *ManagementWebpropertiesService
306
307 WebpropertyUserLinks *ManagementWebpropertyUserLinksService
308 }
309
310 func NewManagementAccountSummariesService(s *Service) *ManagementAccountSummariesService {
311 rs := &ManagementAccountSummariesService{s: s}
312 return rs
313 }
314
315 type ManagementAccountSummariesService struct {
316 s *Service
317 }
318
319 func NewManagementAccountUserLinksService(s *Service) *ManagementAccountUserLinksService {
320 rs := &ManagementAccountUserLinksService{s: s}
321 return rs
322 }
323
324 type ManagementAccountUserLinksService struct {
325 s *Service
326 }
327
328 func NewManagementAccountsService(s *Service) *ManagementAccountsService {
329 rs := &ManagementAccountsService{s: s}
330 return rs
331 }
332
333 type ManagementAccountsService struct {
334 s *Service
335 }
336
337 func NewManagementClientIdService(s *Service) *ManagementClientIdService {
338 rs := &ManagementClientIdService{s: s}
339 return rs
340 }
341
342 type ManagementClientIdService struct {
343 s *Service
344 }
345
346 func NewManagementCustomDataSourcesService(s *Service) *ManagementCustomDataSourcesService {
347 rs := &ManagementCustomDataSourcesService{s: s}
348 return rs
349 }
350
351 type ManagementCustomDataSourcesService struct {
352 s *Service
353 }
354
355 func NewManagementCustomDimensionsService(s *Service) *ManagementCustomDimensionsService {
356 rs := &ManagementCustomDimensionsService{s: s}
357 return rs
358 }
359
360 type ManagementCustomDimensionsService struct {
361 s *Service
362 }
363
364 func NewManagementCustomMetricsService(s *Service) *ManagementCustomMetricsService {
365 rs := &ManagementCustomMetricsService{s: s}
366 return rs
367 }
368
369 type ManagementCustomMetricsService struct {
370 s *Service
371 }
372
373 func NewManagementExperimentsService(s *Service) *ManagementExperimentsService {
374 rs := &ManagementExperimentsService{s: s}
375 return rs
376 }
377
378 type ManagementExperimentsService struct {
379 s *Service
380 }
381
382 func NewManagementFiltersService(s *Service) *ManagementFiltersService {
383 rs := &ManagementFiltersService{s: s}
384 return rs
385 }
386
387 type ManagementFiltersService struct {
388 s *Service
389 }
390
391 func NewManagementGoalsService(s *Service) *ManagementGoalsService {
392 rs := &ManagementGoalsService{s: s}
393 return rs
394 }
395
396 type ManagementGoalsService struct {
397 s *Service
398 }
399
400 func NewManagementProfileFilterLinksService(s *Service) *ManagementProfileFilterLinksService {
401 rs := &ManagementProfileFilterLinksService{s: s}
402 return rs
403 }
404
405 type ManagementProfileFilterLinksService struct {
406 s *Service
407 }
408
409 func NewManagementProfileUserLinksService(s *Service) *ManagementProfileUserLinksService {
410 rs := &ManagementProfileUserLinksService{s: s}
411 return rs
412 }
413
414 type ManagementProfileUserLinksService struct {
415 s *Service
416 }
417
418 func NewManagementProfilesService(s *Service) *ManagementProfilesService {
419 rs := &ManagementProfilesService{s: s}
420 return rs
421 }
422
423 type ManagementProfilesService struct {
424 s *Service
425 }
426
427 func NewManagementRemarketingAudienceService(s *Service) *ManagementRemarketingAudienceService {
428 rs := &ManagementRemarketingAudienceService{s: s}
429 return rs
430 }
431
432 type ManagementRemarketingAudienceService struct {
433 s *Service
434 }
435
436 func NewManagementSegmentsService(s *Service) *ManagementSegmentsService {
437 rs := &ManagementSegmentsService{s: s}
438 return rs
439 }
440
441 type ManagementSegmentsService struct {
442 s *Service
443 }
444
445 func NewManagementUnsampledReportsService(s *Service) *ManagementUnsampledReportsService {
446 rs := &ManagementUnsampledReportsService{s: s}
447 return rs
448 }
449
450 type ManagementUnsampledReportsService struct {
451 s *Service
452 }
453
454 func NewManagementUploadsService(s *Service) *ManagementUploadsService {
455 rs := &ManagementUploadsService{s: s}
456 return rs
457 }
458
459 type ManagementUploadsService struct {
460 s *Service
461 }
462
463 func NewManagementWebPropertyAdWordsLinksService(s *Service) *ManagementWebPropertyAdWordsLinksService {
464 rs := &ManagementWebPropertyAdWordsLinksService{s: s}
465 return rs
466 }
467
468 type ManagementWebPropertyAdWordsLinksService struct {
469 s *Service
470 }
471
472 func NewManagementWebpropertiesService(s *Service) *ManagementWebpropertiesService {
473 rs := &ManagementWebpropertiesService{s: s}
474 return rs
475 }
476
477 type ManagementWebpropertiesService struct {
478 s *Service
479 }
480
481 func NewManagementWebpropertyUserLinksService(s *Service) *ManagementWebpropertyUserLinksService {
482 rs := &ManagementWebpropertyUserLinksService{s: s}
483 return rs
484 }
485
486 type ManagementWebpropertyUserLinksService struct {
487 s *Service
488 }
489
490 func NewMetadataService(s *Service) *MetadataService {
491 rs := &MetadataService{s: s}
492 rs.Columns = NewMetadataColumnsService(s)
493 return rs
494 }
495
496 type MetadataService struct {
497 s *Service
498
499 Columns *MetadataColumnsService
500 }
501
502 func NewMetadataColumnsService(s *Service) *MetadataColumnsService {
503 rs := &MetadataColumnsService{s: s}
504 return rs
505 }
506
507 type MetadataColumnsService struct {
508 s *Service
509 }
510
511 func NewProvisioningService(s *Service) *ProvisioningService {
512 rs := &ProvisioningService{s: s}
513 return rs
514 }
515
516 type ProvisioningService struct {
517 s *Service
518 }
519
520 func NewUserDeletionService(s *Service) *UserDeletionService {
521 rs := &UserDeletionService{s: s}
522 rs.UserDeletionRequest = NewUserDeletionUserDeletionRequestService(s)
523 return rs
524 }
525
526 type UserDeletionService struct {
527 s *Service
528
529 UserDeletionRequest *UserDeletionUserDeletionRequestService
530 }
531
532 func NewUserDeletionUserDeletionRequestService(s *Service) *UserDeletionUserDeletionRequestService {
533 rs := &UserDeletionUserDeletionRequestService{s: s}
534 return rs
535 }
536
537 type UserDeletionUserDeletionRequestService struct {
538 s *Service
539 }
540
541
542 type Account struct {
543
544
545 ChildLink *AccountChildLink `json:"childLink,omitempty"`
546
547 Created string `json:"created,omitempty"`
548
549 Id string `json:"id,omitempty"`
550
551 Kind string `json:"kind,omitempty"`
552
553 Name string `json:"name,omitempty"`
554
555 Permissions *AccountPermissions `json:"permissions,omitempty"`
556
557 SelfLink string `json:"selfLink,omitempty"`
558
559 Starred bool `json:"starred,omitempty"`
560
561 Updated string `json:"updated,omitempty"`
562
563
564
565
566
567 ForceSendFields []string `json:"-"`
568
569
570
571
572 NullFields []string `json:"-"`
573 }
574
575 func (s *Account) MarshalJSON() ([]byte, error) {
576 type NoMethod Account
577 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
578 }
579
580
581
582 type AccountChildLink struct {
583
584 Href string `json:"href,omitempty"`
585
586 Type string `json:"type,omitempty"`
587
588
589
590
591
592 ForceSendFields []string `json:"-"`
593
594
595
596
597 NullFields []string `json:"-"`
598 }
599
600 func (s *AccountChildLink) MarshalJSON() ([]byte, error) {
601 type NoMethod AccountChildLink
602 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
603 }
604
605
606 type AccountPermissions struct {
607
608
609 Effective []string `json:"effective,omitempty"`
610
611
612
613
614
615 ForceSendFields []string `json:"-"`
616
617
618
619
620 NullFields []string `json:"-"`
621 }
622
623 func (s *AccountPermissions) MarshalJSON() ([]byte, error) {
624 type NoMethod AccountPermissions
625 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
626 }
627
628
629 type AccountRef struct {
630
631 Href string `json:"href,omitempty"`
632
633 Id string `json:"id,omitempty"`
634
635 Kind string `json:"kind,omitempty"`
636
637 Name string `json:"name,omitempty"`
638
639
640
641
642
643 ForceSendFields []string `json:"-"`
644
645
646
647
648 NullFields []string `json:"-"`
649 }
650
651 func (s *AccountRef) MarshalJSON() ([]byte, error) {
652 type NoMethod AccountRef
653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
654 }
655
656
657
658
659 type AccountSummaries struct {
660
661 Items []*AccountSummary `json:"items,omitempty"`
662
663
664
665
666 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
667
668 Kind string `json:"kind,omitempty"`
669
670 NextLink string `json:"nextLink,omitempty"`
671
672 PreviousLink string `json:"previousLink,omitempty"`
673
674
675 StartIndex int64 `json:"startIndex,omitempty"`
676
677
678 TotalResults int64 `json:"totalResults,omitempty"`
679
680 Username string `json:"username,omitempty"`
681
682
683 googleapi.ServerResponse `json:"-"`
684
685
686
687
688
689 ForceSendFields []string `json:"-"`
690
691
692
693
694 NullFields []string `json:"-"`
695 }
696
697 func (s *AccountSummaries) MarshalJSON() ([]byte, error) {
698 type NoMethod AccountSummaries
699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
700 }
701
702
703
704 type AccountSummary struct {
705
706 Id string `json:"id,omitempty"`
707
708 Kind string `json:"kind,omitempty"`
709
710 Name string `json:"name,omitempty"`
711
712 Starred bool `json:"starred,omitempty"`
713
714 WebProperties []*WebPropertySummary `json:"webProperties,omitempty"`
715
716
717
718
719
720 ForceSendFields []string `json:"-"`
721
722
723
724
725 NullFields []string `json:"-"`
726 }
727
728 func (s *AccountSummary) MarshalJSON() ([]byte, error) {
729 type NoMethod AccountSummary
730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
731 }
732
733
734
735
736 type AccountTicket struct {
737
738 Account *Account `json:"account,omitempty"`
739
740 Id string `json:"id,omitempty"`
741
742 Kind string `json:"kind,omitempty"`
743
744 Profile *Profile `json:"profile,omitempty"`
745
746
747 RedirectUri string `json:"redirectUri,omitempty"`
748
749 Webproperty *Webproperty `json:"webproperty,omitempty"`
750
751
752 googleapi.ServerResponse `json:"-"`
753
754
755
756
757
758 ForceSendFields []string `json:"-"`
759
760
761
762
763 NullFields []string `json:"-"`
764 }
765
766 func (s *AccountTicket) MarshalJSON() ([]byte, error) {
767 type NoMethod AccountTicket
768 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
769 }
770
771
772
773
774
775 type AccountTreeRequest struct {
776 AccountName string `json:"accountName,omitempty"`
777
778 Kind string `json:"kind,omitempty"`
779 ProfileName string `json:"profileName,omitempty"`
780 Timezone string `json:"timezone,omitempty"`
781 WebpropertyName string `json:"webpropertyName,omitempty"`
782 WebsiteUrl string `json:"websiteUrl,omitempty"`
783
784
785
786
787
788 ForceSendFields []string `json:"-"`
789
790
791
792
793 NullFields []string `json:"-"`
794 }
795
796 func (s *AccountTreeRequest) MarshalJSON() ([]byte, error) {
797 type NoMethod AccountTreeRequest
798 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
799 }
800
801
802
803
804 type AccountTreeResponse struct {
805
806 Account *Account `json:"account,omitempty"`
807
808 Kind string `json:"kind,omitempty"`
809
810 Profile *Profile `json:"profile,omitempty"`
811
812 Webproperty *Webproperty `json:"webproperty,omitempty"`
813
814
815 googleapi.ServerResponse `json:"-"`
816
817
818
819
820
821 ForceSendFields []string `json:"-"`
822
823
824
825
826 NullFields []string `json:"-"`
827 }
828
829 func (s *AccountTreeResponse) MarshalJSON() ([]byte, error) {
830 type NoMethod AccountTreeResponse
831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
832 }
833
834
835
836
837
838 type Accounts struct {
839
840 Items []*Account `json:"items,omitempty"`
841
842
843
844
845 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
846
847 Kind string `json:"kind,omitempty"`
848
849 NextLink string `json:"nextLink,omitempty"`
850
851 PreviousLink string `json:"previousLink,omitempty"`
852
853
854 StartIndex int64 `json:"startIndex,omitempty"`
855
856
857 TotalResults int64 `json:"totalResults,omitempty"`
858
859 Username string `json:"username,omitempty"`
860
861
862 googleapi.ServerResponse `json:"-"`
863
864
865
866
867
868 ForceSendFields []string `json:"-"`
869
870
871
872
873 NullFields []string `json:"-"`
874 }
875
876 func (s *Accounts) MarshalJSON() ([]byte, error) {
877 type NoMethod Accounts
878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
879 }
880
881
882 type AdWordsAccount struct {
883
884
885 AutoTaggingEnabled bool `json:"autoTaggingEnabled,omitempty"`
886
887
888 CustomerId string `json:"customerId,omitempty"`
889
890 Kind string `json:"kind,omitempty"`
891
892
893
894
895
896 ForceSendFields []string `json:"-"`
897
898
899
900
901 NullFields []string `json:"-"`
902 }
903
904 func (s *AdWordsAccount) MarshalJSON() ([]byte, error) {
905 type NoMethod AdWordsAccount
906 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
907 }
908
909
910
911 type AnalyticsDataimportDeleteUploadDataRequest struct {
912
913 CustomDataImportUids []string `json:"customDataImportUids,omitempty"`
914
915
916
917
918
919 ForceSendFields []string `json:"-"`
920
921
922
923
924 NullFields []string `json:"-"`
925 }
926
927 func (s *AnalyticsDataimportDeleteUploadDataRequest) MarshalJSON() ([]byte, error) {
928 type NoMethod AnalyticsDataimportDeleteUploadDataRequest
929 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
930 }
931
932
933 type Column struct {
934
935 Attributes map[string]string `json:"attributes,omitempty"`
936
937 Id string `json:"id,omitempty"`
938
939 Kind string `json:"kind,omitempty"`
940
941
942
943
944
945 ForceSendFields []string `json:"-"`
946
947
948
949
950 NullFields []string `json:"-"`
951 }
952
953 func (s *Column) MarshalJSON() ([]byte, error) {
954 type NoMethod Column
955 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
956 }
957
958
959
960 type Columns struct {
961
962 AttributeNames []string `json:"attributeNames,omitempty"`
963
964
965 Etag string `json:"etag,omitempty"`
966
967 Items []*Column `json:"items,omitempty"`
968
969 Kind string `json:"kind,omitempty"`
970
971 TotalResults int64 `json:"totalResults,omitempty"`
972
973
974 googleapi.ServerResponse `json:"-"`
975
976
977
978
979
980 ForceSendFields []string `json:"-"`
981
982
983
984
985 NullFields []string `json:"-"`
986 }
987
988 func (s *Columns) MarshalJSON() ([]byte, error) {
989 type NoMethod Columns
990 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
991 }
992
993
994 type CustomDataSource struct {
995
996 AccountId string `json:"accountId,omitempty"`
997 ChildLink *CustomDataSourceChildLink `json:"childLink,omitempty"`
998
999 Created string `json:"created,omitempty"`
1000
1001 Description string `json:"description,omitempty"`
1002
1003 Id string `json:"id,omitempty"`
1004 ImportBehavior string `json:"importBehavior,omitempty"`
1005
1006 Kind string `json:"kind,omitempty"`
1007
1008 Name string `json:"name,omitempty"`
1009
1010
1011 ParentLink *CustomDataSourceParentLink `json:"parentLink,omitempty"`
1012
1013 ProfilesLinked []string `json:"profilesLinked,omitempty"`
1014
1015 Schema []string `json:"schema,omitempty"`
1016
1017 SelfLink string `json:"selfLink,omitempty"`
1018
1019 Type string `json:"type,omitempty"`
1020
1021 Updated string `json:"updated,omitempty"`
1022
1023 UploadType string `json:"uploadType,omitempty"`
1024
1025
1026 WebPropertyId string `json:"webPropertyId,omitempty"`
1027
1028
1029
1030
1031
1032 ForceSendFields []string `json:"-"`
1033
1034
1035
1036
1037 NullFields []string `json:"-"`
1038 }
1039
1040 func (s *CustomDataSource) MarshalJSON() ([]byte, error) {
1041 type NoMethod CustomDataSource
1042 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1043 }
1044
1045 type CustomDataSourceChildLink struct {
1046
1047
1048 Href string `json:"href,omitempty"`
1049
1050 Type string `json:"type,omitempty"`
1051
1052
1053
1054
1055
1056 ForceSendFields []string `json:"-"`
1057
1058
1059
1060
1061 NullFields []string `json:"-"`
1062 }
1063
1064 func (s *CustomDataSourceChildLink) MarshalJSON() ([]byte, error) {
1065 type NoMethod CustomDataSourceChildLink
1066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1067 }
1068
1069
1070
1071 type CustomDataSourceParentLink struct {
1072
1073 Href string `json:"href,omitempty"`
1074
1075 Type string `json:"type,omitempty"`
1076
1077
1078
1079
1080
1081 ForceSendFields []string `json:"-"`
1082
1083
1084
1085
1086 NullFields []string `json:"-"`
1087 }
1088
1089 func (s *CustomDataSourceParentLink) MarshalJSON() ([]byte, error) {
1090 type NoMethod CustomDataSourceParentLink
1091 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1092 }
1093
1094
1095
1096
1097 type CustomDataSources struct {
1098
1099 Items []*CustomDataSource `json:"items,omitempty"`
1100
1101
1102
1103
1104 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1105
1106 Kind string `json:"kind,omitempty"`
1107
1108 NextLink string `json:"nextLink,omitempty"`
1109
1110 PreviousLink string `json:"previousLink,omitempty"`
1111
1112
1113 StartIndex int64 `json:"startIndex,omitempty"`
1114
1115
1116 TotalResults int64 `json:"totalResults,omitempty"`
1117
1118 Username string `json:"username,omitempty"`
1119
1120
1121 googleapi.ServerResponse `json:"-"`
1122
1123
1124
1125
1126
1127 ForceSendFields []string `json:"-"`
1128
1129
1130
1131
1132 NullFields []string `json:"-"`
1133 }
1134
1135 func (s *CustomDataSources) MarshalJSON() ([]byte, error) {
1136 type NoMethod CustomDataSources
1137 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1138 }
1139
1140
1141 type CustomDimension struct {
1142
1143 AccountId string `json:"accountId,omitempty"`
1144
1145 Active bool `json:"active,omitempty"`
1146
1147 Created string `json:"created,omitempty"`
1148
1149 Id string `json:"id,omitempty"`
1150
1151 Index int64 `json:"index,omitempty"`
1152
1153
1154 Kind string `json:"kind,omitempty"`
1155
1156 Name string `json:"name,omitempty"`
1157
1158
1159 ParentLink *CustomDimensionParentLink `json:"parentLink,omitempty"`
1160
1161 Scope string `json:"scope,omitempty"`
1162
1163 SelfLink string `json:"selfLink,omitempty"`
1164
1165 Updated string `json:"updated,omitempty"`
1166
1167 WebPropertyId string `json:"webPropertyId,omitempty"`
1168
1169
1170 googleapi.ServerResponse `json:"-"`
1171
1172
1173
1174
1175
1176 ForceSendFields []string `json:"-"`
1177
1178
1179
1180
1181 NullFields []string `json:"-"`
1182 }
1183
1184 func (s *CustomDimension) MarshalJSON() ([]byte, error) {
1185 type NoMethod CustomDimension
1186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1187 }
1188
1189
1190
1191 type CustomDimensionParentLink struct {
1192
1193 Href string `json:"href,omitempty"`
1194
1195 Type string `json:"type,omitempty"`
1196
1197
1198
1199
1200
1201 ForceSendFields []string `json:"-"`
1202
1203
1204
1205
1206 NullFields []string `json:"-"`
1207 }
1208
1209 func (s *CustomDimensionParentLink) MarshalJSON() ([]byte, error) {
1210 type NoMethod CustomDimensionParentLink
1211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1212 }
1213
1214
1215
1216
1217 type CustomDimensions struct {
1218
1219 Items []*CustomDimension `json:"items,omitempty"`
1220
1221
1222
1223
1224 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1225
1226 Kind string `json:"kind,omitempty"`
1227
1228 NextLink string `json:"nextLink,omitempty"`
1229
1230 PreviousLink string `json:"previousLink,omitempty"`
1231
1232
1233 StartIndex int64 `json:"startIndex,omitempty"`
1234
1235
1236 TotalResults int64 `json:"totalResults,omitempty"`
1237
1238 Username string `json:"username,omitempty"`
1239
1240
1241 googleapi.ServerResponse `json:"-"`
1242
1243
1244
1245
1246
1247 ForceSendFields []string `json:"-"`
1248
1249
1250
1251
1252 NullFields []string `json:"-"`
1253 }
1254
1255 func (s *CustomDimensions) MarshalJSON() ([]byte, error) {
1256 type NoMethod CustomDimensions
1257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1258 }
1259
1260
1261 type CustomMetric struct {
1262
1263 AccountId string `json:"accountId,omitempty"`
1264
1265 Active bool `json:"active,omitempty"`
1266
1267 Created string `json:"created,omitempty"`
1268
1269 Id string `json:"id,omitempty"`
1270
1271 Index int64 `json:"index,omitempty"`
1272
1273
1274 Kind string `json:"kind,omitempty"`
1275
1276 MaxValue string `json:"max_value,omitempty"`
1277
1278 MinValue string `json:"min_value,omitempty"`
1279
1280 Name string `json:"name,omitempty"`
1281
1282
1283 ParentLink *CustomMetricParentLink `json:"parentLink,omitempty"`
1284
1285 Scope string `json:"scope,omitempty"`
1286
1287 SelfLink string `json:"selfLink,omitempty"`
1288
1289 Type string `json:"type,omitempty"`
1290
1291 Updated string `json:"updated,omitempty"`
1292
1293 WebPropertyId string `json:"webPropertyId,omitempty"`
1294
1295
1296 googleapi.ServerResponse `json:"-"`
1297
1298
1299
1300
1301
1302 ForceSendFields []string `json:"-"`
1303
1304
1305
1306
1307 NullFields []string `json:"-"`
1308 }
1309
1310 func (s *CustomMetric) MarshalJSON() ([]byte, error) {
1311 type NoMethod CustomMetric
1312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1313 }
1314
1315
1316
1317 type CustomMetricParentLink struct {
1318
1319 Href string `json:"href,omitempty"`
1320
1321 Type string `json:"type,omitempty"`
1322
1323
1324
1325
1326
1327 ForceSendFields []string `json:"-"`
1328
1329
1330
1331
1332 NullFields []string `json:"-"`
1333 }
1334
1335 func (s *CustomMetricParentLink) MarshalJSON() ([]byte, error) {
1336 type NoMethod CustomMetricParentLink
1337 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1338 }
1339
1340
1341
1342
1343 type CustomMetrics struct {
1344
1345 Items []*CustomMetric `json:"items,omitempty"`
1346
1347
1348
1349
1350 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1351
1352 Kind string `json:"kind,omitempty"`
1353
1354 NextLink string `json:"nextLink,omitempty"`
1355
1356 PreviousLink string `json:"previousLink,omitempty"`
1357
1358
1359 StartIndex int64 `json:"startIndex,omitempty"`
1360
1361
1362 TotalResults int64 `json:"totalResults,omitempty"`
1363
1364 Username string `json:"username,omitempty"`
1365
1366
1367 googleapi.ServerResponse `json:"-"`
1368
1369
1370
1371
1372
1373 ForceSendFields []string `json:"-"`
1374
1375
1376
1377
1378 NullFields []string `json:"-"`
1379 }
1380
1381 func (s *CustomMetrics) MarshalJSON() ([]byte, error) {
1382 type NoMethod CustomMetrics
1383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1384 }
1385
1386
1387 type EntityAdWordsLink struct {
1388
1389
1390
1391 AdWordsAccounts []*AdWordsAccount `json:"adWordsAccounts,omitempty"`
1392
1393 Entity *EntityAdWordsLinkEntity `json:"entity,omitempty"`
1394
1395 Id string `json:"id,omitempty"`
1396
1397 Kind string `json:"kind,omitempty"`
1398
1399
1400 Name string `json:"name,omitempty"`
1401
1402 ProfileIds []string `json:"profileIds,omitempty"`
1403
1404 SelfLink string `json:"selfLink,omitempty"`
1405
1406
1407 googleapi.ServerResponse `json:"-"`
1408
1409
1410
1411
1412
1413 ForceSendFields []string `json:"-"`
1414
1415
1416
1417
1418 NullFields []string `json:"-"`
1419 }
1420
1421 func (s *EntityAdWordsLink) MarshalJSON() ([]byte, error) {
1422 type NoMethod EntityAdWordsLink
1423 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1424 }
1425
1426
1427 type EntityAdWordsLinkEntity struct {
1428 WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
1429
1430
1431
1432
1433
1434 ForceSendFields []string `json:"-"`
1435
1436
1437
1438
1439 NullFields []string `json:"-"`
1440 }
1441
1442 func (s *EntityAdWordsLinkEntity) MarshalJSON() ([]byte, error) {
1443 type NoMethod EntityAdWordsLinkEntity
1444 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1445 }
1446
1447
1448
1449
1450 type EntityAdWordsLinks struct {
1451
1452 Items []*EntityAdWordsLink `json:"items,omitempty"`
1453
1454
1455
1456
1457 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1458
1459 Kind string `json:"kind,omitempty"`
1460
1461 NextLink string `json:"nextLink,omitempty"`
1462
1463 PreviousLink string `json:"previousLink,omitempty"`
1464
1465
1466 StartIndex int64 `json:"startIndex,omitempty"`
1467
1468
1469 TotalResults int64 `json:"totalResults,omitempty"`
1470
1471
1472 googleapi.ServerResponse `json:"-"`
1473
1474
1475
1476
1477
1478 ForceSendFields []string `json:"-"`
1479
1480
1481
1482
1483 NullFields []string `json:"-"`
1484 }
1485
1486 func (s *EntityAdWordsLinks) MarshalJSON() ([]byte, error) {
1487 type NoMethod EntityAdWordsLinks
1488 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1489 }
1490
1491
1492
1493 type EntityUserLink struct {
1494
1495
1496 Entity *EntityUserLinkEntity `json:"entity,omitempty"`
1497
1498 Id string `json:"id,omitempty"`
1499
1500 Kind string `json:"kind,omitempty"`
1501
1502 Permissions *EntityUserLinkPermissions `json:"permissions,omitempty"`
1503
1504 SelfLink string `json:"selfLink,omitempty"`
1505
1506 UserRef *UserRef `json:"userRef,omitempty"`
1507
1508
1509 googleapi.ServerResponse `json:"-"`
1510
1511
1512
1513
1514
1515 ForceSendFields []string `json:"-"`
1516
1517
1518
1519
1520 NullFields []string `json:"-"`
1521 }
1522
1523 func (s *EntityUserLink) MarshalJSON() ([]byte, error) {
1524 type NoMethod EntityUserLink
1525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1526 }
1527
1528
1529
1530 type EntityUserLinkEntity struct {
1531
1532 AccountRef *AccountRef `json:"accountRef,omitempty"`
1533
1534 ProfileRef *ProfileRef `json:"profileRef,omitempty"`
1535
1536 WebPropertyRef *WebPropertyRef `json:"webPropertyRef,omitempty"`
1537
1538
1539
1540
1541
1542 ForceSendFields []string `json:"-"`
1543
1544
1545
1546
1547 NullFields []string `json:"-"`
1548 }
1549
1550 func (s *EntityUserLinkEntity) MarshalJSON() ([]byte, error) {
1551 type NoMethod EntityUserLinkEntity
1552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1553 }
1554
1555
1556 type EntityUserLinkPermissions struct {
1557
1558
1559
1560
1561 Effective []string `json:"effective,omitempty"`
1562
1563
1564
1565 Local []string `json:"local,omitempty"`
1566
1567
1568
1569
1570
1571 ForceSendFields []string `json:"-"`
1572
1573
1574
1575
1576 NullFields []string `json:"-"`
1577 }
1578
1579 func (s *EntityUserLinkPermissions) MarshalJSON() ([]byte, error) {
1580 type NoMethod EntityUserLinkPermissions
1581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1582 }
1583
1584
1585
1586 type EntityUserLinks struct {
1587
1588 Items []*EntityUserLink `json:"items,omitempty"`
1589
1590
1591
1592
1593 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1594
1595 Kind string `json:"kind,omitempty"`
1596
1597 NextLink string `json:"nextLink,omitempty"`
1598
1599 PreviousLink string `json:"previousLink,omitempty"`
1600
1601
1602 StartIndex int64 `json:"startIndex,omitempty"`
1603
1604
1605 TotalResults int64 `json:"totalResults,omitempty"`
1606
1607
1608 googleapi.ServerResponse `json:"-"`
1609
1610
1611
1612
1613
1614 ForceSendFields []string `json:"-"`
1615
1616
1617
1618
1619 NullFields []string `json:"-"`
1620 }
1621
1622 func (s *EntityUserLinks) MarshalJSON() ([]byte, error) {
1623 type NoMethod EntityUserLinks
1624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1625 }
1626
1627
1628 type Experiment struct {
1629
1630
1631 AccountId string `json:"accountId,omitempty"`
1632
1633 Created string `json:"created,omitempty"`
1634
1635 Description string `json:"description,omitempty"`
1636
1637
1638 EditableInGaUi bool `json:"editableInGaUi,omitempty"`
1639
1640
1641
1642 EndTime string `json:"endTime,omitempty"`
1643
1644
1645
1646
1647
1648 EqualWeighting bool `json:"equalWeighting,omitempty"`
1649
1650 Id string `json:"id,omitempty"`
1651
1652
1653 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
1654
1655 Kind string `json:"kind,omitempty"`
1656
1657
1658
1659 MinimumExperimentLengthInDays int64 `json:"minimumExperimentLengthInDays,omitempty"`
1660
1661
1662 Name string `json:"name,omitempty"`
1663
1664
1665
1666
1667
1668 ObjectiveMetric string `json:"objectiveMetric,omitempty"`
1669
1670
1671
1672
1673 OptimizationType string `json:"optimizationType,omitempty"`
1674
1675
1676 ParentLink *ExperimentParentLink `json:"parentLink,omitempty"`
1677
1678
1679 ProfileId string `json:"profileId,omitempty"`
1680
1681
1682
1683
1684
1685
1686 ReasonExperimentEnded string `json:"reasonExperimentEnded,omitempty"`
1687
1688
1689
1690 RewriteVariationUrlsAsOriginal bool `json:"rewriteVariationUrlsAsOriginal,omitempty"`
1691
1692 SelfLink string `json:"selfLink,omitempty"`
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703 ServingFramework string `json:"servingFramework,omitempty"`
1704
1705
1706 Snippet string `json:"snippet,omitempty"`
1707
1708
1709
1710 StartTime string `json:"startTime,omitempty"`
1711
1712
1713
1714
1715 Status string `json:"status,omitempty"`
1716
1717
1718
1719
1720 TrafficCoverage float64 `json:"trafficCoverage,omitempty"`
1721
1722 Updated string `json:"updated,omitempty"`
1723
1724
1725
1726
1727 Variations []*ExperimentVariations `json:"variations,omitempty"`
1728
1729
1730 WebPropertyId string `json:"webPropertyId,omitempty"`
1731
1732
1733
1734 WinnerConfidenceLevel float64 `json:"winnerConfidenceLevel,omitempty"`
1735
1736
1737 WinnerFound bool `json:"winnerFound,omitempty"`
1738
1739
1740 googleapi.ServerResponse `json:"-"`
1741
1742
1743
1744
1745
1746 ForceSendFields []string `json:"-"`
1747
1748
1749
1750
1751 NullFields []string `json:"-"`
1752 }
1753
1754 func (s *Experiment) MarshalJSON() ([]byte, error) {
1755 type NoMethod Experiment
1756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1757 }
1758
1759 func (s *Experiment) UnmarshalJSON(data []byte) error {
1760 type NoMethod Experiment
1761 var s1 struct {
1762 TrafficCoverage gensupport.JSONFloat64 `json:"trafficCoverage"`
1763 WinnerConfidenceLevel gensupport.JSONFloat64 `json:"winnerConfidenceLevel"`
1764 *NoMethod
1765 }
1766 s1.NoMethod = (*NoMethod)(s)
1767 if err := json.Unmarshal(data, &s1); err != nil {
1768 return err
1769 }
1770 s.TrafficCoverage = float64(s1.TrafficCoverage)
1771 s.WinnerConfidenceLevel = float64(s1.WinnerConfidenceLevel)
1772 return nil
1773 }
1774
1775
1776
1777 type ExperimentParentLink struct {
1778
1779
1780 Href string `json:"href,omitempty"`
1781
1782 Type string `json:"type,omitempty"`
1783
1784
1785
1786
1787
1788 ForceSendFields []string `json:"-"`
1789
1790
1791
1792
1793 NullFields []string `json:"-"`
1794 }
1795
1796 func (s *ExperimentParentLink) MarshalJSON() ([]byte, error) {
1797 type NoMethod ExperimentParentLink
1798 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1799 }
1800
1801 type ExperimentVariations struct {
1802
1803
1804
1805 Name string `json:"name,omitempty"`
1806
1807
1808
1809 Status string `json:"status,omitempty"`
1810
1811
1812 Url string `json:"url,omitempty"`
1813
1814
1815 Weight float64 `json:"weight,omitempty"`
1816
1817
1818
1819 Won bool `json:"won,omitempty"`
1820
1821
1822
1823
1824
1825 ForceSendFields []string `json:"-"`
1826
1827
1828
1829
1830 NullFields []string `json:"-"`
1831 }
1832
1833 func (s *ExperimentVariations) MarshalJSON() ([]byte, error) {
1834 type NoMethod ExperimentVariations
1835 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1836 }
1837
1838 func (s *ExperimentVariations) UnmarshalJSON(data []byte) error {
1839 type NoMethod ExperimentVariations
1840 var s1 struct {
1841 Weight gensupport.JSONFloat64 `json:"weight"`
1842 *NoMethod
1843 }
1844 s1.NoMethod = (*NoMethod)(s)
1845 if err := json.Unmarshal(data, &s1); err != nil {
1846 return err
1847 }
1848 s.Weight = float64(s1.Weight)
1849 return nil
1850 }
1851
1852
1853
1854
1855
1856 type Experiments struct {
1857
1858 Items []*Experiment `json:"items,omitempty"`
1859
1860
1861
1862
1863 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
1864
1865 Kind string `json:"kind,omitempty"`
1866
1867 NextLink string `json:"nextLink,omitempty"`
1868
1869 PreviousLink string `json:"previousLink,omitempty"`
1870
1871
1872 StartIndex int64 `json:"startIndex,omitempty"`
1873
1874
1875 TotalResults int64 `json:"totalResults,omitempty"`
1876
1877 Username string `json:"username,omitempty"`
1878
1879
1880 googleapi.ServerResponse `json:"-"`
1881
1882
1883
1884
1885
1886 ForceSendFields []string `json:"-"`
1887
1888
1889
1890
1891 NullFields []string `json:"-"`
1892 }
1893
1894 func (s *Experiments) MarshalJSON() ([]byte, error) {
1895 type NoMethod Experiments
1896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1897 }
1898
1899
1900 type Filter struct {
1901
1902 AccountId string `json:"accountId,omitempty"`
1903
1904 AdvancedDetails *FilterAdvancedDetails `json:"advancedDetails,omitempty"`
1905
1906 Created string `json:"created,omitempty"`
1907
1908 ExcludeDetails *FilterExpression `json:"excludeDetails,omitempty"`
1909
1910 Id string `json:"id,omitempty"`
1911
1912 IncludeDetails *FilterExpression `json:"includeDetails,omitempty"`
1913
1914 Kind string `json:"kind,omitempty"`
1915
1916 LowercaseDetails *FilterLowercaseDetails `json:"lowercaseDetails,omitempty"`
1917
1918 Name string `json:"name,omitempty"`
1919
1920
1921 ParentLink *FilterParentLink `json:"parentLink,omitempty"`
1922
1923
1924 SearchAndReplaceDetails *FilterSearchAndReplaceDetails `json:"searchAndReplaceDetails,omitempty"`
1925
1926 SelfLink string `json:"selfLink,omitempty"`
1927
1928
1929 Type string `json:"type,omitempty"`
1930
1931 Updated string `json:"updated,omitempty"`
1932
1933 UppercaseDetails *FilterUppercaseDetails `json:"uppercaseDetails,omitempty"`
1934
1935
1936 googleapi.ServerResponse `json:"-"`
1937
1938
1939
1940
1941
1942 ForceSendFields []string `json:"-"`
1943
1944
1945
1946
1947 NullFields []string `json:"-"`
1948 }
1949
1950 func (s *Filter) MarshalJSON() ([]byte, error) {
1951 type NoMethod Filter
1952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1953 }
1954
1955
1956 type FilterAdvancedDetails struct {
1957
1958 CaseSensitive bool `json:"caseSensitive,omitempty"`
1959
1960 ExtractA string `json:"extractA,omitempty"`
1961
1962 ExtractB string `json:"extractB,omitempty"`
1963
1964 FieldA string `json:"fieldA,omitempty"`
1965
1966
1967 FieldAIndex int64 `json:"fieldAIndex,omitempty"`
1968
1969 FieldARequired bool `json:"fieldARequired,omitempty"`
1970
1971 FieldB string `json:"fieldB,omitempty"`
1972
1973
1974 FieldBIndex int64 `json:"fieldBIndex,omitempty"`
1975
1976 FieldBRequired bool `json:"fieldBRequired,omitempty"`
1977
1978 OutputConstructor string `json:"outputConstructor,omitempty"`
1979
1980 OutputToField string `json:"outputToField,omitempty"`
1981
1982
1983 OutputToFieldIndex int64 `json:"outputToFieldIndex,omitempty"`
1984
1985
1986 OverrideOutputField bool `json:"overrideOutputField,omitempty"`
1987
1988
1989
1990
1991
1992 ForceSendFields []string `json:"-"`
1993
1994
1995
1996
1997 NullFields []string `json:"-"`
1998 }
1999
2000 func (s *FilterAdvancedDetails) MarshalJSON() ([]byte, error) {
2001 type NoMethod FilterAdvancedDetails
2002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2003 }
2004
2005
2006 type FilterLowercaseDetails struct {
2007
2008 Field string `json:"field,omitempty"`
2009
2010
2011 FieldIndex int64 `json:"fieldIndex,omitempty"`
2012
2013
2014
2015
2016
2017 ForceSendFields []string `json:"-"`
2018
2019
2020
2021
2022 NullFields []string `json:"-"`
2023 }
2024
2025 func (s *FilterLowercaseDetails) MarshalJSON() ([]byte, error) {
2026 type NoMethod FilterLowercaseDetails
2027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2028 }
2029
2030
2031
2032 type FilterParentLink struct {
2033
2034 Href string `json:"href,omitempty"`
2035
2036 Type string `json:"type,omitempty"`
2037
2038
2039
2040
2041
2042 ForceSendFields []string `json:"-"`
2043
2044
2045
2046
2047 NullFields []string `json:"-"`
2048 }
2049
2050 func (s *FilterParentLink) MarshalJSON() ([]byte, error) {
2051 type NoMethod FilterParentLink
2052 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2053 }
2054
2055
2056
2057 type FilterSearchAndReplaceDetails struct {
2058
2059 CaseSensitive bool `json:"caseSensitive,omitempty"`
2060
2061 Field string `json:"field,omitempty"`
2062
2063
2064 FieldIndex int64 `json:"fieldIndex,omitempty"`
2065
2066 ReplaceString string `json:"replaceString,omitempty"`
2067
2068 SearchString string `json:"searchString,omitempty"`
2069
2070
2071
2072
2073
2074 ForceSendFields []string `json:"-"`
2075
2076
2077
2078
2079 NullFields []string `json:"-"`
2080 }
2081
2082 func (s *FilterSearchAndReplaceDetails) MarshalJSON() ([]byte, error) {
2083 type NoMethod FilterSearchAndReplaceDetails
2084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2085 }
2086
2087
2088 type FilterUppercaseDetails struct {
2089
2090 Field string `json:"field,omitempty"`
2091
2092
2093 FieldIndex int64 `json:"fieldIndex,omitempty"`
2094
2095
2096
2097
2098
2099 ForceSendFields []string `json:"-"`
2100
2101
2102
2103
2104 NullFields []string `json:"-"`
2105 }
2106
2107 func (s *FilterUppercaseDetails) MarshalJSON() ([]byte, error) {
2108 type NoMethod FilterUppercaseDetails
2109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2110 }
2111
2112
2113 type FilterExpression struct {
2114
2115 CaseSensitive bool `json:"caseSensitive,omitempty"`
2116
2117 ExpressionValue string `json:"expressionValue,omitempty"`
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
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
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205 Field string `json:"field,omitempty"`
2206
2207
2208 FieldIndex int64 `json:"fieldIndex,omitempty"`
2209
2210 Kind string `json:"kind,omitempty"`
2211
2212
2213
2214
2215 MatchType string `json:"matchType,omitempty"`
2216
2217
2218
2219
2220
2221 ForceSendFields []string `json:"-"`
2222
2223
2224
2225
2226 NullFields []string `json:"-"`
2227 }
2228
2229 func (s *FilterExpression) MarshalJSON() ([]byte, error) {
2230 type NoMethod FilterExpression
2231 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2232 }
2233
2234
2235 type FilterRef struct {
2236
2237 AccountId string `json:"accountId,omitempty"`
2238
2239 Href string `json:"href,omitempty"`
2240
2241 Id string `json:"id,omitempty"`
2242
2243 Kind string `json:"kind,omitempty"`
2244
2245 Name string `json:"name,omitempty"`
2246
2247
2248
2249
2250
2251 ForceSendFields []string `json:"-"`
2252
2253
2254
2255
2256 NullFields []string `json:"-"`
2257 }
2258
2259 func (s *FilterRef) MarshalJSON() ([]byte, error) {
2260 type NoMethod FilterRef
2261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2262 }
2263
2264
2265
2266 type Filters struct {
2267
2268 Items []*Filter `json:"items,omitempty"`
2269
2270
2271
2272
2273 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2274
2275 Kind string `json:"kind,omitempty"`
2276
2277 NextLink string `json:"nextLink,omitempty"`
2278
2279 PreviousLink string `json:"previousLink,omitempty"`
2280
2281
2282 StartIndex int64 `json:"startIndex,omitempty"`
2283
2284
2285 TotalResults int64 `json:"totalResults,omitempty"`
2286
2287 Username string `json:"username,omitempty"`
2288
2289
2290 googleapi.ServerResponse `json:"-"`
2291
2292
2293
2294
2295
2296 ForceSendFields []string `json:"-"`
2297
2298
2299
2300
2301 NullFields []string `json:"-"`
2302 }
2303
2304 func (s *Filters) MarshalJSON() ([]byte, error) {
2305 type NoMethod Filters
2306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2307 }
2308
2309
2310 type GaData struct {
2311
2312
2313
2314 ColumnHeaders []*GaDataColumnHeaders `json:"columnHeaders,omitempty"`
2315
2316 ContainsSampledData bool `json:"containsSampledData,omitempty"`
2317
2318 DataLastRefreshed int64 `json:"dataLastRefreshed,omitempty,string"`
2319 DataTable *GaDataDataTable `json:"dataTable,omitempty"`
2320
2321 Id string `json:"id,omitempty"`
2322
2323
2324
2325
2326 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2327
2328 Kind string `json:"kind,omitempty"`
2329
2330 NextLink string `json:"nextLink,omitempty"`
2331
2332 PreviousLink string `json:"previousLink,omitempty"`
2333
2334
2335 ProfileInfo *GaDataProfileInfo `json:"profileInfo,omitempty"`
2336
2337 Query *GaDataQuery `json:"query,omitempty"`
2338
2339
2340
2341 Rows [][]string `json:"rows,omitempty"`
2342
2343 SampleSize int64 `json:"sampleSize,omitempty,string"`
2344
2345
2346 SampleSpace int64 `json:"sampleSpace,omitempty,string"`
2347
2348 SelfLink string `json:"selfLink,omitempty"`
2349
2350
2351 TotalResults int64 `json:"totalResults,omitempty"`
2352
2353
2354
2355 TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
2356
2357
2358 googleapi.ServerResponse `json:"-"`
2359
2360
2361
2362
2363
2364 ForceSendFields []string `json:"-"`
2365
2366
2367
2368
2369 NullFields []string `json:"-"`
2370 }
2371
2372 func (s *GaData) MarshalJSON() ([]byte, error) {
2373 type NoMethod GaData
2374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2375 }
2376
2377 type GaDataColumnHeaders struct {
2378
2379 ColumnType string `json:"columnType,omitempty"`
2380
2381
2382
2383 DataType string `json:"dataType,omitempty"`
2384
2385 Name string `json:"name,omitempty"`
2386
2387
2388
2389
2390
2391 ForceSendFields []string `json:"-"`
2392
2393
2394
2395
2396 NullFields []string `json:"-"`
2397 }
2398
2399 func (s *GaDataColumnHeaders) MarshalJSON() ([]byte, error) {
2400 type NoMethod GaDataColumnHeaders
2401 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2402 }
2403
2404 type GaDataDataTable struct {
2405 Cols []*GaDataDataTableCols `json:"cols,omitempty"`
2406 Rows []*GaDataDataTableRows `json:"rows,omitempty"`
2407
2408
2409
2410
2411
2412 ForceSendFields []string `json:"-"`
2413
2414
2415
2416
2417 NullFields []string `json:"-"`
2418 }
2419
2420 func (s *GaDataDataTable) MarshalJSON() ([]byte, error) {
2421 type NoMethod GaDataDataTable
2422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2423 }
2424
2425 type GaDataDataTableCols struct {
2426 Id string `json:"id,omitempty"`
2427 Label string `json:"label,omitempty"`
2428 Type string `json:"type,omitempty"`
2429
2430
2431
2432
2433
2434 ForceSendFields []string `json:"-"`
2435
2436
2437
2438
2439 NullFields []string `json:"-"`
2440 }
2441
2442 func (s *GaDataDataTableCols) MarshalJSON() ([]byte, error) {
2443 type NoMethod GaDataDataTableCols
2444 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2445 }
2446
2447 type GaDataDataTableRows struct {
2448 C []*GaDataDataTableRowsC `json:"c,omitempty"`
2449
2450
2451
2452
2453
2454 ForceSendFields []string `json:"-"`
2455
2456
2457
2458
2459 NullFields []string `json:"-"`
2460 }
2461
2462 func (s *GaDataDataTableRows) MarshalJSON() ([]byte, error) {
2463 type NoMethod GaDataDataTableRows
2464 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2465 }
2466
2467 type GaDataDataTableRowsC struct {
2468 V string `json:"v,omitempty"`
2469
2470
2471
2472
2473
2474 ForceSendFields []string `json:"-"`
2475
2476
2477
2478
2479 NullFields []string `json:"-"`
2480 }
2481
2482 func (s *GaDataDataTableRowsC) MarshalJSON() ([]byte, error) {
2483 type NoMethod GaDataDataTableRowsC
2484 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2485 }
2486
2487
2488
2489 type GaDataProfileInfo struct {
2490
2491 AccountId string `json:"accountId,omitempty"`
2492
2493
2494 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
2495
2496 ProfileId string `json:"profileId,omitempty"`
2497
2498 ProfileName string `json:"profileName,omitempty"`
2499
2500 TableId string `json:"tableId,omitempty"`
2501
2502 WebPropertyId string `json:"webPropertyId,omitempty"`
2503
2504
2505
2506
2507
2508 ForceSendFields []string `json:"-"`
2509
2510
2511
2512
2513 NullFields []string `json:"-"`
2514 }
2515
2516 func (s *GaDataProfileInfo) MarshalJSON() ([]byte, error) {
2517 type NoMethod GaDataProfileInfo
2518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2519 }
2520
2521
2522 type GaDataQuery struct {
2523
2524 Dimensions string `json:"dimensions,omitempty"`
2525
2526 EndDate string `json:"end-date,omitempty"`
2527
2528 Filters string `json:"filters,omitempty"`
2529
2530 Ids string `json:"ids,omitempty"`
2531
2532 MaxResults int64 `json:"max-results,omitempty"`
2533
2534 Metrics []string `json:"metrics,omitempty"`
2535
2536 SamplingLevel string `json:"samplingLevel,omitempty"`
2537
2538 Segment string `json:"segment,omitempty"`
2539
2540 Sort []string `json:"sort,omitempty"`
2541
2542 StartDate string `json:"start-date,omitempty"`
2543
2544 StartIndex int64 `json:"start-index,omitempty"`
2545
2546
2547
2548
2549
2550 ForceSendFields []string `json:"-"`
2551
2552
2553
2554
2555 NullFields []string `json:"-"`
2556 }
2557
2558 func (s *GaDataQuery) MarshalJSON() ([]byte, error) {
2559 type NoMethod GaDataQuery
2560 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2561 }
2562
2563
2564 type Goal struct {
2565
2566 AccountId string `json:"accountId,omitempty"`
2567
2568 Active bool `json:"active,omitempty"`
2569
2570 Created string `json:"created,omitempty"`
2571
2572 EventDetails *GoalEventDetails `json:"eventDetails,omitempty"`
2573
2574 Id string `json:"id,omitempty"`
2575
2576
2577 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
2578
2579 Kind string `json:"kind,omitempty"`
2580
2581 Name string `json:"name,omitempty"`
2582
2583
2584 ParentLink *GoalParentLink `json:"parentLink,omitempty"`
2585
2586 ProfileId string `json:"profileId,omitempty"`
2587
2588 SelfLink string `json:"selfLink,omitempty"`
2589
2590
2591 Type string `json:"type,omitempty"`
2592
2593 Updated string `json:"updated,omitempty"`
2594
2595 UrlDestinationDetails *GoalUrlDestinationDetails `json:"urlDestinationDetails,omitempty"`
2596
2597 Value float64 `json:"value,omitempty"`
2598
2599 VisitNumPagesDetails *GoalVisitNumPagesDetails `json:"visitNumPagesDetails,omitempty"`
2600
2601 VisitTimeOnSiteDetails *GoalVisitTimeOnSiteDetails `json:"visitTimeOnSiteDetails,omitempty"`
2602
2603
2604 WebPropertyId string `json:"webPropertyId,omitempty"`
2605
2606
2607 googleapi.ServerResponse `json:"-"`
2608
2609
2610
2611
2612
2613 ForceSendFields []string `json:"-"`
2614
2615
2616
2617
2618 NullFields []string `json:"-"`
2619 }
2620
2621 func (s *Goal) MarshalJSON() ([]byte, error) {
2622 type NoMethod Goal
2623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2624 }
2625
2626 func (s *Goal) UnmarshalJSON(data []byte) error {
2627 type NoMethod Goal
2628 var s1 struct {
2629 Value gensupport.JSONFloat64 `json:"value"`
2630 *NoMethod
2631 }
2632 s1.NoMethod = (*NoMethod)(s)
2633 if err := json.Unmarshal(data, &s1); err != nil {
2634 return err
2635 }
2636 s.Value = float64(s1.Value)
2637 return nil
2638 }
2639
2640
2641 type GoalEventDetails struct {
2642
2643 EventConditions []*GoalEventDetailsEventConditions `json:"eventConditions,omitempty"`
2644
2645
2646 UseEventValue bool `json:"useEventValue,omitempty"`
2647
2648
2649
2650
2651
2652 ForceSendFields []string `json:"-"`
2653
2654
2655
2656
2657 NullFields []string `json:"-"`
2658 }
2659
2660 func (s *GoalEventDetails) MarshalJSON() ([]byte, error) {
2661 type NoMethod GoalEventDetails
2662 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2663 }
2664
2665 type GoalEventDetailsEventConditions struct {
2666
2667
2668 ComparisonType string `json:"comparisonType,omitempty"`
2669
2670 ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
2671
2672 Expression string `json:"expression,omitempty"`
2673
2674
2675 MatchType string `json:"matchType,omitempty"`
2676
2677
2678 Type string `json:"type,omitempty"`
2679
2680
2681
2682
2683
2684 ForceSendFields []string `json:"-"`
2685
2686
2687
2688
2689 NullFields []string `json:"-"`
2690 }
2691
2692 func (s *GoalEventDetailsEventConditions) MarshalJSON() ([]byte, error) {
2693 type NoMethod GoalEventDetailsEventConditions
2694 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2695 }
2696
2697
2698
2699 type GoalParentLink struct {
2700
2701 Href string `json:"href,omitempty"`
2702
2703 Type string `json:"type,omitempty"`
2704
2705
2706
2707
2708
2709 ForceSendFields []string `json:"-"`
2710
2711
2712
2713
2714 NullFields []string `json:"-"`
2715 }
2716
2717 func (s *GoalParentLink) MarshalJSON() ([]byte, error) {
2718 type NoMethod GoalParentLink
2719 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2720 }
2721
2722
2723 type GoalUrlDestinationDetails struct {
2724
2725
2726 CaseSensitive bool `json:"caseSensitive,omitempty"`
2727
2728 FirstStepRequired bool `json:"firstStepRequired,omitempty"`
2729
2730
2731 MatchType string `json:"matchType,omitempty"`
2732
2733 Steps []*GoalUrlDestinationDetailsSteps `json:"steps,omitempty"`
2734
2735 Url string `json:"url,omitempty"`
2736
2737
2738
2739
2740
2741 ForceSendFields []string `json:"-"`
2742
2743
2744
2745
2746 NullFields []string `json:"-"`
2747 }
2748
2749 func (s *GoalUrlDestinationDetails) MarshalJSON() ([]byte, error) {
2750 type NoMethod GoalUrlDestinationDetails
2751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2752 }
2753
2754 type GoalUrlDestinationDetailsSteps struct {
2755
2756 Name string `json:"name,omitempty"`
2757
2758 Number int64 `json:"number,omitempty"`
2759
2760 Url string `json:"url,omitempty"`
2761
2762
2763
2764
2765
2766 ForceSendFields []string `json:"-"`
2767
2768
2769
2770
2771 NullFields []string `json:"-"`
2772 }
2773
2774 func (s *GoalUrlDestinationDetailsSteps) MarshalJSON() ([]byte, error) {
2775 type NoMethod GoalUrlDestinationDetailsSteps
2776 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2777 }
2778
2779
2780 type GoalVisitNumPagesDetails struct {
2781
2782
2783 ComparisonType string `json:"comparisonType,omitempty"`
2784
2785 ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
2786
2787
2788
2789
2790
2791 ForceSendFields []string `json:"-"`
2792
2793
2794
2795
2796 NullFields []string `json:"-"`
2797 }
2798
2799 func (s *GoalVisitNumPagesDetails) MarshalJSON() ([]byte, error) {
2800 type NoMethod GoalVisitNumPagesDetails
2801 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2802 }
2803
2804
2805
2806 type GoalVisitTimeOnSiteDetails struct {
2807
2808
2809 ComparisonType string `json:"comparisonType,omitempty"`
2810
2811 ComparisonValue int64 `json:"comparisonValue,omitempty,string"`
2812
2813
2814
2815
2816
2817 ForceSendFields []string `json:"-"`
2818
2819
2820
2821
2822 NullFields []string `json:"-"`
2823 }
2824
2825 func (s *GoalVisitTimeOnSiteDetails) MarshalJSON() ([]byte, error) {
2826 type NoMethod GoalVisitTimeOnSiteDetails
2827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2828 }
2829
2830
2831
2832
2833 type Goals struct {
2834
2835 Items []*Goal `json:"items,omitempty"`
2836
2837
2838
2839
2840 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
2841
2842 Kind string `json:"kind,omitempty"`
2843
2844 NextLink string `json:"nextLink,omitempty"`
2845
2846 PreviousLink string `json:"previousLink,omitempty"`
2847
2848
2849 StartIndex int64 `json:"startIndex,omitempty"`
2850
2851
2852 TotalResults int64 `json:"totalResults,omitempty"`
2853
2854 Username string `json:"username,omitempty"`
2855
2856
2857 googleapi.ServerResponse `json:"-"`
2858
2859
2860
2861
2862
2863 ForceSendFields []string `json:"-"`
2864
2865
2866
2867
2868 NullFields []string `json:"-"`
2869 }
2870
2871 func (s *Goals) MarshalJSON() ([]byte, error) {
2872 type NoMethod Goals
2873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2874 }
2875
2876
2877 type HashClientIdRequest struct {
2878 ClientId string `json:"clientId,omitempty"`
2879 Kind string `json:"kind,omitempty"`
2880 WebPropertyId string `json:"webPropertyId,omitempty"`
2881
2882
2883
2884
2885
2886 ForceSendFields []string `json:"-"`
2887
2888
2889
2890
2891 NullFields []string `json:"-"`
2892 }
2893
2894 func (s *HashClientIdRequest) MarshalJSON() ([]byte, error) {
2895 type NoMethod HashClientIdRequest
2896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2897 }
2898
2899
2900 type HashClientIdResponse struct {
2901 ClientId string `json:"clientId,omitempty"`
2902 HashedClientId string `json:"hashedClientId,omitempty"`
2903 Kind string `json:"kind,omitempty"`
2904 WebPropertyId string `json:"webPropertyId,omitempty"`
2905
2906
2907 googleapi.ServerResponse `json:"-"`
2908
2909
2910
2911
2912
2913 ForceSendFields []string `json:"-"`
2914
2915
2916
2917
2918 NullFields []string `json:"-"`
2919 }
2920
2921 func (s *HashClientIdResponse) MarshalJSON() ([]byte, error) {
2922 type NoMethod HashClientIdResponse
2923 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2924 }
2925
2926
2927
2928 type IncludeConditions struct {
2929
2930
2931
2932
2933
2934
2935 DaysToLookBack int64 `json:"daysToLookBack,omitempty"`
2936
2937
2938 IsSmartList bool `json:"isSmartList,omitempty"`
2939
2940 Kind string `json:"kind,omitempty"`
2941
2942
2943 MembershipDurationDays int64 `json:"membershipDurationDays,omitempty"`
2944
2945
2946 Segment string `json:"segment,omitempty"`
2947
2948
2949
2950
2951
2952 ForceSendFields []string `json:"-"`
2953
2954
2955
2956
2957 NullFields []string `json:"-"`
2958 }
2959
2960 func (s *IncludeConditions) MarshalJSON() ([]byte, error) {
2961 type NoMethod IncludeConditions
2962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2963 }
2964
2965
2966
2967 type LinkedForeignAccount struct {
2968
2969 AccountId string `json:"accountId,omitempty"`
2970
2971 EligibleForSearch bool `json:"eligibleForSearch,omitempty"`
2972
2973 Id string `json:"id,omitempty"`
2974
2975
2976 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
2977
2978 Kind string `json:"kind,omitempty"`
2979
2980
2981 LinkedAccountId string `json:"linkedAccountId,omitempty"`
2982
2983
2984 RemarketingAudienceId string `json:"remarketingAudienceId,omitempty"`
2985
2986 Status string `json:"status,omitempty"`
2987
2988
2989 Type string `json:"type,omitempty"`
2990
2991
2992 WebPropertyId string `json:"webPropertyId,omitempty"`
2993
2994
2995
2996
2997
2998 ForceSendFields []string `json:"-"`
2999
3000
3001
3002
3003 NullFields []string `json:"-"`
3004 }
3005
3006 func (s *LinkedForeignAccount) MarshalJSON() ([]byte, error) {
3007 type NoMethod LinkedForeignAccount
3008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3009 }
3010
3011
3012 type McfData struct {
3013
3014
3015
3016 ColumnHeaders []*McfDataColumnHeaders `json:"columnHeaders,omitempty"`
3017
3018 ContainsSampledData bool `json:"containsSampledData,omitempty"`
3019
3020 Id string `json:"id,omitempty"`
3021
3022
3023
3024
3025 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3026
3027 Kind string `json:"kind,omitempty"`
3028
3029 NextLink string `json:"nextLink,omitempty"`
3030
3031 PreviousLink string `json:"previousLink,omitempty"`
3032
3033
3034 ProfileInfo *McfDataProfileInfo `json:"profileInfo,omitempty"`
3035
3036 Query *McfDataQuery `json:"query,omitempty"`
3037
3038
3039
3040 Rows [][]*McfDataRowsItem `json:"rows,omitempty"`
3041
3042 SampleSize int64 `json:"sampleSize,omitempty,string"`
3043
3044
3045 SampleSpace int64 `json:"sampleSpace,omitempty,string"`
3046
3047 SelfLink string `json:"selfLink,omitempty"`
3048
3049
3050 TotalResults int64 `json:"totalResults,omitempty"`
3051
3052
3053
3054 TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
3055
3056
3057 googleapi.ServerResponse `json:"-"`
3058
3059
3060
3061
3062
3063 ForceSendFields []string `json:"-"`
3064
3065
3066
3067
3068 NullFields []string `json:"-"`
3069 }
3070
3071 func (s *McfData) MarshalJSON() ([]byte, error) {
3072 type NoMethod McfData
3073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3074 }
3075
3076 type McfDataColumnHeaders struct {
3077
3078 ColumnType string `json:"columnType,omitempty"`
3079
3080
3081 DataType string `json:"dataType,omitempty"`
3082
3083 Name string `json:"name,omitempty"`
3084
3085
3086
3087
3088
3089 ForceSendFields []string `json:"-"`
3090
3091
3092
3093
3094 NullFields []string `json:"-"`
3095 }
3096
3097 func (s *McfDataColumnHeaders) MarshalJSON() ([]byte, error) {
3098 type NoMethod McfDataColumnHeaders
3099 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3100 }
3101
3102
3103
3104 type McfDataProfileInfo struct {
3105
3106 AccountId string `json:"accountId,omitempty"`
3107
3108
3109 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3110
3111 ProfileId string `json:"profileId,omitempty"`
3112
3113 ProfileName string `json:"profileName,omitempty"`
3114
3115 TableId string `json:"tableId,omitempty"`
3116
3117 WebPropertyId string `json:"webPropertyId,omitempty"`
3118
3119
3120
3121
3122
3123 ForceSendFields []string `json:"-"`
3124
3125
3126
3127
3128 NullFields []string `json:"-"`
3129 }
3130
3131 func (s *McfDataProfileInfo) MarshalJSON() ([]byte, error) {
3132 type NoMethod McfDataProfileInfo
3133 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3134 }
3135
3136
3137 type McfDataQuery struct {
3138
3139 Dimensions string `json:"dimensions,omitempty"`
3140
3141 EndDate string `json:"end-date,omitempty"`
3142
3143 Filters string `json:"filters,omitempty"`
3144
3145 Ids string `json:"ids,omitempty"`
3146
3147 MaxResults int64 `json:"max-results,omitempty"`
3148
3149 Metrics []string `json:"metrics,omitempty"`
3150
3151 SamplingLevel string `json:"samplingLevel,omitempty"`
3152
3153 Segment string `json:"segment,omitempty"`
3154
3155 Sort []string `json:"sort,omitempty"`
3156
3157 StartDate string `json:"start-date,omitempty"`
3158
3159 StartIndex int64 `json:"start-index,omitempty"`
3160
3161
3162
3163
3164
3165 ForceSendFields []string `json:"-"`
3166
3167
3168
3169
3170 NullFields []string `json:"-"`
3171 }
3172
3173 func (s *McfDataQuery) MarshalJSON() ([]byte, error) {
3174 type NoMethod McfDataQuery
3175 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3176 }
3177
3178
3179
3180
3181 type McfDataRowsItem struct {
3182
3183
3184 ConversionPathValue []*McfDataRowsItemConversionPathValue `json:"conversionPathValue,omitempty"`
3185
3186 PrimitiveValue string `json:"primitiveValue,omitempty"`
3187
3188
3189
3190
3191
3192 ForceSendFields []string `json:"-"`
3193
3194
3195
3196
3197 NullFields []string `json:"-"`
3198 }
3199
3200 func (s *McfDataRowsItem) MarshalJSON() ([]byte, error) {
3201 type NoMethod McfDataRowsItem
3202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3203 }
3204
3205 type McfDataRowsItemConversionPathValue struct {
3206
3207
3208 InteractionType string `json:"interactionType,omitempty"`
3209
3210
3211 NodeValue string `json:"nodeValue,omitempty"`
3212
3213
3214
3215
3216
3217 ForceSendFields []string `json:"-"`
3218
3219
3220
3221
3222 NullFields []string `json:"-"`
3223 }
3224
3225 func (s *McfDataRowsItemConversionPathValue) MarshalJSON() ([]byte, error) {
3226 type NoMethod McfDataRowsItemConversionPathValue
3227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3228 }
3229
3230
3231 type Profile struct {
3232
3233 AccountId string `json:"accountId,omitempty"`
3234
3235
3236 BotFilteringEnabled bool `json:"botFilteringEnabled,omitempty"`
3237
3238
3239 ChildLink *ProfileChildLink `json:"childLink,omitempty"`
3240
3241 Created string `json:"created,omitempty"`
3242
3243
3244
3245
3246
3247
3248 Currency string `json:"currency,omitempty"`
3249
3250 DefaultPage string `json:"defaultPage,omitempty"`
3251
3252
3253 ECommerceTracking bool `json:"eCommerceTracking,omitempty"`
3254
3255
3256
3257 EnhancedECommerceTracking bool `json:"enhancedECommerceTracking,omitempty"`
3258
3259
3260 ExcludeQueryParameters string `json:"excludeQueryParameters,omitempty"`
3261
3262 Id string `json:"id,omitempty"`
3263
3264
3265 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3266
3267 Kind string `json:"kind,omitempty"`
3268
3269 Name string `json:"name,omitempty"`
3270
3271
3272 ParentLink *ProfileParentLink `json:"parentLink,omitempty"`
3273
3274 Permissions *ProfilePermissions `json:"permissions,omitempty"`
3275
3276 SelfLink string `json:"selfLink,omitempty"`
3277
3278
3279 SiteSearchCategoryParameters string `json:"siteSearchCategoryParameters,omitempty"`
3280
3281
3282 SiteSearchQueryParameters string `json:"siteSearchQueryParameters,omitempty"`
3283
3284 Starred bool `json:"starred,omitempty"`
3285
3286
3287 StripSiteSearchCategoryParameters bool `json:"stripSiteSearchCategoryParameters,omitempty"`
3288
3289
3290 StripSiteSearchQueryParameters bool `json:"stripSiteSearchQueryParameters,omitempty"`
3291
3292
3293 Timezone string `json:"timezone,omitempty"`
3294
3295 Type string `json:"type,omitempty"`
3296
3297 Updated string `json:"updated,omitempty"`
3298
3299
3300 WebPropertyId string `json:"webPropertyId,omitempty"`
3301
3302 WebsiteUrl string `json:"websiteUrl,omitempty"`
3303
3304
3305 googleapi.ServerResponse `json:"-"`
3306
3307
3308
3309
3310
3311 ForceSendFields []string `json:"-"`
3312
3313
3314
3315
3316 NullFields []string `json:"-"`
3317 }
3318
3319 func (s *Profile) MarshalJSON() ([]byte, error) {
3320 type NoMethod Profile
3321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3322 }
3323
3324
3325
3326 type ProfileChildLink struct {
3327
3328 Href string `json:"href,omitempty"`
3329
3330 Type string `json:"type,omitempty"`
3331
3332
3333
3334
3335
3336 ForceSendFields []string `json:"-"`
3337
3338
3339
3340
3341 NullFields []string `json:"-"`
3342 }
3343
3344 func (s *ProfileChildLink) MarshalJSON() ([]byte, error) {
3345 type NoMethod ProfileChildLink
3346 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3347 }
3348
3349
3350
3351 type ProfileParentLink struct {
3352
3353 Href string `json:"href,omitempty"`
3354
3355 Type string `json:"type,omitempty"`
3356
3357
3358
3359
3360
3361 ForceSendFields []string `json:"-"`
3362
3363
3364
3365
3366 NullFields []string `json:"-"`
3367 }
3368
3369 func (s *ProfileParentLink) MarshalJSON() ([]byte, error) {
3370 type NoMethod ProfileParentLink
3371 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3372 }
3373
3374
3375 type ProfilePermissions struct {
3376
3377
3378
3379 Effective []string `json:"effective,omitempty"`
3380
3381
3382
3383
3384
3385 ForceSendFields []string `json:"-"`
3386
3387
3388
3389
3390 NullFields []string `json:"-"`
3391 }
3392
3393 func (s *ProfilePermissions) MarshalJSON() ([]byte, error) {
3394 type NoMethod ProfilePermissions
3395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3396 }
3397
3398
3399 type ProfileFilterLink struct {
3400
3401 FilterRef *FilterRef `json:"filterRef,omitempty"`
3402
3403 Id string `json:"id,omitempty"`
3404
3405 Kind string `json:"kind,omitempty"`
3406
3407 ProfileRef *ProfileRef `json:"profileRef,omitempty"`
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420 Rank int64 `json:"rank,omitempty"`
3421
3422 SelfLink string `json:"selfLink,omitempty"`
3423
3424
3425 googleapi.ServerResponse `json:"-"`
3426
3427
3428
3429
3430
3431 ForceSendFields []string `json:"-"`
3432
3433
3434
3435
3436 NullFields []string `json:"-"`
3437 }
3438
3439 func (s *ProfileFilterLink) MarshalJSON() ([]byte, error) {
3440 type NoMethod ProfileFilterLink
3441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3442 }
3443
3444
3445
3446
3447 type ProfileFilterLinks struct {
3448
3449 Items []*ProfileFilterLink `json:"items,omitempty"`
3450
3451
3452
3453
3454 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3455
3456 Kind string `json:"kind,omitempty"`
3457
3458 NextLink string `json:"nextLink,omitempty"`
3459
3460 PreviousLink string `json:"previousLink,omitempty"`
3461
3462
3463 StartIndex int64 `json:"startIndex,omitempty"`
3464
3465
3466 TotalResults int64 `json:"totalResults,omitempty"`
3467
3468 Username string `json:"username,omitempty"`
3469
3470
3471 googleapi.ServerResponse `json:"-"`
3472
3473
3474
3475
3476
3477 ForceSendFields []string `json:"-"`
3478
3479
3480
3481
3482 NullFields []string `json:"-"`
3483 }
3484
3485 func (s *ProfileFilterLinks) MarshalJSON() ([]byte, error) {
3486 type NoMethod ProfileFilterLinks
3487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3488 }
3489
3490
3491 type ProfileRef struct {
3492
3493 AccountId string `json:"accountId,omitempty"`
3494
3495 Href string `json:"href,omitempty"`
3496
3497 Id string `json:"id,omitempty"`
3498
3499
3500 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3501
3502 Kind string `json:"kind,omitempty"`
3503
3504 Name string `json:"name,omitempty"`
3505
3506
3507 WebPropertyId string `json:"webPropertyId,omitempty"`
3508
3509
3510
3511
3512
3513 ForceSendFields []string `json:"-"`
3514
3515
3516
3517
3518 NullFields []string `json:"-"`
3519 }
3520
3521 func (s *ProfileRef) MarshalJSON() ([]byte, error) {
3522 type NoMethod ProfileRef
3523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3524 }
3525
3526
3527
3528 type ProfileSummary struct {
3529
3530 Id string `json:"id,omitempty"`
3531
3532 Kind string `json:"kind,omitempty"`
3533
3534 Name string `json:"name,omitempty"`
3535
3536 Starred bool `json:"starred,omitempty"`
3537
3538 Type string `json:"type,omitempty"`
3539
3540
3541
3542
3543
3544 ForceSendFields []string `json:"-"`
3545
3546
3547
3548
3549 NullFields []string `json:"-"`
3550 }
3551
3552 func (s *ProfileSummary) MarshalJSON() ([]byte, error) {
3553 type NoMethod ProfileSummary
3554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3555 }
3556
3557
3558
3559
3560 type Profiles struct {
3561
3562 Items []*Profile `json:"items,omitempty"`
3563
3564
3565
3566
3567 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3568
3569 Kind string `json:"kind,omitempty"`
3570
3571 NextLink string `json:"nextLink,omitempty"`
3572
3573 PreviousLink string `json:"previousLink,omitempty"`
3574
3575
3576 StartIndex int64 `json:"startIndex,omitempty"`
3577
3578
3579 TotalResults int64 `json:"totalResults,omitempty"`
3580
3581 Username string `json:"username,omitempty"`
3582
3583
3584 googleapi.ServerResponse `json:"-"`
3585
3586
3587
3588
3589
3590 ForceSendFields []string `json:"-"`
3591
3592
3593
3594
3595 NullFields []string `json:"-"`
3596 }
3597
3598 func (s *Profiles) MarshalJSON() ([]byte, error) {
3599 type NoMethod Profiles
3600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3601 }
3602
3603
3604 type RealtimeData struct {
3605
3606
3607
3608 ColumnHeaders []*RealtimeDataColumnHeaders `json:"columnHeaders,omitempty"`
3609
3610 Id string `json:"id,omitempty"`
3611
3612 Kind string `json:"kind,omitempty"`
3613
3614
3615 ProfileInfo *RealtimeDataProfileInfo `json:"profileInfo,omitempty"`
3616
3617 Query *RealtimeDataQuery `json:"query,omitempty"`
3618
3619
3620
3621 Rows [][]string `json:"rows,omitempty"`
3622
3623 SelfLink string `json:"selfLink,omitempty"`
3624
3625
3626 TotalResults int64 `json:"totalResults,omitempty"`
3627
3628
3629
3630 TotalsForAllResults map[string]string `json:"totalsForAllResults,omitempty"`
3631
3632
3633 googleapi.ServerResponse `json:"-"`
3634
3635
3636
3637
3638
3639 ForceSendFields []string `json:"-"`
3640
3641
3642
3643
3644 NullFields []string `json:"-"`
3645 }
3646
3647 func (s *RealtimeData) MarshalJSON() ([]byte, error) {
3648 type NoMethod RealtimeData
3649 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3650 }
3651
3652 type RealtimeDataColumnHeaders struct {
3653
3654 ColumnType string `json:"columnType,omitempty"`
3655
3656
3657
3658 DataType string `json:"dataType,omitempty"`
3659
3660 Name string `json:"name,omitempty"`
3661
3662
3663
3664
3665
3666 ForceSendFields []string `json:"-"`
3667
3668
3669
3670
3671 NullFields []string `json:"-"`
3672 }
3673
3674 func (s *RealtimeDataColumnHeaders) MarshalJSON() ([]byte, error) {
3675 type NoMethod RealtimeDataColumnHeaders
3676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3677 }
3678
3679
3680
3681 type RealtimeDataProfileInfo struct {
3682
3683 AccountId string `json:"accountId,omitempty"`
3684
3685
3686 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3687
3688 ProfileId string `json:"profileId,omitempty"`
3689
3690 ProfileName string `json:"profileName,omitempty"`
3691
3692 TableId string `json:"tableId,omitempty"`
3693
3694 WebPropertyId string `json:"webPropertyId,omitempty"`
3695
3696
3697
3698
3699
3700 ForceSendFields []string `json:"-"`
3701
3702
3703
3704
3705 NullFields []string `json:"-"`
3706 }
3707
3708 func (s *RealtimeDataProfileInfo) MarshalJSON() ([]byte, error) {
3709 type NoMethod RealtimeDataProfileInfo
3710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3711 }
3712
3713
3714 type RealtimeDataQuery struct {
3715
3716 Dimensions string `json:"dimensions,omitempty"`
3717
3718 Filters string `json:"filters,omitempty"`
3719
3720 Ids string `json:"ids,omitempty"`
3721
3722 MaxResults int64 `json:"max-results,omitempty"`
3723
3724 Metrics []string `json:"metrics,omitempty"`
3725
3726 Sort []string `json:"sort,omitempty"`
3727
3728
3729
3730
3731
3732 ForceSendFields []string `json:"-"`
3733
3734
3735
3736
3737 NullFields []string `json:"-"`
3738 }
3739
3740 func (s *RealtimeDataQuery) MarshalJSON() ([]byte, error) {
3741 type NoMethod RealtimeDataQuery
3742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3743 }
3744
3745
3746 type RemarketingAudience struct {
3747
3748 AccountId string `json:"accountId,omitempty"`
3749
3750
3751 AudienceDefinition *RemarketingAudienceAudienceDefinition `json:"audienceDefinition,omitempty"`
3752
3753 AudienceType string `json:"audienceType,omitempty"`
3754
3755 Created string `json:"created,omitempty"`
3756
3757 Description string `json:"description,omitempty"`
3758
3759 Id string `json:"id,omitempty"`
3760
3761
3762 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
3763
3764 Kind string `json:"kind,omitempty"`
3765
3766
3767
3768 LinkedAdAccounts []*LinkedForeignAccount `json:"linkedAdAccounts,omitempty"`
3769
3770
3771 LinkedViews []string `json:"linkedViews,omitempty"`
3772
3773 Name string `json:"name,omitempty"`
3774
3775
3776 StateBasedAudienceDefinition *RemarketingAudienceStateBasedAudienceDefinition `json:"stateBasedAudienceDefinition,omitempty"`
3777
3778 Updated string `json:"updated,omitempty"`
3779
3780
3781 WebPropertyId string `json:"webPropertyId,omitempty"`
3782
3783
3784 googleapi.ServerResponse `json:"-"`
3785
3786
3787
3788
3789
3790 ForceSendFields []string `json:"-"`
3791
3792
3793
3794
3795 NullFields []string `json:"-"`
3796 }
3797
3798 func (s *RemarketingAudience) MarshalJSON() ([]byte, error) {
3799 type NoMethod RemarketingAudience
3800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3801 }
3802
3803
3804
3805 type RemarketingAudienceAudienceDefinition struct {
3806
3807 IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
3808
3809
3810
3811
3812
3813 ForceSendFields []string `json:"-"`
3814
3815
3816
3817
3818 NullFields []string `json:"-"`
3819 }
3820
3821 func (s *RemarketingAudienceAudienceDefinition) MarshalJSON() ([]byte, error) {
3822 type NoMethod RemarketingAudienceAudienceDefinition
3823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3824 }
3825
3826
3827
3828 type RemarketingAudienceStateBasedAudienceDefinition struct {
3829
3830
3831 ExcludeConditions *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions `json:"excludeConditions,omitempty"`
3832
3833 IncludeConditions *IncludeConditions `json:"includeConditions,omitempty"`
3834
3835
3836
3837
3838
3839 ForceSendFields []string `json:"-"`
3840
3841
3842
3843
3844 NullFields []string `json:"-"`
3845 }
3846
3847 func (s *RemarketingAudienceStateBasedAudienceDefinition) MarshalJSON() ([]byte, error) {
3848 type NoMethod RemarketingAudienceStateBasedAudienceDefinition
3849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3850 }
3851
3852
3853
3854 type RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions struct {
3855
3856 ExclusionDuration string `json:"exclusionDuration,omitempty"`
3857
3858
3859 Segment string `json:"segment,omitempty"`
3860
3861
3862
3863
3864
3865 ForceSendFields []string `json:"-"`
3866
3867
3868
3869
3870 NullFields []string `json:"-"`
3871 }
3872
3873 func (s *RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions) MarshalJSON() ([]byte, error) {
3874 type NoMethod RemarketingAudienceStateBasedAudienceDefinitionExcludeConditions
3875 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3876 }
3877
3878
3879
3880
3881 type RemarketingAudiences struct {
3882
3883 Items []*RemarketingAudience `json:"items,omitempty"`
3884
3885
3886
3887
3888 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3889
3890 Kind string `json:"kind,omitempty"`
3891
3892 NextLink string `json:"nextLink,omitempty"`
3893
3894 PreviousLink string `json:"previousLink,omitempty"`
3895
3896
3897 StartIndex int64 `json:"startIndex,omitempty"`
3898
3899
3900 TotalResults int64 `json:"totalResults,omitempty"`
3901
3902 Username string `json:"username,omitempty"`
3903
3904
3905 googleapi.ServerResponse `json:"-"`
3906
3907
3908
3909
3910
3911 ForceSendFields []string `json:"-"`
3912
3913
3914
3915
3916 NullFields []string `json:"-"`
3917 }
3918
3919 func (s *RemarketingAudiences) MarshalJSON() ([]byte, error) {
3920 type NoMethod RemarketingAudiences
3921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3922 }
3923
3924
3925 type Segment struct {
3926
3927 Created string `json:"created,omitempty"`
3928
3929 Definition string `json:"definition,omitempty"`
3930
3931 Id string `json:"id,omitempty"`
3932
3933 Kind string `json:"kind,omitempty"`
3934
3935 Name string `json:"name,omitempty"`
3936
3937
3938 SegmentId string `json:"segmentId,omitempty"`
3939
3940 SelfLink string `json:"selfLink,omitempty"`
3941
3942 Type string `json:"type,omitempty"`
3943
3944 Updated string `json:"updated,omitempty"`
3945
3946
3947
3948
3949
3950 ForceSendFields []string `json:"-"`
3951
3952
3953
3954
3955 NullFields []string `json:"-"`
3956 }
3957
3958 func (s *Segment) MarshalJSON() ([]byte, error) {
3959 type NoMethod Segment
3960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3961 }
3962
3963
3964
3965
3966 type Segments struct {
3967
3968 Items []*Segment `json:"items,omitempty"`
3969
3970
3971
3972
3973 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
3974
3975 Kind string `json:"kind,omitempty"`
3976
3977 NextLink string `json:"nextLink,omitempty"`
3978
3979 PreviousLink string `json:"previousLink,omitempty"`
3980
3981
3982 StartIndex int64 `json:"startIndex,omitempty"`
3983
3984
3985 TotalResults int64 `json:"totalResults,omitempty"`
3986
3987 Username string `json:"username,omitempty"`
3988
3989
3990 googleapi.ServerResponse `json:"-"`
3991
3992
3993
3994
3995
3996 ForceSendFields []string `json:"-"`
3997
3998
3999
4000
4001 NullFields []string `json:"-"`
4002 }
4003
4004 func (s *Segments) MarshalJSON() ([]byte, error) {
4005 type NoMethod Segments
4006 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4007 }
4008
4009
4010 type UnsampledReport struct {
4011
4012 AccountId string `json:"accountId,omitempty"`
4013
4014
4015 CloudStorageDownloadDetails *UnsampledReportCloudStorageDownloadDetails `json:"cloudStorageDownloadDetails,omitempty"`
4016
4017 Created string `json:"created,omitempty"`
4018
4019 Dimensions string `json:"dimensions,omitempty"`
4020
4021
4022
4023
4024 DownloadType string `json:"downloadType,omitempty"`
4025
4026 DriveDownloadDetails *UnsampledReportDriveDownloadDetails `json:"driveDownloadDetails,omitempty"`
4027
4028 EndDate string `json:"end-date,omitempty"`
4029
4030 Filters string `json:"filters,omitempty"`
4031
4032 Id string `json:"id,omitempty"`
4033
4034 Kind string `json:"kind,omitempty"`
4035
4036 Metrics string `json:"metrics,omitempty"`
4037
4038 ProfileId string `json:"profileId,omitempty"`
4039
4040 Segment string `json:"segment,omitempty"`
4041
4042 SelfLink string `json:"selfLink,omitempty"`
4043
4044 StartDate string `json:"start-date,omitempty"`
4045
4046
4047 Status string `json:"status,omitempty"`
4048
4049 Title string `json:"title,omitempty"`
4050
4051 Updated string `json:"updated,omitempty"`
4052
4053
4054 WebPropertyId string `json:"webPropertyId,omitempty"`
4055
4056
4057 googleapi.ServerResponse `json:"-"`
4058
4059
4060
4061
4062
4063 ForceSendFields []string `json:"-"`
4064
4065
4066
4067
4068 NullFields []string `json:"-"`
4069 }
4070
4071 func (s *UnsampledReport) MarshalJSON() ([]byte, error) {
4072 type NoMethod UnsampledReport
4073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4074 }
4075
4076
4077
4078 type UnsampledReportCloudStorageDownloadDetails struct {
4079
4080 BucketId string `json:"bucketId,omitempty"`
4081
4082 ObjectId string `json:"objectId,omitempty"`
4083
4084
4085
4086
4087
4088 ForceSendFields []string `json:"-"`
4089
4090
4091
4092
4093 NullFields []string `json:"-"`
4094 }
4095
4096 func (s *UnsampledReportCloudStorageDownloadDetails) MarshalJSON() ([]byte, error) {
4097 type NoMethod UnsampledReportCloudStorageDownloadDetails
4098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4099 }
4100
4101
4102
4103 type UnsampledReportDriveDownloadDetails struct {
4104
4105 DocumentId string `json:"documentId,omitempty"`
4106
4107
4108
4109
4110
4111 ForceSendFields []string `json:"-"`
4112
4113
4114
4115
4116 NullFields []string `json:"-"`
4117 }
4118
4119 func (s *UnsampledReportDriveDownloadDetails) MarshalJSON() ([]byte, error) {
4120 type NoMethod UnsampledReportDriveDownloadDetails
4121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4122 }
4123
4124
4125
4126
4127
4128 type UnsampledReports struct {
4129
4130 Items []*UnsampledReport `json:"items,omitempty"`
4131
4132
4133
4134
4135 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4136
4137 Kind string `json:"kind,omitempty"`
4138
4139 NextLink string `json:"nextLink,omitempty"`
4140
4141 PreviousLink string `json:"previousLink,omitempty"`
4142
4143
4144 StartIndex int64 `json:"startIndex,omitempty"`
4145
4146
4147 TotalResults int64 `json:"totalResults,omitempty"`
4148
4149 Username string `json:"username,omitempty"`
4150
4151
4152 googleapi.ServerResponse `json:"-"`
4153
4154
4155
4156
4157
4158 ForceSendFields []string `json:"-"`
4159
4160
4161
4162
4163 NullFields []string `json:"-"`
4164 }
4165
4166 func (s *UnsampledReports) MarshalJSON() ([]byte, error) {
4167 type NoMethod UnsampledReports
4168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4169 }
4170
4171
4172 type Upload struct {
4173
4174 AccountId int64 `json:"accountId,omitempty,string"`
4175
4176 CustomDataSourceId string `json:"customDataSourceId,omitempty"`
4177
4178 Errors []string `json:"errors,omitempty"`
4179
4180 Id string `json:"id,omitempty"`
4181
4182 Kind string `json:"kind,omitempty"`
4183
4184
4185 Status string `json:"status,omitempty"`
4186
4187 UploadTime string `json:"uploadTime,omitempty"`
4188
4189
4190 googleapi.ServerResponse `json:"-"`
4191
4192
4193
4194
4195
4196 ForceSendFields []string `json:"-"`
4197
4198
4199
4200
4201 NullFields []string `json:"-"`
4202 }
4203
4204 func (s *Upload) MarshalJSON() ([]byte, error) {
4205 type NoMethod Upload
4206 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4207 }
4208
4209
4210
4211
4212 type Uploads struct {
4213
4214 Items []*Upload `json:"items,omitempty"`
4215
4216
4217
4218
4219 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4220
4221 Kind string `json:"kind,omitempty"`
4222
4223 NextLink string `json:"nextLink,omitempty"`
4224
4225 PreviousLink string `json:"previousLink,omitempty"`
4226
4227
4228 StartIndex int64 `json:"startIndex,omitempty"`
4229
4230
4231 TotalResults int64 `json:"totalResults,omitempty"`
4232
4233
4234 googleapi.ServerResponse `json:"-"`
4235
4236
4237
4238
4239
4240 ForceSendFields []string `json:"-"`
4241
4242
4243
4244
4245 NullFields []string `json:"-"`
4246 }
4247
4248 func (s *Uploads) MarshalJSON() ([]byte, error) {
4249 type NoMethod Uploads
4250 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4251 }
4252
4253
4254 type UserDeletionRequest struct {
4255
4256
4257 DeletionRequestTime string `json:"deletionRequestTime,omitempty"`
4258
4259 FirebaseProjectId string `json:"firebaseProjectId,omitempty"`
4260
4261 Id *UserDeletionRequestId `json:"id,omitempty"`
4262
4263 Kind string `json:"kind,omitempty"`
4264
4265 PropertyId string `json:"propertyId,omitempty"`
4266
4267 WebPropertyId string `json:"webPropertyId,omitempty"`
4268
4269
4270 googleapi.ServerResponse `json:"-"`
4271
4272
4273
4274
4275
4276 ForceSendFields []string `json:"-"`
4277
4278
4279
4280
4281 NullFields []string `json:"-"`
4282 }
4283
4284 func (s *UserDeletionRequest) MarshalJSON() ([]byte, error) {
4285 type NoMethod UserDeletionRequest
4286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4287 }
4288
4289
4290 type UserDeletionRequestId struct {
4291
4292 Type string `json:"type,omitempty"`
4293
4294 UserId string `json:"userId,omitempty"`
4295
4296
4297
4298
4299
4300 ForceSendFields []string `json:"-"`
4301
4302
4303
4304
4305 NullFields []string `json:"-"`
4306 }
4307
4308 func (s *UserDeletionRequestId) MarshalJSON() ([]byte, error) {
4309 type NoMethod UserDeletionRequestId
4310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4311 }
4312
4313
4314 type UserRef struct {
4315
4316 Email string `json:"email,omitempty"`
4317
4318 Id string `json:"id,omitempty"`
4319 Kind string `json:"kind,omitempty"`
4320
4321
4322
4323
4324
4325 ForceSendFields []string `json:"-"`
4326
4327
4328
4329
4330 NullFields []string `json:"-"`
4331 }
4332
4333 func (s *UserRef) MarshalJSON() ([]byte, error) {
4334 type NoMethod UserRef
4335 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4336 }
4337
4338
4339 type WebPropertyRef struct {
4340
4341 AccountId string `json:"accountId,omitempty"`
4342
4343 Href string `json:"href,omitempty"`
4344
4345 Id string `json:"id,omitempty"`
4346
4347 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4348
4349 Kind string `json:"kind,omitempty"`
4350
4351 Name string `json:"name,omitempty"`
4352
4353
4354
4355
4356
4357 ForceSendFields []string `json:"-"`
4358
4359
4360
4361
4362 NullFields []string `json:"-"`
4363 }
4364
4365 func (s *WebPropertyRef) MarshalJSON() ([]byte, error) {
4366 type NoMethod WebPropertyRef
4367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4368 }
4369
4370
4371
4372
4373 type WebPropertySummary struct {
4374
4375 Id string `json:"id,omitempty"`
4376
4377 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4378
4379 Kind string `json:"kind,omitempty"`
4380
4381 Level string `json:"level,omitempty"`
4382
4383 Name string `json:"name,omitempty"`
4384
4385 Profiles []*ProfileSummary `json:"profiles,omitempty"`
4386
4387 Starred bool `json:"starred,omitempty"`
4388
4389 WebsiteUrl string `json:"websiteUrl,omitempty"`
4390
4391
4392
4393
4394
4395 ForceSendFields []string `json:"-"`
4396
4397
4398
4399
4400 NullFields []string `json:"-"`
4401 }
4402
4403 func (s *WebPropertySummary) MarshalJSON() ([]byte, error) {
4404 type NoMethod WebPropertySummary
4405 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4406 }
4407
4408
4409
4410
4411 type Webproperties struct {
4412
4413 Items []*Webproperty `json:"items,omitempty"`
4414
4415
4416
4417
4418 ItemsPerPage int64 `json:"itemsPerPage,omitempty"`
4419
4420 Kind string `json:"kind,omitempty"`
4421
4422 NextLink string `json:"nextLink,omitempty"`
4423
4424 PreviousLink string `json:"previousLink,omitempty"`
4425
4426
4427 StartIndex int64 `json:"startIndex,omitempty"`
4428
4429
4430 TotalResults int64 `json:"totalResults,omitempty"`
4431
4432 Username string `json:"username,omitempty"`
4433
4434
4435 googleapi.ServerResponse `json:"-"`
4436
4437
4438
4439
4440
4441 ForceSendFields []string `json:"-"`
4442
4443
4444
4445
4446 NullFields []string `json:"-"`
4447 }
4448
4449 func (s *Webproperties) MarshalJSON() ([]byte, error) {
4450 type NoMethod Webproperties
4451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4452 }
4453
4454
4455 type Webproperty struct {
4456
4457 AccountId string `json:"accountId,omitempty"`
4458
4459
4460 ChildLink *WebpropertyChildLink `json:"childLink,omitempty"`
4461
4462 Created string `json:"created,omitempty"`
4463
4464
4465
4466
4467
4468
4469 DataRetentionResetOnNewActivity bool `json:"dataRetentionResetOnNewActivity,omitempty"`
4470
4471
4472
4473 DataRetentionTtl string `json:"dataRetentionTtl,omitempty"`
4474
4475 DefaultProfileId int64 `json:"defaultProfileId,omitempty,string"`
4476
4477 Id string `json:"id,omitempty"`
4478
4479
4480 IndustryVertical string `json:"industryVertical,omitempty"`
4481
4482 InternalWebPropertyId string `json:"internalWebPropertyId,omitempty"`
4483
4484 Kind string `json:"kind,omitempty"`
4485
4486 Level string `json:"level,omitempty"`
4487
4488 Name string `json:"name,omitempty"`
4489
4490
4491 ParentLink *WebpropertyParentLink `json:"parentLink,omitempty"`
4492
4493 Permissions *WebpropertyPermissions `json:"permissions,omitempty"`
4494
4495 ProfileCount int64 `json:"profileCount,omitempty"`
4496
4497 SelfLink string `json:"selfLink,omitempty"`
4498
4499 Starred bool `json:"starred,omitempty"`
4500
4501 Updated string `json:"updated,omitempty"`
4502
4503 WebsiteUrl string `json:"websiteUrl,omitempty"`
4504
4505
4506 googleapi.ServerResponse `json:"-"`
4507
4508
4509
4510
4511
4512 ForceSendFields []string `json:"-"`
4513
4514
4515
4516
4517 NullFields []string `json:"-"`
4518 }
4519
4520 func (s *Webproperty) MarshalJSON() ([]byte, error) {
4521 type NoMethod Webproperty
4522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4523 }
4524
4525
4526
4527 type WebpropertyChildLink struct {
4528
4529 Href string `json:"href,omitempty"`
4530
4531 Type string `json:"type,omitempty"`
4532
4533
4534
4535
4536
4537 ForceSendFields []string `json:"-"`
4538
4539
4540
4541
4542 NullFields []string `json:"-"`
4543 }
4544
4545 func (s *WebpropertyChildLink) MarshalJSON() ([]byte, error) {
4546 type NoMethod WebpropertyChildLink
4547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4548 }
4549
4550
4551
4552 type WebpropertyParentLink struct {
4553
4554 Href string `json:"href,omitempty"`
4555
4556 Type string `json:"type,omitempty"`
4557
4558
4559
4560
4561
4562 ForceSendFields []string `json:"-"`
4563
4564
4565
4566
4567 NullFields []string `json:"-"`
4568 }
4569
4570 func (s *WebpropertyParentLink) MarshalJSON() ([]byte, error) {
4571 type NoMethod WebpropertyParentLink
4572 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4573 }
4574
4575
4576 type WebpropertyPermissions struct {
4577
4578
4579
4580 Effective []string `json:"effective,omitempty"`
4581
4582
4583
4584
4585
4586 ForceSendFields []string `json:"-"`
4587
4588
4589
4590
4591 NullFields []string `json:"-"`
4592 }
4593
4594 func (s *WebpropertyPermissions) MarshalJSON() ([]byte, error) {
4595 type NoMethod WebpropertyPermissions
4596 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4597 }
4598
4599 type DataGaGetCall struct {
4600 s *Service
4601 urlParams_ gensupport.URLParams
4602 ifNoneMatch_ string
4603 ctx_ context.Context
4604 header_ http.Header
4605 }
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619 func (r *DataGaService) Get(ids string, startDate string, endDate string, metrics string) *DataGaGetCall {
4620 c := &DataGaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4621 c.urlParams_.Set("ids", ids)
4622 c.urlParams_.Set("start-date", startDate)
4623 c.urlParams_.Set("end-date", endDate)
4624 c.urlParams_.Set("metrics", metrics)
4625 return c
4626 }
4627
4628
4629
4630 func (c *DataGaGetCall) Dimensions(dimensions string) *DataGaGetCall {
4631 c.urlParams_.Set("dimensions", dimensions)
4632 return c
4633 }
4634
4635
4636
4637 func (c *DataGaGetCall) Filters(filters string) *DataGaGetCall {
4638 c.urlParams_.Set("filters", filters)
4639 return c
4640 }
4641
4642
4643
4644
4645 func (c *DataGaGetCall) IncludeEmptyRows(includeEmptyRows bool) *DataGaGetCall {
4646 c.urlParams_.Set("include-empty-rows", fmt.Sprint(includeEmptyRows))
4647 return c
4648 }
4649
4650
4651
4652 func (c *DataGaGetCall) MaxResults(maxResults int64) *DataGaGetCall {
4653 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
4654 return c
4655 }
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667 func (c *DataGaGetCall) Output(output string) *DataGaGetCall {
4668 c.urlParams_.Set("output", output)
4669 return c
4670 }
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685 func (c *DataGaGetCall) SamplingLevel(samplingLevel string) *DataGaGetCall {
4686 c.urlParams_.Set("samplingLevel", samplingLevel)
4687 return c
4688 }
4689
4690
4691
4692 func (c *DataGaGetCall) Segment(segment string) *DataGaGetCall {
4693 c.urlParams_.Set("segment", segment)
4694 return c
4695 }
4696
4697
4698
4699 func (c *DataGaGetCall) Sort(sort string) *DataGaGetCall {
4700 c.urlParams_.Set("sort", sort)
4701 return c
4702 }
4703
4704
4705
4706
4707 func (c *DataGaGetCall) StartIndex(startIndex int64) *DataGaGetCall {
4708 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
4709 return c
4710 }
4711
4712
4713
4714
4715 func (c *DataGaGetCall) Fields(s ...googleapi.Field) *DataGaGetCall {
4716 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4717 return c
4718 }
4719
4720
4721
4722
4723 func (c *DataGaGetCall) IfNoneMatch(entityTag string) *DataGaGetCall {
4724 c.ifNoneMatch_ = entityTag
4725 return c
4726 }
4727
4728
4729 func (c *DataGaGetCall) Context(ctx context.Context) *DataGaGetCall {
4730 c.ctx_ = ctx
4731 return c
4732 }
4733
4734
4735
4736 func (c *DataGaGetCall) Header() http.Header {
4737 if c.header_ == nil {
4738 c.header_ = make(http.Header)
4739 }
4740 return c.header_
4741 }
4742
4743 func (c *DataGaGetCall) doRequest(alt string) (*http.Response, error) {
4744 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4745 if c.ifNoneMatch_ != "" {
4746 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4747 }
4748 var body io.Reader = nil
4749 c.urlParams_.Set("alt", alt)
4750 c.urlParams_.Set("prettyPrint", "false")
4751 urls := googleapi.ResolveRelative(c.s.BasePath, "data/ga")
4752 urls += "?" + c.urlParams_.Encode()
4753 req, err := http.NewRequest("GET", urls, body)
4754 if err != nil {
4755 return nil, err
4756 }
4757 req.Header = reqHeaders
4758 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4759 }
4760
4761
4762
4763
4764
4765
4766 func (c *DataGaGetCall) Do(opts ...googleapi.CallOption) (*GaData, error) {
4767 gensupport.SetOptions(c.urlParams_, opts...)
4768 res, err := c.doRequest("json")
4769 if res != nil && res.StatusCode == http.StatusNotModified {
4770 if res.Body != nil {
4771 res.Body.Close()
4772 }
4773 return nil, gensupport.WrapError(&googleapi.Error{
4774 Code: res.StatusCode,
4775 Header: res.Header,
4776 })
4777 }
4778 if err != nil {
4779 return nil, err
4780 }
4781 defer googleapi.CloseBody(res)
4782 if err := googleapi.CheckResponse(res); err != nil {
4783 return nil, gensupport.WrapError(err)
4784 }
4785 ret := &GaData{
4786 ServerResponse: googleapi.ServerResponse{
4787 Header: res.Header,
4788 HTTPStatusCode: res.StatusCode,
4789 },
4790 }
4791 target := &ret
4792 if err := gensupport.DecodeResponse(target, res); err != nil {
4793 return nil, err
4794 }
4795 return ret, nil
4796 }
4797
4798 type DataMcfGetCall struct {
4799 s *Service
4800 urlParams_ gensupport.URLParams
4801 ifNoneMatch_ string
4802 ctx_ context.Context
4803 header_ http.Header
4804 }
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819 func (r *DataMcfService) Get(ids string, startDate string, endDate string, metrics string) *DataMcfGetCall {
4820 c := &DataMcfGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4821 c.urlParams_.Set("ids", ids)
4822 c.urlParams_.Set("start-date", startDate)
4823 c.urlParams_.Set("end-date", endDate)
4824 c.urlParams_.Set("metrics", metrics)
4825 return c
4826 }
4827
4828
4829
4830 func (c *DataMcfGetCall) Dimensions(dimensions string) *DataMcfGetCall {
4831 c.urlParams_.Set("dimensions", dimensions)
4832 return c
4833 }
4834
4835
4836
4837 func (c *DataMcfGetCall) Filters(filters string) *DataMcfGetCall {
4838 c.urlParams_.Set("filters", filters)
4839 return c
4840 }
4841
4842
4843
4844 func (c *DataMcfGetCall) MaxResults(maxResults int64) *DataMcfGetCall {
4845 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
4846 return c
4847 }
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862 func (c *DataMcfGetCall) SamplingLevel(samplingLevel string) *DataMcfGetCall {
4863 c.urlParams_.Set("samplingLevel", samplingLevel)
4864 return c
4865 }
4866
4867
4868
4869 func (c *DataMcfGetCall) Sort(sort string) *DataMcfGetCall {
4870 c.urlParams_.Set("sort", sort)
4871 return c
4872 }
4873
4874
4875
4876
4877 func (c *DataMcfGetCall) StartIndex(startIndex int64) *DataMcfGetCall {
4878 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
4879 return c
4880 }
4881
4882
4883
4884
4885 func (c *DataMcfGetCall) Fields(s ...googleapi.Field) *DataMcfGetCall {
4886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4887 return c
4888 }
4889
4890
4891
4892
4893 func (c *DataMcfGetCall) IfNoneMatch(entityTag string) *DataMcfGetCall {
4894 c.ifNoneMatch_ = entityTag
4895 return c
4896 }
4897
4898
4899 func (c *DataMcfGetCall) Context(ctx context.Context) *DataMcfGetCall {
4900 c.ctx_ = ctx
4901 return c
4902 }
4903
4904
4905
4906 func (c *DataMcfGetCall) Header() http.Header {
4907 if c.header_ == nil {
4908 c.header_ = make(http.Header)
4909 }
4910 return c.header_
4911 }
4912
4913 func (c *DataMcfGetCall) doRequest(alt string) (*http.Response, error) {
4914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4915 if c.ifNoneMatch_ != "" {
4916 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4917 }
4918 var body io.Reader = nil
4919 c.urlParams_.Set("alt", alt)
4920 c.urlParams_.Set("prettyPrint", "false")
4921 urls := googleapi.ResolveRelative(c.s.BasePath, "data/mcf")
4922 urls += "?" + c.urlParams_.Encode()
4923 req, err := http.NewRequest("GET", urls, body)
4924 if err != nil {
4925 return nil, err
4926 }
4927 req.Header = reqHeaders
4928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4929 }
4930
4931
4932
4933
4934
4935
4936 func (c *DataMcfGetCall) Do(opts ...googleapi.CallOption) (*McfData, error) {
4937 gensupport.SetOptions(c.urlParams_, opts...)
4938 res, err := c.doRequest("json")
4939 if res != nil && res.StatusCode == http.StatusNotModified {
4940 if res.Body != nil {
4941 res.Body.Close()
4942 }
4943 return nil, gensupport.WrapError(&googleapi.Error{
4944 Code: res.StatusCode,
4945 Header: res.Header,
4946 })
4947 }
4948 if err != nil {
4949 return nil, err
4950 }
4951 defer googleapi.CloseBody(res)
4952 if err := googleapi.CheckResponse(res); err != nil {
4953 return nil, gensupport.WrapError(err)
4954 }
4955 ret := &McfData{
4956 ServerResponse: googleapi.ServerResponse{
4957 Header: res.Header,
4958 HTTPStatusCode: res.StatusCode,
4959 },
4960 }
4961 target := &ret
4962 if err := gensupport.DecodeResponse(target, res); err != nil {
4963 return nil, err
4964 }
4965 return ret, nil
4966 }
4967
4968 type DataRealtimeGetCall struct {
4969 s *Service
4970 urlParams_ gensupport.URLParams
4971 ifNoneMatch_ string
4972 ctx_ context.Context
4973 header_ http.Header
4974 }
4975
4976
4977
4978
4979
4980
4981
4982 func (r *DataRealtimeService) Get(ids string, metrics string) *DataRealtimeGetCall {
4983 c := &DataRealtimeGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4984 c.urlParams_.Set("ids", ids)
4985 c.urlParams_.Set("metrics", metrics)
4986 return c
4987 }
4988
4989
4990
4991 func (c *DataRealtimeGetCall) Dimensions(dimensions string) *DataRealtimeGetCall {
4992 c.urlParams_.Set("dimensions", dimensions)
4993 return c
4994 }
4995
4996
4997
4998 func (c *DataRealtimeGetCall) Filters(filters string) *DataRealtimeGetCall {
4999 c.urlParams_.Set("filters", filters)
5000 return c
5001 }
5002
5003
5004
5005 func (c *DataRealtimeGetCall) MaxResults(maxResults int64) *DataRealtimeGetCall {
5006 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5007 return c
5008 }
5009
5010
5011
5012 func (c *DataRealtimeGetCall) Sort(sort string) *DataRealtimeGetCall {
5013 c.urlParams_.Set("sort", sort)
5014 return c
5015 }
5016
5017
5018
5019
5020 func (c *DataRealtimeGetCall) Fields(s ...googleapi.Field) *DataRealtimeGetCall {
5021 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5022 return c
5023 }
5024
5025
5026
5027
5028 func (c *DataRealtimeGetCall) IfNoneMatch(entityTag string) *DataRealtimeGetCall {
5029 c.ifNoneMatch_ = entityTag
5030 return c
5031 }
5032
5033
5034 func (c *DataRealtimeGetCall) Context(ctx context.Context) *DataRealtimeGetCall {
5035 c.ctx_ = ctx
5036 return c
5037 }
5038
5039
5040
5041 func (c *DataRealtimeGetCall) Header() http.Header {
5042 if c.header_ == nil {
5043 c.header_ = make(http.Header)
5044 }
5045 return c.header_
5046 }
5047
5048 func (c *DataRealtimeGetCall) doRequest(alt string) (*http.Response, error) {
5049 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5050 if c.ifNoneMatch_ != "" {
5051 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5052 }
5053 var body io.Reader = nil
5054 c.urlParams_.Set("alt", alt)
5055 c.urlParams_.Set("prettyPrint", "false")
5056 urls := googleapi.ResolveRelative(c.s.BasePath, "data/realtime")
5057 urls += "?" + c.urlParams_.Encode()
5058 req, err := http.NewRequest("GET", urls, body)
5059 if err != nil {
5060 return nil, err
5061 }
5062 req.Header = reqHeaders
5063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5064 }
5065
5066
5067
5068
5069
5070
5071 func (c *DataRealtimeGetCall) Do(opts ...googleapi.CallOption) (*RealtimeData, error) {
5072 gensupport.SetOptions(c.urlParams_, opts...)
5073 res, err := c.doRequest("json")
5074 if res != nil && res.StatusCode == http.StatusNotModified {
5075 if res.Body != nil {
5076 res.Body.Close()
5077 }
5078 return nil, gensupport.WrapError(&googleapi.Error{
5079 Code: res.StatusCode,
5080 Header: res.Header,
5081 })
5082 }
5083 if err != nil {
5084 return nil, err
5085 }
5086 defer googleapi.CloseBody(res)
5087 if err := googleapi.CheckResponse(res); err != nil {
5088 return nil, gensupport.WrapError(err)
5089 }
5090 ret := &RealtimeData{
5091 ServerResponse: googleapi.ServerResponse{
5092 Header: res.Header,
5093 HTTPStatusCode: res.StatusCode,
5094 },
5095 }
5096 target := &ret
5097 if err := gensupport.DecodeResponse(target, res); err != nil {
5098 return nil, err
5099 }
5100 return ret, nil
5101 }
5102
5103 type ManagementAccountSummariesListCall struct {
5104 s *Service
5105 urlParams_ gensupport.URLParams
5106 ifNoneMatch_ string
5107 ctx_ context.Context
5108 header_ http.Header
5109 }
5110
5111
5112
5113 func (r *ManagementAccountSummariesService) List() *ManagementAccountSummariesListCall {
5114 c := &ManagementAccountSummariesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5115 return c
5116 }
5117
5118
5119
5120
5121 func (c *ManagementAccountSummariesListCall) MaxResults(maxResults int64) *ManagementAccountSummariesListCall {
5122 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5123 return c
5124 }
5125
5126
5127
5128
5129 func (c *ManagementAccountSummariesListCall) StartIndex(startIndex int64) *ManagementAccountSummariesListCall {
5130 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
5131 return c
5132 }
5133
5134
5135
5136
5137 func (c *ManagementAccountSummariesListCall) Fields(s ...googleapi.Field) *ManagementAccountSummariesListCall {
5138 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5139 return c
5140 }
5141
5142
5143
5144
5145 func (c *ManagementAccountSummariesListCall) IfNoneMatch(entityTag string) *ManagementAccountSummariesListCall {
5146 c.ifNoneMatch_ = entityTag
5147 return c
5148 }
5149
5150
5151 func (c *ManagementAccountSummariesListCall) Context(ctx context.Context) *ManagementAccountSummariesListCall {
5152 c.ctx_ = ctx
5153 return c
5154 }
5155
5156
5157
5158 func (c *ManagementAccountSummariesListCall) Header() http.Header {
5159 if c.header_ == nil {
5160 c.header_ = make(http.Header)
5161 }
5162 return c.header_
5163 }
5164
5165 func (c *ManagementAccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
5166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5167 if c.ifNoneMatch_ != "" {
5168 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5169 }
5170 var body io.Reader = nil
5171 c.urlParams_.Set("alt", alt)
5172 c.urlParams_.Set("prettyPrint", "false")
5173 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accountSummaries")
5174 urls += "?" + c.urlParams_.Encode()
5175 req, err := http.NewRequest("GET", urls, body)
5176 if err != nil {
5177 return nil, err
5178 }
5179 req.Header = reqHeaders
5180 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5181 }
5182
5183
5184
5185
5186
5187
5188
5189 func (c *ManagementAccountSummariesListCall) Do(opts ...googleapi.CallOption) (*AccountSummaries, error) {
5190 gensupport.SetOptions(c.urlParams_, opts...)
5191 res, err := c.doRequest("json")
5192 if res != nil && res.StatusCode == http.StatusNotModified {
5193 if res.Body != nil {
5194 res.Body.Close()
5195 }
5196 return nil, gensupport.WrapError(&googleapi.Error{
5197 Code: res.StatusCode,
5198 Header: res.Header,
5199 })
5200 }
5201 if err != nil {
5202 return nil, err
5203 }
5204 defer googleapi.CloseBody(res)
5205 if err := googleapi.CheckResponse(res); err != nil {
5206 return nil, gensupport.WrapError(err)
5207 }
5208 ret := &AccountSummaries{
5209 ServerResponse: googleapi.ServerResponse{
5210 Header: res.Header,
5211 HTTPStatusCode: res.StatusCode,
5212 },
5213 }
5214 target := &ret
5215 if err := gensupport.DecodeResponse(target, res); err != nil {
5216 return nil, err
5217 }
5218 return ret, nil
5219 }
5220
5221 type ManagementAccountUserLinksDeleteCall struct {
5222 s *Service
5223 accountId string
5224 linkId string
5225 urlParams_ gensupport.URLParams
5226 ctx_ context.Context
5227 header_ http.Header
5228 }
5229
5230
5231
5232
5233
5234 func (r *ManagementAccountUserLinksService) Delete(accountId string, linkId string) *ManagementAccountUserLinksDeleteCall {
5235 c := &ManagementAccountUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5236 c.accountId = accountId
5237 c.linkId = linkId
5238 return c
5239 }
5240
5241
5242
5243
5244 func (c *ManagementAccountUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksDeleteCall {
5245 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5246 return c
5247 }
5248
5249
5250 func (c *ManagementAccountUserLinksDeleteCall) Context(ctx context.Context) *ManagementAccountUserLinksDeleteCall {
5251 c.ctx_ = ctx
5252 return c
5253 }
5254
5255
5256
5257 func (c *ManagementAccountUserLinksDeleteCall) Header() http.Header {
5258 if c.header_ == nil {
5259 c.header_ = make(http.Header)
5260 }
5261 return c.header_
5262 }
5263
5264 func (c *ManagementAccountUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
5265 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5266 var body io.Reader = nil
5267 c.urlParams_.Set("alt", alt)
5268 c.urlParams_.Set("prettyPrint", "false")
5269 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
5270 urls += "?" + c.urlParams_.Encode()
5271 req, err := http.NewRequest("DELETE", urls, body)
5272 if err != nil {
5273 return nil, err
5274 }
5275 req.Header = reqHeaders
5276 googleapi.Expand(req.URL, map[string]string{
5277 "accountId": c.accountId,
5278 "linkId": c.linkId,
5279 })
5280 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5281 }
5282
5283
5284 func (c *ManagementAccountUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
5285 gensupport.SetOptions(c.urlParams_, opts...)
5286 res, err := c.doRequest("json")
5287 if err != nil {
5288 return err
5289 }
5290 defer googleapi.CloseBody(res)
5291 if err := googleapi.CheckResponse(res); err != nil {
5292 return gensupport.WrapError(err)
5293 }
5294 return nil
5295 }
5296
5297 type ManagementAccountUserLinksInsertCall struct {
5298 s *Service
5299 accountId string
5300 entityuserlink *EntityUserLink
5301 urlParams_ gensupport.URLParams
5302 ctx_ context.Context
5303 header_ http.Header
5304 }
5305
5306
5307
5308
5309 func (r *ManagementAccountUserLinksService) Insert(accountId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksInsertCall {
5310 c := &ManagementAccountUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5311 c.accountId = accountId
5312 c.entityuserlink = entityuserlink
5313 return c
5314 }
5315
5316
5317
5318
5319 func (c *ManagementAccountUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksInsertCall {
5320 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5321 return c
5322 }
5323
5324
5325 func (c *ManagementAccountUserLinksInsertCall) Context(ctx context.Context) *ManagementAccountUserLinksInsertCall {
5326 c.ctx_ = ctx
5327 return c
5328 }
5329
5330
5331
5332 func (c *ManagementAccountUserLinksInsertCall) Header() http.Header {
5333 if c.header_ == nil {
5334 c.header_ = make(http.Header)
5335 }
5336 return c.header_
5337 }
5338
5339 func (c *ManagementAccountUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
5340 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5341 var body io.Reader = nil
5342 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
5343 if err != nil {
5344 return nil, err
5345 }
5346 c.urlParams_.Set("alt", alt)
5347 c.urlParams_.Set("prettyPrint", "false")
5348 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
5349 urls += "?" + c.urlParams_.Encode()
5350 req, err := http.NewRequest("POST", urls, body)
5351 if err != nil {
5352 return nil, err
5353 }
5354 req.Header = reqHeaders
5355 googleapi.Expand(req.URL, map[string]string{
5356 "accountId": c.accountId,
5357 })
5358 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5359 }
5360
5361
5362
5363
5364
5365
5366 func (c *ManagementAccountUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
5367 gensupport.SetOptions(c.urlParams_, opts...)
5368 res, err := c.doRequest("json")
5369 if res != nil && res.StatusCode == http.StatusNotModified {
5370 if res.Body != nil {
5371 res.Body.Close()
5372 }
5373 return nil, gensupport.WrapError(&googleapi.Error{
5374 Code: res.StatusCode,
5375 Header: res.Header,
5376 })
5377 }
5378 if err != nil {
5379 return nil, err
5380 }
5381 defer googleapi.CloseBody(res)
5382 if err := googleapi.CheckResponse(res); err != nil {
5383 return nil, gensupport.WrapError(err)
5384 }
5385 ret := &EntityUserLink{
5386 ServerResponse: googleapi.ServerResponse{
5387 Header: res.Header,
5388 HTTPStatusCode: res.StatusCode,
5389 },
5390 }
5391 target := &ret
5392 if err := gensupport.DecodeResponse(target, res); err != nil {
5393 return nil, err
5394 }
5395 return ret, nil
5396 }
5397
5398 type ManagementAccountUserLinksListCall struct {
5399 s *Service
5400 accountId string
5401 urlParams_ gensupport.URLParams
5402 ifNoneMatch_ string
5403 ctx_ context.Context
5404 header_ http.Header
5405 }
5406
5407
5408
5409
5410 func (r *ManagementAccountUserLinksService) List(accountId string) *ManagementAccountUserLinksListCall {
5411 c := &ManagementAccountUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5412 c.accountId = accountId
5413 return c
5414 }
5415
5416
5417
5418 func (c *ManagementAccountUserLinksListCall) MaxResults(maxResults int64) *ManagementAccountUserLinksListCall {
5419 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5420 return c
5421 }
5422
5423
5424
5425
5426 func (c *ManagementAccountUserLinksListCall) StartIndex(startIndex int64) *ManagementAccountUserLinksListCall {
5427 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
5428 return c
5429 }
5430
5431
5432
5433
5434 func (c *ManagementAccountUserLinksListCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksListCall {
5435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5436 return c
5437 }
5438
5439
5440
5441
5442 func (c *ManagementAccountUserLinksListCall) IfNoneMatch(entityTag string) *ManagementAccountUserLinksListCall {
5443 c.ifNoneMatch_ = entityTag
5444 return c
5445 }
5446
5447
5448 func (c *ManagementAccountUserLinksListCall) Context(ctx context.Context) *ManagementAccountUserLinksListCall {
5449 c.ctx_ = ctx
5450 return c
5451 }
5452
5453
5454
5455 func (c *ManagementAccountUserLinksListCall) Header() http.Header {
5456 if c.header_ == nil {
5457 c.header_ = make(http.Header)
5458 }
5459 return c.header_
5460 }
5461
5462 func (c *ManagementAccountUserLinksListCall) doRequest(alt string) (*http.Response, error) {
5463 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5464 if c.ifNoneMatch_ != "" {
5465 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5466 }
5467 var body io.Reader = nil
5468 c.urlParams_.Set("alt", alt)
5469 c.urlParams_.Set("prettyPrint", "false")
5470 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks")
5471 urls += "?" + c.urlParams_.Encode()
5472 req, err := http.NewRequest("GET", urls, body)
5473 if err != nil {
5474 return nil, err
5475 }
5476 req.Header = reqHeaders
5477 googleapi.Expand(req.URL, map[string]string{
5478 "accountId": c.accountId,
5479 })
5480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5481 }
5482
5483
5484
5485
5486
5487
5488
5489 func (c *ManagementAccountUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
5490 gensupport.SetOptions(c.urlParams_, opts...)
5491 res, err := c.doRequest("json")
5492 if res != nil && res.StatusCode == http.StatusNotModified {
5493 if res.Body != nil {
5494 res.Body.Close()
5495 }
5496 return nil, gensupport.WrapError(&googleapi.Error{
5497 Code: res.StatusCode,
5498 Header: res.Header,
5499 })
5500 }
5501 if err != nil {
5502 return nil, err
5503 }
5504 defer googleapi.CloseBody(res)
5505 if err := googleapi.CheckResponse(res); err != nil {
5506 return nil, gensupport.WrapError(err)
5507 }
5508 ret := &EntityUserLinks{
5509 ServerResponse: googleapi.ServerResponse{
5510 Header: res.Header,
5511 HTTPStatusCode: res.StatusCode,
5512 },
5513 }
5514 target := &ret
5515 if err := gensupport.DecodeResponse(target, res); err != nil {
5516 return nil, err
5517 }
5518 return ret, nil
5519 }
5520
5521 type ManagementAccountUserLinksUpdateCall struct {
5522 s *Service
5523 accountId string
5524 linkId string
5525 entityuserlink *EntityUserLink
5526 urlParams_ gensupport.URLParams
5527 ctx_ context.Context
5528 header_ http.Header
5529 }
5530
5531
5532
5533
5534
5535 func (r *ManagementAccountUserLinksService) Update(accountId string, linkId string, entityuserlink *EntityUserLink) *ManagementAccountUserLinksUpdateCall {
5536 c := &ManagementAccountUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5537 c.accountId = accountId
5538 c.linkId = linkId
5539 c.entityuserlink = entityuserlink
5540 return c
5541 }
5542
5543
5544
5545
5546 func (c *ManagementAccountUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementAccountUserLinksUpdateCall {
5547 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5548 return c
5549 }
5550
5551
5552 func (c *ManagementAccountUserLinksUpdateCall) Context(ctx context.Context) *ManagementAccountUserLinksUpdateCall {
5553 c.ctx_ = ctx
5554 return c
5555 }
5556
5557
5558
5559 func (c *ManagementAccountUserLinksUpdateCall) Header() http.Header {
5560 if c.header_ == nil {
5561 c.header_ = make(http.Header)
5562 }
5563 return c.header_
5564 }
5565
5566 func (c *ManagementAccountUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
5567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5568 var body io.Reader = nil
5569 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
5570 if err != nil {
5571 return nil, err
5572 }
5573 c.urlParams_.Set("alt", alt)
5574 c.urlParams_.Set("prettyPrint", "false")
5575 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/entityUserLinks/{linkId}")
5576 urls += "?" + c.urlParams_.Encode()
5577 req, err := http.NewRequest("PUT", urls, body)
5578 if err != nil {
5579 return nil, err
5580 }
5581 req.Header = reqHeaders
5582 googleapi.Expand(req.URL, map[string]string{
5583 "accountId": c.accountId,
5584 "linkId": c.linkId,
5585 })
5586 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5587 }
5588
5589
5590
5591
5592
5593
5594 func (c *ManagementAccountUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
5595 gensupport.SetOptions(c.urlParams_, opts...)
5596 res, err := c.doRequest("json")
5597 if res != nil && res.StatusCode == http.StatusNotModified {
5598 if res.Body != nil {
5599 res.Body.Close()
5600 }
5601 return nil, gensupport.WrapError(&googleapi.Error{
5602 Code: res.StatusCode,
5603 Header: res.Header,
5604 })
5605 }
5606 if err != nil {
5607 return nil, err
5608 }
5609 defer googleapi.CloseBody(res)
5610 if err := googleapi.CheckResponse(res); err != nil {
5611 return nil, gensupport.WrapError(err)
5612 }
5613 ret := &EntityUserLink{
5614 ServerResponse: googleapi.ServerResponse{
5615 Header: res.Header,
5616 HTTPStatusCode: res.StatusCode,
5617 },
5618 }
5619 target := &ret
5620 if err := gensupport.DecodeResponse(target, res); err != nil {
5621 return nil, err
5622 }
5623 return ret, nil
5624 }
5625
5626 type ManagementAccountsListCall struct {
5627 s *Service
5628 urlParams_ gensupport.URLParams
5629 ifNoneMatch_ string
5630 ctx_ context.Context
5631 header_ http.Header
5632 }
5633
5634
5635 func (r *ManagementAccountsService) List() *ManagementAccountsListCall {
5636 c := &ManagementAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5637 return c
5638 }
5639
5640
5641
5642 func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall {
5643 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5644 return c
5645 }
5646
5647
5648
5649
5650 func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall {
5651 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
5652 return c
5653 }
5654
5655
5656
5657
5658 func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall {
5659 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5660 return c
5661 }
5662
5663
5664
5665
5666 func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall {
5667 c.ifNoneMatch_ = entityTag
5668 return c
5669 }
5670
5671
5672 func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
5673 c.ctx_ = ctx
5674 return c
5675 }
5676
5677
5678
5679 func (c *ManagementAccountsListCall) Header() http.Header {
5680 if c.header_ == nil {
5681 c.header_ = make(http.Header)
5682 }
5683 return c.header_
5684 }
5685
5686 func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
5687 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5688 if c.ifNoneMatch_ != "" {
5689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5690 }
5691 var body io.Reader = nil
5692 c.urlParams_.Set("alt", alt)
5693 c.urlParams_.Set("prettyPrint", "false")
5694 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts")
5695 urls += "?" + c.urlParams_.Encode()
5696 req, err := http.NewRequest("GET", urls, body)
5697 if err != nil {
5698 return nil, err
5699 }
5700 req.Header = reqHeaders
5701 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5702 }
5703
5704
5705
5706
5707
5708
5709 func (c *ManagementAccountsListCall) Do(opts ...googleapi.CallOption) (*Accounts, error) {
5710 gensupport.SetOptions(c.urlParams_, opts...)
5711 res, err := c.doRequest("json")
5712 if res != nil && res.StatusCode == http.StatusNotModified {
5713 if res.Body != nil {
5714 res.Body.Close()
5715 }
5716 return nil, gensupport.WrapError(&googleapi.Error{
5717 Code: res.StatusCode,
5718 Header: res.Header,
5719 })
5720 }
5721 if err != nil {
5722 return nil, err
5723 }
5724 defer googleapi.CloseBody(res)
5725 if err := googleapi.CheckResponse(res); err != nil {
5726 return nil, gensupport.WrapError(err)
5727 }
5728 ret := &Accounts{
5729 ServerResponse: googleapi.ServerResponse{
5730 Header: res.Header,
5731 HTTPStatusCode: res.StatusCode,
5732 },
5733 }
5734 target := &ret
5735 if err := gensupport.DecodeResponse(target, res); err != nil {
5736 return nil, err
5737 }
5738 return ret, nil
5739 }
5740
5741 type ManagementClientIdHashClientIdCall struct {
5742 s *Service
5743 hashclientidrequest *HashClientIdRequest
5744 urlParams_ gensupport.URLParams
5745 ctx_ context.Context
5746 header_ http.Header
5747 }
5748
5749
5750 func (r *ManagementClientIdService) HashClientId(hashclientidrequest *HashClientIdRequest) *ManagementClientIdHashClientIdCall {
5751 c := &ManagementClientIdHashClientIdCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5752 c.hashclientidrequest = hashclientidrequest
5753 return c
5754 }
5755
5756
5757
5758
5759 func (c *ManagementClientIdHashClientIdCall) Fields(s ...googleapi.Field) *ManagementClientIdHashClientIdCall {
5760 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5761 return c
5762 }
5763
5764
5765 func (c *ManagementClientIdHashClientIdCall) Context(ctx context.Context) *ManagementClientIdHashClientIdCall {
5766 c.ctx_ = ctx
5767 return c
5768 }
5769
5770
5771
5772 func (c *ManagementClientIdHashClientIdCall) Header() http.Header {
5773 if c.header_ == nil {
5774 c.header_ = make(http.Header)
5775 }
5776 return c.header_
5777 }
5778
5779 func (c *ManagementClientIdHashClientIdCall) doRequest(alt string) (*http.Response, error) {
5780 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5781 var body io.Reader = nil
5782 body, err := googleapi.WithoutDataWrapper.JSONReader(c.hashclientidrequest)
5783 if err != nil {
5784 return nil, err
5785 }
5786 c.urlParams_.Set("alt", alt)
5787 c.urlParams_.Set("prettyPrint", "false")
5788 urls := googleapi.ResolveRelative(c.s.BasePath, "management/clientId:hashClientId")
5789 urls += "?" + c.urlParams_.Encode()
5790 req, err := http.NewRequest("POST", urls, body)
5791 if err != nil {
5792 return nil, err
5793 }
5794 req.Header = reqHeaders
5795 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5796 }
5797
5798
5799
5800
5801
5802
5803
5804 func (c *ManagementClientIdHashClientIdCall) Do(opts ...googleapi.CallOption) (*HashClientIdResponse, error) {
5805 gensupport.SetOptions(c.urlParams_, opts...)
5806 res, err := c.doRequest("json")
5807 if res != nil && res.StatusCode == http.StatusNotModified {
5808 if res.Body != nil {
5809 res.Body.Close()
5810 }
5811 return nil, gensupport.WrapError(&googleapi.Error{
5812 Code: res.StatusCode,
5813 Header: res.Header,
5814 })
5815 }
5816 if err != nil {
5817 return nil, err
5818 }
5819 defer googleapi.CloseBody(res)
5820 if err := googleapi.CheckResponse(res); err != nil {
5821 return nil, gensupport.WrapError(err)
5822 }
5823 ret := &HashClientIdResponse{
5824 ServerResponse: googleapi.ServerResponse{
5825 Header: res.Header,
5826 HTTPStatusCode: res.StatusCode,
5827 },
5828 }
5829 target := &ret
5830 if err := gensupport.DecodeResponse(target, res); err != nil {
5831 return nil, err
5832 }
5833 return ret, nil
5834 }
5835
5836 type ManagementCustomDataSourcesListCall struct {
5837 s *Service
5838 accountId string
5839 webPropertyId string
5840 urlParams_ gensupport.URLParams
5841 ifNoneMatch_ string
5842 ctx_ context.Context
5843 header_ http.Header
5844 }
5845
5846
5847
5848
5849
5850 func (r *ManagementCustomDataSourcesService) List(accountId string, webPropertyId string) *ManagementCustomDataSourcesListCall {
5851 c := &ManagementCustomDataSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5852 c.accountId = accountId
5853 c.webPropertyId = webPropertyId
5854 return c
5855 }
5856
5857
5858
5859 func (c *ManagementCustomDataSourcesListCall) MaxResults(maxResults int64) *ManagementCustomDataSourcesListCall {
5860 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
5861 return c
5862 }
5863
5864
5865
5866
5867 func (c *ManagementCustomDataSourcesListCall) StartIndex(startIndex int64) *ManagementCustomDataSourcesListCall {
5868 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
5869 return c
5870 }
5871
5872
5873
5874
5875 func (c *ManagementCustomDataSourcesListCall) Fields(s ...googleapi.Field) *ManagementCustomDataSourcesListCall {
5876 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5877 return c
5878 }
5879
5880
5881
5882
5883 func (c *ManagementCustomDataSourcesListCall) IfNoneMatch(entityTag string) *ManagementCustomDataSourcesListCall {
5884 c.ifNoneMatch_ = entityTag
5885 return c
5886 }
5887
5888
5889 func (c *ManagementCustomDataSourcesListCall) Context(ctx context.Context) *ManagementCustomDataSourcesListCall {
5890 c.ctx_ = ctx
5891 return c
5892 }
5893
5894
5895
5896 func (c *ManagementCustomDataSourcesListCall) Header() http.Header {
5897 if c.header_ == nil {
5898 c.header_ = make(http.Header)
5899 }
5900 return c.header_
5901 }
5902
5903 func (c *ManagementCustomDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
5904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5905 if c.ifNoneMatch_ != "" {
5906 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5907 }
5908 var body io.Reader = nil
5909 c.urlParams_.Set("alt", alt)
5910 c.urlParams_.Set("prettyPrint", "false")
5911 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources")
5912 urls += "?" + c.urlParams_.Encode()
5913 req, err := http.NewRequest("GET", urls, body)
5914 if err != nil {
5915 return nil, err
5916 }
5917 req.Header = reqHeaders
5918 googleapi.Expand(req.URL, map[string]string{
5919 "accountId": c.accountId,
5920 "webPropertyId": c.webPropertyId,
5921 })
5922 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5923 }
5924
5925
5926
5927
5928
5929
5930
5931 func (c *ManagementCustomDataSourcesListCall) Do(opts ...googleapi.CallOption) (*CustomDataSources, error) {
5932 gensupport.SetOptions(c.urlParams_, opts...)
5933 res, err := c.doRequest("json")
5934 if res != nil && res.StatusCode == http.StatusNotModified {
5935 if res.Body != nil {
5936 res.Body.Close()
5937 }
5938 return nil, gensupport.WrapError(&googleapi.Error{
5939 Code: res.StatusCode,
5940 Header: res.Header,
5941 })
5942 }
5943 if err != nil {
5944 return nil, err
5945 }
5946 defer googleapi.CloseBody(res)
5947 if err := googleapi.CheckResponse(res); err != nil {
5948 return nil, gensupport.WrapError(err)
5949 }
5950 ret := &CustomDataSources{
5951 ServerResponse: googleapi.ServerResponse{
5952 Header: res.Header,
5953 HTTPStatusCode: res.StatusCode,
5954 },
5955 }
5956 target := &ret
5957 if err := gensupport.DecodeResponse(target, res); err != nil {
5958 return nil, err
5959 }
5960 return ret, nil
5961 }
5962
5963 type ManagementCustomDimensionsGetCall struct {
5964 s *Service
5965 accountId string
5966 webPropertyId string
5967 customDimensionId string
5968 urlParams_ gensupport.URLParams
5969 ifNoneMatch_ string
5970 ctx_ context.Context
5971 header_ http.Header
5972 }
5973
5974
5975
5976
5977
5978
5979 func (r *ManagementCustomDimensionsService) Get(accountId string, webPropertyId string, customDimensionId string) *ManagementCustomDimensionsGetCall {
5980 c := &ManagementCustomDimensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5981 c.accountId = accountId
5982 c.webPropertyId = webPropertyId
5983 c.customDimensionId = customDimensionId
5984 return c
5985 }
5986
5987
5988
5989
5990 func (c *ManagementCustomDimensionsGetCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsGetCall {
5991 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5992 return c
5993 }
5994
5995
5996
5997
5998 func (c *ManagementCustomDimensionsGetCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsGetCall {
5999 c.ifNoneMatch_ = entityTag
6000 return c
6001 }
6002
6003
6004 func (c *ManagementCustomDimensionsGetCall) Context(ctx context.Context) *ManagementCustomDimensionsGetCall {
6005 c.ctx_ = ctx
6006 return c
6007 }
6008
6009
6010
6011 func (c *ManagementCustomDimensionsGetCall) Header() http.Header {
6012 if c.header_ == nil {
6013 c.header_ = make(http.Header)
6014 }
6015 return c.header_
6016 }
6017
6018 func (c *ManagementCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
6019 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6020 if c.ifNoneMatch_ != "" {
6021 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6022 }
6023 var body io.Reader = nil
6024 c.urlParams_.Set("alt", alt)
6025 c.urlParams_.Set("prettyPrint", "false")
6026 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
6027 urls += "?" + c.urlParams_.Encode()
6028 req, err := http.NewRequest("GET", urls, body)
6029 if err != nil {
6030 return nil, err
6031 }
6032 req.Header = reqHeaders
6033 googleapi.Expand(req.URL, map[string]string{
6034 "accountId": c.accountId,
6035 "webPropertyId": c.webPropertyId,
6036 "customDimensionId": c.customDimensionId,
6037 })
6038 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6039 }
6040
6041
6042
6043
6044
6045
6046
6047 func (c *ManagementCustomDimensionsGetCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
6048 gensupport.SetOptions(c.urlParams_, opts...)
6049 res, err := c.doRequest("json")
6050 if res != nil && res.StatusCode == http.StatusNotModified {
6051 if res.Body != nil {
6052 res.Body.Close()
6053 }
6054 return nil, gensupport.WrapError(&googleapi.Error{
6055 Code: res.StatusCode,
6056 Header: res.Header,
6057 })
6058 }
6059 if err != nil {
6060 return nil, err
6061 }
6062 defer googleapi.CloseBody(res)
6063 if err := googleapi.CheckResponse(res); err != nil {
6064 return nil, gensupport.WrapError(err)
6065 }
6066 ret := &CustomDimension{
6067 ServerResponse: googleapi.ServerResponse{
6068 Header: res.Header,
6069 HTTPStatusCode: res.StatusCode,
6070 },
6071 }
6072 target := &ret
6073 if err := gensupport.DecodeResponse(target, res); err != nil {
6074 return nil, err
6075 }
6076 return ret, nil
6077 }
6078
6079 type ManagementCustomDimensionsInsertCall struct {
6080 s *Service
6081 accountId string
6082 webPropertyId string
6083 customdimension *CustomDimension
6084 urlParams_ gensupport.URLParams
6085 ctx_ context.Context
6086 header_ http.Header
6087 }
6088
6089
6090
6091
6092
6093 func (r *ManagementCustomDimensionsService) Insert(accountId string, webPropertyId string, customdimension *CustomDimension) *ManagementCustomDimensionsInsertCall {
6094 c := &ManagementCustomDimensionsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6095 c.accountId = accountId
6096 c.webPropertyId = webPropertyId
6097 c.customdimension = customdimension
6098 return c
6099 }
6100
6101
6102
6103
6104 func (c *ManagementCustomDimensionsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsInsertCall {
6105 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6106 return c
6107 }
6108
6109
6110 func (c *ManagementCustomDimensionsInsertCall) Context(ctx context.Context) *ManagementCustomDimensionsInsertCall {
6111 c.ctx_ = ctx
6112 return c
6113 }
6114
6115
6116
6117 func (c *ManagementCustomDimensionsInsertCall) Header() http.Header {
6118 if c.header_ == nil {
6119 c.header_ = make(http.Header)
6120 }
6121 return c.header_
6122 }
6123
6124 func (c *ManagementCustomDimensionsInsertCall) doRequest(alt string) (*http.Response, error) {
6125 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6126 var body io.Reader = nil
6127 body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
6128 if err != nil {
6129 return nil, err
6130 }
6131 c.urlParams_.Set("alt", alt)
6132 c.urlParams_.Set("prettyPrint", "false")
6133 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
6134 urls += "?" + c.urlParams_.Encode()
6135 req, err := http.NewRequest("POST", urls, body)
6136 if err != nil {
6137 return nil, err
6138 }
6139 req.Header = reqHeaders
6140 googleapi.Expand(req.URL, map[string]string{
6141 "accountId": c.accountId,
6142 "webPropertyId": c.webPropertyId,
6143 })
6144 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6145 }
6146
6147
6148
6149
6150
6151
6152
6153 func (c *ManagementCustomDimensionsInsertCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
6154 gensupport.SetOptions(c.urlParams_, opts...)
6155 res, err := c.doRequest("json")
6156 if res != nil && res.StatusCode == http.StatusNotModified {
6157 if res.Body != nil {
6158 res.Body.Close()
6159 }
6160 return nil, gensupport.WrapError(&googleapi.Error{
6161 Code: res.StatusCode,
6162 Header: res.Header,
6163 })
6164 }
6165 if err != nil {
6166 return nil, err
6167 }
6168 defer googleapi.CloseBody(res)
6169 if err := googleapi.CheckResponse(res); err != nil {
6170 return nil, gensupport.WrapError(err)
6171 }
6172 ret := &CustomDimension{
6173 ServerResponse: googleapi.ServerResponse{
6174 Header: res.Header,
6175 HTTPStatusCode: res.StatusCode,
6176 },
6177 }
6178 target := &ret
6179 if err := gensupport.DecodeResponse(target, res); err != nil {
6180 return nil, err
6181 }
6182 return ret, nil
6183 }
6184
6185 type ManagementCustomDimensionsListCall struct {
6186 s *Service
6187 accountId string
6188 webPropertyId string
6189 urlParams_ gensupport.URLParams
6190 ifNoneMatch_ string
6191 ctx_ context.Context
6192 header_ http.Header
6193 }
6194
6195
6196
6197
6198
6199 func (r *ManagementCustomDimensionsService) List(accountId string, webPropertyId string) *ManagementCustomDimensionsListCall {
6200 c := &ManagementCustomDimensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6201 c.accountId = accountId
6202 c.webPropertyId = webPropertyId
6203 return c
6204 }
6205
6206
6207
6208 func (c *ManagementCustomDimensionsListCall) MaxResults(maxResults int64) *ManagementCustomDimensionsListCall {
6209 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6210 return c
6211 }
6212
6213
6214
6215
6216 func (c *ManagementCustomDimensionsListCall) StartIndex(startIndex int64) *ManagementCustomDimensionsListCall {
6217 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6218 return c
6219 }
6220
6221
6222
6223
6224 func (c *ManagementCustomDimensionsListCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsListCall {
6225 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6226 return c
6227 }
6228
6229
6230
6231
6232 func (c *ManagementCustomDimensionsListCall) IfNoneMatch(entityTag string) *ManagementCustomDimensionsListCall {
6233 c.ifNoneMatch_ = entityTag
6234 return c
6235 }
6236
6237
6238 func (c *ManagementCustomDimensionsListCall) Context(ctx context.Context) *ManagementCustomDimensionsListCall {
6239 c.ctx_ = ctx
6240 return c
6241 }
6242
6243
6244
6245 func (c *ManagementCustomDimensionsListCall) Header() http.Header {
6246 if c.header_ == nil {
6247 c.header_ = make(http.Header)
6248 }
6249 return c.header_
6250 }
6251
6252 func (c *ManagementCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
6253 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6254 if c.ifNoneMatch_ != "" {
6255 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6256 }
6257 var body io.Reader = nil
6258 c.urlParams_.Set("alt", alt)
6259 c.urlParams_.Set("prettyPrint", "false")
6260 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions")
6261 urls += "?" + c.urlParams_.Encode()
6262 req, err := http.NewRequest("GET", urls, body)
6263 if err != nil {
6264 return nil, err
6265 }
6266 req.Header = reqHeaders
6267 googleapi.Expand(req.URL, map[string]string{
6268 "accountId": c.accountId,
6269 "webPropertyId": c.webPropertyId,
6270 })
6271 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6272 }
6273
6274
6275
6276
6277
6278
6279
6280 func (c *ManagementCustomDimensionsListCall) Do(opts ...googleapi.CallOption) (*CustomDimensions, error) {
6281 gensupport.SetOptions(c.urlParams_, opts...)
6282 res, err := c.doRequest("json")
6283 if res != nil && res.StatusCode == http.StatusNotModified {
6284 if res.Body != nil {
6285 res.Body.Close()
6286 }
6287 return nil, gensupport.WrapError(&googleapi.Error{
6288 Code: res.StatusCode,
6289 Header: res.Header,
6290 })
6291 }
6292 if err != nil {
6293 return nil, err
6294 }
6295 defer googleapi.CloseBody(res)
6296 if err := googleapi.CheckResponse(res); err != nil {
6297 return nil, gensupport.WrapError(err)
6298 }
6299 ret := &CustomDimensions{
6300 ServerResponse: googleapi.ServerResponse{
6301 Header: res.Header,
6302 HTTPStatusCode: res.StatusCode,
6303 },
6304 }
6305 target := &ret
6306 if err := gensupport.DecodeResponse(target, res); err != nil {
6307 return nil, err
6308 }
6309 return ret, nil
6310 }
6311
6312 type ManagementCustomDimensionsPatchCall struct {
6313 s *Service
6314 accountId string
6315 webPropertyId string
6316 customDimensionId string
6317 customdimension *CustomDimension
6318 urlParams_ gensupport.URLParams
6319 ctx_ context.Context
6320 header_ http.Header
6321 }
6322
6323
6324
6325
6326
6327
6328
6329 func (r *ManagementCustomDimensionsService) Patch(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsPatchCall {
6330 c := &ManagementCustomDimensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6331 c.accountId = accountId
6332 c.webPropertyId = webPropertyId
6333 c.customDimensionId = customDimensionId
6334 c.customdimension = customdimension
6335 return c
6336 }
6337
6338
6339
6340
6341
6342 func (c *ManagementCustomDimensionsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsPatchCall {
6343 c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
6344 return c
6345 }
6346
6347
6348
6349
6350 func (c *ManagementCustomDimensionsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsPatchCall {
6351 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6352 return c
6353 }
6354
6355
6356 func (c *ManagementCustomDimensionsPatchCall) Context(ctx context.Context) *ManagementCustomDimensionsPatchCall {
6357 c.ctx_ = ctx
6358 return c
6359 }
6360
6361
6362
6363 func (c *ManagementCustomDimensionsPatchCall) Header() http.Header {
6364 if c.header_ == nil {
6365 c.header_ = make(http.Header)
6366 }
6367 return c.header_
6368 }
6369
6370 func (c *ManagementCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
6371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6372 var body io.Reader = nil
6373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
6374 if err != nil {
6375 return nil, err
6376 }
6377 c.urlParams_.Set("alt", alt)
6378 c.urlParams_.Set("prettyPrint", "false")
6379 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
6380 urls += "?" + c.urlParams_.Encode()
6381 req, err := http.NewRequest("PATCH", urls, body)
6382 if err != nil {
6383 return nil, err
6384 }
6385 req.Header = reqHeaders
6386 googleapi.Expand(req.URL, map[string]string{
6387 "accountId": c.accountId,
6388 "webPropertyId": c.webPropertyId,
6389 "customDimensionId": c.customDimensionId,
6390 })
6391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6392 }
6393
6394
6395
6396
6397
6398
6399
6400 func (c *ManagementCustomDimensionsPatchCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
6401 gensupport.SetOptions(c.urlParams_, opts...)
6402 res, err := c.doRequest("json")
6403 if res != nil && res.StatusCode == http.StatusNotModified {
6404 if res.Body != nil {
6405 res.Body.Close()
6406 }
6407 return nil, gensupport.WrapError(&googleapi.Error{
6408 Code: res.StatusCode,
6409 Header: res.Header,
6410 })
6411 }
6412 if err != nil {
6413 return nil, err
6414 }
6415 defer googleapi.CloseBody(res)
6416 if err := googleapi.CheckResponse(res); err != nil {
6417 return nil, gensupport.WrapError(err)
6418 }
6419 ret := &CustomDimension{
6420 ServerResponse: googleapi.ServerResponse{
6421 Header: res.Header,
6422 HTTPStatusCode: res.StatusCode,
6423 },
6424 }
6425 target := &ret
6426 if err := gensupport.DecodeResponse(target, res); err != nil {
6427 return nil, err
6428 }
6429 return ret, nil
6430 }
6431
6432 type ManagementCustomDimensionsUpdateCall struct {
6433 s *Service
6434 accountId string
6435 webPropertyId string
6436 customDimensionId string
6437 customdimension *CustomDimension
6438 urlParams_ gensupport.URLParams
6439 ctx_ context.Context
6440 header_ http.Header
6441 }
6442
6443
6444
6445
6446
6447
6448 func (r *ManagementCustomDimensionsService) Update(accountId string, webPropertyId string, customDimensionId string, customdimension *CustomDimension) *ManagementCustomDimensionsUpdateCall {
6449 c := &ManagementCustomDimensionsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6450 c.accountId = accountId
6451 c.webPropertyId = webPropertyId
6452 c.customDimensionId = customDimensionId
6453 c.customdimension = customdimension
6454 return c
6455 }
6456
6457
6458
6459
6460
6461 func (c *ManagementCustomDimensionsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomDimensionsUpdateCall {
6462 c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
6463 return c
6464 }
6465
6466
6467
6468
6469 func (c *ManagementCustomDimensionsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomDimensionsUpdateCall {
6470 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6471 return c
6472 }
6473
6474
6475 func (c *ManagementCustomDimensionsUpdateCall) Context(ctx context.Context) *ManagementCustomDimensionsUpdateCall {
6476 c.ctx_ = ctx
6477 return c
6478 }
6479
6480
6481
6482 func (c *ManagementCustomDimensionsUpdateCall) Header() http.Header {
6483 if c.header_ == nil {
6484 c.header_ = make(http.Header)
6485 }
6486 return c.header_
6487 }
6488
6489 func (c *ManagementCustomDimensionsUpdateCall) doRequest(alt string) (*http.Response, error) {
6490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6491 var body io.Reader = nil
6492 body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
6493 if err != nil {
6494 return nil, err
6495 }
6496 c.urlParams_.Set("alt", alt)
6497 c.urlParams_.Set("prettyPrint", "false")
6498 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}")
6499 urls += "?" + c.urlParams_.Encode()
6500 req, err := http.NewRequest("PUT", urls, body)
6501 if err != nil {
6502 return nil, err
6503 }
6504 req.Header = reqHeaders
6505 googleapi.Expand(req.URL, map[string]string{
6506 "accountId": c.accountId,
6507 "webPropertyId": c.webPropertyId,
6508 "customDimensionId": c.customDimensionId,
6509 })
6510 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6511 }
6512
6513
6514
6515
6516
6517
6518
6519 func (c *ManagementCustomDimensionsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomDimension, error) {
6520 gensupport.SetOptions(c.urlParams_, opts...)
6521 res, err := c.doRequest("json")
6522 if res != nil && res.StatusCode == http.StatusNotModified {
6523 if res.Body != nil {
6524 res.Body.Close()
6525 }
6526 return nil, gensupport.WrapError(&googleapi.Error{
6527 Code: res.StatusCode,
6528 Header: res.Header,
6529 })
6530 }
6531 if err != nil {
6532 return nil, err
6533 }
6534 defer googleapi.CloseBody(res)
6535 if err := googleapi.CheckResponse(res); err != nil {
6536 return nil, gensupport.WrapError(err)
6537 }
6538 ret := &CustomDimension{
6539 ServerResponse: googleapi.ServerResponse{
6540 Header: res.Header,
6541 HTTPStatusCode: res.StatusCode,
6542 },
6543 }
6544 target := &ret
6545 if err := gensupport.DecodeResponse(target, res); err != nil {
6546 return nil, err
6547 }
6548 return ret, nil
6549 }
6550
6551 type ManagementCustomMetricsGetCall struct {
6552 s *Service
6553 accountId string
6554 webPropertyId string
6555 customMetricId string
6556 urlParams_ gensupport.URLParams
6557 ifNoneMatch_ string
6558 ctx_ context.Context
6559 header_ http.Header
6560 }
6561
6562
6563
6564
6565
6566
6567 func (r *ManagementCustomMetricsService) Get(accountId string, webPropertyId string, customMetricId string) *ManagementCustomMetricsGetCall {
6568 c := &ManagementCustomMetricsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6569 c.accountId = accountId
6570 c.webPropertyId = webPropertyId
6571 c.customMetricId = customMetricId
6572 return c
6573 }
6574
6575
6576
6577
6578 func (c *ManagementCustomMetricsGetCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsGetCall {
6579 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6580 return c
6581 }
6582
6583
6584
6585
6586 func (c *ManagementCustomMetricsGetCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsGetCall {
6587 c.ifNoneMatch_ = entityTag
6588 return c
6589 }
6590
6591
6592 func (c *ManagementCustomMetricsGetCall) Context(ctx context.Context) *ManagementCustomMetricsGetCall {
6593 c.ctx_ = ctx
6594 return c
6595 }
6596
6597
6598
6599 func (c *ManagementCustomMetricsGetCall) Header() http.Header {
6600 if c.header_ == nil {
6601 c.header_ = make(http.Header)
6602 }
6603 return c.header_
6604 }
6605
6606 func (c *ManagementCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
6607 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6608 if c.ifNoneMatch_ != "" {
6609 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6610 }
6611 var body io.Reader = nil
6612 c.urlParams_.Set("alt", alt)
6613 c.urlParams_.Set("prettyPrint", "false")
6614 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
6615 urls += "?" + c.urlParams_.Encode()
6616 req, err := http.NewRequest("GET", urls, body)
6617 if err != nil {
6618 return nil, err
6619 }
6620 req.Header = reqHeaders
6621 googleapi.Expand(req.URL, map[string]string{
6622 "accountId": c.accountId,
6623 "webPropertyId": c.webPropertyId,
6624 "customMetricId": c.customMetricId,
6625 })
6626 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6627 }
6628
6629
6630
6631
6632
6633
6634 func (c *ManagementCustomMetricsGetCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
6635 gensupport.SetOptions(c.urlParams_, opts...)
6636 res, err := c.doRequest("json")
6637 if res != nil && res.StatusCode == http.StatusNotModified {
6638 if res.Body != nil {
6639 res.Body.Close()
6640 }
6641 return nil, gensupport.WrapError(&googleapi.Error{
6642 Code: res.StatusCode,
6643 Header: res.Header,
6644 })
6645 }
6646 if err != nil {
6647 return nil, err
6648 }
6649 defer googleapi.CloseBody(res)
6650 if err := googleapi.CheckResponse(res); err != nil {
6651 return nil, gensupport.WrapError(err)
6652 }
6653 ret := &CustomMetric{
6654 ServerResponse: googleapi.ServerResponse{
6655 Header: res.Header,
6656 HTTPStatusCode: res.StatusCode,
6657 },
6658 }
6659 target := &ret
6660 if err := gensupport.DecodeResponse(target, res); err != nil {
6661 return nil, err
6662 }
6663 return ret, nil
6664 }
6665
6666 type ManagementCustomMetricsInsertCall struct {
6667 s *Service
6668 accountId string
6669 webPropertyId string
6670 custommetric *CustomMetric
6671 urlParams_ gensupport.URLParams
6672 ctx_ context.Context
6673 header_ http.Header
6674 }
6675
6676
6677
6678
6679
6680 func (r *ManagementCustomMetricsService) Insert(accountId string, webPropertyId string, custommetric *CustomMetric) *ManagementCustomMetricsInsertCall {
6681 c := &ManagementCustomMetricsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6682 c.accountId = accountId
6683 c.webPropertyId = webPropertyId
6684 c.custommetric = custommetric
6685 return c
6686 }
6687
6688
6689
6690
6691 func (c *ManagementCustomMetricsInsertCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsInsertCall {
6692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6693 return c
6694 }
6695
6696
6697 func (c *ManagementCustomMetricsInsertCall) Context(ctx context.Context) *ManagementCustomMetricsInsertCall {
6698 c.ctx_ = ctx
6699 return c
6700 }
6701
6702
6703
6704 func (c *ManagementCustomMetricsInsertCall) Header() http.Header {
6705 if c.header_ == nil {
6706 c.header_ = make(http.Header)
6707 }
6708 return c.header_
6709 }
6710
6711 func (c *ManagementCustomMetricsInsertCall) doRequest(alt string) (*http.Response, error) {
6712 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6713 var body io.Reader = nil
6714 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
6715 if err != nil {
6716 return nil, err
6717 }
6718 c.urlParams_.Set("alt", alt)
6719 c.urlParams_.Set("prettyPrint", "false")
6720 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
6721 urls += "?" + c.urlParams_.Encode()
6722 req, err := http.NewRequest("POST", urls, body)
6723 if err != nil {
6724 return nil, err
6725 }
6726 req.Header = reqHeaders
6727 googleapi.Expand(req.URL, map[string]string{
6728 "accountId": c.accountId,
6729 "webPropertyId": c.webPropertyId,
6730 })
6731 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6732 }
6733
6734
6735
6736
6737
6738
6739 func (c *ManagementCustomMetricsInsertCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
6740 gensupport.SetOptions(c.urlParams_, opts...)
6741 res, err := c.doRequest("json")
6742 if res != nil && res.StatusCode == http.StatusNotModified {
6743 if res.Body != nil {
6744 res.Body.Close()
6745 }
6746 return nil, gensupport.WrapError(&googleapi.Error{
6747 Code: res.StatusCode,
6748 Header: res.Header,
6749 })
6750 }
6751 if err != nil {
6752 return nil, err
6753 }
6754 defer googleapi.CloseBody(res)
6755 if err := googleapi.CheckResponse(res); err != nil {
6756 return nil, gensupport.WrapError(err)
6757 }
6758 ret := &CustomMetric{
6759 ServerResponse: googleapi.ServerResponse{
6760 Header: res.Header,
6761 HTTPStatusCode: res.StatusCode,
6762 },
6763 }
6764 target := &ret
6765 if err := gensupport.DecodeResponse(target, res); err != nil {
6766 return nil, err
6767 }
6768 return ret, nil
6769 }
6770
6771 type ManagementCustomMetricsListCall struct {
6772 s *Service
6773 accountId string
6774 webPropertyId string
6775 urlParams_ gensupport.URLParams
6776 ifNoneMatch_ string
6777 ctx_ context.Context
6778 header_ http.Header
6779 }
6780
6781
6782
6783
6784
6785 func (r *ManagementCustomMetricsService) List(accountId string, webPropertyId string) *ManagementCustomMetricsListCall {
6786 c := &ManagementCustomMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6787 c.accountId = accountId
6788 c.webPropertyId = webPropertyId
6789 return c
6790 }
6791
6792
6793
6794 func (c *ManagementCustomMetricsListCall) MaxResults(maxResults int64) *ManagementCustomMetricsListCall {
6795 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
6796 return c
6797 }
6798
6799
6800
6801
6802 func (c *ManagementCustomMetricsListCall) StartIndex(startIndex int64) *ManagementCustomMetricsListCall {
6803 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
6804 return c
6805 }
6806
6807
6808
6809
6810 func (c *ManagementCustomMetricsListCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsListCall {
6811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6812 return c
6813 }
6814
6815
6816
6817
6818 func (c *ManagementCustomMetricsListCall) IfNoneMatch(entityTag string) *ManagementCustomMetricsListCall {
6819 c.ifNoneMatch_ = entityTag
6820 return c
6821 }
6822
6823
6824 func (c *ManagementCustomMetricsListCall) Context(ctx context.Context) *ManagementCustomMetricsListCall {
6825 c.ctx_ = ctx
6826 return c
6827 }
6828
6829
6830
6831 func (c *ManagementCustomMetricsListCall) Header() http.Header {
6832 if c.header_ == nil {
6833 c.header_ = make(http.Header)
6834 }
6835 return c.header_
6836 }
6837
6838 func (c *ManagementCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
6839 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6840 if c.ifNoneMatch_ != "" {
6841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6842 }
6843 var body io.Reader = nil
6844 c.urlParams_.Set("alt", alt)
6845 c.urlParams_.Set("prettyPrint", "false")
6846 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics")
6847 urls += "?" + c.urlParams_.Encode()
6848 req, err := http.NewRequest("GET", urls, body)
6849 if err != nil {
6850 return nil, err
6851 }
6852 req.Header = reqHeaders
6853 googleapi.Expand(req.URL, map[string]string{
6854 "accountId": c.accountId,
6855 "webPropertyId": c.webPropertyId,
6856 })
6857 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6858 }
6859
6860
6861
6862
6863
6864
6865 func (c *ManagementCustomMetricsListCall) Do(opts ...googleapi.CallOption) (*CustomMetrics, error) {
6866 gensupport.SetOptions(c.urlParams_, opts...)
6867 res, err := c.doRequest("json")
6868 if res != nil && res.StatusCode == http.StatusNotModified {
6869 if res.Body != nil {
6870 res.Body.Close()
6871 }
6872 return nil, gensupport.WrapError(&googleapi.Error{
6873 Code: res.StatusCode,
6874 Header: res.Header,
6875 })
6876 }
6877 if err != nil {
6878 return nil, err
6879 }
6880 defer googleapi.CloseBody(res)
6881 if err := googleapi.CheckResponse(res); err != nil {
6882 return nil, gensupport.WrapError(err)
6883 }
6884 ret := &CustomMetrics{
6885 ServerResponse: googleapi.ServerResponse{
6886 Header: res.Header,
6887 HTTPStatusCode: res.StatusCode,
6888 },
6889 }
6890 target := &ret
6891 if err := gensupport.DecodeResponse(target, res); err != nil {
6892 return nil, err
6893 }
6894 return ret, nil
6895 }
6896
6897 type ManagementCustomMetricsPatchCall struct {
6898 s *Service
6899 accountId string
6900 webPropertyId string
6901 customMetricId string
6902 custommetric *CustomMetric
6903 urlParams_ gensupport.URLParams
6904 ctx_ context.Context
6905 header_ http.Header
6906 }
6907
6908
6909
6910
6911
6912
6913
6914 func (r *ManagementCustomMetricsService) Patch(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsPatchCall {
6915 c := &ManagementCustomMetricsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6916 c.accountId = accountId
6917 c.webPropertyId = webPropertyId
6918 c.customMetricId = customMetricId
6919 c.custommetric = custommetric
6920 return c
6921 }
6922
6923
6924
6925
6926
6927 func (c *ManagementCustomMetricsPatchCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsPatchCall {
6928 c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
6929 return c
6930 }
6931
6932
6933
6934
6935 func (c *ManagementCustomMetricsPatchCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsPatchCall {
6936 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6937 return c
6938 }
6939
6940
6941 func (c *ManagementCustomMetricsPatchCall) Context(ctx context.Context) *ManagementCustomMetricsPatchCall {
6942 c.ctx_ = ctx
6943 return c
6944 }
6945
6946
6947
6948 func (c *ManagementCustomMetricsPatchCall) Header() http.Header {
6949 if c.header_ == nil {
6950 c.header_ = make(http.Header)
6951 }
6952 return c.header_
6953 }
6954
6955 func (c *ManagementCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
6956 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6957 var body io.Reader = nil
6958 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
6959 if err != nil {
6960 return nil, err
6961 }
6962 c.urlParams_.Set("alt", alt)
6963 c.urlParams_.Set("prettyPrint", "false")
6964 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
6965 urls += "?" + c.urlParams_.Encode()
6966 req, err := http.NewRequest("PATCH", urls, body)
6967 if err != nil {
6968 return nil, err
6969 }
6970 req.Header = reqHeaders
6971 googleapi.Expand(req.URL, map[string]string{
6972 "accountId": c.accountId,
6973 "webPropertyId": c.webPropertyId,
6974 "customMetricId": c.customMetricId,
6975 })
6976 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6977 }
6978
6979
6980
6981
6982
6983
6984 func (c *ManagementCustomMetricsPatchCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
6985 gensupport.SetOptions(c.urlParams_, opts...)
6986 res, err := c.doRequest("json")
6987 if res != nil && res.StatusCode == http.StatusNotModified {
6988 if res.Body != nil {
6989 res.Body.Close()
6990 }
6991 return nil, gensupport.WrapError(&googleapi.Error{
6992 Code: res.StatusCode,
6993 Header: res.Header,
6994 })
6995 }
6996 if err != nil {
6997 return nil, err
6998 }
6999 defer googleapi.CloseBody(res)
7000 if err := googleapi.CheckResponse(res); err != nil {
7001 return nil, gensupport.WrapError(err)
7002 }
7003 ret := &CustomMetric{
7004 ServerResponse: googleapi.ServerResponse{
7005 Header: res.Header,
7006 HTTPStatusCode: res.StatusCode,
7007 },
7008 }
7009 target := &ret
7010 if err := gensupport.DecodeResponse(target, res); err != nil {
7011 return nil, err
7012 }
7013 return ret, nil
7014 }
7015
7016 type ManagementCustomMetricsUpdateCall struct {
7017 s *Service
7018 accountId string
7019 webPropertyId string
7020 customMetricId string
7021 custommetric *CustomMetric
7022 urlParams_ gensupport.URLParams
7023 ctx_ context.Context
7024 header_ http.Header
7025 }
7026
7027
7028
7029
7030
7031
7032 func (r *ManagementCustomMetricsService) Update(accountId string, webPropertyId string, customMetricId string, custommetric *CustomMetric) *ManagementCustomMetricsUpdateCall {
7033 c := &ManagementCustomMetricsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7034 c.accountId = accountId
7035 c.webPropertyId = webPropertyId
7036 c.customMetricId = customMetricId
7037 c.custommetric = custommetric
7038 return c
7039 }
7040
7041
7042
7043
7044
7045 func (c *ManagementCustomMetricsUpdateCall) IgnoreCustomDataSourceLinks(ignoreCustomDataSourceLinks bool) *ManagementCustomMetricsUpdateCall {
7046 c.urlParams_.Set("ignoreCustomDataSourceLinks", fmt.Sprint(ignoreCustomDataSourceLinks))
7047 return c
7048 }
7049
7050
7051
7052
7053 func (c *ManagementCustomMetricsUpdateCall) Fields(s ...googleapi.Field) *ManagementCustomMetricsUpdateCall {
7054 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7055 return c
7056 }
7057
7058
7059 func (c *ManagementCustomMetricsUpdateCall) Context(ctx context.Context) *ManagementCustomMetricsUpdateCall {
7060 c.ctx_ = ctx
7061 return c
7062 }
7063
7064
7065
7066 func (c *ManagementCustomMetricsUpdateCall) Header() http.Header {
7067 if c.header_ == nil {
7068 c.header_ = make(http.Header)
7069 }
7070 return c.header_
7071 }
7072
7073 func (c *ManagementCustomMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
7074 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7075 var body io.Reader = nil
7076 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
7077 if err != nil {
7078 return nil, err
7079 }
7080 c.urlParams_.Set("alt", alt)
7081 c.urlParams_.Set("prettyPrint", "false")
7082 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}")
7083 urls += "?" + c.urlParams_.Encode()
7084 req, err := http.NewRequest("PUT", urls, body)
7085 if err != nil {
7086 return nil, err
7087 }
7088 req.Header = reqHeaders
7089 googleapi.Expand(req.URL, map[string]string{
7090 "accountId": c.accountId,
7091 "webPropertyId": c.webPropertyId,
7092 "customMetricId": c.customMetricId,
7093 })
7094 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7095 }
7096
7097
7098
7099
7100
7101
7102 func (c *ManagementCustomMetricsUpdateCall) Do(opts ...googleapi.CallOption) (*CustomMetric, error) {
7103 gensupport.SetOptions(c.urlParams_, opts...)
7104 res, err := c.doRequest("json")
7105 if res != nil && res.StatusCode == http.StatusNotModified {
7106 if res.Body != nil {
7107 res.Body.Close()
7108 }
7109 return nil, gensupport.WrapError(&googleapi.Error{
7110 Code: res.StatusCode,
7111 Header: res.Header,
7112 })
7113 }
7114 if err != nil {
7115 return nil, err
7116 }
7117 defer googleapi.CloseBody(res)
7118 if err := googleapi.CheckResponse(res); err != nil {
7119 return nil, gensupport.WrapError(err)
7120 }
7121 ret := &CustomMetric{
7122 ServerResponse: googleapi.ServerResponse{
7123 Header: res.Header,
7124 HTTPStatusCode: res.StatusCode,
7125 },
7126 }
7127 target := &ret
7128 if err := gensupport.DecodeResponse(target, res); err != nil {
7129 return nil, err
7130 }
7131 return ret, nil
7132 }
7133
7134 type ManagementExperimentsDeleteCall struct {
7135 s *Service
7136 accountId string
7137 webPropertyId string
7138 profileId string
7139 experimentId string
7140 urlParams_ gensupport.URLParams
7141 ctx_ context.Context
7142 header_ http.Header
7143 }
7144
7145
7146
7147
7148
7149
7150
7151 func (r *ManagementExperimentsService) Delete(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsDeleteCall {
7152 c := &ManagementExperimentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7153 c.accountId = accountId
7154 c.webPropertyId = webPropertyId
7155 c.profileId = profileId
7156 c.experimentId = experimentId
7157 return c
7158 }
7159
7160
7161
7162
7163 func (c *ManagementExperimentsDeleteCall) Fields(s ...googleapi.Field) *ManagementExperimentsDeleteCall {
7164 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7165 return c
7166 }
7167
7168
7169 func (c *ManagementExperimentsDeleteCall) Context(ctx context.Context) *ManagementExperimentsDeleteCall {
7170 c.ctx_ = ctx
7171 return c
7172 }
7173
7174
7175
7176 func (c *ManagementExperimentsDeleteCall) Header() http.Header {
7177 if c.header_ == nil {
7178 c.header_ = make(http.Header)
7179 }
7180 return c.header_
7181 }
7182
7183 func (c *ManagementExperimentsDeleteCall) doRequest(alt string) (*http.Response, error) {
7184 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7185 var body io.Reader = nil
7186 c.urlParams_.Set("alt", alt)
7187 c.urlParams_.Set("prettyPrint", "false")
7188 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
7189 urls += "?" + c.urlParams_.Encode()
7190 req, err := http.NewRequest("DELETE", urls, body)
7191 if err != nil {
7192 return nil, err
7193 }
7194 req.Header = reqHeaders
7195 googleapi.Expand(req.URL, map[string]string{
7196 "accountId": c.accountId,
7197 "webPropertyId": c.webPropertyId,
7198 "profileId": c.profileId,
7199 "experimentId": c.experimentId,
7200 })
7201 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7202 }
7203
7204
7205 func (c *ManagementExperimentsDeleteCall) Do(opts ...googleapi.CallOption) error {
7206 gensupport.SetOptions(c.urlParams_, opts...)
7207 res, err := c.doRequest("json")
7208 if err != nil {
7209 return err
7210 }
7211 defer googleapi.CloseBody(res)
7212 if err := googleapi.CheckResponse(res); err != nil {
7213 return gensupport.WrapError(err)
7214 }
7215 return nil
7216 }
7217
7218 type ManagementExperimentsGetCall struct {
7219 s *Service
7220 accountId string
7221 webPropertyId string
7222 profileId string
7223 experimentId string
7224 urlParams_ gensupport.URLParams
7225 ifNoneMatch_ string
7226 ctx_ context.Context
7227 header_ http.Header
7228 }
7229
7230
7231
7232
7233
7234
7235
7236 func (r *ManagementExperimentsService) Get(accountId string, webPropertyId string, profileId string, experimentId string) *ManagementExperimentsGetCall {
7237 c := &ManagementExperimentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7238 c.accountId = accountId
7239 c.webPropertyId = webPropertyId
7240 c.profileId = profileId
7241 c.experimentId = experimentId
7242 return c
7243 }
7244
7245
7246
7247
7248 func (c *ManagementExperimentsGetCall) Fields(s ...googleapi.Field) *ManagementExperimentsGetCall {
7249 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7250 return c
7251 }
7252
7253
7254
7255
7256 func (c *ManagementExperimentsGetCall) IfNoneMatch(entityTag string) *ManagementExperimentsGetCall {
7257 c.ifNoneMatch_ = entityTag
7258 return c
7259 }
7260
7261
7262 func (c *ManagementExperimentsGetCall) Context(ctx context.Context) *ManagementExperimentsGetCall {
7263 c.ctx_ = ctx
7264 return c
7265 }
7266
7267
7268
7269 func (c *ManagementExperimentsGetCall) Header() http.Header {
7270 if c.header_ == nil {
7271 c.header_ = make(http.Header)
7272 }
7273 return c.header_
7274 }
7275
7276 func (c *ManagementExperimentsGetCall) doRequest(alt string) (*http.Response, error) {
7277 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7278 if c.ifNoneMatch_ != "" {
7279 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7280 }
7281 var body io.Reader = nil
7282 c.urlParams_.Set("alt", alt)
7283 c.urlParams_.Set("prettyPrint", "false")
7284 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
7285 urls += "?" + c.urlParams_.Encode()
7286 req, err := http.NewRequest("GET", urls, body)
7287 if err != nil {
7288 return nil, err
7289 }
7290 req.Header = reqHeaders
7291 googleapi.Expand(req.URL, map[string]string{
7292 "accountId": c.accountId,
7293 "webPropertyId": c.webPropertyId,
7294 "profileId": c.profileId,
7295 "experimentId": c.experimentId,
7296 })
7297 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7298 }
7299
7300
7301
7302
7303
7304
7305 func (c *ManagementExperimentsGetCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
7306 gensupport.SetOptions(c.urlParams_, opts...)
7307 res, err := c.doRequest("json")
7308 if res != nil && res.StatusCode == http.StatusNotModified {
7309 if res.Body != nil {
7310 res.Body.Close()
7311 }
7312 return nil, gensupport.WrapError(&googleapi.Error{
7313 Code: res.StatusCode,
7314 Header: res.Header,
7315 })
7316 }
7317 if err != nil {
7318 return nil, err
7319 }
7320 defer googleapi.CloseBody(res)
7321 if err := googleapi.CheckResponse(res); err != nil {
7322 return nil, gensupport.WrapError(err)
7323 }
7324 ret := &Experiment{
7325 ServerResponse: googleapi.ServerResponse{
7326 Header: res.Header,
7327 HTTPStatusCode: res.StatusCode,
7328 },
7329 }
7330 target := &ret
7331 if err := gensupport.DecodeResponse(target, res); err != nil {
7332 return nil, err
7333 }
7334 return ret, nil
7335 }
7336
7337 type ManagementExperimentsInsertCall struct {
7338 s *Service
7339 accountId string
7340 webPropertyId string
7341 profileId string
7342 experiment *Experiment
7343 urlParams_ gensupport.URLParams
7344 ctx_ context.Context
7345 header_ http.Header
7346 }
7347
7348
7349
7350
7351
7352
7353 func (r *ManagementExperimentsService) Insert(accountId string, webPropertyId string, profileId string, experiment *Experiment) *ManagementExperimentsInsertCall {
7354 c := &ManagementExperimentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7355 c.accountId = accountId
7356 c.webPropertyId = webPropertyId
7357 c.profileId = profileId
7358 c.experiment = experiment
7359 return c
7360 }
7361
7362
7363
7364
7365 func (c *ManagementExperimentsInsertCall) Fields(s ...googleapi.Field) *ManagementExperimentsInsertCall {
7366 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7367 return c
7368 }
7369
7370
7371 func (c *ManagementExperimentsInsertCall) Context(ctx context.Context) *ManagementExperimentsInsertCall {
7372 c.ctx_ = ctx
7373 return c
7374 }
7375
7376
7377
7378 func (c *ManagementExperimentsInsertCall) Header() http.Header {
7379 if c.header_ == nil {
7380 c.header_ = make(http.Header)
7381 }
7382 return c.header_
7383 }
7384
7385 func (c *ManagementExperimentsInsertCall) doRequest(alt string) (*http.Response, error) {
7386 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7387 var body io.Reader = nil
7388 body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
7389 if err != nil {
7390 return nil, err
7391 }
7392 c.urlParams_.Set("alt", alt)
7393 c.urlParams_.Set("prettyPrint", "false")
7394 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
7395 urls += "?" + c.urlParams_.Encode()
7396 req, err := http.NewRequest("POST", urls, body)
7397 if err != nil {
7398 return nil, err
7399 }
7400 req.Header = reqHeaders
7401 googleapi.Expand(req.URL, map[string]string{
7402 "accountId": c.accountId,
7403 "webPropertyId": c.webPropertyId,
7404 "profileId": c.profileId,
7405 })
7406 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7407 }
7408
7409
7410
7411
7412
7413
7414 func (c *ManagementExperimentsInsertCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
7415 gensupport.SetOptions(c.urlParams_, opts...)
7416 res, err := c.doRequest("json")
7417 if res != nil && res.StatusCode == http.StatusNotModified {
7418 if res.Body != nil {
7419 res.Body.Close()
7420 }
7421 return nil, gensupport.WrapError(&googleapi.Error{
7422 Code: res.StatusCode,
7423 Header: res.Header,
7424 })
7425 }
7426 if err != nil {
7427 return nil, err
7428 }
7429 defer googleapi.CloseBody(res)
7430 if err := googleapi.CheckResponse(res); err != nil {
7431 return nil, gensupport.WrapError(err)
7432 }
7433 ret := &Experiment{
7434 ServerResponse: googleapi.ServerResponse{
7435 Header: res.Header,
7436 HTTPStatusCode: res.StatusCode,
7437 },
7438 }
7439 target := &ret
7440 if err := gensupport.DecodeResponse(target, res); err != nil {
7441 return nil, err
7442 }
7443 return ret, nil
7444 }
7445
7446 type ManagementExperimentsListCall struct {
7447 s *Service
7448 accountId string
7449 webPropertyId string
7450 profileId string
7451 urlParams_ gensupport.URLParams
7452 ifNoneMatch_ string
7453 ctx_ context.Context
7454 header_ http.Header
7455 }
7456
7457
7458
7459
7460
7461
7462 func (r *ManagementExperimentsService) List(accountId string, webPropertyId string, profileId string) *ManagementExperimentsListCall {
7463 c := &ManagementExperimentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7464 c.accountId = accountId
7465 c.webPropertyId = webPropertyId
7466 c.profileId = profileId
7467 return c
7468 }
7469
7470
7471
7472 func (c *ManagementExperimentsListCall) MaxResults(maxResults int64) *ManagementExperimentsListCall {
7473 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
7474 return c
7475 }
7476
7477
7478
7479
7480 func (c *ManagementExperimentsListCall) StartIndex(startIndex int64) *ManagementExperimentsListCall {
7481 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
7482 return c
7483 }
7484
7485
7486
7487
7488 func (c *ManagementExperimentsListCall) Fields(s ...googleapi.Field) *ManagementExperimentsListCall {
7489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7490 return c
7491 }
7492
7493
7494
7495
7496 func (c *ManagementExperimentsListCall) IfNoneMatch(entityTag string) *ManagementExperimentsListCall {
7497 c.ifNoneMatch_ = entityTag
7498 return c
7499 }
7500
7501
7502 func (c *ManagementExperimentsListCall) Context(ctx context.Context) *ManagementExperimentsListCall {
7503 c.ctx_ = ctx
7504 return c
7505 }
7506
7507
7508
7509 func (c *ManagementExperimentsListCall) Header() http.Header {
7510 if c.header_ == nil {
7511 c.header_ = make(http.Header)
7512 }
7513 return c.header_
7514 }
7515
7516 func (c *ManagementExperimentsListCall) doRequest(alt string) (*http.Response, error) {
7517 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7518 if c.ifNoneMatch_ != "" {
7519 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7520 }
7521 var body io.Reader = nil
7522 c.urlParams_.Set("alt", alt)
7523 c.urlParams_.Set("prettyPrint", "false")
7524 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments")
7525 urls += "?" + c.urlParams_.Encode()
7526 req, err := http.NewRequest("GET", urls, body)
7527 if err != nil {
7528 return nil, err
7529 }
7530 req.Header = reqHeaders
7531 googleapi.Expand(req.URL, map[string]string{
7532 "accountId": c.accountId,
7533 "webPropertyId": c.webPropertyId,
7534 "profileId": c.profileId,
7535 })
7536 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7537 }
7538
7539
7540
7541
7542
7543
7544 func (c *ManagementExperimentsListCall) Do(opts ...googleapi.CallOption) (*Experiments, error) {
7545 gensupport.SetOptions(c.urlParams_, opts...)
7546 res, err := c.doRequest("json")
7547 if res != nil && res.StatusCode == http.StatusNotModified {
7548 if res.Body != nil {
7549 res.Body.Close()
7550 }
7551 return nil, gensupport.WrapError(&googleapi.Error{
7552 Code: res.StatusCode,
7553 Header: res.Header,
7554 })
7555 }
7556 if err != nil {
7557 return nil, err
7558 }
7559 defer googleapi.CloseBody(res)
7560 if err := googleapi.CheckResponse(res); err != nil {
7561 return nil, gensupport.WrapError(err)
7562 }
7563 ret := &Experiments{
7564 ServerResponse: googleapi.ServerResponse{
7565 Header: res.Header,
7566 HTTPStatusCode: res.StatusCode,
7567 },
7568 }
7569 target := &ret
7570 if err := gensupport.DecodeResponse(target, res); err != nil {
7571 return nil, err
7572 }
7573 return ret, nil
7574 }
7575
7576 type ManagementExperimentsPatchCall struct {
7577 s *Service
7578 accountId string
7579 webPropertyId string
7580 profileId string
7581 experimentId string
7582 experiment *Experiment
7583 urlParams_ gensupport.URLParams
7584 ctx_ context.Context
7585 header_ http.Header
7586 }
7587
7588
7589
7590
7591
7592
7593
7594 func (r *ManagementExperimentsService) Patch(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsPatchCall {
7595 c := &ManagementExperimentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7596 c.accountId = accountId
7597 c.webPropertyId = webPropertyId
7598 c.profileId = profileId
7599 c.experimentId = experimentId
7600 c.experiment = experiment
7601 return c
7602 }
7603
7604
7605
7606
7607 func (c *ManagementExperimentsPatchCall) Fields(s ...googleapi.Field) *ManagementExperimentsPatchCall {
7608 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7609 return c
7610 }
7611
7612
7613 func (c *ManagementExperimentsPatchCall) Context(ctx context.Context) *ManagementExperimentsPatchCall {
7614 c.ctx_ = ctx
7615 return c
7616 }
7617
7618
7619
7620 func (c *ManagementExperimentsPatchCall) Header() http.Header {
7621 if c.header_ == nil {
7622 c.header_ = make(http.Header)
7623 }
7624 return c.header_
7625 }
7626
7627 func (c *ManagementExperimentsPatchCall) doRequest(alt string) (*http.Response, error) {
7628 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7629 var body io.Reader = nil
7630 body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
7631 if err != nil {
7632 return nil, err
7633 }
7634 c.urlParams_.Set("alt", alt)
7635 c.urlParams_.Set("prettyPrint", "false")
7636 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
7637 urls += "?" + c.urlParams_.Encode()
7638 req, err := http.NewRequest("PATCH", urls, body)
7639 if err != nil {
7640 return nil, err
7641 }
7642 req.Header = reqHeaders
7643 googleapi.Expand(req.URL, map[string]string{
7644 "accountId": c.accountId,
7645 "webPropertyId": c.webPropertyId,
7646 "profileId": c.profileId,
7647 "experimentId": c.experimentId,
7648 })
7649 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7650 }
7651
7652
7653
7654
7655
7656
7657 func (c *ManagementExperimentsPatchCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
7658 gensupport.SetOptions(c.urlParams_, opts...)
7659 res, err := c.doRequest("json")
7660 if res != nil && res.StatusCode == http.StatusNotModified {
7661 if res.Body != nil {
7662 res.Body.Close()
7663 }
7664 return nil, gensupport.WrapError(&googleapi.Error{
7665 Code: res.StatusCode,
7666 Header: res.Header,
7667 })
7668 }
7669 if err != nil {
7670 return nil, err
7671 }
7672 defer googleapi.CloseBody(res)
7673 if err := googleapi.CheckResponse(res); err != nil {
7674 return nil, gensupport.WrapError(err)
7675 }
7676 ret := &Experiment{
7677 ServerResponse: googleapi.ServerResponse{
7678 Header: res.Header,
7679 HTTPStatusCode: res.StatusCode,
7680 },
7681 }
7682 target := &ret
7683 if err := gensupport.DecodeResponse(target, res); err != nil {
7684 return nil, err
7685 }
7686 return ret, nil
7687 }
7688
7689 type ManagementExperimentsUpdateCall struct {
7690 s *Service
7691 accountId string
7692 webPropertyId string
7693 profileId string
7694 experimentId string
7695 experiment *Experiment
7696 urlParams_ gensupport.URLParams
7697 ctx_ context.Context
7698 header_ http.Header
7699 }
7700
7701
7702
7703
7704
7705
7706
7707 func (r *ManagementExperimentsService) Update(accountId string, webPropertyId string, profileId string, experimentId string, experiment *Experiment) *ManagementExperimentsUpdateCall {
7708 c := &ManagementExperimentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7709 c.accountId = accountId
7710 c.webPropertyId = webPropertyId
7711 c.profileId = profileId
7712 c.experimentId = experimentId
7713 c.experiment = experiment
7714 return c
7715 }
7716
7717
7718
7719
7720 func (c *ManagementExperimentsUpdateCall) Fields(s ...googleapi.Field) *ManagementExperimentsUpdateCall {
7721 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7722 return c
7723 }
7724
7725
7726 func (c *ManagementExperimentsUpdateCall) Context(ctx context.Context) *ManagementExperimentsUpdateCall {
7727 c.ctx_ = ctx
7728 return c
7729 }
7730
7731
7732
7733 func (c *ManagementExperimentsUpdateCall) Header() http.Header {
7734 if c.header_ == nil {
7735 c.header_ = make(http.Header)
7736 }
7737 return c.header_
7738 }
7739
7740 func (c *ManagementExperimentsUpdateCall) doRequest(alt string) (*http.Response, error) {
7741 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7742 var body io.Reader = nil
7743 body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
7744 if err != nil {
7745 return nil, err
7746 }
7747 c.urlParams_.Set("alt", alt)
7748 c.urlParams_.Set("prettyPrint", "false")
7749 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}")
7750 urls += "?" + c.urlParams_.Encode()
7751 req, err := http.NewRequest("PUT", urls, body)
7752 if err != nil {
7753 return nil, err
7754 }
7755 req.Header = reqHeaders
7756 googleapi.Expand(req.URL, map[string]string{
7757 "accountId": c.accountId,
7758 "webPropertyId": c.webPropertyId,
7759 "profileId": c.profileId,
7760 "experimentId": c.experimentId,
7761 })
7762 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7763 }
7764
7765
7766
7767
7768
7769
7770 func (c *ManagementExperimentsUpdateCall) Do(opts ...googleapi.CallOption) (*Experiment, error) {
7771 gensupport.SetOptions(c.urlParams_, opts...)
7772 res, err := c.doRequest("json")
7773 if res != nil && res.StatusCode == http.StatusNotModified {
7774 if res.Body != nil {
7775 res.Body.Close()
7776 }
7777 return nil, gensupport.WrapError(&googleapi.Error{
7778 Code: res.StatusCode,
7779 Header: res.Header,
7780 })
7781 }
7782 if err != nil {
7783 return nil, err
7784 }
7785 defer googleapi.CloseBody(res)
7786 if err := googleapi.CheckResponse(res); err != nil {
7787 return nil, gensupport.WrapError(err)
7788 }
7789 ret := &Experiment{
7790 ServerResponse: googleapi.ServerResponse{
7791 Header: res.Header,
7792 HTTPStatusCode: res.StatusCode,
7793 },
7794 }
7795 target := &ret
7796 if err := gensupport.DecodeResponse(target, res); err != nil {
7797 return nil, err
7798 }
7799 return ret, nil
7800 }
7801
7802 type ManagementFiltersDeleteCall struct {
7803 s *Service
7804 accountId string
7805 filterId string
7806 urlParams_ gensupport.URLParams
7807 ctx_ context.Context
7808 header_ http.Header
7809 }
7810
7811
7812
7813
7814
7815 func (r *ManagementFiltersService) Delete(accountId string, filterId string) *ManagementFiltersDeleteCall {
7816 c := &ManagementFiltersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7817 c.accountId = accountId
7818 c.filterId = filterId
7819 return c
7820 }
7821
7822
7823
7824
7825 func (c *ManagementFiltersDeleteCall) Fields(s ...googleapi.Field) *ManagementFiltersDeleteCall {
7826 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7827 return c
7828 }
7829
7830
7831 func (c *ManagementFiltersDeleteCall) Context(ctx context.Context) *ManagementFiltersDeleteCall {
7832 c.ctx_ = ctx
7833 return c
7834 }
7835
7836
7837
7838 func (c *ManagementFiltersDeleteCall) Header() http.Header {
7839 if c.header_ == nil {
7840 c.header_ = make(http.Header)
7841 }
7842 return c.header_
7843 }
7844
7845 func (c *ManagementFiltersDeleteCall) doRequest(alt string) (*http.Response, error) {
7846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7847 var body io.Reader = nil
7848 c.urlParams_.Set("alt", alt)
7849 c.urlParams_.Set("prettyPrint", "false")
7850 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
7851 urls += "?" + c.urlParams_.Encode()
7852 req, err := http.NewRequest("DELETE", urls, body)
7853 if err != nil {
7854 return nil, err
7855 }
7856 req.Header = reqHeaders
7857 googleapi.Expand(req.URL, map[string]string{
7858 "accountId": c.accountId,
7859 "filterId": c.filterId,
7860 })
7861 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7862 }
7863
7864
7865
7866
7867
7868
7869 func (c *ManagementFiltersDeleteCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
7870 gensupport.SetOptions(c.urlParams_, opts...)
7871 res, err := c.doRequest("json")
7872 if res != nil && res.StatusCode == http.StatusNotModified {
7873 if res.Body != nil {
7874 res.Body.Close()
7875 }
7876 return nil, gensupport.WrapError(&googleapi.Error{
7877 Code: res.StatusCode,
7878 Header: res.Header,
7879 })
7880 }
7881 if err != nil {
7882 return nil, err
7883 }
7884 defer googleapi.CloseBody(res)
7885 if err := googleapi.CheckResponse(res); err != nil {
7886 return nil, gensupport.WrapError(err)
7887 }
7888 ret := &Filter{
7889 ServerResponse: googleapi.ServerResponse{
7890 Header: res.Header,
7891 HTTPStatusCode: res.StatusCode,
7892 },
7893 }
7894 target := &ret
7895 if err := gensupport.DecodeResponse(target, res); err != nil {
7896 return nil, err
7897 }
7898 return ret, nil
7899 }
7900
7901 type ManagementFiltersGetCall struct {
7902 s *Service
7903 accountId string
7904 filterId string
7905 urlParams_ gensupport.URLParams
7906 ifNoneMatch_ string
7907 ctx_ context.Context
7908 header_ http.Header
7909 }
7910
7911
7912
7913
7914
7915 func (r *ManagementFiltersService) Get(accountId string, filterId string) *ManagementFiltersGetCall {
7916 c := &ManagementFiltersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7917 c.accountId = accountId
7918 c.filterId = filterId
7919 return c
7920 }
7921
7922
7923
7924
7925 func (c *ManagementFiltersGetCall) Fields(s ...googleapi.Field) *ManagementFiltersGetCall {
7926 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7927 return c
7928 }
7929
7930
7931
7932
7933 func (c *ManagementFiltersGetCall) IfNoneMatch(entityTag string) *ManagementFiltersGetCall {
7934 c.ifNoneMatch_ = entityTag
7935 return c
7936 }
7937
7938
7939 func (c *ManagementFiltersGetCall) Context(ctx context.Context) *ManagementFiltersGetCall {
7940 c.ctx_ = ctx
7941 return c
7942 }
7943
7944
7945
7946 func (c *ManagementFiltersGetCall) Header() http.Header {
7947 if c.header_ == nil {
7948 c.header_ = make(http.Header)
7949 }
7950 return c.header_
7951 }
7952
7953 func (c *ManagementFiltersGetCall) doRequest(alt string) (*http.Response, error) {
7954 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7955 if c.ifNoneMatch_ != "" {
7956 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7957 }
7958 var body io.Reader = nil
7959 c.urlParams_.Set("alt", alt)
7960 c.urlParams_.Set("prettyPrint", "false")
7961 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
7962 urls += "?" + c.urlParams_.Encode()
7963 req, err := http.NewRequest("GET", urls, body)
7964 if err != nil {
7965 return nil, err
7966 }
7967 req.Header = reqHeaders
7968 googleapi.Expand(req.URL, map[string]string{
7969 "accountId": c.accountId,
7970 "filterId": c.filterId,
7971 })
7972 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7973 }
7974
7975
7976
7977
7978
7979
7980 func (c *ManagementFiltersGetCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
7981 gensupport.SetOptions(c.urlParams_, opts...)
7982 res, err := c.doRequest("json")
7983 if res != nil && res.StatusCode == http.StatusNotModified {
7984 if res.Body != nil {
7985 res.Body.Close()
7986 }
7987 return nil, gensupport.WrapError(&googleapi.Error{
7988 Code: res.StatusCode,
7989 Header: res.Header,
7990 })
7991 }
7992 if err != nil {
7993 return nil, err
7994 }
7995 defer googleapi.CloseBody(res)
7996 if err := googleapi.CheckResponse(res); err != nil {
7997 return nil, gensupport.WrapError(err)
7998 }
7999 ret := &Filter{
8000 ServerResponse: googleapi.ServerResponse{
8001 Header: res.Header,
8002 HTTPStatusCode: res.StatusCode,
8003 },
8004 }
8005 target := &ret
8006 if err := gensupport.DecodeResponse(target, res); err != nil {
8007 return nil, err
8008 }
8009 return ret, nil
8010 }
8011
8012 type ManagementFiltersInsertCall struct {
8013 s *Service
8014 accountId string
8015 filter *Filter
8016 urlParams_ gensupport.URLParams
8017 ctx_ context.Context
8018 header_ http.Header
8019 }
8020
8021
8022
8023
8024 func (r *ManagementFiltersService) Insert(accountId string, filter *Filter) *ManagementFiltersInsertCall {
8025 c := &ManagementFiltersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8026 c.accountId = accountId
8027 c.filter = filter
8028 return c
8029 }
8030
8031
8032
8033
8034 func (c *ManagementFiltersInsertCall) Fields(s ...googleapi.Field) *ManagementFiltersInsertCall {
8035 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8036 return c
8037 }
8038
8039
8040 func (c *ManagementFiltersInsertCall) Context(ctx context.Context) *ManagementFiltersInsertCall {
8041 c.ctx_ = ctx
8042 return c
8043 }
8044
8045
8046
8047 func (c *ManagementFiltersInsertCall) Header() http.Header {
8048 if c.header_ == nil {
8049 c.header_ = make(http.Header)
8050 }
8051 return c.header_
8052 }
8053
8054 func (c *ManagementFiltersInsertCall) doRequest(alt string) (*http.Response, error) {
8055 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8056 var body io.Reader = nil
8057 body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
8058 if err != nil {
8059 return nil, err
8060 }
8061 c.urlParams_.Set("alt", alt)
8062 c.urlParams_.Set("prettyPrint", "false")
8063 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
8064 urls += "?" + c.urlParams_.Encode()
8065 req, err := http.NewRequest("POST", urls, body)
8066 if err != nil {
8067 return nil, err
8068 }
8069 req.Header = reqHeaders
8070 googleapi.Expand(req.URL, map[string]string{
8071 "accountId": c.accountId,
8072 })
8073 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8074 }
8075
8076
8077
8078
8079
8080
8081 func (c *ManagementFiltersInsertCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
8082 gensupport.SetOptions(c.urlParams_, opts...)
8083 res, err := c.doRequest("json")
8084 if res != nil && res.StatusCode == http.StatusNotModified {
8085 if res.Body != nil {
8086 res.Body.Close()
8087 }
8088 return nil, gensupport.WrapError(&googleapi.Error{
8089 Code: res.StatusCode,
8090 Header: res.Header,
8091 })
8092 }
8093 if err != nil {
8094 return nil, err
8095 }
8096 defer googleapi.CloseBody(res)
8097 if err := googleapi.CheckResponse(res); err != nil {
8098 return nil, gensupport.WrapError(err)
8099 }
8100 ret := &Filter{
8101 ServerResponse: googleapi.ServerResponse{
8102 Header: res.Header,
8103 HTTPStatusCode: res.StatusCode,
8104 },
8105 }
8106 target := &ret
8107 if err := gensupport.DecodeResponse(target, res); err != nil {
8108 return nil, err
8109 }
8110 return ret, nil
8111 }
8112
8113 type ManagementFiltersListCall struct {
8114 s *Service
8115 accountId string
8116 urlParams_ gensupport.URLParams
8117 ifNoneMatch_ string
8118 ctx_ context.Context
8119 header_ http.Header
8120 }
8121
8122
8123
8124
8125 func (r *ManagementFiltersService) List(accountId string) *ManagementFiltersListCall {
8126 c := &ManagementFiltersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8127 c.accountId = accountId
8128 return c
8129 }
8130
8131
8132
8133 func (c *ManagementFiltersListCall) MaxResults(maxResults int64) *ManagementFiltersListCall {
8134 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
8135 return c
8136 }
8137
8138
8139
8140
8141 func (c *ManagementFiltersListCall) StartIndex(startIndex int64) *ManagementFiltersListCall {
8142 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
8143 return c
8144 }
8145
8146
8147
8148
8149 func (c *ManagementFiltersListCall) Fields(s ...googleapi.Field) *ManagementFiltersListCall {
8150 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8151 return c
8152 }
8153
8154
8155
8156
8157 func (c *ManagementFiltersListCall) IfNoneMatch(entityTag string) *ManagementFiltersListCall {
8158 c.ifNoneMatch_ = entityTag
8159 return c
8160 }
8161
8162
8163 func (c *ManagementFiltersListCall) Context(ctx context.Context) *ManagementFiltersListCall {
8164 c.ctx_ = ctx
8165 return c
8166 }
8167
8168
8169
8170 func (c *ManagementFiltersListCall) Header() http.Header {
8171 if c.header_ == nil {
8172 c.header_ = make(http.Header)
8173 }
8174 return c.header_
8175 }
8176
8177 func (c *ManagementFiltersListCall) doRequest(alt string) (*http.Response, error) {
8178 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8179 if c.ifNoneMatch_ != "" {
8180 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8181 }
8182 var body io.Reader = nil
8183 c.urlParams_.Set("alt", alt)
8184 c.urlParams_.Set("prettyPrint", "false")
8185 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters")
8186 urls += "?" + c.urlParams_.Encode()
8187 req, err := http.NewRequest("GET", urls, body)
8188 if err != nil {
8189 return nil, err
8190 }
8191 req.Header = reqHeaders
8192 googleapi.Expand(req.URL, map[string]string{
8193 "accountId": c.accountId,
8194 })
8195 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8196 }
8197
8198
8199
8200
8201
8202
8203 func (c *ManagementFiltersListCall) Do(opts ...googleapi.CallOption) (*Filters, error) {
8204 gensupport.SetOptions(c.urlParams_, opts...)
8205 res, err := c.doRequest("json")
8206 if res != nil && res.StatusCode == http.StatusNotModified {
8207 if res.Body != nil {
8208 res.Body.Close()
8209 }
8210 return nil, gensupport.WrapError(&googleapi.Error{
8211 Code: res.StatusCode,
8212 Header: res.Header,
8213 })
8214 }
8215 if err != nil {
8216 return nil, err
8217 }
8218 defer googleapi.CloseBody(res)
8219 if err := googleapi.CheckResponse(res); err != nil {
8220 return nil, gensupport.WrapError(err)
8221 }
8222 ret := &Filters{
8223 ServerResponse: googleapi.ServerResponse{
8224 Header: res.Header,
8225 HTTPStatusCode: res.StatusCode,
8226 },
8227 }
8228 target := &ret
8229 if err := gensupport.DecodeResponse(target, res); err != nil {
8230 return nil, err
8231 }
8232 return ret, nil
8233 }
8234
8235 type ManagementFiltersPatchCall struct {
8236 s *Service
8237 accountId string
8238 filterId string
8239 filter *Filter
8240 urlParams_ gensupport.URLParams
8241 ctx_ context.Context
8242 header_ http.Header
8243 }
8244
8245
8246
8247
8248
8249 func (r *ManagementFiltersService) Patch(accountId string, filterId string, filter *Filter) *ManagementFiltersPatchCall {
8250 c := &ManagementFiltersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8251 c.accountId = accountId
8252 c.filterId = filterId
8253 c.filter = filter
8254 return c
8255 }
8256
8257
8258
8259
8260 func (c *ManagementFiltersPatchCall) Fields(s ...googleapi.Field) *ManagementFiltersPatchCall {
8261 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8262 return c
8263 }
8264
8265
8266 func (c *ManagementFiltersPatchCall) Context(ctx context.Context) *ManagementFiltersPatchCall {
8267 c.ctx_ = ctx
8268 return c
8269 }
8270
8271
8272
8273 func (c *ManagementFiltersPatchCall) Header() http.Header {
8274 if c.header_ == nil {
8275 c.header_ = make(http.Header)
8276 }
8277 return c.header_
8278 }
8279
8280 func (c *ManagementFiltersPatchCall) doRequest(alt string) (*http.Response, error) {
8281 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8282 var body io.Reader = nil
8283 body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
8284 if err != nil {
8285 return nil, err
8286 }
8287 c.urlParams_.Set("alt", alt)
8288 c.urlParams_.Set("prettyPrint", "false")
8289 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
8290 urls += "?" + c.urlParams_.Encode()
8291 req, err := http.NewRequest("PATCH", urls, body)
8292 if err != nil {
8293 return nil, err
8294 }
8295 req.Header = reqHeaders
8296 googleapi.Expand(req.URL, map[string]string{
8297 "accountId": c.accountId,
8298 "filterId": c.filterId,
8299 })
8300 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8301 }
8302
8303
8304
8305
8306
8307
8308 func (c *ManagementFiltersPatchCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
8309 gensupport.SetOptions(c.urlParams_, opts...)
8310 res, err := c.doRequest("json")
8311 if res != nil && res.StatusCode == http.StatusNotModified {
8312 if res.Body != nil {
8313 res.Body.Close()
8314 }
8315 return nil, gensupport.WrapError(&googleapi.Error{
8316 Code: res.StatusCode,
8317 Header: res.Header,
8318 })
8319 }
8320 if err != nil {
8321 return nil, err
8322 }
8323 defer googleapi.CloseBody(res)
8324 if err := googleapi.CheckResponse(res); err != nil {
8325 return nil, gensupport.WrapError(err)
8326 }
8327 ret := &Filter{
8328 ServerResponse: googleapi.ServerResponse{
8329 Header: res.Header,
8330 HTTPStatusCode: res.StatusCode,
8331 },
8332 }
8333 target := &ret
8334 if err := gensupport.DecodeResponse(target, res); err != nil {
8335 return nil, err
8336 }
8337 return ret, nil
8338 }
8339
8340 type ManagementFiltersUpdateCall struct {
8341 s *Service
8342 accountId string
8343 filterId string
8344 filter *Filter
8345 urlParams_ gensupport.URLParams
8346 ctx_ context.Context
8347 header_ http.Header
8348 }
8349
8350
8351
8352
8353
8354 func (r *ManagementFiltersService) Update(accountId string, filterId string, filter *Filter) *ManagementFiltersUpdateCall {
8355 c := &ManagementFiltersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8356 c.accountId = accountId
8357 c.filterId = filterId
8358 c.filter = filter
8359 return c
8360 }
8361
8362
8363
8364
8365 func (c *ManagementFiltersUpdateCall) Fields(s ...googleapi.Field) *ManagementFiltersUpdateCall {
8366 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8367 return c
8368 }
8369
8370
8371 func (c *ManagementFiltersUpdateCall) Context(ctx context.Context) *ManagementFiltersUpdateCall {
8372 c.ctx_ = ctx
8373 return c
8374 }
8375
8376
8377
8378 func (c *ManagementFiltersUpdateCall) Header() http.Header {
8379 if c.header_ == nil {
8380 c.header_ = make(http.Header)
8381 }
8382 return c.header_
8383 }
8384
8385 func (c *ManagementFiltersUpdateCall) doRequest(alt string) (*http.Response, error) {
8386 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8387 var body io.Reader = nil
8388 body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
8389 if err != nil {
8390 return nil, err
8391 }
8392 c.urlParams_.Set("alt", alt)
8393 c.urlParams_.Set("prettyPrint", "false")
8394 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/filters/{filterId}")
8395 urls += "?" + c.urlParams_.Encode()
8396 req, err := http.NewRequest("PUT", urls, body)
8397 if err != nil {
8398 return nil, err
8399 }
8400 req.Header = reqHeaders
8401 googleapi.Expand(req.URL, map[string]string{
8402 "accountId": c.accountId,
8403 "filterId": c.filterId,
8404 })
8405 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8406 }
8407
8408
8409
8410
8411
8412
8413 func (c *ManagementFiltersUpdateCall) Do(opts ...googleapi.CallOption) (*Filter, error) {
8414 gensupport.SetOptions(c.urlParams_, opts...)
8415 res, err := c.doRequest("json")
8416 if res != nil && res.StatusCode == http.StatusNotModified {
8417 if res.Body != nil {
8418 res.Body.Close()
8419 }
8420 return nil, gensupport.WrapError(&googleapi.Error{
8421 Code: res.StatusCode,
8422 Header: res.Header,
8423 })
8424 }
8425 if err != nil {
8426 return nil, err
8427 }
8428 defer googleapi.CloseBody(res)
8429 if err := googleapi.CheckResponse(res); err != nil {
8430 return nil, gensupport.WrapError(err)
8431 }
8432 ret := &Filter{
8433 ServerResponse: googleapi.ServerResponse{
8434 Header: res.Header,
8435 HTTPStatusCode: res.StatusCode,
8436 },
8437 }
8438 target := &ret
8439 if err := gensupport.DecodeResponse(target, res); err != nil {
8440 return nil, err
8441 }
8442 return ret, nil
8443 }
8444
8445 type ManagementGoalsGetCall struct {
8446 s *Service
8447 accountId string
8448 webPropertyId string
8449 profileId string
8450 goalId string
8451 urlParams_ gensupport.URLParams
8452 ifNoneMatch_ string
8453 ctx_ context.Context
8454 header_ http.Header
8455 }
8456
8457
8458
8459
8460
8461
8462
8463 func (r *ManagementGoalsService) Get(accountId string, webPropertyId string, profileId string, goalId string) *ManagementGoalsGetCall {
8464 c := &ManagementGoalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8465 c.accountId = accountId
8466 c.webPropertyId = webPropertyId
8467 c.profileId = profileId
8468 c.goalId = goalId
8469 return c
8470 }
8471
8472
8473
8474
8475 func (c *ManagementGoalsGetCall) Fields(s ...googleapi.Field) *ManagementGoalsGetCall {
8476 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8477 return c
8478 }
8479
8480
8481
8482
8483 func (c *ManagementGoalsGetCall) IfNoneMatch(entityTag string) *ManagementGoalsGetCall {
8484 c.ifNoneMatch_ = entityTag
8485 return c
8486 }
8487
8488
8489 func (c *ManagementGoalsGetCall) Context(ctx context.Context) *ManagementGoalsGetCall {
8490 c.ctx_ = ctx
8491 return c
8492 }
8493
8494
8495
8496 func (c *ManagementGoalsGetCall) Header() http.Header {
8497 if c.header_ == nil {
8498 c.header_ = make(http.Header)
8499 }
8500 return c.header_
8501 }
8502
8503 func (c *ManagementGoalsGetCall) doRequest(alt string) (*http.Response, error) {
8504 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8505 if c.ifNoneMatch_ != "" {
8506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8507 }
8508 var body io.Reader = nil
8509 c.urlParams_.Set("alt", alt)
8510 c.urlParams_.Set("prettyPrint", "false")
8511 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
8512 urls += "?" + c.urlParams_.Encode()
8513 req, err := http.NewRequest("GET", urls, body)
8514 if err != nil {
8515 return nil, err
8516 }
8517 req.Header = reqHeaders
8518 googleapi.Expand(req.URL, map[string]string{
8519 "accountId": c.accountId,
8520 "webPropertyId": c.webPropertyId,
8521 "profileId": c.profileId,
8522 "goalId": c.goalId,
8523 })
8524 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8525 }
8526
8527
8528
8529
8530
8531
8532 func (c *ManagementGoalsGetCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
8533 gensupport.SetOptions(c.urlParams_, opts...)
8534 res, err := c.doRequest("json")
8535 if res != nil && res.StatusCode == http.StatusNotModified {
8536 if res.Body != nil {
8537 res.Body.Close()
8538 }
8539 return nil, gensupport.WrapError(&googleapi.Error{
8540 Code: res.StatusCode,
8541 Header: res.Header,
8542 })
8543 }
8544 if err != nil {
8545 return nil, err
8546 }
8547 defer googleapi.CloseBody(res)
8548 if err := googleapi.CheckResponse(res); err != nil {
8549 return nil, gensupport.WrapError(err)
8550 }
8551 ret := &Goal{
8552 ServerResponse: googleapi.ServerResponse{
8553 Header: res.Header,
8554 HTTPStatusCode: res.StatusCode,
8555 },
8556 }
8557 target := &ret
8558 if err := gensupport.DecodeResponse(target, res); err != nil {
8559 return nil, err
8560 }
8561 return ret, nil
8562 }
8563
8564 type ManagementGoalsInsertCall struct {
8565 s *Service
8566 accountId string
8567 webPropertyId string
8568 profileId string
8569 goal *Goal
8570 urlParams_ gensupport.URLParams
8571 ctx_ context.Context
8572 header_ http.Header
8573 }
8574
8575
8576
8577
8578
8579
8580 func (r *ManagementGoalsService) Insert(accountId string, webPropertyId string, profileId string, goal *Goal) *ManagementGoalsInsertCall {
8581 c := &ManagementGoalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8582 c.accountId = accountId
8583 c.webPropertyId = webPropertyId
8584 c.profileId = profileId
8585 c.goal = goal
8586 return c
8587 }
8588
8589
8590
8591
8592 func (c *ManagementGoalsInsertCall) Fields(s ...googleapi.Field) *ManagementGoalsInsertCall {
8593 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8594 return c
8595 }
8596
8597
8598 func (c *ManagementGoalsInsertCall) Context(ctx context.Context) *ManagementGoalsInsertCall {
8599 c.ctx_ = ctx
8600 return c
8601 }
8602
8603
8604
8605 func (c *ManagementGoalsInsertCall) Header() http.Header {
8606 if c.header_ == nil {
8607 c.header_ = make(http.Header)
8608 }
8609 return c.header_
8610 }
8611
8612 func (c *ManagementGoalsInsertCall) doRequest(alt string) (*http.Response, error) {
8613 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8614 var body io.Reader = nil
8615 body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
8616 if err != nil {
8617 return nil, err
8618 }
8619 c.urlParams_.Set("alt", alt)
8620 c.urlParams_.Set("prettyPrint", "false")
8621 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
8622 urls += "?" + c.urlParams_.Encode()
8623 req, err := http.NewRequest("POST", urls, body)
8624 if err != nil {
8625 return nil, err
8626 }
8627 req.Header = reqHeaders
8628 googleapi.Expand(req.URL, map[string]string{
8629 "accountId": c.accountId,
8630 "webPropertyId": c.webPropertyId,
8631 "profileId": c.profileId,
8632 })
8633 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8634 }
8635
8636
8637
8638
8639
8640
8641 func (c *ManagementGoalsInsertCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
8642 gensupport.SetOptions(c.urlParams_, opts...)
8643 res, err := c.doRequest("json")
8644 if res != nil && res.StatusCode == http.StatusNotModified {
8645 if res.Body != nil {
8646 res.Body.Close()
8647 }
8648 return nil, gensupport.WrapError(&googleapi.Error{
8649 Code: res.StatusCode,
8650 Header: res.Header,
8651 })
8652 }
8653 if err != nil {
8654 return nil, err
8655 }
8656 defer googleapi.CloseBody(res)
8657 if err := googleapi.CheckResponse(res); err != nil {
8658 return nil, gensupport.WrapError(err)
8659 }
8660 ret := &Goal{
8661 ServerResponse: googleapi.ServerResponse{
8662 Header: res.Header,
8663 HTTPStatusCode: res.StatusCode,
8664 },
8665 }
8666 target := &ret
8667 if err := gensupport.DecodeResponse(target, res); err != nil {
8668 return nil, err
8669 }
8670 return ret, nil
8671 }
8672
8673 type ManagementGoalsListCall struct {
8674 s *Service
8675 accountId string
8676 webPropertyId string
8677 profileId string
8678 urlParams_ gensupport.URLParams
8679 ifNoneMatch_ string
8680 ctx_ context.Context
8681 header_ http.Header
8682 }
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695 func (r *ManagementGoalsService) List(accountId string, webPropertyId string, profileId string) *ManagementGoalsListCall {
8696 c := &ManagementGoalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8697 c.accountId = accountId
8698 c.webPropertyId = webPropertyId
8699 c.profileId = profileId
8700 return c
8701 }
8702
8703
8704
8705 func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall {
8706 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
8707 return c
8708 }
8709
8710
8711
8712
8713 func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall {
8714 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
8715 return c
8716 }
8717
8718
8719
8720
8721 func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall {
8722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8723 return c
8724 }
8725
8726
8727
8728
8729 func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall {
8730 c.ifNoneMatch_ = entityTag
8731 return c
8732 }
8733
8734
8735 func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
8736 c.ctx_ = ctx
8737 return c
8738 }
8739
8740
8741
8742 func (c *ManagementGoalsListCall) Header() http.Header {
8743 if c.header_ == nil {
8744 c.header_ = make(http.Header)
8745 }
8746 return c.header_
8747 }
8748
8749 func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
8750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8751 if c.ifNoneMatch_ != "" {
8752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8753 }
8754 var body io.Reader = nil
8755 c.urlParams_.Set("alt", alt)
8756 c.urlParams_.Set("prettyPrint", "false")
8757 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals")
8758 urls += "?" + c.urlParams_.Encode()
8759 req, err := http.NewRequest("GET", urls, body)
8760 if err != nil {
8761 return nil, err
8762 }
8763 req.Header = reqHeaders
8764 googleapi.Expand(req.URL, map[string]string{
8765 "accountId": c.accountId,
8766 "webPropertyId": c.webPropertyId,
8767 "profileId": c.profileId,
8768 })
8769 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8770 }
8771
8772
8773
8774
8775
8776
8777 func (c *ManagementGoalsListCall) Do(opts ...googleapi.CallOption) (*Goals, error) {
8778 gensupport.SetOptions(c.urlParams_, opts...)
8779 res, err := c.doRequest("json")
8780 if res != nil && res.StatusCode == http.StatusNotModified {
8781 if res.Body != nil {
8782 res.Body.Close()
8783 }
8784 return nil, gensupport.WrapError(&googleapi.Error{
8785 Code: res.StatusCode,
8786 Header: res.Header,
8787 })
8788 }
8789 if err != nil {
8790 return nil, err
8791 }
8792 defer googleapi.CloseBody(res)
8793 if err := googleapi.CheckResponse(res); err != nil {
8794 return nil, gensupport.WrapError(err)
8795 }
8796 ret := &Goals{
8797 ServerResponse: googleapi.ServerResponse{
8798 Header: res.Header,
8799 HTTPStatusCode: res.StatusCode,
8800 },
8801 }
8802 target := &ret
8803 if err := gensupport.DecodeResponse(target, res); err != nil {
8804 return nil, err
8805 }
8806 return ret, nil
8807 }
8808
8809 type ManagementGoalsPatchCall struct {
8810 s *Service
8811 accountId string
8812 webPropertyId string
8813 profileId string
8814 goalId string
8815 goal *Goal
8816 urlParams_ gensupport.URLParams
8817 ctx_ context.Context
8818 header_ http.Header
8819 }
8820
8821
8822
8823
8824
8825
8826
8827 func (r *ManagementGoalsService) Patch(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsPatchCall {
8828 c := &ManagementGoalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8829 c.accountId = accountId
8830 c.webPropertyId = webPropertyId
8831 c.profileId = profileId
8832 c.goalId = goalId
8833 c.goal = goal
8834 return c
8835 }
8836
8837
8838
8839
8840 func (c *ManagementGoalsPatchCall) Fields(s ...googleapi.Field) *ManagementGoalsPatchCall {
8841 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8842 return c
8843 }
8844
8845
8846 func (c *ManagementGoalsPatchCall) Context(ctx context.Context) *ManagementGoalsPatchCall {
8847 c.ctx_ = ctx
8848 return c
8849 }
8850
8851
8852
8853 func (c *ManagementGoalsPatchCall) Header() http.Header {
8854 if c.header_ == nil {
8855 c.header_ = make(http.Header)
8856 }
8857 return c.header_
8858 }
8859
8860 func (c *ManagementGoalsPatchCall) doRequest(alt string) (*http.Response, error) {
8861 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8862 var body io.Reader = nil
8863 body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
8864 if err != nil {
8865 return nil, err
8866 }
8867 c.urlParams_.Set("alt", alt)
8868 c.urlParams_.Set("prettyPrint", "false")
8869 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
8870 urls += "?" + c.urlParams_.Encode()
8871 req, err := http.NewRequest("PATCH", urls, body)
8872 if err != nil {
8873 return nil, err
8874 }
8875 req.Header = reqHeaders
8876 googleapi.Expand(req.URL, map[string]string{
8877 "accountId": c.accountId,
8878 "webPropertyId": c.webPropertyId,
8879 "profileId": c.profileId,
8880 "goalId": c.goalId,
8881 })
8882 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8883 }
8884
8885
8886
8887
8888
8889
8890 func (c *ManagementGoalsPatchCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
8891 gensupport.SetOptions(c.urlParams_, opts...)
8892 res, err := c.doRequest("json")
8893 if res != nil && res.StatusCode == http.StatusNotModified {
8894 if res.Body != nil {
8895 res.Body.Close()
8896 }
8897 return nil, gensupport.WrapError(&googleapi.Error{
8898 Code: res.StatusCode,
8899 Header: res.Header,
8900 })
8901 }
8902 if err != nil {
8903 return nil, err
8904 }
8905 defer googleapi.CloseBody(res)
8906 if err := googleapi.CheckResponse(res); err != nil {
8907 return nil, gensupport.WrapError(err)
8908 }
8909 ret := &Goal{
8910 ServerResponse: googleapi.ServerResponse{
8911 Header: res.Header,
8912 HTTPStatusCode: res.StatusCode,
8913 },
8914 }
8915 target := &ret
8916 if err := gensupport.DecodeResponse(target, res); err != nil {
8917 return nil, err
8918 }
8919 return ret, nil
8920 }
8921
8922 type ManagementGoalsUpdateCall struct {
8923 s *Service
8924 accountId string
8925 webPropertyId string
8926 profileId string
8927 goalId string
8928 goal *Goal
8929 urlParams_ gensupport.URLParams
8930 ctx_ context.Context
8931 header_ http.Header
8932 }
8933
8934
8935
8936
8937
8938
8939
8940 func (r *ManagementGoalsService) Update(accountId string, webPropertyId string, profileId string, goalId string, goal *Goal) *ManagementGoalsUpdateCall {
8941 c := &ManagementGoalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8942 c.accountId = accountId
8943 c.webPropertyId = webPropertyId
8944 c.profileId = profileId
8945 c.goalId = goalId
8946 c.goal = goal
8947 return c
8948 }
8949
8950
8951
8952
8953 func (c *ManagementGoalsUpdateCall) Fields(s ...googleapi.Field) *ManagementGoalsUpdateCall {
8954 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8955 return c
8956 }
8957
8958
8959 func (c *ManagementGoalsUpdateCall) Context(ctx context.Context) *ManagementGoalsUpdateCall {
8960 c.ctx_ = ctx
8961 return c
8962 }
8963
8964
8965
8966 func (c *ManagementGoalsUpdateCall) Header() http.Header {
8967 if c.header_ == nil {
8968 c.header_ = make(http.Header)
8969 }
8970 return c.header_
8971 }
8972
8973 func (c *ManagementGoalsUpdateCall) doRequest(alt string) (*http.Response, error) {
8974 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8975 var body io.Reader = nil
8976 body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
8977 if err != nil {
8978 return nil, err
8979 }
8980 c.urlParams_.Set("alt", alt)
8981 c.urlParams_.Set("prettyPrint", "false")
8982 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}")
8983 urls += "?" + c.urlParams_.Encode()
8984 req, err := http.NewRequest("PUT", urls, body)
8985 if err != nil {
8986 return nil, err
8987 }
8988 req.Header = reqHeaders
8989 googleapi.Expand(req.URL, map[string]string{
8990 "accountId": c.accountId,
8991 "webPropertyId": c.webPropertyId,
8992 "profileId": c.profileId,
8993 "goalId": c.goalId,
8994 })
8995 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8996 }
8997
8998
8999
9000
9001
9002
9003 func (c *ManagementGoalsUpdateCall) Do(opts ...googleapi.CallOption) (*Goal, error) {
9004 gensupport.SetOptions(c.urlParams_, opts...)
9005 res, err := c.doRequest("json")
9006 if res != nil && res.StatusCode == http.StatusNotModified {
9007 if res.Body != nil {
9008 res.Body.Close()
9009 }
9010 return nil, gensupport.WrapError(&googleapi.Error{
9011 Code: res.StatusCode,
9012 Header: res.Header,
9013 })
9014 }
9015 if err != nil {
9016 return nil, err
9017 }
9018 defer googleapi.CloseBody(res)
9019 if err := googleapi.CheckResponse(res); err != nil {
9020 return nil, gensupport.WrapError(err)
9021 }
9022 ret := &Goal{
9023 ServerResponse: googleapi.ServerResponse{
9024 Header: res.Header,
9025 HTTPStatusCode: res.StatusCode,
9026 },
9027 }
9028 target := &ret
9029 if err := gensupport.DecodeResponse(target, res); err != nil {
9030 return nil, err
9031 }
9032 return ret, nil
9033 }
9034
9035 type ManagementProfileFilterLinksDeleteCall struct {
9036 s *Service
9037 accountId string
9038 webPropertyId string
9039 profileId string
9040 linkId string
9041 urlParams_ gensupport.URLParams
9042 ctx_ context.Context
9043 header_ http.Header
9044 }
9045
9046
9047
9048
9049
9050
9051
9052 func (r *ManagementProfileFilterLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksDeleteCall {
9053 c := &ManagementProfileFilterLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9054 c.accountId = accountId
9055 c.webPropertyId = webPropertyId
9056 c.profileId = profileId
9057 c.linkId = linkId
9058 return c
9059 }
9060
9061
9062
9063
9064 func (c *ManagementProfileFilterLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksDeleteCall {
9065 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9066 return c
9067 }
9068
9069
9070 func (c *ManagementProfileFilterLinksDeleteCall) Context(ctx context.Context) *ManagementProfileFilterLinksDeleteCall {
9071 c.ctx_ = ctx
9072 return c
9073 }
9074
9075
9076
9077 func (c *ManagementProfileFilterLinksDeleteCall) Header() http.Header {
9078 if c.header_ == nil {
9079 c.header_ = make(http.Header)
9080 }
9081 return c.header_
9082 }
9083
9084 func (c *ManagementProfileFilterLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
9085 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9086 var body io.Reader = nil
9087 c.urlParams_.Set("alt", alt)
9088 c.urlParams_.Set("prettyPrint", "false")
9089 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
9090 urls += "?" + c.urlParams_.Encode()
9091 req, err := http.NewRequest("DELETE", urls, body)
9092 if err != nil {
9093 return nil, err
9094 }
9095 req.Header = reqHeaders
9096 googleapi.Expand(req.URL, map[string]string{
9097 "accountId": c.accountId,
9098 "webPropertyId": c.webPropertyId,
9099 "profileId": c.profileId,
9100 "linkId": c.linkId,
9101 })
9102 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9103 }
9104
9105
9106 func (c *ManagementProfileFilterLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
9107 gensupport.SetOptions(c.urlParams_, opts...)
9108 res, err := c.doRequest("json")
9109 if err != nil {
9110 return err
9111 }
9112 defer googleapi.CloseBody(res)
9113 if err := googleapi.CheckResponse(res); err != nil {
9114 return gensupport.WrapError(err)
9115 }
9116 return nil
9117 }
9118
9119 type ManagementProfileFilterLinksGetCall struct {
9120 s *Service
9121 accountId string
9122 webPropertyId string
9123 profileId string
9124 linkId string
9125 urlParams_ gensupport.URLParams
9126 ifNoneMatch_ string
9127 ctx_ context.Context
9128 header_ http.Header
9129 }
9130
9131
9132
9133
9134
9135
9136
9137 func (r *ManagementProfileFilterLinksService) Get(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileFilterLinksGetCall {
9138 c := &ManagementProfileFilterLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9139 c.accountId = accountId
9140 c.webPropertyId = webPropertyId
9141 c.profileId = profileId
9142 c.linkId = linkId
9143 return c
9144 }
9145
9146
9147
9148
9149 func (c *ManagementProfileFilterLinksGetCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksGetCall {
9150 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9151 return c
9152 }
9153
9154
9155
9156
9157 func (c *ManagementProfileFilterLinksGetCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksGetCall {
9158 c.ifNoneMatch_ = entityTag
9159 return c
9160 }
9161
9162
9163 func (c *ManagementProfileFilterLinksGetCall) Context(ctx context.Context) *ManagementProfileFilterLinksGetCall {
9164 c.ctx_ = ctx
9165 return c
9166 }
9167
9168
9169
9170 func (c *ManagementProfileFilterLinksGetCall) Header() http.Header {
9171 if c.header_ == nil {
9172 c.header_ = make(http.Header)
9173 }
9174 return c.header_
9175 }
9176
9177 func (c *ManagementProfileFilterLinksGetCall) doRequest(alt string) (*http.Response, error) {
9178 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9179 if c.ifNoneMatch_ != "" {
9180 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9181 }
9182 var body io.Reader = nil
9183 c.urlParams_.Set("alt", alt)
9184 c.urlParams_.Set("prettyPrint", "false")
9185 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
9186 urls += "?" + c.urlParams_.Encode()
9187 req, err := http.NewRequest("GET", urls, body)
9188 if err != nil {
9189 return nil, err
9190 }
9191 req.Header = reqHeaders
9192 googleapi.Expand(req.URL, map[string]string{
9193 "accountId": c.accountId,
9194 "webPropertyId": c.webPropertyId,
9195 "profileId": c.profileId,
9196 "linkId": c.linkId,
9197 })
9198 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9199 }
9200
9201
9202
9203
9204
9205
9206
9207 func (c *ManagementProfileFilterLinksGetCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
9208 gensupport.SetOptions(c.urlParams_, opts...)
9209 res, err := c.doRequest("json")
9210 if res != nil && res.StatusCode == http.StatusNotModified {
9211 if res.Body != nil {
9212 res.Body.Close()
9213 }
9214 return nil, gensupport.WrapError(&googleapi.Error{
9215 Code: res.StatusCode,
9216 Header: res.Header,
9217 })
9218 }
9219 if err != nil {
9220 return nil, err
9221 }
9222 defer googleapi.CloseBody(res)
9223 if err := googleapi.CheckResponse(res); err != nil {
9224 return nil, gensupport.WrapError(err)
9225 }
9226 ret := &ProfileFilterLink{
9227 ServerResponse: googleapi.ServerResponse{
9228 Header: res.Header,
9229 HTTPStatusCode: res.StatusCode,
9230 },
9231 }
9232 target := &ret
9233 if err := gensupport.DecodeResponse(target, res); err != nil {
9234 return nil, err
9235 }
9236 return ret, nil
9237 }
9238
9239 type ManagementProfileFilterLinksInsertCall struct {
9240 s *Service
9241 accountId string
9242 webPropertyId string
9243 profileId string
9244 profilefilterlink *ProfileFilterLink
9245 urlParams_ gensupport.URLParams
9246 ctx_ context.Context
9247 header_ http.Header
9248 }
9249
9250
9251
9252
9253
9254
9255 func (r *ManagementProfileFilterLinksService) Insert(accountId string, webPropertyId string, profileId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksInsertCall {
9256 c := &ManagementProfileFilterLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9257 c.accountId = accountId
9258 c.webPropertyId = webPropertyId
9259 c.profileId = profileId
9260 c.profilefilterlink = profilefilterlink
9261 return c
9262 }
9263
9264
9265
9266
9267 func (c *ManagementProfileFilterLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksInsertCall {
9268 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9269 return c
9270 }
9271
9272
9273 func (c *ManagementProfileFilterLinksInsertCall) Context(ctx context.Context) *ManagementProfileFilterLinksInsertCall {
9274 c.ctx_ = ctx
9275 return c
9276 }
9277
9278
9279
9280 func (c *ManagementProfileFilterLinksInsertCall) Header() http.Header {
9281 if c.header_ == nil {
9282 c.header_ = make(http.Header)
9283 }
9284 return c.header_
9285 }
9286
9287 func (c *ManagementProfileFilterLinksInsertCall) doRequest(alt string) (*http.Response, error) {
9288 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9289 var body io.Reader = nil
9290 body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
9291 if err != nil {
9292 return nil, err
9293 }
9294 c.urlParams_.Set("alt", alt)
9295 c.urlParams_.Set("prettyPrint", "false")
9296 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
9297 urls += "?" + c.urlParams_.Encode()
9298 req, err := http.NewRequest("POST", urls, body)
9299 if err != nil {
9300 return nil, err
9301 }
9302 req.Header = reqHeaders
9303 googleapi.Expand(req.URL, map[string]string{
9304 "accountId": c.accountId,
9305 "webPropertyId": c.webPropertyId,
9306 "profileId": c.profileId,
9307 })
9308 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9309 }
9310
9311
9312
9313
9314
9315
9316
9317 func (c *ManagementProfileFilterLinksInsertCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
9318 gensupport.SetOptions(c.urlParams_, opts...)
9319 res, err := c.doRequest("json")
9320 if res != nil && res.StatusCode == http.StatusNotModified {
9321 if res.Body != nil {
9322 res.Body.Close()
9323 }
9324 return nil, gensupport.WrapError(&googleapi.Error{
9325 Code: res.StatusCode,
9326 Header: res.Header,
9327 })
9328 }
9329 if err != nil {
9330 return nil, err
9331 }
9332 defer googleapi.CloseBody(res)
9333 if err := googleapi.CheckResponse(res); err != nil {
9334 return nil, gensupport.WrapError(err)
9335 }
9336 ret := &ProfileFilterLink{
9337 ServerResponse: googleapi.ServerResponse{
9338 Header: res.Header,
9339 HTTPStatusCode: res.StatusCode,
9340 },
9341 }
9342 target := &ret
9343 if err := gensupport.DecodeResponse(target, res); err != nil {
9344 return nil, err
9345 }
9346 return ret, nil
9347 }
9348
9349 type ManagementProfileFilterLinksListCall struct {
9350 s *Service
9351 accountId string
9352 webPropertyId string
9353 profileId string
9354 urlParams_ gensupport.URLParams
9355 ifNoneMatch_ string
9356 ctx_ context.Context
9357 header_ http.Header
9358 }
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369 func (r *ManagementProfileFilterLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileFilterLinksListCall {
9370 c := &ManagementProfileFilterLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9371 c.accountId = accountId
9372 c.webPropertyId = webPropertyId
9373 c.profileId = profileId
9374 return c
9375 }
9376
9377
9378
9379 func (c *ManagementProfileFilterLinksListCall) MaxResults(maxResults int64) *ManagementProfileFilterLinksListCall {
9380 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
9381 return c
9382 }
9383
9384
9385
9386
9387 func (c *ManagementProfileFilterLinksListCall) StartIndex(startIndex int64) *ManagementProfileFilterLinksListCall {
9388 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
9389 return c
9390 }
9391
9392
9393
9394
9395 func (c *ManagementProfileFilterLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksListCall {
9396 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9397 return c
9398 }
9399
9400
9401
9402
9403 func (c *ManagementProfileFilterLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileFilterLinksListCall {
9404 c.ifNoneMatch_ = entityTag
9405 return c
9406 }
9407
9408
9409 func (c *ManagementProfileFilterLinksListCall) Context(ctx context.Context) *ManagementProfileFilterLinksListCall {
9410 c.ctx_ = ctx
9411 return c
9412 }
9413
9414
9415
9416 func (c *ManagementProfileFilterLinksListCall) Header() http.Header {
9417 if c.header_ == nil {
9418 c.header_ = make(http.Header)
9419 }
9420 return c.header_
9421 }
9422
9423 func (c *ManagementProfileFilterLinksListCall) doRequest(alt string) (*http.Response, error) {
9424 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9425 if c.ifNoneMatch_ != "" {
9426 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9427 }
9428 var body io.Reader = nil
9429 c.urlParams_.Set("alt", alt)
9430 c.urlParams_.Set("prettyPrint", "false")
9431 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks")
9432 urls += "?" + c.urlParams_.Encode()
9433 req, err := http.NewRequest("GET", urls, body)
9434 if err != nil {
9435 return nil, err
9436 }
9437 req.Header = reqHeaders
9438 googleapi.Expand(req.URL, map[string]string{
9439 "accountId": c.accountId,
9440 "webPropertyId": c.webPropertyId,
9441 "profileId": c.profileId,
9442 })
9443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9444 }
9445
9446
9447
9448
9449
9450
9451
9452 func (c *ManagementProfileFilterLinksListCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLinks, error) {
9453 gensupport.SetOptions(c.urlParams_, opts...)
9454 res, err := c.doRequest("json")
9455 if res != nil && res.StatusCode == http.StatusNotModified {
9456 if res.Body != nil {
9457 res.Body.Close()
9458 }
9459 return nil, gensupport.WrapError(&googleapi.Error{
9460 Code: res.StatusCode,
9461 Header: res.Header,
9462 })
9463 }
9464 if err != nil {
9465 return nil, err
9466 }
9467 defer googleapi.CloseBody(res)
9468 if err := googleapi.CheckResponse(res); err != nil {
9469 return nil, gensupport.WrapError(err)
9470 }
9471 ret := &ProfileFilterLinks{
9472 ServerResponse: googleapi.ServerResponse{
9473 Header: res.Header,
9474 HTTPStatusCode: res.StatusCode,
9475 },
9476 }
9477 target := &ret
9478 if err := gensupport.DecodeResponse(target, res); err != nil {
9479 return nil, err
9480 }
9481 return ret, nil
9482 }
9483
9484 type ManagementProfileFilterLinksPatchCall struct {
9485 s *Service
9486 accountId string
9487 webPropertyId string
9488 profileId string
9489 linkId string
9490 profilefilterlink *ProfileFilterLink
9491 urlParams_ gensupport.URLParams
9492 ctx_ context.Context
9493 header_ http.Header
9494 }
9495
9496
9497
9498
9499
9500
9501
9502
9503 func (r *ManagementProfileFilterLinksService) Patch(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksPatchCall {
9504 c := &ManagementProfileFilterLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9505 c.accountId = accountId
9506 c.webPropertyId = webPropertyId
9507 c.profileId = profileId
9508 c.linkId = linkId
9509 c.profilefilterlink = profilefilterlink
9510 return c
9511 }
9512
9513
9514
9515
9516 func (c *ManagementProfileFilterLinksPatchCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksPatchCall {
9517 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9518 return c
9519 }
9520
9521
9522 func (c *ManagementProfileFilterLinksPatchCall) Context(ctx context.Context) *ManagementProfileFilterLinksPatchCall {
9523 c.ctx_ = ctx
9524 return c
9525 }
9526
9527
9528
9529 func (c *ManagementProfileFilterLinksPatchCall) Header() http.Header {
9530 if c.header_ == nil {
9531 c.header_ = make(http.Header)
9532 }
9533 return c.header_
9534 }
9535
9536 func (c *ManagementProfileFilterLinksPatchCall) doRequest(alt string) (*http.Response, error) {
9537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9538 var body io.Reader = nil
9539 body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
9540 if err != nil {
9541 return nil, err
9542 }
9543 c.urlParams_.Set("alt", alt)
9544 c.urlParams_.Set("prettyPrint", "false")
9545 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
9546 urls += "?" + c.urlParams_.Encode()
9547 req, err := http.NewRequest("PATCH", urls, body)
9548 if err != nil {
9549 return nil, err
9550 }
9551 req.Header = reqHeaders
9552 googleapi.Expand(req.URL, map[string]string{
9553 "accountId": c.accountId,
9554 "webPropertyId": c.webPropertyId,
9555 "profileId": c.profileId,
9556 "linkId": c.linkId,
9557 })
9558 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9559 }
9560
9561
9562
9563
9564
9565
9566
9567 func (c *ManagementProfileFilterLinksPatchCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
9568 gensupport.SetOptions(c.urlParams_, opts...)
9569 res, err := c.doRequest("json")
9570 if res != nil && res.StatusCode == http.StatusNotModified {
9571 if res.Body != nil {
9572 res.Body.Close()
9573 }
9574 return nil, gensupport.WrapError(&googleapi.Error{
9575 Code: res.StatusCode,
9576 Header: res.Header,
9577 })
9578 }
9579 if err != nil {
9580 return nil, err
9581 }
9582 defer googleapi.CloseBody(res)
9583 if err := googleapi.CheckResponse(res); err != nil {
9584 return nil, gensupport.WrapError(err)
9585 }
9586 ret := &ProfileFilterLink{
9587 ServerResponse: googleapi.ServerResponse{
9588 Header: res.Header,
9589 HTTPStatusCode: res.StatusCode,
9590 },
9591 }
9592 target := &ret
9593 if err := gensupport.DecodeResponse(target, res); err != nil {
9594 return nil, err
9595 }
9596 return ret, nil
9597 }
9598
9599 type ManagementProfileFilterLinksUpdateCall struct {
9600 s *Service
9601 accountId string
9602 webPropertyId string
9603 profileId string
9604 linkId string
9605 profilefilterlink *ProfileFilterLink
9606 urlParams_ gensupport.URLParams
9607 ctx_ context.Context
9608 header_ http.Header
9609 }
9610
9611
9612
9613
9614
9615
9616
9617 func (r *ManagementProfileFilterLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, profilefilterlink *ProfileFilterLink) *ManagementProfileFilterLinksUpdateCall {
9618 c := &ManagementProfileFilterLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9619 c.accountId = accountId
9620 c.webPropertyId = webPropertyId
9621 c.profileId = profileId
9622 c.linkId = linkId
9623 c.profilefilterlink = profilefilterlink
9624 return c
9625 }
9626
9627
9628
9629
9630 func (c *ManagementProfileFilterLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileFilterLinksUpdateCall {
9631 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9632 return c
9633 }
9634
9635
9636 func (c *ManagementProfileFilterLinksUpdateCall) Context(ctx context.Context) *ManagementProfileFilterLinksUpdateCall {
9637 c.ctx_ = ctx
9638 return c
9639 }
9640
9641
9642
9643 func (c *ManagementProfileFilterLinksUpdateCall) Header() http.Header {
9644 if c.header_ == nil {
9645 c.header_ = make(http.Header)
9646 }
9647 return c.header_
9648 }
9649
9650 func (c *ManagementProfileFilterLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
9651 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9652 var body io.Reader = nil
9653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
9654 if err != nil {
9655 return nil, err
9656 }
9657 c.urlParams_.Set("alt", alt)
9658 c.urlParams_.Set("prettyPrint", "false")
9659 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}")
9660 urls += "?" + c.urlParams_.Encode()
9661 req, err := http.NewRequest("PUT", urls, body)
9662 if err != nil {
9663 return nil, err
9664 }
9665 req.Header = reqHeaders
9666 googleapi.Expand(req.URL, map[string]string{
9667 "accountId": c.accountId,
9668 "webPropertyId": c.webPropertyId,
9669 "profileId": c.profileId,
9670 "linkId": c.linkId,
9671 })
9672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9673 }
9674
9675
9676
9677
9678
9679
9680
9681 func (c *ManagementProfileFilterLinksUpdateCall) Do(opts ...googleapi.CallOption) (*ProfileFilterLink, error) {
9682 gensupport.SetOptions(c.urlParams_, opts...)
9683 res, err := c.doRequest("json")
9684 if res != nil && res.StatusCode == http.StatusNotModified {
9685 if res.Body != nil {
9686 res.Body.Close()
9687 }
9688 return nil, gensupport.WrapError(&googleapi.Error{
9689 Code: res.StatusCode,
9690 Header: res.Header,
9691 })
9692 }
9693 if err != nil {
9694 return nil, err
9695 }
9696 defer googleapi.CloseBody(res)
9697 if err := googleapi.CheckResponse(res); err != nil {
9698 return nil, gensupport.WrapError(err)
9699 }
9700 ret := &ProfileFilterLink{
9701 ServerResponse: googleapi.ServerResponse{
9702 Header: res.Header,
9703 HTTPStatusCode: res.StatusCode,
9704 },
9705 }
9706 target := &ret
9707 if err := gensupport.DecodeResponse(target, res); err != nil {
9708 return nil, err
9709 }
9710 return ret, nil
9711 }
9712
9713 type ManagementProfileUserLinksDeleteCall struct {
9714 s *Service
9715 accountId string
9716 webPropertyId string
9717 profileId string
9718 linkId string
9719 urlParams_ gensupport.URLParams
9720 ctx_ context.Context
9721 header_ http.Header
9722 }
9723
9724
9725
9726
9727
9728
9729
9730 func (r *ManagementProfileUserLinksService) Delete(accountId string, webPropertyId string, profileId string, linkId string) *ManagementProfileUserLinksDeleteCall {
9731 c := &ManagementProfileUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9732 c.accountId = accountId
9733 c.webPropertyId = webPropertyId
9734 c.profileId = profileId
9735 c.linkId = linkId
9736 return c
9737 }
9738
9739
9740
9741
9742 func (c *ManagementProfileUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksDeleteCall {
9743 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9744 return c
9745 }
9746
9747
9748 func (c *ManagementProfileUserLinksDeleteCall) Context(ctx context.Context) *ManagementProfileUserLinksDeleteCall {
9749 c.ctx_ = ctx
9750 return c
9751 }
9752
9753
9754
9755 func (c *ManagementProfileUserLinksDeleteCall) Header() http.Header {
9756 if c.header_ == nil {
9757 c.header_ = make(http.Header)
9758 }
9759 return c.header_
9760 }
9761
9762 func (c *ManagementProfileUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
9763 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9764 var body io.Reader = nil
9765 c.urlParams_.Set("alt", alt)
9766 c.urlParams_.Set("prettyPrint", "false")
9767 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
9768 urls += "?" + c.urlParams_.Encode()
9769 req, err := http.NewRequest("DELETE", urls, body)
9770 if err != nil {
9771 return nil, err
9772 }
9773 req.Header = reqHeaders
9774 googleapi.Expand(req.URL, map[string]string{
9775 "accountId": c.accountId,
9776 "webPropertyId": c.webPropertyId,
9777 "profileId": c.profileId,
9778 "linkId": c.linkId,
9779 })
9780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9781 }
9782
9783
9784 func (c *ManagementProfileUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
9785 gensupport.SetOptions(c.urlParams_, opts...)
9786 res, err := c.doRequest("json")
9787 if err != nil {
9788 return err
9789 }
9790 defer googleapi.CloseBody(res)
9791 if err := googleapi.CheckResponse(res); err != nil {
9792 return gensupport.WrapError(err)
9793 }
9794 return nil
9795 }
9796
9797 type ManagementProfileUserLinksInsertCall struct {
9798 s *Service
9799 accountId string
9800 webPropertyId string
9801 profileId string
9802 entityuserlink *EntityUserLink
9803 urlParams_ gensupport.URLParams
9804 ctx_ context.Context
9805 header_ http.Header
9806 }
9807
9808
9809
9810
9811
9812
9813 func (r *ManagementProfileUserLinksService) Insert(accountId string, webPropertyId string, profileId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksInsertCall {
9814 c := &ManagementProfileUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9815 c.accountId = accountId
9816 c.webPropertyId = webPropertyId
9817 c.profileId = profileId
9818 c.entityuserlink = entityuserlink
9819 return c
9820 }
9821
9822
9823
9824
9825 func (c *ManagementProfileUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksInsertCall {
9826 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9827 return c
9828 }
9829
9830
9831 func (c *ManagementProfileUserLinksInsertCall) Context(ctx context.Context) *ManagementProfileUserLinksInsertCall {
9832 c.ctx_ = ctx
9833 return c
9834 }
9835
9836
9837
9838 func (c *ManagementProfileUserLinksInsertCall) Header() http.Header {
9839 if c.header_ == nil {
9840 c.header_ = make(http.Header)
9841 }
9842 return c.header_
9843 }
9844
9845 func (c *ManagementProfileUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
9846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9847 var body io.Reader = nil
9848 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
9849 if err != nil {
9850 return nil, err
9851 }
9852 c.urlParams_.Set("alt", alt)
9853 c.urlParams_.Set("prettyPrint", "false")
9854 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
9855 urls += "?" + c.urlParams_.Encode()
9856 req, err := http.NewRequest("POST", urls, body)
9857 if err != nil {
9858 return nil, err
9859 }
9860 req.Header = reqHeaders
9861 googleapi.Expand(req.URL, map[string]string{
9862 "accountId": c.accountId,
9863 "webPropertyId": c.webPropertyId,
9864 "profileId": c.profileId,
9865 })
9866 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9867 }
9868
9869
9870
9871
9872
9873
9874 func (c *ManagementProfileUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
9875 gensupport.SetOptions(c.urlParams_, opts...)
9876 res, err := c.doRequest("json")
9877 if res != nil && res.StatusCode == http.StatusNotModified {
9878 if res.Body != nil {
9879 res.Body.Close()
9880 }
9881 return nil, gensupport.WrapError(&googleapi.Error{
9882 Code: res.StatusCode,
9883 Header: res.Header,
9884 })
9885 }
9886 if err != nil {
9887 return nil, err
9888 }
9889 defer googleapi.CloseBody(res)
9890 if err := googleapi.CheckResponse(res); err != nil {
9891 return nil, gensupport.WrapError(err)
9892 }
9893 ret := &EntityUserLink{
9894 ServerResponse: googleapi.ServerResponse{
9895 Header: res.Header,
9896 HTTPStatusCode: res.StatusCode,
9897 },
9898 }
9899 target := &ret
9900 if err := gensupport.DecodeResponse(target, res); err != nil {
9901 return nil, err
9902 }
9903 return ret, nil
9904 }
9905
9906 type ManagementProfileUserLinksListCall struct {
9907 s *Service
9908 accountId string
9909 webPropertyId string
9910 profileId string
9911 urlParams_ gensupport.URLParams
9912 ifNoneMatch_ string
9913 ctx_ context.Context
9914 header_ http.Header
9915 }
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926 func (r *ManagementProfileUserLinksService) List(accountId string, webPropertyId string, profileId string) *ManagementProfileUserLinksListCall {
9927 c := &ManagementProfileUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9928 c.accountId = accountId
9929 c.webPropertyId = webPropertyId
9930 c.profileId = profileId
9931 return c
9932 }
9933
9934
9935
9936 func (c *ManagementProfileUserLinksListCall) MaxResults(maxResults int64) *ManagementProfileUserLinksListCall {
9937 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
9938 return c
9939 }
9940
9941
9942
9943
9944 func (c *ManagementProfileUserLinksListCall) StartIndex(startIndex int64) *ManagementProfileUserLinksListCall {
9945 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
9946 return c
9947 }
9948
9949
9950
9951
9952 func (c *ManagementProfileUserLinksListCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksListCall {
9953 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9954 return c
9955 }
9956
9957
9958
9959
9960 func (c *ManagementProfileUserLinksListCall) IfNoneMatch(entityTag string) *ManagementProfileUserLinksListCall {
9961 c.ifNoneMatch_ = entityTag
9962 return c
9963 }
9964
9965
9966 func (c *ManagementProfileUserLinksListCall) Context(ctx context.Context) *ManagementProfileUserLinksListCall {
9967 c.ctx_ = ctx
9968 return c
9969 }
9970
9971
9972
9973 func (c *ManagementProfileUserLinksListCall) Header() http.Header {
9974 if c.header_ == nil {
9975 c.header_ = make(http.Header)
9976 }
9977 return c.header_
9978 }
9979
9980 func (c *ManagementProfileUserLinksListCall) doRequest(alt string) (*http.Response, error) {
9981 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9982 if c.ifNoneMatch_ != "" {
9983 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9984 }
9985 var body io.Reader = nil
9986 c.urlParams_.Set("alt", alt)
9987 c.urlParams_.Set("prettyPrint", "false")
9988 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks")
9989 urls += "?" + c.urlParams_.Encode()
9990 req, err := http.NewRequest("GET", urls, body)
9991 if err != nil {
9992 return nil, err
9993 }
9994 req.Header = reqHeaders
9995 googleapi.Expand(req.URL, map[string]string{
9996 "accountId": c.accountId,
9997 "webPropertyId": c.webPropertyId,
9998 "profileId": c.profileId,
9999 })
10000 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10001 }
10002
10003
10004
10005
10006
10007
10008
10009 func (c *ManagementProfileUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
10010 gensupport.SetOptions(c.urlParams_, opts...)
10011 res, err := c.doRequest("json")
10012 if res != nil && res.StatusCode == http.StatusNotModified {
10013 if res.Body != nil {
10014 res.Body.Close()
10015 }
10016 return nil, gensupport.WrapError(&googleapi.Error{
10017 Code: res.StatusCode,
10018 Header: res.Header,
10019 })
10020 }
10021 if err != nil {
10022 return nil, err
10023 }
10024 defer googleapi.CloseBody(res)
10025 if err := googleapi.CheckResponse(res); err != nil {
10026 return nil, gensupport.WrapError(err)
10027 }
10028 ret := &EntityUserLinks{
10029 ServerResponse: googleapi.ServerResponse{
10030 Header: res.Header,
10031 HTTPStatusCode: res.StatusCode,
10032 },
10033 }
10034 target := &ret
10035 if err := gensupport.DecodeResponse(target, res); err != nil {
10036 return nil, err
10037 }
10038 return ret, nil
10039 }
10040
10041 type ManagementProfileUserLinksUpdateCall struct {
10042 s *Service
10043 accountId string
10044 webPropertyId string
10045 profileId string
10046 linkId string
10047 entityuserlink *EntityUserLink
10048 urlParams_ gensupport.URLParams
10049 ctx_ context.Context
10050 header_ http.Header
10051 }
10052
10053
10054
10055
10056
10057
10058
10059
10060 func (r *ManagementProfileUserLinksService) Update(accountId string, webPropertyId string, profileId string, linkId string, entityuserlink *EntityUserLink) *ManagementProfileUserLinksUpdateCall {
10061 c := &ManagementProfileUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10062 c.accountId = accountId
10063 c.webPropertyId = webPropertyId
10064 c.profileId = profileId
10065 c.linkId = linkId
10066 c.entityuserlink = entityuserlink
10067 return c
10068 }
10069
10070
10071
10072
10073 func (c *ManagementProfileUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementProfileUserLinksUpdateCall {
10074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10075 return c
10076 }
10077
10078
10079 func (c *ManagementProfileUserLinksUpdateCall) Context(ctx context.Context) *ManagementProfileUserLinksUpdateCall {
10080 c.ctx_ = ctx
10081 return c
10082 }
10083
10084
10085
10086 func (c *ManagementProfileUserLinksUpdateCall) Header() http.Header {
10087 if c.header_ == nil {
10088 c.header_ = make(http.Header)
10089 }
10090 return c.header_
10091 }
10092
10093 func (c *ManagementProfileUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
10094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10095 var body io.Reader = nil
10096 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
10097 if err != nil {
10098 return nil, err
10099 }
10100 c.urlParams_.Set("alt", alt)
10101 c.urlParams_.Set("prettyPrint", "false")
10102 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}")
10103 urls += "?" + c.urlParams_.Encode()
10104 req, err := http.NewRequest("PUT", urls, body)
10105 if err != nil {
10106 return nil, err
10107 }
10108 req.Header = reqHeaders
10109 googleapi.Expand(req.URL, map[string]string{
10110 "accountId": c.accountId,
10111 "webPropertyId": c.webPropertyId,
10112 "profileId": c.profileId,
10113 "linkId": c.linkId,
10114 })
10115 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10116 }
10117
10118
10119
10120
10121
10122
10123 func (c *ManagementProfileUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
10124 gensupport.SetOptions(c.urlParams_, opts...)
10125 res, err := c.doRequest("json")
10126 if res != nil && res.StatusCode == http.StatusNotModified {
10127 if res.Body != nil {
10128 res.Body.Close()
10129 }
10130 return nil, gensupport.WrapError(&googleapi.Error{
10131 Code: res.StatusCode,
10132 Header: res.Header,
10133 })
10134 }
10135 if err != nil {
10136 return nil, err
10137 }
10138 defer googleapi.CloseBody(res)
10139 if err := googleapi.CheckResponse(res); err != nil {
10140 return nil, gensupport.WrapError(err)
10141 }
10142 ret := &EntityUserLink{
10143 ServerResponse: googleapi.ServerResponse{
10144 Header: res.Header,
10145 HTTPStatusCode: res.StatusCode,
10146 },
10147 }
10148 target := &ret
10149 if err := gensupport.DecodeResponse(target, res); err != nil {
10150 return nil, err
10151 }
10152 return ret, nil
10153 }
10154
10155 type ManagementProfilesDeleteCall struct {
10156 s *Service
10157 accountId string
10158 webPropertyId string
10159 profileId string
10160 urlParams_ gensupport.URLParams
10161 ctx_ context.Context
10162 header_ http.Header
10163 }
10164
10165
10166
10167
10168
10169
10170 func (r *ManagementProfilesService) Delete(accountId string, webPropertyId string, profileId string) *ManagementProfilesDeleteCall {
10171 c := &ManagementProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10172 c.accountId = accountId
10173 c.webPropertyId = webPropertyId
10174 c.profileId = profileId
10175 return c
10176 }
10177
10178
10179
10180
10181 func (c *ManagementProfilesDeleteCall) Fields(s ...googleapi.Field) *ManagementProfilesDeleteCall {
10182 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10183 return c
10184 }
10185
10186
10187 func (c *ManagementProfilesDeleteCall) Context(ctx context.Context) *ManagementProfilesDeleteCall {
10188 c.ctx_ = ctx
10189 return c
10190 }
10191
10192
10193
10194 func (c *ManagementProfilesDeleteCall) Header() http.Header {
10195 if c.header_ == nil {
10196 c.header_ = make(http.Header)
10197 }
10198 return c.header_
10199 }
10200
10201 func (c *ManagementProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
10202 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10203 var body io.Reader = nil
10204 c.urlParams_.Set("alt", alt)
10205 c.urlParams_.Set("prettyPrint", "false")
10206 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
10207 urls += "?" + c.urlParams_.Encode()
10208 req, err := http.NewRequest("DELETE", urls, body)
10209 if err != nil {
10210 return nil, err
10211 }
10212 req.Header = reqHeaders
10213 googleapi.Expand(req.URL, map[string]string{
10214 "accountId": c.accountId,
10215 "webPropertyId": c.webPropertyId,
10216 "profileId": c.profileId,
10217 })
10218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10219 }
10220
10221
10222 func (c *ManagementProfilesDeleteCall) Do(opts ...googleapi.CallOption) error {
10223 gensupport.SetOptions(c.urlParams_, opts...)
10224 res, err := c.doRequest("json")
10225 if err != nil {
10226 return err
10227 }
10228 defer googleapi.CloseBody(res)
10229 if err := googleapi.CheckResponse(res); err != nil {
10230 return gensupport.WrapError(err)
10231 }
10232 return nil
10233 }
10234
10235 type ManagementProfilesGetCall struct {
10236 s *Service
10237 accountId string
10238 webPropertyId string
10239 profileId string
10240 urlParams_ gensupport.URLParams
10241 ifNoneMatch_ string
10242 ctx_ context.Context
10243 header_ http.Header
10244 }
10245
10246
10247
10248
10249
10250
10251 func (r *ManagementProfilesService) Get(accountId string, webPropertyId string, profileId string) *ManagementProfilesGetCall {
10252 c := &ManagementProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10253 c.accountId = accountId
10254 c.webPropertyId = webPropertyId
10255 c.profileId = profileId
10256 return c
10257 }
10258
10259
10260
10261
10262 func (c *ManagementProfilesGetCall) Fields(s ...googleapi.Field) *ManagementProfilesGetCall {
10263 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10264 return c
10265 }
10266
10267
10268
10269
10270 func (c *ManagementProfilesGetCall) IfNoneMatch(entityTag string) *ManagementProfilesGetCall {
10271 c.ifNoneMatch_ = entityTag
10272 return c
10273 }
10274
10275
10276 func (c *ManagementProfilesGetCall) Context(ctx context.Context) *ManagementProfilesGetCall {
10277 c.ctx_ = ctx
10278 return c
10279 }
10280
10281
10282
10283 func (c *ManagementProfilesGetCall) Header() http.Header {
10284 if c.header_ == nil {
10285 c.header_ = make(http.Header)
10286 }
10287 return c.header_
10288 }
10289
10290 func (c *ManagementProfilesGetCall) doRequest(alt string) (*http.Response, error) {
10291 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10292 if c.ifNoneMatch_ != "" {
10293 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10294 }
10295 var body io.Reader = nil
10296 c.urlParams_.Set("alt", alt)
10297 c.urlParams_.Set("prettyPrint", "false")
10298 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
10299 urls += "?" + c.urlParams_.Encode()
10300 req, err := http.NewRequest("GET", urls, body)
10301 if err != nil {
10302 return nil, err
10303 }
10304 req.Header = reqHeaders
10305 googleapi.Expand(req.URL, map[string]string{
10306 "accountId": c.accountId,
10307 "webPropertyId": c.webPropertyId,
10308 "profileId": c.profileId,
10309 })
10310 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10311 }
10312
10313
10314
10315
10316
10317
10318 func (c *ManagementProfilesGetCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
10319 gensupport.SetOptions(c.urlParams_, opts...)
10320 res, err := c.doRequest("json")
10321 if res != nil && res.StatusCode == http.StatusNotModified {
10322 if res.Body != nil {
10323 res.Body.Close()
10324 }
10325 return nil, gensupport.WrapError(&googleapi.Error{
10326 Code: res.StatusCode,
10327 Header: res.Header,
10328 })
10329 }
10330 if err != nil {
10331 return nil, err
10332 }
10333 defer googleapi.CloseBody(res)
10334 if err := googleapi.CheckResponse(res); err != nil {
10335 return nil, gensupport.WrapError(err)
10336 }
10337 ret := &Profile{
10338 ServerResponse: googleapi.ServerResponse{
10339 Header: res.Header,
10340 HTTPStatusCode: res.StatusCode,
10341 },
10342 }
10343 target := &ret
10344 if err := gensupport.DecodeResponse(target, res); err != nil {
10345 return nil, err
10346 }
10347 return ret, nil
10348 }
10349
10350 type ManagementProfilesInsertCall struct {
10351 s *Service
10352 accountId string
10353 webPropertyId string
10354 profile *Profile
10355 urlParams_ gensupport.URLParams
10356 ctx_ context.Context
10357 header_ http.Header
10358 }
10359
10360
10361
10362
10363
10364 func (r *ManagementProfilesService) Insert(accountId string, webPropertyId string, profile *Profile) *ManagementProfilesInsertCall {
10365 c := &ManagementProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10366 c.accountId = accountId
10367 c.webPropertyId = webPropertyId
10368 c.profile = profile
10369 return c
10370 }
10371
10372
10373
10374
10375 func (c *ManagementProfilesInsertCall) Fields(s ...googleapi.Field) *ManagementProfilesInsertCall {
10376 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10377 return c
10378 }
10379
10380
10381 func (c *ManagementProfilesInsertCall) Context(ctx context.Context) *ManagementProfilesInsertCall {
10382 c.ctx_ = ctx
10383 return c
10384 }
10385
10386
10387
10388 func (c *ManagementProfilesInsertCall) Header() http.Header {
10389 if c.header_ == nil {
10390 c.header_ = make(http.Header)
10391 }
10392 return c.header_
10393 }
10394
10395 func (c *ManagementProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
10396 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10397 var body io.Reader = nil
10398 body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
10399 if err != nil {
10400 return nil, err
10401 }
10402 c.urlParams_.Set("alt", alt)
10403 c.urlParams_.Set("prettyPrint", "false")
10404 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
10405 urls += "?" + c.urlParams_.Encode()
10406 req, err := http.NewRequest("POST", urls, body)
10407 if err != nil {
10408 return nil, err
10409 }
10410 req.Header = reqHeaders
10411 googleapi.Expand(req.URL, map[string]string{
10412 "accountId": c.accountId,
10413 "webPropertyId": c.webPropertyId,
10414 })
10415 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10416 }
10417
10418
10419
10420
10421
10422
10423 func (c *ManagementProfilesInsertCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
10424 gensupport.SetOptions(c.urlParams_, opts...)
10425 res, err := c.doRequest("json")
10426 if res != nil && res.StatusCode == http.StatusNotModified {
10427 if res.Body != nil {
10428 res.Body.Close()
10429 }
10430 return nil, gensupport.WrapError(&googleapi.Error{
10431 Code: res.StatusCode,
10432 Header: res.Header,
10433 })
10434 }
10435 if err != nil {
10436 return nil, err
10437 }
10438 defer googleapi.CloseBody(res)
10439 if err := googleapi.CheckResponse(res); err != nil {
10440 return nil, gensupport.WrapError(err)
10441 }
10442 ret := &Profile{
10443 ServerResponse: googleapi.ServerResponse{
10444 Header: res.Header,
10445 HTTPStatusCode: res.StatusCode,
10446 },
10447 }
10448 target := &ret
10449 if err := gensupport.DecodeResponse(target, res); err != nil {
10450 return nil, err
10451 }
10452 return ret, nil
10453 }
10454
10455 type ManagementProfilesListCall struct {
10456 s *Service
10457 accountId string
10458 webPropertyId string
10459 urlParams_ gensupport.URLParams
10460 ifNoneMatch_ string
10461 ctx_ context.Context
10462 header_ http.Header
10463 }
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473 func (r *ManagementProfilesService) List(accountId string, webPropertyId string) *ManagementProfilesListCall {
10474 c := &ManagementProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10475 c.accountId = accountId
10476 c.webPropertyId = webPropertyId
10477 return c
10478 }
10479
10480
10481
10482 func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall {
10483 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
10484 return c
10485 }
10486
10487
10488
10489
10490 func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall {
10491 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
10492 return c
10493 }
10494
10495
10496
10497
10498 func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall {
10499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10500 return c
10501 }
10502
10503
10504
10505
10506 func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall {
10507 c.ifNoneMatch_ = entityTag
10508 return c
10509 }
10510
10511
10512 func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
10513 c.ctx_ = ctx
10514 return c
10515 }
10516
10517
10518
10519 func (c *ManagementProfilesListCall) Header() http.Header {
10520 if c.header_ == nil {
10521 c.header_ = make(http.Header)
10522 }
10523 return c.header_
10524 }
10525
10526 func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
10527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10528 if c.ifNoneMatch_ != "" {
10529 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10530 }
10531 var body io.Reader = nil
10532 c.urlParams_.Set("alt", alt)
10533 c.urlParams_.Set("prettyPrint", "false")
10534 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles")
10535 urls += "?" + c.urlParams_.Encode()
10536 req, err := http.NewRequest("GET", urls, body)
10537 if err != nil {
10538 return nil, err
10539 }
10540 req.Header = reqHeaders
10541 googleapi.Expand(req.URL, map[string]string{
10542 "accountId": c.accountId,
10543 "webPropertyId": c.webPropertyId,
10544 })
10545 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10546 }
10547
10548
10549
10550
10551
10552
10553 func (c *ManagementProfilesListCall) Do(opts ...googleapi.CallOption) (*Profiles, error) {
10554 gensupport.SetOptions(c.urlParams_, opts...)
10555 res, err := c.doRequest("json")
10556 if res != nil && res.StatusCode == http.StatusNotModified {
10557 if res.Body != nil {
10558 res.Body.Close()
10559 }
10560 return nil, gensupport.WrapError(&googleapi.Error{
10561 Code: res.StatusCode,
10562 Header: res.Header,
10563 })
10564 }
10565 if err != nil {
10566 return nil, err
10567 }
10568 defer googleapi.CloseBody(res)
10569 if err := googleapi.CheckResponse(res); err != nil {
10570 return nil, gensupport.WrapError(err)
10571 }
10572 ret := &Profiles{
10573 ServerResponse: googleapi.ServerResponse{
10574 Header: res.Header,
10575 HTTPStatusCode: res.StatusCode,
10576 },
10577 }
10578 target := &ret
10579 if err := gensupport.DecodeResponse(target, res); err != nil {
10580 return nil, err
10581 }
10582 return ret, nil
10583 }
10584
10585 type ManagementProfilesPatchCall struct {
10586 s *Service
10587 accountId string
10588 webPropertyId string
10589 profileId string
10590 profile *Profile
10591 urlParams_ gensupport.URLParams
10592 ctx_ context.Context
10593 header_ http.Header
10594 }
10595
10596
10597
10598
10599
10600
10601
10602 func (r *ManagementProfilesService) Patch(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesPatchCall {
10603 c := &ManagementProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10604 c.accountId = accountId
10605 c.webPropertyId = webPropertyId
10606 c.profileId = profileId
10607 c.profile = profile
10608 return c
10609 }
10610
10611
10612
10613
10614 func (c *ManagementProfilesPatchCall) Fields(s ...googleapi.Field) *ManagementProfilesPatchCall {
10615 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10616 return c
10617 }
10618
10619
10620 func (c *ManagementProfilesPatchCall) Context(ctx context.Context) *ManagementProfilesPatchCall {
10621 c.ctx_ = ctx
10622 return c
10623 }
10624
10625
10626
10627 func (c *ManagementProfilesPatchCall) Header() http.Header {
10628 if c.header_ == nil {
10629 c.header_ = make(http.Header)
10630 }
10631 return c.header_
10632 }
10633
10634 func (c *ManagementProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
10635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10636 var body io.Reader = nil
10637 body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
10638 if err != nil {
10639 return nil, err
10640 }
10641 c.urlParams_.Set("alt", alt)
10642 c.urlParams_.Set("prettyPrint", "false")
10643 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
10644 urls += "?" + c.urlParams_.Encode()
10645 req, err := http.NewRequest("PATCH", urls, body)
10646 if err != nil {
10647 return nil, err
10648 }
10649 req.Header = reqHeaders
10650 googleapi.Expand(req.URL, map[string]string{
10651 "accountId": c.accountId,
10652 "webPropertyId": c.webPropertyId,
10653 "profileId": c.profileId,
10654 })
10655 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10656 }
10657
10658
10659
10660
10661
10662
10663 func (c *ManagementProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
10664 gensupport.SetOptions(c.urlParams_, opts...)
10665 res, err := c.doRequest("json")
10666 if res != nil && res.StatusCode == http.StatusNotModified {
10667 if res.Body != nil {
10668 res.Body.Close()
10669 }
10670 return nil, gensupport.WrapError(&googleapi.Error{
10671 Code: res.StatusCode,
10672 Header: res.Header,
10673 })
10674 }
10675 if err != nil {
10676 return nil, err
10677 }
10678 defer googleapi.CloseBody(res)
10679 if err := googleapi.CheckResponse(res); err != nil {
10680 return nil, gensupport.WrapError(err)
10681 }
10682 ret := &Profile{
10683 ServerResponse: googleapi.ServerResponse{
10684 Header: res.Header,
10685 HTTPStatusCode: res.StatusCode,
10686 },
10687 }
10688 target := &ret
10689 if err := gensupport.DecodeResponse(target, res); err != nil {
10690 return nil, err
10691 }
10692 return ret, nil
10693 }
10694
10695 type ManagementProfilesUpdateCall struct {
10696 s *Service
10697 accountId string
10698 webPropertyId string
10699 profileId string
10700 profile *Profile
10701 urlParams_ gensupport.URLParams
10702 ctx_ context.Context
10703 header_ http.Header
10704 }
10705
10706
10707
10708
10709
10710
10711 func (r *ManagementProfilesService) Update(accountId string, webPropertyId string, profileId string, profile *Profile) *ManagementProfilesUpdateCall {
10712 c := &ManagementProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10713 c.accountId = accountId
10714 c.webPropertyId = webPropertyId
10715 c.profileId = profileId
10716 c.profile = profile
10717 return c
10718 }
10719
10720
10721
10722
10723 func (c *ManagementProfilesUpdateCall) Fields(s ...googleapi.Field) *ManagementProfilesUpdateCall {
10724 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10725 return c
10726 }
10727
10728
10729 func (c *ManagementProfilesUpdateCall) Context(ctx context.Context) *ManagementProfilesUpdateCall {
10730 c.ctx_ = ctx
10731 return c
10732 }
10733
10734
10735
10736 func (c *ManagementProfilesUpdateCall) Header() http.Header {
10737 if c.header_ == nil {
10738 c.header_ = make(http.Header)
10739 }
10740 return c.header_
10741 }
10742
10743 func (c *ManagementProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
10744 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10745 var body io.Reader = nil
10746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
10747 if err != nil {
10748 return nil, err
10749 }
10750 c.urlParams_.Set("alt", alt)
10751 c.urlParams_.Set("prettyPrint", "false")
10752 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}")
10753 urls += "?" + c.urlParams_.Encode()
10754 req, err := http.NewRequest("PUT", urls, body)
10755 if err != nil {
10756 return nil, err
10757 }
10758 req.Header = reqHeaders
10759 googleapi.Expand(req.URL, map[string]string{
10760 "accountId": c.accountId,
10761 "webPropertyId": c.webPropertyId,
10762 "profileId": c.profileId,
10763 })
10764 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10765 }
10766
10767
10768
10769
10770
10771
10772 func (c *ManagementProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*Profile, error) {
10773 gensupport.SetOptions(c.urlParams_, opts...)
10774 res, err := c.doRequest("json")
10775 if res != nil && res.StatusCode == http.StatusNotModified {
10776 if res.Body != nil {
10777 res.Body.Close()
10778 }
10779 return nil, gensupport.WrapError(&googleapi.Error{
10780 Code: res.StatusCode,
10781 Header: res.Header,
10782 })
10783 }
10784 if err != nil {
10785 return nil, err
10786 }
10787 defer googleapi.CloseBody(res)
10788 if err := googleapi.CheckResponse(res); err != nil {
10789 return nil, gensupport.WrapError(err)
10790 }
10791 ret := &Profile{
10792 ServerResponse: googleapi.ServerResponse{
10793 Header: res.Header,
10794 HTTPStatusCode: res.StatusCode,
10795 },
10796 }
10797 target := &ret
10798 if err := gensupport.DecodeResponse(target, res); err != nil {
10799 return nil, err
10800 }
10801 return ret, nil
10802 }
10803
10804 type ManagementRemarketingAudienceDeleteCall struct {
10805 s *Service
10806 accountId string
10807 webPropertyId string
10808 remarketingAudienceId string
10809 urlParams_ gensupport.URLParams
10810 ctx_ context.Context
10811 header_ http.Header
10812 }
10813
10814
10815
10816
10817
10818
10819 func (r *ManagementRemarketingAudienceService) Delete(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceDeleteCall {
10820 c := &ManagementRemarketingAudienceDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10821 c.accountId = accountId
10822 c.webPropertyId = webPropertyId
10823 c.remarketingAudienceId = remarketingAudienceId
10824 return c
10825 }
10826
10827
10828
10829
10830 func (c *ManagementRemarketingAudienceDeleteCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceDeleteCall {
10831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10832 return c
10833 }
10834
10835
10836 func (c *ManagementRemarketingAudienceDeleteCall) Context(ctx context.Context) *ManagementRemarketingAudienceDeleteCall {
10837 c.ctx_ = ctx
10838 return c
10839 }
10840
10841
10842
10843 func (c *ManagementRemarketingAudienceDeleteCall) Header() http.Header {
10844 if c.header_ == nil {
10845 c.header_ = make(http.Header)
10846 }
10847 return c.header_
10848 }
10849
10850 func (c *ManagementRemarketingAudienceDeleteCall) doRequest(alt string) (*http.Response, error) {
10851 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10852 var body io.Reader = nil
10853 c.urlParams_.Set("alt", alt)
10854 c.urlParams_.Set("prettyPrint", "false")
10855 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
10856 urls += "?" + c.urlParams_.Encode()
10857 req, err := http.NewRequest("DELETE", urls, body)
10858 if err != nil {
10859 return nil, err
10860 }
10861 req.Header = reqHeaders
10862 googleapi.Expand(req.URL, map[string]string{
10863 "accountId": c.accountId,
10864 "webPropertyId": c.webPropertyId,
10865 "remarketingAudienceId": c.remarketingAudienceId,
10866 })
10867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10868 }
10869
10870
10871 func (c *ManagementRemarketingAudienceDeleteCall) Do(opts ...googleapi.CallOption) error {
10872 gensupport.SetOptions(c.urlParams_, opts...)
10873 res, err := c.doRequest("json")
10874 if err != nil {
10875 return err
10876 }
10877 defer googleapi.CloseBody(res)
10878 if err := googleapi.CheckResponse(res); err != nil {
10879 return gensupport.WrapError(err)
10880 }
10881 return nil
10882 }
10883
10884 type ManagementRemarketingAudienceGetCall struct {
10885 s *Service
10886 accountId string
10887 webPropertyId string
10888 remarketingAudienceId string
10889 urlParams_ gensupport.URLParams
10890 ifNoneMatch_ string
10891 ctx_ context.Context
10892 header_ http.Header
10893 }
10894
10895
10896
10897
10898
10899
10900
10901 func (r *ManagementRemarketingAudienceService) Get(accountId string, webPropertyId string, remarketingAudienceId string) *ManagementRemarketingAudienceGetCall {
10902 c := &ManagementRemarketingAudienceGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10903 c.accountId = accountId
10904 c.webPropertyId = webPropertyId
10905 c.remarketingAudienceId = remarketingAudienceId
10906 return c
10907 }
10908
10909
10910
10911
10912 func (c *ManagementRemarketingAudienceGetCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceGetCall {
10913 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10914 return c
10915 }
10916
10917
10918
10919
10920 func (c *ManagementRemarketingAudienceGetCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceGetCall {
10921 c.ifNoneMatch_ = entityTag
10922 return c
10923 }
10924
10925
10926 func (c *ManagementRemarketingAudienceGetCall) Context(ctx context.Context) *ManagementRemarketingAudienceGetCall {
10927 c.ctx_ = ctx
10928 return c
10929 }
10930
10931
10932
10933 func (c *ManagementRemarketingAudienceGetCall) Header() http.Header {
10934 if c.header_ == nil {
10935 c.header_ = make(http.Header)
10936 }
10937 return c.header_
10938 }
10939
10940 func (c *ManagementRemarketingAudienceGetCall) doRequest(alt string) (*http.Response, error) {
10941 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10942 if c.ifNoneMatch_ != "" {
10943 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10944 }
10945 var body io.Reader = nil
10946 c.urlParams_.Set("alt", alt)
10947 c.urlParams_.Set("prettyPrint", "false")
10948 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
10949 urls += "?" + c.urlParams_.Encode()
10950 req, err := http.NewRequest("GET", urls, body)
10951 if err != nil {
10952 return nil, err
10953 }
10954 req.Header = reqHeaders
10955 googleapi.Expand(req.URL, map[string]string{
10956 "accountId": c.accountId,
10957 "webPropertyId": c.webPropertyId,
10958 "remarketingAudienceId": c.remarketingAudienceId,
10959 })
10960 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10961 }
10962
10963
10964
10965
10966
10967
10968
10969 func (c *ManagementRemarketingAudienceGetCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
10970 gensupport.SetOptions(c.urlParams_, opts...)
10971 res, err := c.doRequest("json")
10972 if res != nil && res.StatusCode == http.StatusNotModified {
10973 if res.Body != nil {
10974 res.Body.Close()
10975 }
10976 return nil, gensupport.WrapError(&googleapi.Error{
10977 Code: res.StatusCode,
10978 Header: res.Header,
10979 })
10980 }
10981 if err != nil {
10982 return nil, err
10983 }
10984 defer googleapi.CloseBody(res)
10985 if err := googleapi.CheckResponse(res); err != nil {
10986 return nil, gensupport.WrapError(err)
10987 }
10988 ret := &RemarketingAudience{
10989 ServerResponse: googleapi.ServerResponse{
10990 Header: res.Header,
10991 HTTPStatusCode: res.StatusCode,
10992 },
10993 }
10994 target := &ret
10995 if err := gensupport.DecodeResponse(target, res); err != nil {
10996 return nil, err
10997 }
10998 return ret, nil
10999 }
11000
11001 type ManagementRemarketingAudienceInsertCall struct {
11002 s *Service
11003 accountId string
11004 webPropertyId string
11005 remarketingaudience *RemarketingAudience
11006 urlParams_ gensupport.URLParams
11007 ctx_ context.Context
11008 header_ http.Header
11009 }
11010
11011
11012
11013
11014
11015
11016 func (r *ManagementRemarketingAudienceService) Insert(accountId string, webPropertyId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceInsertCall {
11017 c := &ManagementRemarketingAudienceInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11018 c.accountId = accountId
11019 c.webPropertyId = webPropertyId
11020 c.remarketingaudience = remarketingaudience
11021 return c
11022 }
11023
11024
11025
11026
11027 func (c *ManagementRemarketingAudienceInsertCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceInsertCall {
11028 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11029 return c
11030 }
11031
11032
11033 func (c *ManagementRemarketingAudienceInsertCall) Context(ctx context.Context) *ManagementRemarketingAudienceInsertCall {
11034 c.ctx_ = ctx
11035 return c
11036 }
11037
11038
11039
11040 func (c *ManagementRemarketingAudienceInsertCall) Header() http.Header {
11041 if c.header_ == nil {
11042 c.header_ = make(http.Header)
11043 }
11044 return c.header_
11045 }
11046
11047 func (c *ManagementRemarketingAudienceInsertCall) doRequest(alt string) (*http.Response, error) {
11048 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11049 var body io.Reader = nil
11050 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
11051 if err != nil {
11052 return nil, err
11053 }
11054 c.urlParams_.Set("alt", alt)
11055 c.urlParams_.Set("prettyPrint", "false")
11056 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
11057 urls += "?" + c.urlParams_.Encode()
11058 req, err := http.NewRequest("POST", urls, body)
11059 if err != nil {
11060 return nil, err
11061 }
11062 req.Header = reqHeaders
11063 googleapi.Expand(req.URL, map[string]string{
11064 "accountId": c.accountId,
11065 "webPropertyId": c.webPropertyId,
11066 })
11067 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11068 }
11069
11070
11071
11072
11073
11074
11075
11076 func (c *ManagementRemarketingAudienceInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
11077 gensupport.SetOptions(c.urlParams_, opts...)
11078 res, err := c.doRequest("json")
11079 if res != nil && res.StatusCode == http.StatusNotModified {
11080 if res.Body != nil {
11081 res.Body.Close()
11082 }
11083 return nil, gensupport.WrapError(&googleapi.Error{
11084 Code: res.StatusCode,
11085 Header: res.Header,
11086 })
11087 }
11088 if err != nil {
11089 return nil, err
11090 }
11091 defer googleapi.CloseBody(res)
11092 if err := googleapi.CheckResponse(res); err != nil {
11093 return nil, gensupport.WrapError(err)
11094 }
11095 ret := &RemarketingAudience{
11096 ServerResponse: googleapi.ServerResponse{
11097 Header: res.Header,
11098 HTTPStatusCode: res.StatusCode,
11099 },
11100 }
11101 target := &ret
11102 if err := gensupport.DecodeResponse(target, res); err != nil {
11103 return nil, err
11104 }
11105 return ret, nil
11106 }
11107
11108 type ManagementRemarketingAudienceListCall struct {
11109 s *Service
11110 accountId string
11111 webPropertyId string
11112 urlParams_ gensupport.URLParams
11113 ifNoneMatch_ string
11114 ctx_ context.Context
11115 header_ http.Header
11116 }
11117
11118
11119
11120
11121
11122
11123 func (r *ManagementRemarketingAudienceService) List(accountId string, webPropertyId string) *ManagementRemarketingAudienceListCall {
11124 c := &ManagementRemarketingAudienceListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11125 c.accountId = accountId
11126 c.webPropertyId = webPropertyId
11127 return c
11128 }
11129
11130
11131
11132 func (c *ManagementRemarketingAudienceListCall) MaxResults(maxResults int64) *ManagementRemarketingAudienceListCall {
11133 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11134 return c
11135 }
11136
11137
11138
11139
11140 func (c *ManagementRemarketingAudienceListCall) StartIndex(startIndex int64) *ManagementRemarketingAudienceListCall {
11141 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11142 return c
11143 }
11144
11145
11146 func (c *ManagementRemarketingAudienceListCall) Type(type_ string) *ManagementRemarketingAudienceListCall {
11147 c.urlParams_.Set("type", type_)
11148 return c
11149 }
11150
11151
11152
11153
11154 func (c *ManagementRemarketingAudienceListCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceListCall {
11155 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11156 return c
11157 }
11158
11159
11160
11161
11162 func (c *ManagementRemarketingAudienceListCall) IfNoneMatch(entityTag string) *ManagementRemarketingAudienceListCall {
11163 c.ifNoneMatch_ = entityTag
11164 return c
11165 }
11166
11167
11168 func (c *ManagementRemarketingAudienceListCall) Context(ctx context.Context) *ManagementRemarketingAudienceListCall {
11169 c.ctx_ = ctx
11170 return c
11171 }
11172
11173
11174
11175 func (c *ManagementRemarketingAudienceListCall) Header() http.Header {
11176 if c.header_ == nil {
11177 c.header_ = make(http.Header)
11178 }
11179 return c.header_
11180 }
11181
11182 func (c *ManagementRemarketingAudienceListCall) doRequest(alt string) (*http.Response, error) {
11183 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11184 if c.ifNoneMatch_ != "" {
11185 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11186 }
11187 var body io.Reader = nil
11188 c.urlParams_.Set("alt", alt)
11189 c.urlParams_.Set("prettyPrint", "false")
11190 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences")
11191 urls += "?" + c.urlParams_.Encode()
11192 req, err := http.NewRequest("GET", urls, body)
11193 if err != nil {
11194 return nil, err
11195 }
11196 req.Header = reqHeaders
11197 googleapi.Expand(req.URL, map[string]string{
11198 "accountId": c.accountId,
11199 "webPropertyId": c.webPropertyId,
11200 })
11201 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11202 }
11203
11204
11205
11206
11207
11208
11209
11210 func (c *ManagementRemarketingAudienceListCall) Do(opts ...googleapi.CallOption) (*RemarketingAudiences, error) {
11211 gensupport.SetOptions(c.urlParams_, opts...)
11212 res, err := c.doRequest("json")
11213 if res != nil && res.StatusCode == http.StatusNotModified {
11214 if res.Body != nil {
11215 res.Body.Close()
11216 }
11217 return nil, gensupport.WrapError(&googleapi.Error{
11218 Code: res.StatusCode,
11219 Header: res.Header,
11220 })
11221 }
11222 if err != nil {
11223 return nil, err
11224 }
11225 defer googleapi.CloseBody(res)
11226 if err := googleapi.CheckResponse(res); err != nil {
11227 return nil, gensupport.WrapError(err)
11228 }
11229 ret := &RemarketingAudiences{
11230 ServerResponse: googleapi.ServerResponse{
11231 Header: res.Header,
11232 HTTPStatusCode: res.StatusCode,
11233 },
11234 }
11235 target := &ret
11236 if err := gensupport.DecodeResponse(target, res); err != nil {
11237 return nil, err
11238 }
11239 return ret, nil
11240 }
11241
11242 type ManagementRemarketingAudiencePatchCall struct {
11243 s *Service
11244 accountId string
11245 webPropertyId string
11246 remarketingAudienceId string
11247 remarketingaudience *RemarketingAudience
11248 urlParams_ gensupport.URLParams
11249 ctx_ context.Context
11250 header_ http.Header
11251 }
11252
11253
11254
11255
11256
11257
11258
11259 func (r *ManagementRemarketingAudienceService) Patch(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudiencePatchCall {
11260 c := &ManagementRemarketingAudiencePatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11261 c.accountId = accountId
11262 c.webPropertyId = webPropertyId
11263 c.remarketingAudienceId = remarketingAudienceId
11264 c.remarketingaudience = remarketingaudience
11265 return c
11266 }
11267
11268
11269
11270
11271 func (c *ManagementRemarketingAudiencePatchCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudiencePatchCall {
11272 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11273 return c
11274 }
11275
11276
11277 func (c *ManagementRemarketingAudiencePatchCall) Context(ctx context.Context) *ManagementRemarketingAudiencePatchCall {
11278 c.ctx_ = ctx
11279 return c
11280 }
11281
11282
11283
11284 func (c *ManagementRemarketingAudiencePatchCall) Header() http.Header {
11285 if c.header_ == nil {
11286 c.header_ = make(http.Header)
11287 }
11288 return c.header_
11289 }
11290
11291 func (c *ManagementRemarketingAudiencePatchCall) doRequest(alt string) (*http.Response, error) {
11292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11293 var body io.Reader = nil
11294 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
11295 if err != nil {
11296 return nil, err
11297 }
11298 c.urlParams_.Set("alt", alt)
11299 c.urlParams_.Set("prettyPrint", "false")
11300 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
11301 urls += "?" + c.urlParams_.Encode()
11302 req, err := http.NewRequest("PATCH", urls, body)
11303 if err != nil {
11304 return nil, err
11305 }
11306 req.Header = reqHeaders
11307 googleapi.Expand(req.URL, map[string]string{
11308 "accountId": c.accountId,
11309 "webPropertyId": c.webPropertyId,
11310 "remarketingAudienceId": c.remarketingAudienceId,
11311 })
11312 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11313 }
11314
11315
11316
11317
11318
11319
11320
11321 func (c *ManagementRemarketingAudiencePatchCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
11322 gensupport.SetOptions(c.urlParams_, opts...)
11323 res, err := c.doRequest("json")
11324 if res != nil && res.StatusCode == http.StatusNotModified {
11325 if res.Body != nil {
11326 res.Body.Close()
11327 }
11328 return nil, gensupport.WrapError(&googleapi.Error{
11329 Code: res.StatusCode,
11330 Header: res.Header,
11331 })
11332 }
11333 if err != nil {
11334 return nil, err
11335 }
11336 defer googleapi.CloseBody(res)
11337 if err := googleapi.CheckResponse(res); err != nil {
11338 return nil, gensupport.WrapError(err)
11339 }
11340 ret := &RemarketingAudience{
11341 ServerResponse: googleapi.ServerResponse{
11342 Header: res.Header,
11343 HTTPStatusCode: res.StatusCode,
11344 },
11345 }
11346 target := &ret
11347 if err := gensupport.DecodeResponse(target, res); err != nil {
11348 return nil, err
11349 }
11350 return ret, nil
11351 }
11352
11353 type ManagementRemarketingAudienceUpdateCall struct {
11354 s *Service
11355 accountId string
11356 webPropertyId string
11357 remarketingAudienceId string
11358 remarketingaudience *RemarketingAudience
11359 urlParams_ gensupport.URLParams
11360 ctx_ context.Context
11361 header_ http.Header
11362 }
11363
11364
11365
11366
11367
11368
11369 func (r *ManagementRemarketingAudienceService) Update(accountId string, webPropertyId string, remarketingAudienceId string, remarketingaudience *RemarketingAudience) *ManagementRemarketingAudienceUpdateCall {
11370 c := &ManagementRemarketingAudienceUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11371 c.accountId = accountId
11372 c.webPropertyId = webPropertyId
11373 c.remarketingAudienceId = remarketingAudienceId
11374 c.remarketingaudience = remarketingaudience
11375 return c
11376 }
11377
11378
11379
11380
11381 func (c *ManagementRemarketingAudienceUpdateCall) Fields(s ...googleapi.Field) *ManagementRemarketingAudienceUpdateCall {
11382 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11383 return c
11384 }
11385
11386
11387 func (c *ManagementRemarketingAudienceUpdateCall) Context(ctx context.Context) *ManagementRemarketingAudienceUpdateCall {
11388 c.ctx_ = ctx
11389 return c
11390 }
11391
11392
11393
11394 func (c *ManagementRemarketingAudienceUpdateCall) Header() http.Header {
11395 if c.header_ == nil {
11396 c.header_ = make(http.Header)
11397 }
11398 return c.header_
11399 }
11400
11401 func (c *ManagementRemarketingAudienceUpdateCall) doRequest(alt string) (*http.Response, error) {
11402 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11403 var body io.Reader = nil
11404 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketingaudience)
11405 if err != nil {
11406 return nil, err
11407 }
11408 c.urlParams_.Set("alt", alt)
11409 c.urlParams_.Set("prettyPrint", "false")
11410 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}")
11411 urls += "?" + c.urlParams_.Encode()
11412 req, err := http.NewRequest("PUT", urls, body)
11413 if err != nil {
11414 return nil, err
11415 }
11416 req.Header = reqHeaders
11417 googleapi.Expand(req.URL, map[string]string{
11418 "accountId": c.accountId,
11419 "webPropertyId": c.webPropertyId,
11420 "remarketingAudienceId": c.remarketingAudienceId,
11421 })
11422 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11423 }
11424
11425
11426
11427
11428
11429
11430
11431 func (c *ManagementRemarketingAudienceUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingAudience, error) {
11432 gensupport.SetOptions(c.urlParams_, opts...)
11433 res, err := c.doRequest("json")
11434 if res != nil && res.StatusCode == http.StatusNotModified {
11435 if res.Body != nil {
11436 res.Body.Close()
11437 }
11438 return nil, gensupport.WrapError(&googleapi.Error{
11439 Code: res.StatusCode,
11440 Header: res.Header,
11441 })
11442 }
11443 if err != nil {
11444 return nil, err
11445 }
11446 defer googleapi.CloseBody(res)
11447 if err := googleapi.CheckResponse(res); err != nil {
11448 return nil, gensupport.WrapError(err)
11449 }
11450 ret := &RemarketingAudience{
11451 ServerResponse: googleapi.ServerResponse{
11452 Header: res.Header,
11453 HTTPStatusCode: res.StatusCode,
11454 },
11455 }
11456 target := &ret
11457 if err := gensupport.DecodeResponse(target, res); err != nil {
11458 return nil, err
11459 }
11460 return ret, nil
11461 }
11462
11463 type ManagementSegmentsListCall struct {
11464 s *Service
11465 urlParams_ gensupport.URLParams
11466 ifNoneMatch_ string
11467 ctx_ context.Context
11468 header_ http.Header
11469 }
11470
11471
11472 func (r *ManagementSegmentsService) List() *ManagementSegmentsListCall {
11473 c := &ManagementSegmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11474 return c
11475 }
11476
11477
11478
11479 func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall {
11480 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11481 return c
11482 }
11483
11484
11485
11486
11487 func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall {
11488 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11489 return c
11490 }
11491
11492
11493
11494
11495 func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall {
11496 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11497 return c
11498 }
11499
11500
11501
11502
11503 func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall {
11504 c.ifNoneMatch_ = entityTag
11505 return c
11506 }
11507
11508
11509 func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
11510 c.ctx_ = ctx
11511 return c
11512 }
11513
11514
11515
11516 func (c *ManagementSegmentsListCall) Header() http.Header {
11517 if c.header_ == nil {
11518 c.header_ = make(http.Header)
11519 }
11520 return c.header_
11521 }
11522
11523 func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
11524 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11525 if c.ifNoneMatch_ != "" {
11526 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11527 }
11528 var body io.Reader = nil
11529 c.urlParams_.Set("alt", alt)
11530 c.urlParams_.Set("prettyPrint", "false")
11531 urls := googleapi.ResolveRelative(c.s.BasePath, "management/segments")
11532 urls += "?" + c.urlParams_.Encode()
11533 req, err := http.NewRequest("GET", urls, body)
11534 if err != nil {
11535 return nil, err
11536 }
11537 req.Header = reqHeaders
11538 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11539 }
11540
11541
11542
11543
11544
11545
11546 func (c *ManagementSegmentsListCall) Do(opts ...googleapi.CallOption) (*Segments, error) {
11547 gensupport.SetOptions(c.urlParams_, opts...)
11548 res, err := c.doRequest("json")
11549 if res != nil && res.StatusCode == http.StatusNotModified {
11550 if res.Body != nil {
11551 res.Body.Close()
11552 }
11553 return nil, gensupport.WrapError(&googleapi.Error{
11554 Code: res.StatusCode,
11555 Header: res.Header,
11556 })
11557 }
11558 if err != nil {
11559 return nil, err
11560 }
11561 defer googleapi.CloseBody(res)
11562 if err := googleapi.CheckResponse(res); err != nil {
11563 return nil, gensupport.WrapError(err)
11564 }
11565 ret := &Segments{
11566 ServerResponse: googleapi.ServerResponse{
11567 Header: res.Header,
11568 HTTPStatusCode: res.StatusCode,
11569 },
11570 }
11571 target := &ret
11572 if err := gensupport.DecodeResponse(target, res); err != nil {
11573 return nil, err
11574 }
11575 return ret, nil
11576 }
11577
11578 type ManagementUnsampledReportsDeleteCall struct {
11579 s *Service
11580 accountId string
11581 webPropertyId string
11582 profileId string
11583 unsampledReportId string
11584 urlParams_ gensupport.URLParams
11585 ctx_ context.Context
11586 header_ http.Header
11587 }
11588
11589
11590
11591
11592
11593
11594
11595 func (r *ManagementUnsampledReportsService) Delete(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsDeleteCall {
11596 c := &ManagementUnsampledReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11597 c.accountId = accountId
11598 c.webPropertyId = webPropertyId
11599 c.profileId = profileId
11600 c.unsampledReportId = unsampledReportId
11601 return c
11602 }
11603
11604
11605
11606
11607 func (c *ManagementUnsampledReportsDeleteCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsDeleteCall {
11608 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11609 return c
11610 }
11611
11612
11613 func (c *ManagementUnsampledReportsDeleteCall) Context(ctx context.Context) *ManagementUnsampledReportsDeleteCall {
11614 c.ctx_ = ctx
11615 return c
11616 }
11617
11618
11619
11620 func (c *ManagementUnsampledReportsDeleteCall) Header() http.Header {
11621 if c.header_ == nil {
11622 c.header_ = make(http.Header)
11623 }
11624 return c.header_
11625 }
11626
11627 func (c *ManagementUnsampledReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
11628 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11629 var body io.Reader = nil
11630 c.urlParams_.Set("alt", alt)
11631 c.urlParams_.Set("prettyPrint", "false")
11632 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
11633 urls += "?" + c.urlParams_.Encode()
11634 req, err := http.NewRequest("DELETE", urls, body)
11635 if err != nil {
11636 return nil, err
11637 }
11638 req.Header = reqHeaders
11639 googleapi.Expand(req.URL, map[string]string{
11640 "accountId": c.accountId,
11641 "webPropertyId": c.webPropertyId,
11642 "profileId": c.profileId,
11643 "unsampledReportId": c.unsampledReportId,
11644 })
11645 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11646 }
11647
11648
11649 func (c *ManagementUnsampledReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
11650 gensupport.SetOptions(c.urlParams_, opts...)
11651 res, err := c.doRequest("json")
11652 if err != nil {
11653 return err
11654 }
11655 defer googleapi.CloseBody(res)
11656 if err := googleapi.CheckResponse(res); err != nil {
11657 return gensupport.WrapError(err)
11658 }
11659 return nil
11660 }
11661
11662 type ManagementUnsampledReportsGetCall struct {
11663 s *Service
11664 accountId string
11665 webPropertyId string
11666 profileId string
11667 unsampledReportId string
11668 urlParams_ gensupport.URLParams
11669 ifNoneMatch_ string
11670 ctx_ context.Context
11671 header_ http.Header
11672 }
11673
11674
11675
11676
11677
11678
11679
11680 func (r *ManagementUnsampledReportsService) Get(accountId string, webPropertyId string, profileId string, unsampledReportId string) *ManagementUnsampledReportsGetCall {
11681 c := &ManagementUnsampledReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11682 c.accountId = accountId
11683 c.webPropertyId = webPropertyId
11684 c.profileId = profileId
11685 c.unsampledReportId = unsampledReportId
11686 return c
11687 }
11688
11689
11690
11691
11692 func (c *ManagementUnsampledReportsGetCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsGetCall {
11693 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11694 return c
11695 }
11696
11697
11698
11699
11700 func (c *ManagementUnsampledReportsGetCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsGetCall {
11701 c.ifNoneMatch_ = entityTag
11702 return c
11703 }
11704
11705
11706 func (c *ManagementUnsampledReportsGetCall) Context(ctx context.Context) *ManagementUnsampledReportsGetCall {
11707 c.ctx_ = ctx
11708 return c
11709 }
11710
11711
11712
11713 func (c *ManagementUnsampledReportsGetCall) Header() http.Header {
11714 if c.header_ == nil {
11715 c.header_ = make(http.Header)
11716 }
11717 return c.header_
11718 }
11719
11720 func (c *ManagementUnsampledReportsGetCall) doRequest(alt string) (*http.Response, error) {
11721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11722 if c.ifNoneMatch_ != "" {
11723 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11724 }
11725 var body io.Reader = nil
11726 c.urlParams_.Set("alt", alt)
11727 c.urlParams_.Set("prettyPrint", "false")
11728 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}")
11729 urls += "?" + c.urlParams_.Encode()
11730 req, err := http.NewRequest("GET", urls, body)
11731 if err != nil {
11732 return nil, err
11733 }
11734 req.Header = reqHeaders
11735 googleapi.Expand(req.URL, map[string]string{
11736 "accountId": c.accountId,
11737 "webPropertyId": c.webPropertyId,
11738 "profileId": c.profileId,
11739 "unsampledReportId": c.unsampledReportId,
11740 })
11741 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11742 }
11743
11744
11745
11746
11747
11748
11749
11750 func (c *ManagementUnsampledReportsGetCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
11751 gensupport.SetOptions(c.urlParams_, opts...)
11752 res, err := c.doRequest("json")
11753 if res != nil && res.StatusCode == http.StatusNotModified {
11754 if res.Body != nil {
11755 res.Body.Close()
11756 }
11757 return nil, gensupport.WrapError(&googleapi.Error{
11758 Code: res.StatusCode,
11759 Header: res.Header,
11760 })
11761 }
11762 if err != nil {
11763 return nil, err
11764 }
11765 defer googleapi.CloseBody(res)
11766 if err := googleapi.CheckResponse(res); err != nil {
11767 return nil, gensupport.WrapError(err)
11768 }
11769 ret := &UnsampledReport{
11770 ServerResponse: googleapi.ServerResponse{
11771 Header: res.Header,
11772 HTTPStatusCode: res.StatusCode,
11773 },
11774 }
11775 target := &ret
11776 if err := gensupport.DecodeResponse(target, res); err != nil {
11777 return nil, err
11778 }
11779 return ret, nil
11780 }
11781
11782 type ManagementUnsampledReportsInsertCall struct {
11783 s *Service
11784 accountId string
11785 webPropertyId string
11786 profileId string
11787 unsampledreport *UnsampledReport
11788 urlParams_ gensupport.URLParams
11789 ctx_ context.Context
11790 header_ http.Header
11791 }
11792
11793
11794
11795
11796
11797
11798 func (r *ManagementUnsampledReportsService) Insert(accountId string, webPropertyId string, profileId string, unsampledreport *UnsampledReport) *ManagementUnsampledReportsInsertCall {
11799 c := &ManagementUnsampledReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11800 c.accountId = accountId
11801 c.webPropertyId = webPropertyId
11802 c.profileId = profileId
11803 c.unsampledreport = unsampledreport
11804 return c
11805 }
11806
11807
11808
11809
11810 func (c *ManagementUnsampledReportsInsertCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsInsertCall {
11811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11812 return c
11813 }
11814
11815
11816 func (c *ManagementUnsampledReportsInsertCall) Context(ctx context.Context) *ManagementUnsampledReportsInsertCall {
11817 c.ctx_ = ctx
11818 return c
11819 }
11820
11821
11822
11823 func (c *ManagementUnsampledReportsInsertCall) Header() http.Header {
11824 if c.header_ == nil {
11825 c.header_ = make(http.Header)
11826 }
11827 return c.header_
11828 }
11829
11830 func (c *ManagementUnsampledReportsInsertCall) doRequest(alt string) (*http.Response, error) {
11831 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11832 var body io.Reader = nil
11833 body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsampledreport)
11834 if err != nil {
11835 return nil, err
11836 }
11837 c.urlParams_.Set("alt", alt)
11838 c.urlParams_.Set("prettyPrint", "false")
11839 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
11840 urls += "?" + c.urlParams_.Encode()
11841 req, err := http.NewRequest("POST", urls, body)
11842 if err != nil {
11843 return nil, err
11844 }
11845 req.Header = reqHeaders
11846 googleapi.Expand(req.URL, map[string]string{
11847 "accountId": c.accountId,
11848 "webPropertyId": c.webPropertyId,
11849 "profileId": c.profileId,
11850 })
11851 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11852 }
11853
11854
11855
11856
11857
11858
11859
11860 func (c *ManagementUnsampledReportsInsertCall) Do(opts ...googleapi.CallOption) (*UnsampledReport, error) {
11861 gensupport.SetOptions(c.urlParams_, opts...)
11862 res, err := c.doRequest("json")
11863 if res != nil && res.StatusCode == http.StatusNotModified {
11864 if res.Body != nil {
11865 res.Body.Close()
11866 }
11867 return nil, gensupport.WrapError(&googleapi.Error{
11868 Code: res.StatusCode,
11869 Header: res.Header,
11870 })
11871 }
11872 if err != nil {
11873 return nil, err
11874 }
11875 defer googleapi.CloseBody(res)
11876 if err := googleapi.CheckResponse(res); err != nil {
11877 return nil, gensupport.WrapError(err)
11878 }
11879 ret := &UnsampledReport{
11880 ServerResponse: googleapi.ServerResponse{
11881 Header: res.Header,
11882 HTTPStatusCode: res.StatusCode,
11883 },
11884 }
11885 target := &ret
11886 if err := gensupport.DecodeResponse(target, res); err != nil {
11887 return nil, err
11888 }
11889 return ret, nil
11890 }
11891
11892 type ManagementUnsampledReportsListCall struct {
11893 s *Service
11894 accountId string
11895 webPropertyId string
11896 profileId string
11897 urlParams_ gensupport.URLParams
11898 ifNoneMatch_ string
11899 ctx_ context.Context
11900 header_ http.Header
11901 }
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911 func (r *ManagementUnsampledReportsService) List(accountId string, webPropertyId string, profileId string) *ManagementUnsampledReportsListCall {
11912 c := &ManagementUnsampledReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11913 c.accountId = accountId
11914 c.webPropertyId = webPropertyId
11915 c.profileId = profileId
11916 return c
11917 }
11918
11919
11920
11921 func (c *ManagementUnsampledReportsListCall) MaxResults(maxResults int64) *ManagementUnsampledReportsListCall {
11922 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
11923 return c
11924 }
11925
11926
11927
11928
11929 func (c *ManagementUnsampledReportsListCall) StartIndex(startIndex int64) *ManagementUnsampledReportsListCall {
11930 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
11931 return c
11932 }
11933
11934
11935
11936
11937 func (c *ManagementUnsampledReportsListCall) Fields(s ...googleapi.Field) *ManagementUnsampledReportsListCall {
11938 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11939 return c
11940 }
11941
11942
11943
11944
11945 func (c *ManagementUnsampledReportsListCall) IfNoneMatch(entityTag string) *ManagementUnsampledReportsListCall {
11946 c.ifNoneMatch_ = entityTag
11947 return c
11948 }
11949
11950
11951 func (c *ManagementUnsampledReportsListCall) Context(ctx context.Context) *ManagementUnsampledReportsListCall {
11952 c.ctx_ = ctx
11953 return c
11954 }
11955
11956
11957
11958 func (c *ManagementUnsampledReportsListCall) Header() http.Header {
11959 if c.header_ == nil {
11960 c.header_ = make(http.Header)
11961 }
11962 return c.header_
11963 }
11964
11965 func (c *ManagementUnsampledReportsListCall) doRequest(alt string) (*http.Response, error) {
11966 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11967 if c.ifNoneMatch_ != "" {
11968 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11969 }
11970 var body io.Reader = nil
11971 c.urlParams_.Set("alt", alt)
11972 c.urlParams_.Set("prettyPrint", "false")
11973 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports")
11974 urls += "?" + c.urlParams_.Encode()
11975 req, err := http.NewRequest("GET", urls, body)
11976 if err != nil {
11977 return nil, err
11978 }
11979 req.Header = reqHeaders
11980 googleapi.Expand(req.URL, map[string]string{
11981 "accountId": c.accountId,
11982 "webPropertyId": c.webPropertyId,
11983 "profileId": c.profileId,
11984 })
11985 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11986 }
11987
11988
11989
11990
11991
11992
11993
11994 func (c *ManagementUnsampledReportsListCall) Do(opts ...googleapi.CallOption) (*UnsampledReports, error) {
11995 gensupport.SetOptions(c.urlParams_, opts...)
11996 res, err := c.doRequest("json")
11997 if res != nil && res.StatusCode == http.StatusNotModified {
11998 if res.Body != nil {
11999 res.Body.Close()
12000 }
12001 return nil, gensupport.WrapError(&googleapi.Error{
12002 Code: res.StatusCode,
12003 Header: res.Header,
12004 })
12005 }
12006 if err != nil {
12007 return nil, err
12008 }
12009 defer googleapi.CloseBody(res)
12010 if err := googleapi.CheckResponse(res); err != nil {
12011 return nil, gensupport.WrapError(err)
12012 }
12013 ret := &UnsampledReports{
12014 ServerResponse: googleapi.ServerResponse{
12015 Header: res.Header,
12016 HTTPStatusCode: res.StatusCode,
12017 },
12018 }
12019 target := &ret
12020 if err := gensupport.DecodeResponse(target, res); err != nil {
12021 return nil, err
12022 }
12023 return ret, nil
12024 }
12025
12026 type ManagementUploadsDeleteUploadDataCall struct {
12027 s *Service
12028 accountId string
12029 webPropertyId string
12030 customDataSourceId string
12031 analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest
12032 urlParams_ gensupport.URLParams
12033 ctx_ context.Context
12034 header_ http.Header
12035 }
12036
12037
12038
12039
12040
12041
12042 func (r *ManagementUploadsService) DeleteUploadData(accountId string, webPropertyId string, customDataSourceId string, analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest) *ManagementUploadsDeleteUploadDataCall {
12043 c := &ManagementUploadsDeleteUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12044 c.accountId = accountId
12045 c.webPropertyId = webPropertyId
12046 c.customDataSourceId = customDataSourceId
12047 c.analyticsdataimportdeleteuploaddatarequest = analyticsdataimportdeleteuploaddatarequest
12048 return c
12049 }
12050
12051
12052
12053
12054 func (c *ManagementUploadsDeleteUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsDeleteUploadDataCall {
12055 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12056 return c
12057 }
12058
12059
12060 func (c *ManagementUploadsDeleteUploadDataCall) Context(ctx context.Context) *ManagementUploadsDeleteUploadDataCall {
12061 c.ctx_ = ctx
12062 return c
12063 }
12064
12065
12066
12067 func (c *ManagementUploadsDeleteUploadDataCall) Header() http.Header {
12068 if c.header_ == nil {
12069 c.header_ = make(http.Header)
12070 }
12071 return c.header_
12072 }
12073
12074 func (c *ManagementUploadsDeleteUploadDataCall) doRequest(alt string) (*http.Response, error) {
12075 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12076 var body io.Reader = nil
12077 body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsdataimportdeleteuploaddatarequest)
12078 if err != nil {
12079 return nil, err
12080 }
12081 c.urlParams_.Set("alt", alt)
12082 c.urlParams_.Set("prettyPrint", "false")
12083 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData")
12084 urls += "?" + c.urlParams_.Encode()
12085 req, err := http.NewRequest("POST", urls, body)
12086 if err != nil {
12087 return nil, err
12088 }
12089 req.Header = reqHeaders
12090 googleapi.Expand(req.URL, map[string]string{
12091 "accountId": c.accountId,
12092 "webPropertyId": c.webPropertyId,
12093 "customDataSourceId": c.customDataSourceId,
12094 })
12095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12096 }
12097
12098
12099 func (c *ManagementUploadsDeleteUploadDataCall) Do(opts ...googleapi.CallOption) error {
12100 gensupport.SetOptions(c.urlParams_, opts...)
12101 res, err := c.doRequest("json")
12102 if err != nil {
12103 return err
12104 }
12105 defer googleapi.CloseBody(res)
12106 if err := googleapi.CheckResponse(res); err != nil {
12107 return gensupport.WrapError(err)
12108 }
12109 return nil
12110 }
12111
12112 type ManagementUploadsGetCall struct {
12113 s *Service
12114 accountId string
12115 webPropertyId string
12116 customDataSourceId string
12117 uploadId string
12118 urlParams_ gensupport.URLParams
12119 ifNoneMatch_ string
12120 ctx_ context.Context
12121 header_ http.Header
12122 }
12123
12124
12125
12126
12127
12128
12129
12130 func (r *ManagementUploadsService) Get(accountId string, webPropertyId string, customDataSourceId string, uploadId string) *ManagementUploadsGetCall {
12131 c := &ManagementUploadsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12132 c.accountId = accountId
12133 c.webPropertyId = webPropertyId
12134 c.customDataSourceId = customDataSourceId
12135 c.uploadId = uploadId
12136 return c
12137 }
12138
12139
12140
12141
12142 func (c *ManagementUploadsGetCall) Fields(s ...googleapi.Field) *ManagementUploadsGetCall {
12143 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12144 return c
12145 }
12146
12147
12148
12149
12150 func (c *ManagementUploadsGetCall) IfNoneMatch(entityTag string) *ManagementUploadsGetCall {
12151 c.ifNoneMatch_ = entityTag
12152 return c
12153 }
12154
12155
12156 func (c *ManagementUploadsGetCall) Context(ctx context.Context) *ManagementUploadsGetCall {
12157 c.ctx_ = ctx
12158 return c
12159 }
12160
12161
12162
12163 func (c *ManagementUploadsGetCall) Header() http.Header {
12164 if c.header_ == nil {
12165 c.header_ = make(http.Header)
12166 }
12167 return c.header_
12168 }
12169
12170 func (c *ManagementUploadsGetCall) doRequest(alt string) (*http.Response, error) {
12171 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12172 if c.ifNoneMatch_ != "" {
12173 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12174 }
12175 var body io.Reader = nil
12176 c.urlParams_.Set("alt", alt)
12177 c.urlParams_.Set("prettyPrint", "false")
12178 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}")
12179 urls += "?" + c.urlParams_.Encode()
12180 req, err := http.NewRequest("GET", urls, body)
12181 if err != nil {
12182 return nil, err
12183 }
12184 req.Header = reqHeaders
12185 googleapi.Expand(req.URL, map[string]string{
12186 "accountId": c.accountId,
12187 "webPropertyId": c.webPropertyId,
12188 "customDataSourceId": c.customDataSourceId,
12189 "uploadId": c.uploadId,
12190 })
12191 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12192 }
12193
12194
12195
12196
12197
12198
12199 func (c *ManagementUploadsGetCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
12200 gensupport.SetOptions(c.urlParams_, opts...)
12201 res, err := c.doRequest("json")
12202 if res != nil && res.StatusCode == http.StatusNotModified {
12203 if res.Body != nil {
12204 res.Body.Close()
12205 }
12206 return nil, gensupport.WrapError(&googleapi.Error{
12207 Code: res.StatusCode,
12208 Header: res.Header,
12209 })
12210 }
12211 if err != nil {
12212 return nil, err
12213 }
12214 defer googleapi.CloseBody(res)
12215 if err := googleapi.CheckResponse(res); err != nil {
12216 return nil, gensupport.WrapError(err)
12217 }
12218 ret := &Upload{
12219 ServerResponse: googleapi.ServerResponse{
12220 Header: res.Header,
12221 HTTPStatusCode: res.StatusCode,
12222 },
12223 }
12224 target := &ret
12225 if err := gensupport.DecodeResponse(target, res); err != nil {
12226 return nil, err
12227 }
12228 return ret, nil
12229 }
12230
12231 type ManagementUploadsListCall struct {
12232 s *Service
12233 accountId string
12234 webPropertyId string
12235 customDataSourceId string
12236 urlParams_ gensupport.URLParams
12237 ifNoneMatch_ string
12238 ctx_ context.Context
12239 header_ http.Header
12240 }
12241
12242
12243
12244
12245
12246
12247 func (r *ManagementUploadsService) List(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsListCall {
12248 c := &ManagementUploadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12249 c.accountId = accountId
12250 c.webPropertyId = webPropertyId
12251 c.customDataSourceId = customDataSourceId
12252 return c
12253 }
12254
12255
12256
12257 func (c *ManagementUploadsListCall) MaxResults(maxResults int64) *ManagementUploadsListCall {
12258 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
12259 return c
12260 }
12261
12262
12263
12264
12265 func (c *ManagementUploadsListCall) StartIndex(startIndex int64) *ManagementUploadsListCall {
12266 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
12267 return c
12268 }
12269
12270
12271
12272
12273 func (c *ManagementUploadsListCall) Fields(s ...googleapi.Field) *ManagementUploadsListCall {
12274 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12275 return c
12276 }
12277
12278
12279
12280
12281 func (c *ManagementUploadsListCall) IfNoneMatch(entityTag string) *ManagementUploadsListCall {
12282 c.ifNoneMatch_ = entityTag
12283 return c
12284 }
12285
12286
12287 func (c *ManagementUploadsListCall) Context(ctx context.Context) *ManagementUploadsListCall {
12288 c.ctx_ = ctx
12289 return c
12290 }
12291
12292
12293
12294 func (c *ManagementUploadsListCall) Header() http.Header {
12295 if c.header_ == nil {
12296 c.header_ = make(http.Header)
12297 }
12298 return c.header_
12299 }
12300
12301 func (c *ManagementUploadsListCall) doRequest(alt string) (*http.Response, error) {
12302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12303 if c.ifNoneMatch_ != "" {
12304 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12305 }
12306 var body io.Reader = nil
12307 c.urlParams_.Set("alt", alt)
12308 c.urlParams_.Set("prettyPrint", "false")
12309 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
12310 urls += "?" + c.urlParams_.Encode()
12311 req, err := http.NewRequest("GET", urls, body)
12312 if err != nil {
12313 return nil, err
12314 }
12315 req.Header = reqHeaders
12316 googleapi.Expand(req.URL, map[string]string{
12317 "accountId": c.accountId,
12318 "webPropertyId": c.webPropertyId,
12319 "customDataSourceId": c.customDataSourceId,
12320 })
12321 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12322 }
12323
12324
12325
12326
12327
12328
12329 func (c *ManagementUploadsListCall) Do(opts ...googleapi.CallOption) (*Uploads, error) {
12330 gensupport.SetOptions(c.urlParams_, opts...)
12331 res, err := c.doRequest("json")
12332 if res != nil && res.StatusCode == http.StatusNotModified {
12333 if res.Body != nil {
12334 res.Body.Close()
12335 }
12336 return nil, gensupport.WrapError(&googleapi.Error{
12337 Code: res.StatusCode,
12338 Header: res.Header,
12339 })
12340 }
12341 if err != nil {
12342 return nil, err
12343 }
12344 defer googleapi.CloseBody(res)
12345 if err := googleapi.CheckResponse(res); err != nil {
12346 return nil, gensupport.WrapError(err)
12347 }
12348 ret := &Uploads{
12349 ServerResponse: googleapi.ServerResponse{
12350 Header: res.Header,
12351 HTTPStatusCode: res.StatusCode,
12352 },
12353 }
12354 target := &ret
12355 if err := gensupport.DecodeResponse(target, res); err != nil {
12356 return nil, err
12357 }
12358 return ret, nil
12359 }
12360
12361 type ManagementUploadsUploadDataCall struct {
12362 s *Service
12363 accountId string
12364 webPropertyId string
12365 customDataSourceId string
12366 urlParams_ gensupport.URLParams
12367 mediaInfo_ *gensupport.MediaInfo
12368 ctx_ context.Context
12369 header_ http.Header
12370 }
12371
12372
12373
12374
12375
12376
12377
12378 func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId string, customDataSourceId string) *ManagementUploadsUploadDataCall {
12379 c := &ManagementUploadsUploadDataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12380 c.accountId = accountId
12381 c.webPropertyId = webPropertyId
12382 c.customDataSourceId = customDataSourceId
12383 return c
12384 }
12385
12386
12387
12388
12389
12390
12391
12392
12393 func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall {
12394 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
12395 return c
12396 }
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407 func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall {
12408 c.ctx_ = ctx
12409 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
12410 return c
12411 }
12412
12413
12414
12415
12416
12417 func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall {
12418 c.mediaInfo_.SetProgressUpdater(pu)
12419 return c
12420 }
12421
12422
12423
12424
12425 func (c *ManagementUploadsUploadDataCall) Fields(s ...googleapi.Field) *ManagementUploadsUploadDataCall {
12426 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12427 return c
12428 }
12429
12430
12431
12432
12433 func (c *ManagementUploadsUploadDataCall) Context(ctx context.Context) *ManagementUploadsUploadDataCall {
12434 c.ctx_ = ctx
12435 return c
12436 }
12437
12438
12439
12440 func (c *ManagementUploadsUploadDataCall) Header() http.Header {
12441 if c.header_ == nil {
12442 c.header_ = make(http.Header)
12443 }
12444 return c.header_
12445 }
12446
12447 func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, error) {
12448 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12449 var body io.Reader = nil
12450 c.urlParams_.Set("alt", alt)
12451 c.urlParams_.Set("prettyPrint", "false")
12452 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
12453 if c.mediaInfo_ != nil {
12454 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
12455 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
12456 }
12457 if body == nil {
12458 body = new(bytes.Buffer)
12459 reqHeaders.Set("Content-Type", "application/json")
12460 }
12461 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
12462 defer cleanup()
12463 urls += "?" + c.urlParams_.Encode()
12464 req, err := http.NewRequest("POST", urls, body)
12465 if err != nil {
12466 return nil, err
12467 }
12468 req.Header = reqHeaders
12469 req.GetBody = getBody
12470 googleapi.Expand(req.URL, map[string]string{
12471 "accountId": c.accountId,
12472 "webPropertyId": c.webPropertyId,
12473 "customDataSourceId": c.customDataSourceId,
12474 })
12475 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12476 }
12477
12478
12479
12480
12481
12482
12483 func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upload, error) {
12484 gensupport.SetOptions(c.urlParams_, opts...)
12485 res, err := c.doRequest("json")
12486 if res != nil && res.StatusCode == http.StatusNotModified {
12487 if res.Body != nil {
12488 res.Body.Close()
12489 }
12490 return nil, gensupport.WrapError(&googleapi.Error{
12491 Code: res.StatusCode,
12492 Header: res.Header,
12493 })
12494 }
12495 if err != nil {
12496 return nil, err
12497 }
12498 defer googleapi.CloseBody(res)
12499 if err := googleapi.CheckResponse(res); err != nil {
12500 return nil, gensupport.WrapError(err)
12501 }
12502 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
12503 if rx != nil {
12504 rx.Client = c.s.client
12505 rx.UserAgent = c.s.userAgent()
12506 ctx := c.ctx_
12507 if ctx == nil {
12508 ctx = context.TODO()
12509 }
12510 res, err = rx.Upload(ctx)
12511 if err != nil {
12512 return nil, err
12513 }
12514 defer res.Body.Close()
12515 if err := googleapi.CheckResponse(res); err != nil {
12516 return nil, gensupport.WrapError(err)
12517 }
12518 }
12519 ret := &Upload{
12520 ServerResponse: googleapi.ServerResponse{
12521 Header: res.Header,
12522 HTTPStatusCode: res.StatusCode,
12523 },
12524 }
12525 target := &ret
12526 if err := gensupport.DecodeResponse(target, res); err != nil {
12527 return nil, err
12528 }
12529 return ret, nil
12530 }
12531
12532 type ManagementWebPropertyAdWordsLinksDeleteCall struct {
12533 s *Service
12534 accountId string
12535 webPropertyId string
12536 webPropertyAdWordsLinkId string
12537 urlParams_ gensupport.URLParams
12538 ctx_ context.Context
12539 header_ http.Header
12540 }
12541
12542
12543
12544
12545
12546
12547 func (r *ManagementWebPropertyAdWordsLinksService) Delete(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksDeleteCall {
12548 c := &ManagementWebPropertyAdWordsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12549 c.accountId = accountId
12550 c.webPropertyId = webPropertyId
12551 c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
12552 return c
12553 }
12554
12555
12556
12557
12558 func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksDeleteCall {
12559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12560 return c
12561 }
12562
12563
12564 func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksDeleteCall {
12565 c.ctx_ = ctx
12566 return c
12567 }
12568
12569
12570
12571 func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Header() http.Header {
12572 if c.header_ == nil {
12573 c.header_ = make(http.Header)
12574 }
12575 return c.header_
12576 }
12577
12578 func (c *ManagementWebPropertyAdWordsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
12579 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12580 var body io.Reader = nil
12581 c.urlParams_.Set("alt", alt)
12582 c.urlParams_.Set("prettyPrint", "false")
12583 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
12584 urls += "?" + c.urlParams_.Encode()
12585 req, err := http.NewRequest("DELETE", urls, body)
12586 if err != nil {
12587 return nil, err
12588 }
12589 req.Header = reqHeaders
12590 googleapi.Expand(req.URL, map[string]string{
12591 "accountId": c.accountId,
12592 "webPropertyId": c.webPropertyId,
12593 "webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
12594 })
12595 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12596 }
12597
12598
12599 func (c *ManagementWebPropertyAdWordsLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
12600 gensupport.SetOptions(c.urlParams_, opts...)
12601 res, err := c.doRequest("json")
12602 if err != nil {
12603 return err
12604 }
12605 defer googleapi.CloseBody(res)
12606 if err := googleapi.CheckResponse(res); err != nil {
12607 return gensupport.WrapError(err)
12608 }
12609 return nil
12610 }
12611
12612 type ManagementWebPropertyAdWordsLinksGetCall struct {
12613 s *Service
12614 accountId string
12615 webPropertyId string
12616 webPropertyAdWordsLinkId string
12617 urlParams_ gensupport.URLParams
12618 ifNoneMatch_ string
12619 ctx_ context.Context
12620 header_ http.Header
12621 }
12622
12623
12624
12625
12626
12627
12628 func (r *ManagementWebPropertyAdWordsLinksService) Get(accountId string, webPropertyId string, webPropertyAdWordsLinkId string) *ManagementWebPropertyAdWordsLinksGetCall {
12629 c := &ManagementWebPropertyAdWordsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12630 c.accountId = accountId
12631 c.webPropertyId = webPropertyId
12632 c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
12633 return c
12634 }
12635
12636
12637
12638
12639 func (c *ManagementWebPropertyAdWordsLinksGetCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksGetCall {
12640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12641 return c
12642 }
12643
12644
12645
12646
12647 func (c *ManagementWebPropertyAdWordsLinksGetCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksGetCall {
12648 c.ifNoneMatch_ = entityTag
12649 return c
12650 }
12651
12652
12653 func (c *ManagementWebPropertyAdWordsLinksGetCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksGetCall {
12654 c.ctx_ = ctx
12655 return c
12656 }
12657
12658
12659
12660 func (c *ManagementWebPropertyAdWordsLinksGetCall) Header() http.Header {
12661 if c.header_ == nil {
12662 c.header_ = make(http.Header)
12663 }
12664 return c.header_
12665 }
12666
12667 func (c *ManagementWebPropertyAdWordsLinksGetCall) doRequest(alt string) (*http.Response, error) {
12668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12669 if c.ifNoneMatch_ != "" {
12670 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12671 }
12672 var body io.Reader = nil
12673 c.urlParams_.Set("alt", alt)
12674 c.urlParams_.Set("prettyPrint", "false")
12675 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
12676 urls += "?" + c.urlParams_.Encode()
12677 req, err := http.NewRequest("GET", urls, body)
12678 if err != nil {
12679 return nil, err
12680 }
12681 req.Header = reqHeaders
12682 googleapi.Expand(req.URL, map[string]string{
12683 "accountId": c.accountId,
12684 "webPropertyId": c.webPropertyId,
12685 "webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
12686 })
12687 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12688 }
12689
12690
12691
12692
12693
12694
12695
12696 func (c *ManagementWebPropertyAdWordsLinksGetCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
12697 gensupport.SetOptions(c.urlParams_, opts...)
12698 res, err := c.doRequest("json")
12699 if res != nil && res.StatusCode == http.StatusNotModified {
12700 if res.Body != nil {
12701 res.Body.Close()
12702 }
12703 return nil, gensupport.WrapError(&googleapi.Error{
12704 Code: res.StatusCode,
12705 Header: res.Header,
12706 })
12707 }
12708 if err != nil {
12709 return nil, err
12710 }
12711 defer googleapi.CloseBody(res)
12712 if err := googleapi.CheckResponse(res); err != nil {
12713 return nil, gensupport.WrapError(err)
12714 }
12715 ret := &EntityAdWordsLink{
12716 ServerResponse: googleapi.ServerResponse{
12717 Header: res.Header,
12718 HTTPStatusCode: res.StatusCode,
12719 },
12720 }
12721 target := &ret
12722 if err := gensupport.DecodeResponse(target, res); err != nil {
12723 return nil, err
12724 }
12725 return ret, nil
12726 }
12727
12728 type ManagementWebPropertyAdWordsLinksInsertCall struct {
12729 s *Service
12730 accountId string
12731 webPropertyId string
12732 entityadwordslink *EntityAdWordsLink
12733 urlParams_ gensupport.URLParams
12734 ctx_ context.Context
12735 header_ http.Header
12736 }
12737
12738
12739
12740
12741
12742 func (r *ManagementWebPropertyAdWordsLinksService) Insert(accountId string, webPropertyId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksInsertCall {
12743 c := &ManagementWebPropertyAdWordsLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12744 c.accountId = accountId
12745 c.webPropertyId = webPropertyId
12746 c.entityadwordslink = entityadwordslink
12747 return c
12748 }
12749
12750
12751
12752
12753 func (c *ManagementWebPropertyAdWordsLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksInsertCall {
12754 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12755 return c
12756 }
12757
12758
12759 func (c *ManagementWebPropertyAdWordsLinksInsertCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksInsertCall {
12760 c.ctx_ = ctx
12761 return c
12762 }
12763
12764
12765
12766 func (c *ManagementWebPropertyAdWordsLinksInsertCall) Header() http.Header {
12767 if c.header_ == nil {
12768 c.header_ = make(http.Header)
12769 }
12770 return c.header_
12771 }
12772
12773 func (c *ManagementWebPropertyAdWordsLinksInsertCall) doRequest(alt string) (*http.Response, error) {
12774 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12775 var body io.Reader = nil
12776 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
12777 if err != nil {
12778 return nil, err
12779 }
12780 c.urlParams_.Set("alt", alt)
12781 c.urlParams_.Set("prettyPrint", "false")
12782 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
12783 urls += "?" + c.urlParams_.Encode()
12784 req, err := http.NewRequest("POST", urls, body)
12785 if err != nil {
12786 return nil, err
12787 }
12788 req.Header = reqHeaders
12789 googleapi.Expand(req.URL, map[string]string{
12790 "accountId": c.accountId,
12791 "webPropertyId": c.webPropertyId,
12792 })
12793 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12794 }
12795
12796
12797
12798
12799
12800
12801
12802 func (c *ManagementWebPropertyAdWordsLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
12803 gensupport.SetOptions(c.urlParams_, opts...)
12804 res, err := c.doRequest("json")
12805 if res != nil && res.StatusCode == http.StatusNotModified {
12806 if res.Body != nil {
12807 res.Body.Close()
12808 }
12809 return nil, gensupport.WrapError(&googleapi.Error{
12810 Code: res.StatusCode,
12811 Header: res.Header,
12812 })
12813 }
12814 if err != nil {
12815 return nil, err
12816 }
12817 defer googleapi.CloseBody(res)
12818 if err := googleapi.CheckResponse(res); err != nil {
12819 return nil, gensupport.WrapError(err)
12820 }
12821 ret := &EntityAdWordsLink{
12822 ServerResponse: googleapi.ServerResponse{
12823 Header: res.Header,
12824 HTTPStatusCode: res.StatusCode,
12825 },
12826 }
12827 target := &ret
12828 if err := gensupport.DecodeResponse(target, res); err != nil {
12829 return nil, err
12830 }
12831 return ret, nil
12832 }
12833
12834 type ManagementWebPropertyAdWordsLinksListCall struct {
12835 s *Service
12836 accountId string
12837 webPropertyId string
12838 urlParams_ gensupport.URLParams
12839 ifNoneMatch_ string
12840 ctx_ context.Context
12841 header_ http.Header
12842 }
12843
12844
12845
12846
12847
12848 func (r *ManagementWebPropertyAdWordsLinksService) List(accountId string, webPropertyId string) *ManagementWebPropertyAdWordsLinksListCall {
12849 c := &ManagementWebPropertyAdWordsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12850 c.accountId = accountId
12851 c.webPropertyId = webPropertyId
12852 return c
12853 }
12854
12855
12856
12857 func (c *ManagementWebPropertyAdWordsLinksListCall) MaxResults(maxResults int64) *ManagementWebPropertyAdWordsLinksListCall {
12858 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
12859 return c
12860 }
12861
12862
12863
12864
12865 func (c *ManagementWebPropertyAdWordsLinksListCall) StartIndex(startIndex int64) *ManagementWebPropertyAdWordsLinksListCall {
12866 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
12867 return c
12868 }
12869
12870
12871
12872
12873 func (c *ManagementWebPropertyAdWordsLinksListCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksListCall {
12874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12875 return c
12876 }
12877
12878
12879
12880
12881 func (c *ManagementWebPropertyAdWordsLinksListCall) IfNoneMatch(entityTag string) *ManagementWebPropertyAdWordsLinksListCall {
12882 c.ifNoneMatch_ = entityTag
12883 return c
12884 }
12885
12886
12887 func (c *ManagementWebPropertyAdWordsLinksListCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksListCall {
12888 c.ctx_ = ctx
12889 return c
12890 }
12891
12892
12893
12894 func (c *ManagementWebPropertyAdWordsLinksListCall) Header() http.Header {
12895 if c.header_ == nil {
12896 c.header_ = make(http.Header)
12897 }
12898 return c.header_
12899 }
12900
12901 func (c *ManagementWebPropertyAdWordsLinksListCall) doRequest(alt string) (*http.Response, error) {
12902 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12903 if c.ifNoneMatch_ != "" {
12904 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12905 }
12906 var body io.Reader = nil
12907 c.urlParams_.Set("alt", alt)
12908 c.urlParams_.Set("prettyPrint", "false")
12909 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks")
12910 urls += "?" + c.urlParams_.Encode()
12911 req, err := http.NewRequest("GET", urls, body)
12912 if err != nil {
12913 return nil, err
12914 }
12915 req.Header = reqHeaders
12916 googleapi.Expand(req.URL, map[string]string{
12917 "accountId": c.accountId,
12918 "webPropertyId": c.webPropertyId,
12919 })
12920 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12921 }
12922
12923
12924
12925
12926
12927
12928
12929 func (c *ManagementWebPropertyAdWordsLinksListCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLinks, error) {
12930 gensupport.SetOptions(c.urlParams_, opts...)
12931 res, err := c.doRequest("json")
12932 if res != nil && res.StatusCode == http.StatusNotModified {
12933 if res.Body != nil {
12934 res.Body.Close()
12935 }
12936 return nil, gensupport.WrapError(&googleapi.Error{
12937 Code: res.StatusCode,
12938 Header: res.Header,
12939 })
12940 }
12941 if err != nil {
12942 return nil, err
12943 }
12944 defer googleapi.CloseBody(res)
12945 if err := googleapi.CheckResponse(res); err != nil {
12946 return nil, gensupport.WrapError(err)
12947 }
12948 ret := &EntityAdWordsLinks{
12949 ServerResponse: googleapi.ServerResponse{
12950 Header: res.Header,
12951 HTTPStatusCode: res.StatusCode,
12952 },
12953 }
12954 target := &ret
12955 if err := gensupport.DecodeResponse(target, res); err != nil {
12956 return nil, err
12957 }
12958 return ret, nil
12959 }
12960
12961 type ManagementWebPropertyAdWordsLinksPatchCall struct {
12962 s *Service
12963 accountId string
12964 webPropertyId string
12965 webPropertyAdWordsLinkId string
12966 entityadwordslink *EntityAdWordsLink
12967 urlParams_ gensupport.URLParams
12968 ctx_ context.Context
12969 header_ http.Header
12970 }
12971
12972
12973
12974
12975
12976
12977
12978 func (r *ManagementWebPropertyAdWordsLinksService) Patch(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksPatchCall {
12979 c := &ManagementWebPropertyAdWordsLinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12980 c.accountId = accountId
12981 c.webPropertyId = webPropertyId
12982 c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
12983 c.entityadwordslink = entityadwordslink
12984 return c
12985 }
12986
12987
12988
12989
12990 func (c *ManagementWebPropertyAdWordsLinksPatchCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksPatchCall {
12991 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12992 return c
12993 }
12994
12995
12996 func (c *ManagementWebPropertyAdWordsLinksPatchCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksPatchCall {
12997 c.ctx_ = ctx
12998 return c
12999 }
13000
13001
13002
13003 func (c *ManagementWebPropertyAdWordsLinksPatchCall) Header() http.Header {
13004 if c.header_ == nil {
13005 c.header_ = make(http.Header)
13006 }
13007 return c.header_
13008 }
13009
13010 func (c *ManagementWebPropertyAdWordsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
13011 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13012 var body io.Reader = nil
13013 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
13014 if err != nil {
13015 return nil, err
13016 }
13017 c.urlParams_.Set("alt", alt)
13018 c.urlParams_.Set("prettyPrint", "false")
13019 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
13020 urls += "?" + c.urlParams_.Encode()
13021 req, err := http.NewRequest("PATCH", urls, body)
13022 if err != nil {
13023 return nil, err
13024 }
13025 req.Header = reqHeaders
13026 googleapi.Expand(req.URL, map[string]string{
13027 "accountId": c.accountId,
13028 "webPropertyId": c.webPropertyId,
13029 "webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
13030 })
13031 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13032 }
13033
13034
13035
13036
13037
13038
13039
13040 func (c *ManagementWebPropertyAdWordsLinksPatchCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
13041 gensupport.SetOptions(c.urlParams_, opts...)
13042 res, err := c.doRequest("json")
13043 if res != nil && res.StatusCode == http.StatusNotModified {
13044 if res.Body != nil {
13045 res.Body.Close()
13046 }
13047 return nil, gensupport.WrapError(&googleapi.Error{
13048 Code: res.StatusCode,
13049 Header: res.Header,
13050 })
13051 }
13052 if err != nil {
13053 return nil, err
13054 }
13055 defer googleapi.CloseBody(res)
13056 if err := googleapi.CheckResponse(res); err != nil {
13057 return nil, gensupport.WrapError(err)
13058 }
13059 ret := &EntityAdWordsLink{
13060 ServerResponse: googleapi.ServerResponse{
13061 Header: res.Header,
13062 HTTPStatusCode: res.StatusCode,
13063 },
13064 }
13065 target := &ret
13066 if err := gensupport.DecodeResponse(target, res); err != nil {
13067 return nil, err
13068 }
13069 return ret, nil
13070 }
13071
13072 type ManagementWebPropertyAdWordsLinksUpdateCall struct {
13073 s *Service
13074 accountId string
13075 webPropertyId string
13076 webPropertyAdWordsLinkId string
13077 entityadwordslink *EntityAdWordsLink
13078 urlParams_ gensupport.URLParams
13079 ctx_ context.Context
13080 header_ http.Header
13081 }
13082
13083
13084
13085
13086
13087
13088 func (r *ManagementWebPropertyAdWordsLinksService) Update(accountId string, webPropertyId string, webPropertyAdWordsLinkId string, entityadwordslink *EntityAdWordsLink) *ManagementWebPropertyAdWordsLinksUpdateCall {
13089 c := &ManagementWebPropertyAdWordsLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13090 c.accountId = accountId
13091 c.webPropertyId = webPropertyId
13092 c.webPropertyAdWordsLinkId = webPropertyAdWordsLinkId
13093 c.entityadwordslink = entityadwordslink
13094 return c
13095 }
13096
13097
13098
13099
13100 func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebPropertyAdWordsLinksUpdateCall {
13101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13102 return c
13103 }
13104
13105
13106 func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksUpdateCall {
13107 c.ctx_ = ctx
13108 return c
13109 }
13110
13111
13112
13113 func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Header() http.Header {
13114 if c.header_ == nil {
13115 c.header_ = make(http.Header)
13116 }
13117 return c.header_
13118 }
13119
13120 func (c *ManagementWebPropertyAdWordsLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
13121 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13122 var body io.Reader = nil
13123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
13124 if err != nil {
13125 return nil, err
13126 }
13127 c.urlParams_.Set("alt", alt)
13128 c.urlParams_.Set("prettyPrint", "false")
13129 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}")
13130 urls += "?" + c.urlParams_.Encode()
13131 req, err := http.NewRequest("PUT", urls, body)
13132 if err != nil {
13133 return nil, err
13134 }
13135 req.Header = reqHeaders
13136 googleapi.Expand(req.URL, map[string]string{
13137 "accountId": c.accountId,
13138 "webPropertyId": c.webPropertyId,
13139 "webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
13140 })
13141 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13142 }
13143
13144
13145
13146
13147
13148
13149
13150 func (c *ManagementWebPropertyAdWordsLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityAdWordsLink, error) {
13151 gensupport.SetOptions(c.urlParams_, opts...)
13152 res, err := c.doRequest("json")
13153 if res != nil && res.StatusCode == http.StatusNotModified {
13154 if res.Body != nil {
13155 res.Body.Close()
13156 }
13157 return nil, gensupport.WrapError(&googleapi.Error{
13158 Code: res.StatusCode,
13159 Header: res.Header,
13160 })
13161 }
13162 if err != nil {
13163 return nil, err
13164 }
13165 defer googleapi.CloseBody(res)
13166 if err := googleapi.CheckResponse(res); err != nil {
13167 return nil, gensupport.WrapError(err)
13168 }
13169 ret := &EntityAdWordsLink{
13170 ServerResponse: googleapi.ServerResponse{
13171 Header: res.Header,
13172 HTTPStatusCode: res.StatusCode,
13173 },
13174 }
13175 target := &ret
13176 if err := gensupport.DecodeResponse(target, res); err != nil {
13177 return nil, err
13178 }
13179 return ret, nil
13180 }
13181
13182 type ManagementWebpropertiesGetCall struct {
13183 s *Service
13184 accountId string
13185 webPropertyId string
13186 urlParams_ gensupport.URLParams
13187 ifNoneMatch_ string
13188 ctx_ context.Context
13189 header_ http.Header
13190 }
13191
13192
13193
13194
13195
13196 func (r *ManagementWebpropertiesService) Get(accountId string, webPropertyId string) *ManagementWebpropertiesGetCall {
13197 c := &ManagementWebpropertiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13198 c.accountId = accountId
13199 c.webPropertyId = webPropertyId
13200 return c
13201 }
13202
13203
13204
13205
13206 func (c *ManagementWebpropertiesGetCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesGetCall {
13207 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13208 return c
13209 }
13210
13211
13212
13213
13214 func (c *ManagementWebpropertiesGetCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesGetCall {
13215 c.ifNoneMatch_ = entityTag
13216 return c
13217 }
13218
13219
13220 func (c *ManagementWebpropertiesGetCall) Context(ctx context.Context) *ManagementWebpropertiesGetCall {
13221 c.ctx_ = ctx
13222 return c
13223 }
13224
13225
13226
13227 func (c *ManagementWebpropertiesGetCall) Header() http.Header {
13228 if c.header_ == nil {
13229 c.header_ = make(http.Header)
13230 }
13231 return c.header_
13232 }
13233
13234 func (c *ManagementWebpropertiesGetCall) doRequest(alt string) (*http.Response, error) {
13235 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13236 if c.ifNoneMatch_ != "" {
13237 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13238 }
13239 var body io.Reader = nil
13240 c.urlParams_.Set("alt", alt)
13241 c.urlParams_.Set("prettyPrint", "false")
13242 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
13243 urls += "?" + c.urlParams_.Encode()
13244 req, err := http.NewRequest("GET", urls, body)
13245 if err != nil {
13246 return nil, err
13247 }
13248 req.Header = reqHeaders
13249 googleapi.Expand(req.URL, map[string]string{
13250 "accountId": c.accountId,
13251 "webPropertyId": c.webPropertyId,
13252 })
13253 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13254 }
13255
13256
13257
13258
13259
13260
13261 func (c *ManagementWebpropertiesGetCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
13262 gensupport.SetOptions(c.urlParams_, opts...)
13263 res, err := c.doRequest("json")
13264 if res != nil && res.StatusCode == http.StatusNotModified {
13265 if res.Body != nil {
13266 res.Body.Close()
13267 }
13268 return nil, gensupport.WrapError(&googleapi.Error{
13269 Code: res.StatusCode,
13270 Header: res.Header,
13271 })
13272 }
13273 if err != nil {
13274 return nil, err
13275 }
13276 defer googleapi.CloseBody(res)
13277 if err := googleapi.CheckResponse(res); err != nil {
13278 return nil, gensupport.WrapError(err)
13279 }
13280 ret := &Webproperty{
13281 ServerResponse: googleapi.ServerResponse{
13282 Header: res.Header,
13283 HTTPStatusCode: res.StatusCode,
13284 },
13285 }
13286 target := &ret
13287 if err := gensupport.DecodeResponse(target, res); err != nil {
13288 return nil, err
13289 }
13290 return ret, nil
13291 }
13292
13293 type ManagementWebpropertiesInsertCall struct {
13294 s *Service
13295 accountId string
13296 webproperty *Webproperty
13297 urlParams_ gensupport.URLParams
13298 ctx_ context.Context
13299 header_ http.Header
13300 }
13301
13302
13303
13304
13305
13306
13307 func (r *ManagementWebpropertiesService) Insert(accountId string, webproperty *Webproperty) *ManagementWebpropertiesInsertCall {
13308 c := &ManagementWebpropertiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13309 c.accountId = accountId
13310 c.webproperty = webproperty
13311 return c
13312 }
13313
13314
13315
13316
13317 func (c *ManagementWebpropertiesInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesInsertCall {
13318 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13319 return c
13320 }
13321
13322
13323 func (c *ManagementWebpropertiesInsertCall) Context(ctx context.Context) *ManagementWebpropertiesInsertCall {
13324 c.ctx_ = ctx
13325 return c
13326 }
13327
13328
13329
13330 func (c *ManagementWebpropertiesInsertCall) Header() http.Header {
13331 if c.header_ == nil {
13332 c.header_ = make(http.Header)
13333 }
13334 return c.header_
13335 }
13336
13337 func (c *ManagementWebpropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
13338 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13339 var body io.Reader = nil
13340 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
13341 if err != nil {
13342 return nil, err
13343 }
13344 c.urlParams_.Set("alt", alt)
13345 c.urlParams_.Set("prettyPrint", "false")
13346 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
13347 urls += "?" + c.urlParams_.Encode()
13348 req, err := http.NewRequest("POST", urls, body)
13349 if err != nil {
13350 return nil, err
13351 }
13352 req.Header = reqHeaders
13353 googleapi.Expand(req.URL, map[string]string{
13354 "accountId": c.accountId,
13355 })
13356 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13357 }
13358
13359
13360
13361
13362
13363
13364 func (c *ManagementWebpropertiesInsertCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
13365 gensupport.SetOptions(c.urlParams_, opts...)
13366 res, err := c.doRequest("json")
13367 if res != nil && res.StatusCode == http.StatusNotModified {
13368 if res.Body != nil {
13369 res.Body.Close()
13370 }
13371 return nil, gensupport.WrapError(&googleapi.Error{
13372 Code: res.StatusCode,
13373 Header: res.Header,
13374 })
13375 }
13376 if err != nil {
13377 return nil, err
13378 }
13379 defer googleapi.CloseBody(res)
13380 if err := googleapi.CheckResponse(res); err != nil {
13381 return nil, gensupport.WrapError(err)
13382 }
13383 ret := &Webproperty{
13384 ServerResponse: googleapi.ServerResponse{
13385 Header: res.Header,
13386 HTTPStatusCode: res.StatusCode,
13387 },
13388 }
13389 target := &ret
13390 if err := gensupport.DecodeResponse(target, res); err != nil {
13391 return nil, err
13392 }
13393 return ret, nil
13394 }
13395
13396 type ManagementWebpropertiesListCall struct {
13397 s *Service
13398 accountId string
13399 urlParams_ gensupport.URLParams
13400 ifNoneMatch_ string
13401 ctx_ context.Context
13402 header_ http.Header
13403 }
13404
13405
13406
13407
13408
13409
13410 func (r *ManagementWebpropertiesService) List(accountId string) *ManagementWebpropertiesListCall {
13411 c := &ManagementWebpropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13412 c.accountId = accountId
13413 return c
13414 }
13415
13416
13417
13418 func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall {
13419 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
13420 return c
13421 }
13422
13423
13424
13425
13426 func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall {
13427 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
13428 return c
13429 }
13430
13431
13432
13433
13434 func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall {
13435 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13436 return c
13437 }
13438
13439
13440
13441
13442 func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall {
13443 c.ifNoneMatch_ = entityTag
13444 return c
13445 }
13446
13447
13448 func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
13449 c.ctx_ = ctx
13450 return c
13451 }
13452
13453
13454
13455 func (c *ManagementWebpropertiesListCall) Header() http.Header {
13456 if c.header_ == nil {
13457 c.header_ = make(http.Header)
13458 }
13459 return c.header_
13460 }
13461
13462 func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
13463 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13464 if c.ifNoneMatch_ != "" {
13465 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13466 }
13467 var body io.Reader = nil
13468 c.urlParams_.Set("alt", alt)
13469 c.urlParams_.Set("prettyPrint", "false")
13470 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties")
13471 urls += "?" + c.urlParams_.Encode()
13472 req, err := http.NewRequest("GET", urls, body)
13473 if err != nil {
13474 return nil, err
13475 }
13476 req.Header = reqHeaders
13477 googleapi.Expand(req.URL, map[string]string{
13478 "accountId": c.accountId,
13479 })
13480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13481 }
13482
13483
13484
13485
13486
13487
13488 func (c *ManagementWebpropertiesListCall) Do(opts ...googleapi.CallOption) (*Webproperties, error) {
13489 gensupport.SetOptions(c.urlParams_, opts...)
13490 res, err := c.doRequest("json")
13491 if res != nil && res.StatusCode == http.StatusNotModified {
13492 if res.Body != nil {
13493 res.Body.Close()
13494 }
13495 return nil, gensupport.WrapError(&googleapi.Error{
13496 Code: res.StatusCode,
13497 Header: res.Header,
13498 })
13499 }
13500 if err != nil {
13501 return nil, err
13502 }
13503 defer googleapi.CloseBody(res)
13504 if err := googleapi.CheckResponse(res); err != nil {
13505 return nil, gensupport.WrapError(err)
13506 }
13507 ret := &Webproperties{
13508 ServerResponse: googleapi.ServerResponse{
13509 Header: res.Header,
13510 HTTPStatusCode: res.StatusCode,
13511 },
13512 }
13513 target := &ret
13514 if err := gensupport.DecodeResponse(target, res); err != nil {
13515 return nil, err
13516 }
13517 return ret, nil
13518 }
13519
13520 type ManagementWebpropertiesPatchCall struct {
13521 s *Service
13522 accountId string
13523 webPropertyId string
13524 webproperty *Webproperty
13525 urlParams_ gensupport.URLParams
13526 ctx_ context.Context
13527 header_ http.Header
13528 }
13529
13530
13531
13532
13533
13534
13535 func (r *ManagementWebpropertiesService) Patch(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesPatchCall {
13536 c := &ManagementWebpropertiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13537 c.accountId = accountId
13538 c.webPropertyId = webPropertyId
13539 c.webproperty = webproperty
13540 return c
13541 }
13542
13543
13544
13545
13546 func (c *ManagementWebpropertiesPatchCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesPatchCall {
13547 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13548 return c
13549 }
13550
13551
13552 func (c *ManagementWebpropertiesPatchCall) Context(ctx context.Context) *ManagementWebpropertiesPatchCall {
13553 c.ctx_ = ctx
13554 return c
13555 }
13556
13557
13558
13559 func (c *ManagementWebpropertiesPatchCall) Header() http.Header {
13560 if c.header_ == nil {
13561 c.header_ = make(http.Header)
13562 }
13563 return c.header_
13564 }
13565
13566 func (c *ManagementWebpropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
13567 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13568 var body io.Reader = nil
13569 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
13570 if err != nil {
13571 return nil, err
13572 }
13573 c.urlParams_.Set("alt", alt)
13574 c.urlParams_.Set("prettyPrint", "false")
13575 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
13576 urls += "?" + c.urlParams_.Encode()
13577 req, err := http.NewRequest("PATCH", urls, body)
13578 if err != nil {
13579 return nil, err
13580 }
13581 req.Header = reqHeaders
13582 googleapi.Expand(req.URL, map[string]string{
13583 "accountId": c.accountId,
13584 "webPropertyId": c.webPropertyId,
13585 })
13586 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13587 }
13588
13589
13590
13591
13592
13593
13594 func (c *ManagementWebpropertiesPatchCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
13595 gensupport.SetOptions(c.urlParams_, opts...)
13596 res, err := c.doRequest("json")
13597 if res != nil && res.StatusCode == http.StatusNotModified {
13598 if res.Body != nil {
13599 res.Body.Close()
13600 }
13601 return nil, gensupport.WrapError(&googleapi.Error{
13602 Code: res.StatusCode,
13603 Header: res.Header,
13604 })
13605 }
13606 if err != nil {
13607 return nil, err
13608 }
13609 defer googleapi.CloseBody(res)
13610 if err := googleapi.CheckResponse(res); err != nil {
13611 return nil, gensupport.WrapError(err)
13612 }
13613 ret := &Webproperty{
13614 ServerResponse: googleapi.ServerResponse{
13615 Header: res.Header,
13616 HTTPStatusCode: res.StatusCode,
13617 },
13618 }
13619 target := &ret
13620 if err := gensupport.DecodeResponse(target, res); err != nil {
13621 return nil, err
13622 }
13623 return ret, nil
13624 }
13625
13626 type ManagementWebpropertiesUpdateCall struct {
13627 s *Service
13628 accountId string
13629 webPropertyId string
13630 webproperty *Webproperty
13631 urlParams_ gensupport.URLParams
13632 ctx_ context.Context
13633 header_ http.Header
13634 }
13635
13636
13637
13638
13639
13640 func (r *ManagementWebpropertiesService) Update(accountId string, webPropertyId string, webproperty *Webproperty) *ManagementWebpropertiesUpdateCall {
13641 c := &ManagementWebpropertiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13642 c.accountId = accountId
13643 c.webPropertyId = webPropertyId
13644 c.webproperty = webproperty
13645 return c
13646 }
13647
13648
13649
13650
13651 func (c *ManagementWebpropertiesUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesUpdateCall {
13652 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13653 return c
13654 }
13655
13656
13657 func (c *ManagementWebpropertiesUpdateCall) Context(ctx context.Context) *ManagementWebpropertiesUpdateCall {
13658 c.ctx_ = ctx
13659 return c
13660 }
13661
13662
13663
13664 func (c *ManagementWebpropertiesUpdateCall) Header() http.Header {
13665 if c.header_ == nil {
13666 c.header_ = make(http.Header)
13667 }
13668 return c.header_
13669 }
13670
13671 func (c *ManagementWebpropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
13672 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13673 var body io.Reader = nil
13674 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
13675 if err != nil {
13676 return nil, err
13677 }
13678 c.urlParams_.Set("alt", alt)
13679 c.urlParams_.Set("prettyPrint", "false")
13680 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}")
13681 urls += "?" + c.urlParams_.Encode()
13682 req, err := http.NewRequest("PUT", urls, body)
13683 if err != nil {
13684 return nil, err
13685 }
13686 req.Header = reqHeaders
13687 googleapi.Expand(req.URL, map[string]string{
13688 "accountId": c.accountId,
13689 "webPropertyId": c.webPropertyId,
13690 })
13691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13692 }
13693
13694
13695
13696
13697
13698
13699 func (c *ManagementWebpropertiesUpdateCall) Do(opts ...googleapi.CallOption) (*Webproperty, error) {
13700 gensupport.SetOptions(c.urlParams_, opts...)
13701 res, err := c.doRequest("json")
13702 if res != nil && res.StatusCode == http.StatusNotModified {
13703 if res.Body != nil {
13704 res.Body.Close()
13705 }
13706 return nil, gensupport.WrapError(&googleapi.Error{
13707 Code: res.StatusCode,
13708 Header: res.Header,
13709 })
13710 }
13711 if err != nil {
13712 return nil, err
13713 }
13714 defer googleapi.CloseBody(res)
13715 if err := googleapi.CheckResponse(res); err != nil {
13716 return nil, gensupport.WrapError(err)
13717 }
13718 ret := &Webproperty{
13719 ServerResponse: googleapi.ServerResponse{
13720 Header: res.Header,
13721 HTTPStatusCode: res.StatusCode,
13722 },
13723 }
13724 target := &ret
13725 if err := gensupport.DecodeResponse(target, res); err != nil {
13726 return nil, err
13727 }
13728 return ret, nil
13729 }
13730
13731 type ManagementWebpropertyUserLinksDeleteCall struct {
13732 s *Service
13733 accountId string
13734 webPropertyId string
13735 linkId string
13736 urlParams_ gensupport.URLParams
13737 ctx_ context.Context
13738 header_ http.Header
13739 }
13740
13741
13742
13743
13744
13745
13746 func (r *ManagementWebpropertyUserLinksService) Delete(accountId string, webPropertyId string, linkId string) *ManagementWebpropertyUserLinksDeleteCall {
13747 c := &ManagementWebpropertyUserLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13748 c.accountId = accountId
13749 c.webPropertyId = webPropertyId
13750 c.linkId = linkId
13751 return c
13752 }
13753
13754
13755
13756
13757 func (c *ManagementWebpropertyUserLinksDeleteCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksDeleteCall {
13758 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13759 return c
13760 }
13761
13762
13763 func (c *ManagementWebpropertyUserLinksDeleteCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksDeleteCall {
13764 c.ctx_ = ctx
13765 return c
13766 }
13767
13768
13769
13770 func (c *ManagementWebpropertyUserLinksDeleteCall) Header() http.Header {
13771 if c.header_ == nil {
13772 c.header_ = make(http.Header)
13773 }
13774 return c.header_
13775 }
13776
13777 func (c *ManagementWebpropertyUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
13778 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13779 var body io.Reader = nil
13780 c.urlParams_.Set("alt", alt)
13781 c.urlParams_.Set("prettyPrint", "false")
13782 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
13783 urls += "?" + c.urlParams_.Encode()
13784 req, err := http.NewRequest("DELETE", urls, body)
13785 if err != nil {
13786 return nil, err
13787 }
13788 req.Header = reqHeaders
13789 googleapi.Expand(req.URL, map[string]string{
13790 "accountId": c.accountId,
13791 "webPropertyId": c.webPropertyId,
13792 "linkId": c.linkId,
13793 })
13794 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13795 }
13796
13797
13798 func (c *ManagementWebpropertyUserLinksDeleteCall) Do(opts ...googleapi.CallOption) error {
13799 gensupport.SetOptions(c.urlParams_, opts...)
13800 res, err := c.doRequest("json")
13801 if err != nil {
13802 return err
13803 }
13804 defer googleapi.CloseBody(res)
13805 if err := googleapi.CheckResponse(res); err != nil {
13806 return gensupport.WrapError(err)
13807 }
13808 return nil
13809 }
13810
13811 type ManagementWebpropertyUserLinksInsertCall struct {
13812 s *Service
13813 accountId string
13814 webPropertyId string
13815 entityuserlink *EntityUserLink
13816 urlParams_ gensupport.URLParams
13817 ctx_ context.Context
13818 header_ http.Header
13819 }
13820
13821
13822
13823
13824
13825 func (r *ManagementWebpropertyUserLinksService) Insert(accountId string, webPropertyId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksInsertCall {
13826 c := &ManagementWebpropertyUserLinksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13827 c.accountId = accountId
13828 c.webPropertyId = webPropertyId
13829 c.entityuserlink = entityuserlink
13830 return c
13831 }
13832
13833
13834
13835
13836 func (c *ManagementWebpropertyUserLinksInsertCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksInsertCall {
13837 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13838 return c
13839 }
13840
13841
13842 func (c *ManagementWebpropertyUserLinksInsertCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksInsertCall {
13843 c.ctx_ = ctx
13844 return c
13845 }
13846
13847
13848
13849 func (c *ManagementWebpropertyUserLinksInsertCall) Header() http.Header {
13850 if c.header_ == nil {
13851 c.header_ = make(http.Header)
13852 }
13853 return c.header_
13854 }
13855
13856 func (c *ManagementWebpropertyUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
13857 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13858 var body io.Reader = nil
13859 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
13860 if err != nil {
13861 return nil, err
13862 }
13863 c.urlParams_.Set("alt", alt)
13864 c.urlParams_.Set("prettyPrint", "false")
13865 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
13866 urls += "?" + c.urlParams_.Encode()
13867 req, err := http.NewRequest("POST", urls, body)
13868 if err != nil {
13869 return nil, err
13870 }
13871 req.Header = reqHeaders
13872 googleapi.Expand(req.URL, map[string]string{
13873 "accountId": c.accountId,
13874 "webPropertyId": c.webPropertyId,
13875 })
13876 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13877 }
13878
13879
13880
13881
13882
13883
13884 func (c *ManagementWebpropertyUserLinksInsertCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
13885 gensupport.SetOptions(c.urlParams_, opts...)
13886 res, err := c.doRequest("json")
13887 if res != nil && res.StatusCode == http.StatusNotModified {
13888 if res.Body != nil {
13889 res.Body.Close()
13890 }
13891 return nil, gensupport.WrapError(&googleapi.Error{
13892 Code: res.StatusCode,
13893 Header: res.Header,
13894 })
13895 }
13896 if err != nil {
13897 return nil, err
13898 }
13899 defer googleapi.CloseBody(res)
13900 if err := googleapi.CheckResponse(res); err != nil {
13901 return nil, gensupport.WrapError(err)
13902 }
13903 ret := &EntityUserLink{
13904 ServerResponse: googleapi.ServerResponse{
13905 Header: res.Header,
13906 HTTPStatusCode: res.StatusCode,
13907 },
13908 }
13909 target := &ret
13910 if err := gensupport.DecodeResponse(target, res); err != nil {
13911 return nil, err
13912 }
13913 return ret, nil
13914 }
13915
13916 type ManagementWebpropertyUserLinksListCall struct {
13917 s *Service
13918 accountId string
13919 webPropertyId string
13920 urlParams_ gensupport.URLParams
13921 ifNoneMatch_ string
13922 ctx_ context.Context
13923 header_ http.Header
13924 }
13925
13926
13927
13928
13929
13930
13931
13932 func (r *ManagementWebpropertyUserLinksService) List(accountId string, webPropertyId string) *ManagementWebpropertyUserLinksListCall {
13933 c := &ManagementWebpropertyUserLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13934 c.accountId = accountId
13935 c.webPropertyId = webPropertyId
13936 return c
13937 }
13938
13939
13940
13941 func (c *ManagementWebpropertyUserLinksListCall) MaxResults(maxResults int64) *ManagementWebpropertyUserLinksListCall {
13942 c.urlParams_.Set("max-results", fmt.Sprint(maxResults))
13943 return c
13944 }
13945
13946
13947
13948
13949 func (c *ManagementWebpropertyUserLinksListCall) StartIndex(startIndex int64) *ManagementWebpropertyUserLinksListCall {
13950 c.urlParams_.Set("start-index", fmt.Sprint(startIndex))
13951 return c
13952 }
13953
13954
13955
13956
13957 func (c *ManagementWebpropertyUserLinksListCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksListCall {
13958 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13959 return c
13960 }
13961
13962
13963
13964
13965 func (c *ManagementWebpropertyUserLinksListCall) IfNoneMatch(entityTag string) *ManagementWebpropertyUserLinksListCall {
13966 c.ifNoneMatch_ = entityTag
13967 return c
13968 }
13969
13970
13971 func (c *ManagementWebpropertyUserLinksListCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksListCall {
13972 c.ctx_ = ctx
13973 return c
13974 }
13975
13976
13977
13978 func (c *ManagementWebpropertyUserLinksListCall) Header() http.Header {
13979 if c.header_ == nil {
13980 c.header_ = make(http.Header)
13981 }
13982 return c.header_
13983 }
13984
13985 func (c *ManagementWebpropertyUserLinksListCall) doRequest(alt string) (*http.Response, error) {
13986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13987 if c.ifNoneMatch_ != "" {
13988 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13989 }
13990 var body io.Reader = nil
13991 c.urlParams_.Set("alt", alt)
13992 c.urlParams_.Set("prettyPrint", "false")
13993 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks")
13994 urls += "?" + c.urlParams_.Encode()
13995 req, err := http.NewRequest("GET", urls, body)
13996 if err != nil {
13997 return nil, err
13998 }
13999 req.Header = reqHeaders
14000 googleapi.Expand(req.URL, map[string]string{
14001 "accountId": c.accountId,
14002 "webPropertyId": c.webPropertyId,
14003 })
14004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14005 }
14006
14007
14008
14009
14010
14011
14012
14013 func (c *ManagementWebpropertyUserLinksListCall) Do(opts ...googleapi.CallOption) (*EntityUserLinks, error) {
14014 gensupport.SetOptions(c.urlParams_, opts...)
14015 res, err := c.doRequest("json")
14016 if res != nil && res.StatusCode == http.StatusNotModified {
14017 if res.Body != nil {
14018 res.Body.Close()
14019 }
14020 return nil, gensupport.WrapError(&googleapi.Error{
14021 Code: res.StatusCode,
14022 Header: res.Header,
14023 })
14024 }
14025 if err != nil {
14026 return nil, err
14027 }
14028 defer googleapi.CloseBody(res)
14029 if err := googleapi.CheckResponse(res); err != nil {
14030 return nil, gensupport.WrapError(err)
14031 }
14032 ret := &EntityUserLinks{
14033 ServerResponse: googleapi.ServerResponse{
14034 Header: res.Header,
14035 HTTPStatusCode: res.StatusCode,
14036 },
14037 }
14038 target := &ret
14039 if err := gensupport.DecodeResponse(target, res); err != nil {
14040 return nil, err
14041 }
14042 return ret, nil
14043 }
14044
14045 type ManagementWebpropertyUserLinksUpdateCall struct {
14046 s *Service
14047 accountId string
14048 webPropertyId string
14049 linkId string
14050 entityuserlink *EntityUserLink
14051 urlParams_ gensupport.URLParams
14052 ctx_ context.Context
14053 header_ http.Header
14054 }
14055
14056
14057
14058
14059
14060
14061 func (r *ManagementWebpropertyUserLinksService) Update(accountId string, webPropertyId string, linkId string, entityuserlink *EntityUserLink) *ManagementWebpropertyUserLinksUpdateCall {
14062 c := &ManagementWebpropertyUserLinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14063 c.accountId = accountId
14064 c.webPropertyId = webPropertyId
14065 c.linkId = linkId
14066 c.entityuserlink = entityuserlink
14067 return c
14068 }
14069
14070
14071
14072
14073 func (c *ManagementWebpropertyUserLinksUpdateCall) Fields(s ...googleapi.Field) *ManagementWebpropertyUserLinksUpdateCall {
14074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14075 return c
14076 }
14077
14078
14079 func (c *ManagementWebpropertyUserLinksUpdateCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksUpdateCall {
14080 c.ctx_ = ctx
14081 return c
14082 }
14083
14084
14085
14086 func (c *ManagementWebpropertyUserLinksUpdateCall) Header() http.Header {
14087 if c.header_ == nil {
14088 c.header_ = make(http.Header)
14089 }
14090 return c.header_
14091 }
14092
14093 func (c *ManagementWebpropertyUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
14094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14095 var body io.Reader = nil
14096 body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
14097 if err != nil {
14098 return nil, err
14099 }
14100 c.urlParams_.Set("alt", alt)
14101 c.urlParams_.Set("prettyPrint", "false")
14102 urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}")
14103 urls += "?" + c.urlParams_.Encode()
14104 req, err := http.NewRequest("PUT", urls, body)
14105 if err != nil {
14106 return nil, err
14107 }
14108 req.Header = reqHeaders
14109 googleapi.Expand(req.URL, map[string]string{
14110 "accountId": c.accountId,
14111 "webPropertyId": c.webPropertyId,
14112 "linkId": c.linkId,
14113 })
14114 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14115 }
14116
14117
14118
14119
14120
14121
14122 func (c *ManagementWebpropertyUserLinksUpdateCall) Do(opts ...googleapi.CallOption) (*EntityUserLink, error) {
14123 gensupport.SetOptions(c.urlParams_, opts...)
14124 res, err := c.doRequest("json")
14125 if res != nil && res.StatusCode == http.StatusNotModified {
14126 if res.Body != nil {
14127 res.Body.Close()
14128 }
14129 return nil, gensupport.WrapError(&googleapi.Error{
14130 Code: res.StatusCode,
14131 Header: res.Header,
14132 })
14133 }
14134 if err != nil {
14135 return nil, err
14136 }
14137 defer googleapi.CloseBody(res)
14138 if err := googleapi.CheckResponse(res); err != nil {
14139 return nil, gensupport.WrapError(err)
14140 }
14141 ret := &EntityUserLink{
14142 ServerResponse: googleapi.ServerResponse{
14143 Header: res.Header,
14144 HTTPStatusCode: res.StatusCode,
14145 },
14146 }
14147 target := &ret
14148 if err := gensupport.DecodeResponse(target, res); err != nil {
14149 return nil, err
14150 }
14151 return ret, nil
14152 }
14153
14154 type MetadataColumnsListCall struct {
14155 s *Service
14156 reportType string
14157 urlParams_ gensupport.URLParams
14158 ifNoneMatch_ string
14159 ctx_ context.Context
14160 header_ http.Header
14161 }
14162
14163
14164
14165
14166
14167 func (r *MetadataColumnsService) List(reportType string) *MetadataColumnsListCall {
14168 c := &MetadataColumnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14169 c.reportType = reportType
14170 return c
14171 }
14172
14173
14174
14175
14176 func (c *MetadataColumnsListCall) Fields(s ...googleapi.Field) *MetadataColumnsListCall {
14177 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14178 return c
14179 }
14180
14181
14182
14183
14184 func (c *MetadataColumnsListCall) IfNoneMatch(entityTag string) *MetadataColumnsListCall {
14185 c.ifNoneMatch_ = entityTag
14186 return c
14187 }
14188
14189
14190 func (c *MetadataColumnsListCall) Context(ctx context.Context) *MetadataColumnsListCall {
14191 c.ctx_ = ctx
14192 return c
14193 }
14194
14195
14196
14197 func (c *MetadataColumnsListCall) Header() http.Header {
14198 if c.header_ == nil {
14199 c.header_ = make(http.Header)
14200 }
14201 return c.header_
14202 }
14203
14204 func (c *MetadataColumnsListCall) doRequest(alt string) (*http.Response, error) {
14205 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14206 if c.ifNoneMatch_ != "" {
14207 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14208 }
14209 var body io.Reader = nil
14210 c.urlParams_.Set("alt", alt)
14211 c.urlParams_.Set("prettyPrint", "false")
14212 urls := googleapi.ResolveRelative(c.s.BasePath, "metadata/{reportType}/columns")
14213 urls += "?" + c.urlParams_.Encode()
14214 req, err := http.NewRequest("GET", urls, body)
14215 if err != nil {
14216 return nil, err
14217 }
14218 req.Header = reqHeaders
14219 googleapi.Expand(req.URL, map[string]string{
14220 "reportType": c.reportType,
14221 })
14222 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14223 }
14224
14225
14226
14227
14228
14229
14230 func (c *MetadataColumnsListCall) Do(opts ...googleapi.CallOption) (*Columns, error) {
14231 gensupport.SetOptions(c.urlParams_, opts...)
14232 res, err := c.doRequest("json")
14233 if res != nil && res.StatusCode == http.StatusNotModified {
14234 if res.Body != nil {
14235 res.Body.Close()
14236 }
14237 return nil, gensupport.WrapError(&googleapi.Error{
14238 Code: res.StatusCode,
14239 Header: res.Header,
14240 })
14241 }
14242 if err != nil {
14243 return nil, err
14244 }
14245 defer googleapi.CloseBody(res)
14246 if err := googleapi.CheckResponse(res); err != nil {
14247 return nil, gensupport.WrapError(err)
14248 }
14249 ret := &Columns{
14250 ServerResponse: googleapi.ServerResponse{
14251 Header: res.Header,
14252 HTTPStatusCode: res.StatusCode,
14253 },
14254 }
14255 target := &ret
14256 if err := gensupport.DecodeResponse(target, res); err != nil {
14257 return nil, err
14258 }
14259 return ret, nil
14260 }
14261
14262 type ProvisioningCreateAccountTicketCall struct {
14263 s *Service
14264 accountticket *AccountTicket
14265 urlParams_ gensupport.URLParams
14266 ctx_ context.Context
14267 header_ http.Header
14268 }
14269
14270
14271 func (r *ProvisioningService) CreateAccountTicket(accountticket *AccountTicket) *ProvisioningCreateAccountTicketCall {
14272 c := &ProvisioningCreateAccountTicketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14273 c.accountticket = accountticket
14274 return c
14275 }
14276
14277
14278
14279
14280 func (c *ProvisioningCreateAccountTicketCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTicketCall {
14281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14282 return c
14283 }
14284
14285
14286 func (c *ProvisioningCreateAccountTicketCall) Context(ctx context.Context) *ProvisioningCreateAccountTicketCall {
14287 c.ctx_ = ctx
14288 return c
14289 }
14290
14291
14292
14293 func (c *ProvisioningCreateAccountTicketCall) Header() http.Header {
14294 if c.header_ == nil {
14295 c.header_ = make(http.Header)
14296 }
14297 return c.header_
14298 }
14299
14300 func (c *ProvisioningCreateAccountTicketCall) doRequest(alt string) (*http.Response, error) {
14301 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14302 var body io.Reader = nil
14303 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountticket)
14304 if err != nil {
14305 return nil, err
14306 }
14307 c.urlParams_.Set("alt", alt)
14308 c.urlParams_.Set("prettyPrint", "false")
14309 urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTicket")
14310 urls += "?" + c.urlParams_.Encode()
14311 req, err := http.NewRequest("POST", urls, body)
14312 if err != nil {
14313 return nil, err
14314 }
14315 req.Header = reqHeaders
14316 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14317 }
14318
14319
14320
14321
14322
14323
14324 func (c *ProvisioningCreateAccountTicketCall) Do(opts ...googleapi.CallOption) (*AccountTicket, error) {
14325 gensupport.SetOptions(c.urlParams_, opts...)
14326 res, err := c.doRequest("json")
14327 if res != nil && res.StatusCode == http.StatusNotModified {
14328 if res.Body != nil {
14329 res.Body.Close()
14330 }
14331 return nil, gensupport.WrapError(&googleapi.Error{
14332 Code: res.StatusCode,
14333 Header: res.Header,
14334 })
14335 }
14336 if err != nil {
14337 return nil, err
14338 }
14339 defer googleapi.CloseBody(res)
14340 if err := googleapi.CheckResponse(res); err != nil {
14341 return nil, gensupport.WrapError(err)
14342 }
14343 ret := &AccountTicket{
14344 ServerResponse: googleapi.ServerResponse{
14345 Header: res.Header,
14346 HTTPStatusCode: res.StatusCode,
14347 },
14348 }
14349 target := &ret
14350 if err := gensupport.DecodeResponse(target, res); err != nil {
14351 return nil, err
14352 }
14353 return ret, nil
14354 }
14355
14356 type ProvisioningCreateAccountTreeCall struct {
14357 s *Service
14358 accounttreerequest *AccountTreeRequest
14359 urlParams_ gensupport.URLParams
14360 ctx_ context.Context
14361 header_ http.Header
14362 }
14363
14364
14365 func (r *ProvisioningService) CreateAccountTree(accounttreerequest *AccountTreeRequest) *ProvisioningCreateAccountTreeCall {
14366 c := &ProvisioningCreateAccountTreeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14367 c.accounttreerequest = accounttreerequest
14368 return c
14369 }
14370
14371
14372
14373
14374 func (c *ProvisioningCreateAccountTreeCall) Fields(s ...googleapi.Field) *ProvisioningCreateAccountTreeCall {
14375 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14376 return c
14377 }
14378
14379
14380 func (c *ProvisioningCreateAccountTreeCall) Context(ctx context.Context) *ProvisioningCreateAccountTreeCall {
14381 c.ctx_ = ctx
14382 return c
14383 }
14384
14385
14386
14387 func (c *ProvisioningCreateAccountTreeCall) Header() http.Header {
14388 if c.header_ == nil {
14389 c.header_ = make(http.Header)
14390 }
14391 return c.header_
14392 }
14393
14394 func (c *ProvisioningCreateAccountTreeCall) doRequest(alt string) (*http.Response, error) {
14395 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14396 var body io.Reader = nil
14397 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttreerequest)
14398 if err != nil {
14399 return nil, err
14400 }
14401 c.urlParams_.Set("alt", alt)
14402 c.urlParams_.Set("prettyPrint", "false")
14403 urls := googleapi.ResolveRelative(c.s.BasePath, "provisioning/createAccountTree")
14404 urls += "?" + c.urlParams_.Encode()
14405 req, err := http.NewRequest("POST", urls, body)
14406 if err != nil {
14407 return nil, err
14408 }
14409 req.Header = reqHeaders
14410 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14411 }
14412
14413
14414
14415
14416
14417
14418
14419 func (c *ProvisioningCreateAccountTreeCall) Do(opts ...googleapi.CallOption) (*AccountTreeResponse, error) {
14420 gensupport.SetOptions(c.urlParams_, opts...)
14421 res, err := c.doRequest("json")
14422 if res != nil && res.StatusCode == http.StatusNotModified {
14423 if res.Body != nil {
14424 res.Body.Close()
14425 }
14426 return nil, gensupport.WrapError(&googleapi.Error{
14427 Code: res.StatusCode,
14428 Header: res.Header,
14429 })
14430 }
14431 if err != nil {
14432 return nil, err
14433 }
14434 defer googleapi.CloseBody(res)
14435 if err := googleapi.CheckResponse(res); err != nil {
14436 return nil, gensupport.WrapError(err)
14437 }
14438 ret := &AccountTreeResponse{
14439 ServerResponse: googleapi.ServerResponse{
14440 Header: res.Header,
14441 HTTPStatusCode: res.StatusCode,
14442 },
14443 }
14444 target := &ret
14445 if err := gensupport.DecodeResponse(target, res); err != nil {
14446 return nil, err
14447 }
14448 return ret, nil
14449 }
14450
14451 type UserDeletionUserDeletionRequestUpsertCall struct {
14452 s *Service
14453 userdeletionrequest *UserDeletionRequest
14454 urlParams_ gensupport.URLParams
14455 ctx_ context.Context
14456 header_ http.Header
14457 }
14458
14459
14460 func (r *UserDeletionUserDeletionRequestService) Upsert(userdeletionrequest *UserDeletionRequest) *UserDeletionUserDeletionRequestUpsertCall {
14461 c := &UserDeletionUserDeletionRequestUpsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14462 c.userdeletionrequest = userdeletionrequest
14463 return c
14464 }
14465
14466
14467
14468
14469 func (c *UserDeletionUserDeletionRequestUpsertCall) Fields(s ...googleapi.Field) *UserDeletionUserDeletionRequestUpsertCall {
14470 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14471 return c
14472 }
14473
14474
14475 func (c *UserDeletionUserDeletionRequestUpsertCall) Context(ctx context.Context) *UserDeletionUserDeletionRequestUpsertCall {
14476 c.ctx_ = ctx
14477 return c
14478 }
14479
14480
14481
14482 func (c *UserDeletionUserDeletionRequestUpsertCall) Header() http.Header {
14483 if c.header_ == nil {
14484 c.header_ = make(http.Header)
14485 }
14486 return c.header_
14487 }
14488
14489 func (c *UserDeletionUserDeletionRequestUpsertCall) doRequest(alt string) (*http.Response, error) {
14490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14491 var body io.Reader = nil
14492 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userdeletionrequest)
14493 if err != nil {
14494 return nil, err
14495 }
14496 c.urlParams_.Set("alt", alt)
14497 c.urlParams_.Set("prettyPrint", "false")
14498 urls := googleapi.ResolveRelative(c.s.BasePath, "userDeletion/userDeletionRequests:upsert")
14499 urls += "?" + c.urlParams_.Encode()
14500 req, err := http.NewRequest("POST", urls, body)
14501 if err != nil {
14502 return nil, err
14503 }
14504 req.Header = reqHeaders
14505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14506 }
14507
14508
14509
14510
14511
14512
14513
14514 func (c *UserDeletionUserDeletionRequestUpsertCall) Do(opts ...googleapi.CallOption) (*UserDeletionRequest, error) {
14515 gensupport.SetOptions(c.urlParams_, opts...)
14516 res, err := c.doRequest("json")
14517 if res != nil && res.StatusCode == http.StatusNotModified {
14518 if res.Body != nil {
14519 res.Body.Close()
14520 }
14521 return nil, gensupport.WrapError(&googleapi.Error{
14522 Code: res.StatusCode,
14523 Header: res.Header,
14524 })
14525 }
14526 if err != nil {
14527 return nil, err
14528 }
14529 defer googleapi.CloseBody(res)
14530 if err := googleapi.CheckResponse(res); err != nil {
14531 return nil, gensupport.WrapError(err)
14532 }
14533 ret := &UserDeletionRequest{
14534 ServerResponse: googleapi.ServerResponse{
14535 Header: res.Header,
14536 HTTPStatusCode: res.StatusCode,
14537 },
14538 }
14539 target := &ret
14540 if err := gensupport.DecodeResponse(target, res); err != nil {
14541 return nil, err
14542 }
14543 return ret, nil
14544 }
14545
View as plain text