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 firebase
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 = "firebase:v1beta1"
95 const apiName = "firebase"
96 const apiVersion = "v1beta1"
97 const basePath = "https://firebase.googleapis.com/"
98 const basePathTemplate = "https://firebase.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://firebase.mtls.googleapis.com/"
100
101
102 const (
103
104
105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
106
107
108
109 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
110
111
112 FirebaseScope = "https://www.googleapis.com/auth/firebase"
113
114
115 FirebaseReadonlyScope = "https://www.googleapis.com/auth/firebase.readonly"
116 )
117
118
119 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
120 scopesOption := internaloption.WithDefaultScopes(
121 "https://www.googleapis.com/auth/cloud-platform",
122 "https://www.googleapis.com/auth/cloud-platform.read-only",
123 "https://www.googleapis.com/auth/firebase",
124 "https://www.googleapis.com/auth/firebase.readonly",
125 )
126
127 opts = append([]option.ClientOption{scopesOption}, opts...)
128 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
129 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
130 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
131 opts = append(opts, internaloption.EnableNewAuthLibrary())
132 client, endpoint, err := htransport.NewClient(ctx, opts...)
133 if err != nil {
134 return nil, err
135 }
136 s, err := New(client)
137 if err != nil {
138 return nil, err
139 }
140 if endpoint != "" {
141 s.BasePath = endpoint
142 }
143 return s, nil
144 }
145
146
147
148
149
150
151 func New(client *http.Client) (*Service, error) {
152 if client == nil {
153 return nil, errors.New("client is nil")
154 }
155 s := &Service{client: client, BasePath: basePath}
156 s.AvailableProjects = NewAvailableProjectsService(s)
157 s.Operations = NewOperationsService(s)
158 s.Projects = NewProjectsService(s)
159 return s, nil
160 }
161
162 type Service struct {
163 client *http.Client
164 BasePath string
165 UserAgent string
166
167 AvailableProjects *AvailableProjectsService
168
169 Operations *OperationsService
170
171 Projects *ProjectsService
172 }
173
174 func (s *Service) userAgent() string {
175 if s.UserAgent == "" {
176 return googleapi.UserAgent
177 }
178 return googleapi.UserAgent + " " + s.UserAgent
179 }
180
181 func NewAvailableProjectsService(s *Service) *AvailableProjectsService {
182 rs := &AvailableProjectsService{s: s}
183 return rs
184 }
185
186 type AvailableProjectsService struct {
187 s *Service
188 }
189
190 func NewOperationsService(s *Service) *OperationsService {
191 rs := &OperationsService{s: s}
192 return rs
193 }
194
195 type OperationsService struct {
196 s *Service
197 }
198
199 func NewProjectsService(s *Service) *ProjectsService {
200 rs := &ProjectsService{s: s}
201 rs.AndroidApps = NewProjectsAndroidAppsService(s)
202 rs.AvailableLocations = NewProjectsAvailableLocationsService(s)
203 rs.DefaultLocation = NewProjectsDefaultLocationService(s)
204 rs.IosApps = NewProjectsIosAppsService(s)
205 rs.WebApps = NewProjectsWebAppsService(s)
206 return rs
207 }
208
209 type ProjectsService struct {
210 s *Service
211
212 AndroidApps *ProjectsAndroidAppsService
213
214 AvailableLocations *ProjectsAvailableLocationsService
215
216 DefaultLocation *ProjectsDefaultLocationService
217
218 IosApps *ProjectsIosAppsService
219
220 WebApps *ProjectsWebAppsService
221 }
222
223 func NewProjectsAndroidAppsService(s *Service) *ProjectsAndroidAppsService {
224 rs := &ProjectsAndroidAppsService{s: s}
225 rs.Sha = NewProjectsAndroidAppsShaService(s)
226 return rs
227 }
228
229 type ProjectsAndroidAppsService struct {
230 s *Service
231
232 Sha *ProjectsAndroidAppsShaService
233 }
234
235 func NewProjectsAndroidAppsShaService(s *Service) *ProjectsAndroidAppsShaService {
236 rs := &ProjectsAndroidAppsShaService{s: s}
237 return rs
238 }
239
240 type ProjectsAndroidAppsShaService struct {
241 s *Service
242 }
243
244 func NewProjectsAvailableLocationsService(s *Service) *ProjectsAvailableLocationsService {
245 rs := &ProjectsAvailableLocationsService{s: s}
246 return rs
247 }
248
249 type ProjectsAvailableLocationsService struct {
250 s *Service
251 }
252
253 func NewProjectsDefaultLocationService(s *Service) *ProjectsDefaultLocationService {
254 rs := &ProjectsDefaultLocationService{s: s}
255 return rs
256 }
257
258 type ProjectsDefaultLocationService struct {
259 s *Service
260 }
261
262 func NewProjectsIosAppsService(s *Service) *ProjectsIosAppsService {
263 rs := &ProjectsIosAppsService{s: s}
264 return rs
265 }
266
267 type ProjectsIosAppsService struct {
268 s *Service
269 }
270
271 func NewProjectsWebAppsService(s *Service) *ProjectsWebAppsService {
272 rs := &ProjectsWebAppsService{s: s}
273 return rs
274 }
275
276 type ProjectsWebAppsService struct {
277 s *Service
278 }
279
280
281 type AddFirebaseRequest struct {
282
283
284
285
286
287
288 LocationId string `json:"locationId,omitempty"`
289
290
291
292
293
294 ForceSendFields []string `json:"-"`
295
296
297
298
299 NullFields []string `json:"-"`
300 }
301
302 func (s *AddFirebaseRequest) MarshalJSON() ([]byte, error) {
303 type NoMethod AddFirebaseRequest
304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
305 }
306
307 type AddGoogleAnalyticsRequest struct {
308
309
310
311
312
313 AnalyticsAccountId string `json:"analyticsAccountId,omitempty"`
314
315
316 AnalyticsPropertyId string `json:"analyticsPropertyId,omitempty"`
317
318
319
320
321
322 ForceSendFields []string `json:"-"`
323
324
325
326
327 NullFields []string `json:"-"`
328 }
329
330 func (s *AddGoogleAnalyticsRequest) MarshalJSON() ([]byte, error) {
331 type NoMethod AddGoogleAnalyticsRequest
332 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
333 }
334
335 type AdminSdkConfig struct {
336
337
338
339
340
341
342 DatabaseURL string `json:"databaseURL,omitempty"`
343
344
345
346
347
348
349
350
351 LocationId string `json:"locationId,omitempty"`
352
353
354
355
356 ProjectId string `json:"projectId,omitempty"`
357
358
359
360
361
362
363
364 StorageBucket string `json:"storageBucket,omitempty"`
365
366
367 googleapi.ServerResponse `json:"-"`
368
369
370
371
372
373 ForceSendFields []string `json:"-"`
374
375
376
377
378 NullFields []string `json:"-"`
379 }
380
381 func (s *AdminSdkConfig) MarshalJSON() ([]byte, error) {
382 type NoMethod AdminSdkConfig
383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
384 }
385
386 type AnalyticsDetails struct {
387
388
389
390 AnalyticsProperty *AnalyticsProperty `json:"analyticsProperty,omitempty"`
391
392
393
394
395
396
397 StreamMappings []*StreamMapping `json:"streamMappings,omitempty"`
398
399
400 googleapi.ServerResponse `json:"-"`
401
402
403
404
405
406 ForceSendFields []string `json:"-"`
407
408
409
410
411 NullFields []string `json:"-"`
412 }
413
414 func (s *AnalyticsDetails) MarshalJSON() ([]byte, error) {
415 type NoMethod AnalyticsDetails
416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
417 }
418
419
420 type AnalyticsProperty struct {
421
422
423
424 AnalyticsAccountId string `json:"analyticsAccountId,omitempty"`
425
426
427 DisplayName string `json:"displayName,omitempty"`
428
429
430
431
432
433
434 Id string `json:"id,omitempty"`
435
436
437
438
439
440 ForceSendFields []string `json:"-"`
441
442
443
444
445 NullFields []string `json:"-"`
446 }
447
448 func (s *AnalyticsProperty) MarshalJSON() ([]byte, error) {
449 type NoMethod AnalyticsProperty
450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
451 }
452
453
454 type AndroidApp struct {
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470 ApiKeyId string `json:"apiKeyId,omitempty"`
471
472
473
474 AppId string `json:"appId,omitempty"`
475
476 DisplayName string `json:"displayName,omitempty"`
477
478
479
480
481
482
483 Etag string `json:"etag,omitempty"`
484
485
486
487 ExpireTime string `json:"expireTime,omitempty"`
488
489
490
491
492
493
494
495
496
497
498 Name string `json:"name,omitempty"`
499
500
501 PackageName string `json:"packageName,omitempty"`
502
503
504 ProjectId string `json:"projectId,omitempty"`
505
506 Sha1Hashes []string `json:"sha1Hashes,omitempty"`
507
508 Sha256Hashes []string `json:"sha256Hashes,omitempty"`
509
510
511
512
513
514
515
516
517
518
519 State string `json:"state,omitempty"`
520
521
522 googleapi.ServerResponse `json:"-"`
523
524
525
526
527
528 ForceSendFields []string `json:"-"`
529
530
531
532
533 NullFields []string `json:"-"`
534 }
535
536 func (s *AndroidApp) MarshalJSON() ([]byte, error) {
537 type NoMethod AndroidApp
538 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
539 }
540
541
542
543 type AndroidAppConfig struct {
544
545 ConfigFileContents string `json:"configFileContents,omitempty"`
546
547
548 ConfigFilename string `json:"configFilename,omitempty"`
549
550
551 googleapi.ServerResponse `json:"-"`
552
553
554
555
556
557 ForceSendFields []string `json:"-"`
558
559
560
561
562 NullFields []string `json:"-"`
563 }
564
565 func (s *AndroidAppConfig) MarshalJSON() ([]byte, error) {
566 type NoMethod AndroidAppConfig
567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
568 }
569
570
571
572
573
574
575 type DefaultResources struct {
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590 HostingSite string `json:"hostingSite,omitempty"`
591
592
593
594
595
596
597
598
599 LocationId string `json:"locationId,omitempty"`
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614 RealtimeDatabaseInstance string `json:"realtimeDatabaseInstance,omitempty"`
615
616
617
618
619
620
621
622 StorageBucket string `json:"storageBucket,omitempty"`
623
624
625
626
627
628 ForceSendFields []string `json:"-"`
629
630
631
632
633 NullFields []string `json:"-"`
634 }
635
636 func (s *DefaultResources) MarshalJSON() ([]byte, error) {
637 type NoMethod DefaultResources
638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
639 }
640
641
642
643
644
645 type Empty struct {
646
647 googleapi.ServerResponse `json:"-"`
648 }
649
650 type FinalizeDefaultLocationRequest struct {
651
652
653
654 LocationId string `json:"locationId,omitempty"`
655
656
657
658
659
660 ForceSendFields []string `json:"-"`
661
662
663
664
665 NullFields []string `json:"-"`
666 }
667
668 func (s *FinalizeDefaultLocationRequest) MarshalJSON() ([]byte, error) {
669 type NoMethod FinalizeDefaultLocationRequest
670 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
671 }
672
673
674 type FirebaseAppInfo struct {
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691 ApiKeyId string `json:"apiKeyId,omitempty"`
692
693
694
695 AppId string `json:"appId,omitempty"`
696
697 DisplayName string `json:"displayName,omitempty"`
698
699
700
701 ExpireTime string `json:"expireTime,omitempty"`
702
703
704
705
706 Name string `json:"name,omitempty"`
707
708
709
710
711
712
713
714
715 Namespace string `json:"namespace,omitempty"`
716
717
718
719
720
721
722
723
724 Platform string `json:"platform,omitempty"`
725
726
727
728
729
730
731
732
733
734
735 State string `json:"state,omitempty"`
736
737
738
739
740
741 ForceSendFields []string `json:"-"`
742
743
744
745
746 NullFields []string `json:"-"`
747 }
748
749 func (s *FirebaseAppInfo) MarshalJSON() ([]byte, error) {
750 type NoMethod FirebaseAppInfo
751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
752 }
753
754
755
756
757
758
759
760
761
762
763
764
765 type FirebaseProject struct {
766
767
768
769
770
771 Annotations map[string]string `json:"annotations,omitempty"`
772
773 DisplayName string `json:"displayName,omitempty"`
774
775
776
777
778
779
780 Etag string `json:"etag,omitempty"`
781
782
783
784
785
786
787
788
789 Name string `json:"name,omitempty"`
790
791
792
793
794 ProjectId string `json:"projectId,omitempty"`
795
796
797
798 ProjectNumber int64 `json:"projectNumber,omitempty,string"`
799
800
801
802
803
804 Resources *DefaultResources `json:"resources,omitempty"`
805
806
807
808
809
810
811 State string `json:"state,omitempty"`
812
813
814 googleapi.ServerResponse `json:"-"`
815
816
817
818
819
820 ForceSendFields []string `json:"-"`
821
822
823
824
825 NullFields []string `json:"-"`
826 }
827
828 func (s *FirebaseProject) MarshalJSON() ([]byte, error) {
829 type NoMethod FirebaseProject
830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
831 }
832
833
834 type IosApp struct {
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850 ApiKeyId string `json:"apiKeyId,omitempty"`
851
852
853
854 AppId string `json:"appId,omitempty"`
855
856
857 AppStoreId string `json:"appStoreId,omitempty"`
858
859
860 BundleId string `json:"bundleId,omitempty"`
861
862 DisplayName string `json:"displayName,omitempty"`
863
864
865
866
867
868
869 Etag string `json:"etag,omitempty"`
870
871
872
873 ExpireTime string `json:"expireTime,omitempty"`
874
875
876
877
878
879
880
881
882
883
884 Name string `json:"name,omitempty"`
885
886
887 ProjectId string `json:"projectId,omitempty"`
888
889
890
891
892
893
894
895
896
897
898 State string `json:"state,omitempty"`
899
900
901 TeamId string `json:"teamId,omitempty"`
902
903
904 googleapi.ServerResponse `json:"-"`
905
906
907
908
909
910 ForceSendFields []string `json:"-"`
911
912
913
914
915 NullFields []string `json:"-"`
916 }
917
918 func (s *IosApp) MarshalJSON() ([]byte, error) {
919 type NoMethod IosApp
920 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
921 }
922
923
924 type IosAppConfig struct {
925
926 ConfigFileContents string `json:"configFileContents,omitempty"`
927
928
929 ConfigFilename string `json:"configFilename,omitempty"`
930
931
932 googleapi.ServerResponse `json:"-"`
933
934
935
936
937
938 ForceSendFields []string `json:"-"`
939
940
941
942
943 NullFields []string `json:"-"`
944 }
945
946 func (s *IosAppConfig) MarshalJSON() ([]byte, error) {
947 type NoMethod IosAppConfig
948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
949 }
950
951 type ListAndroidAppsResponse struct {
952
953
954 Apps []*AndroidApp `json:"apps,omitempty"`
955
956
957
958
959
960 NextPageToken string `json:"nextPageToken,omitempty"`
961
962
963 googleapi.ServerResponse `json:"-"`
964
965
966
967
968
969 ForceSendFields []string `json:"-"`
970
971
972
973
974 NullFields []string `json:"-"`
975 }
976
977 func (s *ListAndroidAppsResponse) MarshalJSON() ([]byte, error) {
978 type NoMethod ListAndroidAppsResponse
979 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
980 }
981
982 type ListAvailableLocationsResponse struct {
983
984 Locations []*Location `json:"locations,omitempty"`
985
986
987
988
989
990 NextPageToken string `json:"nextPageToken,omitempty"`
991
992
993 googleapi.ServerResponse `json:"-"`
994
995
996
997
998
999 ForceSendFields []string `json:"-"`
1000
1001
1002
1003
1004 NullFields []string `json:"-"`
1005 }
1006
1007 func (s *ListAvailableLocationsResponse) MarshalJSON() ([]byte, error) {
1008 type NoMethod ListAvailableLocationsResponse
1009 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1010 }
1011
1012 type ListAvailableProjectsResponse struct {
1013
1014
1015
1016
1017
1018 NextPageToken string `json:"nextPageToken,omitempty"`
1019
1020
1021 ProjectInfo []*ProjectInfo `json:"projectInfo,omitempty"`
1022
1023
1024 googleapi.ServerResponse `json:"-"`
1025
1026
1027
1028
1029
1030 ForceSendFields []string `json:"-"`
1031
1032
1033
1034
1035 NullFields []string `json:"-"`
1036 }
1037
1038 func (s *ListAvailableProjectsResponse) MarshalJSON() ([]byte, error) {
1039 type NoMethod ListAvailableProjectsResponse
1040 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1041 }
1042
1043 type ListFirebaseProjectsResponse struct {
1044
1045
1046
1047
1048
1049 NextPageToken string `json:"nextPageToken,omitempty"`
1050
1051 Results []*FirebaseProject `json:"results,omitempty"`
1052
1053
1054 googleapi.ServerResponse `json:"-"`
1055
1056
1057
1058
1059
1060 ForceSendFields []string `json:"-"`
1061
1062
1063
1064
1065 NullFields []string `json:"-"`
1066 }
1067
1068 func (s *ListFirebaseProjectsResponse) MarshalJSON() ([]byte, error) {
1069 type NoMethod ListFirebaseProjectsResponse
1070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1071 }
1072
1073 type ListIosAppsResponse struct {
1074
1075 Apps []*IosApp `json:"apps,omitempty"`
1076
1077
1078
1079
1080
1081 NextPageToken string `json:"nextPageToken,omitempty"`
1082
1083
1084 googleapi.ServerResponse `json:"-"`
1085
1086
1087
1088
1089
1090 ForceSendFields []string `json:"-"`
1091
1092
1093
1094
1095 NullFields []string `json:"-"`
1096 }
1097
1098 func (s *ListIosAppsResponse) MarshalJSON() ([]byte, error) {
1099 type NoMethod ListIosAppsResponse
1100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1101 }
1102
1103 type ListShaCertificatesResponse struct {
1104
1105
1106 Certificates []*ShaCertificate `json:"certificates,omitempty"`
1107
1108
1109 googleapi.ServerResponse `json:"-"`
1110
1111
1112
1113
1114
1115 ForceSendFields []string `json:"-"`
1116
1117
1118
1119
1120 NullFields []string `json:"-"`
1121 }
1122
1123 func (s *ListShaCertificatesResponse) MarshalJSON() ([]byte, error) {
1124 type NoMethod ListShaCertificatesResponse
1125 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1126 }
1127
1128 type ListWebAppsResponse struct {
1129
1130 Apps []*WebApp `json:"apps,omitempty"`
1131
1132
1133
1134
1135
1136 NextPageToken string `json:"nextPageToken,omitempty"`
1137
1138
1139 googleapi.ServerResponse `json:"-"`
1140
1141
1142
1143
1144
1145 ForceSendFields []string `json:"-"`
1146
1147
1148
1149
1150 NullFields []string `json:"-"`
1151 }
1152
1153 func (s *ListWebAppsResponse) MarshalJSON() ([]byte, error) {
1154 type NoMethod ListWebAppsResponse
1155 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1156 }
1157
1158
1159
1160
1161
1162 type Location struct {
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180 Features []string `json:"features,omitempty"`
1181
1182
1183
1184 LocationId string `json:"locationId,omitempty"`
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198 Type string `json:"type,omitempty"`
1199
1200
1201
1202
1203
1204 ForceSendFields []string `json:"-"`
1205
1206
1207
1208
1209 NullFields []string `json:"-"`
1210 }
1211
1212 func (s *Location) MarshalJSON() ([]byte, error) {
1213 type NoMethod Location
1214 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1215 }
1216
1217
1218 type MessageSet struct {
1219 }
1220
1221
1222
1223 type Operation struct {
1224
1225
1226
1227 Done bool `json:"done,omitempty"`
1228
1229 Error *Status `json:"error,omitempty"`
1230
1231
1232
1233
1234 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1235
1236
1237
1238 Name string `json:"name,omitempty"`
1239
1240
1241
1242
1243
1244
1245
1246 Response googleapi.RawMessage `json:"response,omitempty"`
1247
1248
1249 googleapi.ServerResponse `json:"-"`
1250
1251
1252
1253
1254
1255 ForceSendFields []string `json:"-"`
1256
1257
1258
1259
1260 NullFields []string `json:"-"`
1261 }
1262
1263 func (s *Operation) MarshalJSON() ([]byte, error) {
1264 type NoMethod Operation
1265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1266 }
1267
1268
1269
1270 type OperationMetadata struct {
1271 }
1272
1273
1274 type ProductMetadata struct {
1275
1276 WarningMessages []string `json:"warningMessages,omitempty"`
1277
1278
1279
1280
1281
1282 ForceSendFields []string `json:"-"`
1283
1284
1285
1286
1287 NullFields []string `json:"-"`
1288 }
1289
1290 func (s *ProductMetadata) MarshalJSON() ([]byte, error) {
1291 type NoMethod ProductMetadata
1292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1293 }
1294
1295
1296 type ProjectInfo struct {
1297
1298
1299 DisplayName string `json:"displayName,omitempty"`
1300
1301
1302
1303
1304
1305
1306
1307
1308 LocationId string `json:"locationId,omitempty"`
1309
1310
1311
1312
1313 Project string `json:"project,omitempty"`
1314
1315
1316
1317
1318
1319 ForceSendFields []string `json:"-"`
1320
1321
1322
1323
1324 NullFields []string `json:"-"`
1325 }
1326
1327 func (s *ProjectInfo) MarshalJSON() ([]byte, error) {
1328 type NoMethod ProjectInfo
1329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1330 }
1331
1332 type RemoveAnalyticsRequest struct {
1333
1334
1335
1336
1337
1338
1339 AnalyticsPropertyId string `json:"analyticsPropertyId,omitempty"`
1340
1341
1342
1343
1344
1345 ForceSendFields []string `json:"-"`
1346
1347
1348
1349
1350 NullFields []string `json:"-"`
1351 }
1352
1353 func (s *RemoveAnalyticsRequest) MarshalJSON() ([]byte, error) {
1354 type NoMethod RemoveAnalyticsRequest
1355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1356 }
1357
1358 type RemoveAndroidAppRequest struct {
1359
1360
1361 AllowMissing bool `json:"allowMissing,omitempty"`
1362
1363
1364 Etag string `json:"etag,omitempty"`
1365
1366
1367
1368
1369
1370 Immediate bool `json:"immediate,omitempty"`
1371
1372
1373 ValidateOnly bool `json:"validateOnly,omitempty"`
1374
1375
1376
1377
1378
1379 ForceSendFields []string `json:"-"`
1380
1381
1382
1383
1384 NullFields []string `json:"-"`
1385 }
1386
1387 func (s *RemoveAndroidAppRequest) MarshalJSON() ([]byte, error) {
1388 type NoMethod RemoveAndroidAppRequest
1389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1390 }
1391
1392 type RemoveIosAppRequest struct {
1393
1394
1395 AllowMissing bool `json:"allowMissing,omitempty"`
1396
1397
1398 Etag string `json:"etag,omitempty"`
1399
1400
1401
1402
1403
1404 Immediate bool `json:"immediate,omitempty"`
1405
1406
1407 ValidateOnly bool `json:"validateOnly,omitempty"`
1408
1409
1410
1411
1412
1413 ForceSendFields []string `json:"-"`
1414
1415
1416
1417
1418 NullFields []string `json:"-"`
1419 }
1420
1421 func (s *RemoveIosAppRequest) MarshalJSON() ([]byte, error) {
1422 type NoMethod RemoveIosAppRequest
1423 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1424 }
1425
1426 type RemoveWebAppRequest struct {
1427
1428
1429 AllowMissing bool `json:"allowMissing,omitempty"`
1430
1431
1432 Etag string `json:"etag,omitempty"`
1433
1434
1435
1436
1437
1438 Immediate bool `json:"immediate,omitempty"`
1439
1440
1441 ValidateOnly bool `json:"validateOnly,omitempty"`
1442
1443
1444
1445
1446
1447 ForceSendFields []string `json:"-"`
1448
1449
1450
1451
1452 NullFields []string `json:"-"`
1453 }
1454
1455 func (s *RemoveWebAppRequest) MarshalJSON() ([]byte, error) {
1456 type NoMethod RemoveWebAppRequest
1457 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1458 }
1459
1460 type SearchFirebaseAppsResponse struct {
1461
1462 Apps []*FirebaseAppInfo `json:"apps,omitempty"`
1463
1464
1465
1466
1467 NextPageToken string `json:"nextPageToken,omitempty"`
1468
1469
1470 googleapi.ServerResponse `json:"-"`
1471
1472
1473
1474
1475
1476 ForceSendFields []string `json:"-"`
1477
1478
1479
1480
1481 NullFields []string `json:"-"`
1482 }
1483
1484 func (s *SearchFirebaseAppsResponse) MarshalJSON() ([]byte, error) {
1485 type NoMethod SearchFirebaseAppsResponse
1486 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1487 }
1488
1489
1490
1491 type ShaCertificate struct {
1492
1493
1494
1495
1496
1497
1498
1499 CertType string `json:"certType,omitempty"`
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512 Name string `json:"name,omitempty"`
1513
1514 ShaHash string `json:"shaHash,omitempty"`
1515
1516
1517 googleapi.ServerResponse `json:"-"`
1518
1519
1520
1521
1522
1523 ForceSendFields []string `json:"-"`
1524
1525
1526
1527
1528 NullFields []string `json:"-"`
1529 }
1530
1531 func (s *ShaCertificate) MarshalJSON() ([]byte, error) {
1532 type NoMethod ShaCertificate
1533 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1534 }
1535
1536
1537
1538
1539
1540
1541
1542 type Status struct {
1543
1544 Code int64 `json:"code,omitempty"`
1545
1546
1547 Details []googleapi.RawMessage `json:"details,omitempty"`
1548
1549
1550
1551 Message string `json:"message,omitempty"`
1552
1553
1554
1555
1556
1557 ForceSendFields []string `json:"-"`
1558
1559
1560
1561
1562 NullFields []string `json:"-"`
1563 }
1564
1565 func (s *Status) MarshalJSON() ([]byte, error) {
1566 type NoMethod Status
1567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1568 }
1569
1570
1571 type StatusProto struct {
1572
1573
1574
1575 CanonicalCode int64 `json:"canonicalCode,omitempty"`
1576
1577
1578 Code int64 `json:"code,omitempty"`
1579
1580 Message string `json:"message,omitempty"`
1581
1582
1583 MessageSet *MessageSet `json:"messageSet,omitempty"`
1584
1585
1586 Space string `json:"space,omitempty"`
1587
1588
1589
1590
1591
1592 ForceSendFields []string `json:"-"`
1593
1594
1595
1596
1597 NullFields []string `json:"-"`
1598 }
1599
1600 func (s *StatusProto) MarshalJSON() ([]byte, error) {
1601 type NoMethod StatusProto
1602 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1603 }
1604
1605
1606 type StreamMapping struct {
1607
1608
1609
1610
1611
1612
1613
1614 App string `json:"app,omitempty"`
1615
1616
1617
1618
1619
1620
1621 MeasurementId string `json:"measurementId,omitempty"`
1622
1623
1624
1625
1626 StreamId int64 `json:"streamId,omitempty,string"`
1627
1628
1629
1630
1631
1632 ForceSendFields []string `json:"-"`
1633
1634
1635
1636
1637 NullFields []string `json:"-"`
1638 }
1639
1640 func (s *StreamMapping) MarshalJSON() ([]byte, error) {
1641 type NoMethod StreamMapping
1642 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1643 }
1644
1645 type UndeleteAndroidAppRequest struct {
1646
1647
1648 Etag string `json:"etag,omitempty"`
1649
1650
1651 ValidateOnly bool `json:"validateOnly,omitempty"`
1652
1653
1654
1655
1656
1657 ForceSendFields []string `json:"-"`
1658
1659
1660
1661
1662 NullFields []string `json:"-"`
1663 }
1664
1665 func (s *UndeleteAndroidAppRequest) MarshalJSON() ([]byte, error) {
1666 type NoMethod UndeleteAndroidAppRequest
1667 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1668 }
1669
1670 type UndeleteIosAppRequest struct {
1671
1672
1673 Etag string `json:"etag,omitempty"`
1674
1675
1676 ValidateOnly bool `json:"validateOnly,omitempty"`
1677
1678
1679
1680
1681
1682 ForceSendFields []string `json:"-"`
1683
1684
1685
1686
1687 NullFields []string `json:"-"`
1688 }
1689
1690 func (s *UndeleteIosAppRequest) MarshalJSON() ([]byte, error) {
1691 type NoMethod UndeleteIosAppRequest
1692 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1693 }
1694
1695 type UndeleteWebAppRequest struct {
1696
1697
1698 Etag string `json:"etag,omitempty"`
1699
1700
1701 ValidateOnly bool `json:"validateOnly,omitempty"`
1702
1703
1704
1705
1706
1707 ForceSendFields []string `json:"-"`
1708
1709
1710
1711
1712 NullFields []string `json:"-"`
1713 }
1714
1715 func (s *UndeleteWebAppRequest) MarshalJSON() ([]byte, error) {
1716 type NoMethod UndeleteWebAppRequest
1717 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1718 }
1719
1720
1721 type WebApp struct {
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737 ApiKeyId string `json:"apiKeyId,omitempty"`
1738
1739
1740
1741 AppId string `json:"appId,omitempty"`
1742
1743 AppUrls []string `json:"appUrls,omitempty"`
1744
1745 DisplayName string `json:"displayName,omitempty"`
1746
1747
1748
1749
1750
1751
1752 Etag string `json:"etag,omitempty"`
1753
1754
1755
1756 ExpireTime string `json:"expireTime,omitempty"`
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767 Name string `json:"name,omitempty"`
1768
1769
1770 ProjectId string `json:"projectId,omitempty"`
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781 State string `json:"state,omitempty"`
1782
1783
1784
1785
1786
1787 WebId string `json:"webId,omitempty"`
1788
1789
1790 googleapi.ServerResponse `json:"-"`
1791
1792
1793
1794
1795
1796 ForceSendFields []string `json:"-"`
1797
1798
1799
1800
1801 NullFields []string `json:"-"`
1802 }
1803
1804 func (s *WebApp) MarshalJSON() ([]byte, error) {
1805 type NoMethod WebApp
1806 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1807 }
1808
1809
1810 type WebAppConfig struct {
1811
1812
1813
1814
1815
1816 ApiKey string `json:"apiKey,omitempty"`
1817
1818
1819 AppId string `json:"appId,omitempty"`
1820
1821
1822 AuthDomain string `json:"authDomain,omitempty"`
1823
1824
1825
1826
1827
1828
1829 DatabaseURL string `json:"databaseURL,omitempty"`
1830
1831
1832
1833
1834
1835
1836
1837
1838 LocationId string `json:"locationId,omitempty"`
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852 MeasurementId string `json:"measurementId,omitempty"`
1853
1854 MessagingSenderId string `json:"messagingSenderId,omitempty"`
1855
1856
1857 ProjectId string `json:"projectId,omitempty"`
1858
1859
1860
1861
1862
1863
1864
1865 StorageBucket string `json:"storageBucket,omitempty"`
1866
1867
1868 googleapi.ServerResponse `json:"-"`
1869
1870
1871
1872
1873
1874 ForceSendFields []string `json:"-"`
1875
1876
1877
1878
1879 NullFields []string `json:"-"`
1880 }
1881
1882 func (s *WebAppConfig) MarshalJSON() ([]byte, error) {
1883 type NoMethod WebAppConfig
1884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1885 }
1886
1887 type AvailableProjectsListCall struct {
1888 s *Service
1889 urlParams_ gensupport.URLParams
1890 ifNoneMatch_ string
1891 ctx_ context.Context
1892 header_ http.Header
1893 }
1894
1895
1896
1897
1898
1899
1900
1901
1902 func (r *AvailableProjectsService) List() *AvailableProjectsListCall {
1903 c := &AvailableProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1904 return c
1905 }
1906
1907
1908
1909
1910
1911
1912 func (c *AvailableProjectsListCall) PageSize(pageSize int64) *AvailableProjectsListCall {
1913 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1914 return c
1915 }
1916
1917
1918
1919
1920 func (c *AvailableProjectsListCall) PageToken(pageToken string) *AvailableProjectsListCall {
1921 c.urlParams_.Set("pageToken", pageToken)
1922 return c
1923 }
1924
1925
1926
1927
1928 func (c *AvailableProjectsListCall) Fields(s ...googleapi.Field) *AvailableProjectsListCall {
1929 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1930 return c
1931 }
1932
1933
1934
1935
1936 func (c *AvailableProjectsListCall) IfNoneMatch(entityTag string) *AvailableProjectsListCall {
1937 c.ifNoneMatch_ = entityTag
1938 return c
1939 }
1940
1941
1942 func (c *AvailableProjectsListCall) Context(ctx context.Context) *AvailableProjectsListCall {
1943 c.ctx_ = ctx
1944 return c
1945 }
1946
1947
1948
1949 func (c *AvailableProjectsListCall) Header() http.Header {
1950 if c.header_ == nil {
1951 c.header_ = make(http.Header)
1952 }
1953 return c.header_
1954 }
1955
1956 func (c *AvailableProjectsListCall) doRequest(alt string) (*http.Response, error) {
1957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1958 if c.ifNoneMatch_ != "" {
1959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1960 }
1961 var body io.Reader = nil
1962 c.urlParams_.Set("alt", alt)
1963 c.urlParams_.Set("prettyPrint", "false")
1964 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/availableProjects")
1965 urls += "?" + c.urlParams_.Encode()
1966 req, err := http.NewRequest("GET", urls, body)
1967 if err != nil {
1968 return nil, err
1969 }
1970 req.Header = reqHeaders
1971 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1972 }
1973
1974
1975
1976
1977
1978
1979
1980 func (c *AvailableProjectsListCall) Do(opts ...googleapi.CallOption) (*ListAvailableProjectsResponse, error) {
1981 gensupport.SetOptions(c.urlParams_, opts...)
1982 res, err := c.doRequest("json")
1983 if res != nil && res.StatusCode == http.StatusNotModified {
1984 if res.Body != nil {
1985 res.Body.Close()
1986 }
1987 return nil, gensupport.WrapError(&googleapi.Error{
1988 Code: res.StatusCode,
1989 Header: res.Header,
1990 })
1991 }
1992 if err != nil {
1993 return nil, err
1994 }
1995 defer googleapi.CloseBody(res)
1996 if err := googleapi.CheckResponse(res); err != nil {
1997 return nil, gensupport.WrapError(err)
1998 }
1999 ret := &ListAvailableProjectsResponse{
2000 ServerResponse: googleapi.ServerResponse{
2001 Header: res.Header,
2002 HTTPStatusCode: res.StatusCode,
2003 },
2004 }
2005 target := &ret
2006 if err := gensupport.DecodeResponse(target, res); err != nil {
2007 return nil, err
2008 }
2009 return ret, nil
2010 }
2011
2012
2013
2014
2015 func (c *AvailableProjectsListCall) Pages(ctx context.Context, f func(*ListAvailableProjectsResponse) error) error {
2016 c.ctx_ = ctx
2017 defer c.PageToken(c.urlParams_.Get("pageToken"))
2018 for {
2019 x, err := c.Do()
2020 if err != nil {
2021 return err
2022 }
2023 if err := f(x); err != nil {
2024 return err
2025 }
2026 if x.NextPageToken == "" {
2027 return nil
2028 }
2029 c.PageToken(x.NextPageToken)
2030 }
2031 }
2032
2033 type OperationsGetCall struct {
2034 s *Service
2035 name string
2036 urlParams_ gensupport.URLParams
2037 ifNoneMatch_ string
2038 ctx_ context.Context
2039 header_ http.Header
2040 }
2041
2042
2043
2044
2045
2046
2047 func (r *OperationsService) Get(name string) *OperationsGetCall {
2048 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2049 c.name = name
2050 return c
2051 }
2052
2053
2054
2055
2056 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
2057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2058 return c
2059 }
2060
2061
2062
2063
2064 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
2065 c.ifNoneMatch_ = entityTag
2066 return c
2067 }
2068
2069
2070 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
2071 c.ctx_ = ctx
2072 return c
2073 }
2074
2075
2076
2077 func (c *OperationsGetCall) Header() http.Header {
2078 if c.header_ == nil {
2079 c.header_ = make(http.Header)
2080 }
2081 return c.header_
2082 }
2083
2084 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
2085 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2086 if c.ifNoneMatch_ != "" {
2087 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2088 }
2089 var body io.Reader = nil
2090 c.urlParams_.Set("alt", alt)
2091 c.urlParams_.Set("prettyPrint", "false")
2092 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2093 urls += "?" + c.urlParams_.Encode()
2094 req, err := http.NewRequest("GET", urls, body)
2095 if err != nil {
2096 return nil, err
2097 }
2098 req.Header = reqHeaders
2099 googleapi.Expand(req.URL, map[string]string{
2100 "name": c.name,
2101 })
2102 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2103 }
2104
2105
2106
2107
2108
2109
2110 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2111 gensupport.SetOptions(c.urlParams_, opts...)
2112 res, err := c.doRequest("json")
2113 if res != nil && res.StatusCode == http.StatusNotModified {
2114 if res.Body != nil {
2115 res.Body.Close()
2116 }
2117 return nil, gensupport.WrapError(&googleapi.Error{
2118 Code: res.StatusCode,
2119 Header: res.Header,
2120 })
2121 }
2122 if err != nil {
2123 return nil, err
2124 }
2125 defer googleapi.CloseBody(res)
2126 if err := googleapi.CheckResponse(res); err != nil {
2127 return nil, gensupport.WrapError(err)
2128 }
2129 ret := &Operation{
2130 ServerResponse: googleapi.ServerResponse{
2131 Header: res.Header,
2132 HTTPStatusCode: res.StatusCode,
2133 },
2134 }
2135 target := &ret
2136 if err := gensupport.DecodeResponse(target, res); err != nil {
2137 return nil, err
2138 }
2139 return ret, nil
2140 }
2141
2142 type ProjectsAddFirebaseCall struct {
2143 s *Service
2144 projectid string
2145 addfirebaserequest *AddFirebaseRequest
2146 urlParams_ gensupport.URLParams
2147 ctx_ context.Context
2148 header_ http.Header
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 func (r *ProjectsService) AddFirebase(projectid string, addfirebaserequest *AddFirebaseRequest) *ProjectsAddFirebaseCall {
2184 c := &ProjectsAddFirebaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2185 c.projectid = projectid
2186 c.addfirebaserequest = addfirebaserequest
2187 return c
2188 }
2189
2190
2191
2192
2193 func (c *ProjectsAddFirebaseCall) Fields(s ...googleapi.Field) *ProjectsAddFirebaseCall {
2194 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2195 return c
2196 }
2197
2198
2199 func (c *ProjectsAddFirebaseCall) Context(ctx context.Context) *ProjectsAddFirebaseCall {
2200 c.ctx_ = ctx
2201 return c
2202 }
2203
2204
2205
2206 func (c *ProjectsAddFirebaseCall) Header() http.Header {
2207 if c.header_ == nil {
2208 c.header_ = make(http.Header)
2209 }
2210 return c.header_
2211 }
2212
2213 func (c *ProjectsAddFirebaseCall) doRequest(alt string) (*http.Response, error) {
2214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2215 var body io.Reader = nil
2216 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addfirebaserequest)
2217 if err != nil {
2218 return nil, err
2219 }
2220 c.urlParams_.Set("alt", alt)
2221 c.urlParams_.Set("prettyPrint", "false")
2222 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+project}:addFirebase")
2223 urls += "?" + c.urlParams_.Encode()
2224 req, err := http.NewRequest("POST", urls, body)
2225 if err != nil {
2226 return nil, err
2227 }
2228 req.Header = reqHeaders
2229 googleapi.Expand(req.URL, map[string]string{
2230 "project": c.projectid,
2231 })
2232 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2233 }
2234
2235
2236
2237
2238
2239
2240 func (c *ProjectsAddFirebaseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2241 gensupport.SetOptions(c.urlParams_, opts...)
2242 res, err := c.doRequest("json")
2243 if res != nil && res.StatusCode == http.StatusNotModified {
2244 if res.Body != nil {
2245 res.Body.Close()
2246 }
2247 return nil, gensupport.WrapError(&googleapi.Error{
2248 Code: res.StatusCode,
2249 Header: res.Header,
2250 })
2251 }
2252 if err != nil {
2253 return nil, err
2254 }
2255 defer googleapi.CloseBody(res)
2256 if err := googleapi.CheckResponse(res); err != nil {
2257 return nil, gensupport.WrapError(err)
2258 }
2259 ret := &Operation{
2260 ServerResponse: googleapi.ServerResponse{
2261 Header: res.Header,
2262 HTTPStatusCode: res.StatusCode,
2263 },
2264 }
2265 target := &ret
2266 if err := gensupport.DecodeResponse(target, res); err != nil {
2267 return nil, err
2268 }
2269 return ret, nil
2270 }
2271
2272 type ProjectsAddGoogleAnalyticsCall struct {
2273 s *Service
2274 parent string
2275 addgoogleanalyticsrequest *AddGoogleAnalyticsRequest
2276 urlParams_ gensupport.URLParams
2277 ctx_ context.Context
2278 header_ http.Header
2279 }
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322 func (r *ProjectsService) AddGoogleAnalytics(parent string, addgoogleanalyticsrequest *AddGoogleAnalyticsRequest) *ProjectsAddGoogleAnalyticsCall {
2323 c := &ProjectsAddGoogleAnalyticsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2324 c.parent = parent
2325 c.addgoogleanalyticsrequest = addgoogleanalyticsrequest
2326 return c
2327 }
2328
2329
2330
2331
2332 func (c *ProjectsAddGoogleAnalyticsCall) Fields(s ...googleapi.Field) *ProjectsAddGoogleAnalyticsCall {
2333 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2334 return c
2335 }
2336
2337
2338 func (c *ProjectsAddGoogleAnalyticsCall) Context(ctx context.Context) *ProjectsAddGoogleAnalyticsCall {
2339 c.ctx_ = ctx
2340 return c
2341 }
2342
2343
2344
2345 func (c *ProjectsAddGoogleAnalyticsCall) Header() http.Header {
2346 if c.header_ == nil {
2347 c.header_ = make(http.Header)
2348 }
2349 return c.header_
2350 }
2351
2352 func (c *ProjectsAddGoogleAnalyticsCall) doRequest(alt string) (*http.Response, error) {
2353 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2354 var body io.Reader = nil
2355 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addgoogleanalyticsrequest)
2356 if err != nil {
2357 return nil, err
2358 }
2359 c.urlParams_.Set("alt", alt)
2360 c.urlParams_.Set("prettyPrint", "false")
2361 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:addGoogleAnalytics")
2362 urls += "?" + c.urlParams_.Encode()
2363 req, err := http.NewRequest("POST", urls, body)
2364 if err != nil {
2365 return nil, err
2366 }
2367 req.Header = reqHeaders
2368 googleapi.Expand(req.URL, map[string]string{
2369 "parent": c.parent,
2370 })
2371 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2372 }
2373
2374
2375
2376
2377
2378
2379 func (c *ProjectsAddGoogleAnalyticsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2380 gensupport.SetOptions(c.urlParams_, opts...)
2381 res, err := c.doRequest("json")
2382 if res != nil && res.StatusCode == http.StatusNotModified {
2383 if res.Body != nil {
2384 res.Body.Close()
2385 }
2386 return nil, gensupport.WrapError(&googleapi.Error{
2387 Code: res.StatusCode,
2388 Header: res.Header,
2389 })
2390 }
2391 if err != nil {
2392 return nil, err
2393 }
2394 defer googleapi.CloseBody(res)
2395 if err := googleapi.CheckResponse(res); err != nil {
2396 return nil, gensupport.WrapError(err)
2397 }
2398 ret := &Operation{
2399 ServerResponse: googleapi.ServerResponse{
2400 Header: res.Header,
2401 HTTPStatusCode: res.StatusCode,
2402 },
2403 }
2404 target := &ret
2405 if err := gensupport.DecodeResponse(target, res); err != nil {
2406 return nil, err
2407 }
2408 return ret, nil
2409 }
2410
2411 type ProjectsGetCall struct {
2412 s *Service
2413 name string
2414 urlParams_ gensupport.URLParams
2415 ifNoneMatch_ string
2416 ctx_ context.Context
2417 header_ http.Header
2418 }
2419
2420
2421
2422
2423
2424
2425
2426 func (r *ProjectsService) Get(name string) *ProjectsGetCall {
2427 c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2428 c.name = name
2429 return c
2430 }
2431
2432
2433
2434
2435 func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
2436 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2437 return c
2438 }
2439
2440
2441
2442
2443 func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
2444 c.ifNoneMatch_ = entityTag
2445 return c
2446 }
2447
2448
2449 func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
2450 c.ctx_ = ctx
2451 return c
2452 }
2453
2454
2455
2456 func (c *ProjectsGetCall) Header() http.Header {
2457 if c.header_ == nil {
2458 c.header_ = make(http.Header)
2459 }
2460 return c.header_
2461 }
2462
2463 func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
2464 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2465 if c.ifNoneMatch_ != "" {
2466 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2467 }
2468 var body io.Reader = nil
2469 c.urlParams_.Set("alt", alt)
2470 c.urlParams_.Set("prettyPrint", "false")
2471 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2472 urls += "?" + c.urlParams_.Encode()
2473 req, err := http.NewRequest("GET", urls, body)
2474 if err != nil {
2475 return nil, err
2476 }
2477 req.Header = reqHeaders
2478 googleapi.Expand(req.URL, map[string]string{
2479 "name": c.name,
2480 })
2481 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2482 }
2483
2484
2485
2486
2487
2488
2489
2490 func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*FirebaseProject, error) {
2491 gensupport.SetOptions(c.urlParams_, opts...)
2492 res, err := c.doRequest("json")
2493 if res != nil && res.StatusCode == http.StatusNotModified {
2494 if res.Body != nil {
2495 res.Body.Close()
2496 }
2497 return nil, gensupport.WrapError(&googleapi.Error{
2498 Code: res.StatusCode,
2499 Header: res.Header,
2500 })
2501 }
2502 if err != nil {
2503 return nil, err
2504 }
2505 defer googleapi.CloseBody(res)
2506 if err := googleapi.CheckResponse(res); err != nil {
2507 return nil, gensupport.WrapError(err)
2508 }
2509 ret := &FirebaseProject{
2510 ServerResponse: googleapi.ServerResponse{
2511 Header: res.Header,
2512 HTTPStatusCode: res.StatusCode,
2513 },
2514 }
2515 target := &ret
2516 if err := gensupport.DecodeResponse(target, res); err != nil {
2517 return nil, err
2518 }
2519 return ret, nil
2520 }
2521
2522 type ProjectsGetAdminSdkConfigCall struct {
2523 s *Service
2524 name string
2525 urlParams_ gensupport.URLParams
2526 ifNoneMatch_ string
2527 ctx_ context.Context
2528 header_ http.Header
2529 }
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541 func (r *ProjectsService) GetAdminSdkConfig(name string) *ProjectsGetAdminSdkConfigCall {
2542 c := &ProjectsGetAdminSdkConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2543 c.name = name
2544 return c
2545 }
2546
2547
2548
2549
2550 func (c *ProjectsGetAdminSdkConfigCall) Fields(s ...googleapi.Field) *ProjectsGetAdminSdkConfigCall {
2551 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2552 return c
2553 }
2554
2555
2556
2557
2558 func (c *ProjectsGetAdminSdkConfigCall) IfNoneMatch(entityTag string) *ProjectsGetAdminSdkConfigCall {
2559 c.ifNoneMatch_ = entityTag
2560 return c
2561 }
2562
2563
2564 func (c *ProjectsGetAdminSdkConfigCall) Context(ctx context.Context) *ProjectsGetAdminSdkConfigCall {
2565 c.ctx_ = ctx
2566 return c
2567 }
2568
2569
2570
2571 func (c *ProjectsGetAdminSdkConfigCall) Header() http.Header {
2572 if c.header_ == nil {
2573 c.header_ = make(http.Header)
2574 }
2575 return c.header_
2576 }
2577
2578 func (c *ProjectsGetAdminSdkConfigCall) doRequest(alt string) (*http.Response, error) {
2579 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2580 if c.ifNoneMatch_ != "" {
2581 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2582 }
2583 var body io.Reader = nil
2584 c.urlParams_.Set("alt", alt)
2585 c.urlParams_.Set("prettyPrint", "false")
2586 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2587 urls += "?" + c.urlParams_.Encode()
2588 req, err := http.NewRequest("GET", urls, body)
2589 if err != nil {
2590 return nil, err
2591 }
2592 req.Header = reqHeaders
2593 googleapi.Expand(req.URL, map[string]string{
2594 "name": c.name,
2595 })
2596 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2597 }
2598
2599
2600
2601
2602
2603
2604 func (c *ProjectsGetAdminSdkConfigCall) Do(opts ...googleapi.CallOption) (*AdminSdkConfig, error) {
2605 gensupport.SetOptions(c.urlParams_, opts...)
2606 res, err := c.doRequest("json")
2607 if res != nil && res.StatusCode == http.StatusNotModified {
2608 if res.Body != nil {
2609 res.Body.Close()
2610 }
2611 return nil, gensupport.WrapError(&googleapi.Error{
2612 Code: res.StatusCode,
2613 Header: res.Header,
2614 })
2615 }
2616 if err != nil {
2617 return nil, err
2618 }
2619 defer googleapi.CloseBody(res)
2620 if err := googleapi.CheckResponse(res); err != nil {
2621 return nil, gensupport.WrapError(err)
2622 }
2623 ret := &AdminSdkConfig{
2624 ServerResponse: googleapi.ServerResponse{
2625 Header: res.Header,
2626 HTTPStatusCode: res.StatusCode,
2627 },
2628 }
2629 target := &ret
2630 if err := gensupport.DecodeResponse(target, res); err != nil {
2631 return nil, err
2632 }
2633 return ret, nil
2634 }
2635
2636 type ProjectsGetAnalyticsDetailsCall struct {
2637 s *Service
2638 name string
2639 urlParams_ gensupport.URLParams
2640 ifNoneMatch_ string
2641 ctx_ context.Context
2642 header_ http.Header
2643 }
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654 func (r *ProjectsService) GetAnalyticsDetails(name string) *ProjectsGetAnalyticsDetailsCall {
2655 c := &ProjectsGetAnalyticsDetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2656 c.name = name
2657 return c
2658 }
2659
2660
2661
2662
2663 func (c *ProjectsGetAnalyticsDetailsCall) Fields(s ...googleapi.Field) *ProjectsGetAnalyticsDetailsCall {
2664 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2665 return c
2666 }
2667
2668
2669
2670
2671 func (c *ProjectsGetAnalyticsDetailsCall) IfNoneMatch(entityTag string) *ProjectsGetAnalyticsDetailsCall {
2672 c.ifNoneMatch_ = entityTag
2673 return c
2674 }
2675
2676
2677 func (c *ProjectsGetAnalyticsDetailsCall) Context(ctx context.Context) *ProjectsGetAnalyticsDetailsCall {
2678 c.ctx_ = ctx
2679 return c
2680 }
2681
2682
2683
2684 func (c *ProjectsGetAnalyticsDetailsCall) Header() http.Header {
2685 if c.header_ == nil {
2686 c.header_ = make(http.Header)
2687 }
2688 return c.header_
2689 }
2690
2691 func (c *ProjectsGetAnalyticsDetailsCall) doRequest(alt string) (*http.Response, error) {
2692 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2693 if c.ifNoneMatch_ != "" {
2694 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2695 }
2696 var body io.Reader = nil
2697 c.urlParams_.Set("alt", alt)
2698 c.urlParams_.Set("prettyPrint", "false")
2699 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2700 urls += "?" + c.urlParams_.Encode()
2701 req, err := http.NewRequest("GET", urls, body)
2702 if err != nil {
2703 return nil, err
2704 }
2705 req.Header = reqHeaders
2706 googleapi.Expand(req.URL, map[string]string{
2707 "name": c.name,
2708 })
2709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2710 }
2711
2712
2713
2714
2715
2716
2717
2718 func (c *ProjectsGetAnalyticsDetailsCall) Do(opts ...googleapi.CallOption) (*AnalyticsDetails, error) {
2719 gensupport.SetOptions(c.urlParams_, opts...)
2720 res, err := c.doRequest("json")
2721 if res != nil && res.StatusCode == http.StatusNotModified {
2722 if res.Body != nil {
2723 res.Body.Close()
2724 }
2725 return nil, gensupport.WrapError(&googleapi.Error{
2726 Code: res.StatusCode,
2727 Header: res.Header,
2728 })
2729 }
2730 if err != nil {
2731 return nil, err
2732 }
2733 defer googleapi.CloseBody(res)
2734 if err := googleapi.CheckResponse(res); err != nil {
2735 return nil, gensupport.WrapError(err)
2736 }
2737 ret := &AnalyticsDetails{
2738 ServerResponse: googleapi.ServerResponse{
2739 Header: res.Header,
2740 HTTPStatusCode: res.StatusCode,
2741 },
2742 }
2743 target := &ret
2744 if err := gensupport.DecodeResponse(target, res); err != nil {
2745 return nil, err
2746 }
2747 return ret, nil
2748 }
2749
2750 type ProjectsListCall struct {
2751 s *Service
2752 urlParams_ gensupport.URLParams
2753 ifNoneMatch_ string
2754 ctx_ context.Context
2755 header_ http.Header
2756 }
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766 func (r *ProjectsService) List() *ProjectsListCall {
2767 c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2768 return c
2769 }
2770
2771
2772
2773
2774
2775
2776 func (c *ProjectsListCall) PageSize(pageSize int64) *ProjectsListCall {
2777 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2778 return c
2779 }
2780
2781
2782
2783
2784 func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
2785 c.urlParams_.Set("pageToken", pageToken)
2786 return c
2787 }
2788
2789
2790
2791
2792 func (c *ProjectsListCall) ShowDeleted(showDeleted bool) *ProjectsListCall {
2793 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
2794 return c
2795 }
2796
2797
2798
2799
2800 func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
2801 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2802 return c
2803 }
2804
2805
2806
2807
2808 func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
2809 c.ifNoneMatch_ = entityTag
2810 return c
2811 }
2812
2813
2814 func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
2815 c.ctx_ = ctx
2816 return c
2817 }
2818
2819
2820
2821 func (c *ProjectsListCall) Header() http.Header {
2822 if c.header_ == nil {
2823 c.header_ = make(http.Header)
2824 }
2825 return c.header_
2826 }
2827
2828 func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
2829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2830 if c.ifNoneMatch_ != "" {
2831 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2832 }
2833 var body io.Reader = nil
2834 c.urlParams_.Set("alt", alt)
2835 c.urlParams_.Set("prettyPrint", "false")
2836 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/projects")
2837 urls += "?" + c.urlParams_.Encode()
2838 req, err := http.NewRequest("GET", urls, body)
2839 if err != nil {
2840 return nil, err
2841 }
2842 req.Header = reqHeaders
2843 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2844 }
2845
2846
2847
2848
2849
2850
2851
2852 func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ListFirebaseProjectsResponse, error) {
2853 gensupport.SetOptions(c.urlParams_, opts...)
2854 res, err := c.doRequest("json")
2855 if res != nil && res.StatusCode == http.StatusNotModified {
2856 if res.Body != nil {
2857 res.Body.Close()
2858 }
2859 return nil, gensupport.WrapError(&googleapi.Error{
2860 Code: res.StatusCode,
2861 Header: res.Header,
2862 })
2863 }
2864 if err != nil {
2865 return nil, err
2866 }
2867 defer googleapi.CloseBody(res)
2868 if err := googleapi.CheckResponse(res); err != nil {
2869 return nil, gensupport.WrapError(err)
2870 }
2871 ret := &ListFirebaseProjectsResponse{
2872 ServerResponse: googleapi.ServerResponse{
2873 Header: res.Header,
2874 HTTPStatusCode: res.StatusCode,
2875 },
2876 }
2877 target := &ret
2878 if err := gensupport.DecodeResponse(target, res); err != nil {
2879 return nil, err
2880 }
2881 return ret, nil
2882 }
2883
2884
2885
2886
2887 func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ListFirebaseProjectsResponse) error) error {
2888 c.ctx_ = ctx
2889 defer c.PageToken(c.urlParams_.Get("pageToken"))
2890 for {
2891 x, err := c.Do()
2892 if err != nil {
2893 return err
2894 }
2895 if err := f(x); err != nil {
2896 return err
2897 }
2898 if x.NextPageToken == "" {
2899 return nil
2900 }
2901 c.PageToken(x.NextPageToken)
2902 }
2903 }
2904
2905 type ProjectsPatchCall struct {
2906 s *Service
2907 nameid string
2908 firebaseproject *FirebaseProject
2909 urlParams_ gensupport.URLParams
2910 ctx_ context.Context
2911 header_ http.Header
2912 }
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925 func (r *ProjectsService) Patch(nameid string, firebaseproject *FirebaseProject) *ProjectsPatchCall {
2926 c := &ProjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2927 c.nameid = nameid
2928 c.firebaseproject = firebaseproject
2929 return c
2930 }
2931
2932
2933
2934
2935
2936
2937
2938
2939 func (c *ProjectsPatchCall) UpdateMask(updateMask string) *ProjectsPatchCall {
2940 c.urlParams_.Set("updateMask", updateMask)
2941 return c
2942 }
2943
2944
2945
2946
2947 func (c *ProjectsPatchCall) Fields(s ...googleapi.Field) *ProjectsPatchCall {
2948 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2949 return c
2950 }
2951
2952
2953 func (c *ProjectsPatchCall) Context(ctx context.Context) *ProjectsPatchCall {
2954 c.ctx_ = ctx
2955 return c
2956 }
2957
2958
2959
2960 func (c *ProjectsPatchCall) Header() http.Header {
2961 if c.header_ == nil {
2962 c.header_ = make(http.Header)
2963 }
2964 return c.header_
2965 }
2966
2967 func (c *ProjectsPatchCall) doRequest(alt string) (*http.Response, error) {
2968 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2969 var body io.Reader = nil
2970 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firebaseproject)
2971 if err != nil {
2972 return nil, err
2973 }
2974 c.urlParams_.Set("alt", alt)
2975 c.urlParams_.Set("prettyPrint", "false")
2976 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
2977 urls += "?" + c.urlParams_.Encode()
2978 req, err := http.NewRequest("PATCH", urls, body)
2979 if err != nil {
2980 return nil, err
2981 }
2982 req.Header = reqHeaders
2983 googleapi.Expand(req.URL, map[string]string{
2984 "name": c.nameid,
2985 })
2986 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2987 }
2988
2989
2990
2991
2992
2993
2994
2995 func (c *ProjectsPatchCall) Do(opts ...googleapi.CallOption) (*FirebaseProject, error) {
2996 gensupport.SetOptions(c.urlParams_, opts...)
2997 res, err := c.doRequest("json")
2998 if res != nil && res.StatusCode == http.StatusNotModified {
2999 if res.Body != nil {
3000 res.Body.Close()
3001 }
3002 return nil, gensupport.WrapError(&googleapi.Error{
3003 Code: res.StatusCode,
3004 Header: res.Header,
3005 })
3006 }
3007 if err != nil {
3008 return nil, err
3009 }
3010 defer googleapi.CloseBody(res)
3011 if err := googleapi.CheckResponse(res); err != nil {
3012 return nil, gensupport.WrapError(err)
3013 }
3014 ret := &FirebaseProject{
3015 ServerResponse: googleapi.ServerResponse{
3016 Header: res.Header,
3017 HTTPStatusCode: res.StatusCode,
3018 },
3019 }
3020 target := &ret
3021 if err := gensupport.DecodeResponse(target, res); err != nil {
3022 return nil, err
3023 }
3024 return ret, nil
3025 }
3026
3027 type ProjectsRemoveAnalyticsCall struct {
3028 s *Service
3029 parent string
3030 removeanalyticsrequest *RemoveAnalyticsRequest
3031 urlParams_ gensupport.URLParams
3032 ctx_ context.Context
3033 header_ http.Header
3034 }
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052 func (r *ProjectsService) RemoveAnalytics(parent string, removeanalyticsrequest *RemoveAnalyticsRequest) *ProjectsRemoveAnalyticsCall {
3053 c := &ProjectsRemoveAnalyticsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3054 c.parent = parent
3055 c.removeanalyticsrequest = removeanalyticsrequest
3056 return c
3057 }
3058
3059
3060
3061
3062 func (c *ProjectsRemoveAnalyticsCall) Fields(s ...googleapi.Field) *ProjectsRemoveAnalyticsCall {
3063 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3064 return c
3065 }
3066
3067
3068 func (c *ProjectsRemoveAnalyticsCall) Context(ctx context.Context) *ProjectsRemoveAnalyticsCall {
3069 c.ctx_ = ctx
3070 return c
3071 }
3072
3073
3074
3075 func (c *ProjectsRemoveAnalyticsCall) Header() http.Header {
3076 if c.header_ == nil {
3077 c.header_ = make(http.Header)
3078 }
3079 return c.header_
3080 }
3081
3082 func (c *ProjectsRemoveAnalyticsCall) doRequest(alt string) (*http.Response, error) {
3083 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3084 var body io.Reader = nil
3085 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeanalyticsrequest)
3086 if err != nil {
3087 return nil, err
3088 }
3089 c.urlParams_.Set("alt", alt)
3090 c.urlParams_.Set("prettyPrint", "false")
3091 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:removeAnalytics")
3092 urls += "?" + c.urlParams_.Encode()
3093 req, err := http.NewRequest("POST", urls, body)
3094 if err != nil {
3095 return nil, err
3096 }
3097 req.Header = reqHeaders
3098 googleapi.Expand(req.URL, map[string]string{
3099 "parent": c.parent,
3100 })
3101 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3102 }
3103
3104
3105
3106
3107
3108
3109 func (c *ProjectsRemoveAnalyticsCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3110 gensupport.SetOptions(c.urlParams_, opts...)
3111 res, err := c.doRequest("json")
3112 if res != nil && res.StatusCode == http.StatusNotModified {
3113 if res.Body != nil {
3114 res.Body.Close()
3115 }
3116 return nil, gensupport.WrapError(&googleapi.Error{
3117 Code: res.StatusCode,
3118 Header: res.Header,
3119 })
3120 }
3121 if err != nil {
3122 return nil, err
3123 }
3124 defer googleapi.CloseBody(res)
3125 if err := googleapi.CheckResponse(res); err != nil {
3126 return nil, gensupport.WrapError(err)
3127 }
3128 ret := &Empty{
3129 ServerResponse: googleapi.ServerResponse{
3130 Header: res.Header,
3131 HTTPStatusCode: res.StatusCode,
3132 },
3133 }
3134 target := &ret
3135 if err := gensupport.DecodeResponse(target, res); err != nil {
3136 return nil, err
3137 }
3138 return ret, nil
3139 }
3140
3141 type ProjectsSearchAppsCall struct {
3142 s *Service
3143 parent string
3144 urlParams_ gensupport.URLParams
3145 ifNoneMatch_ string
3146 ctx_ context.Context
3147 header_ http.Header
3148 }
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159 func (r *ProjectsService) SearchApps(parent string) *ProjectsSearchAppsCall {
3160 c := &ProjectsSearchAppsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3161 c.parent = parent
3162 return c
3163 }
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186 func (c *ProjectsSearchAppsCall) Filter(filter string) *ProjectsSearchAppsCall {
3187 c.urlParams_.Set("filter", filter)
3188 return c
3189 }
3190
3191
3192
3193
3194
3195
3196 func (c *ProjectsSearchAppsCall) PageSize(pageSize int64) *ProjectsSearchAppsCall {
3197 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3198 return c
3199 }
3200
3201
3202
3203
3204 func (c *ProjectsSearchAppsCall) PageToken(pageToken string) *ProjectsSearchAppsCall {
3205 c.urlParams_.Set("pageToken", pageToken)
3206 return c
3207 }
3208
3209
3210
3211
3212 func (c *ProjectsSearchAppsCall) ShowDeleted(showDeleted bool) *ProjectsSearchAppsCall {
3213 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
3214 return c
3215 }
3216
3217
3218
3219
3220 func (c *ProjectsSearchAppsCall) Fields(s ...googleapi.Field) *ProjectsSearchAppsCall {
3221 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3222 return c
3223 }
3224
3225
3226
3227
3228 func (c *ProjectsSearchAppsCall) IfNoneMatch(entityTag string) *ProjectsSearchAppsCall {
3229 c.ifNoneMatch_ = entityTag
3230 return c
3231 }
3232
3233
3234 func (c *ProjectsSearchAppsCall) Context(ctx context.Context) *ProjectsSearchAppsCall {
3235 c.ctx_ = ctx
3236 return c
3237 }
3238
3239
3240
3241 func (c *ProjectsSearchAppsCall) Header() http.Header {
3242 if c.header_ == nil {
3243 c.header_ = make(http.Header)
3244 }
3245 return c.header_
3246 }
3247
3248 func (c *ProjectsSearchAppsCall) doRequest(alt string) (*http.Response, error) {
3249 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3250 if c.ifNoneMatch_ != "" {
3251 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3252 }
3253 var body io.Reader = nil
3254 c.urlParams_.Set("alt", alt)
3255 c.urlParams_.Set("prettyPrint", "false")
3256 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:searchApps")
3257 urls += "?" + c.urlParams_.Encode()
3258 req, err := http.NewRequest("GET", urls, body)
3259 if err != nil {
3260 return nil, err
3261 }
3262 req.Header = reqHeaders
3263 googleapi.Expand(req.URL, map[string]string{
3264 "parent": c.parent,
3265 })
3266 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3267 }
3268
3269
3270
3271
3272
3273
3274
3275 func (c *ProjectsSearchAppsCall) Do(opts ...googleapi.CallOption) (*SearchFirebaseAppsResponse, error) {
3276 gensupport.SetOptions(c.urlParams_, opts...)
3277 res, err := c.doRequest("json")
3278 if res != nil && res.StatusCode == http.StatusNotModified {
3279 if res.Body != nil {
3280 res.Body.Close()
3281 }
3282 return nil, gensupport.WrapError(&googleapi.Error{
3283 Code: res.StatusCode,
3284 Header: res.Header,
3285 })
3286 }
3287 if err != nil {
3288 return nil, err
3289 }
3290 defer googleapi.CloseBody(res)
3291 if err := googleapi.CheckResponse(res); err != nil {
3292 return nil, gensupport.WrapError(err)
3293 }
3294 ret := &SearchFirebaseAppsResponse{
3295 ServerResponse: googleapi.ServerResponse{
3296 Header: res.Header,
3297 HTTPStatusCode: res.StatusCode,
3298 },
3299 }
3300 target := &ret
3301 if err := gensupport.DecodeResponse(target, res); err != nil {
3302 return nil, err
3303 }
3304 return ret, nil
3305 }
3306
3307
3308
3309
3310 func (c *ProjectsSearchAppsCall) Pages(ctx context.Context, f func(*SearchFirebaseAppsResponse) error) error {
3311 c.ctx_ = ctx
3312 defer c.PageToken(c.urlParams_.Get("pageToken"))
3313 for {
3314 x, err := c.Do()
3315 if err != nil {
3316 return err
3317 }
3318 if err := f(x); err != nil {
3319 return err
3320 }
3321 if x.NextPageToken == "" {
3322 return nil
3323 }
3324 c.PageToken(x.NextPageToken)
3325 }
3326 }
3327
3328 type ProjectsAndroidAppsCreateCall struct {
3329 s *Service
3330 parent string
3331 androidapp *AndroidApp
3332 urlParams_ gensupport.URLParams
3333 ctx_ context.Context
3334 header_ http.Header
3335 }
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347 func (r *ProjectsAndroidAppsService) Create(parent string, androidapp *AndroidApp) *ProjectsAndroidAppsCreateCall {
3348 c := &ProjectsAndroidAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3349 c.parent = parent
3350 c.androidapp = androidapp
3351 return c
3352 }
3353
3354
3355
3356
3357 func (c *ProjectsAndroidAppsCreateCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsCreateCall {
3358 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3359 return c
3360 }
3361
3362
3363 func (c *ProjectsAndroidAppsCreateCall) Context(ctx context.Context) *ProjectsAndroidAppsCreateCall {
3364 c.ctx_ = ctx
3365 return c
3366 }
3367
3368
3369
3370 func (c *ProjectsAndroidAppsCreateCall) Header() http.Header {
3371 if c.header_ == nil {
3372 c.header_ = make(http.Header)
3373 }
3374 return c.header_
3375 }
3376
3377 func (c *ProjectsAndroidAppsCreateCall) doRequest(alt string) (*http.Response, error) {
3378 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3379 var body io.Reader = nil
3380 body, err := googleapi.WithoutDataWrapper.JSONReader(c.androidapp)
3381 if err != nil {
3382 return nil, err
3383 }
3384 c.urlParams_.Set("alt", alt)
3385 c.urlParams_.Set("prettyPrint", "false")
3386 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/androidApps")
3387 urls += "?" + c.urlParams_.Encode()
3388 req, err := http.NewRequest("POST", urls, body)
3389 if err != nil {
3390 return nil, err
3391 }
3392 req.Header = reqHeaders
3393 googleapi.Expand(req.URL, map[string]string{
3394 "parent": c.parent,
3395 })
3396 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3397 }
3398
3399
3400
3401
3402
3403
3404 func (c *ProjectsAndroidAppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3405 gensupport.SetOptions(c.urlParams_, opts...)
3406 res, err := c.doRequest("json")
3407 if res != nil && res.StatusCode == http.StatusNotModified {
3408 if res.Body != nil {
3409 res.Body.Close()
3410 }
3411 return nil, gensupport.WrapError(&googleapi.Error{
3412 Code: res.StatusCode,
3413 Header: res.Header,
3414 })
3415 }
3416 if err != nil {
3417 return nil, err
3418 }
3419 defer googleapi.CloseBody(res)
3420 if err := googleapi.CheckResponse(res); err != nil {
3421 return nil, gensupport.WrapError(err)
3422 }
3423 ret := &Operation{
3424 ServerResponse: googleapi.ServerResponse{
3425 Header: res.Header,
3426 HTTPStatusCode: res.StatusCode,
3427 },
3428 }
3429 target := &ret
3430 if err := gensupport.DecodeResponse(target, res); err != nil {
3431 return nil, err
3432 }
3433 return ret, nil
3434 }
3435
3436 type ProjectsAndroidAppsGetCall struct {
3437 s *Service
3438 nameid string
3439 urlParams_ gensupport.URLParams
3440 ifNoneMatch_ string
3441 ctx_ context.Context
3442 header_ http.Header
3443 }
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453 func (r *ProjectsAndroidAppsService) Get(nameid string) *ProjectsAndroidAppsGetCall {
3454 c := &ProjectsAndroidAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3455 c.nameid = nameid
3456 return c
3457 }
3458
3459
3460
3461
3462 func (c *ProjectsAndroidAppsGetCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsGetCall {
3463 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3464 return c
3465 }
3466
3467
3468
3469
3470 func (c *ProjectsAndroidAppsGetCall) IfNoneMatch(entityTag string) *ProjectsAndroidAppsGetCall {
3471 c.ifNoneMatch_ = entityTag
3472 return c
3473 }
3474
3475
3476 func (c *ProjectsAndroidAppsGetCall) Context(ctx context.Context) *ProjectsAndroidAppsGetCall {
3477 c.ctx_ = ctx
3478 return c
3479 }
3480
3481
3482
3483 func (c *ProjectsAndroidAppsGetCall) Header() http.Header {
3484 if c.header_ == nil {
3485 c.header_ = make(http.Header)
3486 }
3487 return c.header_
3488 }
3489
3490 func (c *ProjectsAndroidAppsGetCall) doRequest(alt string) (*http.Response, error) {
3491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3492 if c.ifNoneMatch_ != "" {
3493 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3494 }
3495 var body io.Reader = nil
3496 c.urlParams_.Set("alt", alt)
3497 c.urlParams_.Set("prettyPrint", "false")
3498 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3499 urls += "?" + c.urlParams_.Encode()
3500 req, err := http.NewRequest("GET", urls, body)
3501 if err != nil {
3502 return nil, err
3503 }
3504 req.Header = reqHeaders
3505 googleapi.Expand(req.URL, map[string]string{
3506 "name": c.nameid,
3507 })
3508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3509 }
3510
3511
3512
3513
3514
3515
3516 func (c *ProjectsAndroidAppsGetCall) Do(opts ...googleapi.CallOption) (*AndroidApp, error) {
3517 gensupport.SetOptions(c.urlParams_, opts...)
3518 res, err := c.doRequest("json")
3519 if res != nil && res.StatusCode == http.StatusNotModified {
3520 if res.Body != nil {
3521 res.Body.Close()
3522 }
3523 return nil, gensupport.WrapError(&googleapi.Error{
3524 Code: res.StatusCode,
3525 Header: res.Header,
3526 })
3527 }
3528 if err != nil {
3529 return nil, err
3530 }
3531 defer googleapi.CloseBody(res)
3532 if err := googleapi.CheckResponse(res); err != nil {
3533 return nil, gensupport.WrapError(err)
3534 }
3535 ret := &AndroidApp{
3536 ServerResponse: googleapi.ServerResponse{
3537 Header: res.Header,
3538 HTTPStatusCode: res.StatusCode,
3539 },
3540 }
3541 target := &ret
3542 if err := gensupport.DecodeResponse(target, res); err != nil {
3543 return nil, err
3544 }
3545 return ret, nil
3546 }
3547
3548 type ProjectsAndroidAppsGetConfigCall struct {
3549 s *Service
3550 nameid string
3551 urlParams_ gensupport.URLParams
3552 ifNoneMatch_ string
3553 ctx_ context.Context
3554 header_ http.Header
3555 }
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567 func (r *ProjectsAndroidAppsService) GetConfig(nameid string) *ProjectsAndroidAppsGetConfigCall {
3568 c := &ProjectsAndroidAppsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3569 c.nameid = nameid
3570 return c
3571 }
3572
3573
3574
3575
3576 func (c *ProjectsAndroidAppsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsGetConfigCall {
3577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3578 return c
3579 }
3580
3581
3582
3583
3584 func (c *ProjectsAndroidAppsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsAndroidAppsGetConfigCall {
3585 c.ifNoneMatch_ = entityTag
3586 return c
3587 }
3588
3589
3590 func (c *ProjectsAndroidAppsGetConfigCall) Context(ctx context.Context) *ProjectsAndroidAppsGetConfigCall {
3591 c.ctx_ = ctx
3592 return c
3593 }
3594
3595
3596
3597 func (c *ProjectsAndroidAppsGetConfigCall) Header() http.Header {
3598 if c.header_ == nil {
3599 c.header_ = make(http.Header)
3600 }
3601 return c.header_
3602 }
3603
3604 func (c *ProjectsAndroidAppsGetConfigCall) doRequest(alt string) (*http.Response, error) {
3605 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3606 if c.ifNoneMatch_ != "" {
3607 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3608 }
3609 var body io.Reader = nil
3610 c.urlParams_.Set("alt", alt)
3611 c.urlParams_.Set("prettyPrint", "false")
3612 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3613 urls += "?" + c.urlParams_.Encode()
3614 req, err := http.NewRequest("GET", urls, body)
3615 if err != nil {
3616 return nil, err
3617 }
3618 req.Header = reqHeaders
3619 googleapi.Expand(req.URL, map[string]string{
3620 "name": c.nameid,
3621 })
3622 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3623 }
3624
3625
3626
3627
3628
3629
3630
3631 func (c *ProjectsAndroidAppsGetConfigCall) Do(opts ...googleapi.CallOption) (*AndroidAppConfig, error) {
3632 gensupport.SetOptions(c.urlParams_, opts...)
3633 res, err := c.doRequest("json")
3634 if res != nil && res.StatusCode == http.StatusNotModified {
3635 if res.Body != nil {
3636 res.Body.Close()
3637 }
3638 return nil, gensupport.WrapError(&googleapi.Error{
3639 Code: res.StatusCode,
3640 Header: res.Header,
3641 })
3642 }
3643 if err != nil {
3644 return nil, err
3645 }
3646 defer googleapi.CloseBody(res)
3647 if err := googleapi.CheckResponse(res); err != nil {
3648 return nil, gensupport.WrapError(err)
3649 }
3650 ret := &AndroidAppConfig{
3651 ServerResponse: googleapi.ServerResponse{
3652 Header: res.Header,
3653 HTTPStatusCode: res.StatusCode,
3654 },
3655 }
3656 target := &ret
3657 if err := gensupport.DecodeResponse(target, res); err != nil {
3658 return nil, err
3659 }
3660 return ret, nil
3661 }
3662
3663 type ProjectsAndroidAppsListCall struct {
3664 s *Service
3665 parent string
3666 urlParams_ gensupport.URLParams
3667 ifNoneMatch_ string
3668 ctx_ context.Context
3669 header_ http.Header
3670 }
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681 func (r *ProjectsAndroidAppsService) List(parent string) *ProjectsAndroidAppsListCall {
3682 c := &ProjectsAndroidAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3683 c.parent = parent
3684 return c
3685 }
3686
3687
3688
3689
3690
3691 func (c *ProjectsAndroidAppsListCall) PageSize(pageSize int64) *ProjectsAndroidAppsListCall {
3692 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3693 return c
3694 }
3695
3696
3697
3698
3699 func (c *ProjectsAndroidAppsListCall) PageToken(pageToken string) *ProjectsAndroidAppsListCall {
3700 c.urlParams_.Set("pageToken", pageToken)
3701 return c
3702 }
3703
3704
3705
3706
3707 func (c *ProjectsAndroidAppsListCall) ShowDeleted(showDeleted bool) *ProjectsAndroidAppsListCall {
3708 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
3709 return c
3710 }
3711
3712
3713
3714
3715 func (c *ProjectsAndroidAppsListCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsListCall {
3716 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3717 return c
3718 }
3719
3720
3721
3722
3723 func (c *ProjectsAndroidAppsListCall) IfNoneMatch(entityTag string) *ProjectsAndroidAppsListCall {
3724 c.ifNoneMatch_ = entityTag
3725 return c
3726 }
3727
3728
3729 func (c *ProjectsAndroidAppsListCall) Context(ctx context.Context) *ProjectsAndroidAppsListCall {
3730 c.ctx_ = ctx
3731 return c
3732 }
3733
3734
3735
3736 func (c *ProjectsAndroidAppsListCall) Header() http.Header {
3737 if c.header_ == nil {
3738 c.header_ = make(http.Header)
3739 }
3740 return c.header_
3741 }
3742
3743 func (c *ProjectsAndroidAppsListCall) doRequest(alt string) (*http.Response, error) {
3744 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3745 if c.ifNoneMatch_ != "" {
3746 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3747 }
3748 var body io.Reader = nil
3749 c.urlParams_.Set("alt", alt)
3750 c.urlParams_.Set("prettyPrint", "false")
3751 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/androidApps")
3752 urls += "?" + c.urlParams_.Encode()
3753 req, err := http.NewRequest("GET", urls, body)
3754 if err != nil {
3755 return nil, err
3756 }
3757 req.Header = reqHeaders
3758 googleapi.Expand(req.URL, map[string]string{
3759 "parent": c.parent,
3760 })
3761 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3762 }
3763
3764
3765
3766
3767
3768
3769
3770 func (c *ProjectsAndroidAppsListCall) Do(opts ...googleapi.CallOption) (*ListAndroidAppsResponse, error) {
3771 gensupport.SetOptions(c.urlParams_, opts...)
3772 res, err := c.doRequest("json")
3773 if res != nil && res.StatusCode == http.StatusNotModified {
3774 if res.Body != nil {
3775 res.Body.Close()
3776 }
3777 return nil, gensupport.WrapError(&googleapi.Error{
3778 Code: res.StatusCode,
3779 Header: res.Header,
3780 })
3781 }
3782 if err != nil {
3783 return nil, err
3784 }
3785 defer googleapi.CloseBody(res)
3786 if err := googleapi.CheckResponse(res); err != nil {
3787 return nil, gensupport.WrapError(err)
3788 }
3789 ret := &ListAndroidAppsResponse{
3790 ServerResponse: googleapi.ServerResponse{
3791 Header: res.Header,
3792 HTTPStatusCode: res.StatusCode,
3793 },
3794 }
3795 target := &ret
3796 if err := gensupport.DecodeResponse(target, res); err != nil {
3797 return nil, err
3798 }
3799 return ret, nil
3800 }
3801
3802
3803
3804
3805 func (c *ProjectsAndroidAppsListCall) Pages(ctx context.Context, f func(*ListAndroidAppsResponse) error) error {
3806 c.ctx_ = ctx
3807 defer c.PageToken(c.urlParams_.Get("pageToken"))
3808 for {
3809 x, err := c.Do()
3810 if err != nil {
3811 return err
3812 }
3813 if err := f(x); err != nil {
3814 return err
3815 }
3816 if x.NextPageToken == "" {
3817 return nil
3818 }
3819 c.PageToken(x.NextPageToken)
3820 }
3821 }
3822
3823 type ProjectsAndroidAppsPatchCall struct {
3824 s *Service
3825 nameid string
3826 androidapp *AndroidApp
3827 urlParams_ gensupport.URLParams
3828 ctx_ context.Context
3829 header_ http.Header
3830 }
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844 func (r *ProjectsAndroidAppsService) Patch(nameid string, androidapp *AndroidApp) *ProjectsAndroidAppsPatchCall {
3845 c := &ProjectsAndroidAppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3846 c.nameid = nameid
3847 c.androidapp = androidapp
3848 return c
3849 }
3850
3851
3852
3853
3854
3855 func (c *ProjectsAndroidAppsPatchCall) UpdateMask(updateMask string) *ProjectsAndroidAppsPatchCall {
3856 c.urlParams_.Set("updateMask", updateMask)
3857 return c
3858 }
3859
3860
3861
3862
3863 func (c *ProjectsAndroidAppsPatchCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsPatchCall {
3864 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3865 return c
3866 }
3867
3868
3869 func (c *ProjectsAndroidAppsPatchCall) Context(ctx context.Context) *ProjectsAndroidAppsPatchCall {
3870 c.ctx_ = ctx
3871 return c
3872 }
3873
3874
3875
3876 func (c *ProjectsAndroidAppsPatchCall) Header() http.Header {
3877 if c.header_ == nil {
3878 c.header_ = make(http.Header)
3879 }
3880 return c.header_
3881 }
3882
3883 func (c *ProjectsAndroidAppsPatchCall) doRequest(alt string) (*http.Response, error) {
3884 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3885 var body io.Reader = nil
3886 body, err := googleapi.WithoutDataWrapper.JSONReader(c.androidapp)
3887 if err != nil {
3888 return nil, err
3889 }
3890 c.urlParams_.Set("alt", alt)
3891 c.urlParams_.Set("prettyPrint", "false")
3892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
3893 urls += "?" + c.urlParams_.Encode()
3894 req, err := http.NewRequest("PATCH", urls, body)
3895 if err != nil {
3896 return nil, err
3897 }
3898 req.Header = reqHeaders
3899 googleapi.Expand(req.URL, map[string]string{
3900 "name": c.nameid,
3901 })
3902 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3903 }
3904
3905
3906
3907
3908
3909
3910 func (c *ProjectsAndroidAppsPatchCall) Do(opts ...googleapi.CallOption) (*AndroidApp, error) {
3911 gensupport.SetOptions(c.urlParams_, opts...)
3912 res, err := c.doRequest("json")
3913 if res != nil && res.StatusCode == http.StatusNotModified {
3914 if res.Body != nil {
3915 res.Body.Close()
3916 }
3917 return nil, gensupport.WrapError(&googleapi.Error{
3918 Code: res.StatusCode,
3919 Header: res.Header,
3920 })
3921 }
3922 if err != nil {
3923 return nil, err
3924 }
3925 defer googleapi.CloseBody(res)
3926 if err := googleapi.CheckResponse(res); err != nil {
3927 return nil, gensupport.WrapError(err)
3928 }
3929 ret := &AndroidApp{
3930 ServerResponse: googleapi.ServerResponse{
3931 Header: res.Header,
3932 HTTPStatusCode: res.StatusCode,
3933 },
3934 }
3935 target := &ret
3936 if err := gensupport.DecodeResponse(target, res); err != nil {
3937 return nil, err
3938 }
3939 return ret, nil
3940 }
3941
3942 type ProjectsAndroidAppsRemoveCall struct {
3943 s *Service
3944 nameid string
3945 removeandroidapprequest *RemoveAndroidAppRequest
3946 urlParams_ gensupport.URLParams
3947 ctx_ context.Context
3948 header_ http.Header
3949 }
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959 func (r *ProjectsAndroidAppsService) Remove(nameid string, removeandroidapprequest *RemoveAndroidAppRequest) *ProjectsAndroidAppsRemoveCall {
3960 c := &ProjectsAndroidAppsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3961 c.nameid = nameid
3962 c.removeandroidapprequest = removeandroidapprequest
3963 return c
3964 }
3965
3966
3967
3968
3969 func (c *ProjectsAndroidAppsRemoveCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsRemoveCall {
3970 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3971 return c
3972 }
3973
3974
3975 func (c *ProjectsAndroidAppsRemoveCall) Context(ctx context.Context) *ProjectsAndroidAppsRemoveCall {
3976 c.ctx_ = ctx
3977 return c
3978 }
3979
3980
3981
3982 func (c *ProjectsAndroidAppsRemoveCall) Header() http.Header {
3983 if c.header_ == nil {
3984 c.header_ = make(http.Header)
3985 }
3986 return c.header_
3987 }
3988
3989 func (c *ProjectsAndroidAppsRemoveCall) doRequest(alt string) (*http.Response, error) {
3990 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3991 var body io.Reader = nil
3992 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeandroidapprequest)
3993 if err != nil {
3994 return nil, err
3995 }
3996 c.urlParams_.Set("alt", alt)
3997 c.urlParams_.Set("prettyPrint", "false")
3998 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:remove")
3999 urls += "?" + c.urlParams_.Encode()
4000 req, err := http.NewRequest("POST", urls, body)
4001 if err != nil {
4002 return nil, err
4003 }
4004 req.Header = reqHeaders
4005 googleapi.Expand(req.URL, map[string]string{
4006 "name": c.nameid,
4007 })
4008 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4009 }
4010
4011
4012
4013
4014
4015
4016 func (c *ProjectsAndroidAppsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4017 gensupport.SetOptions(c.urlParams_, opts...)
4018 res, err := c.doRequest("json")
4019 if res != nil && res.StatusCode == http.StatusNotModified {
4020 if res.Body != nil {
4021 res.Body.Close()
4022 }
4023 return nil, gensupport.WrapError(&googleapi.Error{
4024 Code: res.StatusCode,
4025 Header: res.Header,
4026 })
4027 }
4028 if err != nil {
4029 return nil, err
4030 }
4031 defer googleapi.CloseBody(res)
4032 if err := googleapi.CheckResponse(res); err != nil {
4033 return nil, gensupport.WrapError(err)
4034 }
4035 ret := &Operation{
4036 ServerResponse: googleapi.ServerResponse{
4037 Header: res.Header,
4038 HTTPStatusCode: res.StatusCode,
4039 },
4040 }
4041 target := &ret
4042 if err := gensupport.DecodeResponse(target, res); err != nil {
4043 return nil, err
4044 }
4045 return ret, nil
4046 }
4047
4048 type ProjectsAndroidAppsUndeleteCall struct {
4049 s *Service
4050 nameid string
4051 undeleteandroidapprequest *UndeleteAndroidAppRequest
4052 urlParams_ gensupport.URLParams
4053 ctx_ context.Context
4054 header_ http.Header
4055 }
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065 func (r *ProjectsAndroidAppsService) Undelete(nameid string, undeleteandroidapprequest *UndeleteAndroidAppRequest) *ProjectsAndroidAppsUndeleteCall {
4066 c := &ProjectsAndroidAppsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4067 c.nameid = nameid
4068 c.undeleteandroidapprequest = undeleteandroidapprequest
4069 return c
4070 }
4071
4072
4073
4074
4075 func (c *ProjectsAndroidAppsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsUndeleteCall {
4076 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4077 return c
4078 }
4079
4080
4081 func (c *ProjectsAndroidAppsUndeleteCall) Context(ctx context.Context) *ProjectsAndroidAppsUndeleteCall {
4082 c.ctx_ = ctx
4083 return c
4084 }
4085
4086
4087
4088 func (c *ProjectsAndroidAppsUndeleteCall) Header() http.Header {
4089 if c.header_ == nil {
4090 c.header_ = make(http.Header)
4091 }
4092 return c.header_
4093 }
4094
4095 func (c *ProjectsAndroidAppsUndeleteCall) doRequest(alt string) (*http.Response, error) {
4096 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4097 var body io.Reader = nil
4098 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteandroidapprequest)
4099 if err != nil {
4100 return nil, err
4101 }
4102 c.urlParams_.Set("alt", alt)
4103 c.urlParams_.Set("prettyPrint", "false")
4104 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:undelete")
4105 urls += "?" + c.urlParams_.Encode()
4106 req, err := http.NewRequest("POST", urls, body)
4107 if err != nil {
4108 return nil, err
4109 }
4110 req.Header = reqHeaders
4111 googleapi.Expand(req.URL, map[string]string{
4112 "name": c.nameid,
4113 })
4114 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4115 }
4116
4117
4118
4119
4120
4121
4122 func (c *ProjectsAndroidAppsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4123 gensupport.SetOptions(c.urlParams_, opts...)
4124 res, err := c.doRequest("json")
4125 if res != nil && res.StatusCode == http.StatusNotModified {
4126 if res.Body != nil {
4127 res.Body.Close()
4128 }
4129 return nil, gensupport.WrapError(&googleapi.Error{
4130 Code: res.StatusCode,
4131 Header: res.Header,
4132 })
4133 }
4134 if err != nil {
4135 return nil, err
4136 }
4137 defer googleapi.CloseBody(res)
4138 if err := googleapi.CheckResponse(res); err != nil {
4139 return nil, gensupport.WrapError(err)
4140 }
4141 ret := &Operation{
4142 ServerResponse: googleapi.ServerResponse{
4143 Header: res.Header,
4144 HTTPStatusCode: res.StatusCode,
4145 },
4146 }
4147 target := &ret
4148 if err := gensupport.DecodeResponse(target, res); err != nil {
4149 return nil, err
4150 }
4151 return ret, nil
4152 }
4153
4154 type ProjectsAndroidAppsShaCreateCall struct {
4155 s *Service
4156 parentid string
4157 shacertificate *ShaCertificate
4158 urlParams_ gensupport.URLParams
4159 ctx_ context.Context
4160 header_ http.Header
4161 }
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172 func (r *ProjectsAndroidAppsShaService) Create(parentid string, shacertificate *ShaCertificate) *ProjectsAndroidAppsShaCreateCall {
4173 c := &ProjectsAndroidAppsShaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4174 c.parentid = parentid
4175 c.shacertificate = shacertificate
4176 return c
4177 }
4178
4179
4180
4181
4182 func (c *ProjectsAndroidAppsShaCreateCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsShaCreateCall {
4183 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4184 return c
4185 }
4186
4187
4188 func (c *ProjectsAndroidAppsShaCreateCall) Context(ctx context.Context) *ProjectsAndroidAppsShaCreateCall {
4189 c.ctx_ = ctx
4190 return c
4191 }
4192
4193
4194
4195 func (c *ProjectsAndroidAppsShaCreateCall) Header() http.Header {
4196 if c.header_ == nil {
4197 c.header_ = make(http.Header)
4198 }
4199 return c.header_
4200 }
4201
4202 func (c *ProjectsAndroidAppsShaCreateCall) doRequest(alt string) (*http.Response, error) {
4203 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4204 var body io.Reader = nil
4205 body, err := googleapi.WithoutDataWrapper.JSONReader(c.shacertificate)
4206 if err != nil {
4207 return nil, err
4208 }
4209 c.urlParams_.Set("alt", alt)
4210 c.urlParams_.Set("prettyPrint", "false")
4211 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/sha")
4212 urls += "?" + c.urlParams_.Encode()
4213 req, err := http.NewRequest("POST", urls, body)
4214 if err != nil {
4215 return nil, err
4216 }
4217 req.Header = reqHeaders
4218 googleapi.Expand(req.URL, map[string]string{
4219 "parent": c.parentid,
4220 })
4221 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4222 }
4223
4224
4225
4226
4227
4228
4229 func (c *ProjectsAndroidAppsShaCreateCall) Do(opts ...googleapi.CallOption) (*ShaCertificate, error) {
4230 gensupport.SetOptions(c.urlParams_, opts...)
4231 res, err := c.doRequest("json")
4232 if res != nil && res.StatusCode == http.StatusNotModified {
4233 if res.Body != nil {
4234 res.Body.Close()
4235 }
4236 return nil, gensupport.WrapError(&googleapi.Error{
4237 Code: res.StatusCode,
4238 Header: res.Header,
4239 })
4240 }
4241 if err != nil {
4242 return nil, err
4243 }
4244 defer googleapi.CloseBody(res)
4245 if err := googleapi.CheckResponse(res); err != nil {
4246 return nil, gensupport.WrapError(err)
4247 }
4248 ret := &ShaCertificate{
4249 ServerResponse: googleapi.ServerResponse{
4250 Header: res.Header,
4251 HTTPStatusCode: res.StatusCode,
4252 },
4253 }
4254 target := &ret
4255 if err := gensupport.DecodeResponse(target, res); err != nil {
4256 return nil, err
4257 }
4258 return ret, nil
4259 }
4260
4261 type ProjectsAndroidAppsShaDeleteCall struct {
4262 s *Service
4263 name string
4264 urlParams_ gensupport.URLParams
4265 ctx_ context.Context
4266 header_ http.Header
4267 }
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279 func (r *ProjectsAndroidAppsShaService) Delete(name string) *ProjectsAndroidAppsShaDeleteCall {
4280 c := &ProjectsAndroidAppsShaDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4281 c.name = name
4282 return c
4283 }
4284
4285
4286
4287
4288 func (c *ProjectsAndroidAppsShaDeleteCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsShaDeleteCall {
4289 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4290 return c
4291 }
4292
4293
4294 func (c *ProjectsAndroidAppsShaDeleteCall) Context(ctx context.Context) *ProjectsAndroidAppsShaDeleteCall {
4295 c.ctx_ = ctx
4296 return c
4297 }
4298
4299
4300
4301 func (c *ProjectsAndroidAppsShaDeleteCall) Header() http.Header {
4302 if c.header_ == nil {
4303 c.header_ = make(http.Header)
4304 }
4305 return c.header_
4306 }
4307
4308 func (c *ProjectsAndroidAppsShaDeleteCall) doRequest(alt string) (*http.Response, error) {
4309 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4310 var body io.Reader = nil
4311 c.urlParams_.Set("alt", alt)
4312 c.urlParams_.Set("prettyPrint", "false")
4313 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4314 urls += "?" + c.urlParams_.Encode()
4315 req, err := http.NewRequest("DELETE", urls, body)
4316 if err != nil {
4317 return nil, err
4318 }
4319 req.Header = reqHeaders
4320 googleapi.Expand(req.URL, map[string]string{
4321 "name": c.name,
4322 })
4323 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4324 }
4325
4326
4327
4328
4329
4330
4331 func (c *ProjectsAndroidAppsShaDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4332 gensupport.SetOptions(c.urlParams_, opts...)
4333 res, err := c.doRequest("json")
4334 if res != nil && res.StatusCode == http.StatusNotModified {
4335 if res.Body != nil {
4336 res.Body.Close()
4337 }
4338 return nil, gensupport.WrapError(&googleapi.Error{
4339 Code: res.StatusCode,
4340 Header: res.Header,
4341 })
4342 }
4343 if err != nil {
4344 return nil, err
4345 }
4346 defer googleapi.CloseBody(res)
4347 if err := googleapi.CheckResponse(res); err != nil {
4348 return nil, gensupport.WrapError(err)
4349 }
4350 ret := &Empty{
4351 ServerResponse: googleapi.ServerResponse{
4352 Header: res.Header,
4353 HTTPStatusCode: res.StatusCode,
4354 },
4355 }
4356 target := &ret
4357 if err := gensupport.DecodeResponse(target, res); err != nil {
4358 return nil, err
4359 }
4360 return ret, nil
4361 }
4362
4363 type ProjectsAndroidAppsShaListCall struct {
4364 s *Service
4365 parentid string
4366 urlParams_ gensupport.URLParams
4367 ifNoneMatch_ string
4368 ctx_ context.Context
4369 header_ http.Header
4370 }
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381 func (r *ProjectsAndroidAppsShaService) List(parentid string) *ProjectsAndroidAppsShaListCall {
4382 c := &ProjectsAndroidAppsShaListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4383 c.parentid = parentid
4384 return c
4385 }
4386
4387
4388
4389
4390 func (c *ProjectsAndroidAppsShaListCall) Fields(s ...googleapi.Field) *ProjectsAndroidAppsShaListCall {
4391 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4392 return c
4393 }
4394
4395
4396
4397
4398 func (c *ProjectsAndroidAppsShaListCall) IfNoneMatch(entityTag string) *ProjectsAndroidAppsShaListCall {
4399 c.ifNoneMatch_ = entityTag
4400 return c
4401 }
4402
4403
4404 func (c *ProjectsAndroidAppsShaListCall) Context(ctx context.Context) *ProjectsAndroidAppsShaListCall {
4405 c.ctx_ = ctx
4406 return c
4407 }
4408
4409
4410
4411 func (c *ProjectsAndroidAppsShaListCall) Header() http.Header {
4412 if c.header_ == nil {
4413 c.header_ = make(http.Header)
4414 }
4415 return c.header_
4416 }
4417
4418 func (c *ProjectsAndroidAppsShaListCall) doRequest(alt string) (*http.Response, error) {
4419 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4420 if c.ifNoneMatch_ != "" {
4421 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4422 }
4423 var body io.Reader = nil
4424 c.urlParams_.Set("alt", alt)
4425 c.urlParams_.Set("prettyPrint", "false")
4426 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/sha")
4427 urls += "?" + c.urlParams_.Encode()
4428 req, err := http.NewRequest("GET", urls, body)
4429 if err != nil {
4430 return nil, err
4431 }
4432 req.Header = reqHeaders
4433 googleapi.Expand(req.URL, map[string]string{
4434 "parent": c.parentid,
4435 })
4436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4437 }
4438
4439
4440
4441
4442
4443
4444
4445 func (c *ProjectsAndroidAppsShaListCall) Do(opts ...googleapi.CallOption) (*ListShaCertificatesResponse, error) {
4446 gensupport.SetOptions(c.urlParams_, opts...)
4447 res, err := c.doRequest("json")
4448 if res != nil && res.StatusCode == http.StatusNotModified {
4449 if res.Body != nil {
4450 res.Body.Close()
4451 }
4452 return nil, gensupport.WrapError(&googleapi.Error{
4453 Code: res.StatusCode,
4454 Header: res.Header,
4455 })
4456 }
4457 if err != nil {
4458 return nil, err
4459 }
4460 defer googleapi.CloseBody(res)
4461 if err := googleapi.CheckResponse(res); err != nil {
4462 return nil, gensupport.WrapError(err)
4463 }
4464 ret := &ListShaCertificatesResponse{
4465 ServerResponse: googleapi.ServerResponse{
4466 Header: res.Header,
4467 HTTPStatusCode: res.StatusCode,
4468 },
4469 }
4470 target := &ret
4471 if err := gensupport.DecodeResponse(target, res); err != nil {
4472 return nil, err
4473 }
4474 return ret, nil
4475 }
4476
4477 type ProjectsAvailableLocationsListCall struct {
4478 s *Service
4479 parentid string
4480 urlParams_ gensupport.URLParams
4481 ifNoneMatch_ string
4482 ctx_ context.Context
4483 header_ http.Header
4484 }
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512 func (r *ProjectsAvailableLocationsService) List(parentid string) *ProjectsAvailableLocationsListCall {
4513 c := &ProjectsAvailableLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4514 c.parentid = parentid
4515 return c
4516 }
4517
4518
4519
4520
4521
4522
4523 func (c *ProjectsAvailableLocationsListCall) PageSize(pageSize int64) *ProjectsAvailableLocationsListCall {
4524 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4525 return c
4526 }
4527
4528
4529
4530
4531 func (c *ProjectsAvailableLocationsListCall) PageToken(pageToken string) *ProjectsAvailableLocationsListCall {
4532 c.urlParams_.Set("pageToken", pageToken)
4533 return c
4534 }
4535
4536
4537
4538
4539 func (c *ProjectsAvailableLocationsListCall) Fields(s ...googleapi.Field) *ProjectsAvailableLocationsListCall {
4540 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4541 return c
4542 }
4543
4544
4545
4546
4547 func (c *ProjectsAvailableLocationsListCall) IfNoneMatch(entityTag string) *ProjectsAvailableLocationsListCall {
4548 c.ifNoneMatch_ = entityTag
4549 return c
4550 }
4551
4552
4553 func (c *ProjectsAvailableLocationsListCall) Context(ctx context.Context) *ProjectsAvailableLocationsListCall {
4554 c.ctx_ = ctx
4555 return c
4556 }
4557
4558
4559
4560 func (c *ProjectsAvailableLocationsListCall) Header() http.Header {
4561 if c.header_ == nil {
4562 c.header_ = make(http.Header)
4563 }
4564 return c.header_
4565 }
4566
4567 func (c *ProjectsAvailableLocationsListCall) doRequest(alt string) (*http.Response, error) {
4568 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4569 if c.ifNoneMatch_ != "" {
4570 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4571 }
4572 var body io.Reader = nil
4573 c.urlParams_.Set("alt", alt)
4574 c.urlParams_.Set("prettyPrint", "false")
4575 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/availableLocations")
4576 urls += "?" + c.urlParams_.Encode()
4577 req, err := http.NewRequest("GET", urls, body)
4578 if err != nil {
4579 return nil, err
4580 }
4581 req.Header = reqHeaders
4582 googleapi.Expand(req.URL, map[string]string{
4583 "parent": c.parentid,
4584 })
4585 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4586 }
4587
4588
4589
4590
4591
4592
4593
4594 func (c *ProjectsAvailableLocationsListCall) Do(opts ...googleapi.CallOption) (*ListAvailableLocationsResponse, error) {
4595 gensupport.SetOptions(c.urlParams_, opts...)
4596 res, err := c.doRequest("json")
4597 if res != nil && res.StatusCode == http.StatusNotModified {
4598 if res.Body != nil {
4599 res.Body.Close()
4600 }
4601 return nil, gensupport.WrapError(&googleapi.Error{
4602 Code: res.StatusCode,
4603 Header: res.Header,
4604 })
4605 }
4606 if err != nil {
4607 return nil, err
4608 }
4609 defer googleapi.CloseBody(res)
4610 if err := googleapi.CheckResponse(res); err != nil {
4611 return nil, gensupport.WrapError(err)
4612 }
4613 ret := &ListAvailableLocationsResponse{
4614 ServerResponse: googleapi.ServerResponse{
4615 Header: res.Header,
4616 HTTPStatusCode: res.StatusCode,
4617 },
4618 }
4619 target := &ret
4620 if err := gensupport.DecodeResponse(target, res); err != nil {
4621 return nil, err
4622 }
4623 return ret, nil
4624 }
4625
4626
4627
4628
4629 func (c *ProjectsAvailableLocationsListCall) Pages(ctx context.Context, f func(*ListAvailableLocationsResponse) error) error {
4630 c.ctx_ = ctx
4631 defer c.PageToken(c.urlParams_.Get("pageToken"))
4632 for {
4633 x, err := c.Do()
4634 if err != nil {
4635 return err
4636 }
4637 if err := f(x); err != nil {
4638 return err
4639 }
4640 if x.NextPageToken == "" {
4641 return nil
4642 }
4643 c.PageToken(x.NextPageToken)
4644 }
4645 }
4646
4647 type ProjectsDefaultLocationFinalizeCall struct {
4648 s *Service
4649 parent string
4650 finalizedefaultlocationrequest *FinalizeDefaultLocationRequest
4651 urlParams_ gensupport.URLParams
4652 ctx_ context.Context
4653 header_ http.Header
4654 }
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691 func (r *ProjectsDefaultLocationService) Finalize(parent string, finalizedefaultlocationrequest *FinalizeDefaultLocationRequest) *ProjectsDefaultLocationFinalizeCall {
4692 c := &ProjectsDefaultLocationFinalizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4693 c.parent = parent
4694 c.finalizedefaultlocationrequest = finalizedefaultlocationrequest
4695 return c
4696 }
4697
4698
4699
4700
4701 func (c *ProjectsDefaultLocationFinalizeCall) Fields(s ...googleapi.Field) *ProjectsDefaultLocationFinalizeCall {
4702 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4703 return c
4704 }
4705
4706
4707 func (c *ProjectsDefaultLocationFinalizeCall) Context(ctx context.Context) *ProjectsDefaultLocationFinalizeCall {
4708 c.ctx_ = ctx
4709 return c
4710 }
4711
4712
4713
4714 func (c *ProjectsDefaultLocationFinalizeCall) Header() http.Header {
4715 if c.header_ == nil {
4716 c.header_ = make(http.Header)
4717 }
4718 return c.header_
4719 }
4720
4721 func (c *ProjectsDefaultLocationFinalizeCall) doRequest(alt string) (*http.Response, error) {
4722 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4723 var body io.Reader = nil
4724 body, err := googleapi.WithoutDataWrapper.JSONReader(c.finalizedefaultlocationrequest)
4725 if err != nil {
4726 return nil, err
4727 }
4728 c.urlParams_.Set("alt", alt)
4729 c.urlParams_.Set("prettyPrint", "false")
4730 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/defaultLocation:finalize")
4731 urls += "?" + c.urlParams_.Encode()
4732 req, err := http.NewRequest("POST", urls, body)
4733 if err != nil {
4734 return nil, err
4735 }
4736 req.Header = reqHeaders
4737 googleapi.Expand(req.URL, map[string]string{
4738 "parent": c.parent,
4739 })
4740 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4741 }
4742
4743
4744
4745
4746
4747
4748 func (c *ProjectsDefaultLocationFinalizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4749 gensupport.SetOptions(c.urlParams_, opts...)
4750 res, err := c.doRequest("json")
4751 if res != nil && res.StatusCode == http.StatusNotModified {
4752 if res.Body != nil {
4753 res.Body.Close()
4754 }
4755 return nil, gensupport.WrapError(&googleapi.Error{
4756 Code: res.StatusCode,
4757 Header: res.Header,
4758 })
4759 }
4760 if err != nil {
4761 return nil, err
4762 }
4763 defer googleapi.CloseBody(res)
4764 if err := googleapi.CheckResponse(res); err != nil {
4765 return nil, gensupport.WrapError(err)
4766 }
4767 ret := &Operation{
4768 ServerResponse: googleapi.ServerResponse{
4769 Header: res.Header,
4770 HTTPStatusCode: res.StatusCode,
4771 },
4772 }
4773 target := &ret
4774 if err := gensupport.DecodeResponse(target, res); err != nil {
4775 return nil, err
4776 }
4777 return ret, nil
4778 }
4779
4780 type ProjectsIosAppsCreateCall struct {
4781 s *Service
4782 parent string
4783 iosapp *IosApp
4784 urlParams_ gensupport.URLParams
4785 ctx_ context.Context
4786 header_ http.Header
4787 }
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798 func (r *ProjectsIosAppsService) Create(parent string, iosapp *IosApp) *ProjectsIosAppsCreateCall {
4799 c := &ProjectsIosAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4800 c.parent = parent
4801 c.iosapp = iosapp
4802 return c
4803 }
4804
4805
4806
4807
4808 func (c *ProjectsIosAppsCreateCall) Fields(s ...googleapi.Field) *ProjectsIosAppsCreateCall {
4809 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4810 return c
4811 }
4812
4813
4814 func (c *ProjectsIosAppsCreateCall) Context(ctx context.Context) *ProjectsIosAppsCreateCall {
4815 c.ctx_ = ctx
4816 return c
4817 }
4818
4819
4820
4821 func (c *ProjectsIosAppsCreateCall) Header() http.Header {
4822 if c.header_ == nil {
4823 c.header_ = make(http.Header)
4824 }
4825 return c.header_
4826 }
4827
4828 func (c *ProjectsIosAppsCreateCall) doRequest(alt string) (*http.Response, error) {
4829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4830 var body io.Reader = nil
4831 body, err := googleapi.WithoutDataWrapper.JSONReader(c.iosapp)
4832 if err != nil {
4833 return nil, err
4834 }
4835 c.urlParams_.Set("alt", alt)
4836 c.urlParams_.Set("prettyPrint", "false")
4837 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/iosApps")
4838 urls += "?" + c.urlParams_.Encode()
4839 req, err := http.NewRequest("POST", urls, body)
4840 if err != nil {
4841 return nil, err
4842 }
4843 req.Header = reqHeaders
4844 googleapi.Expand(req.URL, map[string]string{
4845 "parent": c.parent,
4846 })
4847 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4848 }
4849
4850
4851
4852
4853
4854
4855 func (c *ProjectsIosAppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4856 gensupport.SetOptions(c.urlParams_, opts...)
4857 res, err := c.doRequest("json")
4858 if res != nil && res.StatusCode == http.StatusNotModified {
4859 if res.Body != nil {
4860 res.Body.Close()
4861 }
4862 return nil, gensupport.WrapError(&googleapi.Error{
4863 Code: res.StatusCode,
4864 Header: res.Header,
4865 })
4866 }
4867 if err != nil {
4868 return nil, err
4869 }
4870 defer googleapi.CloseBody(res)
4871 if err := googleapi.CheckResponse(res); err != nil {
4872 return nil, gensupport.WrapError(err)
4873 }
4874 ret := &Operation{
4875 ServerResponse: googleapi.ServerResponse{
4876 Header: res.Header,
4877 HTTPStatusCode: res.StatusCode,
4878 },
4879 }
4880 target := &ret
4881 if err := gensupport.DecodeResponse(target, res); err != nil {
4882 return nil, err
4883 }
4884 return ret, nil
4885 }
4886
4887 type ProjectsIosAppsGetCall struct {
4888 s *Service
4889 nameid string
4890 urlParams_ gensupport.URLParams
4891 ifNoneMatch_ string
4892 ctx_ context.Context
4893 header_ http.Header
4894 }
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904 func (r *ProjectsIosAppsService) Get(nameid string) *ProjectsIosAppsGetCall {
4905 c := &ProjectsIosAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4906 c.nameid = nameid
4907 return c
4908 }
4909
4910
4911
4912
4913 func (c *ProjectsIosAppsGetCall) Fields(s ...googleapi.Field) *ProjectsIosAppsGetCall {
4914 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4915 return c
4916 }
4917
4918
4919
4920
4921 func (c *ProjectsIosAppsGetCall) IfNoneMatch(entityTag string) *ProjectsIosAppsGetCall {
4922 c.ifNoneMatch_ = entityTag
4923 return c
4924 }
4925
4926
4927 func (c *ProjectsIosAppsGetCall) Context(ctx context.Context) *ProjectsIosAppsGetCall {
4928 c.ctx_ = ctx
4929 return c
4930 }
4931
4932
4933
4934 func (c *ProjectsIosAppsGetCall) Header() http.Header {
4935 if c.header_ == nil {
4936 c.header_ = make(http.Header)
4937 }
4938 return c.header_
4939 }
4940
4941 func (c *ProjectsIosAppsGetCall) doRequest(alt string) (*http.Response, error) {
4942 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4943 if c.ifNoneMatch_ != "" {
4944 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4945 }
4946 var body io.Reader = nil
4947 c.urlParams_.Set("alt", alt)
4948 c.urlParams_.Set("prettyPrint", "false")
4949 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
4950 urls += "?" + c.urlParams_.Encode()
4951 req, err := http.NewRequest("GET", urls, body)
4952 if err != nil {
4953 return nil, err
4954 }
4955 req.Header = reqHeaders
4956 googleapi.Expand(req.URL, map[string]string{
4957 "name": c.nameid,
4958 })
4959 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4960 }
4961
4962
4963
4964
4965
4966
4967 func (c *ProjectsIosAppsGetCall) Do(opts ...googleapi.CallOption) (*IosApp, error) {
4968 gensupport.SetOptions(c.urlParams_, opts...)
4969 res, err := c.doRequest("json")
4970 if res != nil && res.StatusCode == http.StatusNotModified {
4971 if res.Body != nil {
4972 res.Body.Close()
4973 }
4974 return nil, gensupport.WrapError(&googleapi.Error{
4975 Code: res.StatusCode,
4976 Header: res.Header,
4977 })
4978 }
4979 if err != nil {
4980 return nil, err
4981 }
4982 defer googleapi.CloseBody(res)
4983 if err := googleapi.CheckResponse(res); err != nil {
4984 return nil, gensupport.WrapError(err)
4985 }
4986 ret := &IosApp{
4987 ServerResponse: googleapi.ServerResponse{
4988 Header: res.Header,
4989 HTTPStatusCode: res.StatusCode,
4990 },
4991 }
4992 target := &ret
4993 if err := gensupport.DecodeResponse(target, res); err != nil {
4994 return nil, err
4995 }
4996 return ret, nil
4997 }
4998
4999 type ProjectsIosAppsGetConfigCall struct {
5000 s *Service
5001 nameid string
5002 urlParams_ gensupport.URLParams
5003 ifNoneMatch_ string
5004 ctx_ context.Context
5005 header_ http.Header
5006 }
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017 func (r *ProjectsIosAppsService) GetConfig(nameid string) *ProjectsIosAppsGetConfigCall {
5018 c := &ProjectsIosAppsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5019 c.nameid = nameid
5020 return c
5021 }
5022
5023
5024
5025
5026 func (c *ProjectsIosAppsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsIosAppsGetConfigCall {
5027 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5028 return c
5029 }
5030
5031
5032
5033
5034 func (c *ProjectsIosAppsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsIosAppsGetConfigCall {
5035 c.ifNoneMatch_ = entityTag
5036 return c
5037 }
5038
5039
5040 func (c *ProjectsIosAppsGetConfigCall) Context(ctx context.Context) *ProjectsIosAppsGetConfigCall {
5041 c.ctx_ = ctx
5042 return c
5043 }
5044
5045
5046
5047 func (c *ProjectsIosAppsGetConfigCall) Header() http.Header {
5048 if c.header_ == nil {
5049 c.header_ = make(http.Header)
5050 }
5051 return c.header_
5052 }
5053
5054 func (c *ProjectsIosAppsGetConfigCall) doRequest(alt string) (*http.Response, error) {
5055 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5056 if c.ifNoneMatch_ != "" {
5057 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5058 }
5059 var body io.Reader = nil
5060 c.urlParams_.Set("alt", alt)
5061 c.urlParams_.Set("prettyPrint", "false")
5062 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5063 urls += "?" + c.urlParams_.Encode()
5064 req, err := http.NewRequest("GET", urls, body)
5065 if err != nil {
5066 return nil, err
5067 }
5068 req.Header = reqHeaders
5069 googleapi.Expand(req.URL, map[string]string{
5070 "name": c.nameid,
5071 })
5072 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5073 }
5074
5075
5076
5077
5078
5079
5080 func (c *ProjectsIosAppsGetConfigCall) Do(opts ...googleapi.CallOption) (*IosAppConfig, error) {
5081 gensupport.SetOptions(c.urlParams_, opts...)
5082 res, err := c.doRequest("json")
5083 if res != nil && res.StatusCode == http.StatusNotModified {
5084 if res.Body != nil {
5085 res.Body.Close()
5086 }
5087 return nil, gensupport.WrapError(&googleapi.Error{
5088 Code: res.StatusCode,
5089 Header: res.Header,
5090 })
5091 }
5092 if err != nil {
5093 return nil, err
5094 }
5095 defer googleapi.CloseBody(res)
5096 if err := googleapi.CheckResponse(res); err != nil {
5097 return nil, gensupport.WrapError(err)
5098 }
5099 ret := &IosAppConfig{
5100 ServerResponse: googleapi.ServerResponse{
5101 Header: res.Header,
5102 HTTPStatusCode: res.StatusCode,
5103 },
5104 }
5105 target := &ret
5106 if err := gensupport.DecodeResponse(target, res); err != nil {
5107 return nil, err
5108 }
5109 return ret, nil
5110 }
5111
5112 type ProjectsIosAppsListCall struct {
5113 s *Service
5114 parent string
5115 urlParams_ gensupport.URLParams
5116 ifNoneMatch_ string
5117 ctx_ context.Context
5118 header_ http.Header
5119 }
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130 func (r *ProjectsIosAppsService) List(parent string) *ProjectsIosAppsListCall {
5131 c := &ProjectsIosAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5132 c.parent = parent
5133 return c
5134 }
5135
5136
5137
5138
5139
5140 func (c *ProjectsIosAppsListCall) PageSize(pageSize int64) *ProjectsIosAppsListCall {
5141 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5142 return c
5143 }
5144
5145
5146
5147
5148 func (c *ProjectsIosAppsListCall) PageToken(pageToken string) *ProjectsIosAppsListCall {
5149 c.urlParams_.Set("pageToken", pageToken)
5150 return c
5151 }
5152
5153
5154
5155
5156 func (c *ProjectsIosAppsListCall) ShowDeleted(showDeleted bool) *ProjectsIosAppsListCall {
5157 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
5158 return c
5159 }
5160
5161
5162
5163
5164 func (c *ProjectsIosAppsListCall) Fields(s ...googleapi.Field) *ProjectsIosAppsListCall {
5165 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5166 return c
5167 }
5168
5169
5170
5171
5172 func (c *ProjectsIosAppsListCall) IfNoneMatch(entityTag string) *ProjectsIosAppsListCall {
5173 c.ifNoneMatch_ = entityTag
5174 return c
5175 }
5176
5177
5178 func (c *ProjectsIosAppsListCall) Context(ctx context.Context) *ProjectsIosAppsListCall {
5179 c.ctx_ = ctx
5180 return c
5181 }
5182
5183
5184
5185 func (c *ProjectsIosAppsListCall) Header() http.Header {
5186 if c.header_ == nil {
5187 c.header_ = make(http.Header)
5188 }
5189 return c.header_
5190 }
5191
5192 func (c *ProjectsIosAppsListCall) doRequest(alt string) (*http.Response, error) {
5193 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5194 if c.ifNoneMatch_ != "" {
5195 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5196 }
5197 var body io.Reader = nil
5198 c.urlParams_.Set("alt", alt)
5199 c.urlParams_.Set("prettyPrint", "false")
5200 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/iosApps")
5201 urls += "?" + c.urlParams_.Encode()
5202 req, err := http.NewRequest("GET", urls, body)
5203 if err != nil {
5204 return nil, err
5205 }
5206 req.Header = reqHeaders
5207 googleapi.Expand(req.URL, map[string]string{
5208 "parent": c.parent,
5209 })
5210 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5211 }
5212
5213
5214
5215
5216
5217
5218
5219 func (c *ProjectsIosAppsListCall) Do(opts ...googleapi.CallOption) (*ListIosAppsResponse, error) {
5220 gensupport.SetOptions(c.urlParams_, opts...)
5221 res, err := c.doRequest("json")
5222 if res != nil && res.StatusCode == http.StatusNotModified {
5223 if res.Body != nil {
5224 res.Body.Close()
5225 }
5226 return nil, gensupport.WrapError(&googleapi.Error{
5227 Code: res.StatusCode,
5228 Header: res.Header,
5229 })
5230 }
5231 if err != nil {
5232 return nil, err
5233 }
5234 defer googleapi.CloseBody(res)
5235 if err := googleapi.CheckResponse(res); err != nil {
5236 return nil, gensupport.WrapError(err)
5237 }
5238 ret := &ListIosAppsResponse{
5239 ServerResponse: googleapi.ServerResponse{
5240 Header: res.Header,
5241 HTTPStatusCode: res.StatusCode,
5242 },
5243 }
5244 target := &ret
5245 if err := gensupport.DecodeResponse(target, res); err != nil {
5246 return nil, err
5247 }
5248 return ret, nil
5249 }
5250
5251
5252
5253
5254 func (c *ProjectsIosAppsListCall) Pages(ctx context.Context, f func(*ListIosAppsResponse) error) error {
5255 c.ctx_ = ctx
5256 defer c.PageToken(c.urlParams_.Get("pageToken"))
5257 for {
5258 x, err := c.Do()
5259 if err != nil {
5260 return err
5261 }
5262 if err := f(x); err != nil {
5263 return err
5264 }
5265 if x.NextPageToken == "" {
5266 return nil
5267 }
5268 c.PageToken(x.NextPageToken)
5269 }
5270 }
5271
5272 type ProjectsIosAppsPatchCall struct {
5273 s *Service
5274 nameid string
5275 iosapp *IosApp
5276 urlParams_ gensupport.URLParams
5277 ctx_ context.Context
5278 header_ http.Header
5279 }
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293 func (r *ProjectsIosAppsService) Patch(nameid string, iosapp *IosApp) *ProjectsIosAppsPatchCall {
5294 c := &ProjectsIosAppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5295 c.nameid = nameid
5296 c.iosapp = iosapp
5297 return c
5298 }
5299
5300
5301
5302
5303
5304 func (c *ProjectsIosAppsPatchCall) UpdateMask(updateMask string) *ProjectsIosAppsPatchCall {
5305 c.urlParams_.Set("updateMask", updateMask)
5306 return c
5307 }
5308
5309
5310
5311
5312 func (c *ProjectsIosAppsPatchCall) Fields(s ...googleapi.Field) *ProjectsIosAppsPatchCall {
5313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5314 return c
5315 }
5316
5317
5318 func (c *ProjectsIosAppsPatchCall) Context(ctx context.Context) *ProjectsIosAppsPatchCall {
5319 c.ctx_ = ctx
5320 return c
5321 }
5322
5323
5324
5325 func (c *ProjectsIosAppsPatchCall) Header() http.Header {
5326 if c.header_ == nil {
5327 c.header_ = make(http.Header)
5328 }
5329 return c.header_
5330 }
5331
5332 func (c *ProjectsIosAppsPatchCall) doRequest(alt string) (*http.Response, error) {
5333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5334 var body io.Reader = nil
5335 body, err := googleapi.WithoutDataWrapper.JSONReader(c.iosapp)
5336 if err != nil {
5337 return nil, err
5338 }
5339 c.urlParams_.Set("alt", alt)
5340 c.urlParams_.Set("prettyPrint", "false")
5341 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5342 urls += "?" + c.urlParams_.Encode()
5343 req, err := http.NewRequest("PATCH", urls, body)
5344 if err != nil {
5345 return nil, err
5346 }
5347 req.Header = reqHeaders
5348 googleapi.Expand(req.URL, map[string]string{
5349 "name": c.nameid,
5350 })
5351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5352 }
5353
5354
5355
5356
5357
5358
5359 func (c *ProjectsIosAppsPatchCall) Do(opts ...googleapi.CallOption) (*IosApp, error) {
5360 gensupport.SetOptions(c.urlParams_, opts...)
5361 res, err := c.doRequest("json")
5362 if res != nil && res.StatusCode == http.StatusNotModified {
5363 if res.Body != nil {
5364 res.Body.Close()
5365 }
5366 return nil, gensupport.WrapError(&googleapi.Error{
5367 Code: res.StatusCode,
5368 Header: res.Header,
5369 })
5370 }
5371 if err != nil {
5372 return nil, err
5373 }
5374 defer googleapi.CloseBody(res)
5375 if err := googleapi.CheckResponse(res); err != nil {
5376 return nil, gensupport.WrapError(err)
5377 }
5378 ret := &IosApp{
5379 ServerResponse: googleapi.ServerResponse{
5380 Header: res.Header,
5381 HTTPStatusCode: res.StatusCode,
5382 },
5383 }
5384 target := &ret
5385 if err := gensupport.DecodeResponse(target, res); err != nil {
5386 return nil, err
5387 }
5388 return ret, nil
5389 }
5390
5391 type ProjectsIosAppsRemoveCall struct {
5392 s *Service
5393 nameid string
5394 removeiosapprequest *RemoveIosAppRequest
5395 urlParams_ gensupport.URLParams
5396 ctx_ context.Context
5397 header_ http.Header
5398 }
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408 func (r *ProjectsIosAppsService) Remove(nameid string, removeiosapprequest *RemoveIosAppRequest) *ProjectsIosAppsRemoveCall {
5409 c := &ProjectsIosAppsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5410 c.nameid = nameid
5411 c.removeiosapprequest = removeiosapprequest
5412 return c
5413 }
5414
5415
5416
5417
5418 func (c *ProjectsIosAppsRemoveCall) Fields(s ...googleapi.Field) *ProjectsIosAppsRemoveCall {
5419 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5420 return c
5421 }
5422
5423
5424 func (c *ProjectsIosAppsRemoveCall) Context(ctx context.Context) *ProjectsIosAppsRemoveCall {
5425 c.ctx_ = ctx
5426 return c
5427 }
5428
5429
5430
5431 func (c *ProjectsIosAppsRemoveCall) Header() http.Header {
5432 if c.header_ == nil {
5433 c.header_ = make(http.Header)
5434 }
5435 return c.header_
5436 }
5437
5438 func (c *ProjectsIosAppsRemoveCall) doRequest(alt string) (*http.Response, error) {
5439 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5440 var body io.Reader = nil
5441 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeiosapprequest)
5442 if err != nil {
5443 return nil, err
5444 }
5445 c.urlParams_.Set("alt", alt)
5446 c.urlParams_.Set("prettyPrint", "false")
5447 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:remove")
5448 urls += "?" + c.urlParams_.Encode()
5449 req, err := http.NewRequest("POST", urls, body)
5450 if err != nil {
5451 return nil, err
5452 }
5453 req.Header = reqHeaders
5454 googleapi.Expand(req.URL, map[string]string{
5455 "name": c.nameid,
5456 })
5457 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5458 }
5459
5460
5461
5462
5463
5464
5465 func (c *ProjectsIosAppsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5466 gensupport.SetOptions(c.urlParams_, opts...)
5467 res, err := c.doRequest("json")
5468 if res != nil && res.StatusCode == http.StatusNotModified {
5469 if res.Body != nil {
5470 res.Body.Close()
5471 }
5472 return nil, gensupport.WrapError(&googleapi.Error{
5473 Code: res.StatusCode,
5474 Header: res.Header,
5475 })
5476 }
5477 if err != nil {
5478 return nil, err
5479 }
5480 defer googleapi.CloseBody(res)
5481 if err := googleapi.CheckResponse(res); err != nil {
5482 return nil, gensupport.WrapError(err)
5483 }
5484 ret := &Operation{
5485 ServerResponse: googleapi.ServerResponse{
5486 Header: res.Header,
5487 HTTPStatusCode: res.StatusCode,
5488 },
5489 }
5490 target := &ret
5491 if err := gensupport.DecodeResponse(target, res); err != nil {
5492 return nil, err
5493 }
5494 return ret, nil
5495 }
5496
5497 type ProjectsIosAppsUndeleteCall struct {
5498 s *Service
5499 nameid string
5500 undeleteiosapprequest *UndeleteIosAppRequest
5501 urlParams_ gensupport.URLParams
5502 ctx_ context.Context
5503 header_ http.Header
5504 }
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514 func (r *ProjectsIosAppsService) Undelete(nameid string, undeleteiosapprequest *UndeleteIosAppRequest) *ProjectsIosAppsUndeleteCall {
5515 c := &ProjectsIosAppsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5516 c.nameid = nameid
5517 c.undeleteiosapprequest = undeleteiosapprequest
5518 return c
5519 }
5520
5521
5522
5523
5524 func (c *ProjectsIosAppsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsIosAppsUndeleteCall {
5525 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5526 return c
5527 }
5528
5529
5530 func (c *ProjectsIosAppsUndeleteCall) Context(ctx context.Context) *ProjectsIosAppsUndeleteCall {
5531 c.ctx_ = ctx
5532 return c
5533 }
5534
5535
5536
5537 func (c *ProjectsIosAppsUndeleteCall) Header() http.Header {
5538 if c.header_ == nil {
5539 c.header_ = make(http.Header)
5540 }
5541 return c.header_
5542 }
5543
5544 func (c *ProjectsIosAppsUndeleteCall) doRequest(alt string) (*http.Response, error) {
5545 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5546 var body io.Reader = nil
5547 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteiosapprequest)
5548 if err != nil {
5549 return nil, err
5550 }
5551 c.urlParams_.Set("alt", alt)
5552 c.urlParams_.Set("prettyPrint", "false")
5553 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:undelete")
5554 urls += "?" + c.urlParams_.Encode()
5555 req, err := http.NewRequest("POST", urls, body)
5556 if err != nil {
5557 return nil, err
5558 }
5559 req.Header = reqHeaders
5560 googleapi.Expand(req.URL, map[string]string{
5561 "name": c.nameid,
5562 })
5563 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5564 }
5565
5566
5567
5568
5569
5570
5571 func (c *ProjectsIosAppsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5572 gensupport.SetOptions(c.urlParams_, opts...)
5573 res, err := c.doRequest("json")
5574 if res != nil && res.StatusCode == http.StatusNotModified {
5575 if res.Body != nil {
5576 res.Body.Close()
5577 }
5578 return nil, gensupport.WrapError(&googleapi.Error{
5579 Code: res.StatusCode,
5580 Header: res.Header,
5581 })
5582 }
5583 if err != nil {
5584 return nil, err
5585 }
5586 defer googleapi.CloseBody(res)
5587 if err := googleapi.CheckResponse(res); err != nil {
5588 return nil, gensupport.WrapError(err)
5589 }
5590 ret := &Operation{
5591 ServerResponse: googleapi.ServerResponse{
5592 Header: res.Header,
5593 HTTPStatusCode: res.StatusCode,
5594 },
5595 }
5596 target := &ret
5597 if err := gensupport.DecodeResponse(target, res); err != nil {
5598 return nil, err
5599 }
5600 return ret, nil
5601 }
5602
5603 type ProjectsWebAppsCreateCall struct {
5604 s *Service
5605 parent string
5606 webapp *WebApp
5607 urlParams_ gensupport.URLParams
5608 ctx_ context.Context
5609 header_ http.Header
5610 }
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621 func (r *ProjectsWebAppsService) Create(parent string, webapp *WebApp) *ProjectsWebAppsCreateCall {
5622 c := &ProjectsWebAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5623 c.parent = parent
5624 c.webapp = webapp
5625 return c
5626 }
5627
5628
5629
5630
5631 func (c *ProjectsWebAppsCreateCall) Fields(s ...googleapi.Field) *ProjectsWebAppsCreateCall {
5632 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5633 return c
5634 }
5635
5636
5637 func (c *ProjectsWebAppsCreateCall) Context(ctx context.Context) *ProjectsWebAppsCreateCall {
5638 c.ctx_ = ctx
5639 return c
5640 }
5641
5642
5643
5644 func (c *ProjectsWebAppsCreateCall) Header() http.Header {
5645 if c.header_ == nil {
5646 c.header_ = make(http.Header)
5647 }
5648 return c.header_
5649 }
5650
5651 func (c *ProjectsWebAppsCreateCall) doRequest(alt string) (*http.Response, error) {
5652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5653 var body io.Reader = nil
5654 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
5655 if err != nil {
5656 return nil, err
5657 }
5658 c.urlParams_.Set("alt", alt)
5659 c.urlParams_.Set("prettyPrint", "false")
5660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/webApps")
5661 urls += "?" + c.urlParams_.Encode()
5662 req, err := http.NewRequest("POST", urls, body)
5663 if err != nil {
5664 return nil, err
5665 }
5666 req.Header = reqHeaders
5667 googleapi.Expand(req.URL, map[string]string{
5668 "parent": c.parent,
5669 })
5670 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5671 }
5672
5673
5674
5675
5676
5677
5678 func (c *ProjectsWebAppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5679 gensupport.SetOptions(c.urlParams_, opts...)
5680 res, err := c.doRequest("json")
5681 if res != nil && res.StatusCode == http.StatusNotModified {
5682 if res.Body != nil {
5683 res.Body.Close()
5684 }
5685 return nil, gensupport.WrapError(&googleapi.Error{
5686 Code: res.StatusCode,
5687 Header: res.Header,
5688 })
5689 }
5690 if err != nil {
5691 return nil, err
5692 }
5693 defer googleapi.CloseBody(res)
5694 if err := googleapi.CheckResponse(res); err != nil {
5695 return nil, gensupport.WrapError(err)
5696 }
5697 ret := &Operation{
5698 ServerResponse: googleapi.ServerResponse{
5699 Header: res.Header,
5700 HTTPStatusCode: res.StatusCode,
5701 },
5702 }
5703 target := &ret
5704 if err := gensupport.DecodeResponse(target, res); err != nil {
5705 return nil, err
5706 }
5707 return ret, nil
5708 }
5709
5710 type ProjectsWebAppsGetCall struct {
5711 s *Service
5712 nameid string
5713 urlParams_ gensupport.URLParams
5714 ifNoneMatch_ string
5715 ctx_ context.Context
5716 header_ http.Header
5717 }
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727 func (r *ProjectsWebAppsService) Get(nameid string) *ProjectsWebAppsGetCall {
5728 c := &ProjectsWebAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5729 c.nameid = nameid
5730 return c
5731 }
5732
5733
5734
5735
5736 func (c *ProjectsWebAppsGetCall) Fields(s ...googleapi.Field) *ProjectsWebAppsGetCall {
5737 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5738 return c
5739 }
5740
5741
5742
5743
5744 func (c *ProjectsWebAppsGetCall) IfNoneMatch(entityTag string) *ProjectsWebAppsGetCall {
5745 c.ifNoneMatch_ = entityTag
5746 return c
5747 }
5748
5749
5750 func (c *ProjectsWebAppsGetCall) Context(ctx context.Context) *ProjectsWebAppsGetCall {
5751 c.ctx_ = ctx
5752 return c
5753 }
5754
5755
5756
5757 func (c *ProjectsWebAppsGetCall) Header() http.Header {
5758 if c.header_ == nil {
5759 c.header_ = make(http.Header)
5760 }
5761 return c.header_
5762 }
5763
5764 func (c *ProjectsWebAppsGetCall) doRequest(alt string) (*http.Response, error) {
5765 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5766 if c.ifNoneMatch_ != "" {
5767 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5768 }
5769 var body io.Reader = nil
5770 c.urlParams_.Set("alt", alt)
5771 c.urlParams_.Set("prettyPrint", "false")
5772 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5773 urls += "?" + c.urlParams_.Encode()
5774 req, err := http.NewRequest("GET", urls, body)
5775 if err != nil {
5776 return nil, err
5777 }
5778 req.Header = reqHeaders
5779 googleapi.Expand(req.URL, map[string]string{
5780 "name": c.nameid,
5781 })
5782 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5783 }
5784
5785
5786
5787
5788
5789
5790 func (c *ProjectsWebAppsGetCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
5791 gensupport.SetOptions(c.urlParams_, opts...)
5792 res, err := c.doRequest("json")
5793 if res != nil && res.StatusCode == http.StatusNotModified {
5794 if res.Body != nil {
5795 res.Body.Close()
5796 }
5797 return nil, gensupport.WrapError(&googleapi.Error{
5798 Code: res.StatusCode,
5799 Header: res.Header,
5800 })
5801 }
5802 if err != nil {
5803 return nil, err
5804 }
5805 defer googleapi.CloseBody(res)
5806 if err := googleapi.CheckResponse(res); err != nil {
5807 return nil, gensupport.WrapError(err)
5808 }
5809 ret := &WebApp{
5810 ServerResponse: googleapi.ServerResponse{
5811 Header: res.Header,
5812 HTTPStatusCode: res.StatusCode,
5813 },
5814 }
5815 target := &ret
5816 if err := gensupport.DecodeResponse(target, res); err != nil {
5817 return nil, err
5818 }
5819 return ret, nil
5820 }
5821
5822 type ProjectsWebAppsGetConfigCall struct {
5823 s *Service
5824 nameid string
5825 urlParams_ gensupport.URLParams
5826 ifNoneMatch_ string
5827 ctx_ context.Context
5828 header_ http.Header
5829 }
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840 func (r *ProjectsWebAppsService) GetConfig(nameid string) *ProjectsWebAppsGetConfigCall {
5841 c := &ProjectsWebAppsGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5842 c.nameid = nameid
5843 return c
5844 }
5845
5846
5847
5848
5849 func (c *ProjectsWebAppsGetConfigCall) Fields(s ...googleapi.Field) *ProjectsWebAppsGetConfigCall {
5850 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5851 return c
5852 }
5853
5854
5855
5856
5857 func (c *ProjectsWebAppsGetConfigCall) IfNoneMatch(entityTag string) *ProjectsWebAppsGetConfigCall {
5858 c.ifNoneMatch_ = entityTag
5859 return c
5860 }
5861
5862
5863 func (c *ProjectsWebAppsGetConfigCall) Context(ctx context.Context) *ProjectsWebAppsGetConfigCall {
5864 c.ctx_ = ctx
5865 return c
5866 }
5867
5868
5869
5870 func (c *ProjectsWebAppsGetConfigCall) Header() http.Header {
5871 if c.header_ == nil {
5872 c.header_ = make(http.Header)
5873 }
5874 return c.header_
5875 }
5876
5877 func (c *ProjectsWebAppsGetConfigCall) doRequest(alt string) (*http.Response, error) {
5878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5879 if c.ifNoneMatch_ != "" {
5880 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5881 }
5882 var body io.Reader = nil
5883 c.urlParams_.Set("alt", alt)
5884 c.urlParams_.Set("prettyPrint", "false")
5885 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
5886 urls += "?" + c.urlParams_.Encode()
5887 req, err := http.NewRequest("GET", urls, body)
5888 if err != nil {
5889 return nil, err
5890 }
5891 req.Header = reqHeaders
5892 googleapi.Expand(req.URL, map[string]string{
5893 "name": c.nameid,
5894 })
5895 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5896 }
5897
5898
5899
5900
5901
5902
5903 func (c *ProjectsWebAppsGetConfigCall) Do(opts ...googleapi.CallOption) (*WebAppConfig, error) {
5904 gensupport.SetOptions(c.urlParams_, opts...)
5905 res, err := c.doRequest("json")
5906 if res != nil && res.StatusCode == http.StatusNotModified {
5907 if res.Body != nil {
5908 res.Body.Close()
5909 }
5910 return nil, gensupport.WrapError(&googleapi.Error{
5911 Code: res.StatusCode,
5912 Header: res.Header,
5913 })
5914 }
5915 if err != nil {
5916 return nil, err
5917 }
5918 defer googleapi.CloseBody(res)
5919 if err := googleapi.CheckResponse(res); err != nil {
5920 return nil, gensupport.WrapError(err)
5921 }
5922 ret := &WebAppConfig{
5923 ServerResponse: googleapi.ServerResponse{
5924 Header: res.Header,
5925 HTTPStatusCode: res.StatusCode,
5926 },
5927 }
5928 target := &ret
5929 if err := gensupport.DecodeResponse(target, res); err != nil {
5930 return nil, err
5931 }
5932 return ret, nil
5933 }
5934
5935 type ProjectsWebAppsListCall struct {
5936 s *Service
5937 parent string
5938 urlParams_ gensupport.URLParams
5939 ifNoneMatch_ string
5940 ctx_ context.Context
5941 header_ http.Header
5942 }
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953 func (r *ProjectsWebAppsService) List(parent string) *ProjectsWebAppsListCall {
5954 c := &ProjectsWebAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5955 c.parent = parent
5956 return c
5957 }
5958
5959
5960
5961
5962
5963 func (c *ProjectsWebAppsListCall) PageSize(pageSize int64) *ProjectsWebAppsListCall {
5964 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5965 return c
5966 }
5967
5968
5969
5970
5971 func (c *ProjectsWebAppsListCall) PageToken(pageToken string) *ProjectsWebAppsListCall {
5972 c.urlParams_.Set("pageToken", pageToken)
5973 return c
5974 }
5975
5976
5977
5978
5979 func (c *ProjectsWebAppsListCall) ShowDeleted(showDeleted bool) *ProjectsWebAppsListCall {
5980 c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted))
5981 return c
5982 }
5983
5984
5985
5986
5987 func (c *ProjectsWebAppsListCall) Fields(s ...googleapi.Field) *ProjectsWebAppsListCall {
5988 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5989 return c
5990 }
5991
5992
5993
5994
5995 func (c *ProjectsWebAppsListCall) IfNoneMatch(entityTag string) *ProjectsWebAppsListCall {
5996 c.ifNoneMatch_ = entityTag
5997 return c
5998 }
5999
6000
6001 func (c *ProjectsWebAppsListCall) Context(ctx context.Context) *ProjectsWebAppsListCall {
6002 c.ctx_ = ctx
6003 return c
6004 }
6005
6006
6007
6008 func (c *ProjectsWebAppsListCall) Header() http.Header {
6009 if c.header_ == nil {
6010 c.header_ = make(http.Header)
6011 }
6012 return c.header_
6013 }
6014
6015 func (c *ProjectsWebAppsListCall) doRequest(alt string) (*http.Response, error) {
6016 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6017 if c.ifNoneMatch_ != "" {
6018 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6019 }
6020 var body io.Reader = nil
6021 c.urlParams_.Set("alt", alt)
6022 c.urlParams_.Set("prettyPrint", "false")
6023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/webApps")
6024 urls += "?" + c.urlParams_.Encode()
6025 req, err := http.NewRequest("GET", urls, body)
6026 if err != nil {
6027 return nil, err
6028 }
6029 req.Header = reqHeaders
6030 googleapi.Expand(req.URL, map[string]string{
6031 "parent": c.parent,
6032 })
6033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6034 }
6035
6036
6037
6038
6039
6040
6041
6042 func (c *ProjectsWebAppsListCall) Do(opts ...googleapi.CallOption) (*ListWebAppsResponse, error) {
6043 gensupport.SetOptions(c.urlParams_, opts...)
6044 res, err := c.doRequest("json")
6045 if res != nil && res.StatusCode == http.StatusNotModified {
6046 if res.Body != nil {
6047 res.Body.Close()
6048 }
6049 return nil, gensupport.WrapError(&googleapi.Error{
6050 Code: res.StatusCode,
6051 Header: res.Header,
6052 })
6053 }
6054 if err != nil {
6055 return nil, err
6056 }
6057 defer googleapi.CloseBody(res)
6058 if err := googleapi.CheckResponse(res); err != nil {
6059 return nil, gensupport.WrapError(err)
6060 }
6061 ret := &ListWebAppsResponse{
6062 ServerResponse: googleapi.ServerResponse{
6063 Header: res.Header,
6064 HTTPStatusCode: res.StatusCode,
6065 },
6066 }
6067 target := &ret
6068 if err := gensupport.DecodeResponse(target, res); err != nil {
6069 return nil, err
6070 }
6071 return ret, nil
6072 }
6073
6074
6075
6076
6077 func (c *ProjectsWebAppsListCall) Pages(ctx context.Context, f func(*ListWebAppsResponse) error) error {
6078 c.ctx_ = ctx
6079 defer c.PageToken(c.urlParams_.Get("pageToken"))
6080 for {
6081 x, err := c.Do()
6082 if err != nil {
6083 return err
6084 }
6085 if err := f(x); err != nil {
6086 return err
6087 }
6088 if x.NextPageToken == "" {
6089 return nil
6090 }
6091 c.PageToken(x.NextPageToken)
6092 }
6093 }
6094
6095 type ProjectsWebAppsPatchCall struct {
6096 s *Service
6097 nameid string
6098 webapp *WebApp
6099 urlParams_ gensupport.URLParams
6100 ctx_ context.Context
6101 header_ http.Header
6102 }
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116 func (r *ProjectsWebAppsService) Patch(nameid string, webapp *WebApp) *ProjectsWebAppsPatchCall {
6117 c := &ProjectsWebAppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6118 c.nameid = nameid
6119 c.webapp = webapp
6120 return c
6121 }
6122
6123
6124
6125
6126
6127 func (c *ProjectsWebAppsPatchCall) UpdateMask(updateMask string) *ProjectsWebAppsPatchCall {
6128 c.urlParams_.Set("updateMask", updateMask)
6129 return c
6130 }
6131
6132
6133
6134
6135 func (c *ProjectsWebAppsPatchCall) Fields(s ...googleapi.Field) *ProjectsWebAppsPatchCall {
6136 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6137 return c
6138 }
6139
6140
6141 func (c *ProjectsWebAppsPatchCall) Context(ctx context.Context) *ProjectsWebAppsPatchCall {
6142 c.ctx_ = ctx
6143 return c
6144 }
6145
6146
6147
6148 func (c *ProjectsWebAppsPatchCall) Header() http.Header {
6149 if c.header_ == nil {
6150 c.header_ = make(http.Header)
6151 }
6152 return c.header_
6153 }
6154
6155 func (c *ProjectsWebAppsPatchCall) doRequest(alt string) (*http.Response, error) {
6156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6157 var body io.Reader = nil
6158 body, err := googleapi.WithoutDataWrapper.JSONReader(c.webapp)
6159 if err != nil {
6160 return nil, err
6161 }
6162 c.urlParams_.Set("alt", alt)
6163 c.urlParams_.Set("prettyPrint", "false")
6164 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
6165 urls += "?" + c.urlParams_.Encode()
6166 req, err := http.NewRequest("PATCH", urls, body)
6167 if err != nil {
6168 return nil, err
6169 }
6170 req.Header = reqHeaders
6171 googleapi.Expand(req.URL, map[string]string{
6172 "name": c.nameid,
6173 })
6174 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6175 }
6176
6177
6178
6179
6180
6181
6182 func (c *ProjectsWebAppsPatchCall) Do(opts ...googleapi.CallOption) (*WebApp, error) {
6183 gensupport.SetOptions(c.urlParams_, opts...)
6184 res, err := c.doRequest("json")
6185 if res != nil && res.StatusCode == http.StatusNotModified {
6186 if res.Body != nil {
6187 res.Body.Close()
6188 }
6189 return nil, gensupport.WrapError(&googleapi.Error{
6190 Code: res.StatusCode,
6191 Header: res.Header,
6192 })
6193 }
6194 if err != nil {
6195 return nil, err
6196 }
6197 defer googleapi.CloseBody(res)
6198 if err := googleapi.CheckResponse(res); err != nil {
6199 return nil, gensupport.WrapError(err)
6200 }
6201 ret := &WebApp{
6202 ServerResponse: googleapi.ServerResponse{
6203 Header: res.Header,
6204 HTTPStatusCode: res.StatusCode,
6205 },
6206 }
6207 target := &ret
6208 if err := gensupport.DecodeResponse(target, res); err != nil {
6209 return nil, err
6210 }
6211 return ret, nil
6212 }
6213
6214 type ProjectsWebAppsRemoveCall struct {
6215 s *Service
6216 nameid string
6217 removewebapprequest *RemoveWebAppRequest
6218 urlParams_ gensupport.URLParams
6219 ctx_ context.Context
6220 header_ http.Header
6221 }
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231 func (r *ProjectsWebAppsService) Remove(nameid string, removewebapprequest *RemoveWebAppRequest) *ProjectsWebAppsRemoveCall {
6232 c := &ProjectsWebAppsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6233 c.nameid = nameid
6234 c.removewebapprequest = removewebapprequest
6235 return c
6236 }
6237
6238
6239
6240
6241 func (c *ProjectsWebAppsRemoveCall) Fields(s ...googleapi.Field) *ProjectsWebAppsRemoveCall {
6242 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6243 return c
6244 }
6245
6246
6247 func (c *ProjectsWebAppsRemoveCall) Context(ctx context.Context) *ProjectsWebAppsRemoveCall {
6248 c.ctx_ = ctx
6249 return c
6250 }
6251
6252
6253
6254 func (c *ProjectsWebAppsRemoveCall) Header() http.Header {
6255 if c.header_ == nil {
6256 c.header_ = make(http.Header)
6257 }
6258 return c.header_
6259 }
6260
6261 func (c *ProjectsWebAppsRemoveCall) doRequest(alt string) (*http.Response, error) {
6262 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6263 var body io.Reader = nil
6264 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removewebapprequest)
6265 if err != nil {
6266 return nil, err
6267 }
6268 c.urlParams_.Set("alt", alt)
6269 c.urlParams_.Set("prettyPrint", "false")
6270 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:remove")
6271 urls += "?" + c.urlParams_.Encode()
6272 req, err := http.NewRequest("POST", urls, body)
6273 if err != nil {
6274 return nil, err
6275 }
6276 req.Header = reqHeaders
6277 googleapi.Expand(req.URL, map[string]string{
6278 "name": c.nameid,
6279 })
6280 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6281 }
6282
6283
6284
6285
6286
6287
6288 func (c *ProjectsWebAppsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6289 gensupport.SetOptions(c.urlParams_, opts...)
6290 res, err := c.doRequest("json")
6291 if res != nil && res.StatusCode == http.StatusNotModified {
6292 if res.Body != nil {
6293 res.Body.Close()
6294 }
6295 return nil, gensupport.WrapError(&googleapi.Error{
6296 Code: res.StatusCode,
6297 Header: res.Header,
6298 })
6299 }
6300 if err != nil {
6301 return nil, err
6302 }
6303 defer googleapi.CloseBody(res)
6304 if err := googleapi.CheckResponse(res); err != nil {
6305 return nil, gensupport.WrapError(err)
6306 }
6307 ret := &Operation{
6308 ServerResponse: googleapi.ServerResponse{
6309 Header: res.Header,
6310 HTTPStatusCode: res.StatusCode,
6311 },
6312 }
6313 target := &ret
6314 if err := gensupport.DecodeResponse(target, res); err != nil {
6315 return nil, err
6316 }
6317 return ret, nil
6318 }
6319
6320 type ProjectsWebAppsUndeleteCall struct {
6321 s *Service
6322 nameid string
6323 undeletewebapprequest *UndeleteWebAppRequest
6324 urlParams_ gensupport.URLParams
6325 ctx_ context.Context
6326 header_ http.Header
6327 }
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337 func (r *ProjectsWebAppsService) Undelete(nameid string, undeletewebapprequest *UndeleteWebAppRequest) *ProjectsWebAppsUndeleteCall {
6338 c := &ProjectsWebAppsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6339 c.nameid = nameid
6340 c.undeletewebapprequest = undeletewebapprequest
6341 return c
6342 }
6343
6344
6345
6346
6347 func (c *ProjectsWebAppsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsWebAppsUndeleteCall {
6348 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6349 return c
6350 }
6351
6352
6353 func (c *ProjectsWebAppsUndeleteCall) Context(ctx context.Context) *ProjectsWebAppsUndeleteCall {
6354 c.ctx_ = ctx
6355 return c
6356 }
6357
6358
6359
6360 func (c *ProjectsWebAppsUndeleteCall) Header() http.Header {
6361 if c.header_ == nil {
6362 c.header_ = make(http.Header)
6363 }
6364 return c.header_
6365 }
6366
6367 func (c *ProjectsWebAppsUndeleteCall) doRequest(alt string) (*http.Response, error) {
6368 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6369 var body io.Reader = nil
6370 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletewebapprequest)
6371 if err != nil {
6372 return nil, err
6373 }
6374 c.urlParams_.Set("alt", alt)
6375 c.urlParams_.Set("prettyPrint", "false")
6376 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:undelete")
6377 urls += "?" + c.urlParams_.Encode()
6378 req, err := http.NewRequest("POST", urls, body)
6379 if err != nil {
6380 return nil, err
6381 }
6382 req.Header = reqHeaders
6383 googleapi.Expand(req.URL, map[string]string{
6384 "name": c.nameid,
6385 })
6386 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6387 }
6388
6389
6390
6391
6392
6393
6394 func (c *ProjectsWebAppsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6395 gensupport.SetOptions(c.urlParams_, opts...)
6396 res, err := c.doRequest("json")
6397 if res != nil && res.StatusCode == http.StatusNotModified {
6398 if res.Body != nil {
6399 res.Body.Close()
6400 }
6401 return nil, gensupport.WrapError(&googleapi.Error{
6402 Code: res.StatusCode,
6403 Header: res.Header,
6404 })
6405 }
6406 if err != nil {
6407 return nil, err
6408 }
6409 defer googleapi.CloseBody(res)
6410 if err := googleapi.CheckResponse(res); err != nil {
6411 return nil, gensupport.WrapError(err)
6412 }
6413 ret := &Operation{
6414 ServerResponse: googleapi.ServerResponse{
6415 Header: res.Header,
6416 HTTPStatusCode: res.StatusCode,
6417 },
6418 }
6419 target := &ret
6420 if err := gensupport.DecodeResponse(target, res); err != nil {
6421 return nil, err
6422 }
6423 return ret, nil
6424 }
6425
View as plain text