You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

4890 lines
182 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package identitytoolkit provides access to the Google Identity Toolkit API.
  6. //
  7. // For product documentation, see: https://developers.google.com/identity-toolkit/v3/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/identitytoolkit/v3"
  14. // ...
  15. // ctx := context.Background()
  16. // identitytoolkitService, err := identitytoolkit.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithScopes(identitytoolkit.FirebaseScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package identitytoolkit // import "google.golang.org/api/identitytoolkit/v3"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "identitytoolkit:v3"
  71. const apiName = "identitytoolkit"
  72. const apiVersion = "v3"
  73. const basePath = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your data across Google Cloud Platform services
  77. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  78. // View and administer all your Firebase data and settings
  79. FirebaseScope = "https://www.googleapis.com/auth/firebase"
  80. )
  81. // NewService creates a new Service.
  82. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  83. scopesOption := option.WithScopes(
  84. "https://www.googleapis.com/auth/cloud-platform",
  85. "https://www.googleapis.com/auth/firebase",
  86. )
  87. // NOTE: prepend, so we don't override user-specified scopes.
  88. opts = append([]option.ClientOption{scopesOption}, opts...)
  89. client, endpoint, err := htransport.NewClient(ctx, opts...)
  90. if err != nil {
  91. return nil, err
  92. }
  93. s, err := New(client)
  94. if err != nil {
  95. return nil, err
  96. }
  97. if endpoint != "" {
  98. s.BasePath = endpoint
  99. }
  100. return s, nil
  101. }
  102. // New creates a new Service. It uses the provided http.Client for requests.
  103. //
  104. // Deprecated: please use NewService instead.
  105. // To provide a custom HTTP client, use option.WithHTTPClient.
  106. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  107. func New(client *http.Client) (*Service, error) {
  108. if client == nil {
  109. return nil, errors.New("client is nil")
  110. }
  111. s := &Service{client: client, BasePath: basePath}
  112. s.Relyingparty = NewRelyingpartyService(s)
  113. return s, nil
  114. }
  115. type Service struct {
  116. client *http.Client
  117. BasePath string // API endpoint base URL
  118. UserAgent string // optional additional User-Agent fragment
  119. Relyingparty *RelyingpartyService
  120. }
  121. func (s *Service) userAgent() string {
  122. if s.UserAgent == "" {
  123. return googleapi.UserAgent
  124. }
  125. return googleapi.UserAgent + " " + s.UserAgent
  126. }
  127. func NewRelyingpartyService(s *Service) *RelyingpartyService {
  128. rs := &RelyingpartyService{s: s}
  129. return rs
  130. }
  131. type RelyingpartyService struct {
  132. s *Service
  133. }
  134. // CreateAuthUriResponse: Response of creating the IDP authentication
  135. // URL.
  136. type CreateAuthUriResponse struct {
  137. // AllProviders: all providers the user has once used to do federated
  138. // login
  139. AllProviders []string `json:"allProviders,omitempty"`
  140. // AuthUri: The URI used by the IDP to authenticate the user.
  141. AuthUri string `json:"authUri,omitempty"`
  142. // CaptchaRequired: True if captcha is required.
  143. CaptchaRequired bool `json:"captchaRequired,omitempty"`
  144. // ForExistingProvider: True if the authUri is for user's existing
  145. // provider.
  146. ForExistingProvider bool `json:"forExistingProvider,omitempty"`
  147. // Kind: The fixed string identitytoolkit#CreateAuthUriResponse".
  148. Kind string `json:"kind,omitempty"`
  149. // ProviderId: The provider ID of the auth URI.
  150. ProviderId string `json:"providerId,omitempty"`
  151. // Registered: Whether the user is registered if the identifier is an
  152. // email.
  153. Registered bool `json:"registered,omitempty"`
  154. // SessionId: Session ID which should be passed in the following
  155. // verifyAssertion request.
  156. SessionId string `json:"sessionId,omitempty"`
  157. // SigninMethods: All sign-in methods this user has used.
  158. SigninMethods []string `json:"signinMethods,omitempty"`
  159. // ServerResponse contains the HTTP response code and headers from the
  160. // server.
  161. googleapi.ServerResponse `json:"-"`
  162. // ForceSendFields is a list of field names (e.g. "AllProviders") to
  163. // unconditionally include in API requests. By default, fields with
  164. // empty values are omitted from API requests. However, any non-pointer,
  165. // non-interface field appearing in ForceSendFields will be sent to the
  166. // server regardless of whether the field is empty or not. This may be
  167. // used to include empty fields in Patch requests.
  168. ForceSendFields []string `json:"-"`
  169. // NullFields is a list of field names (e.g. "AllProviders") to include
  170. // in API requests with the JSON null value. By default, fields with
  171. // empty values are omitted from API requests. However, any field with
  172. // an empty value appearing in NullFields will be sent to the server as
  173. // null. It is an error if a field in this list has a non-empty value.
  174. // This may be used to include null fields in Patch requests.
  175. NullFields []string `json:"-"`
  176. }
  177. func (s *CreateAuthUriResponse) MarshalJSON() ([]byte, error) {
  178. type NoMethod CreateAuthUriResponse
  179. raw := NoMethod(*s)
  180. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  181. }
  182. // DeleteAccountResponse: Respone of deleting account.
  183. type DeleteAccountResponse struct {
  184. // Kind: The fixed string "identitytoolkit#DeleteAccountResponse".
  185. Kind string `json:"kind,omitempty"`
  186. // ServerResponse contains the HTTP response code and headers from the
  187. // server.
  188. googleapi.ServerResponse `json:"-"`
  189. // ForceSendFields is a list of field names (e.g. "Kind") to
  190. // unconditionally include in API requests. By default, fields with
  191. // empty values are omitted from API requests. However, any non-pointer,
  192. // non-interface field appearing in ForceSendFields will be sent to the
  193. // server regardless of whether the field is empty or not. This may be
  194. // used to include empty fields in Patch requests.
  195. ForceSendFields []string `json:"-"`
  196. // NullFields is a list of field names (e.g. "Kind") to include in API
  197. // requests with the JSON null value. By default, fields with empty
  198. // values are omitted from API requests. However, any field with an
  199. // empty value appearing in NullFields will be sent to the server as
  200. // null. It is an error if a field in this list has a non-empty value.
  201. // This may be used to include null fields in Patch requests.
  202. NullFields []string `json:"-"`
  203. }
  204. func (s *DeleteAccountResponse) MarshalJSON() ([]byte, error) {
  205. type NoMethod DeleteAccountResponse
  206. raw := NoMethod(*s)
  207. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  208. }
  209. // DownloadAccountResponse: Response of downloading accounts in batch.
  210. type DownloadAccountResponse struct {
  211. // Kind: The fixed string "identitytoolkit#DownloadAccountResponse".
  212. Kind string `json:"kind,omitempty"`
  213. // NextPageToken: The next page token. To be used in a subsequent
  214. // request to return the next page of results.
  215. NextPageToken string `json:"nextPageToken,omitempty"`
  216. // Users: The user accounts data.
  217. Users []*UserInfo `json:"users,omitempty"`
  218. // ServerResponse contains the HTTP response code and headers from the
  219. // server.
  220. googleapi.ServerResponse `json:"-"`
  221. // ForceSendFields is a list of field names (e.g. "Kind") to
  222. // unconditionally include in API requests. By default, fields with
  223. // empty values are omitted from API requests. However, any non-pointer,
  224. // non-interface field appearing in ForceSendFields will be sent to the
  225. // server regardless of whether the field is empty or not. This may be
  226. // used to include empty fields in Patch requests.
  227. ForceSendFields []string `json:"-"`
  228. // NullFields is a list of field names (e.g. "Kind") to include in API
  229. // requests with the JSON null value. By default, fields with empty
  230. // values are omitted from API requests. However, any field with an
  231. // empty value appearing in NullFields will be sent to the server as
  232. // null. It is an error if a field in this list has a non-empty value.
  233. // This may be used to include null fields in Patch requests.
  234. NullFields []string `json:"-"`
  235. }
  236. func (s *DownloadAccountResponse) MarshalJSON() ([]byte, error) {
  237. type NoMethod DownloadAccountResponse
  238. raw := NoMethod(*s)
  239. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  240. }
  241. // EmailLinkSigninResponse: Response of email signIn.
  242. type EmailLinkSigninResponse struct {
  243. // Email: The user's email.
  244. Email string `json:"email,omitempty"`
  245. // ExpiresIn: Expiration time of STS id token in seconds.
  246. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  247. // IdToken: The STS id token to login the newly signed in user.
  248. IdToken string `json:"idToken,omitempty"`
  249. // IsNewUser: Whether the user is new.
  250. IsNewUser bool `json:"isNewUser,omitempty"`
  251. // Kind: The fixed string "identitytoolkit#EmailLinkSigninResponse".
  252. Kind string `json:"kind,omitempty"`
  253. // LocalId: The RP local ID of the user.
  254. LocalId string `json:"localId,omitempty"`
  255. // RefreshToken: The refresh token for the signed in user.
  256. RefreshToken string `json:"refreshToken,omitempty"`
  257. // ServerResponse contains the HTTP response code and headers from the
  258. // server.
  259. googleapi.ServerResponse `json:"-"`
  260. // ForceSendFields is a list of field names (e.g. "Email") to
  261. // unconditionally include in API requests. By default, fields with
  262. // empty values are omitted from API requests. However, any non-pointer,
  263. // non-interface field appearing in ForceSendFields will be sent to the
  264. // server regardless of whether the field is empty or not. This may be
  265. // used to include empty fields in Patch requests.
  266. ForceSendFields []string `json:"-"`
  267. // NullFields is a list of field names (e.g. "Email") to include in API
  268. // requests with the JSON null value. By default, fields with empty
  269. // values are omitted from API requests. However, any field with an
  270. // empty value appearing in NullFields will be sent to the server as
  271. // null. It is an error if a field in this list has a non-empty value.
  272. // This may be used to include null fields in Patch requests.
  273. NullFields []string `json:"-"`
  274. }
  275. func (s *EmailLinkSigninResponse) MarshalJSON() ([]byte, error) {
  276. type NoMethod EmailLinkSigninResponse
  277. raw := NoMethod(*s)
  278. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  279. }
  280. // EmailTemplate: Template for an email template.
  281. type EmailTemplate struct {
  282. // Body: Email body.
  283. Body string `json:"body,omitempty"`
  284. // Format: Email body format.
  285. Format string `json:"format,omitempty"`
  286. // From: From address of the email.
  287. From string `json:"from,omitempty"`
  288. // FromDisplayName: From display name.
  289. FromDisplayName string `json:"fromDisplayName,omitempty"`
  290. // ReplyTo: Reply-to address.
  291. ReplyTo string `json:"replyTo,omitempty"`
  292. // Subject: Subject of the email.
  293. Subject string `json:"subject,omitempty"`
  294. // ForceSendFields is a list of field names (e.g. "Body") to
  295. // unconditionally include in API requests. By default, fields with
  296. // empty values are omitted from API requests. However, any non-pointer,
  297. // non-interface field appearing in ForceSendFields will be sent to the
  298. // server regardless of whether the field is empty or not. This may be
  299. // used to include empty fields in Patch requests.
  300. ForceSendFields []string `json:"-"`
  301. // NullFields is a list of field names (e.g. "Body") to include in API
  302. // requests with the JSON null value. By default, fields with empty
  303. // values are omitted from API requests. However, any field with an
  304. // empty value appearing in NullFields will be sent to the server as
  305. // null. It is an error if a field in this list has a non-empty value.
  306. // This may be used to include null fields in Patch requests.
  307. NullFields []string `json:"-"`
  308. }
  309. func (s *EmailTemplate) MarshalJSON() ([]byte, error) {
  310. type NoMethod EmailTemplate
  311. raw := NoMethod(*s)
  312. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  313. }
  314. // GetAccountInfoResponse: Response of getting account information.
  315. type GetAccountInfoResponse struct {
  316. // Kind: The fixed string "identitytoolkit#GetAccountInfoResponse".
  317. Kind string `json:"kind,omitempty"`
  318. // Users: The info of the users.
  319. Users []*UserInfo `json:"users,omitempty"`
  320. // ServerResponse contains the HTTP response code and headers from the
  321. // server.
  322. googleapi.ServerResponse `json:"-"`
  323. // ForceSendFields is a list of field names (e.g. "Kind") to
  324. // unconditionally include in API requests. By default, fields with
  325. // empty values are omitted from API requests. However, any non-pointer,
  326. // non-interface field appearing in ForceSendFields will be sent to the
  327. // server regardless of whether the field is empty or not. This may be
  328. // used to include empty fields in Patch requests.
  329. ForceSendFields []string `json:"-"`
  330. // NullFields is a list of field names (e.g. "Kind") to include in API
  331. // requests with the JSON null value. By default, fields with empty
  332. // values are omitted from API requests. However, any field with an
  333. // empty value appearing in NullFields will be sent to the server as
  334. // null. It is an error if a field in this list has a non-empty value.
  335. // This may be used to include null fields in Patch requests.
  336. NullFields []string `json:"-"`
  337. }
  338. func (s *GetAccountInfoResponse) MarshalJSON() ([]byte, error) {
  339. type NoMethod GetAccountInfoResponse
  340. raw := NoMethod(*s)
  341. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  342. }
  343. // GetOobConfirmationCodeResponse: Response of getting a code for user
  344. // confirmation (reset password, change email etc.).
  345. type GetOobConfirmationCodeResponse struct {
  346. // Email: The email address that the email is sent to.
  347. Email string `json:"email,omitempty"`
  348. // Kind: The fixed string
  349. // "identitytoolkit#GetOobConfirmationCodeResponse".
  350. Kind string `json:"kind,omitempty"`
  351. // OobCode: The code to be send to the user.
  352. OobCode string `json:"oobCode,omitempty"`
  353. // ServerResponse contains the HTTP response code and headers from the
  354. // server.
  355. googleapi.ServerResponse `json:"-"`
  356. // ForceSendFields is a list of field names (e.g. "Email") to
  357. // unconditionally include in API requests. By default, fields with
  358. // empty values are omitted from API requests. However, any non-pointer,
  359. // non-interface field appearing in ForceSendFields will be sent to the
  360. // server regardless of whether the field is empty or not. This may be
  361. // used to include empty fields in Patch requests.
  362. ForceSendFields []string `json:"-"`
  363. // NullFields is a list of field names (e.g. "Email") to include in API
  364. // requests with the JSON null value. By default, fields with empty
  365. // values are omitted from API requests. However, any field with an
  366. // empty value appearing in NullFields will be sent to the server as
  367. // null. It is an error if a field in this list has a non-empty value.
  368. // This may be used to include null fields in Patch requests.
  369. NullFields []string `json:"-"`
  370. }
  371. func (s *GetOobConfirmationCodeResponse) MarshalJSON() ([]byte, error) {
  372. type NoMethod GetOobConfirmationCodeResponse
  373. raw := NoMethod(*s)
  374. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  375. }
  376. // GetRecaptchaParamResponse: Response of getting recaptcha param.
  377. type GetRecaptchaParamResponse struct {
  378. // Kind: The fixed string "identitytoolkit#GetRecaptchaParamResponse".
  379. Kind string `json:"kind,omitempty"`
  380. // RecaptchaSiteKey: Site key registered at recaptcha.
  381. RecaptchaSiteKey string `json:"recaptchaSiteKey,omitempty"`
  382. // RecaptchaStoken: The stoken field for the recaptcha widget, used to
  383. // request captcha challenge.
  384. RecaptchaStoken string `json:"recaptchaStoken,omitempty"`
  385. // ServerResponse contains the HTTP response code and headers from the
  386. // server.
  387. googleapi.ServerResponse `json:"-"`
  388. // ForceSendFields is a list of field names (e.g. "Kind") to
  389. // unconditionally include in API requests. By default, fields with
  390. // empty values are omitted from API requests. However, any non-pointer,
  391. // non-interface field appearing in ForceSendFields will be sent to the
  392. // server regardless of whether the field is empty or not. This may be
  393. // used to include empty fields in Patch requests.
  394. ForceSendFields []string `json:"-"`
  395. // NullFields is a list of field names (e.g. "Kind") to include in API
  396. // requests with the JSON null value. By default, fields with empty
  397. // values are omitted from API requests. However, any field with an
  398. // empty value appearing in NullFields will be sent to the server as
  399. // null. It is an error if a field in this list has a non-empty value.
  400. // This may be used to include null fields in Patch requests.
  401. NullFields []string `json:"-"`
  402. }
  403. func (s *GetRecaptchaParamResponse) MarshalJSON() ([]byte, error) {
  404. type NoMethod GetRecaptchaParamResponse
  405. raw := NoMethod(*s)
  406. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  407. }
  408. // IdentitytoolkitRelyingpartyCreateAuthUriRequest: Request to get the
  409. // IDP authentication URL.
  410. type IdentitytoolkitRelyingpartyCreateAuthUriRequest struct {
  411. // AppId: The app ID of the mobile app, base64(CERT_SHA1):PACKAGE_NAME
  412. // for Android, BUNDLE_ID for iOS.
  413. AppId string `json:"appId,omitempty"`
  414. // AuthFlowType: Explicitly specify the auth flow type. Currently only
  415. // support "CODE_FLOW" type. The field is only used for Google provider.
  416. AuthFlowType string `json:"authFlowType,omitempty"`
  417. // ClientId: The relying party OAuth client ID.
  418. ClientId string `json:"clientId,omitempty"`
  419. // Context: The opaque value used by the client to maintain context info
  420. // between the authentication request and the IDP callback.
  421. Context string `json:"context,omitempty"`
  422. // ContinueUri: The URI to which the IDP redirects the user after the
  423. // federated login flow.
  424. ContinueUri string `json:"continueUri,omitempty"`
  425. // CustomParameter: The query parameter that client can customize by
  426. // themselves in auth url. The following parameters are reserved for
  427. // server so that they cannot be customized by clients: client_id,
  428. // response_type, scope, redirect_uri, state, oauth_token.
  429. CustomParameter map[string]string `json:"customParameter,omitempty"`
  430. // HostedDomain: The hosted domain to restrict sign-in to accounts at
  431. // that domain for Google Apps hosted accounts.
  432. HostedDomain string `json:"hostedDomain,omitempty"`
  433. // Identifier: The email or federated ID of the user.
  434. Identifier string `json:"identifier,omitempty"`
  435. // OauthConsumerKey: The developer's consumer key for OpenId OAuth
  436. // Extension
  437. OauthConsumerKey string `json:"oauthConsumerKey,omitempty"`
  438. // OauthScope: Additional oauth scopes, beyond the basid user profile,
  439. // that the user would be prompted to grant
  440. OauthScope string `json:"oauthScope,omitempty"`
  441. // OpenidRealm: Optional realm for OpenID protocol. The sub string
  442. // "scheme://domain:port" of the param "continueUri" is used if this is
  443. // not set.
  444. OpenidRealm string `json:"openidRealm,omitempty"`
  445. // OtaApp: The native app package for OTA installation.
  446. OtaApp string `json:"otaApp,omitempty"`
  447. // ProviderId: The IdP ID. For white listed IdPs it's a short domain
  448. // name e.g. google.com, aol.com, live.net and yahoo.com. For other
  449. // OpenID IdPs it's the OP identifier.
  450. ProviderId string `json:"providerId,omitempty"`
  451. // SessionId: The session_id passed by client.
  452. SessionId string `json:"sessionId,omitempty"`
  453. // TenantId: For multi-tenant use cases, in order to construct sign-in
  454. // URL with the correct IDP parameters, Firebear needs to know which
  455. // Tenant to retrieve IDP configs from.
  456. TenantId string `json:"tenantId,omitempty"`
  457. // TenantProjectNumber: Tenant project number to be used for idp
  458. // discovery.
  459. TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
  460. // ForceSendFields is a list of field names (e.g. "AppId") to
  461. // unconditionally include in API requests. By default, fields with
  462. // empty values are omitted from API requests. However, any non-pointer,
  463. // non-interface field appearing in ForceSendFields will be sent to the
  464. // server regardless of whether the field is empty or not. This may be
  465. // used to include empty fields in Patch requests.
  466. ForceSendFields []string `json:"-"`
  467. // NullFields is a list of field names (e.g. "AppId") to include in API
  468. // requests with the JSON null value. By default, fields with empty
  469. // values are omitted from API requests. However, any field with an
  470. // empty value appearing in NullFields will be sent to the server as
  471. // null. It is an error if a field in this list has a non-empty value.
  472. // This may be used to include null fields in Patch requests.
  473. NullFields []string `json:"-"`
  474. }
  475. func (s *IdentitytoolkitRelyingpartyCreateAuthUriRequest) MarshalJSON() ([]byte, error) {
  476. type NoMethod IdentitytoolkitRelyingpartyCreateAuthUriRequest
  477. raw := NoMethod(*s)
  478. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  479. }
  480. // IdentitytoolkitRelyingpartyDeleteAccountRequest: Request to delete
  481. // account.
  482. type IdentitytoolkitRelyingpartyDeleteAccountRequest struct {
  483. // DelegatedProjectNumber: GCP project number of the requesting
  484. // delegated app. Currently only intended for Firebase V1 migration.
  485. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  486. // IdToken: The GITKit token or STS id token of the authenticated user.
  487. IdToken string `json:"idToken,omitempty"`
  488. // LocalId: The local ID of the user.
  489. LocalId string `json:"localId,omitempty"`
  490. // ForceSendFields is a list of field names (e.g.
  491. // "DelegatedProjectNumber") to unconditionally include in API requests.
  492. // By default, fields with empty values are omitted from API requests.
  493. // However, any non-pointer, non-interface field appearing in
  494. // ForceSendFields will be sent to the server regardless of whether the
  495. // field is empty or not. This may be used to include empty fields in
  496. // Patch requests.
  497. ForceSendFields []string `json:"-"`
  498. // NullFields is a list of field names (e.g. "DelegatedProjectNumber")
  499. // to include in API requests with the JSON null value. By default,
  500. // fields with empty values are omitted from API requests. However, any
  501. // field with an empty value appearing in NullFields will be sent to the
  502. // server as null. It is an error if a field in this list has a
  503. // non-empty value. This may be used to include null fields in Patch
  504. // requests.
  505. NullFields []string `json:"-"`
  506. }
  507. func (s *IdentitytoolkitRelyingpartyDeleteAccountRequest) MarshalJSON() ([]byte, error) {
  508. type NoMethod IdentitytoolkitRelyingpartyDeleteAccountRequest
  509. raw := NoMethod(*s)
  510. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  511. }
  512. // IdentitytoolkitRelyingpartyDownloadAccountRequest: Request to
  513. // download user account in batch.
  514. type IdentitytoolkitRelyingpartyDownloadAccountRequest struct {
  515. // DelegatedProjectNumber: GCP project number of the requesting
  516. // delegated app. Currently only intended for Firebase V1 migration.
  517. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  518. // MaxResults: The max number of results to return in the response.
  519. MaxResults int64 `json:"maxResults,omitempty"`
  520. // NextPageToken: The token for the next page. This should be taken from
  521. // the previous response.
  522. NextPageToken string `json:"nextPageToken,omitempty"`
  523. // TargetProjectId: Specify which project (field value is actually
  524. // project id) to operate. Only used when provided credential.
  525. TargetProjectId string `json:"targetProjectId,omitempty"`
  526. // ForceSendFields is a list of field names (e.g.
  527. // "DelegatedProjectNumber") to unconditionally include in API requests.
  528. // By default, fields with empty values are omitted from API requests.
  529. // However, any non-pointer, non-interface field appearing in
  530. // ForceSendFields will be sent to the server regardless of whether the
  531. // field is empty or not. This may be used to include empty fields in
  532. // Patch requests.
  533. ForceSendFields []string `json:"-"`
  534. // NullFields is a list of field names (e.g. "DelegatedProjectNumber")
  535. // to include in API requests with the JSON null value. By default,
  536. // fields with empty values are omitted from API requests. However, any
  537. // field with an empty value appearing in NullFields will be sent to the
  538. // server as null. It is an error if a field in this list has a
  539. // non-empty value. This may be used to include null fields in Patch
  540. // requests.
  541. NullFields []string `json:"-"`
  542. }
  543. func (s *IdentitytoolkitRelyingpartyDownloadAccountRequest) MarshalJSON() ([]byte, error) {
  544. type NoMethod IdentitytoolkitRelyingpartyDownloadAccountRequest
  545. raw := NoMethod(*s)
  546. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  547. }
  548. // IdentitytoolkitRelyingpartyEmailLinkSigninRequest: Request to sign in
  549. // with email.
  550. type IdentitytoolkitRelyingpartyEmailLinkSigninRequest struct {
  551. // Email: The email address of the user.
  552. Email string `json:"email,omitempty"`
  553. // IdToken: Token for linking flow.
  554. IdToken string `json:"idToken,omitempty"`
  555. // OobCode: The confirmation code.
  556. OobCode string `json:"oobCode,omitempty"`
  557. // ForceSendFields is a list of field names (e.g. "Email") to
  558. // unconditionally include in API requests. By default, fields with
  559. // empty values are omitted from API requests. However, any non-pointer,
  560. // non-interface field appearing in ForceSendFields will be sent to the
  561. // server regardless of whether the field is empty or not. This may be
  562. // used to include empty fields in Patch requests.
  563. ForceSendFields []string `json:"-"`
  564. // NullFields is a list of field names (e.g. "Email") to include in API
  565. // requests with the JSON null value. By default, fields with empty
  566. // values are omitted from API requests. However, any field with an
  567. // empty value appearing in NullFields will be sent to the server as
  568. // null. It is an error if a field in this list has a non-empty value.
  569. // This may be used to include null fields in Patch requests.
  570. NullFields []string `json:"-"`
  571. }
  572. func (s *IdentitytoolkitRelyingpartyEmailLinkSigninRequest) MarshalJSON() ([]byte, error) {
  573. type NoMethod IdentitytoolkitRelyingpartyEmailLinkSigninRequest
  574. raw := NoMethod(*s)
  575. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  576. }
  577. // IdentitytoolkitRelyingpartyGetAccountInfoRequest: Request to get the
  578. // account information.
  579. type IdentitytoolkitRelyingpartyGetAccountInfoRequest struct {
  580. // DelegatedProjectNumber: GCP project number of the requesting
  581. // delegated app. Currently only intended for Firebase V1 migration.
  582. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  583. // Email: The list of emails of the users to inquiry.
  584. Email []string `json:"email,omitempty"`
  585. // IdToken: The GITKit token of the authenticated user.
  586. IdToken string `json:"idToken,omitempty"`
  587. // LocalId: The list of local ID's of the users to inquiry.
  588. LocalId []string `json:"localId,omitempty"`
  589. // PhoneNumber: Privileged caller can query users by specified phone
  590. // number.
  591. PhoneNumber []string `json:"phoneNumber,omitempty"`
  592. // ForceSendFields is a list of field names (e.g.
  593. // "DelegatedProjectNumber") to unconditionally include in API requests.
  594. // By default, fields with empty values are omitted from API requests.
  595. // However, any non-pointer, non-interface field appearing in
  596. // ForceSendFields will be sent to the server regardless of whether the
  597. // field is empty or not. This may be used to include empty fields in
  598. // Patch requests.
  599. ForceSendFields []string `json:"-"`
  600. // NullFields is a list of field names (e.g. "DelegatedProjectNumber")
  601. // to include in API requests with the JSON null value. By default,
  602. // fields with empty values are omitted from API requests. However, any
  603. // field with an empty value appearing in NullFields will be sent to the
  604. // server as null. It is an error if a field in this list has a
  605. // non-empty value. This may be used to include null fields in Patch
  606. // requests.
  607. NullFields []string `json:"-"`
  608. }
  609. func (s *IdentitytoolkitRelyingpartyGetAccountInfoRequest) MarshalJSON() ([]byte, error) {
  610. type NoMethod IdentitytoolkitRelyingpartyGetAccountInfoRequest
  611. raw := NoMethod(*s)
  612. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  613. }
  614. // IdentitytoolkitRelyingpartyGetProjectConfigResponse: Response of
  615. // getting the project configuration.
  616. type IdentitytoolkitRelyingpartyGetProjectConfigResponse struct {
  617. // AllowPasswordUser: Whether to allow password user sign in or sign up.
  618. AllowPasswordUser bool `json:"allowPasswordUser,omitempty"`
  619. // ApiKey: Browser API key, needed when making http request to Apiary.
  620. ApiKey string `json:"apiKey,omitempty"`
  621. // AuthorizedDomains: Authorized domains.
  622. AuthorizedDomains []string `json:"authorizedDomains,omitempty"`
  623. // ChangeEmailTemplate: Change email template.
  624. ChangeEmailTemplate *EmailTemplate `json:"changeEmailTemplate,omitempty"`
  625. DynamicLinksDomain string `json:"dynamicLinksDomain,omitempty"`
  626. // EnableAnonymousUser: Whether anonymous user is enabled.
  627. EnableAnonymousUser bool `json:"enableAnonymousUser,omitempty"`
  628. // IdpConfig: OAuth2 provider configuration.
  629. IdpConfig []*IdpConfig `json:"idpConfig,omitempty"`
  630. // LegacyResetPasswordTemplate: Legacy reset password email template.
  631. LegacyResetPasswordTemplate *EmailTemplate `json:"legacyResetPasswordTemplate,omitempty"`
  632. // ProjectId: Project ID of the relying party.
  633. ProjectId string `json:"projectId,omitempty"`
  634. // ResetPasswordTemplate: Reset password email template.
  635. ResetPasswordTemplate *EmailTemplate `json:"resetPasswordTemplate,omitempty"`
  636. // UseEmailSending: Whether to use email sending provided by Firebear.
  637. UseEmailSending bool `json:"useEmailSending,omitempty"`
  638. // VerifyEmailTemplate: Verify email template.
  639. VerifyEmailTemplate *EmailTemplate `json:"verifyEmailTemplate,omitempty"`
  640. // ServerResponse contains the HTTP response code and headers from the
  641. // server.
  642. googleapi.ServerResponse `json:"-"`
  643. // ForceSendFields is a list of field names (e.g. "AllowPasswordUser")
  644. // to unconditionally include in API requests. By default, fields with
  645. // empty values are omitted from API requests. However, any non-pointer,
  646. // non-interface field appearing in ForceSendFields will be sent to the
  647. // server regardless of whether the field is empty or not. This may be
  648. // used to include empty fields in Patch requests.
  649. ForceSendFields []string `json:"-"`
  650. // NullFields is a list of field names (e.g. "AllowPasswordUser") to
  651. // include in API requests with the JSON null value. By default, fields
  652. // with empty values are omitted from API requests. However, any field
  653. // with an empty value appearing in NullFields will be sent to the
  654. // server as null. It is an error if a field in this list has a
  655. // non-empty value. This may be used to include null fields in Patch
  656. // requests.
  657. NullFields []string `json:"-"`
  658. }
  659. func (s *IdentitytoolkitRelyingpartyGetProjectConfigResponse) MarshalJSON() ([]byte, error) {
  660. type NoMethod IdentitytoolkitRelyingpartyGetProjectConfigResponse
  661. raw := NoMethod(*s)
  662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  663. }
  664. // IdentitytoolkitRelyingpartyResetPasswordRequest: Request to reset the
  665. // password.
  666. type IdentitytoolkitRelyingpartyResetPasswordRequest struct {
  667. // Email: The email address of the user.
  668. Email string `json:"email,omitempty"`
  669. // NewPassword: The new password inputted by the user.
  670. NewPassword string `json:"newPassword,omitempty"`
  671. // OldPassword: The old password inputted by the user.
  672. OldPassword string `json:"oldPassword,omitempty"`
  673. // OobCode: The confirmation code.
  674. OobCode string `json:"oobCode,omitempty"`
  675. // ForceSendFields is a list of field names (e.g. "Email") to
  676. // unconditionally include in API requests. By default, fields with
  677. // empty values are omitted from API requests. However, any non-pointer,
  678. // non-interface field appearing in ForceSendFields will be sent to the
  679. // server regardless of whether the field is empty or not. This may be
  680. // used to include empty fields in Patch requests.
  681. ForceSendFields []string `json:"-"`
  682. // NullFields is a list of field names (e.g. "Email") to include in API
  683. // requests with the JSON null value. By default, fields with empty
  684. // values are omitted from API requests. However, any field with an
  685. // empty value appearing in NullFields will be sent to the server as
  686. // null. It is an error if a field in this list has a non-empty value.
  687. // This may be used to include null fields in Patch requests.
  688. NullFields []string `json:"-"`
  689. }
  690. func (s *IdentitytoolkitRelyingpartyResetPasswordRequest) MarshalJSON() ([]byte, error) {
  691. type NoMethod IdentitytoolkitRelyingpartyResetPasswordRequest
  692. raw := NoMethod(*s)
  693. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  694. }
  695. // IdentitytoolkitRelyingpartySendVerificationCodeRequest: Request for
  696. // Identitytoolkit-SendVerificationCode
  697. type IdentitytoolkitRelyingpartySendVerificationCodeRequest struct {
  698. // IosReceipt: Receipt of successful app token validation with APNS.
  699. IosReceipt string `json:"iosReceipt,omitempty"`
  700. // IosSecret: Secret delivered to iOS app via APNS.
  701. IosSecret string `json:"iosSecret,omitempty"`
  702. // PhoneNumber: The phone number to send the verification code to in
  703. // E.164 format.
  704. PhoneNumber string `json:"phoneNumber,omitempty"`
  705. // RecaptchaToken: Recaptcha solution.
  706. RecaptchaToken string `json:"recaptchaToken,omitempty"`
  707. // ForceSendFields is a list of field names (e.g. "IosReceipt") to
  708. // unconditionally include in API requests. By default, fields with
  709. // empty values are omitted from API requests. However, any non-pointer,
  710. // non-interface field appearing in ForceSendFields will be sent to the
  711. // server regardless of whether the field is empty or not. This may be
  712. // used to include empty fields in Patch requests.
  713. ForceSendFields []string `json:"-"`
  714. // NullFields is a list of field names (e.g. "IosReceipt") to include in
  715. // API requests with the JSON null value. By default, fields with empty
  716. // values are omitted from API requests. However, any field with an
  717. // empty value appearing in NullFields will be sent to the server as
  718. // null. It is an error if a field in this list has a non-empty value.
  719. // This may be used to include null fields in Patch requests.
  720. NullFields []string `json:"-"`
  721. }
  722. func (s *IdentitytoolkitRelyingpartySendVerificationCodeRequest) MarshalJSON() ([]byte, error) {
  723. type NoMethod IdentitytoolkitRelyingpartySendVerificationCodeRequest
  724. raw := NoMethod(*s)
  725. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  726. }
  727. // IdentitytoolkitRelyingpartySendVerificationCodeResponse: Response for
  728. // Identitytoolkit-SendVerificationCode
  729. type IdentitytoolkitRelyingpartySendVerificationCodeResponse struct {
  730. // SessionInfo: Encrypted session information
  731. SessionInfo string `json:"sessionInfo,omitempty"`
  732. // ServerResponse contains the HTTP response code and headers from the
  733. // server.
  734. googleapi.ServerResponse `json:"-"`
  735. // ForceSendFields is a list of field names (e.g. "SessionInfo") to
  736. // unconditionally include in API requests. By default, fields with
  737. // empty values are omitted from API requests. However, any non-pointer,
  738. // non-interface field appearing in ForceSendFields will be sent to the
  739. // server regardless of whether the field is empty or not. This may be
  740. // used to include empty fields in Patch requests.
  741. ForceSendFields []string `json:"-"`
  742. // NullFields is a list of field names (e.g. "SessionInfo") to include
  743. // in API requests with the JSON null value. By default, fields with
  744. // empty values are omitted from API requests. However, any field with
  745. // an empty value appearing in NullFields will be sent to the server as
  746. // null. It is an error if a field in this list has a non-empty value.
  747. // This may be used to include null fields in Patch requests.
  748. NullFields []string `json:"-"`
  749. }
  750. func (s *IdentitytoolkitRelyingpartySendVerificationCodeResponse) MarshalJSON() ([]byte, error) {
  751. type NoMethod IdentitytoolkitRelyingpartySendVerificationCodeResponse
  752. raw := NoMethod(*s)
  753. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  754. }
  755. // IdentitytoolkitRelyingpartySetAccountInfoRequest: Request to set the
  756. // account information.
  757. type IdentitytoolkitRelyingpartySetAccountInfoRequest struct {
  758. // CaptchaChallenge: The captcha challenge.
  759. CaptchaChallenge string `json:"captchaChallenge,omitempty"`
  760. // CaptchaResponse: Response to the captcha.
  761. CaptchaResponse string `json:"captchaResponse,omitempty"`
  762. // CreatedAt: The timestamp when the account is created.
  763. CreatedAt int64 `json:"createdAt,omitempty,string"`
  764. // CustomAttributes: The custom attributes to be set in the user's id
  765. // token.
  766. CustomAttributes string `json:"customAttributes,omitempty"`
  767. // DelegatedProjectNumber: GCP project number of the requesting
  768. // delegated app. Currently only intended for Firebase V1 migration.
  769. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  770. // DeleteAttribute: The attributes users request to delete.
  771. DeleteAttribute []string `json:"deleteAttribute,omitempty"`
  772. // DeleteProvider: The IDPs the user request to delete.
  773. DeleteProvider []string `json:"deleteProvider,omitempty"`
  774. // DisableUser: Whether to disable the user.
  775. DisableUser bool `json:"disableUser,omitempty"`
  776. // DisplayName: The name of the user.
  777. DisplayName string `json:"displayName,omitempty"`
  778. // Email: The email of the user.
  779. Email string `json:"email,omitempty"`
  780. // EmailVerified: Mark the email as verified or not.
  781. EmailVerified bool `json:"emailVerified,omitempty"`
  782. // IdToken: The GITKit token of the authenticated user.
  783. IdToken string `json:"idToken,omitempty"`
  784. // InstanceId: Instance id token of the app.
  785. InstanceId string `json:"instanceId,omitempty"`
  786. // LastLoginAt: Last login timestamp.
  787. LastLoginAt int64 `json:"lastLoginAt,omitempty,string"`
  788. // LocalId: The local ID of the user.
  789. LocalId string `json:"localId,omitempty"`
  790. // OobCode: The out-of-band code of the change email request.
  791. OobCode string `json:"oobCode,omitempty"`
  792. // Password: The new password of the user.
  793. Password string `json:"password,omitempty"`
  794. // PhoneNumber: Privileged caller can update user with specified phone
  795. // number.
  796. PhoneNumber string `json:"phoneNumber,omitempty"`
  797. // PhotoUrl: The photo url of the user.
  798. PhotoUrl string `json:"photoUrl,omitempty"`
  799. // Provider: The associated IDPs of the user.
  800. Provider []string `json:"provider,omitempty"`
  801. // ReturnSecureToken: Whether return sts id token and refresh token
  802. // instead of gitkit token.
  803. ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
  804. // UpgradeToFederatedLogin: Mark the user to upgrade to federated login.
  805. UpgradeToFederatedLogin bool `json:"upgradeToFederatedLogin,omitempty"`
  806. // ValidSince: Timestamp in seconds for valid login token.
  807. ValidSince int64 `json:"validSince,omitempty,string"`
  808. // ForceSendFields is a list of field names (e.g. "CaptchaChallenge") to
  809. // unconditionally include in API requests. By default, fields with
  810. // empty values are omitted from API requests. However, any non-pointer,
  811. // non-interface field appearing in ForceSendFields will be sent to the
  812. // server regardless of whether the field is empty or not. This may be
  813. // used to include empty fields in Patch requests.
  814. ForceSendFields []string `json:"-"`
  815. // NullFields is a list of field names (e.g. "CaptchaChallenge") to
  816. // include in API requests with the JSON null value. By default, fields
  817. // with empty values are omitted from API requests. However, any field
  818. // with an empty value appearing in NullFields will be sent to the
  819. // server as null. It is an error if a field in this list has a
  820. // non-empty value. This may be used to include null fields in Patch
  821. // requests.
  822. NullFields []string `json:"-"`
  823. }
  824. func (s *IdentitytoolkitRelyingpartySetAccountInfoRequest) MarshalJSON() ([]byte, error) {
  825. type NoMethod IdentitytoolkitRelyingpartySetAccountInfoRequest
  826. raw := NoMethod(*s)
  827. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  828. }
  829. // IdentitytoolkitRelyingpartySetProjectConfigRequest: Request to set
  830. // the project configuration.
  831. type IdentitytoolkitRelyingpartySetProjectConfigRequest struct {
  832. // AllowPasswordUser: Whether to allow password user sign in or sign up.
  833. AllowPasswordUser bool `json:"allowPasswordUser,omitempty"`
  834. // ApiKey: Browser API key, needed when making http request to Apiary.
  835. ApiKey string `json:"apiKey,omitempty"`
  836. // AuthorizedDomains: Authorized domains for widget redirect.
  837. AuthorizedDomains []string `json:"authorizedDomains,omitempty"`
  838. // ChangeEmailTemplate: Change email template.
  839. ChangeEmailTemplate *EmailTemplate `json:"changeEmailTemplate,omitempty"`
  840. // DelegatedProjectNumber: GCP project number of the requesting
  841. // delegated app. Currently only intended for Firebase V1 migration.
  842. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  843. // EnableAnonymousUser: Whether to enable anonymous user.
  844. EnableAnonymousUser bool `json:"enableAnonymousUser,omitempty"`
  845. // IdpConfig: Oauth2 provider configuration.
  846. IdpConfig []*IdpConfig `json:"idpConfig,omitempty"`
  847. // LegacyResetPasswordTemplate: Legacy reset password email template.
  848. LegacyResetPasswordTemplate *EmailTemplate `json:"legacyResetPasswordTemplate,omitempty"`
  849. // ResetPasswordTemplate: Reset password email template.
  850. ResetPasswordTemplate *EmailTemplate `json:"resetPasswordTemplate,omitempty"`
  851. // UseEmailSending: Whether to use email sending provided by Firebear.
  852. UseEmailSending bool `json:"useEmailSending,omitempty"`
  853. // VerifyEmailTemplate: Verify email template.
  854. VerifyEmailTemplate *EmailTemplate `json:"verifyEmailTemplate,omitempty"`
  855. // ForceSendFields is a list of field names (e.g. "AllowPasswordUser")
  856. // to unconditionally include in API requests. By default, fields with
  857. // empty values are omitted from API requests. However, any non-pointer,
  858. // non-interface field appearing in ForceSendFields will be sent to the
  859. // server regardless of whether the field is empty or not. This may be
  860. // used to include empty fields in Patch requests.
  861. ForceSendFields []string `json:"-"`
  862. // NullFields is a list of field names (e.g. "AllowPasswordUser") to
  863. // include in API requests with the JSON null value. By default, fields
  864. // with empty values are omitted from API requests. However, any field
  865. // with an empty value appearing in NullFields will be sent to the
  866. // server as null. It is an error if a field in this list has a
  867. // non-empty value. This may be used to include null fields in Patch
  868. // requests.
  869. NullFields []string `json:"-"`
  870. }
  871. func (s *IdentitytoolkitRelyingpartySetProjectConfigRequest) MarshalJSON() ([]byte, error) {
  872. type NoMethod IdentitytoolkitRelyingpartySetProjectConfigRequest
  873. raw := NoMethod(*s)
  874. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  875. }
  876. // IdentitytoolkitRelyingpartySetProjectConfigResponse: Response of
  877. // setting the project configuration.
  878. type IdentitytoolkitRelyingpartySetProjectConfigResponse struct {
  879. // ProjectId: Project ID of the relying party.
  880. ProjectId string `json:"projectId,omitempty"`
  881. // ServerResponse contains the HTTP response code and headers from the
  882. // server.
  883. googleapi.ServerResponse `json:"-"`
  884. // ForceSendFields is a list of field names (e.g. "ProjectId") to
  885. // unconditionally include in API requests. By default, fields with
  886. // empty values are omitted from API requests. However, any non-pointer,
  887. // non-interface field appearing in ForceSendFields will be sent to the
  888. // server regardless of whether the field is empty or not. This may be
  889. // used to include empty fields in Patch requests.
  890. ForceSendFields []string `json:"-"`
  891. // NullFields is a list of field names (e.g. "ProjectId") to include in
  892. // API requests with the JSON null value. By default, fields with empty
  893. // values are omitted from API requests. However, any field with an
  894. // empty value appearing in NullFields will be sent to the server as
  895. // null. It is an error if a field in this list has a non-empty value.
  896. // This may be used to include null fields in Patch requests.
  897. NullFields []string `json:"-"`
  898. }
  899. func (s *IdentitytoolkitRelyingpartySetProjectConfigResponse) MarshalJSON() ([]byte, error) {
  900. type NoMethod IdentitytoolkitRelyingpartySetProjectConfigResponse
  901. raw := NoMethod(*s)
  902. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  903. }
  904. // IdentitytoolkitRelyingpartySignOutUserRequest: Request to sign out
  905. // user.
  906. type IdentitytoolkitRelyingpartySignOutUserRequest struct {
  907. // InstanceId: Instance id token of the app.
  908. InstanceId string `json:"instanceId,omitempty"`
  909. // LocalId: The local ID of the user.
  910. LocalId string `json:"localId,omitempty"`
  911. // ForceSendFields is a list of field names (e.g. "InstanceId") to
  912. // unconditionally include in API requests. By default, fields with
  913. // empty values are omitted from API requests. However, any non-pointer,
  914. // non-interface field appearing in ForceSendFields will be sent to the
  915. // server regardless of whether the field is empty or not. This may be
  916. // used to include empty fields in Patch requests.
  917. ForceSendFields []string `json:"-"`
  918. // NullFields is a list of field names (e.g. "InstanceId") to include in
  919. // API requests with the JSON null value. By default, fields with empty
  920. // values are omitted from API requests. However, any field with an
  921. // empty value appearing in NullFields will be sent to the server as
  922. // null. It is an error if a field in this list has a non-empty value.
  923. // This may be used to include null fields in Patch requests.
  924. NullFields []string `json:"-"`
  925. }
  926. func (s *IdentitytoolkitRelyingpartySignOutUserRequest) MarshalJSON() ([]byte, error) {
  927. type NoMethod IdentitytoolkitRelyingpartySignOutUserRequest
  928. raw := NoMethod(*s)
  929. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  930. }
  931. // IdentitytoolkitRelyingpartySignOutUserResponse: Response of signing
  932. // out user.
  933. type IdentitytoolkitRelyingpartySignOutUserResponse struct {
  934. // LocalId: The local ID of the user.
  935. LocalId string `json:"localId,omitempty"`
  936. // ServerResponse contains the HTTP response code and headers from the
  937. // server.
  938. googleapi.ServerResponse `json:"-"`
  939. // ForceSendFields is a list of field names (e.g. "LocalId") to
  940. // unconditionally include in API requests. By default, fields with
  941. // empty values are omitted from API requests. However, any non-pointer,
  942. // non-interface field appearing in ForceSendFields will be sent to the
  943. // server regardless of whether the field is empty or not. This may be
  944. // used to include empty fields in Patch requests.
  945. ForceSendFields []string `json:"-"`
  946. // NullFields is a list of field names (e.g. "LocalId") to include in
  947. // API requests with the JSON null value. By default, fields with empty
  948. // values are omitted from API requests. However, any field with an
  949. // empty value appearing in NullFields will be sent to the server as
  950. // null. It is an error if a field in this list has a non-empty value.
  951. // This may be used to include null fields in Patch requests.
  952. NullFields []string `json:"-"`
  953. }
  954. func (s *IdentitytoolkitRelyingpartySignOutUserResponse) MarshalJSON() ([]byte, error) {
  955. type NoMethod IdentitytoolkitRelyingpartySignOutUserResponse
  956. raw := NoMethod(*s)
  957. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  958. }
  959. // IdentitytoolkitRelyingpartySignupNewUserRequest: Request to signup
  960. // new user, create anonymous user or anonymous user reauth.
  961. type IdentitytoolkitRelyingpartySignupNewUserRequest struct {
  962. // CaptchaChallenge: The captcha challenge.
  963. CaptchaChallenge string `json:"captchaChallenge,omitempty"`
  964. // CaptchaResponse: Response to the captcha.
  965. CaptchaResponse string `json:"captchaResponse,omitempty"`
  966. // Disabled: Whether to disable the user. Only can be used by service
  967. // account.
  968. Disabled bool `json:"disabled,omitempty"`
  969. // DisplayName: The name of the user.
  970. DisplayName string `json:"displayName,omitempty"`
  971. // Email: The email of the user.
  972. Email string `json:"email,omitempty"`
  973. // EmailVerified: Mark the email as verified or not. Only can be used by
  974. // service account.
  975. EmailVerified bool `json:"emailVerified,omitempty"`
  976. // IdToken: The GITKit token of the authenticated user.
  977. IdToken string `json:"idToken,omitempty"`
  978. // InstanceId: Instance id token of the app.
  979. InstanceId string `json:"instanceId,omitempty"`
  980. // LocalId: Privileged caller can create user with specified user id.
  981. LocalId string `json:"localId,omitempty"`
  982. // Password: The new password of the user.
  983. Password string `json:"password,omitempty"`
  984. // PhoneNumber: Privileged caller can create user with specified phone
  985. // number.
  986. PhoneNumber string `json:"phoneNumber,omitempty"`
  987. // PhotoUrl: The photo url of the user.
  988. PhotoUrl string `json:"photoUrl,omitempty"`
  989. // TenantId: For multi-tenant use cases, in order to construct sign-in
  990. // URL with the correct IDP parameters, Firebear needs to know which
  991. // Tenant to retrieve IDP configs from.
  992. TenantId string `json:"tenantId,omitempty"`
  993. // TenantProjectNumber: Tenant project number to be used for idp
  994. // discovery.
  995. TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
  996. // ForceSendFields is a list of field names (e.g. "CaptchaChallenge") to
  997. // unconditionally include in API requests. By default, fields with
  998. // empty values are omitted from API requests. However, any non-pointer,
  999. // non-interface field appearing in ForceSendFields will be sent to the
  1000. // server regardless of whether the field is empty or not. This may be
  1001. // used to include empty fields in Patch requests.
  1002. ForceSendFields []string `json:"-"`
  1003. // NullFields is a list of field names (e.g. "CaptchaChallenge") to
  1004. // include in API requests with the JSON null value. By default, fields
  1005. // with empty values are omitted from API requests. However, any field
  1006. // with an empty value appearing in NullFields will be sent to the
  1007. // server as null. It is an error if a field in this list has a
  1008. // non-empty value. This may be used to include null fields in Patch
  1009. // requests.
  1010. NullFields []string `json:"-"`
  1011. }
  1012. func (s *IdentitytoolkitRelyingpartySignupNewUserRequest) MarshalJSON() ([]byte, error) {
  1013. type NoMethod IdentitytoolkitRelyingpartySignupNewUserRequest
  1014. raw := NoMethod(*s)
  1015. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1016. }
  1017. // IdentitytoolkitRelyingpartyUploadAccountRequest: Request to upload
  1018. // user account in batch.
  1019. type IdentitytoolkitRelyingpartyUploadAccountRequest struct {
  1020. // AllowOverwrite: Whether allow overwrite existing account when user
  1021. // local_id exists.
  1022. AllowOverwrite bool `json:"allowOverwrite,omitempty"`
  1023. BlockSize int64 `json:"blockSize,omitempty"`
  1024. // CpuMemCost: The following 4 fields are for standard scrypt algorithm.
  1025. CpuMemCost int64 `json:"cpuMemCost,omitempty"`
  1026. // DelegatedProjectNumber: GCP project number of the requesting
  1027. // delegated app. Currently only intended for Firebase V1 migration.
  1028. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  1029. DkLen int64 `json:"dkLen,omitempty"`
  1030. // HashAlgorithm: The password hash algorithm.
  1031. HashAlgorithm string `json:"hashAlgorithm,omitempty"`
  1032. // MemoryCost: Memory cost for hash calculation. Used by scrypt similar
  1033. // algorithms.
  1034. MemoryCost int64 `json:"memoryCost,omitempty"`
  1035. Parallelization int64 `json:"parallelization,omitempty"`
  1036. // Rounds: Rounds for hash calculation. Used by scrypt and similar
  1037. // algorithms.
  1038. Rounds int64 `json:"rounds,omitempty"`
  1039. // SaltSeparator: The salt separator.
  1040. SaltSeparator string `json:"saltSeparator,omitempty"`
  1041. // SanityCheck: If true, backend will do sanity check(including
  1042. // duplicate email and federated id) when uploading account.
  1043. SanityCheck bool `json:"sanityCheck,omitempty"`
  1044. // SignerKey: The key for to hash the password.
  1045. SignerKey string `json:"signerKey,omitempty"`
  1046. // TargetProjectId: Specify which project (field value is actually
  1047. // project id) to operate. Only used when provided credential.
  1048. TargetProjectId string `json:"targetProjectId,omitempty"`
  1049. // Users: The account info to be stored.
  1050. Users []*UserInfo `json:"users,omitempty"`
  1051. // ForceSendFields is a list of field names (e.g. "AllowOverwrite") to
  1052. // unconditionally include in API requests. By default, fields with
  1053. // empty values are omitted from API requests. However, any non-pointer,
  1054. // non-interface field appearing in ForceSendFields will be sent to the
  1055. // server regardless of whether the field is empty or not. This may be
  1056. // used to include empty fields in Patch requests.
  1057. ForceSendFields []string `json:"-"`
  1058. // NullFields is a list of field names (e.g. "AllowOverwrite") to
  1059. // include in API requests with the JSON null value. By default, fields
  1060. // with empty values are omitted from API requests. However, any field
  1061. // with an empty value appearing in NullFields will be sent to the
  1062. // server as null. It is an error if a field in this list has a
  1063. // non-empty value. This may be used to include null fields in Patch
  1064. // requests.
  1065. NullFields []string `json:"-"`
  1066. }
  1067. func (s *IdentitytoolkitRelyingpartyUploadAccountRequest) MarshalJSON() ([]byte, error) {
  1068. type NoMethod IdentitytoolkitRelyingpartyUploadAccountRequest
  1069. raw := NoMethod(*s)
  1070. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1071. }
  1072. // IdentitytoolkitRelyingpartyVerifyAssertionRequest: Request to verify
  1073. // the IDP assertion.
  1074. type IdentitytoolkitRelyingpartyVerifyAssertionRequest struct {
  1075. // AutoCreate: When it's true, automatically creates a new account if
  1076. // the user doesn't exist. When it's false, allows existing user to sign
  1077. // in normally and throws exception if the user doesn't exist.
  1078. AutoCreate bool `json:"autoCreate,omitempty"`
  1079. // DelegatedProjectNumber: GCP project number of the requesting
  1080. // delegated app. Currently only intended for Firebase V1 migration.
  1081. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  1082. // IdToken: The GITKit token of the authenticated user.
  1083. IdToken string `json:"idToken,omitempty"`
  1084. // InstanceId: Instance id token of the app.
  1085. InstanceId string `json:"instanceId,omitempty"`
  1086. // PendingIdToken: The GITKit token for the non-trusted IDP pending to
  1087. // be confirmed by the user.
  1088. PendingIdToken string `json:"pendingIdToken,omitempty"`
  1089. // PostBody: The post body if the request is a HTTP POST.
  1090. PostBody string `json:"postBody,omitempty"`
  1091. // RequestUri: The URI to which the IDP redirects the user back. It may
  1092. // contain federated login result params added by the IDP.
  1093. RequestUri string `json:"requestUri,omitempty"`
  1094. // ReturnIdpCredential: Whether return 200 and IDP credential rather
  1095. // than throw exception when federated id is already linked.
  1096. ReturnIdpCredential bool `json:"returnIdpCredential,omitempty"`
  1097. // ReturnRefreshToken: Whether to return refresh tokens.
  1098. ReturnRefreshToken bool `json:"returnRefreshToken,omitempty"`
  1099. // ReturnSecureToken: Whether return sts id token and refresh token
  1100. // instead of gitkit token.
  1101. ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
  1102. // SessionId: Session ID, which should match the one in previous
  1103. // createAuthUri request.
  1104. SessionId string `json:"sessionId,omitempty"`
  1105. // TenantId: For multi-tenant use cases, in order to construct sign-in
  1106. // URL with the correct IDP parameters, Firebear needs to know which
  1107. // Tenant to retrieve IDP configs from.
  1108. TenantId string `json:"tenantId,omitempty"`
  1109. // TenantProjectNumber: Tenant project number to be used for idp
  1110. // discovery.
  1111. TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
  1112. // ForceSendFields is a list of field names (e.g. "AutoCreate") to
  1113. // unconditionally include in API requests. By default, fields with
  1114. // empty values are omitted from API requests. However, any non-pointer,
  1115. // non-interface field appearing in ForceSendFields will be sent to the
  1116. // server regardless of whether the field is empty or not. This may be
  1117. // used to include empty fields in Patch requests.
  1118. ForceSendFields []string `json:"-"`
  1119. // NullFields is a list of field names (e.g. "AutoCreate") to include in
  1120. // API requests with the JSON null value. By default, fields with empty
  1121. // values are omitted from API requests. However, any field with an
  1122. // empty value appearing in NullFields will be sent to the server as
  1123. // null. It is an error if a field in this list has a non-empty value.
  1124. // This may be used to include null fields in Patch requests.
  1125. NullFields []string `json:"-"`
  1126. }
  1127. func (s *IdentitytoolkitRelyingpartyVerifyAssertionRequest) MarshalJSON() ([]byte, error) {
  1128. type NoMethod IdentitytoolkitRelyingpartyVerifyAssertionRequest
  1129. raw := NoMethod(*s)
  1130. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1131. }
  1132. // IdentitytoolkitRelyingpartyVerifyCustomTokenRequest: Request to
  1133. // verify a custom token
  1134. type IdentitytoolkitRelyingpartyVerifyCustomTokenRequest struct {
  1135. // DelegatedProjectNumber: GCP project number of the requesting
  1136. // delegated app. Currently only intended for Firebase V1 migration.
  1137. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  1138. // InstanceId: Instance id token of the app.
  1139. InstanceId string `json:"instanceId,omitempty"`
  1140. // ReturnSecureToken: Whether return sts id token and refresh token
  1141. // instead of gitkit token.
  1142. ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
  1143. // Token: The custom token to verify
  1144. Token string `json:"token,omitempty"`
  1145. // ForceSendFields is a list of field names (e.g.
  1146. // "DelegatedProjectNumber") to unconditionally include in API requests.
  1147. // By default, fields with empty values are omitted from API requests.
  1148. // However, any non-pointer, non-interface field appearing in
  1149. // ForceSendFields will be sent to the server regardless of whether the
  1150. // field is empty or not. This may be used to include empty fields in
  1151. // Patch requests.
  1152. ForceSendFields []string `json:"-"`
  1153. // NullFields is a list of field names (e.g. "DelegatedProjectNumber")
  1154. // to include in API requests with the JSON null value. By default,
  1155. // fields with empty values are omitted from API requests. However, any
  1156. // field with an empty value appearing in NullFields will be sent to the
  1157. // server as null. It is an error if a field in this list has a
  1158. // non-empty value. This may be used to include null fields in Patch
  1159. // requests.
  1160. NullFields []string `json:"-"`
  1161. }
  1162. func (s *IdentitytoolkitRelyingpartyVerifyCustomTokenRequest) MarshalJSON() ([]byte, error) {
  1163. type NoMethod IdentitytoolkitRelyingpartyVerifyCustomTokenRequest
  1164. raw := NoMethod(*s)
  1165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1166. }
  1167. // IdentitytoolkitRelyingpartyVerifyPasswordRequest: Request to verify
  1168. // the password.
  1169. type IdentitytoolkitRelyingpartyVerifyPasswordRequest struct {
  1170. // CaptchaChallenge: The captcha challenge.
  1171. CaptchaChallenge string `json:"captchaChallenge,omitempty"`
  1172. // CaptchaResponse: Response to the captcha.
  1173. CaptchaResponse string `json:"captchaResponse,omitempty"`
  1174. // DelegatedProjectNumber: GCP project number of the requesting
  1175. // delegated app. Currently only intended for Firebase V1 migration.
  1176. DelegatedProjectNumber int64 `json:"delegatedProjectNumber,omitempty,string"`
  1177. // Email: The email of the user.
  1178. Email string `json:"email,omitempty"`
  1179. // IdToken: The GITKit token of the authenticated user.
  1180. IdToken string `json:"idToken,omitempty"`
  1181. // InstanceId: Instance id token of the app.
  1182. InstanceId string `json:"instanceId,omitempty"`
  1183. // Password: The password inputed by the user.
  1184. Password string `json:"password,omitempty"`
  1185. // PendingIdToken: The GITKit token for the non-trusted IDP, which is to
  1186. // be confirmed by the user.
  1187. PendingIdToken string `json:"pendingIdToken,omitempty"`
  1188. // ReturnSecureToken: Whether return sts id token and refresh token
  1189. // instead of gitkit token.
  1190. ReturnSecureToken bool `json:"returnSecureToken,omitempty"`
  1191. // TenantId: For multi-tenant use cases, in order to construct sign-in
  1192. // URL with the correct IDP parameters, Firebear needs to know which
  1193. // Tenant to retrieve IDP configs from.
  1194. TenantId string `json:"tenantId,omitempty"`
  1195. // TenantProjectNumber: Tenant project number to be used for idp
  1196. // discovery.
  1197. TenantProjectNumber uint64 `json:"tenantProjectNumber,omitempty,string"`
  1198. // ForceSendFields is a list of field names (e.g. "CaptchaChallenge") to
  1199. // unconditionally include in API requests. By default, fields with
  1200. // empty values are omitted from API requests. However, any non-pointer,
  1201. // non-interface field appearing in ForceSendFields will be sent to the
  1202. // server regardless of whether the field is empty or not. This may be
  1203. // used to include empty fields in Patch requests.
  1204. ForceSendFields []string `json:"-"`
  1205. // NullFields is a list of field names (e.g. "CaptchaChallenge") to
  1206. // include in API requests with the JSON null value. By default, fields
  1207. // with empty values are omitted from API requests. However, any field
  1208. // with an empty value appearing in NullFields will be sent to the
  1209. // server as null. It is an error if a field in this list has a
  1210. // non-empty value. This may be used to include null fields in Patch
  1211. // requests.
  1212. NullFields []string `json:"-"`
  1213. }
  1214. func (s *IdentitytoolkitRelyingpartyVerifyPasswordRequest) MarshalJSON() ([]byte, error) {
  1215. type NoMethod IdentitytoolkitRelyingpartyVerifyPasswordRequest
  1216. raw := NoMethod(*s)
  1217. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1218. }
  1219. // IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest: Request for
  1220. // Identitytoolkit-VerifyPhoneNumber
  1221. type IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest struct {
  1222. Code string `json:"code,omitempty"`
  1223. IdToken string `json:"idToken,omitempty"`
  1224. Operation string `json:"operation,omitempty"`
  1225. PhoneNumber string `json:"phoneNumber,omitempty"`
  1226. // SessionInfo: The session info previously returned by
  1227. // IdentityToolkit-SendVerificationCode.
  1228. SessionInfo string `json:"sessionInfo,omitempty"`
  1229. TemporaryProof string `json:"temporaryProof,omitempty"`
  1230. VerificationProof string `json:"verificationProof,omitempty"`
  1231. // ForceSendFields is a list of field names (e.g. "Code") to
  1232. // unconditionally include in API requests. By default, fields with
  1233. // empty values are omitted from API requests. However, any non-pointer,
  1234. // non-interface field appearing in ForceSendFields will be sent to the
  1235. // server regardless of whether the field is empty or not. This may be
  1236. // used to include empty fields in Patch requests.
  1237. ForceSendFields []string `json:"-"`
  1238. // NullFields is a list of field names (e.g. "Code") to include in API
  1239. // requests with the JSON null value. By default, fields with empty
  1240. // values are omitted from API requests. However, any field with an
  1241. // empty value appearing in NullFields will be sent to the server as
  1242. // null. It is an error if a field in this list has a non-empty value.
  1243. // This may be used to include null fields in Patch requests.
  1244. NullFields []string `json:"-"`
  1245. }
  1246. func (s *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) {
  1247. type NoMethod IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest
  1248. raw := NoMethod(*s)
  1249. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1250. }
  1251. // IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse: Response for
  1252. // Identitytoolkit-VerifyPhoneNumber
  1253. type IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse struct {
  1254. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  1255. IdToken string `json:"idToken,omitempty"`
  1256. IsNewUser bool `json:"isNewUser,omitempty"`
  1257. LocalId string `json:"localId,omitempty"`
  1258. PhoneNumber string `json:"phoneNumber,omitempty"`
  1259. RefreshToken string `json:"refreshToken,omitempty"`
  1260. TemporaryProof string `json:"temporaryProof,omitempty"`
  1261. TemporaryProofExpiresIn int64 `json:"temporaryProofExpiresIn,omitempty,string"`
  1262. VerificationProof string `json:"verificationProof,omitempty"`
  1263. VerificationProofExpiresIn int64 `json:"verificationProofExpiresIn,omitempty,string"`
  1264. // ServerResponse contains the HTTP response code and headers from the
  1265. // server.
  1266. googleapi.ServerResponse `json:"-"`
  1267. // ForceSendFields is a list of field names (e.g. "ExpiresIn") to
  1268. // unconditionally include in API requests. By default, fields with
  1269. // empty values are omitted from API requests. However, any non-pointer,
  1270. // non-interface field appearing in ForceSendFields will be sent to the
  1271. // server regardless of whether the field is empty or not. This may be
  1272. // used to include empty fields in Patch requests.
  1273. ForceSendFields []string `json:"-"`
  1274. // NullFields is a list of field names (e.g. "ExpiresIn") to include in
  1275. // API requests with the JSON null value. By default, fields with empty
  1276. // values are omitted from API requests. However, any field with an
  1277. // empty value appearing in NullFields will be sent to the server as
  1278. // null. It is an error if a field in this list has a non-empty value.
  1279. // This may be used to include null fields in Patch requests.
  1280. NullFields []string `json:"-"`
  1281. }
  1282. func (s *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) {
  1283. type NoMethod IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse
  1284. raw := NoMethod(*s)
  1285. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1286. }
  1287. // IdpConfig: Template for a single idp configuration.
  1288. type IdpConfig struct {
  1289. // ClientId: OAuth2 client ID.
  1290. ClientId string `json:"clientId,omitempty"`
  1291. // Enabled: Whether this IDP is enabled.
  1292. Enabled bool `json:"enabled,omitempty"`
  1293. // ExperimentPercent: Percent of users who will be prompted/redirected
  1294. // federated login for this IDP.
  1295. ExperimentPercent int64 `json:"experimentPercent,omitempty"`
  1296. // Provider: OAuth2 provider.
  1297. Provider string `json:"provider,omitempty"`
  1298. // Secret: OAuth2 client secret.
  1299. Secret string `json:"secret,omitempty"`
  1300. // WhitelistedAudiences: Whitelisted client IDs for audience check.
  1301. WhitelistedAudiences []string `json:"whitelistedAudiences,omitempty"`
  1302. // ForceSendFields is a list of field names (e.g. "ClientId") to
  1303. // unconditionally include in API requests. By default, fields with
  1304. // empty values are omitted from API requests. However, any non-pointer,
  1305. // non-interface field appearing in ForceSendFields will be sent to the
  1306. // server regardless of whether the field is empty or not. This may be
  1307. // used to include empty fields in Patch requests.
  1308. ForceSendFields []string `json:"-"`
  1309. // NullFields is a list of field names (e.g. "ClientId") to include in
  1310. // API requests with the JSON null value. By default, fields with empty
  1311. // values are omitted from API requests. However, any field with an
  1312. // empty value appearing in NullFields will be sent to the server as
  1313. // null. It is an error if a field in this list has a non-empty value.
  1314. // This may be used to include null fields in Patch requests.
  1315. NullFields []string `json:"-"`
  1316. }
  1317. func (s *IdpConfig) MarshalJSON() ([]byte, error) {
  1318. type NoMethod IdpConfig
  1319. raw := NoMethod(*s)
  1320. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1321. }
  1322. // Relyingparty: Request of getting a code for user confirmation (reset
  1323. // password, change email etc.)
  1324. type Relyingparty struct {
  1325. // AndroidInstallApp: whether or not to install the android app on the
  1326. // device where the link is opened
  1327. AndroidInstallApp bool `json:"androidInstallApp,omitempty"`
  1328. // AndroidMinimumVersion: minimum version of the app. if the version on
  1329. // the device is lower than this version then the user is taken to the
  1330. // play store to upgrade the app
  1331. AndroidMinimumVersion string `json:"androidMinimumVersion,omitempty"`
  1332. // AndroidPackageName: android package name of the android app to handle
  1333. // the action code
  1334. AndroidPackageName string `json:"androidPackageName,omitempty"`
  1335. // CanHandleCodeInApp: whether or not the app can handle the oob code
  1336. // without first going to web
  1337. CanHandleCodeInApp bool `json:"canHandleCodeInApp,omitempty"`
  1338. // CaptchaResp: The recaptcha response from the user.
  1339. CaptchaResp string `json:"captchaResp,omitempty"`
  1340. // Challenge: The recaptcha challenge presented to the user.
  1341. Challenge string `json:"challenge,omitempty"`
  1342. // ContinueUrl: The url to continue to the Gitkit app
  1343. ContinueUrl string `json:"continueUrl,omitempty"`
  1344. // Email: The email of the user.
  1345. Email string `json:"email,omitempty"`
  1346. // IOSAppStoreId: iOS app store id to download the app if it's not
  1347. // already installed
  1348. IOSAppStoreId string `json:"iOSAppStoreId,omitempty"`
  1349. // IOSBundleId: the iOS bundle id of iOS app to handle the action code
  1350. IOSBundleId string `json:"iOSBundleId,omitempty"`
  1351. // IdToken: The user's Gitkit login token for email change.
  1352. IdToken string `json:"idToken,omitempty"`
  1353. // Kind: The fixed string "identitytoolkit#relyingparty".
  1354. Kind string `json:"kind,omitempty"`
  1355. // NewEmail: The new email if the code is for email change.
  1356. NewEmail string `json:"newEmail,omitempty"`
  1357. // RequestType: The request type.
  1358. RequestType string `json:"requestType,omitempty"`
  1359. // UserIp: The IP address of the user.
  1360. UserIp string `json:"userIp,omitempty"`
  1361. // ForceSendFields is a list of field names (e.g. "AndroidInstallApp")
  1362. // to unconditionally include in API requests. By default, fields with
  1363. // empty values are omitted from API requests. However, any non-pointer,
  1364. // non-interface field appearing in ForceSendFields will be sent to the
  1365. // server regardless of whether the field is empty or not. This may be
  1366. // used to include empty fields in Patch requests.
  1367. ForceSendFields []string `json:"-"`
  1368. // NullFields is a list of field names (e.g. "AndroidInstallApp") to
  1369. // include in API requests with the JSON null value. By default, fields
  1370. // with empty values are omitted from API requests. However, any field
  1371. // with an empty value appearing in NullFields will be sent to the
  1372. // server as null. It is an error if a field in this list has a
  1373. // non-empty value. This may be used to include null fields in Patch
  1374. // requests.
  1375. NullFields []string `json:"-"`
  1376. }
  1377. func (s *Relyingparty) MarshalJSON() ([]byte, error) {
  1378. type NoMethod Relyingparty
  1379. raw := NoMethod(*s)
  1380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1381. }
  1382. // ResetPasswordResponse: Response of resetting the password.
  1383. type ResetPasswordResponse struct {
  1384. // Email: The user's email. If the out-of-band code is for email
  1385. // recovery, the user's original email.
  1386. Email string `json:"email,omitempty"`
  1387. // Kind: The fixed string "identitytoolkit#ResetPasswordResponse".
  1388. Kind string `json:"kind,omitempty"`
  1389. // NewEmail: If the out-of-band code is for email recovery, the user's
  1390. // new email.
  1391. NewEmail string `json:"newEmail,omitempty"`
  1392. // RequestType: The request type.
  1393. RequestType string `json:"requestType,omitempty"`
  1394. // ServerResponse contains the HTTP response code and headers from the
  1395. // server.
  1396. googleapi.ServerResponse `json:"-"`
  1397. // ForceSendFields is a list of field names (e.g. "Email") to
  1398. // unconditionally include in API requests. By default, fields with
  1399. // empty values are omitted from API requests. However, any non-pointer,
  1400. // non-interface field appearing in ForceSendFields will be sent to the
  1401. // server regardless of whether the field is empty or not. This may be
  1402. // used to include empty fields in Patch requests.
  1403. ForceSendFields []string `json:"-"`
  1404. // NullFields is a list of field names (e.g. "Email") to include in API
  1405. // requests with the JSON null value. By default, fields with empty
  1406. // values are omitted from API requests. However, any field with an
  1407. // empty value appearing in NullFields will be sent to the server as
  1408. // null. It is an error if a field in this list has a non-empty value.
  1409. // This may be used to include null fields in Patch requests.
  1410. NullFields []string `json:"-"`
  1411. }
  1412. func (s *ResetPasswordResponse) MarshalJSON() ([]byte, error) {
  1413. type NoMethod ResetPasswordResponse
  1414. raw := NoMethod(*s)
  1415. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1416. }
  1417. // SetAccountInfoResponse: Respone of setting the account information.
  1418. type SetAccountInfoResponse struct {
  1419. // DisplayName: The name of the user.
  1420. DisplayName string `json:"displayName,omitempty"`
  1421. // Email: The email of the user.
  1422. Email string `json:"email,omitempty"`
  1423. // EmailVerified: If email has been verified.
  1424. EmailVerified bool `json:"emailVerified,omitempty"`
  1425. // ExpiresIn: If idToken is STS id token, then this field will be
  1426. // expiration time of STS id token in seconds.
  1427. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  1428. // IdToken: The Gitkit id token to login the newly sign up user.
  1429. IdToken string `json:"idToken,omitempty"`
  1430. // Kind: The fixed string "identitytoolkit#SetAccountInfoResponse".
  1431. Kind string `json:"kind,omitempty"`
  1432. // LocalId: The local ID of the user.
  1433. LocalId string `json:"localId,omitempty"`
  1434. // NewEmail: The new email the user attempts to change to.
  1435. NewEmail string `json:"newEmail,omitempty"`
  1436. // PasswordHash: The user's hashed password.
  1437. PasswordHash string `json:"passwordHash,omitempty"`
  1438. // PhotoUrl: The photo url of the user.
  1439. PhotoUrl string `json:"photoUrl,omitempty"`
  1440. // ProviderUserInfo: The user's profiles at the associated IdPs.
  1441. ProviderUserInfo []*SetAccountInfoResponseProviderUserInfo `json:"providerUserInfo,omitempty"`
  1442. // RefreshToken: If idToken is STS id token, then this field will be
  1443. // refresh token.
  1444. RefreshToken string `json:"refreshToken,omitempty"`
  1445. // ServerResponse contains the HTTP response code and headers from the
  1446. // server.
  1447. googleapi.ServerResponse `json:"-"`
  1448. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1449. // unconditionally include in API requests. By default, fields with
  1450. // empty values are omitted from API requests. However, any non-pointer,
  1451. // non-interface field appearing in ForceSendFields will be sent to the
  1452. // server regardless of whether the field is empty or not. This may be
  1453. // used to include empty fields in Patch requests.
  1454. ForceSendFields []string `json:"-"`
  1455. // NullFields is a list of field names (e.g. "DisplayName") to include
  1456. // in API requests with the JSON null value. By default, fields with
  1457. // empty values are omitted from API requests. However, any field with
  1458. // an empty value appearing in NullFields will be sent to the server as
  1459. // null. It is an error if a field in this list has a non-empty value.
  1460. // This may be used to include null fields in Patch requests.
  1461. NullFields []string `json:"-"`
  1462. }
  1463. func (s *SetAccountInfoResponse) MarshalJSON() ([]byte, error) {
  1464. type NoMethod SetAccountInfoResponse
  1465. raw := NoMethod(*s)
  1466. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1467. }
  1468. type SetAccountInfoResponseProviderUserInfo struct {
  1469. // DisplayName: The user's display name at the IDP.
  1470. DisplayName string `json:"displayName,omitempty"`
  1471. // FederatedId: User's identifier at IDP.
  1472. FederatedId string `json:"federatedId,omitempty"`
  1473. // PhotoUrl: The user's photo url at the IDP.
  1474. PhotoUrl string `json:"photoUrl,omitempty"`
  1475. // ProviderId: The IdP ID. For whitelisted IdPs it's a short domain
  1476. // name, e.g., google.com, aol.com, live.net and yahoo.com. For other
  1477. // OpenID IdPs it's the OP identifier.
  1478. ProviderId string `json:"providerId,omitempty"`
  1479. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1480. // unconditionally include in API requests. By default, fields with
  1481. // empty values are omitted from API requests. However, any non-pointer,
  1482. // non-interface field appearing in ForceSendFields will be sent to the
  1483. // server regardless of whether the field is empty or not. This may be
  1484. // used to include empty fields in Patch requests.
  1485. ForceSendFields []string `json:"-"`
  1486. // NullFields is a list of field names (e.g. "DisplayName") to include
  1487. // in API requests with the JSON null value. By default, fields with
  1488. // empty values are omitted from API requests. However, any field with
  1489. // an empty value appearing in NullFields will be sent to the server as
  1490. // null. It is an error if a field in this list has a non-empty value.
  1491. // This may be used to include null fields in Patch requests.
  1492. NullFields []string `json:"-"`
  1493. }
  1494. func (s *SetAccountInfoResponseProviderUserInfo) MarshalJSON() ([]byte, error) {
  1495. type NoMethod SetAccountInfoResponseProviderUserInfo
  1496. raw := NoMethod(*s)
  1497. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1498. }
  1499. // SignupNewUserResponse: Response of signing up new user, creating
  1500. // anonymous user or anonymous user reauth.
  1501. type SignupNewUserResponse struct {
  1502. // DisplayName: The name of the user.
  1503. DisplayName string `json:"displayName,omitempty"`
  1504. // Email: The email of the user.
  1505. Email string `json:"email,omitempty"`
  1506. // ExpiresIn: If idToken is STS id token, then this field will be
  1507. // expiration time of STS id token in seconds.
  1508. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  1509. // IdToken: The Gitkit id token to login the newly sign up user.
  1510. IdToken string `json:"idToken,omitempty"`
  1511. // Kind: The fixed string "identitytoolkit#SignupNewUserResponse".
  1512. Kind string `json:"kind,omitempty"`
  1513. // LocalId: The RP local ID of the user.
  1514. LocalId string `json:"localId,omitempty"`
  1515. // RefreshToken: If idToken is STS id token, then this field will be
  1516. // refresh token.
  1517. RefreshToken string `json:"refreshToken,omitempty"`
  1518. // ServerResponse contains the HTTP response code and headers from the
  1519. // server.
  1520. googleapi.ServerResponse `json:"-"`
  1521. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1522. // unconditionally include in API requests. By default, fields with
  1523. // empty values are omitted from API requests. However, any non-pointer,
  1524. // non-interface field appearing in ForceSendFields will be sent to the
  1525. // server regardless of whether the field is empty or not. This may be
  1526. // used to include empty fields in Patch requests.
  1527. ForceSendFields []string `json:"-"`
  1528. // NullFields is a list of field names (e.g. "DisplayName") to include
  1529. // in API requests with the JSON null value. By default, fields with
  1530. // empty values are omitted from API requests. However, any field with
  1531. // an empty value appearing in NullFields will be sent to the server as
  1532. // null. It is an error if a field in this list has a non-empty value.
  1533. // This may be used to include null fields in Patch requests.
  1534. NullFields []string `json:"-"`
  1535. }
  1536. func (s *SignupNewUserResponse) MarshalJSON() ([]byte, error) {
  1537. type NoMethod SignupNewUserResponse
  1538. raw := NoMethod(*s)
  1539. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1540. }
  1541. // UploadAccountResponse: Respone of uploading accounts in batch.
  1542. type UploadAccountResponse struct {
  1543. // Error: The error encountered while processing the account info.
  1544. Error []*UploadAccountResponseError `json:"error,omitempty"`
  1545. // Kind: The fixed string "identitytoolkit#UploadAccountResponse".
  1546. Kind string `json:"kind,omitempty"`
  1547. // ServerResponse contains the HTTP response code and headers from the
  1548. // server.
  1549. googleapi.ServerResponse `json:"-"`
  1550. // ForceSendFields is a list of field names (e.g. "Error") to
  1551. // unconditionally include in API requests. By default, fields with
  1552. // empty values are omitted from API requests. However, any non-pointer,
  1553. // non-interface field appearing in ForceSendFields will be sent to the
  1554. // server regardless of whether the field is empty or not. This may be
  1555. // used to include empty fields in Patch requests.
  1556. ForceSendFields []string `json:"-"`
  1557. // NullFields is a list of field names (e.g. "Error") to include in API
  1558. // requests with the JSON null value. By default, fields with empty
  1559. // values are omitted from API requests. However, any field with an
  1560. // empty value appearing in NullFields will be sent to the server as
  1561. // null. It is an error if a field in this list has a non-empty value.
  1562. // This may be used to include null fields in Patch requests.
  1563. NullFields []string `json:"-"`
  1564. }
  1565. func (s *UploadAccountResponse) MarshalJSON() ([]byte, error) {
  1566. type NoMethod UploadAccountResponse
  1567. raw := NoMethod(*s)
  1568. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1569. }
  1570. type UploadAccountResponseError struct {
  1571. // Index: The index of the malformed account, starting from 0.
  1572. Index int64 `json:"index,omitempty"`
  1573. // Message: Detailed error message for the account info.
  1574. Message string `json:"message,omitempty"`
  1575. // ForceSendFields is a list of field names (e.g. "Index") to
  1576. // unconditionally include in API requests. By default, fields with
  1577. // empty values are omitted from API requests. However, any non-pointer,
  1578. // non-interface field appearing in ForceSendFields will be sent to the
  1579. // server regardless of whether the field is empty or not. This may be
  1580. // used to include empty fields in Patch requests.
  1581. ForceSendFields []string `json:"-"`
  1582. // NullFields is a list of field names (e.g. "Index") to include in API
  1583. // requests with the JSON null value. By default, fields with empty
  1584. // values are omitted from API requests. However, any field with an
  1585. // empty value appearing in NullFields will be sent to the server as
  1586. // null. It is an error if a field in this list has a non-empty value.
  1587. // This may be used to include null fields in Patch requests.
  1588. NullFields []string `json:"-"`
  1589. }
  1590. func (s *UploadAccountResponseError) MarshalJSON() ([]byte, error) {
  1591. type NoMethod UploadAccountResponseError
  1592. raw := NoMethod(*s)
  1593. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1594. }
  1595. // UserInfo: Template for an individual account info.
  1596. type UserInfo struct {
  1597. // CreatedAt: User creation timestamp.
  1598. CreatedAt int64 `json:"createdAt,omitempty,string"`
  1599. // CustomAttributes: The custom attributes to be set in the user's id
  1600. // token.
  1601. CustomAttributes string `json:"customAttributes,omitempty"`
  1602. // CustomAuth: Whether the user is authenticated by the developer.
  1603. CustomAuth bool `json:"customAuth,omitempty"`
  1604. // Disabled: Whether the user is disabled.
  1605. Disabled bool `json:"disabled,omitempty"`
  1606. // DisplayName: The name of the user.
  1607. DisplayName string `json:"displayName,omitempty"`
  1608. // Email: The email of the user.
  1609. Email string `json:"email,omitempty"`
  1610. // EmailVerified: Whether the email has been verified.
  1611. EmailVerified bool `json:"emailVerified,omitempty"`
  1612. // LastLoginAt: last login timestamp.
  1613. LastLoginAt int64 `json:"lastLoginAt,omitempty,string"`
  1614. // LocalId: The local ID of the user.
  1615. LocalId string `json:"localId,omitempty"`
  1616. // PasswordHash: The user's hashed password.
  1617. PasswordHash string `json:"passwordHash,omitempty"`
  1618. // PasswordUpdatedAt: The timestamp when the password was last updated.
  1619. PasswordUpdatedAt float64 `json:"passwordUpdatedAt,omitempty"`
  1620. // PhoneNumber: User's phone number.
  1621. PhoneNumber string `json:"phoneNumber,omitempty"`
  1622. // PhotoUrl: The URL of the user profile photo.
  1623. PhotoUrl string `json:"photoUrl,omitempty"`
  1624. // ProviderUserInfo: The IDP of the user.
  1625. ProviderUserInfo []*UserInfoProviderUserInfo `json:"providerUserInfo,omitempty"`
  1626. // RawPassword: The user's plain text password.
  1627. RawPassword string `json:"rawPassword,omitempty"`
  1628. // Salt: The user's password salt.
  1629. Salt string `json:"salt,omitempty"`
  1630. // ScreenName: User's screen name at Twitter or login name at Github.
  1631. ScreenName string `json:"screenName,omitempty"`
  1632. // ValidSince: Timestamp in seconds for valid login token.
  1633. ValidSince int64 `json:"validSince,omitempty,string"`
  1634. // Version: Version of the user's password.
  1635. Version int64 `json:"version,omitempty"`
  1636. // ForceSendFields is a list of field names (e.g. "CreatedAt") to
  1637. // unconditionally include in API requests. By default, fields with
  1638. // empty values are omitted from API requests. However, any non-pointer,
  1639. // non-interface field appearing in ForceSendFields will be sent to the
  1640. // server regardless of whether the field is empty or not. This may be
  1641. // used to include empty fields in Patch requests.
  1642. ForceSendFields []string `json:"-"`
  1643. // NullFields is a list of field names (e.g. "CreatedAt") to include in
  1644. // API requests with the JSON null value. By default, fields with empty
  1645. // values are omitted from API requests. However, any field with an
  1646. // empty value appearing in NullFields will be sent to the server as
  1647. // null. It is an error if a field in this list has a non-empty value.
  1648. // This may be used to include null fields in Patch requests.
  1649. NullFields []string `json:"-"`
  1650. }
  1651. func (s *UserInfo) MarshalJSON() ([]byte, error) {
  1652. type NoMethod UserInfo
  1653. raw := NoMethod(*s)
  1654. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1655. }
  1656. func (s *UserInfo) UnmarshalJSON(data []byte) error {
  1657. type NoMethod UserInfo
  1658. var s1 struct {
  1659. PasswordUpdatedAt gensupport.JSONFloat64 `json:"passwordUpdatedAt"`
  1660. *NoMethod
  1661. }
  1662. s1.NoMethod = (*NoMethod)(s)
  1663. if err := json.Unmarshal(data, &s1); err != nil {
  1664. return err
  1665. }
  1666. s.PasswordUpdatedAt = float64(s1.PasswordUpdatedAt)
  1667. return nil
  1668. }
  1669. type UserInfoProviderUserInfo struct {
  1670. // DisplayName: The user's display name at the IDP.
  1671. DisplayName string `json:"displayName,omitempty"`
  1672. // Email: User's email at IDP.
  1673. Email string `json:"email,omitempty"`
  1674. // FederatedId: User's identifier at IDP.
  1675. FederatedId string `json:"federatedId,omitempty"`
  1676. // PhoneNumber: User's phone number.
  1677. PhoneNumber string `json:"phoneNumber,omitempty"`
  1678. // PhotoUrl: The user's photo url at the IDP.
  1679. PhotoUrl string `json:"photoUrl,omitempty"`
  1680. // ProviderId: The IdP ID. For white listed IdPs it's a short domain
  1681. // name, e.g., google.com, aol.com, live.net and yahoo.com. For other
  1682. // OpenID IdPs it's the OP identifier.
  1683. ProviderId string `json:"providerId,omitempty"`
  1684. // RawId: User's raw identifier directly returned from IDP.
  1685. RawId string `json:"rawId,omitempty"`
  1686. // ScreenName: User's screen name at Twitter or login name at Github.
  1687. ScreenName string `json:"screenName,omitempty"`
  1688. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1689. // unconditionally include in API requests. By default, fields with
  1690. // empty values are omitted from API requests. However, any non-pointer,
  1691. // non-interface field appearing in ForceSendFields will be sent to the
  1692. // server regardless of whether the field is empty or not. This may be
  1693. // used to include empty fields in Patch requests.
  1694. ForceSendFields []string `json:"-"`
  1695. // NullFields is a list of field names (e.g. "DisplayName") to include
  1696. // in API requests with the JSON null value. By default, fields with
  1697. // empty values are omitted from API requests. However, any field with
  1698. // an empty value appearing in NullFields will be sent to the server as
  1699. // null. It is an error if a field in this list has a non-empty value.
  1700. // This may be used to include null fields in Patch requests.
  1701. NullFields []string `json:"-"`
  1702. }
  1703. func (s *UserInfoProviderUserInfo) MarshalJSON() ([]byte, error) {
  1704. type NoMethod UserInfoProviderUserInfo
  1705. raw := NoMethod(*s)
  1706. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1707. }
  1708. // VerifyAssertionResponse: Response of verifying the IDP assertion.
  1709. type VerifyAssertionResponse struct {
  1710. // Action: The action code.
  1711. Action string `json:"action,omitempty"`
  1712. // AppInstallationUrl: URL for OTA app installation.
  1713. AppInstallationUrl string `json:"appInstallationUrl,omitempty"`
  1714. // AppScheme: The custom scheme used by mobile app.
  1715. AppScheme string `json:"appScheme,omitempty"`
  1716. // Context: The opaque value used by the client to maintain context info
  1717. // between the authentication request and the IDP callback.
  1718. Context string `json:"context,omitempty"`
  1719. // DateOfBirth: The birth date of the IdP account.
  1720. DateOfBirth string `json:"dateOfBirth,omitempty"`
  1721. // DisplayName: The display name of the user.
  1722. DisplayName string `json:"displayName,omitempty"`
  1723. // Email: The email returned by the IdP. NOTE: The federated login user
  1724. // may not own the email.
  1725. Email string `json:"email,omitempty"`
  1726. // EmailRecycled: It's true if the email is recycled.
  1727. EmailRecycled bool `json:"emailRecycled,omitempty"`
  1728. // EmailVerified: The value is true if the IDP is also the email
  1729. // provider. It means the user owns the email.
  1730. EmailVerified bool `json:"emailVerified,omitempty"`
  1731. // ErrorMessage: Client error code.
  1732. ErrorMessage string `json:"errorMessage,omitempty"`
  1733. // ExpiresIn: If idToken is STS id token, then this field will be
  1734. // expiration time of STS id token in seconds.
  1735. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  1736. // FederatedId: The unique ID identifies the IdP account.
  1737. FederatedId string `json:"federatedId,omitempty"`
  1738. // FirstName: The first name of the user.
  1739. FirstName string `json:"firstName,omitempty"`
  1740. // FullName: The full name of the user.
  1741. FullName string `json:"fullName,omitempty"`
  1742. // IdToken: The ID token.
  1743. IdToken string `json:"idToken,omitempty"`
  1744. // InputEmail: It's the identifier param in the createAuthUri request if
  1745. // the identifier is an email. It can be used to check whether the user
  1746. // input email is different from the asserted email.
  1747. InputEmail string `json:"inputEmail,omitempty"`
  1748. // IsNewUser: True if it's a new user sign-in, false if it's a returning
  1749. // user.
  1750. IsNewUser bool `json:"isNewUser,omitempty"`
  1751. // Kind: The fixed string "identitytoolkit#VerifyAssertionResponse".
  1752. Kind string `json:"kind,omitempty"`
  1753. // Language: The language preference of the user.
  1754. Language string `json:"language,omitempty"`
  1755. // LastName: The last name of the user.
  1756. LastName string `json:"lastName,omitempty"`
  1757. // LocalId: The RP local ID if it's already been mapped to the IdP
  1758. // account identified by the federated ID.
  1759. LocalId string `json:"localId,omitempty"`
  1760. // NeedConfirmation: Whether the assertion is from a non-trusted IDP and
  1761. // need account linking confirmation.
  1762. NeedConfirmation bool `json:"needConfirmation,omitempty"`
  1763. // NeedEmail: Whether need client to supply email to complete the
  1764. // federated login flow.
  1765. NeedEmail bool `json:"needEmail,omitempty"`
  1766. // NickName: The nick name of the user.
  1767. NickName string `json:"nickName,omitempty"`
  1768. // OauthAccessToken: The OAuth2 access token.
  1769. OauthAccessToken string `json:"oauthAccessToken,omitempty"`
  1770. // OauthAuthorizationCode: The OAuth2 authorization code.
  1771. OauthAuthorizationCode string `json:"oauthAuthorizationCode,omitempty"`
  1772. // OauthExpireIn: The lifetime in seconds of the OAuth2 access token.
  1773. OauthExpireIn int64 `json:"oauthExpireIn,omitempty"`
  1774. // OauthIdToken: The OIDC id token.
  1775. OauthIdToken string `json:"oauthIdToken,omitempty"`
  1776. // OauthRequestToken: The user approved request token for the OpenID
  1777. // OAuth extension.
  1778. OauthRequestToken string `json:"oauthRequestToken,omitempty"`
  1779. // OauthScope: The scope for the OpenID OAuth extension.
  1780. OauthScope string `json:"oauthScope,omitempty"`
  1781. // OauthTokenSecret: The OAuth1 access token secret.
  1782. OauthTokenSecret string `json:"oauthTokenSecret,omitempty"`
  1783. // OriginalEmail: The original email stored in the mapping storage. It's
  1784. // returned when the federated ID is associated to a different email.
  1785. OriginalEmail string `json:"originalEmail,omitempty"`
  1786. // PhotoUrl: The URI of the public accessible profiel picture.
  1787. PhotoUrl string `json:"photoUrl,omitempty"`
  1788. // ProviderId: The IdP ID. For white listed IdPs it's a short domain
  1789. // name e.g. google.com, aol.com, live.net and yahoo.com. If the
  1790. // "providerId" param is set to OpenID OP identifer other than the
  1791. // whilte listed IdPs the OP identifier is returned. If the "identifier"
  1792. // param is federated ID in the createAuthUri request. The domain part
  1793. // of the federated ID is returned.
  1794. ProviderId string `json:"providerId,omitempty"`
  1795. // RawUserInfo: Raw IDP-returned user info.
  1796. RawUserInfo string `json:"rawUserInfo,omitempty"`
  1797. // RefreshToken: If idToken is STS id token, then this field will be
  1798. // refresh token.
  1799. RefreshToken string `json:"refreshToken,omitempty"`
  1800. // ScreenName: The screen_name of a Twitter user or the login name at
  1801. // Github.
  1802. ScreenName string `json:"screenName,omitempty"`
  1803. // TimeZone: The timezone of the user.
  1804. TimeZone string `json:"timeZone,omitempty"`
  1805. // VerifiedProvider: When action is 'map', contains the idps which can
  1806. // be used for confirmation.
  1807. VerifiedProvider []string `json:"verifiedProvider,omitempty"`
  1808. // ServerResponse contains the HTTP response code and headers from the
  1809. // server.
  1810. googleapi.ServerResponse `json:"-"`
  1811. // ForceSendFields is a list of field names (e.g. "Action") to
  1812. // unconditionally include in API requests. By default, fields with
  1813. // empty values are omitted from API requests. However, any non-pointer,
  1814. // non-interface field appearing in ForceSendFields will be sent to the
  1815. // server regardless of whether the field is empty or not. This may be
  1816. // used to include empty fields in Patch requests.
  1817. ForceSendFields []string `json:"-"`
  1818. // NullFields is a list of field names (e.g. "Action") to include in API
  1819. // requests with the JSON null value. By default, fields with empty
  1820. // values are omitted from API requests. However, any field with an
  1821. // empty value appearing in NullFields will be sent to the server as
  1822. // null. It is an error if a field in this list has a non-empty value.
  1823. // This may be used to include null fields in Patch requests.
  1824. NullFields []string `json:"-"`
  1825. }
  1826. func (s *VerifyAssertionResponse) MarshalJSON() ([]byte, error) {
  1827. type NoMethod VerifyAssertionResponse
  1828. raw := NoMethod(*s)
  1829. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1830. }
  1831. // VerifyCustomTokenResponse: Response from verifying a custom token
  1832. type VerifyCustomTokenResponse struct {
  1833. // ExpiresIn: If idToken is STS id token, then this field will be
  1834. // expiration time of STS id token in seconds.
  1835. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  1836. // IdToken: The GITKit token for authenticated user.
  1837. IdToken string `json:"idToken,omitempty"`
  1838. // IsNewUser: True if it's a new user sign-in, false if it's a returning
  1839. // user.
  1840. IsNewUser bool `json:"isNewUser,omitempty"`
  1841. // Kind: The fixed string "identitytoolkit#VerifyCustomTokenResponse".
  1842. Kind string `json:"kind,omitempty"`
  1843. // RefreshToken: If idToken is STS id token, then this field will be
  1844. // refresh token.
  1845. RefreshToken string `json:"refreshToken,omitempty"`
  1846. // ServerResponse contains the HTTP response code and headers from the
  1847. // server.
  1848. googleapi.ServerResponse `json:"-"`
  1849. // ForceSendFields is a list of field names (e.g. "ExpiresIn") to
  1850. // unconditionally include in API requests. By default, fields with
  1851. // empty values are omitted from API requests. However, any non-pointer,
  1852. // non-interface field appearing in ForceSendFields will be sent to the
  1853. // server regardless of whether the field is empty or not. This may be
  1854. // used to include empty fields in Patch requests.
  1855. ForceSendFields []string `json:"-"`
  1856. // NullFields is a list of field names (e.g. "ExpiresIn") to include in
  1857. // API requests with the JSON null value. By default, fields with empty
  1858. // values are omitted from API requests. However, any field with an
  1859. // empty value appearing in NullFields will be sent to the server as
  1860. // null. It is an error if a field in this list has a non-empty value.
  1861. // This may be used to include null fields in Patch requests.
  1862. NullFields []string `json:"-"`
  1863. }
  1864. func (s *VerifyCustomTokenResponse) MarshalJSON() ([]byte, error) {
  1865. type NoMethod VerifyCustomTokenResponse
  1866. raw := NoMethod(*s)
  1867. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1868. }
  1869. // VerifyPasswordResponse: Request of verifying the password.
  1870. type VerifyPasswordResponse struct {
  1871. // DisplayName: The name of the user.
  1872. DisplayName string `json:"displayName,omitempty"`
  1873. // Email: The email returned by the IdP. NOTE: The federated login user
  1874. // may not own the email.
  1875. Email string `json:"email,omitempty"`
  1876. // ExpiresIn: If idToken is STS id token, then this field will be
  1877. // expiration time of STS id token in seconds.
  1878. ExpiresIn int64 `json:"expiresIn,omitempty,string"`
  1879. // IdToken: The GITKit token for authenticated user.
  1880. IdToken string `json:"idToken,omitempty"`
  1881. // Kind: The fixed string "identitytoolkit#VerifyPasswordResponse".
  1882. Kind string `json:"kind,omitempty"`
  1883. // LocalId: The RP local ID if it's already been mapped to the IdP
  1884. // account identified by the federated ID.
  1885. LocalId string `json:"localId,omitempty"`
  1886. // OauthAccessToken: The OAuth2 access token.
  1887. OauthAccessToken string `json:"oauthAccessToken,omitempty"`
  1888. // OauthAuthorizationCode: The OAuth2 authorization code.
  1889. OauthAuthorizationCode string `json:"oauthAuthorizationCode,omitempty"`
  1890. // OauthExpireIn: The lifetime in seconds of the OAuth2 access token.
  1891. OauthExpireIn int64 `json:"oauthExpireIn,omitempty"`
  1892. // PhotoUrl: The URI of the user's photo at IdP
  1893. PhotoUrl string `json:"photoUrl,omitempty"`
  1894. // RefreshToken: If idToken is STS id token, then this field will be
  1895. // refresh token.
  1896. RefreshToken string `json:"refreshToken,omitempty"`
  1897. // Registered: Whether the email is registered.
  1898. Registered bool `json:"registered,omitempty"`
  1899. // ServerResponse contains the HTTP response code and headers from the
  1900. // server.
  1901. googleapi.ServerResponse `json:"-"`
  1902. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  1903. // unconditionally include in API requests. By default, fields with
  1904. // empty values are omitted from API requests. However, any non-pointer,
  1905. // non-interface field appearing in ForceSendFields will be sent to the
  1906. // server regardless of whether the field is empty or not. This may be
  1907. // used to include empty fields in Patch requests.
  1908. ForceSendFields []string `json:"-"`
  1909. // NullFields is a list of field names (e.g. "DisplayName") to include
  1910. // in API requests with the JSON null value. By default, fields with
  1911. // empty values are omitted from API requests. However, any field with
  1912. // an empty value appearing in NullFields will be sent to the server as
  1913. // null. It is an error if a field in this list has a non-empty value.
  1914. // This may be used to include null fields in Patch requests.
  1915. NullFields []string `json:"-"`
  1916. }
  1917. func (s *VerifyPasswordResponse) MarshalJSON() ([]byte, error) {
  1918. type NoMethod VerifyPasswordResponse
  1919. raw := NoMethod(*s)
  1920. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1921. }
  1922. // method id "identitytoolkit.relyingparty.createAuthUri":
  1923. type RelyingpartyCreateAuthUriCall struct {
  1924. s *Service
  1925. identitytoolkitrelyingpartycreateauthurirequest *IdentitytoolkitRelyingpartyCreateAuthUriRequest
  1926. urlParams_ gensupport.URLParams
  1927. ctx_ context.Context
  1928. header_ http.Header
  1929. }
  1930. // CreateAuthUri: Creates the URI used by the IdP to authenticate the
  1931. // user.
  1932. func (r *RelyingpartyService) CreateAuthUri(identitytoolkitrelyingpartycreateauthurirequest *IdentitytoolkitRelyingpartyCreateAuthUriRequest) *RelyingpartyCreateAuthUriCall {
  1933. c := &RelyingpartyCreateAuthUriCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1934. c.identitytoolkitrelyingpartycreateauthurirequest = identitytoolkitrelyingpartycreateauthurirequest
  1935. return c
  1936. }
  1937. // Fields allows partial responses to be retrieved. See
  1938. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1939. // for more information.
  1940. func (c *RelyingpartyCreateAuthUriCall) Fields(s ...googleapi.Field) *RelyingpartyCreateAuthUriCall {
  1941. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1942. return c
  1943. }
  1944. // Context sets the context to be used in this call's Do method. Any
  1945. // pending HTTP request will be aborted if the provided context is
  1946. // canceled.
  1947. func (c *RelyingpartyCreateAuthUriCall) Context(ctx context.Context) *RelyingpartyCreateAuthUriCall {
  1948. c.ctx_ = ctx
  1949. return c
  1950. }
  1951. // Header returns an http.Header that can be modified by the caller to
  1952. // add HTTP headers to the request.
  1953. func (c *RelyingpartyCreateAuthUriCall) Header() http.Header {
  1954. if c.header_ == nil {
  1955. c.header_ = make(http.Header)
  1956. }
  1957. return c.header_
  1958. }
  1959. func (c *RelyingpartyCreateAuthUriCall) doRequest(alt string) (*http.Response, error) {
  1960. reqHeaders := make(http.Header)
  1961. for k, v := range c.header_ {
  1962. reqHeaders[k] = v
  1963. }
  1964. reqHeaders.Set("User-Agent", c.s.userAgent())
  1965. var body io.Reader = nil
  1966. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartycreateauthurirequest)
  1967. if err != nil {
  1968. return nil, err
  1969. }
  1970. reqHeaders.Set("Content-Type", "application/json")
  1971. c.urlParams_.Set("alt", alt)
  1972. c.urlParams_.Set("prettyPrint", "false")
  1973. urls := googleapi.ResolveRelative(c.s.BasePath, "createAuthUri")
  1974. urls += "?" + c.urlParams_.Encode()
  1975. req, err := http.NewRequest("POST", urls, body)
  1976. if err != nil {
  1977. return nil, err
  1978. }
  1979. req.Header = reqHeaders
  1980. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1981. }
  1982. // Do executes the "identitytoolkit.relyingparty.createAuthUri" call.
  1983. // Exactly one of *CreateAuthUriResponse or error will be non-nil. Any
  1984. // non-2xx status code is an error. Response headers are in either
  1985. // *CreateAuthUriResponse.ServerResponse.Header or (if a response was
  1986. // returned at all) in error.(*googleapi.Error).Header. Use
  1987. // googleapi.IsNotModified to check whether the returned error was
  1988. // because http.StatusNotModified was returned.
  1989. func (c *RelyingpartyCreateAuthUriCall) Do(opts ...googleapi.CallOption) (*CreateAuthUriResponse, error) {
  1990. gensupport.SetOptions(c.urlParams_, opts...)
  1991. res, err := c.doRequest("json")
  1992. if res != nil && res.StatusCode == http.StatusNotModified {
  1993. if res.Body != nil {
  1994. res.Body.Close()
  1995. }
  1996. return nil, &googleapi.Error{
  1997. Code: res.StatusCode,
  1998. Header: res.Header,
  1999. }
  2000. }
  2001. if err != nil {
  2002. return nil, err
  2003. }
  2004. defer googleapi.CloseBody(res)
  2005. if err := googleapi.CheckResponse(res); err != nil {
  2006. return nil, err
  2007. }
  2008. ret := &CreateAuthUriResponse{
  2009. ServerResponse: googleapi.ServerResponse{
  2010. Header: res.Header,
  2011. HTTPStatusCode: res.StatusCode,
  2012. },
  2013. }
  2014. target := &ret
  2015. if err := gensupport.DecodeResponse(target, res); err != nil {
  2016. return nil, err
  2017. }
  2018. return ret, nil
  2019. // {
  2020. // "description": "Creates the URI used by the IdP to authenticate the user.",
  2021. // "httpMethod": "POST",
  2022. // "id": "identitytoolkit.relyingparty.createAuthUri",
  2023. // "path": "createAuthUri",
  2024. // "request": {
  2025. // "$ref": "IdentitytoolkitRelyingpartyCreateAuthUriRequest"
  2026. // },
  2027. // "response": {
  2028. // "$ref": "CreateAuthUriResponse"
  2029. // },
  2030. // "scopes": [
  2031. // "https://www.googleapis.com/auth/cloud-platform"
  2032. // ]
  2033. // }
  2034. }
  2035. // method id "identitytoolkit.relyingparty.deleteAccount":
  2036. type RelyingpartyDeleteAccountCall struct {
  2037. s *Service
  2038. identitytoolkitrelyingpartydeleteaccountrequest *IdentitytoolkitRelyingpartyDeleteAccountRequest
  2039. urlParams_ gensupport.URLParams
  2040. ctx_ context.Context
  2041. header_ http.Header
  2042. }
  2043. // DeleteAccount: Delete user account.
  2044. func (r *RelyingpartyService) DeleteAccount(identitytoolkitrelyingpartydeleteaccountrequest *IdentitytoolkitRelyingpartyDeleteAccountRequest) *RelyingpartyDeleteAccountCall {
  2045. c := &RelyingpartyDeleteAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2046. c.identitytoolkitrelyingpartydeleteaccountrequest = identitytoolkitrelyingpartydeleteaccountrequest
  2047. return c
  2048. }
  2049. // Fields allows partial responses to be retrieved. See
  2050. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2051. // for more information.
  2052. func (c *RelyingpartyDeleteAccountCall) Fields(s ...googleapi.Field) *RelyingpartyDeleteAccountCall {
  2053. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2054. return c
  2055. }
  2056. // Context sets the context to be used in this call's Do method. Any
  2057. // pending HTTP request will be aborted if the provided context is
  2058. // canceled.
  2059. func (c *RelyingpartyDeleteAccountCall) Context(ctx context.Context) *RelyingpartyDeleteAccountCall {
  2060. c.ctx_ = ctx
  2061. return c
  2062. }
  2063. // Header returns an http.Header that can be modified by the caller to
  2064. // add HTTP headers to the request.
  2065. func (c *RelyingpartyDeleteAccountCall) Header() http.Header {
  2066. if c.header_ == nil {
  2067. c.header_ = make(http.Header)
  2068. }
  2069. return c.header_
  2070. }
  2071. func (c *RelyingpartyDeleteAccountCall) doRequest(alt string) (*http.Response, error) {
  2072. reqHeaders := make(http.Header)
  2073. for k, v := range c.header_ {
  2074. reqHeaders[k] = v
  2075. }
  2076. reqHeaders.Set("User-Agent", c.s.userAgent())
  2077. var body io.Reader = nil
  2078. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartydeleteaccountrequest)
  2079. if err != nil {
  2080. return nil, err
  2081. }
  2082. reqHeaders.Set("Content-Type", "application/json")
  2083. c.urlParams_.Set("alt", alt)
  2084. c.urlParams_.Set("prettyPrint", "false")
  2085. urls := googleapi.ResolveRelative(c.s.BasePath, "deleteAccount")
  2086. urls += "?" + c.urlParams_.Encode()
  2087. req, err := http.NewRequest("POST", urls, body)
  2088. if err != nil {
  2089. return nil, err
  2090. }
  2091. req.Header = reqHeaders
  2092. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2093. }
  2094. // Do executes the "identitytoolkit.relyingparty.deleteAccount" call.
  2095. // Exactly one of *DeleteAccountResponse or error will be non-nil. Any
  2096. // non-2xx status code is an error. Response headers are in either
  2097. // *DeleteAccountResponse.ServerResponse.Header or (if a response was
  2098. // returned at all) in error.(*googleapi.Error).Header. Use
  2099. // googleapi.IsNotModified to check whether the returned error was
  2100. // because http.StatusNotModified was returned.
  2101. func (c *RelyingpartyDeleteAccountCall) Do(opts ...googleapi.CallOption) (*DeleteAccountResponse, error) {
  2102. gensupport.SetOptions(c.urlParams_, opts...)
  2103. res, err := c.doRequest("json")
  2104. if res != nil && res.StatusCode == http.StatusNotModified {
  2105. if res.Body != nil {
  2106. res.Body.Close()
  2107. }
  2108. return nil, &googleapi.Error{
  2109. Code: res.StatusCode,
  2110. Header: res.Header,
  2111. }
  2112. }
  2113. if err != nil {
  2114. return nil, err
  2115. }
  2116. defer googleapi.CloseBody(res)
  2117. if err := googleapi.CheckResponse(res); err != nil {
  2118. return nil, err
  2119. }
  2120. ret := &DeleteAccountResponse{
  2121. ServerResponse: googleapi.ServerResponse{
  2122. Header: res.Header,
  2123. HTTPStatusCode: res.StatusCode,
  2124. },
  2125. }
  2126. target := &ret
  2127. if err := gensupport.DecodeResponse(target, res); err != nil {
  2128. return nil, err
  2129. }
  2130. return ret, nil
  2131. // {
  2132. // "description": "Delete user account.",
  2133. // "httpMethod": "POST",
  2134. // "id": "identitytoolkit.relyingparty.deleteAccount",
  2135. // "path": "deleteAccount",
  2136. // "request": {
  2137. // "$ref": "IdentitytoolkitRelyingpartyDeleteAccountRequest"
  2138. // },
  2139. // "response": {
  2140. // "$ref": "DeleteAccountResponse"
  2141. // },
  2142. // "scopes": [
  2143. // "https://www.googleapis.com/auth/cloud-platform"
  2144. // ]
  2145. // }
  2146. }
  2147. // method id "identitytoolkit.relyingparty.downloadAccount":
  2148. type RelyingpartyDownloadAccountCall struct {
  2149. s *Service
  2150. identitytoolkitrelyingpartydownloadaccountrequest *IdentitytoolkitRelyingpartyDownloadAccountRequest
  2151. urlParams_ gensupport.URLParams
  2152. ctx_ context.Context
  2153. header_ http.Header
  2154. }
  2155. // DownloadAccount: Batch download user accounts.
  2156. func (r *RelyingpartyService) DownloadAccount(identitytoolkitrelyingpartydownloadaccountrequest *IdentitytoolkitRelyingpartyDownloadAccountRequest) *RelyingpartyDownloadAccountCall {
  2157. c := &RelyingpartyDownloadAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2158. c.identitytoolkitrelyingpartydownloadaccountrequest = identitytoolkitrelyingpartydownloadaccountrequest
  2159. return c
  2160. }
  2161. // Fields allows partial responses to be retrieved. See
  2162. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2163. // for more information.
  2164. func (c *RelyingpartyDownloadAccountCall) Fields(s ...googleapi.Field) *RelyingpartyDownloadAccountCall {
  2165. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2166. return c
  2167. }
  2168. // Context sets the context to be used in this call's Do method. Any
  2169. // pending HTTP request will be aborted if the provided context is
  2170. // canceled.
  2171. func (c *RelyingpartyDownloadAccountCall) Context(ctx context.Context) *RelyingpartyDownloadAccountCall {
  2172. c.ctx_ = ctx
  2173. return c
  2174. }
  2175. // Header returns an http.Header that can be modified by the caller to
  2176. // add HTTP headers to the request.
  2177. func (c *RelyingpartyDownloadAccountCall) Header() http.Header {
  2178. if c.header_ == nil {
  2179. c.header_ = make(http.Header)
  2180. }
  2181. return c.header_
  2182. }
  2183. func (c *RelyingpartyDownloadAccountCall) doRequest(alt string) (*http.Response, error) {
  2184. reqHeaders := make(http.Header)
  2185. for k, v := range c.header_ {
  2186. reqHeaders[k] = v
  2187. }
  2188. reqHeaders.Set("User-Agent", c.s.userAgent())
  2189. var body io.Reader = nil
  2190. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartydownloadaccountrequest)
  2191. if err != nil {
  2192. return nil, err
  2193. }
  2194. reqHeaders.Set("Content-Type", "application/json")
  2195. c.urlParams_.Set("alt", alt)
  2196. c.urlParams_.Set("prettyPrint", "false")
  2197. urls := googleapi.ResolveRelative(c.s.BasePath, "downloadAccount")
  2198. urls += "?" + c.urlParams_.Encode()
  2199. req, err := http.NewRequest("POST", urls, body)
  2200. if err != nil {
  2201. return nil, err
  2202. }
  2203. req.Header = reqHeaders
  2204. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2205. }
  2206. // Do executes the "identitytoolkit.relyingparty.downloadAccount" call.
  2207. // Exactly one of *DownloadAccountResponse or error will be non-nil. Any
  2208. // non-2xx status code is an error. Response headers are in either
  2209. // *DownloadAccountResponse.ServerResponse.Header or (if a response was
  2210. // returned at all) in error.(*googleapi.Error).Header. Use
  2211. // googleapi.IsNotModified to check whether the returned error was
  2212. // because http.StatusNotModified was returned.
  2213. func (c *RelyingpartyDownloadAccountCall) Do(opts ...googleapi.CallOption) (*DownloadAccountResponse, error) {
  2214. gensupport.SetOptions(c.urlParams_, opts...)
  2215. res, err := c.doRequest("json")
  2216. if res != nil && res.StatusCode == http.StatusNotModified {
  2217. if res.Body != nil {
  2218. res.Body.Close()
  2219. }
  2220. return nil, &googleapi.Error{
  2221. Code: res.StatusCode,
  2222. Header: res.Header,
  2223. }
  2224. }
  2225. if err != nil {
  2226. return nil, err
  2227. }
  2228. defer googleapi.CloseBody(res)
  2229. if err := googleapi.CheckResponse(res); err != nil {
  2230. return nil, err
  2231. }
  2232. ret := &DownloadAccountResponse{
  2233. ServerResponse: googleapi.ServerResponse{
  2234. Header: res.Header,
  2235. HTTPStatusCode: res.StatusCode,
  2236. },
  2237. }
  2238. target := &ret
  2239. if err := gensupport.DecodeResponse(target, res); err != nil {
  2240. return nil, err
  2241. }
  2242. return ret, nil
  2243. // {
  2244. // "description": "Batch download user accounts.",
  2245. // "httpMethod": "POST",
  2246. // "id": "identitytoolkit.relyingparty.downloadAccount",
  2247. // "path": "downloadAccount",
  2248. // "request": {
  2249. // "$ref": "IdentitytoolkitRelyingpartyDownloadAccountRequest"
  2250. // },
  2251. // "response": {
  2252. // "$ref": "DownloadAccountResponse"
  2253. // },
  2254. // "scopes": [
  2255. // "https://www.googleapis.com/auth/cloud-platform",
  2256. // "https://www.googleapis.com/auth/firebase"
  2257. // ]
  2258. // }
  2259. }
  2260. // Pages invokes f for each page of results.
  2261. // A non-nil error returned from f will halt the iteration.
  2262. // The provided context supersedes any context provided to the Context method.
  2263. func (c *RelyingpartyDownloadAccountCall) Pages(ctx context.Context, f func(*DownloadAccountResponse) error) error {
  2264. c.ctx_ = ctx
  2265. defer func(pt string) { c.identitytoolkitrelyingpartydownloadaccountrequest.NextPageToken = pt }(c.identitytoolkitrelyingpartydownloadaccountrequest.NextPageToken) // reset paging to original point
  2266. for {
  2267. x, err := c.Do()
  2268. if err != nil {
  2269. return err
  2270. }
  2271. if err := f(x); err != nil {
  2272. return err
  2273. }
  2274. if x.NextPageToken == "" {
  2275. return nil
  2276. }
  2277. c.identitytoolkitrelyingpartydownloadaccountrequest.NextPageToken = x.NextPageToken
  2278. }
  2279. }
  2280. // method id "identitytoolkit.relyingparty.emailLinkSignin":
  2281. type RelyingpartyEmailLinkSigninCall struct {
  2282. s *Service
  2283. identitytoolkitrelyingpartyemaillinksigninrequest *IdentitytoolkitRelyingpartyEmailLinkSigninRequest
  2284. urlParams_ gensupport.URLParams
  2285. ctx_ context.Context
  2286. header_ http.Header
  2287. }
  2288. // EmailLinkSignin: Reset password for a user.
  2289. func (r *RelyingpartyService) EmailLinkSignin(identitytoolkitrelyingpartyemaillinksigninrequest *IdentitytoolkitRelyingpartyEmailLinkSigninRequest) *RelyingpartyEmailLinkSigninCall {
  2290. c := &RelyingpartyEmailLinkSigninCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2291. c.identitytoolkitrelyingpartyemaillinksigninrequest = identitytoolkitrelyingpartyemaillinksigninrequest
  2292. return c
  2293. }
  2294. // Fields allows partial responses to be retrieved. See
  2295. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2296. // for more information.
  2297. func (c *RelyingpartyEmailLinkSigninCall) Fields(s ...googleapi.Field) *RelyingpartyEmailLinkSigninCall {
  2298. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2299. return c
  2300. }
  2301. // Context sets the context to be used in this call's Do method. Any
  2302. // pending HTTP request will be aborted if the provided context is
  2303. // canceled.
  2304. func (c *RelyingpartyEmailLinkSigninCall) Context(ctx context.Context) *RelyingpartyEmailLinkSigninCall {
  2305. c.ctx_ = ctx
  2306. return c
  2307. }
  2308. // Header returns an http.Header that can be modified by the caller to
  2309. // add HTTP headers to the request.
  2310. func (c *RelyingpartyEmailLinkSigninCall) Header() http.Header {
  2311. if c.header_ == nil {
  2312. c.header_ = make(http.Header)
  2313. }
  2314. return c.header_
  2315. }
  2316. func (c *RelyingpartyEmailLinkSigninCall) doRequest(alt string) (*http.Response, error) {
  2317. reqHeaders := make(http.Header)
  2318. for k, v := range c.header_ {
  2319. reqHeaders[k] = v
  2320. }
  2321. reqHeaders.Set("User-Agent", c.s.userAgent())
  2322. var body io.Reader = nil
  2323. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyemaillinksigninrequest)
  2324. if err != nil {
  2325. return nil, err
  2326. }
  2327. reqHeaders.Set("Content-Type", "application/json")
  2328. c.urlParams_.Set("alt", alt)
  2329. c.urlParams_.Set("prettyPrint", "false")
  2330. urls := googleapi.ResolveRelative(c.s.BasePath, "emailLinkSignin")
  2331. urls += "?" + c.urlParams_.Encode()
  2332. req, err := http.NewRequest("POST", urls, body)
  2333. if err != nil {
  2334. return nil, err
  2335. }
  2336. req.Header = reqHeaders
  2337. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2338. }
  2339. // Do executes the "identitytoolkit.relyingparty.emailLinkSignin" call.
  2340. // Exactly one of *EmailLinkSigninResponse or error will be non-nil. Any
  2341. // non-2xx status code is an error. Response headers are in either
  2342. // *EmailLinkSigninResponse.ServerResponse.Header or (if a response was
  2343. // returned at all) in error.(*googleapi.Error).Header. Use
  2344. // googleapi.IsNotModified to check whether the returned error was
  2345. // because http.StatusNotModified was returned.
  2346. func (c *RelyingpartyEmailLinkSigninCall) Do(opts ...googleapi.CallOption) (*EmailLinkSigninResponse, error) {
  2347. gensupport.SetOptions(c.urlParams_, opts...)
  2348. res, err := c.doRequest("json")
  2349. if res != nil && res.StatusCode == http.StatusNotModified {
  2350. if res.Body != nil {
  2351. res.Body.Close()
  2352. }
  2353. return nil, &googleapi.Error{
  2354. Code: res.StatusCode,
  2355. Header: res.Header,
  2356. }
  2357. }
  2358. if err != nil {
  2359. return nil, err
  2360. }
  2361. defer googleapi.CloseBody(res)
  2362. if err := googleapi.CheckResponse(res); err != nil {
  2363. return nil, err
  2364. }
  2365. ret := &EmailLinkSigninResponse{
  2366. ServerResponse: googleapi.ServerResponse{
  2367. Header: res.Header,
  2368. HTTPStatusCode: res.StatusCode,
  2369. },
  2370. }
  2371. target := &ret
  2372. if err := gensupport.DecodeResponse(target, res); err != nil {
  2373. return nil, err
  2374. }
  2375. return ret, nil
  2376. // {
  2377. // "description": "Reset password for a user.",
  2378. // "httpMethod": "POST",
  2379. // "id": "identitytoolkit.relyingparty.emailLinkSignin",
  2380. // "path": "emailLinkSignin",
  2381. // "request": {
  2382. // "$ref": "IdentitytoolkitRelyingpartyEmailLinkSigninRequest"
  2383. // },
  2384. // "response": {
  2385. // "$ref": "EmailLinkSigninResponse"
  2386. // },
  2387. // "scopes": [
  2388. // "https://www.googleapis.com/auth/cloud-platform"
  2389. // ]
  2390. // }
  2391. }
  2392. // method id "identitytoolkit.relyingparty.getAccountInfo":
  2393. type RelyingpartyGetAccountInfoCall struct {
  2394. s *Service
  2395. identitytoolkitrelyingpartygetaccountinforequest *IdentitytoolkitRelyingpartyGetAccountInfoRequest
  2396. urlParams_ gensupport.URLParams
  2397. ctx_ context.Context
  2398. header_ http.Header
  2399. }
  2400. // GetAccountInfo: Returns the account info.
  2401. func (r *RelyingpartyService) GetAccountInfo(identitytoolkitrelyingpartygetaccountinforequest *IdentitytoolkitRelyingpartyGetAccountInfoRequest) *RelyingpartyGetAccountInfoCall {
  2402. c := &RelyingpartyGetAccountInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2403. c.identitytoolkitrelyingpartygetaccountinforequest = identitytoolkitrelyingpartygetaccountinforequest
  2404. return c
  2405. }
  2406. // Fields allows partial responses to be retrieved. See
  2407. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2408. // for more information.
  2409. func (c *RelyingpartyGetAccountInfoCall) Fields(s ...googleapi.Field) *RelyingpartyGetAccountInfoCall {
  2410. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2411. return c
  2412. }
  2413. // Context sets the context to be used in this call's Do method. Any
  2414. // pending HTTP request will be aborted if the provided context is
  2415. // canceled.
  2416. func (c *RelyingpartyGetAccountInfoCall) Context(ctx context.Context) *RelyingpartyGetAccountInfoCall {
  2417. c.ctx_ = ctx
  2418. return c
  2419. }
  2420. // Header returns an http.Header that can be modified by the caller to
  2421. // add HTTP headers to the request.
  2422. func (c *RelyingpartyGetAccountInfoCall) Header() http.Header {
  2423. if c.header_ == nil {
  2424. c.header_ = make(http.Header)
  2425. }
  2426. return c.header_
  2427. }
  2428. func (c *RelyingpartyGetAccountInfoCall) doRequest(alt string) (*http.Response, error) {
  2429. reqHeaders := make(http.Header)
  2430. for k, v := range c.header_ {
  2431. reqHeaders[k] = v
  2432. }
  2433. reqHeaders.Set("User-Agent", c.s.userAgent())
  2434. var body io.Reader = nil
  2435. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartygetaccountinforequest)
  2436. if err != nil {
  2437. return nil, err
  2438. }
  2439. reqHeaders.Set("Content-Type", "application/json")
  2440. c.urlParams_.Set("alt", alt)
  2441. c.urlParams_.Set("prettyPrint", "false")
  2442. urls := googleapi.ResolveRelative(c.s.BasePath, "getAccountInfo")
  2443. urls += "?" + c.urlParams_.Encode()
  2444. req, err := http.NewRequest("POST", urls, body)
  2445. if err != nil {
  2446. return nil, err
  2447. }
  2448. req.Header = reqHeaders
  2449. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2450. }
  2451. // Do executes the "identitytoolkit.relyingparty.getAccountInfo" call.
  2452. // Exactly one of *GetAccountInfoResponse or error will be non-nil. Any
  2453. // non-2xx status code is an error. Response headers are in either
  2454. // *GetAccountInfoResponse.ServerResponse.Header or (if a response was
  2455. // returned at all) in error.(*googleapi.Error).Header. Use
  2456. // googleapi.IsNotModified to check whether the returned error was
  2457. // because http.StatusNotModified was returned.
  2458. func (c *RelyingpartyGetAccountInfoCall) Do(opts ...googleapi.CallOption) (*GetAccountInfoResponse, error) {
  2459. gensupport.SetOptions(c.urlParams_, opts...)
  2460. res, err := c.doRequest("json")
  2461. if res != nil && res.StatusCode == http.StatusNotModified {
  2462. if res.Body != nil {
  2463. res.Body.Close()
  2464. }
  2465. return nil, &googleapi.Error{
  2466. Code: res.StatusCode,
  2467. Header: res.Header,
  2468. }
  2469. }
  2470. if err != nil {
  2471. return nil, err
  2472. }
  2473. defer googleapi.CloseBody(res)
  2474. if err := googleapi.CheckResponse(res); err != nil {
  2475. return nil, err
  2476. }
  2477. ret := &GetAccountInfoResponse{
  2478. ServerResponse: googleapi.ServerResponse{
  2479. Header: res.Header,
  2480. HTTPStatusCode: res.StatusCode,
  2481. },
  2482. }
  2483. target := &ret
  2484. if err := gensupport.DecodeResponse(target, res); err != nil {
  2485. return nil, err
  2486. }
  2487. return ret, nil
  2488. // {
  2489. // "description": "Returns the account info.",
  2490. // "httpMethod": "POST",
  2491. // "id": "identitytoolkit.relyingparty.getAccountInfo",
  2492. // "path": "getAccountInfo",
  2493. // "request": {
  2494. // "$ref": "IdentitytoolkitRelyingpartyGetAccountInfoRequest"
  2495. // },
  2496. // "response": {
  2497. // "$ref": "GetAccountInfoResponse"
  2498. // },
  2499. // "scopes": [
  2500. // "https://www.googleapis.com/auth/cloud-platform"
  2501. // ]
  2502. // }
  2503. }
  2504. // method id "identitytoolkit.relyingparty.getOobConfirmationCode":
  2505. type RelyingpartyGetOobConfirmationCodeCall struct {
  2506. s *Service
  2507. relyingparty *Relyingparty
  2508. urlParams_ gensupport.URLParams
  2509. ctx_ context.Context
  2510. header_ http.Header
  2511. }
  2512. // GetOobConfirmationCode: Get a code for user action confirmation.
  2513. func (r *RelyingpartyService) GetOobConfirmationCode(relyingparty *Relyingparty) *RelyingpartyGetOobConfirmationCodeCall {
  2514. c := &RelyingpartyGetOobConfirmationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2515. c.relyingparty = relyingparty
  2516. return c
  2517. }
  2518. // Fields allows partial responses to be retrieved. See
  2519. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2520. // for more information.
  2521. func (c *RelyingpartyGetOobConfirmationCodeCall) Fields(s ...googleapi.Field) *RelyingpartyGetOobConfirmationCodeCall {
  2522. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2523. return c
  2524. }
  2525. // Context sets the context to be used in this call's Do method. Any
  2526. // pending HTTP request will be aborted if the provided context is
  2527. // canceled.
  2528. func (c *RelyingpartyGetOobConfirmationCodeCall) Context(ctx context.Context) *RelyingpartyGetOobConfirmationCodeCall {
  2529. c.ctx_ = ctx
  2530. return c
  2531. }
  2532. // Header returns an http.Header that can be modified by the caller to
  2533. // add HTTP headers to the request.
  2534. func (c *RelyingpartyGetOobConfirmationCodeCall) Header() http.Header {
  2535. if c.header_ == nil {
  2536. c.header_ = make(http.Header)
  2537. }
  2538. return c.header_
  2539. }
  2540. func (c *RelyingpartyGetOobConfirmationCodeCall) doRequest(alt string) (*http.Response, error) {
  2541. reqHeaders := make(http.Header)
  2542. for k, v := range c.header_ {
  2543. reqHeaders[k] = v
  2544. }
  2545. reqHeaders.Set("User-Agent", c.s.userAgent())
  2546. var body io.Reader = nil
  2547. body, err := googleapi.WithoutDataWrapper.JSONReader(c.relyingparty)
  2548. if err != nil {
  2549. return nil, err
  2550. }
  2551. reqHeaders.Set("Content-Type", "application/json")
  2552. c.urlParams_.Set("alt", alt)
  2553. c.urlParams_.Set("prettyPrint", "false")
  2554. urls := googleapi.ResolveRelative(c.s.BasePath, "getOobConfirmationCode")
  2555. urls += "?" + c.urlParams_.Encode()
  2556. req, err := http.NewRequest("POST", urls, body)
  2557. if err != nil {
  2558. return nil, err
  2559. }
  2560. req.Header = reqHeaders
  2561. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2562. }
  2563. // Do executes the "identitytoolkit.relyingparty.getOobConfirmationCode" call.
  2564. // Exactly one of *GetOobConfirmationCodeResponse or error will be
  2565. // non-nil. Any non-2xx status code is an error. Response headers are in
  2566. // either *GetOobConfirmationCodeResponse.ServerResponse.Header or (if a
  2567. // response was returned at all) in error.(*googleapi.Error).Header. Use
  2568. // googleapi.IsNotModified to check whether the returned error was
  2569. // because http.StatusNotModified was returned.
  2570. func (c *RelyingpartyGetOobConfirmationCodeCall) Do(opts ...googleapi.CallOption) (*GetOobConfirmationCodeResponse, error) {
  2571. gensupport.SetOptions(c.urlParams_, opts...)
  2572. res, err := c.doRequest("json")
  2573. if res != nil && res.StatusCode == http.StatusNotModified {
  2574. if res.Body != nil {
  2575. res.Body.Close()
  2576. }
  2577. return nil, &googleapi.Error{
  2578. Code: res.StatusCode,
  2579. Header: res.Header,
  2580. }
  2581. }
  2582. if err != nil {
  2583. return nil, err
  2584. }
  2585. defer googleapi.CloseBody(res)
  2586. if err := googleapi.CheckResponse(res); err != nil {
  2587. return nil, err
  2588. }
  2589. ret := &GetOobConfirmationCodeResponse{
  2590. ServerResponse: googleapi.ServerResponse{
  2591. Header: res.Header,
  2592. HTTPStatusCode: res.StatusCode,
  2593. },
  2594. }
  2595. target := &ret
  2596. if err := gensupport.DecodeResponse(target, res); err != nil {
  2597. return nil, err
  2598. }
  2599. return ret, nil
  2600. // {
  2601. // "description": "Get a code for user action confirmation.",
  2602. // "httpMethod": "POST",
  2603. // "id": "identitytoolkit.relyingparty.getOobConfirmationCode",
  2604. // "path": "getOobConfirmationCode",
  2605. // "request": {
  2606. // "$ref": "Relyingparty"
  2607. // },
  2608. // "response": {
  2609. // "$ref": "GetOobConfirmationCodeResponse"
  2610. // },
  2611. // "scopes": [
  2612. // "https://www.googleapis.com/auth/cloud-platform"
  2613. // ]
  2614. // }
  2615. }
  2616. // method id "identitytoolkit.relyingparty.getProjectConfig":
  2617. type RelyingpartyGetProjectConfigCall struct {
  2618. s *Service
  2619. urlParams_ gensupport.URLParams
  2620. ifNoneMatch_ string
  2621. ctx_ context.Context
  2622. header_ http.Header
  2623. }
  2624. // GetProjectConfig: Get project configuration.
  2625. func (r *RelyingpartyService) GetProjectConfig() *RelyingpartyGetProjectConfigCall {
  2626. c := &RelyingpartyGetProjectConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2627. return c
  2628. }
  2629. // DelegatedProjectNumber sets the optional parameter
  2630. // "delegatedProjectNumber": Delegated GCP project number of the
  2631. // request.
  2632. func (c *RelyingpartyGetProjectConfigCall) DelegatedProjectNumber(delegatedProjectNumber string) *RelyingpartyGetProjectConfigCall {
  2633. c.urlParams_.Set("delegatedProjectNumber", delegatedProjectNumber)
  2634. return c
  2635. }
  2636. // ProjectNumber sets the optional parameter "projectNumber": GCP
  2637. // project number of the request.
  2638. func (c *RelyingpartyGetProjectConfigCall) ProjectNumber(projectNumber string) *RelyingpartyGetProjectConfigCall {
  2639. c.urlParams_.Set("projectNumber", projectNumber)
  2640. return c
  2641. }
  2642. // Fields allows partial responses to be retrieved. See
  2643. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2644. // for more information.
  2645. func (c *RelyingpartyGetProjectConfigCall) Fields(s ...googleapi.Field) *RelyingpartyGetProjectConfigCall {
  2646. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2647. return c
  2648. }
  2649. // IfNoneMatch sets the optional parameter which makes the operation
  2650. // fail if the object's ETag matches the given value. This is useful for
  2651. // getting updates only after the object has changed since the last
  2652. // request. Use googleapi.IsNotModified to check whether the response
  2653. // error from Do is the result of In-None-Match.
  2654. func (c *RelyingpartyGetProjectConfigCall) IfNoneMatch(entityTag string) *RelyingpartyGetProjectConfigCall {
  2655. c.ifNoneMatch_ = entityTag
  2656. return c
  2657. }
  2658. // Context sets the context to be used in this call's Do method. Any
  2659. // pending HTTP request will be aborted if the provided context is
  2660. // canceled.
  2661. func (c *RelyingpartyGetProjectConfigCall) Context(ctx context.Context) *RelyingpartyGetProjectConfigCall {
  2662. c.ctx_ = ctx
  2663. return c
  2664. }
  2665. // Header returns an http.Header that can be modified by the caller to
  2666. // add HTTP headers to the request.
  2667. func (c *RelyingpartyGetProjectConfigCall) Header() http.Header {
  2668. if c.header_ == nil {
  2669. c.header_ = make(http.Header)
  2670. }
  2671. return c.header_
  2672. }
  2673. func (c *RelyingpartyGetProjectConfigCall) doRequest(alt string) (*http.Response, error) {
  2674. reqHeaders := make(http.Header)
  2675. for k, v := range c.header_ {
  2676. reqHeaders[k] = v
  2677. }
  2678. reqHeaders.Set("User-Agent", c.s.userAgent())
  2679. if c.ifNoneMatch_ != "" {
  2680. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2681. }
  2682. var body io.Reader = nil
  2683. c.urlParams_.Set("alt", alt)
  2684. c.urlParams_.Set("prettyPrint", "false")
  2685. urls := googleapi.ResolveRelative(c.s.BasePath, "getProjectConfig")
  2686. urls += "?" + c.urlParams_.Encode()
  2687. req, err := http.NewRequest("GET", urls, body)
  2688. if err != nil {
  2689. return nil, err
  2690. }
  2691. req.Header = reqHeaders
  2692. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2693. }
  2694. // Do executes the "identitytoolkit.relyingparty.getProjectConfig" call.
  2695. // Exactly one of *IdentitytoolkitRelyingpartyGetProjectConfigResponse
  2696. // or error will be non-nil. Any non-2xx status code is an error.
  2697. // Response headers are in either
  2698. // *IdentitytoolkitRelyingpartyGetProjectConfigResponse.ServerResponse.He
  2699. // ader or (if a response was returned at all) in
  2700. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2701. // whether the returned error was because http.StatusNotModified was
  2702. // returned.
  2703. func (c *RelyingpartyGetProjectConfigCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartyGetProjectConfigResponse, error) {
  2704. gensupport.SetOptions(c.urlParams_, opts...)
  2705. res, err := c.doRequest("json")
  2706. if res != nil && res.StatusCode == http.StatusNotModified {
  2707. if res.Body != nil {
  2708. res.Body.Close()
  2709. }
  2710. return nil, &googleapi.Error{
  2711. Code: res.StatusCode,
  2712. Header: res.Header,
  2713. }
  2714. }
  2715. if err != nil {
  2716. return nil, err
  2717. }
  2718. defer googleapi.CloseBody(res)
  2719. if err := googleapi.CheckResponse(res); err != nil {
  2720. return nil, err
  2721. }
  2722. ret := &IdentitytoolkitRelyingpartyGetProjectConfigResponse{
  2723. ServerResponse: googleapi.ServerResponse{
  2724. Header: res.Header,
  2725. HTTPStatusCode: res.StatusCode,
  2726. },
  2727. }
  2728. target := &ret
  2729. if err := gensupport.DecodeResponse(target, res); err != nil {
  2730. return nil, err
  2731. }
  2732. return ret, nil
  2733. // {
  2734. // "description": "Get project configuration.",
  2735. // "httpMethod": "GET",
  2736. // "id": "identitytoolkit.relyingparty.getProjectConfig",
  2737. // "parameters": {
  2738. // "delegatedProjectNumber": {
  2739. // "description": "Delegated GCP project number of the request.",
  2740. // "location": "query",
  2741. // "type": "string"
  2742. // },
  2743. // "projectNumber": {
  2744. // "description": "GCP project number of the request.",
  2745. // "location": "query",
  2746. // "type": "string"
  2747. // }
  2748. // },
  2749. // "path": "getProjectConfig",
  2750. // "response": {
  2751. // "$ref": "IdentitytoolkitRelyingpartyGetProjectConfigResponse"
  2752. // },
  2753. // "scopes": [
  2754. // "https://www.googleapis.com/auth/cloud-platform"
  2755. // ]
  2756. // }
  2757. }
  2758. // method id "identitytoolkit.relyingparty.getPublicKeys":
  2759. type RelyingpartyGetPublicKeysCall struct {
  2760. s *Service
  2761. urlParams_ gensupport.URLParams
  2762. ifNoneMatch_ string
  2763. ctx_ context.Context
  2764. header_ http.Header
  2765. }
  2766. // GetPublicKeys: Get token signing public key.
  2767. func (r *RelyingpartyService) GetPublicKeys() *RelyingpartyGetPublicKeysCall {
  2768. c := &RelyingpartyGetPublicKeysCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2769. return c
  2770. }
  2771. // Fields allows partial responses to be retrieved. See
  2772. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2773. // for more information.
  2774. func (c *RelyingpartyGetPublicKeysCall) Fields(s ...googleapi.Field) *RelyingpartyGetPublicKeysCall {
  2775. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2776. return c
  2777. }
  2778. // IfNoneMatch sets the optional parameter which makes the operation
  2779. // fail if the object's ETag matches the given value. This is useful for
  2780. // getting updates only after the object has changed since the last
  2781. // request. Use googleapi.IsNotModified to check whether the response
  2782. // error from Do is the result of In-None-Match.
  2783. func (c *RelyingpartyGetPublicKeysCall) IfNoneMatch(entityTag string) *RelyingpartyGetPublicKeysCall {
  2784. c.ifNoneMatch_ = entityTag
  2785. return c
  2786. }
  2787. // Context sets the context to be used in this call's Do method. Any
  2788. // pending HTTP request will be aborted if the provided context is
  2789. // canceled.
  2790. func (c *RelyingpartyGetPublicKeysCall) Context(ctx context.Context) *RelyingpartyGetPublicKeysCall {
  2791. c.ctx_ = ctx
  2792. return c
  2793. }
  2794. // Header returns an http.Header that can be modified by the caller to
  2795. // add HTTP headers to the request.
  2796. func (c *RelyingpartyGetPublicKeysCall) Header() http.Header {
  2797. if c.header_ == nil {
  2798. c.header_ = make(http.Header)
  2799. }
  2800. return c.header_
  2801. }
  2802. func (c *RelyingpartyGetPublicKeysCall) doRequest(alt string) (*http.Response, error) {
  2803. reqHeaders := make(http.Header)
  2804. for k, v := range c.header_ {
  2805. reqHeaders[k] = v
  2806. }
  2807. reqHeaders.Set("User-Agent", c.s.userAgent())
  2808. if c.ifNoneMatch_ != "" {
  2809. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2810. }
  2811. var body io.Reader = nil
  2812. c.urlParams_.Set("alt", alt)
  2813. c.urlParams_.Set("prettyPrint", "false")
  2814. urls := googleapi.ResolveRelative(c.s.BasePath, "publicKeys")
  2815. urls += "?" + c.urlParams_.Encode()
  2816. req, err := http.NewRequest("GET", urls, body)
  2817. if err != nil {
  2818. return nil, err
  2819. }
  2820. req.Header = reqHeaders
  2821. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2822. }
  2823. // Do executes the "identitytoolkit.relyingparty.getPublicKeys" call.
  2824. func (c *RelyingpartyGetPublicKeysCall) Do(opts ...googleapi.CallOption) (map[string]string, error) {
  2825. gensupport.SetOptions(c.urlParams_, opts...)
  2826. res, err := c.doRequest("json")
  2827. if err != nil {
  2828. return nil, err
  2829. }
  2830. defer googleapi.CloseBody(res)
  2831. if err := googleapi.CheckResponse(res); err != nil {
  2832. return nil, err
  2833. }
  2834. var ret map[string]string
  2835. target := &ret
  2836. if err := gensupport.DecodeResponse(target, res); err != nil {
  2837. return nil, err
  2838. }
  2839. return ret, nil
  2840. // {
  2841. // "description": "Get token signing public key.",
  2842. // "httpMethod": "GET",
  2843. // "id": "identitytoolkit.relyingparty.getPublicKeys",
  2844. // "path": "publicKeys",
  2845. // "response": {
  2846. // "$ref": "IdentitytoolkitRelyingpartyGetPublicKeysResponse"
  2847. // },
  2848. // "scopes": [
  2849. // "https://www.googleapis.com/auth/cloud-platform"
  2850. // ]
  2851. // }
  2852. }
  2853. // method id "identitytoolkit.relyingparty.getRecaptchaParam":
  2854. type RelyingpartyGetRecaptchaParamCall struct {
  2855. s *Service
  2856. urlParams_ gensupport.URLParams
  2857. ifNoneMatch_ string
  2858. ctx_ context.Context
  2859. header_ http.Header
  2860. }
  2861. // GetRecaptchaParam: Get recaptcha secure param.
  2862. func (r *RelyingpartyService) GetRecaptchaParam() *RelyingpartyGetRecaptchaParamCall {
  2863. c := &RelyingpartyGetRecaptchaParamCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2864. return c
  2865. }
  2866. // Fields allows partial responses to be retrieved. See
  2867. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2868. // for more information.
  2869. func (c *RelyingpartyGetRecaptchaParamCall) Fields(s ...googleapi.Field) *RelyingpartyGetRecaptchaParamCall {
  2870. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2871. return c
  2872. }
  2873. // IfNoneMatch sets the optional parameter which makes the operation
  2874. // fail if the object's ETag matches the given value. This is useful for
  2875. // getting updates only after the object has changed since the last
  2876. // request. Use googleapi.IsNotModified to check whether the response
  2877. // error from Do is the result of In-None-Match.
  2878. func (c *RelyingpartyGetRecaptchaParamCall) IfNoneMatch(entityTag string) *RelyingpartyGetRecaptchaParamCall {
  2879. c.ifNoneMatch_ = entityTag
  2880. return c
  2881. }
  2882. // Context sets the context to be used in this call's Do method. Any
  2883. // pending HTTP request will be aborted if the provided context is
  2884. // canceled.
  2885. func (c *RelyingpartyGetRecaptchaParamCall) Context(ctx context.Context) *RelyingpartyGetRecaptchaParamCall {
  2886. c.ctx_ = ctx
  2887. return c
  2888. }
  2889. // Header returns an http.Header that can be modified by the caller to
  2890. // add HTTP headers to the request.
  2891. func (c *RelyingpartyGetRecaptchaParamCall) Header() http.Header {
  2892. if c.header_ == nil {
  2893. c.header_ = make(http.Header)
  2894. }
  2895. return c.header_
  2896. }
  2897. func (c *RelyingpartyGetRecaptchaParamCall) doRequest(alt string) (*http.Response, error) {
  2898. reqHeaders := make(http.Header)
  2899. for k, v := range c.header_ {
  2900. reqHeaders[k] = v
  2901. }
  2902. reqHeaders.Set("User-Agent", c.s.userAgent())
  2903. if c.ifNoneMatch_ != "" {
  2904. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2905. }
  2906. var body io.Reader = nil
  2907. c.urlParams_.Set("alt", alt)
  2908. c.urlParams_.Set("prettyPrint", "false")
  2909. urls := googleapi.ResolveRelative(c.s.BasePath, "getRecaptchaParam")
  2910. urls += "?" + c.urlParams_.Encode()
  2911. req, err := http.NewRequest("GET", urls, body)
  2912. if err != nil {
  2913. return nil, err
  2914. }
  2915. req.Header = reqHeaders
  2916. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2917. }
  2918. // Do executes the "identitytoolkit.relyingparty.getRecaptchaParam" call.
  2919. // Exactly one of *GetRecaptchaParamResponse or error will be non-nil.
  2920. // Any non-2xx status code is an error. Response headers are in either
  2921. // *GetRecaptchaParamResponse.ServerResponse.Header or (if a response
  2922. // was returned at all) in error.(*googleapi.Error).Header. Use
  2923. // googleapi.IsNotModified to check whether the returned error was
  2924. // because http.StatusNotModified was returned.
  2925. func (c *RelyingpartyGetRecaptchaParamCall) Do(opts ...googleapi.CallOption) (*GetRecaptchaParamResponse, error) {
  2926. gensupport.SetOptions(c.urlParams_, opts...)
  2927. res, err := c.doRequest("json")
  2928. if res != nil && res.StatusCode == http.StatusNotModified {
  2929. if res.Body != nil {
  2930. res.Body.Close()
  2931. }
  2932. return nil, &googleapi.Error{
  2933. Code: res.StatusCode,
  2934. Header: res.Header,
  2935. }
  2936. }
  2937. if err != nil {
  2938. return nil, err
  2939. }
  2940. defer googleapi.CloseBody(res)
  2941. if err := googleapi.CheckResponse(res); err != nil {
  2942. return nil, err
  2943. }
  2944. ret := &GetRecaptchaParamResponse{
  2945. ServerResponse: googleapi.ServerResponse{
  2946. Header: res.Header,
  2947. HTTPStatusCode: res.StatusCode,
  2948. },
  2949. }
  2950. target := &ret
  2951. if err := gensupport.DecodeResponse(target, res); err != nil {
  2952. return nil, err
  2953. }
  2954. return ret, nil
  2955. // {
  2956. // "description": "Get recaptcha secure param.",
  2957. // "httpMethod": "GET",
  2958. // "id": "identitytoolkit.relyingparty.getRecaptchaParam",
  2959. // "path": "getRecaptchaParam",
  2960. // "response": {
  2961. // "$ref": "GetRecaptchaParamResponse"
  2962. // },
  2963. // "scopes": [
  2964. // "https://www.googleapis.com/auth/cloud-platform"
  2965. // ]
  2966. // }
  2967. }
  2968. // method id "identitytoolkit.relyingparty.resetPassword":
  2969. type RelyingpartyResetPasswordCall struct {
  2970. s *Service
  2971. identitytoolkitrelyingpartyresetpasswordrequest *IdentitytoolkitRelyingpartyResetPasswordRequest
  2972. urlParams_ gensupport.URLParams
  2973. ctx_ context.Context
  2974. header_ http.Header
  2975. }
  2976. // ResetPassword: Reset password for a user.
  2977. func (r *RelyingpartyService) ResetPassword(identitytoolkitrelyingpartyresetpasswordrequest *IdentitytoolkitRelyingpartyResetPasswordRequest) *RelyingpartyResetPasswordCall {
  2978. c := &RelyingpartyResetPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2979. c.identitytoolkitrelyingpartyresetpasswordrequest = identitytoolkitrelyingpartyresetpasswordrequest
  2980. return c
  2981. }
  2982. // Fields allows partial responses to be retrieved. See
  2983. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2984. // for more information.
  2985. func (c *RelyingpartyResetPasswordCall) Fields(s ...googleapi.Field) *RelyingpartyResetPasswordCall {
  2986. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2987. return c
  2988. }
  2989. // Context sets the context to be used in this call's Do method. Any
  2990. // pending HTTP request will be aborted if the provided context is
  2991. // canceled.
  2992. func (c *RelyingpartyResetPasswordCall) Context(ctx context.Context) *RelyingpartyResetPasswordCall {
  2993. c.ctx_ = ctx
  2994. return c
  2995. }
  2996. // Header returns an http.Header that can be modified by the caller to
  2997. // add HTTP headers to the request.
  2998. func (c *RelyingpartyResetPasswordCall) Header() http.Header {
  2999. if c.header_ == nil {
  3000. c.header_ = make(http.Header)
  3001. }
  3002. return c.header_
  3003. }
  3004. func (c *RelyingpartyResetPasswordCall) doRequest(alt string) (*http.Response, error) {
  3005. reqHeaders := make(http.Header)
  3006. for k, v := range c.header_ {
  3007. reqHeaders[k] = v
  3008. }
  3009. reqHeaders.Set("User-Agent", c.s.userAgent())
  3010. var body io.Reader = nil
  3011. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyresetpasswordrequest)
  3012. if err != nil {
  3013. return nil, err
  3014. }
  3015. reqHeaders.Set("Content-Type", "application/json")
  3016. c.urlParams_.Set("alt", alt)
  3017. c.urlParams_.Set("prettyPrint", "false")
  3018. urls := googleapi.ResolveRelative(c.s.BasePath, "resetPassword")
  3019. urls += "?" + c.urlParams_.Encode()
  3020. req, err := http.NewRequest("POST", urls, body)
  3021. if err != nil {
  3022. return nil, err
  3023. }
  3024. req.Header = reqHeaders
  3025. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3026. }
  3027. // Do executes the "identitytoolkit.relyingparty.resetPassword" call.
  3028. // Exactly one of *ResetPasswordResponse or error will be non-nil. Any
  3029. // non-2xx status code is an error. Response headers are in either
  3030. // *ResetPasswordResponse.ServerResponse.Header or (if a response was
  3031. // returned at all) in error.(*googleapi.Error).Header. Use
  3032. // googleapi.IsNotModified to check whether the returned error was
  3033. // because http.StatusNotModified was returned.
  3034. func (c *RelyingpartyResetPasswordCall) Do(opts ...googleapi.CallOption) (*ResetPasswordResponse, error) {
  3035. gensupport.SetOptions(c.urlParams_, opts...)
  3036. res, err := c.doRequest("json")
  3037. if res != nil && res.StatusCode == http.StatusNotModified {
  3038. if res.Body != nil {
  3039. res.Body.Close()
  3040. }
  3041. return nil, &googleapi.Error{
  3042. Code: res.StatusCode,
  3043. Header: res.Header,
  3044. }
  3045. }
  3046. if err != nil {
  3047. return nil, err
  3048. }
  3049. defer googleapi.CloseBody(res)
  3050. if err := googleapi.CheckResponse(res); err != nil {
  3051. return nil, err
  3052. }
  3053. ret := &ResetPasswordResponse{
  3054. ServerResponse: googleapi.ServerResponse{
  3055. Header: res.Header,
  3056. HTTPStatusCode: res.StatusCode,
  3057. },
  3058. }
  3059. target := &ret
  3060. if err := gensupport.DecodeResponse(target, res); err != nil {
  3061. return nil, err
  3062. }
  3063. return ret, nil
  3064. // {
  3065. // "description": "Reset password for a user.",
  3066. // "httpMethod": "POST",
  3067. // "id": "identitytoolkit.relyingparty.resetPassword",
  3068. // "path": "resetPassword",
  3069. // "request": {
  3070. // "$ref": "IdentitytoolkitRelyingpartyResetPasswordRequest"
  3071. // },
  3072. // "response": {
  3073. // "$ref": "ResetPasswordResponse"
  3074. // },
  3075. // "scopes": [
  3076. // "https://www.googleapis.com/auth/cloud-platform"
  3077. // ]
  3078. // }
  3079. }
  3080. // method id "identitytoolkit.relyingparty.sendVerificationCode":
  3081. type RelyingpartySendVerificationCodeCall struct {
  3082. s *Service
  3083. identitytoolkitrelyingpartysendverificationcoderequest *IdentitytoolkitRelyingpartySendVerificationCodeRequest
  3084. urlParams_ gensupport.URLParams
  3085. ctx_ context.Context
  3086. header_ http.Header
  3087. }
  3088. // SendVerificationCode: Send SMS verification code.
  3089. func (r *RelyingpartyService) SendVerificationCode(identitytoolkitrelyingpartysendverificationcoderequest *IdentitytoolkitRelyingpartySendVerificationCodeRequest) *RelyingpartySendVerificationCodeCall {
  3090. c := &RelyingpartySendVerificationCodeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3091. c.identitytoolkitrelyingpartysendverificationcoderequest = identitytoolkitrelyingpartysendverificationcoderequest
  3092. return c
  3093. }
  3094. // Fields allows partial responses to be retrieved. See
  3095. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3096. // for more information.
  3097. func (c *RelyingpartySendVerificationCodeCall) Fields(s ...googleapi.Field) *RelyingpartySendVerificationCodeCall {
  3098. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3099. return c
  3100. }
  3101. // Context sets the context to be used in this call's Do method. Any
  3102. // pending HTTP request will be aborted if the provided context is
  3103. // canceled.
  3104. func (c *RelyingpartySendVerificationCodeCall) Context(ctx context.Context) *RelyingpartySendVerificationCodeCall {
  3105. c.ctx_ = ctx
  3106. return c
  3107. }
  3108. // Header returns an http.Header that can be modified by the caller to
  3109. // add HTTP headers to the request.
  3110. func (c *RelyingpartySendVerificationCodeCall) Header() http.Header {
  3111. if c.header_ == nil {
  3112. c.header_ = make(http.Header)
  3113. }
  3114. return c.header_
  3115. }
  3116. func (c *RelyingpartySendVerificationCodeCall) doRequest(alt string) (*http.Response, error) {
  3117. reqHeaders := make(http.Header)
  3118. for k, v := range c.header_ {
  3119. reqHeaders[k] = v
  3120. }
  3121. reqHeaders.Set("User-Agent", c.s.userAgent())
  3122. var body io.Reader = nil
  3123. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysendverificationcoderequest)
  3124. if err != nil {
  3125. return nil, err
  3126. }
  3127. reqHeaders.Set("Content-Type", "application/json")
  3128. c.urlParams_.Set("alt", alt)
  3129. c.urlParams_.Set("prettyPrint", "false")
  3130. urls := googleapi.ResolveRelative(c.s.BasePath, "sendVerificationCode")
  3131. urls += "?" + c.urlParams_.Encode()
  3132. req, err := http.NewRequest("POST", urls, body)
  3133. if err != nil {
  3134. return nil, err
  3135. }
  3136. req.Header = reqHeaders
  3137. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3138. }
  3139. // Do executes the "identitytoolkit.relyingparty.sendVerificationCode" call.
  3140. // Exactly one of
  3141. // *IdentitytoolkitRelyingpartySendVerificationCodeResponse or error
  3142. // will be non-nil. Any non-2xx status code is an error. Response
  3143. // headers are in either
  3144. // *IdentitytoolkitRelyingpartySendVerificationCodeResponse.ServerRespons
  3145. // e.Header or (if a response was returned at all) in
  3146. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3147. // whether the returned error was because http.StatusNotModified was
  3148. // returned.
  3149. func (c *RelyingpartySendVerificationCodeCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySendVerificationCodeResponse, error) {
  3150. gensupport.SetOptions(c.urlParams_, opts...)
  3151. res, err := c.doRequest("json")
  3152. if res != nil && res.StatusCode == http.StatusNotModified {
  3153. if res.Body != nil {
  3154. res.Body.Close()
  3155. }
  3156. return nil, &googleapi.Error{
  3157. Code: res.StatusCode,
  3158. Header: res.Header,
  3159. }
  3160. }
  3161. if err != nil {
  3162. return nil, err
  3163. }
  3164. defer googleapi.CloseBody(res)
  3165. if err := googleapi.CheckResponse(res); err != nil {
  3166. return nil, err
  3167. }
  3168. ret := &IdentitytoolkitRelyingpartySendVerificationCodeResponse{
  3169. ServerResponse: googleapi.ServerResponse{
  3170. Header: res.Header,
  3171. HTTPStatusCode: res.StatusCode,
  3172. },
  3173. }
  3174. target := &ret
  3175. if err := gensupport.DecodeResponse(target, res); err != nil {
  3176. return nil, err
  3177. }
  3178. return ret, nil
  3179. // {
  3180. // "description": "Send SMS verification code.",
  3181. // "httpMethod": "POST",
  3182. // "id": "identitytoolkit.relyingparty.sendVerificationCode",
  3183. // "path": "sendVerificationCode",
  3184. // "request": {
  3185. // "$ref": "IdentitytoolkitRelyingpartySendVerificationCodeRequest"
  3186. // },
  3187. // "response": {
  3188. // "$ref": "IdentitytoolkitRelyingpartySendVerificationCodeResponse"
  3189. // },
  3190. // "scopes": [
  3191. // "https://www.googleapis.com/auth/cloud-platform"
  3192. // ]
  3193. // }
  3194. }
  3195. // method id "identitytoolkit.relyingparty.setAccountInfo":
  3196. type RelyingpartySetAccountInfoCall struct {
  3197. s *Service
  3198. identitytoolkitrelyingpartysetaccountinforequest *IdentitytoolkitRelyingpartySetAccountInfoRequest
  3199. urlParams_ gensupport.URLParams
  3200. ctx_ context.Context
  3201. header_ http.Header
  3202. }
  3203. // SetAccountInfo: Set account info for a user.
  3204. func (r *RelyingpartyService) SetAccountInfo(identitytoolkitrelyingpartysetaccountinforequest *IdentitytoolkitRelyingpartySetAccountInfoRequest) *RelyingpartySetAccountInfoCall {
  3205. c := &RelyingpartySetAccountInfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3206. c.identitytoolkitrelyingpartysetaccountinforequest = identitytoolkitrelyingpartysetaccountinforequest
  3207. return c
  3208. }
  3209. // Fields allows partial responses to be retrieved. See
  3210. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3211. // for more information.
  3212. func (c *RelyingpartySetAccountInfoCall) Fields(s ...googleapi.Field) *RelyingpartySetAccountInfoCall {
  3213. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3214. return c
  3215. }
  3216. // Context sets the context to be used in this call's Do method. Any
  3217. // pending HTTP request will be aborted if the provided context is
  3218. // canceled.
  3219. func (c *RelyingpartySetAccountInfoCall) Context(ctx context.Context) *RelyingpartySetAccountInfoCall {
  3220. c.ctx_ = ctx
  3221. return c
  3222. }
  3223. // Header returns an http.Header that can be modified by the caller to
  3224. // add HTTP headers to the request.
  3225. func (c *RelyingpartySetAccountInfoCall) Header() http.Header {
  3226. if c.header_ == nil {
  3227. c.header_ = make(http.Header)
  3228. }
  3229. return c.header_
  3230. }
  3231. func (c *RelyingpartySetAccountInfoCall) doRequest(alt string) (*http.Response, error) {
  3232. reqHeaders := make(http.Header)
  3233. for k, v := range c.header_ {
  3234. reqHeaders[k] = v
  3235. }
  3236. reqHeaders.Set("User-Agent", c.s.userAgent())
  3237. var body io.Reader = nil
  3238. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysetaccountinforequest)
  3239. if err != nil {
  3240. return nil, err
  3241. }
  3242. reqHeaders.Set("Content-Type", "application/json")
  3243. c.urlParams_.Set("alt", alt)
  3244. c.urlParams_.Set("prettyPrint", "false")
  3245. urls := googleapi.ResolveRelative(c.s.BasePath, "setAccountInfo")
  3246. urls += "?" + c.urlParams_.Encode()
  3247. req, err := http.NewRequest("POST", urls, body)
  3248. if err != nil {
  3249. return nil, err
  3250. }
  3251. req.Header = reqHeaders
  3252. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3253. }
  3254. // Do executes the "identitytoolkit.relyingparty.setAccountInfo" call.
  3255. // Exactly one of *SetAccountInfoResponse or error will be non-nil. Any
  3256. // non-2xx status code is an error. Response headers are in either
  3257. // *SetAccountInfoResponse.ServerResponse.Header or (if a response was
  3258. // returned at all) in error.(*googleapi.Error).Header. Use
  3259. // googleapi.IsNotModified to check whether the returned error was
  3260. // because http.StatusNotModified was returned.
  3261. func (c *RelyingpartySetAccountInfoCall) Do(opts ...googleapi.CallOption) (*SetAccountInfoResponse, error) {
  3262. gensupport.SetOptions(c.urlParams_, opts...)
  3263. res, err := c.doRequest("json")
  3264. if res != nil && res.StatusCode == http.StatusNotModified {
  3265. if res.Body != nil {
  3266. res.Body.Close()
  3267. }
  3268. return nil, &googleapi.Error{
  3269. Code: res.StatusCode,
  3270. Header: res.Header,
  3271. }
  3272. }
  3273. if err != nil {
  3274. return nil, err
  3275. }
  3276. defer googleapi.CloseBody(res)
  3277. if err := googleapi.CheckResponse(res); err != nil {
  3278. return nil, err
  3279. }
  3280. ret := &SetAccountInfoResponse{
  3281. ServerResponse: googleapi.ServerResponse{
  3282. Header: res.Header,
  3283. HTTPStatusCode: res.StatusCode,
  3284. },
  3285. }
  3286. target := &ret
  3287. if err := gensupport.DecodeResponse(target, res); err != nil {
  3288. return nil, err
  3289. }
  3290. return ret, nil
  3291. // {
  3292. // "description": "Set account info for a user.",
  3293. // "httpMethod": "POST",
  3294. // "id": "identitytoolkit.relyingparty.setAccountInfo",
  3295. // "path": "setAccountInfo",
  3296. // "request": {
  3297. // "$ref": "IdentitytoolkitRelyingpartySetAccountInfoRequest"
  3298. // },
  3299. // "response": {
  3300. // "$ref": "SetAccountInfoResponse"
  3301. // },
  3302. // "scopes": [
  3303. // "https://www.googleapis.com/auth/cloud-platform"
  3304. // ]
  3305. // }
  3306. }
  3307. // method id "identitytoolkit.relyingparty.setProjectConfig":
  3308. type RelyingpartySetProjectConfigCall struct {
  3309. s *Service
  3310. identitytoolkitrelyingpartysetprojectconfigrequest *IdentitytoolkitRelyingpartySetProjectConfigRequest
  3311. urlParams_ gensupport.URLParams
  3312. ctx_ context.Context
  3313. header_ http.Header
  3314. }
  3315. // SetProjectConfig: Set project configuration.
  3316. func (r *RelyingpartyService) SetProjectConfig(identitytoolkitrelyingpartysetprojectconfigrequest *IdentitytoolkitRelyingpartySetProjectConfigRequest) *RelyingpartySetProjectConfigCall {
  3317. c := &RelyingpartySetProjectConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3318. c.identitytoolkitrelyingpartysetprojectconfigrequest = identitytoolkitrelyingpartysetprojectconfigrequest
  3319. return c
  3320. }
  3321. // Fields allows partial responses to be retrieved. See
  3322. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3323. // for more information.
  3324. func (c *RelyingpartySetProjectConfigCall) Fields(s ...googleapi.Field) *RelyingpartySetProjectConfigCall {
  3325. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3326. return c
  3327. }
  3328. // Context sets the context to be used in this call's Do method. Any
  3329. // pending HTTP request will be aborted if the provided context is
  3330. // canceled.
  3331. func (c *RelyingpartySetProjectConfigCall) Context(ctx context.Context) *RelyingpartySetProjectConfigCall {
  3332. c.ctx_ = ctx
  3333. return c
  3334. }
  3335. // Header returns an http.Header that can be modified by the caller to
  3336. // add HTTP headers to the request.
  3337. func (c *RelyingpartySetProjectConfigCall) Header() http.Header {
  3338. if c.header_ == nil {
  3339. c.header_ = make(http.Header)
  3340. }
  3341. return c.header_
  3342. }
  3343. func (c *RelyingpartySetProjectConfigCall) doRequest(alt string) (*http.Response, error) {
  3344. reqHeaders := make(http.Header)
  3345. for k, v := range c.header_ {
  3346. reqHeaders[k] = v
  3347. }
  3348. reqHeaders.Set("User-Agent", c.s.userAgent())
  3349. var body io.Reader = nil
  3350. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysetprojectconfigrequest)
  3351. if err != nil {
  3352. return nil, err
  3353. }
  3354. reqHeaders.Set("Content-Type", "application/json")
  3355. c.urlParams_.Set("alt", alt)
  3356. c.urlParams_.Set("prettyPrint", "false")
  3357. urls := googleapi.ResolveRelative(c.s.BasePath, "setProjectConfig")
  3358. urls += "?" + c.urlParams_.Encode()
  3359. req, err := http.NewRequest("POST", urls, body)
  3360. if err != nil {
  3361. return nil, err
  3362. }
  3363. req.Header = reqHeaders
  3364. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3365. }
  3366. // Do executes the "identitytoolkit.relyingparty.setProjectConfig" call.
  3367. // Exactly one of *IdentitytoolkitRelyingpartySetProjectConfigResponse
  3368. // or error will be non-nil. Any non-2xx status code is an error.
  3369. // Response headers are in either
  3370. // *IdentitytoolkitRelyingpartySetProjectConfigResponse.ServerResponse.He
  3371. // ader or (if a response was returned at all) in
  3372. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3373. // whether the returned error was because http.StatusNotModified was
  3374. // returned.
  3375. func (c *RelyingpartySetProjectConfigCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySetProjectConfigResponse, error) {
  3376. gensupport.SetOptions(c.urlParams_, opts...)
  3377. res, err := c.doRequest("json")
  3378. if res != nil && res.StatusCode == http.StatusNotModified {
  3379. if res.Body != nil {
  3380. res.Body.Close()
  3381. }
  3382. return nil, &googleapi.Error{
  3383. Code: res.StatusCode,
  3384. Header: res.Header,
  3385. }
  3386. }
  3387. if err != nil {
  3388. return nil, err
  3389. }
  3390. defer googleapi.CloseBody(res)
  3391. if err := googleapi.CheckResponse(res); err != nil {
  3392. return nil, err
  3393. }
  3394. ret := &IdentitytoolkitRelyingpartySetProjectConfigResponse{
  3395. ServerResponse: googleapi.ServerResponse{
  3396. Header: res.Header,
  3397. HTTPStatusCode: res.StatusCode,
  3398. },
  3399. }
  3400. target := &ret
  3401. if err := gensupport.DecodeResponse(target, res); err != nil {
  3402. return nil, err
  3403. }
  3404. return ret, nil
  3405. // {
  3406. // "description": "Set project configuration.",
  3407. // "httpMethod": "POST",
  3408. // "id": "identitytoolkit.relyingparty.setProjectConfig",
  3409. // "path": "setProjectConfig",
  3410. // "request": {
  3411. // "$ref": "IdentitytoolkitRelyingpartySetProjectConfigRequest"
  3412. // },
  3413. // "response": {
  3414. // "$ref": "IdentitytoolkitRelyingpartySetProjectConfigResponse"
  3415. // },
  3416. // "scopes": [
  3417. // "https://www.googleapis.com/auth/cloud-platform"
  3418. // ]
  3419. // }
  3420. }
  3421. // method id "identitytoolkit.relyingparty.signOutUser":
  3422. type RelyingpartySignOutUserCall struct {
  3423. s *Service
  3424. identitytoolkitrelyingpartysignoutuserrequest *IdentitytoolkitRelyingpartySignOutUserRequest
  3425. urlParams_ gensupport.URLParams
  3426. ctx_ context.Context
  3427. header_ http.Header
  3428. }
  3429. // SignOutUser: Sign out user.
  3430. func (r *RelyingpartyService) SignOutUser(identitytoolkitrelyingpartysignoutuserrequest *IdentitytoolkitRelyingpartySignOutUserRequest) *RelyingpartySignOutUserCall {
  3431. c := &RelyingpartySignOutUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3432. c.identitytoolkitrelyingpartysignoutuserrequest = identitytoolkitrelyingpartysignoutuserrequest
  3433. return c
  3434. }
  3435. // Fields allows partial responses to be retrieved. See
  3436. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3437. // for more information.
  3438. func (c *RelyingpartySignOutUserCall) Fields(s ...googleapi.Field) *RelyingpartySignOutUserCall {
  3439. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3440. return c
  3441. }
  3442. // Context sets the context to be used in this call's Do method. Any
  3443. // pending HTTP request will be aborted if the provided context is
  3444. // canceled.
  3445. func (c *RelyingpartySignOutUserCall) Context(ctx context.Context) *RelyingpartySignOutUserCall {
  3446. c.ctx_ = ctx
  3447. return c
  3448. }
  3449. // Header returns an http.Header that can be modified by the caller to
  3450. // add HTTP headers to the request.
  3451. func (c *RelyingpartySignOutUserCall) Header() http.Header {
  3452. if c.header_ == nil {
  3453. c.header_ = make(http.Header)
  3454. }
  3455. return c.header_
  3456. }
  3457. func (c *RelyingpartySignOutUserCall) doRequest(alt string) (*http.Response, error) {
  3458. reqHeaders := make(http.Header)
  3459. for k, v := range c.header_ {
  3460. reqHeaders[k] = v
  3461. }
  3462. reqHeaders.Set("User-Agent", c.s.userAgent())
  3463. var body io.Reader = nil
  3464. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysignoutuserrequest)
  3465. if err != nil {
  3466. return nil, err
  3467. }
  3468. reqHeaders.Set("Content-Type", "application/json")
  3469. c.urlParams_.Set("alt", alt)
  3470. c.urlParams_.Set("prettyPrint", "false")
  3471. urls := googleapi.ResolveRelative(c.s.BasePath, "signOutUser")
  3472. urls += "?" + c.urlParams_.Encode()
  3473. req, err := http.NewRequest("POST", urls, body)
  3474. if err != nil {
  3475. return nil, err
  3476. }
  3477. req.Header = reqHeaders
  3478. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3479. }
  3480. // Do executes the "identitytoolkit.relyingparty.signOutUser" call.
  3481. // Exactly one of *IdentitytoolkitRelyingpartySignOutUserResponse or
  3482. // error will be non-nil. Any non-2xx status code is an error. Response
  3483. // headers are in either
  3484. // *IdentitytoolkitRelyingpartySignOutUserResponse.ServerResponse.Header
  3485. // or (if a response was returned at all) in
  3486. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3487. // whether the returned error was because http.StatusNotModified was
  3488. // returned.
  3489. func (c *RelyingpartySignOutUserCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartySignOutUserResponse, error) {
  3490. gensupport.SetOptions(c.urlParams_, opts...)
  3491. res, err := c.doRequest("json")
  3492. if res != nil && res.StatusCode == http.StatusNotModified {
  3493. if res.Body != nil {
  3494. res.Body.Close()
  3495. }
  3496. return nil, &googleapi.Error{
  3497. Code: res.StatusCode,
  3498. Header: res.Header,
  3499. }
  3500. }
  3501. if err != nil {
  3502. return nil, err
  3503. }
  3504. defer googleapi.CloseBody(res)
  3505. if err := googleapi.CheckResponse(res); err != nil {
  3506. return nil, err
  3507. }
  3508. ret := &IdentitytoolkitRelyingpartySignOutUserResponse{
  3509. ServerResponse: googleapi.ServerResponse{
  3510. Header: res.Header,
  3511. HTTPStatusCode: res.StatusCode,
  3512. },
  3513. }
  3514. target := &ret
  3515. if err := gensupport.DecodeResponse(target, res); err != nil {
  3516. return nil, err
  3517. }
  3518. return ret, nil
  3519. // {
  3520. // "description": "Sign out user.",
  3521. // "httpMethod": "POST",
  3522. // "id": "identitytoolkit.relyingparty.signOutUser",
  3523. // "path": "signOutUser",
  3524. // "request": {
  3525. // "$ref": "IdentitytoolkitRelyingpartySignOutUserRequest"
  3526. // },
  3527. // "response": {
  3528. // "$ref": "IdentitytoolkitRelyingpartySignOutUserResponse"
  3529. // },
  3530. // "scopes": [
  3531. // "https://www.googleapis.com/auth/cloud-platform"
  3532. // ]
  3533. // }
  3534. }
  3535. // method id "identitytoolkit.relyingparty.signupNewUser":
  3536. type RelyingpartySignupNewUserCall struct {
  3537. s *Service
  3538. identitytoolkitrelyingpartysignupnewuserrequest *IdentitytoolkitRelyingpartySignupNewUserRequest
  3539. urlParams_ gensupport.URLParams
  3540. ctx_ context.Context
  3541. header_ http.Header
  3542. }
  3543. // SignupNewUser: Signup new user.
  3544. func (r *RelyingpartyService) SignupNewUser(identitytoolkitrelyingpartysignupnewuserrequest *IdentitytoolkitRelyingpartySignupNewUserRequest) *RelyingpartySignupNewUserCall {
  3545. c := &RelyingpartySignupNewUserCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3546. c.identitytoolkitrelyingpartysignupnewuserrequest = identitytoolkitrelyingpartysignupnewuserrequest
  3547. return c
  3548. }
  3549. // Fields allows partial responses to be retrieved. See
  3550. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3551. // for more information.
  3552. func (c *RelyingpartySignupNewUserCall) Fields(s ...googleapi.Field) *RelyingpartySignupNewUserCall {
  3553. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3554. return c
  3555. }
  3556. // Context sets the context to be used in this call's Do method. Any
  3557. // pending HTTP request will be aborted if the provided context is
  3558. // canceled.
  3559. func (c *RelyingpartySignupNewUserCall) Context(ctx context.Context) *RelyingpartySignupNewUserCall {
  3560. c.ctx_ = ctx
  3561. return c
  3562. }
  3563. // Header returns an http.Header that can be modified by the caller to
  3564. // add HTTP headers to the request.
  3565. func (c *RelyingpartySignupNewUserCall) Header() http.Header {
  3566. if c.header_ == nil {
  3567. c.header_ = make(http.Header)
  3568. }
  3569. return c.header_
  3570. }
  3571. func (c *RelyingpartySignupNewUserCall) doRequest(alt string) (*http.Response, error) {
  3572. reqHeaders := make(http.Header)
  3573. for k, v := range c.header_ {
  3574. reqHeaders[k] = v
  3575. }
  3576. reqHeaders.Set("User-Agent", c.s.userAgent())
  3577. var body io.Reader = nil
  3578. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysignupnewuserrequest)
  3579. if err != nil {
  3580. return nil, err
  3581. }
  3582. reqHeaders.Set("Content-Type", "application/json")
  3583. c.urlParams_.Set("alt", alt)
  3584. c.urlParams_.Set("prettyPrint", "false")
  3585. urls := googleapi.ResolveRelative(c.s.BasePath, "signupNewUser")
  3586. urls += "?" + c.urlParams_.Encode()
  3587. req, err := http.NewRequest("POST", urls, body)
  3588. if err != nil {
  3589. return nil, err
  3590. }
  3591. req.Header = reqHeaders
  3592. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3593. }
  3594. // Do executes the "identitytoolkit.relyingparty.signupNewUser" call.
  3595. // Exactly one of *SignupNewUserResponse or error will be non-nil. Any
  3596. // non-2xx status code is an error. Response headers are in either
  3597. // *SignupNewUserResponse.ServerResponse.Header or (if a response was
  3598. // returned at all) in error.(*googleapi.Error).Header. Use
  3599. // googleapi.IsNotModified to check whether the returned error was
  3600. // because http.StatusNotModified was returned.
  3601. func (c *RelyingpartySignupNewUserCall) Do(opts ...googleapi.CallOption) (*SignupNewUserResponse, error) {
  3602. gensupport.SetOptions(c.urlParams_, opts...)
  3603. res, err := c.doRequest("json")
  3604. if res != nil && res.StatusCode == http.StatusNotModified {
  3605. if res.Body != nil {
  3606. res.Body.Close()
  3607. }
  3608. return nil, &googleapi.Error{
  3609. Code: res.StatusCode,
  3610. Header: res.Header,
  3611. }
  3612. }
  3613. if err != nil {
  3614. return nil, err
  3615. }
  3616. defer googleapi.CloseBody(res)
  3617. if err := googleapi.CheckResponse(res); err != nil {
  3618. return nil, err
  3619. }
  3620. ret := &SignupNewUserResponse{
  3621. ServerResponse: googleapi.ServerResponse{
  3622. Header: res.Header,
  3623. HTTPStatusCode: res.StatusCode,
  3624. },
  3625. }
  3626. target := &ret
  3627. if err := gensupport.DecodeResponse(target, res); err != nil {
  3628. return nil, err
  3629. }
  3630. return ret, nil
  3631. // {
  3632. // "description": "Signup new user.",
  3633. // "httpMethod": "POST",
  3634. // "id": "identitytoolkit.relyingparty.signupNewUser",
  3635. // "path": "signupNewUser",
  3636. // "request": {
  3637. // "$ref": "IdentitytoolkitRelyingpartySignupNewUserRequest"
  3638. // },
  3639. // "response": {
  3640. // "$ref": "SignupNewUserResponse"
  3641. // },
  3642. // "scopes": [
  3643. // "https://www.googleapis.com/auth/cloud-platform"
  3644. // ]
  3645. // }
  3646. }
  3647. // method id "identitytoolkit.relyingparty.uploadAccount":
  3648. type RelyingpartyUploadAccountCall struct {
  3649. s *Service
  3650. identitytoolkitrelyingpartyuploadaccountrequest *IdentitytoolkitRelyingpartyUploadAccountRequest
  3651. urlParams_ gensupport.URLParams
  3652. ctx_ context.Context
  3653. header_ http.Header
  3654. }
  3655. // UploadAccount: Batch upload existing user accounts.
  3656. func (r *RelyingpartyService) UploadAccount(identitytoolkitrelyingpartyuploadaccountrequest *IdentitytoolkitRelyingpartyUploadAccountRequest) *RelyingpartyUploadAccountCall {
  3657. c := &RelyingpartyUploadAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3658. c.identitytoolkitrelyingpartyuploadaccountrequest = identitytoolkitrelyingpartyuploadaccountrequest
  3659. return c
  3660. }
  3661. // Fields allows partial responses to be retrieved. See
  3662. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3663. // for more information.
  3664. func (c *RelyingpartyUploadAccountCall) Fields(s ...googleapi.Field) *RelyingpartyUploadAccountCall {
  3665. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3666. return c
  3667. }
  3668. // Context sets the context to be used in this call's Do method. Any
  3669. // pending HTTP request will be aborted if the provided context is
  3670. // canceled.
  3671. func (c *RelyingpartyUploadAccountCall) Context(ctx context.Context) *RelyingpartyUploadAccountCall {
  3672. c.ctx_ = ctx
  3673. return c
  3674. }
  3675. // Header returns an http.Header that can be modified by the caller to
  3676. // add HTTP headers to the request.
  3677. func (c *RelyingpartyUploadAccountCall) Header() http.Header {
  3678. if c.header_ == nil {
  3679. c.header_ = make(http.Header)
  3680. }
  3681. return c.header_
  3682. }
  3683. func (c *RelyingpartyUploadAccountCall) doRequest(alt string) (*http.Response, error) {
  3684. reqHeaders := make(http.Header)
  3685. for k, v := range c.header_ {
  3686. reqHeaders[k] = v
  3687. }
  3688. reqHeaders.Set("User-Agent", c.s.userAgent())
  3689. var body io.Reader = nil
  3690. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyuploadaccountrequest)
  3691. if err != nil {
  3692. return nil, err
  3693. }
  3694. reqHeaders.Set("Content-Type", "application/json")
  3695. c.urlParams_.Set("alt", alt)
  3696. c.urlParams_.Set("prettyPrint", "false")
  3697. urls := googleapi.ResolveRelative(c.s.BasePath, "uploadAccount")
  3698. urls += "?" + c.urlParams_.Encode()
  3699. req, err := http.NewRequest("POST", urls, body)
  3700. if err != nil {
  3701. return nil, err
  3702. }
  3703. req.Header = reqHeaders
  3704. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3705. }
  3706. // Do executes the "identitytoolkit.relyingparty.uploadAccount" call.
  3707. // Exactly one of *UploadAccountResponse or error will be non-nil. Any
  3708. // non-2xx status code is an error. Response headers are in either
  3709. // *UploadAccountResponse.ServerResponse.Header or (if a response was
  3710. // returned at all) in error.(*googleapi.Error).Header. Use
  3711. // googleapi.IsNotModified to check whether the returned error was
  3712. // because http.StatusNotModified was returned.
  3713. func (c *RelyingpartyUploadAccountCall) Do(opts ...googleapi.CallOption) (*UploadAccountResponse, error) {
  3714. gensupport.SetOptions(c.urlParams_, opts...)
  3715. res, err := c.doRequest("json")
  3716. if res != nil && res.StatusCode == http.StatusNotModified {
  3717. if res.Body != nil {
  3718. res.Body.Close()
  3719. }
  3720. return nil, &googleapi.Error{
  3721. Code: res.StatusCode,
  3722. Header: res.Header,
  3723. }
  3724. }
  3725. if err != nil {
  3726. return nil, err
  3727. }
  3728. defer googleapi.CloseBody(res)
  3729. if err := googleapi.CheckResponse(res); err != nil {
  3730. return nil, err
  3731. }
  3732. ret := &UploadAccountResponse{
  3733. ServerResponse: googleapi.ServerResponse{
  3734. Header: res.Header,
  3735. HTTPStatusCode: res.StatusCode,
  3736. },
  3737. }
  3738. target := &ret
  3739. if err := gensupport.DecodeResponse(target, res); err != nil {
  3740. return nil, err
  3741. }
  3742. return ret, nil
  3743. // {
  3744. // "description": "Batch upload existing user accounts.",
  3745. // "httpMethod": "POST",
  3746. // "id": "identitytoolkit.relyingparty.uploadAccount",
  3747. // "path": "uploadAccount",
  3748. // "request": {
  3749. // "$ref": "IdentitytoolkitRelyingpartyUploadAccountRequest"
  3750. // },
  3751. // "response": {
  3752. // "$ref": "UploadAccountResponse"
  3753. // },
  3754. // "scopes": [
  3755. // "https://www.googleapis.com/auth/cloud-platform",
  3756. // "https://www.googleapis.com/auth/firebase"
  3757. // ]
  3758. // }
  3759. }
  3760. // method id "identitytoolkit.relyingparty.verifyAssertion":
  3761. type RelyingpartyVerifyAssertionCall struct {
  3762. s *Service
  3763. identitytoolkitrelyingpartyverifyassertionrequest *IdentitytoolkitRelyingpartyVerifyAssertionRequest
  3764. urlParams_ gensupport.URLParams
  3765. ctx_ context.Context
  3766. header_ http.Header
  3767. }
  3768. // VerifyAssertion: Verifies the assertion returned by the IdP.
  3769. func (r *RelyingpartyService) VerifyAssertion(identitytoolkitrelyingpartyverifyassertionrequest *IdentitytoolkitRelyingpartyVerifyAssertionRequest) *RelyingpartyVerifyAssertionCall {
  3770. c := &RelyingpartyVerifyAssertionCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3771. c.identitytoolkitrelyingpartyverifyassertionrequest = identitytoolkitrelyingpartyverifyassertionrequest
  3772. return c
  3773. }
  3774. // Fields allows partial responses to be retrieved. See
  3775. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3776. // for more information.
  3777. func (c *RelyingpartyVerifyAssertionCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyAssertionCall {
  3778. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3779. return c
  3780. }
  3781. // Context sets the context to be used in this call's Do method. Any
  3782. // pending HTTP request will be aborted if the provided context is
  3783. // canceled.
  3784. func (c *RelyingpartyVerifyAssertionCall) Context(ctx context.Context) *RelyingpartyVerifyAssertionCall {
  3785. c.ctx_ = ctx
  3786. return c
  3787. }
  3788. // Header returns an http.Header that can be modified by the caller to
  3789. // add HTTP headers to the request.
  3790. func (c *RelyingpartyVerifyAssertionCall) Header() http.Header {
  3791. if c.header_ == nil {
  3792. c.header_ = make(http.Header)
  3793. }
  3794. return c.header_
  3795. }
  3796. func (c *RelyingpartyVerifyAssertionCall) doRequest(alt string) (*http.Response, error) {
  3797. reqHeaders := make(http.Header)
  3798. for k, v := range c.header_ {
  3799. reqHeaders[k] = v
  3800. }
  3801. reqHeaders.Set("User-Agent", c.s.userAgent())
  3802. var body io.Reader = nil
  3803. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifyassertionrequest)
  3804. if err != nil {
  3805. return nil, err
  3806. }
  3807. reqHeaders.Set("Content-Type", "application/json")
  3808. c.urlParams_.Set("alt", alt)
  3809. c.urlParams_.Set("prettyPrint", "false")
  3810. urls := googleapi.ResolveRelative(c.s.BasePath, "verifyAssertion")
  3811. urls += "?" + c.urlParams_.Encode()
  3812. req, err := http.NewRequest("POST", urls, body)
  3813. if err != nil {
  3814. return nil, err
  3815. }
  3816. req.Header = reqHeaders
  3817. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3818. }
  3819. // Do executes the "identitytoolkit.relyingparty.verifyAssertion" call.
  3820. // Exactly one of *VerifyAssertionResponse or error will be non-nil. Any
  3821. // non-2xx status code is an error. Response headers are in either
  3822. // *VerifyAssertionResponse.ServerResponse.Header or (if a response was
  3823. // returned at all) in error.(*googleapi.Error).Header. Use
  3824. // googleapi.IsNotModified to check whether the returned error was
  3825. // because http.StatusNotModified was returned.
  3826. func (c *RelyingpartyVerifyAssertionCall) Do(opts ...googleapi.CallOption) (*VerifyAssertionResponse, error) {
  3827. gensupport.SetOptions(c.urlParams_, opts...)
  3828. res, err := c.doRequest("json")
  3829. if res != nil && res.StatusCode == http.StatusNotModified {
  3830. if res.Body != nil {
  3831. res.Body.Close()
  3832. }
  3833. return nil, &googleapi.Error{
  3834. Code: res.StatusCode,
  3835. Header: res.Header,
  3836. }
  3837. }
  3838. if err != nil {
  3839. return nil, err
  3840. }
  3841. defer googleapi.CloseBody(res)
  3842. if err := googleapi.CheckResponse(res); err != nil {
  3843. return nil, err
  3844. }
  3845. ret := &VerifyAssertionResponse{
  3846. ServerResponse: googleapi.ServerResponse{
  3847. Header: res.Header,
  3848. HTTPStatusCode: res.StatusCode,
  3849. },
  3850. }
  3851. target := &ret
  3852. if err := gensupport.DecodeResponse(target, res); err != nil {
  3853. return nil, err
  3854. }
  3855. return ret, nil
  3856. // {
  3857. // "description": "Verifies the assertion returned by the IdP.",
  3858. // "httpMethod": "POST",
  3859. // "id": "identitytoolkit.relyingparty.verifyAssertion",
  3860. // "path": "verifyAssertion",
  3861. // "request": {
  3862. // "$ref": "IdentitytoolkitRelyingpartyVerifyAssertionRequest"
  3863. // },
  3864. // "response": {
  3865. // "$ref": "VerifyAssertionResponse"
  3866. // },
  3867. // "scopes": [
  3868. // "https://www.googleapis.com/auth/cloud-platform"
  3869. // ]
  3870. // }
  3871. }
  3872. // method id "identitytoolkit.relyingparty.verifyCustomToken":
  3873. type RelyingpartyVerifyCustomTokenCall struct {
  3874. s *Service
  3875. identitytoolkitrelyingpartyverifycustomtokenrequest *IdentitytoolkitRelyingpartyVerifyCustomTokenRequest
  3876. urlParams_ gensupport.URLParams
  3877. ctx_ context.Context
  3878. header_ http.Header
  3879. }
  3880. // VerifyCustomToken: Verifies the developer asserted ID token.
  3881. func (r *RelyingpartyService) VerifyCustomToken(identitytoolkitrelyingpartyverifycustomtokenrequest *IdentitytoolkitRelyingpartyVerifyCustomTokenRequest) *RelyingpartyVerifyCustomTokenCall {
  3882. c := &RelyingpartyVerifyCustomTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3883. c.identitytoolkitrelyingpartyverifycustomtokenrequest = identitytoolkitrelyingpartyverifycustomtokenrequest
  3884. return c
  3885. }
  3886. // Fields allows partial responses to be retrieved. See
  3887. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3888. // for more information.
  3889. func (c *RelyingpartyVerifyCustomTokenCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyCustomTokenCall {
  3890. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3891. return c
  3892. }
  3893. // Context sets the context to be used in this call's Do method. Any
  3894. // pending HTTP request will be aborted if the provided context is
  3895. // canceled.
  3896. func (c *RelyingpartyVerifyCustomTokenCall) Context(ctx context.Context) *RelyingpartyVerifyCustomTokenCall {
  3897. c.ctx_ = ctx
  3898. return c
  3899. }
  3900. // Header returns an http.Header that can be modified by the caller to
  3901. // add HTTP headers to the request.
  3902. func (c *RelyingpartyVerifyCustomTokenCall) Header() http.Header {
  3903. if c.header_ == nil {
  3904. c.header_ = make(http.Header)
  3905. }
  3906. return c.header_
  3907. }
  3908. func (c *RelyingpartyVerifyCustomTokenCall) doRequest(alt string) (*http.Response, error) {
  3909. reqHeaders := make(http.Header)
  3910. for k, v := range c.header_ {
  3911. reqHeaders[k] = v
  3912. }
  3913. reqHeaders.Set("User-Agent", c.s.userAgent())
  3914. var body io.Reader = nil
  3915. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifycustomtokenrequest)
  3916. if err != nil {
  3917. return nil, err
  3918. }
  3919. reqHeaders.Set("Content-Type", "application/json")
  3920. c.urlParams_.Set("alt", alt)
  3921. c.urlParams_.Set("prettyPrint", "false")
  3922. urls := googleapi.ResolveRelative(c.s.BasePath, "verifyCustomToken")
  3923. urls += "?" + c.urlParams_.Encode()
  3924. req, err := http.NewRequest("POST", urls, body)
  3925. if err != nil {
  3926. return nil, err
  3927. }
  3928. req.Header = reqHeaders
  3929. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3930. }
  3931. // Do executes the "identitytoolkit.relyingparty.verifyCustomToken" call.
  3932. // Exactly one of *VerifyCustomTokenResponse or error will be non-nil.
  3933. // Any non-2xx status code is an error. Response headers are in either
  3934. // *VerifyCustomTokenResponse.ServerResponse.Header or (if a response
  3935. // was returned at all) in error.(*googleapi.Error).Header. Use
  3936. // googleapi.IsNotModified to check whether the returned error was
  3937. // because http.StatusNotModified was returned.
  3938. func (c *RelyingpartyVerifyCustomTokenCall) Do(opts ...googleapi.CallOption) (*VerifyCustomTokenResponse, error) {
  3939. gensupport.SetOptions(c.urlParams_, opts...)
  3940. res, err := c.doRequest("json")
  3941. if res != nil && res.StatusCode == http.StatusNotModified {
  3942. if res.Body != nil {
  3943. res.Body.Close()
  3944. }
  3945. return nil, &googleapi.Error{
  3946. Code: res.StatusCode,
  3947. Header: res.Header,
  3948. }
  3949. }
  3950. if err != nil {
  3951. return nil, err
  3952. }
  3953. defer googleapi.CloseBody(res)
  3954. if err := googleapi.CheckResponse(res); err != nil {
  3955. return nil, err
  3956. }
  3957. ret := &VerifyCustomTokenResponse{
  3958. ServerResponse: googleapi.ServerResponse{
  3959. Header: res.Header,
  3960. HTTPStatusCode: res.StatusCode,
  3961. },
  3962. }
  3963. target := &ret
  3964. if err := gensupport.DecodeResponse(target, res); err != nil {
  3965. return nil, err
  3966. }
  3967. return ret, nil
  3968. // {
  3969. // "description": "Verifies the developer asserted ID token.",
  3970. // "httpMethod": "POST",
  3971. // "id": "identitytoolkit.relyingparty.verifyCustomToken",
  3972. // "path": "verifyCustomToken",
  3973. // "request": {
  3974. // "$ref": "IdentitytoolkitRelyingpartyVerifyCustomTokenRequest"
  3975. // },
  3976. // "response": {
  3977. // "$ref": "VerifyCustomTokenResponse"
  3978. // },
  3979. // "scopes": [
  3980. // "https://www.googleapis.com/auth/cloud-platform"
  3981. // ]
  3982. // }
  3983. }
  3984. // method id "identitytoolkit.relyingparty.verifyPassword":
  3985. type RelyingpartyVerifyPasswordCall struct {
  3986. s *Service
  3987. identitytoolkitrelyingpartyverifypasswordrequest *IdentitytoolkitRelyingpartyVerifyPasswordRequest
  3988. urlParams_ gensupport.URLParams
  3989. ctx_ context.Context
  3990. header_ http.Header
  3991. }
  3992. // VerifyPassword: Verifies the user entered password.
  3993. func (r *RelyingpartyService) VerifyPassword(identitytoolkitrelyingpartyverifypasswordrequest *IdentitytoolkitRelyingpartyVerifyPasswordRequest) *RelyingpartyVerifyPasswordCall {
  3994. c := &RelyingpartyVerifyPasswordCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3995. c.identitytoolkitrelyingpartyverifypasswordrequest = identitytoolkitrelyingpartyverifypasswordrequest
  3996. return c
  3997. }
  3998. // Fields allows partial responses to be retrieved. See
  3999. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4000. // for more information.
  4001. func (c *RelyingpartyVerifyPasswordCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyPasswordCall {
  4002. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4003. return c
  4004. }
  4005. // Context sets the context to be used in this call's Do method. Any
  4006. // pending HTTP request will be aborted if the provided context is
  4007. // canceled.
  4008. func (c *RelyingpartyVerifyPasswordCall) Context(ctx context.Context) *RelyingpartyVerifyPasswordCall {
  4009. c.ctx_ = ctx
  4010. return c
  4011. }
  4012. // Header returns an http.Header that can be modified by the caller to
  4013. // add HTTP headers to the request.
  4014. func (c *RelyingpartyVerifyPasswordCall) Header() http.Header {
  4015. if c.header_ == nil {
  4016. c.header_ = make(http.Header)
  4017. }
  4018. return c.header_
  4019. }
  4020. func (c *RelyingpartyVerifyPasswordCall) doRequest(alt string) (*http.Response, error) {
  4021. reqHeaders := make(http.Header)
  4022. for k, v := range c.header_ {
  4023. reqHeaders[k] = v
  4024. }
  4025. reqHeaders.Set("User-Agent", c.s.userAgent())
  4026. var body io.Reader = nil
  4027. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifypasswordrequest)
  4028. if err != nil {
  4029. return nil, err
  4030. }
  4031. reqHeaders.Set("Content-Type", "application/json")
  4032. c.urlParams_.Set("alt", alt)
  4033. c.urlParams_.Set("prettyPrint", "false")
  4034. urls := googleapi.ResolveRelative(c.s.BasePath, "verifyPassword")
  4035. urls += "?" + c.urlParams_.Encode()
  4036. req, err := http.NewRequest("POST", urls, body)
  4037. if err != nil {
  4038. return nil, err
  4039. }
  4040. req.Header = reqHeaders
  4041. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4042. }
  4043. // Do executes the "identitytoolkit.relyingparty.verifyPassword" call.
  4044. // Exactly one of *VerifyPasswordResponse or error will be non-nil. Any
  4045. // non-2xx status code is an error. Response headers are in either
  4046. // *VerifyPasswordResponse.ServerResponse.Header or (if a response was
  4047. // returned at all) in error.(*googleapi.Error).Header. Use
  4048. // googleapi.IsNotModified to check whether the returned error was
  4049. // because http.StatusNotModified was returned.
  4050. func (c *RelyingpartyVerifyPasswordCall) Do(opts ...googleapi.CallOption) (*VerifyPasswordResponse, error) {
  4051. gensupport.SetOptions(c.urlParams_, opts...)
  4052. res, err := c.doRequest("json")
  4053. if res != nil && res.StatusCode == http.StatusNotModified {
  4054. if res.Body != nil {
  4055. res.Body.Close()
  4056. }
  4057. return nil, &googleapi.Error{
  4058. Code: res.StatusCode,
  4059. Header: res.Header,
  4060. }
  4061. }
  4062. if err != nil {
  4063. return nil, err
  4064. }
  4065. defer googleapi.CloseBody(res)
  4066. if err := googleapi.CheckResponse(res); err != nil {
  4067. return nil, err
  4068. }
  4069. ret := &VerifyPasswordResponse{
  4070. ServerResponse: googleapi.ServerResponse{
  4071. Header: res.Header,
  4072. HTTPStatusCode: res.StatusCode,
  4073. },
  4074. }
  4075. target := &ret
  4076. if err := gensupport.DecodeResponse(target, res); err != nil {
  4077. return nil, err
  4078. }
  4079. return ret, nil
  4080. // {
  4081. // "description": "Verifies the user entered password.",
  4082. // "httpMethod": "POST",
  4083. // "id": "identitytoolkit.relyingparty.verifyPassword",
  4084. // "path": "verifyPassword",
  4085. // "request": {
  4086. // "$ref": "IdentitytoolkitRelyingpartyVerifyPasswordRequest"
  4087. // },
  4088. // "response": {
  4089. // "$ref": "VerifyPasswordResponse"
  4090. // },
  4091. // "scopes": [
  4092. // "https://www.googleapis.com/auth/cloud-platform"
  4093. // ]
  4094. // }
  4095. }
  4096. // method id "identitytoolkit.relyingparty.verifyPhoneNumber":
  4097. type RelyingpartyVerifyPhoneNumberCall struct {
  4098. s *Service
  4099. identitytoolkitrelyingpartyverifyphonenumberrequest *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest
  4100. urlParams_ gensupport.URLParams
  4101. ctx_ context.Context
  4102. header_ http.Header
  4103. }
  4104. // VerifyPhoneNumber: Verifies ownership of a phone number and
  4105. // creates/updates the user account accordingly.
  4106. func (r *RelyingpartyService) VerifyPhoneNumber(identitytoolkitrelyingpartyverifyphonenumberrequest *IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest) *RelyingpartyVerifyPhoneNumberCall {
  4107. c := &RelyingpartyVerifyPhoneNumberCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4108. c.identitytoolkitrelyingpartyverifyphonenumberrequest = identitytoolkitrelyingpartyverifyphonenumberrequest
  4109. return c
  4110. }
  4111. // Fields allows partial responses to be retrieved. See
  4112. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4113. // for more information.
  4114. func (c *RelyingpartyVerifyPhoneNumberCall) Fields(s ...googleapi.Field) *RelyingpartyVerifyPhoneNumberCall {
  4115. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4116. return c
  4117. }
  4118. // Context sets the context to be used in this call's Do method. Any
  4119. // pending HTTP request will be aborted if the provided context is
  4120. // canceled.
  4121. func (c *RelyingpartyVerifyPhoneNumberCall) Context(ctx context.Context) *RelyingpartyVerifyPhoneNumberCall {
  4122. c.ctx_ = ctx
  4123. return c
  4124. }
  4125. // Header returns an http.Header that can be modified by the caller to
  4126. // add HTTP headers to the request.
  4127. func (c *RelyingpartyVerifyPhoneNumberCall) Header() http.Header {
  4128. if c.header_ == nil {
  4129. c.header_ = make(http.Header)
  4130. }
  4131. return c.header_
  4132. }
  4133. func (c *RelyingpartyVerifyPhoneNumberCall) doRequest(alt string) (*http.Response, error) {
  4134. reqHeaders := make(http.Header)
  4135. for k, v := range c.header_ {
  4136. reqHeaders[k] = v
  4137. }
  4138. reqHeaders.Set("User-Agent", c.s.userAgent())
  4139. var body io.Reader = nil
  4140. body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifyphonenumberrequest)
  4141. if err != nil {
  4142. return nil, err
  4143. }
  4144. reqHeaders.Set("Content-Type", "application/json")
  4145. c.urlParams_.Set("alt", alt)
  4146. c.urlParams_.Set("prettyPrint", "false")
  4147. urls := googleapi.ResolveRelative(c.s.BasePath, "verifyPhoneNumber")
  4148. urls += "?" + c.urlParams_.Encode()
  4149. req, err := http.NewRequest("POST", urls, body)
  4150. if err != nil {
  4151. return nil, err
  4152. }
  4153. req.Header = reqHeaders
  4154. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4155. }
  4156. // Do executes the "identitytoolkit.relyingparty.verifyPhoneNumber" call.
  4157. // Exactly one of *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse
  4158. // or error will be non-nil. Any non-2xx status code is an error.
  4159. // Response headers are in either
  4160. // *IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse.ServerResponse.H
  4161. // eader or (if a response was returned at all) in
  4162. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4163. // whether the returned error was because http.StatusNotModified was
  4164. // returned.
  4165. func (c *RelyingpartyVerifyPhoneNumberCall) Do(opts ...googleapi.CallOption) (*IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse, error) {
  4166. gensupport.SetOptions(c.urlParams_, opts...)
  4167. res, err := c.doRequest("json")
  4168. if res != nil && res.StatusCode == http.StatusNotModified {
  4169. if res.Body != nil {
  4170. res.Body.Close()
  4171. }
  4172. return nil, &googleapi.Error{
  4173. Code: res.StatusCode,
  4174. Header: res.Header,
  4175. }
  4176. }
  4177. if err != nil {
  4178. return nil, err
  4179. }
  4180. defer googleapi.CloseBody(res)
  4181. if err := googleapi.CheckResponse(res); err != nil {
  4182. return nil, err
  4183. }
  4184. ret := &IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse{
  4185. ServerResponse: googleapi.ServerResponse{
  4186. Header: res.Header,
  4187. HTTPStatusCode: res.StatusCode,
  4188. },
  4189. }
  4190. target := &ret
  4191. if err := gensupport.DecodeResponse(target, res); err != nil {
  4192. return nil, err
  4193. }
  4194. return ret, nil
  4195. // {
  4196. // "description": "Verifies ownership of a phone number and creates/updates the user account accordingly.",
  4197. // "httpMethod": "POST",
  4198. // "id": "identitytoolkit.relyingparty.verifyPhoneNumber",
  4199. // "path": "verifyPhoneNumber",
  4200. // "request": {
  4201. // "$ref": "IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest"
  4202. // },
  4203. // "response": {
  4204. // "$ref": "IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse"
  4205. // },
  4206. // "scopes": [
  4207. // "https://www.googleapis.com/auth/cloud-platform"
  4208. // ]
  4209. // }
  4210. }