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 identitytoolkit
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 = "identitytoolkit:v3"
95 const apiName = "identitytoolkit"
96 const apiVersion = "v3"
97 const basePath = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/"
98 const basePathTemplate = "https://www.UNIVERSE_DOMAIN/identitytoolkit/v3/relyingparty/"
99
100
101 const (
102
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104
105
106 FirebaseScope = "https://www.googleapis.com/auth/firebase"
107 )
108
109
110 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
111 scopesOption := internaloption.WithDefaultScopes(
112 "https://www.googleapis.com/auth/cloud-platform",
113 "https://www.googleapis.com/auth/firebase",
114 )
115
116 opts = append([]option.ClientOption{scopesOption}, opts...)
117 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
118 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
119 opts = append(opts, internaloption.EnableNewAuthLibrary())
120 client, endpoint, err := htransport.NewClient(ctx, opts...)
121 if err != nil {
122 return nil, err
123 }
124 s, err := New(client)
125 if err != nil {
126 return nil, err
127 }
128 if endpoint != "" {
129 s.BasePath = endpoint
130 }
131 return s, nil
132 }
133
134
135
136
137
138
139 func New(client *http.Client) (*Service, error) {
140 if client == nil {
141 return nil, errors.New("client is nil")
142 }
143 s := &Service{client: client, BasePath: basePath}
144 s.Relyingparty = NewRelyingpartyService(s)
145 return s, nil
146 }
147
148 type Service struct {
149 client *http.Client
150 BasePath string
151 UserAgent string
152
153 Relyingparty *RelyingpartyService
154 }
155
156 func (s *Service) userAgent() string {
157 if s.UserAgent == "" {
158 return googleapi.UserAgent
159 }
160 return googleapi.UserAgent + " " + s.UserAgent
161 }
162
163 func NewRelyingpartyService(s *Service) *RelyingpartyService {
164 rs := &RelyingpartyService{s: s}
165 return rs
166 }
167
168 type RelyingpartyService struct {
169 s *Service
170 }
171
172
173 type CreateAuthUriResponse struct {
174
175 AllProviders []string `json:"allProviders,omitempty"`
176
177 AuthUri string `json:"authUri,omitempty"`
178
179 CaptchaRequired bool `json:"captchaRequired,omitempty"`
180
181 ForExistingProvider bool `json:"forExistingProvider,omitempty"`
182
183 Kind string `json:"kind,omitempty"`
184
185 ProviderId string `json:"providerId,omitempty"`
186
187 Registered bool `json:"registered,omitempty"`
188
189
190 SessionId string `json:"sessionId,omitempty"`
191
192 SigninMethods []string `json:"signinMethods,omitempty"`
193
194
195 googleapi.ServerResponse `json:"-"`
196
197
198
199
200
201 ForceSendFields []string `json:"-"`
202
203
204
205
206 NullFields []string `json:"-"`
207 }
208
209 func (s *CreateAuthUriResponse) MarshalJSON() ([]byte, error) {
210 type NoMethod CreateAuthUriResponse
211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
212 }
213
214
215 type DeleteAccountResponse struct {
216
217 Kind string `json:"kind,omitempty"`
218
219
220 googleapi.ServerResponse `json:"-"`
221
222
223
224
225
226 ForceSendFields []string `json:"-"`
227
228
229
230
231 NullFields []string `json:"-"`
232 }
233
234 func (s *DeleteAccountResponse) MarshalJSON() ([]byte, error) {
235 type NoMethod DeleteAccountResponse
236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
237 }
238
239
240 type DownloadAccountResponse struct {
241
242 Kind string `json:"kind,omitempty"`
243
244
245 NextPageToken string `json:"nextPageToken,omitempty"`
246
247 Users []*UserInfo `json:"users,omitempty"`
248
249
250 googleapi.ServerResponse `json:"-"`
251
252
253
254
255
256 ForceSendFields []string `json:"-"`
257
258
259
260
261 NullFields []string `json:"-"`
262 }
263
264 func (s *DownloadAccountResponse) MarshalJSON() ([]byte, error) {
265 type NoMethod DownloadAccountResponse
266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
267 }
268
269
270 type EmailLinkSigninResponse struct {
271
272 Email string `json:"email,omitempty"`
273
274 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
275
276 IdToken string `json:"idToken,omitempty"`
277
278 IsNewUser bool `json:"isNewUser,omitempty"`
279
280 Kind string `json:"kind,omitempty"`
281
282 LocalId string `json:"localId,omitempty"`
283
284 RefreshToken string `json:"refreshToken,omitempty"`
285
286
287 googleapi.ServerResponse `json:"-"`
288
289
290
291
292
293 ForceSendFields []string `json:"-"`
294
295
296
297
298 NullFields []string `json:"-"`
299 }
300
301 func (s *EmailLinkSigninResponse) MarshalJSON() ([]byte, error) {
302 type NoMethod EmailLinkSigninResponse
303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
304 }
305
306
307 type EmailTemplate struct {
308
309 Body string `json:"body,omitempty"`
310
311 Format string `json:"format,omitempty"`
312
313 From string `json:"from,omitempty"`
314
315 FromDisplayName string `json:"fromDisplayName,omitempty"`
316
317 ReplyTo string `json:"replyTo,omitempty"`
318
319 Subject string `json:"subject,omitempty"`
320
321
322
323
324
325 ForceSendFields []string `json:"-"`
326
327
328
329
330 NullFields []string `json:"-"`
331 }
332
333 func (s *EmailTemplate) MarshalJSON() ([]byte, error) {
334 type NoMethod EmailTemplate
335 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
336 }
337
338
339 type GetAccountInfoResponse struct {
340
341 Kind string `json:"kind,omitempty"`
342
343 Users []*UserInfo `json:"users,omitempty"`
344
345
346 googleapi.ServerResponse `json:"-"`
347
348
349
350
351
352 ForceSendFields []string `json:"-"`
353
354
355
356
357 NullFields []string `json:"-"`
358 }
359
360 func (s *GetAccountInfoResponse) MarshalJSON() ([]byte, error) {
361 type NoMethod GetAccountInfoResponse
362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
363 }
364
365
366
367 type GetOobConfirmationCodeResponse struct {
368
369 Email string `json:"email,omitempty"`
370
371 Kind string `json:"kind,omitempty"`
372
373 OobCode string `json:"oobCode,omitempty"`
374
375
376 googleapi.ServerResponse `json:"-"`
377
378
379
380
381
382 ForceSendFields []string `json:"-"`
383
384
385
386
387 NullFields []string `json:"-"`
388 }
389
390 func (s *GetOobConfirmationCodeResponse) MarshalJSON() ([]byte, error) {
391 type NoMethod GetOobConfirmationCodeResponse
392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
393 }
394
395
396 type GetRecaptchaParamResponse struct {
397
398 Kind string `json:"kind,omitempty"`
399
400 RecaptchaSiteKey string `json:"recaptchaSiteKey,omitempty"`
401
402
403 RecaptchaStoken string `json:"recaptchaStoken,omitempty"`
404
405
406 googleapi.ServerResponse `json:"-"`
407
408
409
410
411
412 ForceSendFields []string `json:"-"`
413
414
415
416
417 NullFields []string `json:"-"`
418 }
419
420 func (s *GetRecaptchaParamResponse) MarshalJSON() ([]byte, error) {
421 type NoMethod GetRecaptchaParamResponse
422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
423 }
424
425
426
427 type IdentitytoolkitRelyingpartyCreateAuthUriRequest struct {
428
429
430 AppId string `json:"appId,omitempty"`
431
432
433 AuthFlowType string `json:"authFlowType,omitempty"`
434
435 ClientId string `json:"clientId,omitempty"`
436
437
438 Context string `json:"context,omitempty"`
439
440
441 ContinueUri string `json:"continueUri,omitempty"`
442
443
444
445
446 CustomParameter map[string]string `json:"customParameter,omitempty"`
447
448
449 HostedDomain string `json:"hostedDomain,omitempty"`
450
451 Identifier string `json:"identifier,omitempty"`
452
453 OauthConsumerKey string `json:"oauthConsumerKey,omitempty"`
454
455
456 OauthScope string `json:"oauthScope,omitempty"`
457
458
459
460 OpenidRealm string `json:"openidRealm,omitempty"`
461
462 OtaApp string `json:"otaApp,omitempty"`
463
464
465
466 ProviderId string `json:"providerId,omitempty"`
467
468 SessionId string `json:"sessionId,omitempty"`
469
470
471
472 TenantId string `json:"tenantId,omitempty"`
473
474 TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
475
476
477
478
479
480 ForceSendFields []string `json:"-"`
481
482
483
484
485 NullFields []string `json:"-"`
486 }
487
488 func (s *IdentitytoolkitRelyingpartyCreateAuthUriRequest) MarshalJSON() ([]byte, error) {
489 type NoMethod IdentitytoolkitRelyingpartyCreateAuthUriRequest
490 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
491 }
492
493
494 type IdentitytoolkitRelyingpartyDeleteAccountRequest struct {
495
496
497 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
498
499 IdToken string `json:"idToken,omitempty"`
500
501 LocalId string `json:"localId,omitempty"`
502
503
504
505
506
507 ForceSendFields []string `json:"-"`
508
509
510
511
512 NullFields []string `json:"-"`
513 }
514
515 func (s *IdentitytoolkitRelyingpartyDeleteAccountRequest) MarshalJSON() ([]byte, error) {
516 type NoMethod IdentitytoolkitRelyingpartyDeleteAccountRequest
517 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
518 }
519
520
521
522 type IdentitytoolkitRelyingpartyDownloadAccountRequest struct {
523
524
525 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
526
527 MaxResults int64 `json:"maxResults,omitempty"`
528
529
530 NextPageToken string `json:"nextPageToken,omitempty"`
531
532
533 TargetProjectId string `json:"targetProjectId,omitempty"`
534
535
536
537
538
539 ForceSendFields []string `json:"-"`
540
541
542
543
544 NullFields []string `json:"-"`
545 }
546
547 func (s *IdentitytoolkitRelyingpartyDownloadAccountRequest) MarshalJSON() ([]byte, error) {
548 type NoMethod IdentitytoolkitRelyingpartyDownloadAccountRequest
549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
550 }
551
552
553
554 type IdentitytoolkitRelyingpartyEmailLinkSigninRequest struct {
555
556 Email string `json:"email,omitempty"`
557
558 IdToken string `json:"idToken,omitempty"`
559
560 OobCode string `json:"oobCode,omitempty"`
561
562
563
564
565
566 ForceSendFields []string `json:"-"`
567
568
569
570
571 NullFields []string `json:"-"`
572 }
573
574 func (s *IdentitytoolkitRelyingpartyEmailLinkSigninRequest) MarshalJSON() ([]byte, error) {
575 type NoMethod IdentitytoolkitRelyingpartyEmailLinkSigninRequest
576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
577 }
578
579
580
581 type IdentitytoolkitRelyingpartyGetAccountInfoRequest struct {
582
583
584 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
585
586 Email []string `json:"email,omitempty"`
587
588 IdToken string `json:"idToken,omitempty"`
589
590 LocalId []string `json:"localId,omitempty"`
591
592 PhoneNumber []string `json:"phoneNumber,omitempty"`
593
594
595
596
597
598 ForceSendFields []string `json:"-"`
599
600
601
602
603 NullFields []string `json:"-"`
604 }
605
606 func (s *IdentitytoolkitRelyingpartyGetAccountInfoRequest) MarshalJSON() ([]byte, error) {
607 type NoMethod IdentitytoolkitRelyingpartyGetAccountInfoRequest
608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
609 }
610
611
612
613 type IdentitytoolkitRelyingpartyGetProjectConfigResponse struct {
614
615 AllowPasswordUser bool `json:"allowPasswordUser,omitempty"`
616
617 ApiKey string `json:"apiKey,omitempty"`
618
619 AuthorizedDomains []string `json:"authorizedDomains,omitempty"`
620
621 ChangeEmailTemplate *EmailTemplate `json:"changeEmailTemplate,omitempty"`
622 DynamicLinksDomain string `json:"dynamicLinksDomain,omitempty"`
623
624 EnableAnonymousUser bool `json:"enableAnonymousUser,omitempty"`
625
626 IdpConfig []*IdpConfig `json:"idpConfig,omitempty"`
627
628 LegacyResetPasswordTemplate *EmailTemplate `json:"legacyResetPasswordTemplate,omitempty"`
629
630 ProjectId string `json:"projectId,omitempty"`
631
632 ResetPasswordTemplate *EmailTemplate `json:"resetPasswordTemplate,omitempty"`
633
634 UseEmailSending bool `json:"useEmailSending,omitempty"`
635
636 VerifyEmailTemplate *EmailTemplate `json:"verifyEmailTemplate,omitempty"`
637
638
639 googleapi.ServerResponse `json:"-"`
640
641
642
643
644
645 ForceSendFields []string `json:"-"`
646
647
648
649
650 NullFields []string `json:"-"`
651 }
652
653 func (s *IdentitytoolkitRelyingpartyGetProjectConfigResponse) MarshalJSON() ([]byte, error) {
654 type NoMethod IdentitytoolkitRelyingpartyGetProjectConfigResponse
655 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
656 }
657
658
659
660 type IdentitytoolkitRelyingpartyResetPasswordRequest struct {
661
662 Email string `json:"email,omitempty"`
663
664 NewPassword string `json:"newPassword,omitempty"`
665
666 OldPassword string `json:"oldPassword,omitempty"`
667
668 OobCode string `json:"oobCode,omitempty"`
669
670
671
672
673
674 ForceSendFields []string `json:"-"`
675
676
677
678
679 NullFields []string `json:"-"`
680 }
681
682 func (s *IdentitytoolkitRelyingpartyResetPasswordRequest) MarshalJSON() ([]byte, error) {
683 type NoMethod IdentitytoolkitRelyingpartyResetPasswordRequest
684 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
685 }
686
687
688
689 type IdentitytoolkitRelyingpartySendVerificationCodeRequest struct {
690
691 IosReceipt string `json:"iosReceipt,omitempty"`
692
693 IosSecret string `json:"iosSecret,omitempty"`
694
695
696 PhoneNumber string `json:"phoneNumber,omitempty"`
697
698 RecaptchaToken string `json:"recaptchaToken,omitempty"`
699
700
701
702
703
704 ForceSendFields []string `json:"-"`
705
706
707
708
709 NullFields []string `json:"-"`
710 }
711
712 func (s *IdentitytoolkitRelyingpartySendVerificationCodeRequest) MarshalJSON() ([]byte, error) {
713 type NoMethod IdentitytoolkitRelyingpartySendVerificationCodeRequest
714 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
715 }
716
717
718
719 type IdentitytoolkitRelyingpartySendVerificationCodeResponse struct {
720
721 SessionInfo string `json:"sessionInfo,omitempty"`
722
723
724 googleapi.ServerResponse `json:"-"`
725
726
727
728
729
730 ForceSendFields []string `json:"-"`
731
732
733
734
735 NullFields []string `json:"-"`
736 }
737
738 func (s *IdentitytoolkitRelyingpartySendVerificationCodeResponse) MarshalJSON() ([]byte, error) {
739 type NoMethod IdentitytoolkitRelyingpartySendVerificationCodeResponse
740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
741 }
742
743
744
745 type IdentitytoolkitRelyingpartySetAccountInfoRequest struct {
746
747 CaptchaChallenge string `json:"captchaChallenge,omitempty"`
748
749 CaptchaResponse string `json:"captchaResponse,omitempty"`
750
751 CreatedAt int64 `json:"createdAt,omitempty,string"`
752
753 CustomAttributes string `json:"customAttributes,omitempty"`
754
755
756 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
757
758 DeleteAttribute []string `json:"deleteAttribute,omitempty"`
759
760 DeleteProvider []string `json:"deleteProvider,omitempty"`
761
762 DisableUser bool `json:"disableUser,omitempty"`
763
764 DisplayName string `json:"displayName,omitempty"`
765
766 Email string `json:"email,omitempty"`
767
768 EmailVerified bool `json:"emailVerified,omitempty"`
769
770 IdToken string `json:"idToken,omitempty"`
771
772 InstanceId string `json:"instanceId,omitempty"`
773
774 LastLoginAt int64 `json:"lastLoginAt,omitempty,string"`
775
776 LocalId string `json:"localId,omitempty"`
777
778 OobCode string `json:"oobCode,omitempty"`
779
780 Password string `json:"password,omitempty"`
781
782 PhoneNumber string `json:"phoneNumber,omitempty"`
783
784 PhotoUrl string `json:"photoUrl,omitempty"`
785
786 Provider []string `json:"provider,omitempty"`
787
788
789 ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
790
791 UpgradeToFederatedLogin bool `json:"upgradeToFederatedLogin,omitempty"`
792
793 ValidSince int64 `json:"validSince,omitempty,string"`
794
795
796
797
798
799 ForceSendFields []string `json:"-"`
800
801
802
803
804 NullFields []string `json:"-"`
805 }
806
807 func (s *IdentitytoolkitRelyingpartySetAccountInfoRequest) MarshalJSON() ([]byte, error) {
808 type NoMethod IdentitytoolkitRelyingpartySetAccountInfoRequest
809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
810 }
811
812
813
814 type IdentitytoolkitRelyingpartySetProjectConfigRequest struct {
815
816 AllowPasswordUser bool `json:"allowPasswordUser,omitempty"`
817
818 ApiKey string `json:"apiKey,omitempty"`
819
820 AuthorizedDomains []string `json:"authorizedDomains,omitempty"`
821
822 ChangeEmailTemplate *EmailTemplate `json:"changeEmailTemplate,omitempty"`
823
824
825 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
826
827 EnableAnonymousUser bool `json:"enableAnonymousUser,omitempty"`
828
829 IdpConfig []*IdpConfig `json:"idpConfig,omitempty"`
830
831 LegacyResetPasswordTemplate *EmailTemplate `json:"legacyResetPasswordTemplate,omitempty"`
832
833 ResetPasswordTemplate *EmailTemplate `json:"resetPasswordTemplate,omitempty"`
834
835 UseEmailSending bool `json:"useEmailSending,omitempty"`
836
837 VerifyEmailTemplate *EmailTemplate `json:"verifyEmailTemplate,omitempty"`
838
839
840
841
842
843 ForceSendFields []string `json:"-"`
844
845
846
847
848 NullFields []string `json:"-"`
849 }
850
851 func (s *IdentitytoolkitRelyingpartySetProjectConfigRequest) MarshalJSON() ([]byte, error) {
852 type NoMethod IdentitytoolkitRelyingpartySetProjectConfigRequest
853 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
854 }
855
856
857
858 type IdentitytoolkitRelyingpartySetProjectConfigResponse struct {
859
860 ProjectId string `json:"projectId,omitempty"`
861
862
863 googleapi.ServerResponse `json:"-"`
864
865
866
867
868
869 ForceSendFields []string `json:"-"`
870
871
872
873
874 NullFields []string `json:"-"`
875 }
876
877 func (s *IdentitytoolkitRelyingpartySetProjectConfigResponse) MarshalJSON() ([]byte, error) {
878 type NoMethod IdentitytoolkitRelyingpartySetProjectConfigResponse
879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
880 }
881
882
883 type IdentitytoolkitRelyingpartySignOutUserRequest struct {
884
885 InstanceId string `json:"instanceId,omitempty"`
886
887 LocalId string `json:"localId,omitempty"`
888
889
890
891
892
893 ForceSendFields []string `json:"-"`
894
895
896
897
898 NullFields []string `json:"-"`
899 }
900
901 func (s *IdentitytoolkitRelyingpartySignOutUserRequest) MarshalJSON() ([]byte, error) {
902 type NoMethod IdentitytoolkitRelyingpartySignOutUserRequest
903 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
904 }
905
906
907
908 type IdentitytoolkitRelyingpartySignOutUserResponse struct {
909
910 LocalId string `json:"localId,omitempty"`
911
912
913 googleapi.ServerResponse `json:"-"`
914
915
916
917
918
919 ForceSendFields []string `json:"-"`
920
921
922
923
924 NullFields []string `json:"-"`
925 }
926
927 func (s *IdentitytoolkitRelyingpartySignOutUserResponse) MarshalJSON() ([]byte, error) {
928 type NoMethod IdentitytoolkitRelyingpartySignOutUserResponse
929 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
930 }
931
932
933
934 type IdentitytoolkitRelyingpartySignupNewUserRequest struct {
935
936 CaptchaChallenge string `json:"captchaChallenge,omitempty"`
937
938 CaptchaResponse string `json:"captchaResponse,omitempty"`
939
940 Disabled bool `json:"disabled,omitempty"`
941
942 DisplayName string `json:"displayName,omitempty"`
943
944 Email string `json:"email,omitempty"`
945
946
947 EmailVerified bool `json:"emailVerified,omitempty"`
948
949 IdToken string `json:"idToken,omitempty"`
950
951 InstanceId string `json:"instanceId,omitempty"`
952
953 LocalId string `json:"localId,omitempty"`
954
955 Password string `json:"password,omitempty"`
956
957 PhoneNumber string `json:"phoneNumber,omitempty"`
958
959 PhotoUrl string `json:"photoUrl,omitempty"`
960
961
962
963 TenantId string `json:"tenantId,omitempty"`
964
965 TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
966
967
968
969
970
971 ForceSendFields []string `json:"-"`
972
973
974
975
976 NullFields []string `json:"-"`
977 }
978
979 func (s *IdentitytoolkitRelyingpartySignupNewUserRequest) MarshalJSON() ([]byte, error) {
980 type NoMethod IdentitytoolkitRelyingpartySignupNewUserRequest
981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
982 }
983
984
985
986 type IdentitytoolkitRelyingpartyUploadAccountRequest struct {
987
988
989 AllowOverwrite bool `json:"allowOverwrite,omitempty"`
990 BlockSize int64 `json:"blockSize,omitempty"`
991
992 CpuMemCost int64 `json:"cpuMemCost,omitempty"`
993
994
995 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
996 DkLen int64 `json:"dkLen,omitempty"`
997
998 HashAlgorithm string `json:"hashAlgorithm,omitempty"`
999
1000
1001 MemoryCost int64 `json:"memoryCost,omitempty"`
1002 Parallelization int64 `json:"parallelization,omitempty"`
1003
1004 Rounds int64 `json:"rounds,omitempty"`
1005
1006 SaltSeparator string `json:"saltSeparator,omitempty"`
1007
1008
1009 SanityCheck bool `json:"sanityCheck,omitempty"`
1010
1011 SignerKey string `json:"signerKey,omitempty"`
1012
1013
1014 TargetProjectId string `json:"targetProjectId,omitempty"`
1015
1016 Users []*UserInfo `json:"users,omitempty"`
1017
1018
1019
1020
1021
1022 ForceSendFields []string `json:"-"`
1023
1024
1025
1026
1027 NullFields []string `json:"-"`
1028 }
1029
1030 func (s *IdentitytoolkitRelyingpartyUploadAccountRequest) MarshalJSON() ([]byte, error) {
1031 type NoMethod IdentitytoolkitRelyingpartyUploadAccountRequest
1032 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1033 }
1034
1035
1036
1037 type IdentitytoolkitRelyingpartyVerifyAssertionRequest struct {
1038
1039
1040
1041 AutoCreate bool `json:"autoCreate,omitempty"`
1042
1043
1044 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
1045
1046 IdToken string `json:"idToken,omitempty"`
1047
1048 InstanceId string `json:"instanceId,omitempty"`
1049
1050
1051 PendingIdToken string `json:"pendingIdToken,omitempty"`
1052
1053 PostBody string `json:"postBody,omitempty"`
1054
1055
1056 RequestUri string `json:"requestUri,omitempty"`
1057
1058
1059 ReturnIdpCredential bool `json:"returnIdpCredential,omitempty"`
1060
1061 ReturnRefreshToken bool `json:"returnRefreshToken,omitempty"`
1062
1063
1064 ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
1065
1066
1067 SessionId string `json:"sessionId,omitempty"`
1068
1069
1070
1071 TenantId string `json:"tenantId,omitempty"`
1072
1073 TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
1074
1075
1076
1077
1078
1079 ForceSendFields []string `json:"-"`
1080
1081
1082
1083
1084 NullFields []string `json:"-"`
1085 }
1086
1087 func (s *IdentitytoolkitRelyingpartyVerifyAssertionRequest) MarshalJSON() ([]byte, error) {
1088 type NoMethod IdentitytoolkitRelyingpartyVerifyAssertionRequest
1089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1090 }
1091
1092
1093
1094 type IdentitytoolkitRelyingpartyVerifyCustomTokenRequest struct {
1095
1096
1097 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
1098
1099 InstanceId string `json:"instanceId,omitempty"`
1100
1101
1102 ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
1103
1104 Token string `json:"token,omitempty"`
1105
1106
1107
1108
1109
1110 ForceSendFields []string `json:"-"`
1111
1112
1113
1114
1115 NullFields []string `json:"-"`
1116 }
1117
1118 func (s *IdentitytoolkitRelyingpartyVerifyCustomTokenRequest) MarshalJSON() ([]byte, error) {
1119 type NoMethod IdentitytoolkitRelyingpartyVerifyCustomTokenRequest
1120 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1121 }
1122
1123
1124
1125 type IdentitytoolkitRelyingpartyVerifyPasswordRequest struct {
1126
1127 CaptchaChallenge string `json:"captchaChallenge,omitempty"`
1128
1129 CaptchaResponse string `json:"captchaResponse,omitempty"`
1130
1131
1132 DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
1133
1134 Email string `json:"email,omitempty"`
1135
1136 IdToken string `json:"idToken,omitempty"`
1137
1138 InstanceId string `json:"instanceId,omitempty"`
1139
1140 Password string `json:"password,omitempty"`
1141
1142
1143 PendingIdToken string `json:"pendingIdToken,omitempty"`
1144
1145
1146 ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
1147
1148
1149
1150 TenantId string `json:"tenantId,omitempty"`
1151
1152 TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
1153
1154
1155
1156
1157
1158 ForceSendFields []string `json:"-"`
1159
1160
1161
1162
1163 NullFields []string `json:"-"`
1164 }
1165
1166 func (s *IdentitytoolkitRelyingpartyVerifyPasswordRequest) MarshalJSON() ([]byte, error) {
1167 type NoMethod IdentitytoolkitRelyingpartyVerifyPasswordRequest
1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1169 }
1170
1171
1172
1173 type IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest struct {
1174 Code string `json:"code,omitempty"`
1175 IdToken string `json:"idToken,omitempty"`
1176 Operation string `json:"operation,omitempty"`
1177 PhoneNumber string `json:"phoneNumber,omitempty"`
1178
1179
1180 SessionInfo string `json:"sessionInfo,omitempty"`
1181 TemporaryProof string `json:"temporaryProof,omitempty"`
1182 VerificationProof string `json:"verificationProof,omitempty"`
1183
1184
1185
1186
1187
1188 ForceSendFields []string `json:"-"`
1189
1190
1191
1192
1193 NullFields []string `json:"-"`
1194 }
1195
1196 func (s *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) {
1197 type NoMethod IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest
1198 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1199 }
1200
1201
1202
1203 type IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse struct {
1204 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
1205 IdToken string `json:"idToken,omitempty"`
1206 IsNewUser bool `json:"isNewUser,omitempty"`
1207 LocalId string `json:"localId,omitempty"`
1208 PhoneNumber string `json:"phoneNumber,omitempty"`
1209 RefreshToken string `json:"refreshToken,omitempty"`
1210 TemporaryProof string `json:"temporaryProof,omitempty"`
1211 TemporaryProofExpiresIn int64 `json:"temporaryProofExpiresIn,omitempty,string"`
1212 VerificationProof string `json:"verificationProof,omitempty"`
1213 VerificationProofExpiresIn int64 `json:"verificationProofExpiresIn,omitempty,string"`
1214
1215
1216 googleapi.ServerResponse `json:"-"`
1217
1218
1219
1220
1221
1222 ForceSendFields []string `json:"-"`
1223
1224
1225
1226
1227 NullFields []string `json:"-"`
1228 }
1229
1230 func (s *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) {
1231 type NoMethod IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse
1232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1233 }
1234
1235
1236 type IdpConfig struct {
1237
1238 ClientId string `json:"clientId,omitempty"`
1239
1240 Enabled bool `json:"enabled,omitempty"`
1241
1242
1243 ExperimentPercent int64 `json:"experimentPercent,omitempty"`
1244
1245 Provider string `json:"provider,omitempty"`
1246
1247 Secret string `json:"secret,omitempty"`
1248
1249 WhitelistedAudiences []string `json:"whitelistedAudiences,omitempty"`
1250
1251
1252
1253
1254
1255 ForceSendFields []string `json:"-"`
1256
1257
1258
1259
1260 NullFields []string `json:"-"`
1261 }
1262
1263 func (s *IdpConfig) MarshalJSON() ([]byte, error) {
1264 type NoMethod IdpConfig
1265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1266 }
1267
1268
1269
1270 type Relyingparty struct {
1271
1272
1273 AndroidInstallApp bool `json:"androidInstallApp,omitempty"`
1274
1275
1276
1277 AndroidMinimumVersion string `json:"androidMinimumVersion,omitempty"`
1278
1279
1280 AndroidPackageName string `json:"androidPackageName,omitempty"`
1281
1282
1283 CanHandleCodeInApp bool `json:"canHandleCodeInApp,omitempty"`
1284
1285 CaptchaResp string `json:"captchaResp,omitempty"`
1286
1287 Challenge string `json:"challenge,omitempty"`
1288
1289 ContinueUrl string `json:"continueUrl,omitempty"`
1290
1291 Email string `json:"email,omitempty"`
1292
1293
1294 IOSAppStoreId string `json:"iOSAppStoreId,omitempty"`
1295
1296 IOSBundleId string `json:"iOSBundleId,omitempty"`
1297
1298 IdToken string `json:"idToken,omitempty"`
1299
1300 Kind string `json:"kind,omitempty"`
1301
1302 NewEmail string `json:"newEmail,omitempty"`
1303
1304 RequestType string `json:"requestType,omitempty"`
1305
1306 UserIp string `json:"userIp,omitempty"`
1307
1308
1309
1310
1311
1312 ForceSendFields []string `json:"-"`
1313
1314
1315
1316
1317 NullFields []string `json:"-"`
1318 }
1319
1320 func (s *Relyingparty) MarshalJSON() ([]byte, error) {
1321 type NoMethod Relyingparty
1322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1323 }
1324
1325
1326 type ResetPasswordResponse struct {
1327
1328
1329 Email string `json:"email,omitempty"`
1330
1331 Kind string `json:"kind,omitempty"`
1332
1333
1334 NewEmail string `json:"newEmail,omitempty"`
1335
1336 RequestType string `json:"requestType,omitempty"`
1337
1338
1339 googleapi.ServerResponse `json:"-"`
1340
1341
1342
1343
1344
1345 ForceSendFields []string `json:"-"`
1346
1347
1348
1349
1350 NullFields []string `json:"-"`
1351 }
1352
1353 func (s *ResetPasswordResponse) MarshalJSON() ([]byte, error) {
1354 type NoMethod ResetPasswordResponse
1355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1356 }
1357
1358
1359 type SetAccountInfoResponse struct {
1360
1361 DisplayName string `json:"displayName,omitempty"`
1362
1363 Email string `json:"email,omitempty"`
1364
1365 EmailVerified bool `json:"emailVerified,omitempty"`
1366
1367
1368 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
1369
1370 IdToken string `json:"idToken,omitempty"`
1371
1372 Kind string `json:"kind,omitempty"`
1373
1374 LocalId string `json:"localId,omitempty"`
1375
1376 NewEmail string `json:"newEmail,omitempty"`
1377
1378 PasswordHash string `json:"passwordHash,omitempty"`
1379
1380 PhotoUrl string `json:"photoUrl,omitempty"`
1381
1382 ProviderUserInfo []*SetAccountInfoResponseProviderUserInfo `json:"providerUserInfo,omitempty"`
1383
1384
1385 RefreshToken string `json:"refreshToken,omitempty"`
1386
1387
1388 googleapi.ServerResponse `json:"-"`
1389
1390
1391
1392
1393
1394 ForceSendFields []string `json:"-"`
1395
1396
1397
1398
1399 NullFields []string `json:"-"`
1400 }
1401
1402 func (s *SetAccountInfoResponse) MarshalJSON() ([]byte, error) {
1403 type NoMethod SetAccountInfoResponse
1404 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1405 }
1406
1407 type SetAccountInfoResponseProviderUserInfo struct {
1408
1409 DisplayName string `json:"displayName,omitempty"`
1410
1411 FederatedId string `json:"federatedId,omitempty"`
1412
1413 PhotoUrl string `json:"photoUrl,omitempty"`
1414
1415
1416
1417 ProviderId string `json:"providerId,omitempty"`
1418
1419
1420
1421
1422
1423 ForceSendFields []string `json:"-"`
1424
1425
1426
1427
1428 NullFields []string `json:"-"`
1429 }
1430
1431 func (s *SetAccountInfoResponseProviderUserInfo) MarshalJSON() ([]byte, error) {
1432 type NoMethod SetAccountInfoResponseProviderUserInfo
1433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1434 }
1435
1436
1437
1438 type SignupNewUserResponse struct {
1439
1440 DisplayName string `json:"displayName,omitempty"`
1441
1442 Email string `json:"email,omitempty"`
1443
1444
1445 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
1446
1447 IdToken string `json:"idToken,omitempty"`
1448
1449 Kind string `json:"kind,omitempty"`
1450
1451 LocalId string `json:"localId,omitempty"`
1452
1453
1454 RefreshToken string `json:"refreshToken,omitempty"`
1455
1456
1457 googleapi.ServerResponse `json:"-"`
1458
1459
1460
1461
1462
1463 ForceSendFields []string `json:"-"`
1464
1465
1466
1467
1468 NullFields []string `json:"-"`
1469 }
1470
1471 func (s *SignupNewUserResponse) MarshalJSON() ([]byte, error) {
1472 type NoMethod SignupNewUserResponse
1473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1474 }
1475
1476
1477 type UploadAccountResponse struct {
1478
1479 Error []*UploadAccountResponseError `json:"error,omitempty"`
1480
1481 Kind string `json:"kind,omitempty"`
1482
1483
1484 googleapi.ServerResponse `json:"-"`
1485
1486
1487
1488
1489
1490 ForceSendFields []string `json:"-"`
1491
1492
1493
1494
1495 NullFields []string `json:"-"`
1496 }
1497
1498 func (s *UploadAccountResponse) MarshalJSON() ([]byte, error) {
1499 type NoMethod UploadAccountResponse
1500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1501 }
1502
1503 type UploadAccountResponseError struct {
1504
1505 Index int64 `json:"index,omitempty"`
1506
1507 Message string `json:"message,omitempty"`
1508
1509
1510
1511
1512
1513 ForceSendFields []string `json:"-"`
1514
1515
1516
1517
1518 NullFields []string `json:"-"`
1519 }
1520
1521 func (s *UploadAccountResponseError) MarshalJSON() ([]byte, error) {
1522 type NoMethod UploadAccountResponseError
1523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1524 }
1525
1526
1527 type UserInfo struct {
1528
1529 CreatedAt int64 `json:"createdAt,omitempty,string"`
1530
1531 CustomAttributes string `json:"customAttributes,omitempty"`
1532
1533 CustomAuth bool `json:"customAuth,omitempty"`
1534
1535 Disabled bool `json:"disabled,omitempty"`
1536
1537 DisplayName string `json:"displayName,omitempty"`
1538
1539 Email string `json:"email,omitempty"`
1540
1541 EmailVerified bool `json:"emailVerified,omitempty"`
1542
1543 LastLoginAt int64 `json:"lastLoginAt,omitempty,string"`
1544
1545 LocalId string `json:"localId,omitempty"`
1546
1547 PasswordHash string `json:"passwordHash,omitempty"`
1548
1549 PasswordUpdatedAt float64 `json:"passwordUpdatedAt,omitempty"`
1550
1551 PhoneNumber string `json:"phoneNumber,omitempty"`
1552
1553 PhotoUrl string `json:"photoUrl,omitempty"`
1554
1555 ProviderUserInfo []*UserInfoProviderUserInfo `json:"providerUserInfo,omitempty"`
1556
1557 RawPassword string `json:"rawPassword,omitempty"`
1558
1559 Salt string `json:"salt,omitempty"`
1560
1561 ScreenName string `json:"screenName,omitempty"`
1562
1563 ValidSince int64 `json:"validSince,omitempty,string"`
1564
1565 Version int64 `json:"version,omitempty"`
1566
1567
1568
1569
1570
1571 ForceSendFields []string `json:"-"`
1572
1573
1574
1575
1576 NullFields []string `json:"-"`
1577 }
1578
1579 func (s *UserInfo) MarshalJSON() ([]byte, error) {
1580 type NoMethod UserInfo
1581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1582 }
1583
1584 func (s *UserInfo) UnmarshalJSON(data []byte) error {
1585 type NoMethod UserInfo
1586 var s1 struct {
1587 PasswordUpdatedAt gensupport.JSONFloat64 `json:"passwordUpdatedAt"`
1588 *NoMethod
1589 }
1590 s1.NoMethod = (*NoMethod)(s)
1591 if err := json.Unmarshal(data, &s1); err != nil {
1592 return err
1593 }
1594 s.PasswordUpdatedAt = float64(s1.PasswordUpdatedAt)
1595 return nil
1596 }
1597
1598 type UserInfoProviderUserInfo struct {
1599
1600 DisplayName string `json:"displayName,omitempty"`
1601
1602 Email string `json:"email,omitempty"`
1603
1604 FederatedId string `json:"federatedId,omitempty"`
1605
1606 PhoneNumber string `json:"phoneNumber,omitempty"`
1607
1608 PhotoUrl string `json:"photoUrl,omitempty"`
1609
1610
1611
1612 ProviderId string `json:"providerId,omitempty"`
1613
1614 RawId string `json:"rawId,omitempty"`
1615
1616 ScreenName string `json:"screenName,omitempty"`
1617
1618
1619
1620
1621
1622 ForceSendFields []string `json:"-"`
1623
1624
1625
1626
1627 NullFields []string `json:"-"`
1628 }
1629
1630 func (s *UserInfoProviderUserInfo) MarshalJSON() ([]byte, error) {
1631 type NoMethod UserInfoProviderUserInfo
1632 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1633 }
1634
1635
1636 type VerifyAssertionResponse struct {
1637
1638 Action string `json:"action,omitempty"`
1639
1640 AppInstallationUrl string `json:"appInstallationUrl,omitempty"`
1641
1642 AppScheme string `json:"appScheme,omitempty"`
1643
1644
1645 Context string `json:"context,omitempty"`
1646
1647 DateOfBirth string `json:"dateOfBirth,omitempty"`
1648
1649 DisplayName string `json:"displayName,omitempty"`
1650
1651
1652 Email string `json:"email,omitempty"`
1653
1654 EmailRecycled bool `json:"emailRecycled,omitempty"`
1655
1656
1657 EmailVerified bool `json:"emailVerified,omitempty"`
1658
1659 ErrorMessage string `json:"errorMessage,omitempty"`
1660
1661
1662 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
1663
1664 FederatedId string `json:"federatedId,omitempty"`
1665
1666 FirstName string `json:"firstName,omitempty"`
1667
1668 FullName string `json:"fullName,omitempty"`
1669
1670 IdToken string `json:"idToken,omitempty"`
1671
1672
1673
1674 InputEmail string `json:"inputEmail,omitempty"`
1675
1676 IsNewUser bool `json:"isNewUser,omitempty"`
1677
1678 Kind string `json:"kind,omitempty"`
1679
1680 Language string `json:"language,omitempty"`
1681
1682 LastName string `json:"lastName,omitempty"`
1683
1684
1685 LocalId string `json:"localId,omitempty"`
1686
1687
1688 NeedConfirmation bool `json:"needConfirmation,omitempty"`
1689
1690
1691 NeedEmail bool `json:"needEmail,omitempty"`
1692
1693 NickName string `json:"nickName,omitempty"`
1694
1695 OauthAccessToken string `json:"oauthAccessToken,omitempty"`
1696
1697 OauthAuthorizationCode string `json:"oauthAuthorizationCode,omitempty"`
1698
1699 OauthExpireIn int64 `json:"oauthExpireIn,omitempty"`
1700
1701 OauthIdToken string `json:"oauthIdToken,omitempty"`
1702
1703
1704 OauthRequestToken string `json:"oauthRequestToken,omitempty"`
1705
1706 OauthScope string `json:"oauthScope,omitempty"`
1707
1708 OauthTokenSecret string `json:"oauthTokenSecret,omitempty"`
1709
1710
1711 OriginalEmail string `json:"originalEmail,omitempty"`
1712
1713 PhotoUrl string `json:"photoUrl,omitempty"`
1714
1715
1716
1717
1718
1719 ProviderId string `json:"providerId,omitempty"`
1720
1721 RawUserInfo string `json:"rawUserInfo,omitempty"`
1722
1723
1724 RefreshToken string `json:"refreshToken,omitempty"`
1725
1726 ScreenName string `json:"screenName,omitempty"`
1727
1728 TimeZone string `json:"timeZone,omitempty"`
1729
1730
1731 VerifiedProvider []string `json:"verifiedProvider,omitempty"`
1732
1733
1734 googleapi.ServerResponse `json:"-"`
1735
1736
1737
1738
1739
1740 ForceSendFields []string `json:"-"`
1741
1742
1743
1744
1745 NullFields []string `json:"-"`
1746 }
1747
1748 func (s *VerifyAssertionResponse) MarshalJSON() ([]byte, error) {
1749 type NoMethod VerifyAssertionResponse
1750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1751 }
1752
1753
1754 type VerifyCustomTokenResponse struct {
1755
1756
1757 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
1758
1759 IdToken string `json:"idToken,omitempty"`
1760
1761 IsNewUser bool `json:"isNewUser,omitempty"`
1762
1763 Kind string `json:"kind,omitempty"`
1764
1765
1766 RefreshToken string `json:"refreshToken,omitempty"`
1767
1768
1769 googleapi.ServerResponse `json:"-"`
1770
1771
1772
1773
1774
1775 ForceSendFields []string `json:"-"`
1776
1777
1778
1779
1780 NullFields []string `json:"-"`
1781 }
1782
1783 func (s *VerifyCustomTokenResponse) MarshalJSON() ([]byte, error) {
1784 type NoMethod VerifyCustomTokenResponse
1785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1786 }
1787
1788
1789 type VerifyPasswordResponse struct {
1790
1791 DisplayName string `json:"displayName,omitempty"`
1792
1793
1794 Email string `json:"email,omitempty"`
1795
1796
1797 ExpiresIn int64 `json:"expiresIn,omitempty,string"`
1798
1799 IdToken string `json:"idToken,omitempty"`
1800
1801 Kind string `json:"kind,omitempty"`
1802
1803
1804 LocalId string `json:"localId,omitempty"`
1805
1806 OauthAccessToken string `json:"oauthAccessToken,omitempty"`
1807
1808 OauthAuthorizationCode string `json:"oauthAuthorizationCode,omitempty"`
1809
1810 OauthExpireIn int64 `json:"oauthExpireIn,omitempty"`
1811
1812 PhotoUrl string `json:"photoUrl,omitempty"`
1813
1814
1815 RefreshToken string `json:"refreshToken,omitempty"`
1816
1817 Registered bool `json:"registered,omitempty"`
1818
1819
1820 googleapi.ServerResponse `json:"-"`
1821
1822
1823
1824
1825
1826 ForceSendFields []string `json:"-"`
1827
1828
1829
1830
1831 NullFields []string `json:"-"`
1832 }
1833
1834 func (s *VerifyPasswordResponse) MarshalJSON() ([]byte, error) {
1835 type NoMethod VerifyPasswordResponse
1836 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1837 }
1838
1839 type RelyingpartyCreateAuthUriCall struct {
1840 s *Service
1841 identitytoolkitrelyingpartycreateauthurirequest *IdentitytoolkitRelyingpartyCreateAuthUriRequest
1842 urlParams_ gensupport.URLParams
1843 ctx_ context.Context
1844 header_ http.Header
1845 }
1846
1847
1848 func (r *RelyingpartyService) CreateAuthUri(identitytoolkitrelyingpartycreateauthurirequest *IdentitytoolkitRelyingpartyCreateAuthUriRequest) *RelyingpartyCreateAuthUriCall {
1849 c := &RelyingpartyCreateAuthUriCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1850 c.identitytoolkitrelyingpartycreateauthurirequest = identitytoolkitrelyingpartycreateauthurirequest
1851 return c
1852 }
1853
1854
1855
1856
1857 func (c *RelyingpartyCreateAuthUriCall) Fields(s ...googleapi.Field) *RelyingpartyCreateAuthUriCall {
1858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1859 return c
1860 }
1861
1862
1863 func (c *RelyingpartyCreateAuthUriCall) Context(ctx context.Context) *RelyingpartyCreateAuthUriCall {
1864 c.ctx_ = ctx
1865 return c
1866 }
1867
1868
1869
1870 func (c *RelyingpartyCreateAuthUriCall) Header() http.Header {
1871 if c.header_ == nil {
1872 c.header_ = make(http.Header)
1873 }
1874 return c.header_
1875 }
1876
1877 func (c *RelyingpartyCreateAuthUriCall) doRequest(alt string) (*http.Response, error) {
1878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1879 var body io.Reader = nil
1880 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartycreateauthurirequest)
1881 if err != nil {
1882 return nil, err
1883 }
1884 c.urlParams_.Set("alt", alt)
1885 c.urlParams_.Set("prettyPrint", "false")
1886 urls := googleapi.ResolveRelative(c.s.BasePath, "createAuthUri")
1887 urls += "?" + c.urlParams_.Encode()
1888 req, err := http.NewRequest("POST", urls, body)
1889 if err != nil {
1890 return nil, err
1891 }
1892 req.Header = reqHeaders
1893 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1894 }
1895
1896
1897
1898
1899
1900
1901
1902 func (c *RelyingpartyCreateAuthUriCall) Do(opts ...googleapi.CallOption) (*CreateAuthUriResponse, error) {
1903 gensupport.SetOptions(c.urlParams_, opts...)
1904 res, err := c.doRequest("json")
1905 if res != nil && res.StatusCode == http.StatusNotModified {
1906 if res.Body != nil {
1907 res.Body.Close()
1908 }
1909 return nil, gensupport.WrapError(&googleapi.Error{
1910 Code: res.StatusCode,
1911 Header: res.Header,
1912 })
1913 }
1914 if err != nil {
1915 return nil, err
1916 }
1917 defer googleapi.CloseBody(res)
1918 if err := googleapi.CheckResponse(res); err != nil {
1919 return nil, gensupport.WrapError(err)
1920 }
1921 ret := &CreateAuthUriResponse{
1922 ServerResponse: googleapi.ServerResponse{
1923 Header: res.Header,
1924 HTTPStatusCode: res.StatusCode,
1925 },
1926 }
1927 target := &ret
1928 if err := gensupport.DecodeResponse(target, res); err != nil {
1929 return nil, err
1930 }
1931 return ret, nil
1932 }
1933
1934 type RelyingpartyDeleteAccountCall struct {
1935 s *Service
1936 identitytoolkitrelyingpartydeleteaccountrequest *IdentitytoolkitRelyingpartyDeleteAccountRequest
1937 urlParams_ gensupport.URLParams
1938 ctx_ context.Context
1939 header_ http.Header
1940 }
1941
1942
1943 func (r *RelyingpartyService) DeleteAccount(identitytoolkitrelyingpartydeleteaccountrequest *IdentitytoolkitRelyingpartyDeleteAccountRequest) *RelyingpartyDeleteAccountCall {
1944 c := &RelyingpartyDeleteAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1945 c.identitytoolkitrelyingpartydeleteaccountrequest = identitytoolkitrelyingpartydeleteaccountrequest
1946 return c
1947 }
1948
1949
1950
1951
1952 func (c *RelyingpartyDeleteAccountCall) Fields(s ...googleapi.Field) *RelyingpartyDeleteAccountCall {
1953 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1954 return c
1955 }
1956
1957
1958 func (c *RelyingpartyDeleteAccountCall) Context(ctx context.Context) *RelyingpartyDeleteAccountCall {
1959 c.ctx_ = ctx
1960 return c
1961 }
1962
1963
1964
1965 func (c *RelyingpartyDeleteAccountCall) Header() http.Header {
1966 if c.header_ == nil {
1967 c.header_ = make(http.Header)
1968 }
1969 return c.header_
1970 }
1971
1972 func (c *RelyingpartyDeleteAccountCall) doRequest(alt string) (*http.Response, error) {
1973 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1974 var body io.Reader = nil
1975 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartydeleteaccountrequest)
1976 if err != nil {
1977 return nil, err
1978 }
1979 c.urlParams_.Set("alt", alt)
1980 c.urlParams_.Set("prettyPrint", "false")
1981 urls := googleapi.ResolveRelative(c.s.BasePath, "deleteAccount")
1982 urls += "?" + c.urlParams_.Encode()
1983 req, err := http.NewRequest("POST", urls, body)
1984 if err != nil {
1985 return nil, err
1986 }
1987 req.Header = reqHeaders
1988 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1989 }
1990
1991
1992
1993
1994
1995
1996
1997 func (c *RelyingpartyDeleteAccountCall) Do(opts ...googleapi.CallOption) (*DeleteAccountResponse, error) {
1998 gensupport.SetOptions(c.urlParams_, opts...)
1999 res, err := c.doRequest("json")
2000 if res != nil && res.StatusCode == http.StatusNotModified {
2001 if res.Body != nil {
2002 res.Body.Close()
2003 }
2004 return nil, gensupport.WrapError(&googleapi.Error{
2005 Code: res.StatusCode,
2006 Header: res.Header,
2007 })
2008 }
2009 if err != nil {
2010 return nil, err
2011 }
2012 defer googleapi.CloseBody(res)
2013 if err := googleapi.CheckResponse(res); err != nil {
2014 return nil, gensupport.WrapError(err)
2015 }
2016 ret := &DeleteAccountResponse{
2017 ServerResponse: googleapi.ServerResponse{
2018 Header: res.Header,
2019 HTTPStatusCode: res.StatusCode,
2020 },
2021 }
2022 target := &ret
2023 if err := gensupport.DecodeResponse(target, res); err != nil {
2024 return nil, err
2025 }
2026 return ret, nil
2027 }
2028
2029 type RelyingpartyDownloadAccountCall struct {
2030 s *Service
2031 identitytoolkitrelyingpartydownloadaccountrequest *IdentitytoolkitRelyingpartyDownloadAccountRequest
2032 urlParams_ gensupport.URLParams
2033 ctx_ context.Context
2034 header_ http.Header
2035 }
2036
2037
2038 func (r *RelyingpartyService) DownloadAccount(identitytoolkitrelyingpartydownloadaccountrequest *IdentitytoolkitRelyingpartyDownloadAccountRequest) *RelyingpartyDownloadAccountCall {
2039 c := &RelyingpartyDownloadAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2040 c.identitytoolkitrelyingpartydownloadaccountrequest = identitytoolkitrelyingpartydownloadaccountrequest
2041 return c
2042 }
2043
2044
2045
2046
2047 func (c *RelyingpartyDownloadAccountCall) Fields(s ...googleapi.Field) *RelyingpartyDownloadAccountCall {
2048 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2049 return c
2050 }
2051
2052
2053 func (c *RelyingpartyDownloadAccountCall) Context(ctx context.Context) *RelyingpartyDownloadAccountCall {
2054 c.ctx_ = ctx
2055 return c
2056 }
2057
2058
2059
2060 func (c *RelyingpartyDownloadAccountCall) Header() http.Header {
2061 if c.header_ == nil {
2062 c.header_ = make(http.Header)
2063 }
2064 return c.header_
2065 }
2066
2067 func (c *RelyingpartyDownloadAccountCall) doRequest(alt string) (*http.Response, error) {
2068 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2069 var body io.Reader = nil
2070 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartydownloadaccountrequest)
2071 if err != nil {
2072 return nil, err
2073 }
2074 c.urlParams_.Set("alt", alt)
2075 c.urlParams_.Set("prettyPrint", "false")
2076 urls := googleapi.ResolveRelative(c.s.BasePath, "downloadAccount")
2077 urls += "?" + c.urlParams_.Encode()
2078 req, err := http.NewRequest("POST", urls, body)
2079 if err != nil {
2080 return nil, err
2081 }
2082 req.Header = reqHeaders
2083 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2084 }
2085
2086
2087
2088
2089
2090
2091
2092 func (c *RelyingpartyDownloadAccountCall) Do(opts ...googleapi.CallOption) (*DownloadAccountResponse, error) {
2093 gensupport.SetOptions(c.urlParams_, opts...)
2094 res, err := c.doRequest("json")
2095 if res != nil && res.StatusCode == http.StatusNotModified {
2096 if res.Body != nil {
2097 res.Body.Close()
2098 }
2099 return nil, gensupport.WrapError(&googleapi.Error{
2100 Code: res.StatusCode,
2101 Header: res.Header,
2102 })
2103 }
2104 if err != nil {
2105 return nil, err
2106 }
2107 defer googleapi.CloseBody(res)
2108 if err := googleapi.CheckResponse(res); err != nil {
2109 return nil, gensupport.WrapError(err)
2110 }
2111 ret := &DownloadAccountResponse{
2112 ServerResponse: googleapi.ServerResponse{
2113 Header: res.Header,
2114 HTTPStatusCode: res.StatusCode,
2115 },
2116 }
2117 target := &ret
2118 if err := gensupport.DecodeResponse(target, res); err != nil {
2119 return nil, err
2120 }
2121 return ret, nil
2122 }
2123
2124
2125
2126
2127 func (c *RelyingpartyDownloadAccountCall) Pages(ctx context.Context, f func(*DownloadAccountResponse) error) error {
2128 c.ctx_ = ctx
2129 defer func(pt string) { c.identitytoolkitrelyingpartydownloadaccountrequest.NextPageToken = pt }(c.identitytoolkitrelyingpartydownloadaccountrequest.NextPageToken)
2130 for {
2131 x, err := c.Do()
2132 if err != nil {
2133 return err
2134 }
2135 if err := f(x); err != nil {
2136 return err
2137 }
2138 if x.NextPageToken == "" {
2139 return nil
2140 }
2141 c.identitytoolkitrelyingpartydownloadaccountrequest.NextPageToken = x.NextPageToken
2142 }
2143 }
2144
2145 type RelyingpartyEmailLinkSigninCall struct {
2146 s *Service
2147 identitytoolkitrelyingpartyemaillinksigninrequest *IdentitytoolkitRelyingpartyEmailLinkSigninRequest
2148 urlParams_ gensupport.URLParams
2149 ctx_ context.Context
2150 header_ http.Header
2151 }
2152
2153
2154 func (r *RelyingpartyService) EmailLinkSignin(identitytoolkitrelyingpartyemaillinksigninrequest *IdentitytoolkitRelyingpartyEmailLinkSigninRequest) *RelyingpartyEmailLinkSigninCall {
2155 c := &RelyingpartyEmailLinkSigninCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2156 c.identitytoolkitrelyingpartyemaillinksigninrequest = identitytoolkitrelyingpartyemaillinksigninrequest
2157 return c
2158 }
2159
2160
2161
2162
2163 func (c *RelyingpartyEmailLinkSigninCall) Fields(s ...googleapi.Field) *RelyingpartyEmailLinkSigninCall {
2164 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2165 return c
2166 }
2167
2168
2169 func (c *RelyingpartyEmailLinkSigninCall) Context(ctx context.Context) *RelyingpartyEmailLinkSigninCall {
2170 c.ctx_ = ctx
2171 return c
2172 }
2173
2174
2175
2176 func (c *RelyingpartyEmailLinkSigninCall) Header() http.Header {
2177 if c.header_ == nil {
2178 c.header_ = make(http.Header)
2179 }
2180 return c.header_
2181 }
2182
2183 func (c *RelyingpartyEmailLinkSigninCall) doRequest(alt string) (*http.Response, error) {
2184 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2185 var body io.Reader = nil
2186 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyemaillinksigninrequest)
2187 if err != nil {
2188 return nil, err
2189 }
2190 c.urlParams_.Set("alt", alt)
2191 c.urlParams_.Set("prettyPrint", "false")
2192 urls := googleapi.ResolveRelative(c.s.BasePath, "emailLinkSignin")
2193 urls += "?" + c.urlParams_.Encode()
2194 req, err := http.NewRequest("POST", urls, body)
2195 if err != nil {
2196 return nil, err
2197 }
2198 req.Header = reqHeaders
2199 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2200 }
2201
2202
2203
2204
2205
2206
2207
2208 func (c *RelyingpartyEmailLinkSigninCall) Do(opts ...googleapi.CallOption) (*EmailLinkSigninResponse, error) {
2209 gensupport.SetOptions(c.urlParams_, opts...)
2210 res, err := c.doRequest("json")
2211 if res != nil && res.StatusCode == http.StatusNotModified {
2212 if res.Body != nil {
2213 res.Body.Close()
2214 }
2215 return nil, gensupport.WrapError(&googleapi.Error{
2216 Code: res.StatusCode,
2217 Header: res.Header,
2218 })
2219 }
2220 if err != nil {
2221 return nil, err
2222 }
2223 defer googleapi.CloseBody(res)
2224 if err := googleapi.CheckResponse(res); err != nil {
2225 return nil, gensupport.WrapError(err)
2226 }
2227 ret := &EmailLinkSigninResponse{
2228 ServerResponse: googleapi.ServerResponse{
2229 Header: res.Header,
2230 HTTPStatusCode: res.StatusCode,
2231 },
2232 }
2233 target := &ret
2234 if err := gensupport.DecodeResponse(target, res); err != nil {
2235 return nil, err
2236 }
2237 return ret, nil
2238 }
2239
2240 type RelyingpartyGetAccountInfoCall struct {
2241 s *Service
2242 identitytoolkitrelyingpartygetaccountinforequest *IdentitytoolkitRelyingpartyGetAccountInfoRequest
2243 urlParams_ gensupport.URLParams
2244 ctx_ context.Context
2245 header_ http.Header
2246 }
2247
2248
2249 func (r *RelyingpartyService) GetAccountInfo(identitytoolkitrelyingpartygetaccountinforequest *IdentitytoolkitRelyingpartyGetAccountInfoRequest) *RelyingpartyGetAccountInfoCall {
2250 c := &RelyingpartyGetAccountInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2251 c.identitytoolkitrelyingpartygetaccountinforequest = identitytoolkitrelyingpartygetaccountinforequest
2252 return c
2253 }
2254
2255
2256
2257
2258 func (c *RelyingpartyGetAccountInfoCall) Fields(s ...googleapi.Field) *RelyingpartyGetAccountInfoCall {
2259 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2260 return c
2261 }
2262
2263
2264 func (c *RelyingpartyGetAccountInfoCall) Context(ctx context.Context) *RelyingpartyGetAccountInfoCall {
2265 c.ctx_ = ctx
2266 return c
2267 }
2268
2269
2270
2271 func (c *RelyingpartyGetAccountInfoCall) Header() http.Header {
2272 if c.header_ == nil {
2273 c.header_ = make(http.Header)
2274 }
2275 return c.header_
2276 }
2277
2278 func (c *RelyingpartyGetAccountInfoCall) doRequest(alt string) (*http.Response, error) {
2279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2280 var body io.Reader = nil
2281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartygetaccountinforequest)
2282 if err != nil {
2283 return nil, err
2284 }
2285 c.urlParams_.Set("alt", alt)
2286 c.urlParams_.Set("prettyPrint", "false")
2287 urls := googleapi.ResolveRelative(c.s.BasePath, "getAccountInfo")
2288 urls += "?" + c.urlParams_.Encode()
2289 req, err := http.NewRequest("POST", urls, body)
2290 if err != nil {
2291 return nil, err
2292 }
2293 req.Header = reqHeaders
2294 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2295 }
2296
2297
2298
2299
2300
2301
2302
2303 func (c *RelyingpartyGetAccountInfoCall) Do(opts ...googleapi.CallOption) (*GetAccountInfoResponse, error) {
2304 gensupport.SetOptions(c.urlParams_, opts...)
2305 res, err := c.doRequest("json")
2306 if res != nil && res.StatusCode == http.StatusNotModified {
2307 if res.Body != nil {
2308 res.Body.Close()
2309 }
2310 return nil, gensupport.WrapError(&googleapi.Error{
2311 Code: res.StatusCode,
2312 Header: res.Header,
2313 })
2314 }
2315 if err != nil {
2316 return nil, err
2317 }
2318 defer googleapi.CloseBody(res)
2319 if err := googleapi.CheckResponse(res); err != nil {
2320 return nil, gensupport.WrapError(err)
2321 }
2322 ret := &GetAccountInfoResponse{
2323 ServerResponse: googleapi.ServerResponse{
2324 Header: res.Header,
2325 HTTPStatusCode: res.StatusCode,
2326 },
2327 }
2328 target := &ret
2329 if err := gensupport.DecodeResponse(target, res); err != nil {
2330 return nil, err
2331 }
2332 return ret, nil
2333 }
2334
2335 type RelyingpartyGetOobConfirmationCodeCall struct {
2336 s *Service
2337 relyingparty *Relyingparty
2338 urlParams_ gensupport.URLParams
2339 ctx_ context.Context
2340 header_ http.Header
2341 }
2342
2343
2344 func (r *RelyingpartyService) GetOobConfirmationCode(relyingparty *Relyingparty) *RelyingpartyGetOobConfirmationCodeCall {
2345 c := &RelyingpartyGetOobConfirmationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2346 c.relyingparty = relyingparty
2347 return c
2348 }
2349
2350
2351
2352
2353 func (c *RelyingpartyGetOobConfirmationCodeCall) Fields(s ...googleapi.Field) *RelyingpartyGetOobConfirmationCodeCall {
2354 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2355 return c
2356 }
2357
2358
2359 func (c *RelyingpartyGetOobConfirmationCodeCall) Context(ctx context.Context) *RelyingpartyGetOobConfirmationCodeCall {
2360 c.ctx_ = ctx
2361 return c
2362 }
2363
2364
2365
2366 func (c *RelyingpartyGetOobConfirmationCodeCall) Header() http.Header {
2367 if c.header_ == nil {
2368 c.header_ = make(http.Header)
2369 }
2370 return c.header_
2371 }
2372
2373 func (c *RelyingpartyGetOobConfirmationCodeCall) doRequest(alt string) (*http.Response, error) {
2374 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2375 var body io.Reader = nil
2376 body, err := googleapi.WithoutDataWrapper.JSONReader(c.relyingparty)
2377 if err != nil {
2378 return nil, err
2379 }
2380 c.urlParams_.Set("alt", alt)
2381 c.urlParams_.Set("prettyPrint", "false")
2382 urls := googleapi.ResolveRelative(c.s.BasePath, "getOobConfirmationCode")
2383 urls += "?" + c.urlParams_.Encode()
2384 req, err := http.NewRequest("POST", urls, body)
2385 if err != nil {
2386 return nil, err
2387 }
2388 req.Header = reqHeaders
2389 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2390 }
2391
2392
2393
2394
2395
2396
2397
2398 func (c *RelyingpartyGetOobConfirmationCodeCall) Do(opts ...googleapi.CallOption) (*GetOobConfirmationCodeResponse, error) {
2399 gensupport.SetOptions(c.urlParams_, opts...)
2400 res, err := c.doRequest("json")
2401 if res != nil && res.StatusCode == http.StatusNotModified {
2402 if res.Body != nil {
2403 res.Body.Close()
2404 }
2405 return nil, gensupport.WrapError(&googleapi.Error{
2406 Code: res.StatusCode,
2407 Header: res.Header,
2408 })
2409 }
2410 if err != nil {
2411 return nil, err
2412 }
2413 defer googleapi.CloseBody(res)
2414 if err := googleapi.CheckResponse(res); err != nil {
2415 return nil, gensupport.WrapError(err)
2416 }
2417 ret := &GetOobConfirmationCodeResponse{
2418 ServerResponse: googleapi.ServerResponse{
2419 Header: res.Header,
2420 HTTPStatusCode: res.StatusCode,
2421 },
2422 }
2423 target := &ret
2424 if err := gensupport.DecodeResponse(target, res); err != nil {
2425 return nil, err
2426 }
2427 return ret, nil
2428 }
2429
2430 type RelyingpartyGetProjectConfigCall struct {
2431 s *Service
2432 urlParams_ gensupport.URLParams
2433 ifNoneMatch_ string
2434 ctx_ context.Context
2435 header_ http.Header
2436 }
2437
2438
2439 func (r *RelyingpartyService) GetProjectConfig() *RelyingpartyGetProjectConfigCall {
2440 c := &RelyingpartyGetProjectConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2441 return c
2442 }
2443
2444
2445
2446 func (c *RelyingpartyGetProjectConfigCall) DelegatedProjectNumber(delegatedProjectNumber string) *RelyingpartyGetProjectConfigCall {
2447 c.urlParams_.Set("delegatedProjectNumber", delegatedProjectNumber)
2448 return c
2449 }
2450
2451
2452
2453 func (c *RelyingpartyGetProjectConfigCall) ProjectNumber(projectNumber string) *RelyingpartyGetProjectConfigCall {
2454 c.urlParams_.Set("projectNumber", projectNumber)
2455 return c
2456 }
2457
2458
2459
2460
2461 func (c *RelyingpartyGetProjectConfigCall) Fields(s ...googleapi.Field) *RelyingpartyGetProjectConfigCall {
2462 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2463 return c
2464 }
2465
2466
2467
2468
2469 func (c *RelyingpartyGetProjectConfigCall) IfNoneMatch(entityTag string) *RelyingpartyGetProjectConfigCall {
2470 c.ifNoneMatch_ = entityTag
2471 return c
2472 }
2473
2474
2475 func (c *RelyingpartyGetProjectConfigCall) Context(ctx context.Context) *RelyingpartyGetProjectConfigCall {
2476 c.ctx_ = ctx
2477 return c
2478 }
2479
2480
2481
2482 func (c *RelyingpartyGetProjectConfigCall) Header() http.Header {
2483 if c.header_ == nil {
2484 c.header_ = make(http.Header)
2485 }
2486 return c.header_
2487 }
2488
2489 func (c *RelyingpartyGetProjectConfigCall) doRequest(alt string) (*http.Response, error) {
2490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2491 if c.ifNoneMatch_ != "" {
2492 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2493 }
2494 var body io.Reader = nil
2495 c.urlParams_.Set("alt", alt)
2496 c.urlParams_.Set("prettyPrint", "false")
2497 urls := googleapi.ResolveRelative(c.s.BasePath, "getProjectConfig")
2498 urls += "?" + c.urlParams_.Encode()
2499 req, err := http.NewRequest("GET", urls, body)
2500 if err != nil {
2501 return nil, err
2502 }
2503 req.Header = reqHeaders
2504 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2505 }
2506
2507
2508
2509
2510
2511
2512
2513 func (c *RelyingpartyGetProjectConfigCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartyGetProjectConfigResponse, error) {
2514 gensupport.SetOptions(c.urlParams_, opts...)
2515 res, err := c.doRequest("json")
2516 if res != nil && res.StatusCode == http.StatusNotModified {
2517 if res.Body != nil {
2518 res.Body.Close()
2519 }
2520 return nil, gensupport.WrapError(&googleapi.Error{
2521 Code: res.StatusCode,
2522 Header: res.Header,
2523 })
2524 }
2525 if err != nil {
2526 return nil, err
2527 }
2528 defer googleapi.CloseBody(res)
2529 if err := googleapi.CheckResponse(res); err != nil {
2530 return nil, gensupport.WrapError(err)
2531 }
2532 ret := &IdentitytoolkitRelyingpartyGetProjectConfigResponse{
2533 ServerResponse: googleapi.ServerResponse{
2534 Header: res.Header,
2535 HTTPStatusCode: res.StatusCode,
2536 },
2537 }
2538 target := &ret
2539 if err := gensupport.DecodeResponse(target, res); err != nil {
2540 return nil, err
2541 }
2542 return ret, nil
2543 }
2544
2545 type RelyingpartyGetPublicKeysCall struct {
2546 s *Service
2547 urlParams_ gensupport.URLParams
2548 ifNoneMatch_ string
2549 ctx_ context.Context
2550 header_ http.Header
2551 }
2552
2553
2554 func (r *RelyingpartyService) GetPublicKeys() *RelyingpartyGetPublicKeysCall {
2555 c := &RelyingpartyGetPublicKeysCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2556 return c
2557 }
2558
2559
2560
2561
2562 func (c *RelyingpartyGetPublicKeysCall) Fields(s ...googleapi.Field) *RelyingpartyGetPublicKeysCall {
2563 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2564 return c
2565 }
2566
2567
2568
2569
2570 func (c *RelyingpartyGetPublicKeysCall) IfNoneMatch(entityTag string) *RelyingpartyGetPublicKeysCall {
2571 c.ifNoneMatch_ = entityTag
2572 return c
2573 }
2574
2575
2576 func (c *RelyingpartyGetPublicKeysCall) Context(ctx context.Context) *RelyingpartyGetPublicKeysCall {
2577 c.ctx_ = ctx
2578 return c
2579 }
2580
2581
2582
2583 func (c *RelyingpartyGetPublicKeysCall) Header() http.Header {
2584 if c.header_ == nil {
2585 c.header_ = make(http.Header)
2586 }
2587 return c.header_
2588 }
2589
2590 func (c *RelyingpartyGetPublicKeysCall) doRequest(alt string) (*http.Response, error) {
2591 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2592 if c.ifNoneMatch_ != "" {
2593 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2594 }
2595 var body io.Reader = nil
2596 c.urlParams_.Set("alt", alt)
2597 c.urlParams_.Set("prettyPrint", "false")
2598 urls := googleapi.ResolveRelative(c.s.BasePath, "publicKeys")
2599 urls += "?" + c.urlParams_.Encode()
2600 req, err := http.NewRequest("GET", urls, body)
2601 if err != nil {
2602 return nil, err
2603 }
2604 req.Header = reqHeaders
2605 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2606 }
2607
2608
2609 func (c *RelyingpartyGetPublicKeysCall) Do(opts ...googleapi.CallOption) (map[string]string, error) {
2610 gensupport.SetOptions(c.urlParams_, opts...)
2611 res, err := c.doRequest("json")
2612 if err != nil {
2613 return nil, err
2614 }
2615 defer googleapi.CloseBody(res)
2616 if err := googleapi.CheckResponse(res); err != nil {
2617 return nil, gensupport.WrapError(err)
2618 }
2619 var ret map[string]string
2620 target := &ret
2621 if err := gensupport.DecodeResponse(target, res); err != nil {
2622 return nil, err
2623 }
2624 return ret, nil
2625 }
2626
2627 type RelyingpartyGetRecaptchaParamCall struct {
2628 s *Service
2629 urlParams_ gensupport.URLParams
2630 ifNoneMatch_ string
2631 ctx_ context.Context
2632 header_ http.Header
2633 }
2634
2635
2636 func (r *RelyingpartyService) GetRecaptchaParam() *RelyingpartyGetRecaptchaParamCall {
2637 c := &RelyingpartyGetRecaptchaParamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2638 return c
2639 }
2640
2641
2642
2643
2644 func (c *RelyingpartyGetRecaptchaParamCall) Fields(s ...googleapi.Field) *RelyingpartyGetRecaptchaParamCall {
2645 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2646 return c
2647 }
2648
2649
2650
2651
2652 func (c *RelyingpartyGetRecaptchaParamCall) IfNoneMatch(entityTag string) *RelyingpartyGetRecaptchaParamCall {
2653 c.ifNoneMatch_ = entityTag
2654 return c
2655 }
2656
2657
2658 func (c *RelyingpartyGetRecaptchaParamCall) Context(ctx context.Context) *RelyingpartyGetRecaptchaParamCall {
2659 c.ctx_ = ctx
2660 return c
2661 }
2662
2663
2664
2665 func (c *RelyingpartyGetRecaptchaParamCall) Header() http.Header {
2666 if c.header_ == nil {
2667 c.header_ = make(http.Header)
2668 }
2669 return c.header_
2670 }
2671
2672 func (c *RelyingpartyGetRecaptchaParamCall) doRequest(alt string) (*http.Response, error) {
2673 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2674 if c.ifNoneMatch_ != "" {
2675 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2676 }
2677 var body io.Reader = nil
2678 c.urlParams_.Set("alt", alt)
2679 c.urlParams_.Set("prettyPrint", "false")
2680 urls := googleapi.ResolveRelative(c.s.BasePath, "getRecaptchaParam")
2681 urls += "?" + c.urlParams_.Encode()
2682 req, err := http.NewRequest("GET", urls, body)
2683 if err != nil {
2684 return nil, err
2685 }
2686 req.Header = reqHeaders
2687 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2688 }
2689
2690
2691
2692
2693
2694
2695
2696 func (c *RelyingpartyGetRecaptchaParamCall) Do(opts ...googleapi.CallOption) (*GetRecaptchaParamResponse, error) {
2697 gensupport.SetOptions(c.urlParams_, opts...)
2698 res, err := c.doRequest("json")
2699 if res != nil && res.StatusCode == http.StatusNotModified {
2700 if res.Body != nil {
2701 res.Body.Close()
2702 }
2703 return nil, gensupport.WrapError(&googleapi.Error{
2704 Code: res.StatusCode,
2705 Header: res.Header,
2706 })
2707 }
2708 if err != nil {
2709 return nil, err
2710 }
2711 defer googleapi.CloseBody(res)
2712 if err := googleapi.CheckResponse(res); err != nil {
2713 return nil, gensupport.WrapError(err)
2714 }
2715 ret := &GetRecaptchaParamResponse{
2716 ServerResponse: googleapi.ServerResponse{
2717 Header: res.Header,
2718 HTTPStatusCode: res.StatusCode,
2719 },
2720 }
2721 target := &ret
2722 if err := gensupport.DecodeResponse(target, res); err != nil {
2723 return nil, err
2724 }
2725 return ret, nil
2726 }
2727
2728 type RelyingpartyResetPasswordCall struct {
2729 s *Service
2730 identitytoolkitrelyingpartyresetpasswordrequest *IdentitytoolkitRelyingpartyResetPasswordRequest
2731 urlParams_ gensupport.URLParams
2732 ctx_ context.Context
2733 header_ http.Header
2734 }
2735
2736
2737 func (r *RelyingpartyService) ResetPassword(identitytoolkitrelyingpartyresetpasswordrequest *IdentitytoolkitRelyingpartyResetPasswordRequest) *RelyingpartyResetPasswordCall {
2738 c := &RelyingpartyResetPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2739 c.identitytoolkitrelyingpartyresetpasswordrequest = identitytoolkitrelyingpartyresetpasswordrequest
2740 return c
2741 }
2742
2743
2744
2745
2746 func (c *RelyingpartyResetPasswordCall) Fields(s ...googleapi.Field) *RelyingpartyResetPasswordCall {
2747 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2748 return c
2749 }
2750
2751
2752 func (c *RelyingpartyResetPasswordCall) Context(ctx context.Context) *RelyingpartyResetPasswordCall {
2753 c.ctx_ = ctx
2754 return c
2755 }
2756
2757
2758
2759 func (c *RelyingpartyResetPasswordCall) Header() http.Header {
2760 if c.header_ == nil {
2761 c.header_ = make(http.Header)
2762 }
2763 return c.header_
2764 }
2765
2766 func (c *RelyingpartyResetPasswordCall) doRequest(alt string) (*http.Response, error) {
2767 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2768 var body io.Reader = nil
2769 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyresetpasswordrequest)
2770 if err != nil {
2771 return nil, err
2772 }
2773 c.urlParams_.Set("alt", alt)
2774 c.urlParams_.Set("prettyPrint", "false")
2775 urls := googleapi.ResolveRelative(c.s.BasePath, "resetPassword")
2776 urls += "?" + c.urlParams_.Encode()
2777 req, err := http.NewRequest("POST", urls, body)
2778 if err != nil {
2779 return nil, err
2780 }
2781 req.Header = reqHeaders
2782 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2783 }
2784
2785
2786
2787
2788
2789
2790
2791 func (c *RelyingpartyResetPasswordCall) Do(opts ...googleapi.CallOption) (*ResetPasswordResponse, error) {
2792 gensupport.SetOptions(c.urlParams_, opts...)
2793 res, err := c.doRequest("json")
2794 if res != nil && res.StatusCode == http.StatusNotModified {
2795 if res.Body != nil {
2796 res.Body.Close()
2797 }
2798 return nil, gensupport.WrapError(&googleapi.Error{
2799 Code: res.StatusCode,
2800 Header: res.Header,
2801 })
2802 }
2803 if err != nil {
2804 return nil, err
2805 }
2806 defer googleapi.CloseBody(res)
2807 if err := googleapi.CheckResponse(res); err != nil {
2808 return nil, gensupport.WrapError(err)
2809 }
2810 ret := &ResetPasswordResponse{
2811 ServerResponse: googleapi.ServerResponse{
2812 Header: res.Header,
2813 HTTPStatusCode: res.StatusCode,
2814 },
2815 }
2816 target := &ret
2817 if err := gensupport.DecodeResponse(target, res); err != nil {
2818 return nil, err
2819 }
2820 return ret, nil
2821 }
2822
2823 type RelyingpartySendVerificationCodeCall struct {
2824 s *Service
2825 identitytoolkitrelyingpartysendverificationcoderequest *IdentitytoolkitRelyingpartySendVerificationCodeRequest
2826 urlParams_ gensupport.URLParams
2827 ctx_ context.Context
2828 header_ http.Header
2829 }
2830
2831
2832 func (r *RelyingpartyService) SendVerificationCode(identitytoolkitrelyingpartysendverificationcoderequest *IdentitytoolkitRelyingpartySendVerificationCodeRequest) *RelyingpartySendVerificationCodeCall {
2833 c := &RelyingpartySendVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2834 c.identitytoolkitrelyingpartysendverificationcoderequest = identitytoolkitrelyingpartysendverificationcoderequest
2835 return c
2836 }
2837
2838
2839
2840
2841 func (c *RelyingpartySendVerificationCodeCall) Fields(s ...googleapi.Field) *RelyingpartySendVerificationCodeCall {
2842 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2843 return c
2844 }
2845
2846
2847 func (c *RelyingpartySendVerificationCodeCall) Context(ctx context.Context) *RelyingpartySendVerificationCodeCall {
2848 c.ctx_ = ctx
2849 return c
2850 }
2851
2852
2853
2854 func (c *RelyingpartySendVerificationCodeCall) Header() http.Header {
2855 if c.header_ == nil {
2856 c.header_ = make(http.Header)
2857 }
2858 return c.header_
2859 }
2860
2861 func (c *RelyingpartySendVerificationCodeCall) doRequest(alt string) (*http.Response, error) {
2862 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2863 var body io.Reader = nil
2864 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysendverificationcoderequest)
2865 if err != nil {
2866 return nil, err
2867 }
2868 c.urlParams_.Set("alt", alt)
2869 c.urlParams_.Set("prettyPrint", "false")
2870 urls := googleapi.ResolveRelative(c.s.BasePath, "sendVerificationCode")
2871 urls += "?" + c.urlParams_.Encode()
2872 req, err := http.NewRequest("POST", urls, body)
2873 if err != nil {
2874 return nil, err
2875 }
2876 req.Header = reqHeaders
2877 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2878 }
2879
2880
2881
2882
2883
2884
2885
2886 func (c *RelyingpartySendVerificationCodeCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySendVerificationCodeResponse, error) {
2887 gensupport.SetOptions(c.urlParams_, opts...)
2888 res, err := c.doRequest("json")
2889 if res != nil && res.StatusCode == http.StatusNotModified {
2890 if res.Body != nil {
2891 res.Body.Close()
2892 }
2893 return nil, gensupport.WrapError(&googleapi.Error{
2894 Code: res.StatusCode,
2895 Header: res.Header,
2896 })
2897 }
2898 if err != nil {
2899 return nil, err
2900 }
2901 defer googleapi.CloseBody(res)
2902 if err := googleapi.CheckResponse(res); err != nil {
2903 return nil, gensupport.WrapError(err)
2904 }
2905 ret := &IdentitytoolkitRelyingpartySendVerificationCodeResponse{
2906 ServerResponse: googleapi.ServerResponse{
2907 Header: res.Header,
2908 HTTPStatusCode: res.StatusCode,
2909 },
2910 }
2911 target := &ret
2912 if err := gensupport.DecodeResponse(target, res); err != nil {
2913 return nil, err
2914 }
2915 return ret, nil
2916 }
2917
2918 type RelyingpartySetAccountInfoCall struct {
2919 s *Service
2920 identitytoolkitrelyingpartysetaccountinforequest *IdentitytoolkitRelyingpartySetAccountInfoRequest
2921 urlParams_ gensupport.URLParams
2922 ctx_ context.Context
2923 header_ http.Header
2924 }
2925
2926
2927 func (r *RelyingpartyService) SetAccountInfo(identitytoolkitrelyingpartysetaccountinforequest *IdentitytoolkitRelyingpartySetAccountInfoRequest) *RelyingpartySetAccountInfoCall {
2928 c := &RelyingpartySetAccountInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2929 c.identitytoolkitrelyingpartysetaccountinforequest = identitytoolkitrelyingpartysetaccountinforequest
2930 return c
2931 }
2932
2933
2934
2935
2936 func (c *RelyingpartySetAccountInfoCall) Fields(s ...googleapi.Field) *RelyingpartySetAccountInfoCall {
2937 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2938 return c
2939 }
2940
2941
2942 func (c *RelyingpartySetAccountInfoCall) Context(ctx context.Context) *RelyingpartySetAccountInfoCall {
2943 c.ctx_ = ctx
2944 return c
2945 }
2946
2947
2948
2949 func (c *RelyingpartySetAccountInfoCall) Header() http.Header {
2950 if c.header_ == nil {
2951 c.header_ = make(http.Header)
2952 }
2953 return c.header_
2954 }
2955
2956 func (c *RelyingpartySetAccountInfoCall) doRequest(alt string) (*http.Response, error) {
2957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2958 var body io.Reader = nil
2959 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysetaccountinforequest)
2960 if err != nil {
2961 return nil, err
2962 }
2963 c.urlParams_.Set("alt", alt)
2964 c.urlParams_.Set("prettyPrint", "false")
2965 urls := googleapi.ResolveRelative(c.s.BasePath, "setAccountInfo")
2966 urls += "?" + c.urlParams_.Encode()
2967 req, err := http.NewRequest("POST", urls, body)
2968 if err != nil {
2969 return nil, err
2970 }
2971 req.Header = reqHeaders
2972 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2973 }
2974
2975
2976
2977
2978
2979
2980
2981 func (c *RelyingpartySetAccountInfoCall) Do(opts ...googleapi.CallOption) (*SetAccountInfoResponse, error) {
2982 gensupport.SetOptions(c.urlParams_, opts...)
2983 res, err := c.doRequest("json")
2984 if res != nil && res.StatusCode == http.StatusNotModified {
2985 if res.Body != nil {
2986 res.Body.Close()
2987 }
2988 return nil, gensupport.WrapError(&googleapi.Error{
2989 Code: res.StatusCode,
2990 Header: res.Header,
2991 })
2992 }
2993 if err != nil {
2994 return nil, err
2995 }
2996 defer googleapi.CloseBody(res)
2997 if err := googleapi.CheckResponse(res); err != nil {
2998 return nil, gensupport.WrapError(err)
2999 }
3000 ret := &SetAccountInfoResponse{
3001 ServerResponse: googleapi.ServerResponse{
3002 Header: res.Header,
3003 HTTPStatusCode: res.StatusCode,
3004 },
3005 }
3006 target := &ret
3007 if err := gensupport.DecodeResponse(target, res); err != nil {
3008 return nil, err
3009 }
3010 return ret, nil
3011 }
3012
3013 type RelyingpartySetProjectConfigCall struct {
3014 s *Service
3015 identitytoolkitrelyingpartysetprojectconfigrequest *IdentitytoolkitRelyingpartySetProjectConfigRequest
3016 urlParams_ gensupport.URLParams
3017 ctx_ context.Context
3018 header_ http.Header
3019 }
3020
3021
3022 func (r *RelyingpartyService) SetProjectConfig(identitytoolkitrelyingpartysetprojectconfigrequest *IdentitytoolkitRelyingpartySetProjectConfigRequest) *RelyingpartySetProjectConfigCall {
3023 c := &RelyingpartySetProjectConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3024 c.identitytoolkitrelyingpartysetprojectconfigrequest = identitytoolkitrelyingpartysetprojectconfigrequest
3025 return c
3026 }
3027
3028
3029
3030
3031 func (c *RelyingpartySetProjectConfigCall) Fields(s ...googleapi.Field) *RelyingpartySetProjectConfigCall {
3032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3033 return c
3034 }
3035
3036
3037 func (c *RelyingpartySetProjectConfigCall) Context(ctx context.Context) *RelyingpartySetProjectConfigCall {
3038 c.ctx_ = ctx
3039 return c
3040 }
3041
3042
3043
3044 func (c *RelyingpartySetProjectConfigCall) Header() http.Header {
3045 if c.header_ == nil {
3046 c.header_ = make(http.Header)
3047 }
3048 return c.header_
3049 }
3050
3051 func (c *RelyingpartySetProjectConfigCall) doRequest(alt string) (*http.Response, error) {
3052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3053 var body io.Reader = nil
3054 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysetprojectconfigrequest)
3055 if err != nil {
3056 return nil, err
3057 }
3058 c.urlParams_.Set("alt", alt)
3059 c.urlParams_.Set("prettyPrint", "false")
3060 urls := googleapi.ResolveRelative(c.s.BasePath, "setProjectConfig")
3061 urls += "?" + c.urlParams_.Encode()
3062 req, err := http.NewRequest("POST", urls, body)
3063 if err != nil {
3064 return nil, err
3065 }
3066 req.Header = reqHeaders
3067 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3068 }
3069
3070
3071
3072
3073
3074
3075
3076 func (c *RelyingpartySetProjectConfigCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySetProjectConfigResponse, error) {
3077 gensupport.SetOptions(c.urlParams_, opts...)
3078 res, err := c.doRequest("json")
3079 if res != nil && res.StatusCode == http.StatusNotModified {
3080 if res.Body != nil {
3081 res.Body.Close()
3082 }
3083 return nil, gensupport.WrapError(&googleapi.Error{
3084 Code: res.StatusCode,
3085 Header: res.Header,
3086 })
3087 }
3088 if err != nil {
3089 return nil, err
3090 }
3091 defer googleapi.CloseBody(res)
3092 if err := googleapi.CheckResponse(res); err != nil {
3093 return nil, gensupport.WrapError(err)
3094 }
3095 ret := &IdentitytoolkitRelyingpartySetProjectConfigResponse{
3096 ServerResponse: googleapi.ServerResponse{
3097 Header: res.Header,
3098 HTTPStatusCode: res.StatusCode,
3099 },
3100 }
3101 target := &ret
3102 if err := gensupport.DecodeResponse(target, res); err != nil {
3103 return nil, err
3104 }
3105 return ret, nil
3106 }
3107
3108 type RelyingpartySignOutUserCall struct {
3109 s *Service
3110 identitytoolkitrelyingpartysignoutuserrequest *IdentitytoolkitRelyingpartySignOutUserRequest
3111 urlParams_ gensupport.URLParams
3112 ctx_ context.Context
3113 header_ http.Header
3114 }
3115
3116
3117 func (r *RelyingpartyService) SignOutUser(identitytoolkitrelyingpartysignoutuserrequest *IdentitytoolkitRelyingpartySignOutUserRequest) *RelyingpartySignOutUserCall {
3118 c := &RelyingpartySignOutUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3119 c.identitytoolkitrelyingpartysignoutuserrequest = identitytoolkitrelyingpartysignoutuserrequest
3120 return c
3121 }
3122
3123
3124
3125
3126 func (c *RelyingpartySignOutUserCall) Fields(s ...googleapi.Field) *RelyingpartySignOutUserCall {
3127 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3128 return c
3129 }
3130
3131
3132 func (c *RelyingpartySignOutUserCall) Context(ctx context.Context) *RelyingpartySignOutUserCall {
3133 c.ctx_ = ctx
3134 return c
3135 }
3136
3137
3138
3139 func (c *RelyingpartySignOutUserCall) Header() http.Header {
3140 if c.header_ == nil {
3141 c.header_ = make(http.Header)
3142 }
3143 return c.header_
3144 }
3145
3146 func (c *RelyingpartySignOutUserCall) doRequest(alt string) (*http.Response, error) {
3147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3148 var body io.Reader = nil
3149 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysignoutuserrequest)
3150 if err != nil {
3151 return nil, err
3152 }
3153 c.urlParams_.Set("alt", alt)
3154 c.urlParams_.Set("prettyPrint", "false")
3155 urls := googleapi.ResolveRelative(c.s.BasePath, "signOutUser")
3156 urls += "?" + c.urlParams_.Encode()
3157 req, err := http.NewRequest("POST", urls, body)
3158 if err != nil {
3159 return nil, err
3160 }
3161 req.Header = reqHeaders
3162 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3163 }
3164
3165
3166
3167
3168
3169
3170
3171 func (c *RelyingpartySignOutUserCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySignOutUserResponse, error) {
3172 gensupport.SetOptions(c.urlParams_, opts...)
3173 res, err := c.doRequest("json")
3174 if res != nil && res.StatusCode == http.StatusNotModified {
3175 if res.Body != nil {
3176 res.Body.Close()
3177 }
3178 return nil, gensupport.WrapError(&googleapi.Error{
3179 Code: res.StatusCode,
3180 Header: res.Header,
3181 })
3182 }
3183 if err != nil {
3184 return nil, err
3185 }
3186 defer googleapi.CloseBody(res)
3187 if err := googleapi.CheckResponse(res); err != nil {
3188 return nil, gensupport.WrapError(err)
3189 }
3190 ret := &IdentitytoolkitRelyingpartySignOutUserResponse{
3191 ServerResponse: googleapi.ServerResponse{
3192 Header: res.Header,
3193 HTTPStatusCode: res.StatusCode,
3194 },
3195 }
3196 target := &ret
3197 if err := gensupport.DecodeResponse(target, res); err != nil {
3198 return nil, err
3199 }
3200 return ret, nil
3201 }
3202
3203 type RelyingpartySignupNewUserCall struct {
3204 s *Service
3205 identitytoolkitrelyingpartysignupnewuserrequest *IdentitytoolkitRelyingpartySignupNewUserRequest
3206 urlParams_ gensupport.URLParams
3207 ctx_ context.Context
3208 header_ http.Header
3209 }
3210
3211
3212 func (r *RelyingpartyService) SignupNewUser(identitytoolkitrelyingpartysignupnewuserrequest *IdentitytoolkitRelyingpartySignupNewUserRequest) *RelyingpartySignupNewUserCall {
3213 c := &RelyingpartySignupNewUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3214 c.identitytoolkitrelyingpartysignupnewuserrequest = identitytoolkitrelyingpartysignupnewuserrequest
3215 return c
3216 }
3217
3218
3219
3220
3221 func (c *RelyingpartySignupNewUserCall) Fields(s ...googleapi.Field) *RelyingpartySignupNewUserCall {
3222 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3223 return c
3224 }
3225
3226
3227 func (c *RelyingpartySignupNewUserCall) Context(ctx context.Context) *RelyingpartySignupNewUserCall {
3228 c.ctx_ = ctx
3229 return c
3230 }
3231
3232
3233
3234 func (c *RelyingpartySignupNewUserCall) Header() http.Header {
3235 if c.header_ == nil {
3236 c.header_ = make(http.Header)
3237 }
3238 return c.header_
3239 }
3240
3241 func (c *RelyingpartySignupNewUserCall) doRequest(alt string) (*http.Response, error) {
3242 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3243 var body io.Reader = nil
3244 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysignupnewuserrequest)
3245 if err != nil {
3246 return nil, err
3247 }
3248 c.urlParams_.Set("alt", alt)
3249 c.urlParams_.Set("prettyPrint", "false")
3250 urls := googleapi.ResolveRelative(c.s.BasePath, "signupNewUser")
3251 urls += "?" + c.urlParams_.Encode()
3252 req, err := http.NewRequest("POST", urls, body)
3253 if err != nil {
3254 return nil, err
3255 }
3256 req.Header = reqHeaders
3257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3258 }
3259
3260
3261
3262
3263
3264
3265
3266 func (c *RelyingpartySignupNewUserCall) Do(opts ...googleapi.CallOption) (*SignupNewUserResponse, error) {
3267 gensupport.SetOptions(c.urlParams_, opts...)
3268 res, err := c.doRequest("json")
3269 if res != nil && res.StatusCode == http.StatusNotModified {
3270 if res.Body != nil {
3271 res.Body.Close()
3272 }
3273 return nil, gensupport.WrapError(&googleapi.Error{
3274 Code: res.StatusCode,
3275 Header: res.Header,
3276 })
3277 }
3278 if err != nil {
3279 return nil, err
3280 }
3281 defer googleapi.CloseBody(res)
3282 if err := googleapi.CheckResponse(res); err != nil {
3283 return nil, gensupport.WrapError(err)
3284 }
3285 ret := &SignupNewUserResponse{
3286 ServerResponse: googleapi.ServerResponse{
3287 Header: res.Header,
3288 HTTPStatusCode: res.StatusCode,
3289 },
3290 }
3291 target := &ret
3292 if err := gensupport.DecodeResponse(target, res); err != nil {
3293 return nil, err
3294 }
3295 return ret, nil
3296 }
3297
3298 type RelyingpartyUploadAccountCall struct {
3299 s *Service
3300 identitytoolkitrelyingpartyuploadaccountrequest *IdentitytoolkitRelyingpartyUploadAccountRequest
3301 urlParams_ gensupport.URLParams
3302 ctx_ context.Context
3303 header_ http.Header
3304 }
3305
3306
3307 func (r *RelyingpartyService) UploadAccount(identitytoolkitrelyingpartyuploadaccountrequest *IdentitytoolkitRelyingpartyUploadAccountRequest) *RelyingpartyUploadAccountCall {
3308 c := &RelyingpartyUploadAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3309 c.identitytoolkitrelyingpartyuploadaccountrequest = identitytoolkitrelyingpartyuploadaccountrequest
3310 return c
3311 }
3312
3313
3314
3315
3316 func (c *RelyingpartyUploadAccountCall) Fields(s ...googleapi.Field) *RelyingpartyUploadAccountCall {
3317 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3318 return c
3319 }
3320
3321
3322 func (c *RelyingpartyUploadAccountCall) Context(ctx context.Context) *RelyingpartyUploadAccountCall {
3323 c.ctx_ = ctx
3324 return c
3325 }
3326
3327
3328
3329 func (c *RelyingpartyUploadAccountCall) Header() http.Header {
3330 if c.header_ == nil {
3331 c.header_ = make(http.Header)
3332 }
3333 return c.header_
3334 }
3335
3336 func (c *RelyingpartyUploadAccountCall) doRequest(alt string) (*http.Response, error) {
3337 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3338 var body io.Reader = nil
3339 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyuploadaccountrequest)
3340 if err != nil {
3341 return nil, err
3342 }
3343 c.urlParams_.Set("alt", alt)
3344 c.urlParams_.Set("prettyPrint", "false")
3345 urls := googleapi.ResolveRelative(c.s.BasePath, "uploadAccount")
3346 urls += "?" + c.urlParams_.Encode()
3347 req, err := http.NewRequest("POST", urls, body)
3348 if err != nil {
3349 return nil, err
3350 }
3351 req.Header = reqHeaders
3352 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3353 }
3354
3355
3356
3357
3358
3359
3360
3361 func (c *RelyingpartyUploadAccountCall) Do(opts ...googleapi.CallOption) (*UploadAccountResponse, error) {
3362 gensupport.SetOptions(c.urlParams_, opts...)
3363 res, err := c.doRequest("json")
3364 if res != nil && res.StatusCode == http.StatusNotModified {
3365 if res.Body != nil {
3366 res.Body.Close()
3367 }
3368 return nil, gensupport.WrapError(&googleapi.Error{
3369 Code: res.StatusCode,
3370 Header: res.Header,
3371 })
3372 }
3373 if err != nil {
3374 return nil, err
3375 }
3376 defer googleapi.CloseBody(res)
3377 if err := googleapi.CheckResponse(res); err != nil {
3378 return nil, gensupport.WrapError(err)
3379 }
3380 ret := &UploadAccountResponse{
3381 ServerResponse: googleapi.ServerResponse{
3382 Header: res.Header,
3383 HTTPStatusCode: res.StatusCode,
3384 },
3385 }
3386 target := &ret
3387 if err := gensupport.DecodeResponse(target, res); err != nil {
3388 return nil, err
3389 }
3390 return ret, nil
3391 }
3392
3393 type RelyingpartyVerifyAssertionCall struct {
3394 s *Service
3395 identitytoolkitrelyingpartyverifyassertionrequest *IdentitytoolkitRelyingpartyVerifyAssertionRequest
3396 urlParams_ gensupport.URLParams
3397 ctx_ context.Context
3398 header_ http.Header
3399 }
3400
3401
3402 func (r *RelyingpartyService) VerifyAssertion(identitytoolkitrelyingpartyverifyassertionrequest *IdentitytoolkitRelyingpartyVerifyAssertionRequest) *RelyingpartyVerifyAssertionCall {
3403 c := &RelyingpartyVerifyAssertionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3404 c.identitytoolkitrelyingpartyverifyassertionrequest = identitytoolkitrelyingpartyverifyassertionrequest
3405 return c
3406 }
3407
3408
3409
3410
3411 func (c *RelyingpartyVerifyAssertionCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyAssertionCall {
3412 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3413 return c
3414 }
3415
3416
3417 func (c *RelyingpartyVerifyAssertionCall) Context(ctx context.Context) *RelyingpartyVerifyAssertionCall {
3418 c.ctx_ = ctx
3419 return c
3420 }
3421
3422
3423
3424 func (c *RelyingpartyVerifyAssertionCall) Header() http.Header {
3425 if c.header_ == nil {
3426 c.header_ = make(http.Header)
3427 }
3428 return c.header_
3429 }
3430
3431 func (c *RelyingpartyVerifyAssertionCall) doRequest(alt string) (*http.Response, error) {
3432 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3433 var body io.Reader = nil
3434 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifyassertionrequest)
3435 if err != nil {
3436 return nil, err
3437 }
3438 c.urlParams_.Set("alt", alt)
3439 c.urlParams_.Set("prettyPrint", "false")
3440 urls := googleapi.ResolveRelative(c.s.BasePath, "verifyAssertion")
3441 urls += "?" + c.urlParams_.Encode()
3442 req, err := http.NewRequest("POST", urls, body)
3443 if err != nil {
3444 return nil, err
3445 }
3446 req.Header = reqHeaders
3447 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3448 }
3449
3450
3451
3452
3453
3454
3455
3456 func (c *RelyingpartyVerifyAssertionCall) Do(opts ...googleapi.CallOption) (*VerifyAssertionResponse, error) {
3457 gensupport.SetOptions(c.urlParams_, opts...)
3458 res, err := c.doRequest("json")
3459 if res != nil && res.StatusCode == http.StatusNotModified {
3460 if res.Body != nil {
3461 res.Body.Close()
3462 }
3463 return nil, gensupport.WrapError(&googleapi.Error{
3464 Code: res.StatusCode,
3465 Header: res.Header,
3466 })
3467 }
3468 if err != nil {
3469 return nil, err
3470 }
3471 defer googleapi.CloseBody(res)
3472 if err := googleapi.CheckResponse(res); err != nil {
3473 return nil, gensupport.WrapError(err)
3474 }
3475 ret := &VerifyAssertionResponse{
3476 ServerResponse: googleapi.ServerResponse{
3477 Header: res.Header,
3478 HTTPStatusCode: res.StatusCode,
3479 },
3480 }
3481 target := &ret
3482 if err := gensupport.DecodeResponse(target, res); err != nil {
3483 return nil, err
3484 }
3485 return ret, nil
3486 }
3487
3488 type RelyingpartyVerifyCustomTokenCall struct {
3489 s *Service
3490 identitytoolkitrelyingpartyverifycustomtokenrequest *IdentitytoolkitRelyingpartyVerifyCustomTokenRequest
3491 urlParams_ gensupport.URLParams
3492 ctx_ context.Context
3493 header_ http.Header
3494 }
3495
3496
3497 func (r *RelyingpartyService) VerifyCustomToken(identitytoolkitrelyingpartyverifycustomtokenrequest *IdentitytoolkitRelyingpartyVerifyCustomTokenRequest) *RelyingpartyVerifyCustomTokenCall {
3498 c := &RelyingpartyVerifyCustomTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3499 c.identitytoolkitrelyingpartyverifycustomtokenrequest = identitytoolkitrelyingpartyverifycustomtokenrequest
3500 return c
3501 }
3502
3503
3504
3505
3506 func (c *RelyingpartyVerifyCustomTokenCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyCustomTokenCall {
3507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3508 return c
3509 }
3510
3511
3512 func (c *RelyingpartyVerifyCustomTokenCall) Context(ctx context.Context) *RelyingpartyVerifyCustomTokenCall {
3513 c.ctx_ = ctx
3514 return c
3515 }
3516
3517
3518
3519 func (c *RelyingpartyVerifyCustomTokenCall) Header() http.Header {
3520 if c.header_ == nil {
3521 c.header_ = make(http.Header)
3522 }
3523 return c.header_
3524 }
3525
3526 func (c *RelyingpartyVerifyCustomTokenCall) doRequest(alt string) (*http.Response, error) {
3527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3528 var body io.Reader = nil
3529 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifycustomtokenrequest)
3530 if err != nil {
3531 return nil, err
3532 }
3533 c.urlParams_.Set("alt", alt)
3534 c.urlParams_.Set("prettyPrint", "false")
3535 urls := googleapi.ResolveRelative(c.s.BasePath, "verifyCustomToken")
3536 urls += "?" + c.urlParams_.Encode()
3537 req, err := http.NewRequest("POST", urls, body)
3538 if err != nil {
3539 return nil, err
3540 }
3541 req.Header = reqHeaders
3542 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3543 }
3544
3545
3546
3547
3548
3549
3550
3551 func (c *RelyingpartyVerifyCustomTokenCall) Do(opts ...googleapi.CallOption) (*VerifyCustomTokenResponse, error) {
3552 gensupport.SetOptions(c.urlParams_, opts...)
3553 res, err := c.doRequest("json")
3554 if res != nil && res.StatusCode == http.StatusNotModified {
3555 if res.Body != nil {
3556 res.Body.Close()
3557 }
3558 return nil, gensupport.WrapError(&googleapi.Error{
3559 Code: res.StatusCode,
3560 Header: res.Header,
3561 })
3562 }
3563 if err != nil {
3564 return nil, err
3565 }
3566 defer googleapi.CloseBody(res)
3567 if err := googleapi.CheckResponse(res); err != nil {
3568 return nil, gensupport.WrapError(err)
3569 }
3570 ret := &VerifyCustomTokenResponse{
3571 ServerResponse: googleapi.ServerResponse{
3572 Header: res.Header,
3573 HTTPStatusCode: res.StatusCode,
3574 },
3575 }
3576 target := &ret
3577 if err := gensupport.DecodeResponse(target, res); err != nil {
3578 return nil, err
3579 }
3580 return ret, nil
3581 }
3582
3583 type RelyingpartyVerifyPasswordCall struct {
3584 s *Service
3585 identitytoolkitrelyingpartyverifypasswordrequest *IdentitytoolkitRelyingpartyVerifyPasswordRequest
3586 urlParams_ gensupport.URLParams
3587 ctx_ context.Context
3588 header_ http.Header
3589 }
3590
3591
3592 func (r *RelyingpartyService) VerifyPassword(identitytoolkitrelyingpartyverifypasswordrequest *IdentitytoolkitRelyingpartyVerifyPasswordRequest) *RelyingpartyVerifyPasswordCall {
3593 c := &RelyingpartyVerifyPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3594 c.identitytoolkitrelyingpartyverifypasswordrequest = identitytoolkitrelyingpartyverifypasswordrequest
3595 return c
3596 }
3597
3598
3599
3600
3601 func (c *RelyingpartyVerifyPasswordCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyPasswordCall {
3602 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3603 return c
3604 }
3605
3606
3607 func (c *RelyingpartyVerifyPasswordCall) Context(ctx context.Context) *RelyingpartyVerifyPasswordCall {
3608 c.ctx_ = ctx
3609 return c
3610 }
3611
3612
3613
3614 func (c *RelyingpartyVerifyPasswordCall) Header() http.Header {
3615 if c.header_ == nil {
3616 c.header_ = make(http.Header)
3617 }
3618 return c.header_
3619 }
3620
3621 func (c *RelyingpartyVerifyPasswordCall) doRequest(alt string) (*http.Response, error) {
3622 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3623 var body io.Reader = nil
3624 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifypasswordrequest)
3625 if err != nil {
3626 return nil, err
3627 }
3628 c.urlParams_.Set("alt", alt)
3629 c.urlParams_.Set("prettyPrint", "false")
3630 urls := googleapi.ResolveRelative(c.s.BasePath, "verifyPassword")
3631 urls += "?" + c.urlParams_.Encode()
3632 req, err := http.NewRequest("POST", urls, body)
3633 if err != nil {
3634 return nil, err
3635 }
3636 req.Header = reqHeaders
3637 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3638 }
3639
3640
3641
3642
3643
3644
3645
3646 func (c *RelyingpartyVerifyPasswordCall) Do(opts ...googleapi.CallOption) (*VerifyPasswordResponse, error) {
3647 gensupport.SetOptions(c.urlParams_, opts...)
3648 res, err := c.doRequest("json")
3649 if res != nil && res.StatusCode == http.StatusNotModified {
3650 if res.Body != nil {
3651 res.Body.Close()
3652 }
3653 return nil, gensupport.WrapError(&googleapi.Error{
3654 Code: res.StatusCode,
3655 Header: res.Header,
3656 })
3657 }
3658 if err != nil {
3659 return nil, err
3660 }
3661 defer googleapi.CloseBody(res)
3662 if err := googleapi.CheckResponse(res); err != nil {
3663 return nil, gensupport.WrapError(err)
3664 }
3665 ret := &VerifyPasswordResponse{
3666 ServerResponse: googleapi.ServerResponse{
3667 Header: res.Header,
3668 HTTPStatusCode: res.StatusCode,
3669 },
3670 }
3671 target := &ret
3672 if err := gensupport.DecodeResponse(target, res); err != nil {
3673 return nil, err
3674 }
3675 return ret, nil
3676 }
3677
3678 type RelyingpartyVerifyPhoneNumberCall struct {
3679 s *Service
3680 identitytoolkitrelyingpartyverifyphonenumberrequest *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest
3681 urlParams_ gensupport.URLParams
3682 ctx_ context.Context
3683 header_ http.Header
3684 }
3685
3686
3687
3688 func (r *RelyingpartyService) VerifyPhoneNumber(identitytoolkitrelyingpartyverifyphonenumberrequest *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest) *RelyingpartyVerifyPhoneNumberCall {
3689 c := &RelyingpartyVerifyPhoneNumberCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3690 c.identitytoolkitrelyingpartyverifyphonenumberrequest = identitytoolkitrelyingpartyverifyphonenumberrequest
3691 return c
3692 }
3693
3694
3695
3696
3697 func (c *RelyingpartyVerifyPhoneNumberCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyPhoneNumberCall {
3698 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3699 return c
3700 }
3701
3702
3703 func (c *RelyingpartyVerifyPhoneNumberCall) Context(ctx context.Context) *RelyingpartyVerifyPhoneNumberCall {
3704 c.ctx_ = ctx
3705 return c
3706 }
3707
3708
3709
3710 func (c *RelyingpartyVerifyPhoneNumberCall) Header() http.Header {
3711 if c.header_ == nil {
3712 c.header_ = make(http.Header)
3713 }
3714 return c.header_
3715 }
3716
3717 func (c *RelyingpartyVerifyPhoneNumberCall) doRequest(alt string) (*http.Response, error) {
3718 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3719 var body io.Reader = nil
3720 body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifyphonenumberrequest)
3721 if err != nil {
3722 return nil, err
3723 }
3724 c.urlParams_.Set("alt", alt)
3725 c.urlParams_.Set("prettyPrint", "false")
3726 urls := googleapi.ResolveRelative(c.s.BasePath, "verifyPhoneNumber")
3727 urls += "?" + c.urlParams_.Encode()
3728 req, err := http.NewRequest("POST", urls, body)
3729 if err != nil {
3730 return nil, err
3731 }
3732 req.Header = reqHeaders
3733 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3734 }
3735
3736
3737
3738
3739
3740
3741
3742 func (c *RelyingpartyVerifyPhoneNumberCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse, error) {
3743 gensupport.SetOptions(c.urlParams_, opts...)
3744 res, err := c.doRequest("json")
3745 if res != nil && res.StatusCode == http.StatusNotModified {
3746 if res.Body != nil {
3747 res.Body.Close()
3748 }
3749 return nil, gensupport.WrapError(&googleapi.Error{
3750 Code: res.StatusCode,
3751 Header: res.Header,
3752 })
3753 }
3754 if err != nil {
3755 return nil, err
3756 }
3757 defer googleapi.CloseBody(res)
3758 if err := googleapi.CheckResponse(res); err != nil {
3759 return nil, gensupport.WrapError(err)
3760 }
3761 ret := &IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse{
3762 ServerResponse: googleapi.ServerResponse{
3763 Header: res.Header,
3764 HTTPStatusCode: res.StatusCode,
3765 },
3766 }
3767 target := &ret
3768 if err := gensupport.DecodeResponse(target, res); err != nil {
3769 return nil, err
3770 }
3771 return ret, nil
3772 }
3773
View as plain text