...

Source file src/google.golang.org/api/identitytoolkit/v3/identitytoolkit-gen.go

Documentation: google.golang.org/api/identitytoolkit/v3

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

View as plain text