Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

4750 lignes
178 KiB

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