...

Source file src/google.golang.org/api/recaptchaenterprise/v1/recaptchaenterprise-gen.go

Documentation: google.golang.org/api/recaptchaenterprise/v1

     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 recaptchaenterprise provides access to the reCAPTCHA Enterprise API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/recaptcha-enterprise/
    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/recaptchaenterprise/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	recaptchaenterpriseService, err := recaptchaenterprise.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  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package recaptchaenterprise // import "google.golang.org/api/recaptchaenterprise/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "recaptchaenterprise:v1"
    90  const apiName = "recaptchaenterprise"
    91  const apiVersion = "v1"
    92  const basePath = "https://recaptchaenterprise.googleapis.com/"
    93  const basePathTemplate = "https://recaptchaenterprise.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://recaptchaenterprise.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Assessments = NewProjectsAssessmentsService(s)
   160  	rs.Firewallpolicies = NewProjectsFirewallpoliciesService(s)
   161  	rs.Keys = NewProjectsKeysService(s)
   162  	rs.Relatedaccountgroupmemberships = NewProjectsRelatedaccountgroupmembershipsService(s)
   163  	rs.Relatedaccountgroups = NewProjectsRelatedaccountgroupsService(s)
   164  	return rs
   165  }
   166  
   167  type ProjectsService struct {
   168  	s *Service
   169  
   170  	Assessments *ProjectsAssessmentsService
   171  
   172  	Firewallpolicies *ProjectsFirewallpoliciesService
   173  
   174  	Keys *ProjectsKeysService
   175  
   176  	Relatedaccountgroupmemberships *ProjectsRelatedaccountgroupmembershipsService
   177  
   178  	Relatedaccountgroups *ProjectsRelatedaccountgroupsService
   179  }
   180  
   181  func NewProjectsAssessmentsService(s *Service) *ProjectsAssessmentsService {
   182  	rs := &ProjectsAssessmentsService{s: s}
   183  	return rs
   184  }
   185  
   186  type ProjectsAssessmentsService struct {
   187  	s *Service
   188  }
   189  
   190  func NewProjectsFirewallpoliciesService(s *Service) *ProjectsFirewallpoliciesService {
   191  	rs := &ProjectsFirewallpoliciesService{s: s}
   192  	return rs
   193  }
   194  
   195  type ProjectsFirewallpoliciesService struct {
   196  	s *Service
   197  }
   198  
   199  func NewProjectsKeysService(s *Service) *ProjectsKeysService {
   200  	rs := &ProjectsKeysService{s: s}
   201  	return rs
   202  }
   203  
   204  type ProjectsKeysService struct {
   205  	s *Service
   206  }
   207  
   208  func NewProjectsRelatedaccountgroupmembershipsService(s *Service) *ProjectsRelatedaccountgroupmembershipsService {
   209  	rs := &ProjectsRelatedaccountgroupmembershipsService{s: s}
   210  	return rs
   211  }
   212  
   213  type ProjectsRelatedaccountgroupmembershipsService struct {
   214  	s *Service
   215  }
   216  
   217  func NewProjectsRelatedaccountgroupsService(s *Service) *ProjectsRelatedaccountgroupsService {
   218  	rs := &ProjectsRelatedaccountgroupsService{s: s}
   219  	rs.Memberships = NewProjectsRelatedaccountgroupsMembershipsService(s)
   220  	return rs
   221  }
   222  
   223  type ProjectsRelatedaccountgroupsService struct {
   224  	s *Service
   225  
   226  	Memberships *ProjectsRelatedaccountgroupsMembershipsService
   227  }
   228  
   229  func NewProjectsRelatedaccountgroupsMembershipsService(s *Service) *ProjectsRelatedaccountgroupsMembershipsService {
   230  	rs := &ProjectsRelatedaccountgroupsMembershipsService{s: s}
   231  	return rs
   232  }
   233  
   234  type ProjectsRelatedaccountgroupsMembershipsService struct {
   235  	s *Service
   236  }
   237  
   238  // GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment: Account defender
   239  // risk assessment.
   240  type GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment struct {
   241  	// Labels: Output only. Labels for this request.
   242  	//
   243  	// Possible values:
   244  	//   "ACCOUNT_DEFENDER_LABEL_UNSPECIFIED" - Default unspecified type.
   245  	//   "PROFILE_MATCH" - The request matches a known good profile for the user.
   246  	//   "SUSPICIOUS_LOGIN_ACTIVITY" - The request is potentially a suspicious
   247  	// login event and must be further verified either through multi-factor
   248  	// authentication or another system.
   249  	//   "SUSPICIOUS_ACCOUNT_CREATION" - The request matched a profile that
   250  	// previously had suspicious account creation behavior. This can mean that this
   251  	// is a fake account.
   252  	//   "RELATED_ACCOUNTS_NUMBER_HIGH" - The account in the request has a high
   253  	// number of related accounts. It does not necessarily imply that the account
   254  	// is bad but can require further investigation.
   255  	Labels []string `json:"labels,omitempty"`
   256  	// ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
   257  	// include in API requests. By default, fields with empty or default values are
   258  	// omitted from API requests. See
   259  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   260  	// details.
   261  	ForceSendFields []string `json:"-"`
   262  	// NullFields is a list of field names (e.g. "Labels") to include in API
   263  	// requests with the JSON null value. By default, fields with empty values are
   264  	// omitted from API requests. See
   265  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   266  	NullFields []string `json:"-"`
   267  }
   268  
   269  func (s *GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment) MarshalJSON() ([]byte, error) {
   270  	type NoMethod GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment
   271  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   272  }
   273  
   274  // GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo: Information about
   275  // account verification, used for identity verification.
   276  type GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo struct {
   277  	// Endpoints: Optional. Endpoints that can be used for identity verification.
   278  	Endpoints []*GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo `json:"endpoints,omitempty"`
   279  	// LanguageCode: Optional. Language code preference for the verification
   280  	// message, set as a IETF BCP 47 language code.
   281  	LanguageCode string `json:"languageCode,omitempty"`
   282  	// LatestVerificationResult: Output only. Result of the latest account
   283  	// verification challenge.
   284  	//
   285  	// Possible values:
   286  	//   "RESULT_UNSPECIFIED" - No information about the latest account
   287  	// verification.
   288  	//   "SUCCESS_USER_VERIFIED" - The user was successfully verified. This means
   289  	// the account verification challenge was successfully completed.
   290  	//   "ERROR_USER_NOT_VERIFIED" - The user failed the verification challenge.
   291  	//   "ERROR_SITE_ONBOARDING_INCOMPLETE" - The site is not properly onboarded to
   292  	// use the account verification feature.
   293  	//   "ERROR_RECIPIENT_NOT_ALLOWED" - The recipient is not allowed for account
   294  	// verification. This can occur during integration but should not occur in
   295  	// production.
   296  	//   "ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED" - The recipient has already been
   297  	// sent too many verification codes in a short amount of time.
   298  	//   "ERROR_CRITICAL_INTERNAL" - The verification flow could not be completed
   299  	// due to a critical internal error.
   300  	//   "ERROR_CUSTOMER_QUOTA_EXHAUSTED" - The client has exceeded their two
   301  	// factor request quota for this period of time.
   302  	//   "ERROR_VERIFICATION_BYPASSED" - The request cannot be processed at the
   303  	// time because of an incident. This bypass can be restricted to a problematic
   304  	// destination email domain, a customer, or could affect the entire service.
   305  	//   "ERROR_VERDICT_MISMATCH" - The request parameters do not match with the
   306  	// token provided and cannot be processed.
   307  	LatestVerificationResult string `json:"latestVerificationResult,omitempty"`
   308  	// Username: Username of the account that is being verified. Deprecated.
   309  	// Customers should now provide the `account_id` field in `event.user_info`.
   310  	Username string `json:"username,omitempty"`
   311  	// ForceSendFields is a list of field names (e.g. "Endpoints") to
   312  	// unconditionally include in API requests. By default, fields with empty or
   313  	// default values are omitted from API requests. See
   314  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   315  	// details.
   316  	ForceSendFields []string `json:"-"`
   317  	// NullFields is a list of field names (e.g. "Endpoints") to include in API
   318  	// requests with the JSON null value. By default, fields with empty values are
   319  	// omitted from API requests. See
   320  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   321  	NullFields []string `json:"-"`
   322  }
   323  
   324  func (s *GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo) MarshalJSON() ([]byte, error) {
   325  	type NoMethod GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo
   326  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   327  }
   328  
   329  // GoogleCloudRecaptchaenterpriseV1AndroidKeySettings: Settings specific to
   330  // keys that can be used by Android apps.
   331  type GoogleCloudRecaptchaenterpriseV1AndroidKeySettings struct {
   332  	// AllowAllPackageNames: Optional. If set to true, allowed_package_names are
   333  	// not enforced.
   334  	AllowAllPackageNames bool `json:"allowAllPackageNames,omitempty"`
   335  	// AllowedPackageNames: Optional. Android package names of apps allowed to use
   336  	// the key. Example: 'com.companyname.appname'
   337  	AllowedPackageNames []string `json:"allowedPackageNames,omitempty"`
   338  	// SupportNonGoogleAppStoreDistribution: Optional. Set to true for keys that
   339  	// are used in an Android application that is available for download in app
   340  	// stores in addition to the Google Play Store.
   341  	SupportNonGoogleAppStoreDistribution bool `json:"supportNonGoogleAppStoreDistribution,omitempty"`
   342  	// ForceSendFields is a list of field names (e.g. "AllowAllPackageNames") to
   343  	// unconditionally include in API requests. By default, fields with empty or
   344  	// default values are omitted from API requests. See
   345  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   346  	// details.
   347  	ForceSendFields []string `json:"-"`
   348  	// NullFields is a list of field names (e.g. "AllowAllPackageNames") to include
   349  	// in API requests with the JSON null value. By default, fields with empty
   350  	// values are omitted from API requests. See
   351  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   352  	NullFields []string `json:"-"`
   353  }
   354  
   355  func (s *GoogleCloudRecaptchaenterpriseV1AndroidKeySettings) MarshalJSON() ([]byte, error) {
   356  	type NoMethod GoogleCloudRecaptchaenterpriseV1AndroidKeySettings
   357  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   358  }
   359  
   360  // GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest: The request
   361  // message to annotate an Assessment.
   362  type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct {
   363  	// AccountId: Optional. A stable account identifier to apply to the assessment.
   364  	// This is an alternative to setting `account_id` in `CreateAssessment`, for
   365  	// example when a stable account identifier is not yet known in the initial
   366  	// request.
   367  	AccountId string `json:"accountId,omitempty"`
   368  	// Annotation: Optional. The annotation that will be assigned to the Event.
   369  	// This field can be left empty to provide reasons that apply to an event
   370  	// without concluding whether the event is legitimate or fraudulent.
   371  	//
   372  	// Possible values:
   373  	//   "ANNOTATION_UNSPECIFIED" - Default unspecified type.
   374  	//   "LEGITIMATE" - Provides information that the event turned out to be
   375  	// legitimate.
   376  	//   "FRAUDULENT" - Provides information that the event turned out to be
   377  	// fraudulent.
   378  	//   "PASSWORD_CORRECT" - Provides information that the event was related to a
   379  	// login event in which the user typed the correct password. Deprecated, prefer
   380  	// indicating CORRECT_PASSWORD through the reasons field instead.
   381  	//   "PASSWORD_INCORRECT" - Provides information that the event was related to
   382  	// a login event in which the user typed the incorrect password. Deprecated,
   383  	// prefer indicating INCORRECT_PASSWORD through the reasons field instead.
   384  	Annotation string `json:"annotation,omitempty"`
   385  	// HashedAccountId: Optional. A stable hashed account identifier to apply to
   386  	// the assessment. This is an alternative to setting `hashed_account_id` in
   387  	// `CreateAssessment`, for example when a stable account identifier is not yet
   388  	// known in the initial request.
   389  	HashedAccountId string `json:"hashedAccountId,omitempty"`
   390  	// Reasons: Optional. Reasons for the annotation that are assigned to the
   391  	// event.
   392  	//
   393  	// Possible values:
   394  	//   "REASON_UNSPECIFIED" - Default unspecified reason.
   395  	//   "CHARGEBACK" - Indicates that the transaction had a chargeback issued with
   396  	// no other details. When possible, specify the type by using CHARGEBACK_FRAUD
   397  	// or CHARGEBACK_DISPUTE instead.
   398  	//   "CHARGEBACK_FRAUD" - Indicates that the transaction had a chargeback
   399  	// issued related to an alleged unauthorized transaction from the cardholder's
   400  	// perspective (for example, the card number was stolen).
   401  	//   "CHARGEBACK_DISPUTE" - Indicates that the transaction had a chargeback
   402  	// issued related to the cardholder having provided their card details but
   403  	// allegedly not being satisfied with the purchase (for example,
   404  	// misrepresentation, attempted cancellation).
   405  	//   "REFUND" - Indicates that the completed payment transaction was refunded
   406  	// by the seller.
   407  	//   "REFUND_FRAUD" - Indicates that the completed payment transaction was
   408  	// determined to be fraudulent by the seller, and was cancelled and refunded as
   409  	// a result.
   410  	//   "TRANSACTION_ACCEPTED" - Indicates that the payment transaction was
   411  	// accepted, and the user was charged.
   412  	//   "TRANSACTION_DECLINED" - Indicates that the payment transaction was
   413  	// declined, for example due to invalid card details.
   414  	//   "PAYMENT_HEURISTICS" - Indicates the transaction associated with the
   415  	// assessment is suspected of being fraudulent based on the payment method,
   416  	// billing details, shipping address or other transaction information.
   417  	//   "INITIATED_TWO_FACTOR" - Indicates that the user was served a 2FA
   418  	// challenge. An old assessment with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason
   419  	// that has not been overwritten with `PASSED_TWO_FACTOR` is treated as an
   420  	// abandoned 2FA flow. This is equivalent to `FAILED_TWO_FACTOR`.
   421  	//   "PASSED_TWO_FACTOR" - Indicates that the user passed a 2FA challenge.
   422  	//   "FAILED_TWO_FACTOR" - Indicates that the user failed a 2FA challenge.
   423  	//   "CORRECT_PASSWORD" - Indicates the user provided the correct password.
   424  	//   "INCORRECT_PASSWORD" - Indicates the user provided an incorrect password.
   425  	//   "SOCIAL_SPAM" - Indicates that the user sent unwanted and abusive messages
   426  	// to other users of the platform, such as spam, scams, phishing, or social
   427  	// engineering.
   428  	Reasons []string `json:"reasons,omitempty"`
   429  	// TransactionEvent: Optional. If the assessment is part of a payment
   430  	// transaction, provide details on payment lifecycle events that occur in the
   431  	// transaction.
   432  	TransactionEvent *GoogleCloudRecaptchaenterpriseV1TransactionEvent `json:"transactionEvent,omitempty"`
   433  	// ForceSendFields is a list of field names (e.g. "AccountId") to
   434  	// unconditionally include in API requests. By default, fields with empty or
   435  	// default values are omitted from API requests. See
   436  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   437  	// details.
   438  	ForceSendFields []string `json:"-"`
   439  	// NullFields is a list of field names (e.g. "AccountId") to include in API
   440  	// requests with the JSON null value. By default, fields with empty values are
   441  	// omitted from API requests. See
   442  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   443  	NullFields []string `json:"-"`
   444  }
   445  
   446  func (s *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest) MarshalJSON() ([]byte, error) {
   447  	type NoMethod GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
   448  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   449  }
   450  
   451  // GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse: Empty response
   452  // for AnnotateAssessment.
   453  type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse struct {
   454  	// ServerResponse contains the HTTP response code and headers from the server.
   455  	googleapi.ServerResponse `json:"-"`
   456  }
   457  
   458  // GoogleCloudRecaptchaenterpriseV1AppleDeveloperId: Contains fields that are
   459  // required to perform Apple-specific integrity checks.
   460  type GoogleCloudRecaptchaenterpriseV1AppleDeveloperId struct {
   461  	// KeyId: Required. The Apple developer key ID (10-character string).
   462  	KeyId string `json:"keyId,omitempty"`
   463  	// PrivateKey: Required. Input only. A private key (downloaded as a text file
   464  	// with a .p8 file extension) generated for your Apple Developer account.
   465  	// Ensure that Apple DeviceCheck is enabled for the private key.
   466  	PrivateKey string `json:"privateKey,omitempty"`
   467  	// TeamId: Required. The Apple team ID (10-character string) owning the
   468  	// provisioning profile used to build your application.
   469  	TeamId string `json:"teamId,omitempty"`
   470  	// ForceSendFields is a list of field names (e.g. "KeyId") to unconditionally
   471  	// include in API requests. By default, fields with empty or default values are
   472  	// omitted from API requests. See
   473  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   474  	// details.
   475  	ForceSendFields []string `json:"-"`
   476  	// NullFields is a list of field names (e.g. "KeyId") to include in API
   477  	// requests with the JSON null value. By default, fields with empty values are
   478  	// omitted from API requests. See
   479  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   480  	NullFields []string `json:"-"`
   481  }
   482  
   483  func (s *GoogleCloudRecaptchaenterpriseV1AppleDeveloperId) MarshalJSON() ([]byte, error) {
   484  	type NoMethod GoogleCloudRecaptchaenterpriseV1AppleDeveloperId
   485  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   486  }
   487  
   488  // GoogleCloudRecaptchaenterpriseV1Assessment: A reCAPTCHA Enterprise
   489  // assessment resource.
   490  type GoogleCloudRecaptchaenterpriseV1Assessment struct {
   491  	// AccountDefenderAssessment: Output only. Assessment returned by account
   492  	// defender when an account identifier is provided.
   493  	AccountDefenderAssessment *GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment `json:"accountDefenderAssessment,omitempty"`
   494  	// AccountVerification: Optional. Account verification information for identity
   495  	// verification. The assessment event must include a token and site key to use
   496  	// this feature.
   497  	AccountVerification *GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo `json:"accountVerification,omitempty"`
   498  	// Event: Optional. The event being assessed.
   499  	Event *GoogleCloudRecaptchaenterpriseV1Event `json:"event,omitempty"`
   500  	// FirewallPolicyAssessment: Output only. Assessment returned when firewall
   501  	// policies belonging to the project are evaluated using the field
   502  	// firewall_policy_evaluation.
   503  	FirewallPolicyAssessment *GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment `json:"firewallPolicyAssessment,omitempty"`
   504  	// FraudPreventionAssessment: Output only. Assessment returned by Fraud
   505  	// Prevention when TransactionData is provided.
   506  	FraudPreventionAssessment *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment `json:"fraudPreventionAssessment,omitempty"`
   507  	// FraudSignals: Output only. Fraud Signals specific to the users involved in a
   508  	// payment transaction.
   509  	FraudSignals *GoogleCloudRecaptchaenterpriseV1FraudSignals `json:"fraudSignals,omitempty"`
   510  	// Name: Output only. Identifier. The resource name for the Assessment in the
   511  	// format `projects/{project}/assessments/{assessment}`.
   512  	Name string `json:"name,omitempty"`
   513  	// PrivatePasswordLeakVerification: Optional. The private password leak
   514  	// verification field contains the parameters that are used to to check for
   515  	// leaks privately without sharing user credentials.
   516  	PrivatePasswordLeakVerification *GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification `json:"privatePasswordLeakVerification,omitempty"`
   517  	// RiskAnalysis: Output only. The risk analysis result for the event being
   518  	// assessed.
   519  	RiskAnalysis *GoogleCloudRecaptchaenterpriseV1RiskAnalysis `json:"riskAnalysis,omitempty"`
   520  	// TokenProperties: Output only. Properties of the provided event token.
   521  	TokenProperties *GoogleCloudRecaptchaenterpriseV1TokenProperties `json:"tokenProperties,omitempty"`
   522  
   523  	// ServerResponse contains the HTTP response code and headers from the server.
   524  	googleapi.ServerResponse `json:"-"`
   525  	// ForceSendFields is a list of field names (e.g. "AccountDefenderAssessment")
   526  	// to unconditionally include in API requests. By default, fields with empty or
   527  	// default values are omitted from API requests. See
   528  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   529  	// details.
   530  	ForceSendFields []string `json:"-"`
   531  	// NullFields is a list of field names (e.g. "AccountDefenderAssessment") to
   532  	// include in API requests with the JSON null value. By default, fields with
   533  	// empty values are omitted from API requests. See
   534  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   535  	NullFields []string `json:"-"`
   536  }
   537  
   538  func (s *GoogleCloudRecaptchaenterpriseV1Assessment) MarshalJSON() ([]byte, error) {
   539  	type NoMethod GoogleCloudRecaptchaenterpriseV1Assessment
   540  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   541  }
   542  
   543  // GoogleCloudRecaptchaenterpriseV1ChallengeMetrics: Metrics related to
   544  // challenges.
   545  type GoogleCloudRecaptchaenterpriseV1ChallengeMetrics struct {
   546  	// FailedCount: Count of submitted challenge solutions that were incorrect or
   547  	// otherwise deemed suspicious such that a subsequent challenge was triggered.
   548  	FailedCount int64 `json:"failedCount,omitempty,string"`
   549  	// NocaptchaCount: Count of nocaptchas (successful verification without a
   550  	// challenge) issued.
   551  	NocaptchaCount int64 `json:"nocaptchaCount,omitempty,string"`
   552  	// PageloadCount: Count of reCAPTCHA checkboxes or badges rendered. This is
   553  	// mostly equivalent to a count of pageloads for pages that include reCAPTCHA.
   554  	PageloadCount int64 `json:"pageloadCount,omitempty,string"`
   555  	// PassedCount: Count of nocaptchas (successful verification without a
   556  	// challenge) plus submitted challenge solutions that were correct and resulted
   557  	// in verification.
   558  	PassedCount int64 `json:"passedCount,omitempty,string"`
   559  	// ForceSendFields is a list of field names (e.g. "FailedCount") to
   560  	// unconditionally include in API requests. By default, fields with empty or
   561  	// default values are omitted from API requests. See
   562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   563  	// details.
   564  	ForceSendFields []string `json:"-"`
   565  	// NullFields is a list of field names (e.g. "FailedCount") to include in API
   566  	// requests with the JSON null value. By default, fields with empty values are
   567  	// omitted from API requests. See
   568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   569  	NullFields []string `json:"-"`
   570  }
   571  
   572  func (s *GoogleCloudRecaptchaenterpriseV1ChallengeMetrics) MarshalJSON() ([]byte, error) {
   573  	type NoMethod GoogleCloudRecaptchaenterpriseV1ChallengeMetrics
   574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   575  }
   576  
   577  // GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo: Information about
   578  // a verification endpoint that can be used for 2FA.
   579  type GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo struct {
   580  	// EmailAddress: Email address for which to trigger a verification request.
   581  	EmailAddress string `json:"emailAddress,omitempty"`
   582  	// LastVerificationTime: Output only. Timestamp of the last successful
   583  	// verification for the endpoint, if any.
   584  	LastVerificationTime string `json:"lastVerificationTime,omitempty"`
   585  	// PhoneNumber: Phone number for which to trigger a verification request.
   586  	// Should be given in E.164 format.
   587  	PhoneNumber string `json:"phoneNumber,omitempty"`
   588  	// RequestToken: Output only. Token to provide to the client to trigger
   589  	// endpoint verification. It must be used within 15 minutes.
   590  	RequestToken string `json:"requestToken,omitempty"`
   591  	// ForceSendFields is a list of field names (e.g. "EmailAddress") to
   592  	// unconditionally include in API requests. By default, fields with empty or
   593  	// default values are omitted from API requests. See
   594  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   595  	// details.
   596  	ForceSendFields []string `json:"-"`
   597  	// NullFields is a list of field names (e.g. "EmailAddress") to include in API
   598  	// requests with the JSON null value. By default, fields with empty values are
   599  	// omitted from API requests. See
   600  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   601  	NullFields []string `json:"-"`
   602  }
   603  
   604  func (s *GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo) MarshalJSON() ([]byte, error) {
   605  	type NoMethod GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo
   606  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   607  }
   608  
   609  // GoogleCloudRecaptchaenterpriseV1Event: The event being assessed.
   610  type GoogleCloudRecaptchaenterpriseV1Event struct {
   611  	// ExpectedAction: Optional. The expected action for this type of event. This
   612  	// should be the same action provided at token generation time on client-side
   613  	// platforms already integrated with recaptcha enterprise.
   614  	ExpectedAction string `json:"expectedAction,omitempty"`
   615  	// Express: Optional. Flag for a reCAPTCHA express request for an assessment
   616  	// without a token. If enabled, `site_key` must reference a SCORE key with WAF
   617  	// feature set to EXPRESS.
   618  	Express bool `json:"express,omitempty"`
   619  	// FirewallPolicyEvaluation: Optional. Flag for enabling firewall policy config
   620  	// assessment. If this flag is enabled, the firewall policy will be evaluated
   621  	// and a suggested firewall action will be returned in the response.
   622  	FirewallPolicyEvaluation bool `json:"firewallPolicyEvaluation,omitempty"`
   623  	// FraudPrevention: Optional. The Fraud Prevention setting for this assessment.
   624  	//
   625  	// Possible values:
   626  	//   "FRAUD_PREVENTION_UNSPECIFIED" - Default, unspecified setting. If opted in
   627  	// for automatic detection, `fraud_prevention_assessment` is returned based on
   628  	// the request. Otherwise, `fraud_prevention_assessment` is returned if
   629  	// `transaction_data` is present in the `Event` and Fraud Prevention is enabled
   630  	// in the Google Cloud console.
   631  	//   "ENABLED" - Enable Fraud Prevention for this assessment, if Fraud
   632  	// Prevention is enabled in the Google Cloud console.
   633  	//   "DISABLED" - Disable Fraud Prevention for this assessment, regardless of
   634  	// opt-in status or Google Cloud console settings.
   635  	FraudPrevention string `json:"fraudPrevention,omitempty"`
   636  	// HashedAccountId: Optional. Deprecated: use `user_info.account_id` instead.
   637  	// Unique stable hashed user identifier for the request. The identifier must be
   638  	// hashed using hmac-sha256 with stable secret.
   639  	HashedAccountId string `json:"hashedAccountId,omitempty"`
   640  	// Headers: Optional. HTTP header information about the request.
   641  	Headers []string `json:"headers,omitempty"`
   642  	// Ja3: Optional. JA3 fingerprint for SSL clients.
   643  	Ja3 string `json:"ja3,omitempty"`
   644  	// RequestedUri: Optional. The URI resource the user requested that triggered
   645  	// an assessment.
   646  	RequestedUri string `json:"requestedUri,omitempty"`
   647  	// SiteKey: Optional. The site key that was used to invoke reCAPTCHA Enterprise
   648  	// on your site and generate the token.
   649  	SiteKey string `json:"siteKey,omitempty"`
   650  	// Token: Optional. The user response token provided by the reCAPTCHA
   651  	// Enterprise client-side integration on your site.
   652  	Token string `json:"token,omitempty"`
   653  	// TransactionData: Optional. Data describing a payment transaction to be
   654  	// assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention
   655  	// and the FraudPreventionAssessment component in the response.
   656  	TransactionData *GoogleCloudRecaptchaenterpriseV1TransactionData `json:"transactionData,omitempty"`
   657  	// UserAgent: Optional. The user agent present in the request from the user's
   658  	// device related to this event.
   659  	UserAgent string `json:"userAgent,omitempty"`
   660  	// UserInfo: Optional. Information about the user that generates this event,
   661  	// when they can be identified. They are often identified through the use of an
   662  	// account for logged-in requests or login/registration requests, or by
   663  	// providing user identifiers for guest actions like checkout.
   664  	UserInfo *GoogleCloudRecaptchaenterpriseV1UserInfo `json:"userInfo,omitempty"`
   665  	// UserIpAddress: Optional. The IP address in the request from the user's
   666  	// device related to this event.
   667  	UserIpAddress string `json:"userIpAddress,omitempty"`
   668  	// WafTokenAssessment: Optional. Flag for running WAF token assessment. If
   669  	// enabled, the token must be specified, and have been created by a WAF-enabled
   670  	// key.
   671  	WafTokenAssessment bool `json:"wafTokenAssessment,omitempty"`
   672  	// ForceSendFields is a list of field names (e.g. "ExpectedAction") to
   673  	// unconditionally include in API requests. By default, fields with empty or
   674  	// default values are omitted from API requests. See
   675  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   676  	// details.
   677  	ForceSendFields []string `json:"-"`
   678  	// NullFields is a list of field names (e.g. "ExpectedAction") to include in
   679  	// API requests with the JSON null value. By default, fields with empty values
   680  	// are omitted from API requests. See
   681  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   682  	NullFields []string `json:"-"`
   683  }
   684  
   685  func (s *GoogleCloudRecaptchaenterpriseV1Event) MarshalJSON() ([]byte, error) {
   686  	type NoMethod GoogleCloudRecaptchaenterpriseV1Event
   687  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   688  }
   689  
   690  // GoogleCloudRecaptchaenterpriseV1FirewallAction: An individual action. Each
   691  // action represents what to do if a policy matches.
   692  type GoogleCloudRecaptchaenterpriseV1FirewallAction struct {
   693  	// Allow: The user request did not match any policy and should be allowed
   694  	// access to the requested resource.
   695  	Allow *GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction `json:"allow,omitempty"`
   696  	// Block: This action will deny access to a given page. The user will get an
   697  	// HTTP error code.
   698  	Block *GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction `json:"block,omitempty"`
   699  	// IncludeRecaptchaScript: This action will inject reCAPTCHA JavaScript code
   700  	// into the HTML page returned by the site backend.
   701  	IncludeRecaptchaScript *GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction `json:"includeRecaptchaScript,omitempty"`
   702  	// Redirect: This action will redirect the request to a ReCaptcha interstitial
   703  	// to attach a token.
   704  	Redirect *GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction `json:"redirect,omitempty"`
   705  	// SetHeader: This action will set a custom header but allow the request to
   706  	// continue to the customer backend.
   707  	SetHeader *GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction `json:"setHeader,omitempty"`
   708  	// Substitute: This action will transparently serve a different page to an
   709  	// offending user.
   710  	Substitute *GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction `json:"substitute,omitempty"`
   711  	// ForceSendFields is a list of field names (e.g. "Allow") to unconditionally
   712  	// include in API requests. By default, fields with empty or default values are
   713  	// omitted from API requests. See
   714  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   715  	// details.
   716  	ForceSendFields []string `json:"-"`
   717  	// NullFields is a list of field names (e.g. "Allow") to include in API
   718  	// requests with the JSON null value. By default, fields with empty values are
   719  	// omitted from API requests. See
   720  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   721  	NullFields []string `json:"-"`
   722  }
   723  
   724  func (s *GoogleCloudRecaptchaenterpriseV1FirewallAction) MarshalJSON() ([]byte, error) {
   725  	type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallAction
   726  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   727  }
   728  
   729  // GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction: An allow action
   730  // continues processing a request unimpeded.
   731  type GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction struct {
   732  }
   733  
   734  // GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction: A block action
   735  // serves an HTTP error code a prevents the request from hitting the backend.
   736  type GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction struct {
   737  }
   738  
   739  // GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction:
   740  // An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript
   741  // code into the HTML returned by the site backend. This reCAPTCHA script is
   742  // tasked with collecting user signals on the requested web page, issuing
   743  // tokens as a cookie within the site domain, and enabling their utilization in
   744  // subsequent page requests.
   745  type GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction struct {
   746  }
   747  
   748  // GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction: A redirect
   749  // action returns a 307 (temporary redirect) response, pointing the user to a
   750  // ReCaptcha interstitial page to attach a token.
   751  type GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction struct {
   752  }
   753  
   754  // GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction: A set header
   755  // action sets a header and forwards the request to the backend. This can be
   756  // used to trigger custom protection implemented on the backend.
   757  type GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction struct {
   758  	// Key: Optional. The header key to set in the request to the backend server.
   759  	Key string `json:"key,omitempty"`
   760  	// Value: Optional. The header value to set in the request to the backend
   761  	// server.
   762  	Value string `json:"value,omitempty"`
   763  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
   764  	// include in API requests. By default, fields with empty or default values are
   765  	// omitted from API requests. See
   766  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   767  	// details.
   768  	ForceSendFields []string `json:"-"`
   769  	// NullFields is a list of field names (e.g. "Key") to include in API requests
   770  	// with the JSON null value. By default, fields with empty values are omitted
   771  	// from API requests. See
   772  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   773  	NullFields []string `json:"-"`
   774  }
   775  
   776  func (s *GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction) MarshalJSON() ([]byte, error) {
   777  	type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction
   778  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   779  }
   780  
   781  // GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction: A substitute
   782  // action transparently serves a different page than the one requested.
   783  type GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction struct {
   784  	// Path: Optional. The address to redirect to. The target is a relative path in
   785  	// the current host. Example: "/blog/404.html".
   786  	Path string `json:"path,omitempty"`
   787  	// ForceSendFields is a list of field names (e.g. "Path") to unconditionally
   788  	// include in API requests. By default, fields with empty or default values are
   789  	// omitted from API requests. See
   790  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   791  	// details.
   792  	ForceSendFields []string `json:"-"`
   793  	// NullFields is a list of field names (e.g. "Path") to include in API requests
   794  	// with the JSON null value. By default, fields with empty values are omitted
   795  	// from API requests. See
   796  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   797  	NullFields []string `json:"-"`
   798  }
   799  
   800  func (s *GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction) MarshalJSON() ([]byte, error) {
   801  	type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction
   802  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   803  }
   804  
   805  // GoogleCloudRecaptchaenterpriseV1FirewallPolicy: A FirewallPolicy represents
   806  // a single matching pattern and resulting actions to take.
   807  type GoogleCloudRecaptchaenterpriseV1FirewallPolicy struct {
   808  	// Actions: Optional. The actions that the caller should take regarding user
   809  	// access. There should be at most one terminal action. A terminal action is
   810  	// any action that forces a response, such as `AllowAction`, `BlockAction` or
   811  	// `SubstituteAction`. Zero or more non-terminal actions such as `SetHeader`
   812  	// might be specified. A single policy can contain up to 16 actions.
   813  	Actions []*GoogleCloudRecaptchaenterpriseV1FirewallAction `json:"actions,omitempty"`
   814  	// Condition: Optional. A CEL (Common Expression Language) conditional
   815  	// expression that specifies if this policy applies to an incoming user
   816  	// request. If this condition evaluates to true and the requested path matched
   817  	// the path pattern, the associated actions should be executed by the caller.
   818  	// The condition string is checked for CEL syntax correctness on creation. For
   819  	// more information, see the CEL spec (https://github.com/google/cel-spec) and
   820  	// its language definition
   821  	// (https://github.com/google/cel-spec/blob/master/doc/langdef.md). A condition
   822  	// has a max length of 500 characters.
   823  	Condition string `json:"condition,omitempty"`
   824  	// Description: Optional. A description of what this policy aims to achieve,
   825  	// for convenience purposes. The description can at most include 256 UTF-8
   826  	// characters.
   827  	Description string `json:"description,omitempty"`
   828  	// Name: Identifier. The resource name for the FirewallPolicy in the format
   829  	// `projects/{project}/firewallpolicies/{firewallpolicy}`.
   830  	Name string `json:"name,omitempty"`
   831  	// Path: Optional. The path for which this policy applies, specified as a glob
   832  	// pattern. For more information on glob, see the manual page
   833  	// (https://man7.org/linux/man-pages/man7/glob.7.html). A path has a max length
   834  	// of 200 characters.
   835  	Path string `json:"path,omitempty"`
   836  
   837  	// ServerResponse contains the HTTP response code and headers from the server.
   838  	googleapi.ServerResponse `json:"-"`
   839  	// ForceSendFields is a list of field names (e.g. "Actions") to unconditionally
   840  	// include in API requests. By default, fields with empty or default values are
   841  	// omitted from API requests. See
   842  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   843  	// details.
   844  	ForceSendFields []string `json:"-"`
   845  	// NullFields is a list of field names (e.g. "Actions") to include in API
   846  	// requests with the JSON null value. By default, fields with empty values are
   847  	// omitted from API requests. See
   848  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   849  	NullFields []string `json:"-"`
   850  }
   851  
   852  func (s *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) MarshalJSON() ([]byte, error) {
   853  	type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallPolicy
   854  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   855  }
   856  
   857  // GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment: Policy config
   858  // assessment.
   859  type GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment struct {
   860  	// Error: Output only. If the processing of a policy config fails, an error
   861  	// will be populated and the firewall_policy will be left empty.
   862  	Error *GoogleRpcStatus `json:"error,omitempty"`
   863  	// FirewallPolicy: Output only. The policy that matched the request. If more
   864  	// than one policy may match, this is the first match. If no policy matches the
   865  	// incoming request, the policy field will be left empty.
   866  	FirewallPolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy `json:"firewallPolicy,omitempty"`
   867  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
   868  	// include in API requests. By default, fields with empty or default values are
   869  	// omitted from API requests. See
   870  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   871  	// details.
   872  	ForceSendFields []string `json:"-"`
   873  	// NullFields is a list of field names (e.g. "Error") to include in API
   874  	// requests with the JSON null value. By default, fields with empty values are
   875  	// omitted from API requests. See
   876  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   877  	NullFields []string `json:"-"`
   878  }
   879  
   880  func (s *GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment) MarshalJSON() ([]byte, error) {
   881  	type NoMethod GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment
   882  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   883  }
   884  
   885  // GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment: Assessment for
   886  // Fraud Prevention.
   887  type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment struct {
   888  	// BehavioralTrustVerdict: Output only. Assessment of this transaction for
   889  	// behavioral trust.
   890  	BehavioralTrustVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict `json:"behavioralTrustVerdict,omitempty"`
   891  	// CardTestingVerdict: Output only. Assessment of this transaction for risk of
   892  	// being part of a card testing attack.
   893  	CardTestingVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict `json:"cardTestingVerdict,omitempty"`
   894  	// StolenInstrumentVerdict: Output only. Assessment of this transaction for
   895  	// risk of a stolen instrument.
   896  	StolenInstrumentVerdict *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict `json:"stolenInstrumentVerdict,omitempty"`
   897  	// TransactionRisk: Output only. Probability of this transaction being
   898  	// fraudulent. Summarizes the combined risk of attack vectors below. Values are
   899  	// from 0.0 (lowest) to 1.0 (highest).
   900  	TransactionRisk float64 `json:"transactionRisk,omitempty"`
   901  	// ForceSendFields is a list of field names (e.g. "BehavioralTrustVerdict") to
   902  	// unconditionally include in API requests. By default, fields with empty or
   903  	// default values are omitted from API requests. See
   904  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   905  	// details.
   906  	ForceSendFields []string `json:"-"`
   907  	// NullFields is a list of field names (e.g. "BehavioralTrustVerdict") to
   908  	// include in API requests with the JSON null value. By default, fields with
   909  	// empty values are omitted from API requests. See
   910  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   911  	NullFields []string `json:"-"`
   912  }
   913  
   914  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment) MarshalJSON() ([]byte, error) {
   915  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment
   916  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   917  }
   918  
   919  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment) UnmarshalJSON(data []byte) error {
   920  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment
   921  	var s1 struct {
   922  		TransactionRisk gensupport.JSONFloat64 `json:"transactionRisk"`
   923  		*NoMethod
   924  	}
   925  	s1.NoMethod = (*NoMethod)(s)
   926  	if err := json.Unmarshal(data, &s1); err != nil {
   927  		return err
   928  	}
   929  	s.TransactionRisk = float64(s1.TransactionRisk)
   930  	return nil
   931  }
   932  
   933  // GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdi
   934  // ct: Information about behavioral trust of the transaction.
   935  type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict struct {
   936  	// Trust: Output only. Probability of this transaction attempt being executed
   937  	// in a behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0
   938  	// (highest).
   939  	Trust float64 `json:"trust,omitempty"`
   940  	// ForceSendFields is a list of field names (e.g. "Trust") to unconditionally
   941  	// include in API requests. By default, fields with empty or default values are
   942  	// omitted from API requests. See
   943  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   944  	// details.
   945  	ForceSendFields []string `json:"-"`
   946  	// NullFields is a list of field names (e.g. "Trust") to include in API
   947  	// requests with the JSON null value. By default, fields with empty values are
   948  	// omitted from API requests. See
   949  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   950  	NullFields []string `json:"-"`
   951  }
   952  
   953  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict) MarshalJSON() ([]byte, error) {
   954  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict
   955  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   956  }
   957  
   958  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict) UnmarshalJSON(data []byte) error {
   959  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict
   960  	var s1 struct {
   961  		Trust gensupport.JSONFloat64 `json:"trust"`
   962  		*NoMethod
   963  	}
   964  	s1.NoMethod = (*NoMethod)(s)
   965  	if err := json.Unmarshal(data, &s1); err != nil {
   966  		return err
   967  	}
   968  	s.Trust = float64(s1.Trust)
   969  	return nil
   970  }
   971  
   972  // GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict:
   973  // Information about card testing fraud, where an adversary is testing
   974  // fraudulently obtained cards or brute forcing their details.
   975  type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict struct {
   976  	// Risk: Output only. Probability of this transaction attempt being part of a
   977  	// card testing attack. Values are from 0.0 (lowest) to 1.0 (highest).
   978  	Risk float64 `json:"risk,omitempty"`
   979  	// ForceSendFields is a list of field names (e.g. "Risk") to unconditionally
   980  	// include in API requests. By default, fields with empty or default values are
   981  	// omitted from API requests. See
   982  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   983  	// details.
   984  	ForceSendFields []string `json:"-"`
   985  	// NullFields is a list of field names (e.g. "Risk") to include in API requests
   986  	// with the JSON null value. By default, fields with empty values are omitted
   987  	// from API requests. See
   988  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   989  	NullFields []string `json:"-"`
   990  }
   991  
   992  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict) MarshalJSON() ([]byte, error) {
   993  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict
   994  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   995  }
   996  
   997  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict) UnmarshalJSON(data []byte) error {
   998  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict
   999  	var s1 struct {
  1000  		Risk gensupport.JSONFloat64 `json:"risk"`
  1001  		*NoMethod
  1002  	}
  1003  	s1.NoMethod = (*NoMethod)(s)
  1004  	if err := json.Unmarshal(data, &s1); err != nil {
  1005  		return err
  1006  	}
  1007  	s.Risk = float64(s1.Risk)
  1008  	return nil
  1009  }
  1010  
  1011  // GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerd
  1012  // ict: Information about stolen instrument fraud, where the user is not the
  1013  // legitimate owner of the instrument being used for the purchase.
  1014  type GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict struct {
  1015  	// Risk: Output only. Probability of this transaction being executed with a
  1016  	// stolen instrument. Values are from 0.0 (lowest) to 1.0 (highest).
  1017  	Risk float64 `json:"risk,omitempty"`
  1018  	// ForceSendFields is a list of field names (e.g. "Risk") to unconditionally
  1019  	// include in API requests. By default, fields with empty or default values are
  1020  	// omitted from API requests. See
  1021  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1022  	// details.
  1023  	ForceSendFields []string `json:"-"`
  1024  	// NullFields is a list of field names (e.g. "Risk") to include in API requests
  1025  	// with the JSON null value. By default, fields with empty values are omitted
  1026  	// from API requests. See
  1027  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1028  	NullFields []string `json:"-"`
  1029  }
  1030  
  1031  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict) MarshalJSON() ([]byte, error) {
  1032  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict
  1033  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1034  }
  1035  
  1036  func (s *GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict) UnmarshalJSON(data []byte) error {
  1037  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict
  1038  	var s1 struct {
  1039  		Risk gensupport.JSONFloat64 `json:"risk"`
  1040  		*NoMethod
  1041  	}
  1042  	s1.NoMethod = (*NoMethod)(s)
  1043  	if err := json.Unmarshal(data, &s1); err != nil {
  1044  		return err
  1045  	}
  1046  	s.Risk = float64(s1.Risk)
  1047  	return nil
  1048  }
  1049  
  1050  // GoogleCloudRecaptchaenterpriseV1FraudSignals: Fraud signals describing users
  1051  // and cards involved in the transaction.
  1052  type GoogleCloudRecaptchaenterpriseV1FraudSignals struct {
  1053  	// CardSignals: Output only. Signals describing the payment card or cards used
  1054  	// in this transaction.
  1055  	CardSignals *GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals `json:"cardSignals,omitempty"`
  1056  	// UserSignals: Output only. Signals describing the end user in this
  1057  	// transaction.
  1058  	UserSignals *GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals `json:"userSignals,omitempty"`
  1059  	// ForceSendFields is a list of field names (e.g. "CardSignals") to
  1060  	// unconditionally include in API requests. By default, fields with empty or
  1061  	// default values are omitted from API requests. See
  1062  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1063  	// details.
  1064  	ForceSendFields []string `json:"-"`
  1065  	// NullFields is a list of field names (e.g. "CardSignals") to include in API
  1066  	// requests with the JSON null value. By default, fields with empty values are
  1067  	// omitted from API requests. See
  1068  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1069  	NullFields []string `json:"-"`
  1070  }
  1071  
  1072  func (s *GoogleCloudRecaptchaenterpriseV1FraudSignals) MarshalJSON() ([]byte, error) {
  1073  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignals
  1074  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1075  }
  1076  
  1077  // GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals: Signals describing
  1078  // the payment card used in this transaction.
  1079  type GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals struct {
  1080  	// CardLabels: Output only. The labels for the payment card in this
  1081  	// transaction.
  1082  	//
  1083  	// Possible values:
  1084  	//   "CARD_LABEL_UNSPECIFIED" - No label specified.
  1085  	//   "PREPAID" - This card has been detected as prepaid.
  1086  	//   "VIRTUAL" - This card has been detected as virtual, such as a card number
  1087  	// generated for a single transaction or merchant.
  1088  	//   "UNEXPECTED_LOCATION" - This card has been detected as being used in an
  1089  	// unexpected geographic location.
  1090  	CardLabels []string `json:"cardLabels,omitempty"`
  1091  	// ForceSendFields is a list of field names (e.g. "CardLabels") to
  1092  	// unconditionally include in API requests. By default, fields with empty or
  1093  	// default values are omitted from API requests. See
  1094  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1095  	// details.
  1096  	ForceSendFields []string `json:"-"`
  1097  	// NullFields is a list of field names (e.g. "CardLabels") to include in API
  1098  	// requests with the JSON null value. By default, fields with empty values are
  1099  	// omitted from API requests. See
  1100  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1101  	NullFields []string `json:"-"`
  1102  }
  1103  
  1104  func (s *GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals) MarshalJSON() ([]byte, error) {
  1105  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals
  1106  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1107  }
  1108  
  1109  // GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals: Signals describing
  1110  // the user involved in this transaction.
  1111  type GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals struct {
  1112  	// ActiveDaysLowerBound: Output only. This user (based on email, phone, and
  1113  	// other identifiers) has been seen on the internet for at least this number of
  1114  	// days.
  1115  	ActiveDaysLowerBound int64 `json:"activeDaysLowerBound,omitempty"`
  1116  	// SyntheticRisk: Output only. Likelihood (from 0.0 to 1.0) this user includes
  1117  	// synthetic components in their identity, such as a randomly generated email
  1118  	// address, temporary phone number, or fake shipping address.
  1119  	SyntheticRisk float64 `json:"syntheticRisk,omitempty"`
  1120  	// ForceSendFields is a list of field names (e.g. "ActiveDaysLowerBound") to
  1121  	// unconditionally include in API requests. By default, fields with empty or
  1122  	// default values are omitted from API requests. See
  1123  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1124  	// details.
  1125  	ForceSendFields []string `json:"-"`
  1126  	// NullFields is a list of field names (e.g. "ActiveDaysLowerBound") to include
  1127  	// in API requests with the JSON null value. By default, fields with empty
  1128  	// values are omitted from API requests. See
  1129  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1130  	NullFields []string `json:"-"`
  1131  }
  1132  
  1133  func (s *GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals) MarshalJSON() ([]byte, error) {
  1134  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals
  1135  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1136  }
  1137  
  1138  func (s *GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals) UnmarshalJSON(data []byte) error {
  1139  	type NoMethod GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals
  1140  	var s1 struct {
  1141  		SyntheticRisk gensupport.JSONFloat64 `json:"syntheticRisk"`
  1142  		*NoMethod
  1143  	}
  1144  	s1.NoMethod = (*NoMethod)(s)
  1145  	if err := json.Unmarshal(data, &s1); err != nil {
  1146  		return err
  1147  	}
  1148  	s.SyntheticRisk = float64(s1.SyntheticRisk)
  1149  	return nil
  1150  }
  1151  
  1152  // GoogleCloudRecaptchaenterpriseV1IOSKeySettings: Settings specific to keys
  1153  // that can be used by iOS apps.
  1154  type GoogleCloudRecaptchaenterpriseV1IOSKeySettings struct {
  1155  	// AllowAllBundleIds: Optional. If set to true, allowed_bundle_ids are not
  1156  	// enforced.
  1157  	AllowAllBundleIds bool `json:"allowAllBundleIds,omitempty"`
  1158  	// AllowedBundleIds: Optional. iOS bundle ids of apps allowed to use the key.
  1159  	// Example: 'com.companyname.productname.appname'
  1160  	AllowedBundleIds []string `json:"allowedBundleIds,omitempty"`
  1161  	// AppleDeveloperId: Optional. Apple Developer account details for the app that
  1162  	// is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages
  1163  	// platform-specific checks like Apple App Attest and Apple DeviceCheck to
  1164  	// protect your app from abuse. Providing these fields allows reCAPTCHA
  1165  	// Enterprise to get a better assessment of the integrity of your app.
  1166  	AppleDeveloperId *GoogleCloudRecaptchaenterpriseV1AppleDeveloperId `json:"appleDeveloperId,omitempty"`
  1167  	// ForceSendFields is a list of field names (e.g. "AllowAllBundleIds") to
  1168  	// unconditionally include in API requests. By default, fields with empty or
  1169  	// default values are omitted from API requests. See
  1170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1171  	// details.
  1172  	ForceSendFields []string `json:"-"`
  1173  	// NullFields is a list of field names (e.g. "AllowAllBundleIds") to include in
  1174  	// API requests with the JSON null value. By default, fields with empty values
  1175  	// are omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1177  	NullFields []string `json:"-"`
  1178  }
  1179  
  1180  func (s *GoogleCloudRecaptchaenterpriseV1IOSKeySettings) MarshalJSON() ([]byte, error) {
  1181  	type NoMethod GoogleCloudRecaptchaenterpriseV1IOSKeySettings
  1182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1183  }
  1184  
  1185  // GoogleCloudRecaptchaenterpriseV1Key: A key used to identify and configure
  1186  // applications (web and/or mobile) that use reCAPTCHA Enterprise.
  1187  type GoogleCloudRecaptchaenterpriseV1Key struct {
  1188  	// AndroidSettings: Settings for keys that can be used by Android apps.
  1189  	AndroidSettings *GoogleCloudRecaptchaenterpriseV1AndroidKeySettings `json:"androidSettings,omitempty"`
  1190  	// CreateTime: Output only. The timestamp corresponding to the creation of this
  1191  	// key.
  1192  	CreateTime string `json:"createTime,omitempty"`
  1193  	// DisplayName: Required. Human-readable display name of this key. Modifiable
  1194  	// by user.
  1195  	DisplayName string `json:"displayName,omitempty"`
  1196  	// IosSettings: Settings for keys that can be used by iOS apps.
  1197  	IosSettings *GoogleCloudRecaptchaenterpriseV1IOSKeySettings `json:"iosSettings,omitempty"`
  1198  	// Labels: Optional. See [Creating and managing labels]
  1199  	// (https://cloud.google.com/recaptcha-enterprise/docs/labels).
  1200  	Labels map[string]string `json:"labels,omitempty"`
  1201  	// Name: Identifier. The resource name for the Key in the format
  1202  	// `projects/{project}/keys/{key}`.
  1203  	Name string `json:"name,omitempty"`
  1204  	// TestingOptions: Optional. Options for user acceptance testing.
  1205  	TestingOptions *GoogleCloudRecaptchaenterpriseV1TestingOptions `json:"testingOptions,omitempty"`
  1206  	// WafSettings: Optional. Settings for WAF
  1207  	WafSettings *GoogleCloudRecaptchaenterpriseV1WafSettings `json:"wafSettings,omitempty"`
  1208  	// WebSettings: Settings for keys that can be used by websites.
  1209  	WebSettings *GoogleCloudRecaptchaenterpriseV1WebKeySettings `json:"webSettings,omitempty"`
  1210  
  1211  	// ServerResponse contains the HTTP response code and headers from the server.
  1212  	googleapi.ServerResponse `json:"-"`
  1213  	// ForceSendFields is a list of field names (e.g. "AndroidSettings") to
  1214  	// unconditionally include in API requests. By default, fields with empty or
  1215  	// default values are omitted from API requests. See
  1216  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1217  	// details.
  1218  	ForceSendFields []string `json:"-"`
  1219  	// NullFields is a list of field names (e.g. "AndroidSettings") to include in
  1220  	// API requests with the JSON null value. By default, fields with empty values
  1221  	// are omitted from API requests. See
  1222  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1223  	NullFields []string `json:"-"`
  1224  }
  1225  
  1226  func (s *GoogleCloudRecaptchaenterpriseV1Key) MarshalJSON() ([]byte, error) {
  1227  	type NoMethod GoogleCloudRecaptchaenterpriseV1Key
  1228  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1229  }
  1230  
  1231  // GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse: Response to
  1232  // request to list firewall policies belonging to a project.
  1233  type GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse struct {
  1234  	// FirewallPolicies: Policy details.
  1235  	FirewallPolicies []*GoogleCloudRecaptchaenterpriseV1FirewallPolicy `json:"firewallPolicies,omitempty"`
  1236  	// NextPageToken: Token to retrieve the next page of results. It is set to
  1237  	// empty if no policies remain in results.
  1238  	NextPageToken string `json:"nextPageToken,omitempty"`
  1239  
  1240  	// ServerResponse contains the HTTP response code and headers from the server.
  1241  	googleapi.ServerResponse `json:"-"`
  1242  	// ForceSendFields is a list of field names (e.g. "FirewallPolicies") to
  1243  	// unconditionally include in API requests. By default, fields with empty or
  1244  	// default values are omitted from API requests. See
  1245  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1246  	// details.
  1247  	ForceSendFields []string `json:"-"`
  1248  	// NullFields is a list of field names (e.g. "FirewallPolicies") to include in
  1249  	// API requests with the JSON null value. By default, fields with empty values
  1250  	// are omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1252  	NullFields []string `json:"-"`
  1253  }
  1254  
  1255  func (s *GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse) MarshalJSON() ([]byte, error) {
  1256  	type NoMethod GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse
  1257  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1258  }
  1259  
  1260  // GoogleCloudRecaptchaenterpriseV1ListKeysResponse: Response to request to
  1261  // list keys in a project.
  1262  type GoogleCloudRecaptchaenterpriseV1ListKeysResponse struct {
  1263  	// Keys: Key details.
  1264  	Keys []*GoogleCloudRecaptchaenterpriseV1Key `json:"keys,omitempty"`
  1265  	// NextPageToken: Token to retrieve the next page of results. It is set to
  1266  	// empty if no keys remain in results.
  1267  	NextPageToken string `json:"nextPageToken,omitempty"`
  1268  
  1269  	// ServerResponse contains the HTTP response code and headers from the server.
  1270  	googleapi.ServerResponse `json:"-"`
  1271  	// ForceSendFields is a list of field names (e.g. "Keys") to unconditionally
  1272  	// include in API requests. By default, fields with empty or default values are
  1273  	// omitted from API requests. See
  1274  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1275  	// details.
  1276  	ForceSendFields []string `json:"-"`
  1277  	// NullFields is a list of field names (e.g. "Keys") to include in API requests
  1278  	// with the JSON null value. By default, fields with empty values are omitted
  1279  	// from API requests. See
  1280  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1281  	NullFields []string `json:"-"`
  1282  }
  1283  
  1284  func (s *GoogleCloudRecaptchaenterpriseV1ListKeysResponse) MarshalJSON() ([]byte, error) {
  1285  	type NoMethod GoogleCloudRecaptchaenterpriseV1ListKeysResponse
  1286  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1287  }
  1288  
  1289  // GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse:
  1290  // The response to a `ListRelatedAccountGroupMemberships` call.
  1291  type GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse struct {
  1292  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1293  	// next page. If this field is omitted, there are no subsequent pages.
  1294  	NextPageToken string `json:"nextPageToken,omitempty"`
  1295  	// RelatedAccountGroupMemberships: The memberships listed by the query.
  1296  	RelatedAccountGroupMemberships []*GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership `json:"relatedAccountGroupMemberships,omitempty"`
  1297  
  1298  	// ServerResponse contains the HTTP response code and headers from the server.
  1299  	googleapi.ServerResponse `json:"-"`
  1300  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1301  	// unconditionally include in API requests. By default, fields with empty or
  1302  	// default values are omitted from API requests. See
  1303  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1304  	// details.
  1305  	ForceSendFields []string `json:"-"`
  1306  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1307  	// requests with the JSON null value. By default, fields with empty values are
  1308  	// omitted from API requests. See
  1309  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1310  	NullFields []string `json:"-"`
  1311  }
  1312  
  1313  func (s *GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse) MarshalJSON() ([]byte, error) {
  1314  	type NoMethod GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse
  1315  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1316  }
  1317  
  1318  // GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse: The
  1319  // response to a `ListRelatedAccountGroups` call.
  1320  type GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse struct {
  1321  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1322  	// next page. If this field is omitted, there are no subsequent pages.
  1323  	NextPageToken string `json:"nextPageToken,omitempty"`
  1324  	// RelatedAccountGroups: The groups of related accounts listed by the query.
  1325  	RelatedAccountGroups []*GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup `json:"relatedAccountGroups,omitempty"`
  1326  
  1327  	// ServerResponse contains the HTTP response code and headers from the server.
  1328  	googleapi.ServerResponse `json:"-"`
  1329  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1330  	// unconditionally include in API requests. By default, fields with empty or
  1331  	// default values are omitted from API requests. See
  1332  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1333  	// details.
  1334  	ForceSendFields []string `json:"-"`
  1335  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1336  	// requests with the JSON null value. By default, fields with empty values are
  1337  	// omitted from API requests. See
  1338  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1339  	NullFields []string `json:"-"`
  1340  }
  1341  
  1342  func (s *GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse) MarshalJSON() ([]byte, error) {
  1343  	type NoMethod GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse
  1344  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1345  }
  1346  
  1347  // GoogleCloudRecaptchaenterpriseV1Metrics: Metrics for a single Key.
  1348  type GoogleCloudRecaptchaenterpriseV1Metrics struct {
  1349  	// ChallengeMetrics: Metrics will be continuous and in order by dates, and in
  1350  	// the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE),
  1351  	// will have challenge-based data.
  1352  	ChallengeMetrics []*GoogleCloudRecaptchaenterpriseV1ChallengeMetrics `json:"challengeMetrics,omitempty"`
  1353  	// Name: Output only. Identifier. The name of the metrics, in the format
  1354  	// `projects/{project}/keys/{key}/metrics`.
  1355  	Name string `json:"name,omitempty"`
  1356  	// ScoreMetrics: Metrics will be continuous and in order by dates, and in the
  1357  	// granularity of day. All Key types should have score-based data.
  1358  	ScoreMetrics []*GoogleCloudRecaptchaenterpriseV1ScoreMetrics `json:"scoreMetrics,omitempty"`
  1359  	// StartTime: Inclusive start time aligned to a day (UTC).
  1360  	StartTime string `json:"startTime,omitempty"`
  1361  
  1362  	// ServerResponse contains the HTTP response code and headers from the server.
  1363  	googleapi.ServerResponse `json:"-"`
  1364  	// ForceSendFields is a list of field names (e.g. "ChallengeMetrics") to
  1365  	// unconditionally include in API requests. By default, fields with empty or
  1366  	// default values are omitted from API requests. See
  1367  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1368  	// details.
  1369  	ForceSendFields []string `json:"-"`
  1370  	// NullFields is a list of field names (e.g. "ChallengeMetrics") to include in
  1371  	// API requests with the JSON null value. By default, fields with empty values
  1372  	// are omitted from API requests. See
  1373  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1374  	NullFields []string `json:"-"`
  1375  }
  1376  
  1377  func (s *GoogleCloudRecaptchaenterpriseV1Metrics) MarshalJSON() ([]byte, error) {
  1378  	type NoMethod GoogleCloudRecaptchaenterpriseV1Metrics
  1379  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1380  }
  1381  
  1382  // GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest: The migrate key request
  1383  // message.
  1384  type GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest struct {
  1385  	// SkipBillingCheck: Optional. If true, skips the billing check. A reCAPTCHA
  1386  	// Enterprise key or migrated key behaves differently than a reCAPTCHA
  1387  	// (non-Enterprise version) key when you reach a quota limit (see
  1388  	// https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid
  1389  	// any disruption of your usage, we check that a billing account is present. If
  1390  	// your usage of reCAPTCHA is under the free quota, you can safely skip the
  1391  	// billing check and proceed with the migration. See
  1392  	// https://cloud.google.com/recaptcha-enterprise/docs/billing-information.
  1393  	SkipBillingCheck bool `json:"skipBillingCheck,omitempty"`
  1394  	// ForceSendFields is a list of field names (e.g. "SkipBillingCheck") to
  1395  	// unconditionally include in API requests. By default, fields with empty or
  1396  	// default values are omitted from API requests. See
  1397  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1398  	// details.
  1399  	ForceSendFields []string `json:"-"`
  1400  	// NullFields is a list of field names (e.g. "SkipBillingCheck") to include in
  1401  	// API requests with the JSON null value. By default, fields with empty values
  1402  	// are omitted from API requests. See
  1403  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1404  	NullFields []string `json:"-"`
  1405  }
  1406  
  1407  func (s *GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest) MarshalJSON() ([]byte, error) {
  1408  	type NoMethod GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest
  1409  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1410  }
  1411  
  1412  // GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification: Private
  1413  // password leak verification info.
  1414  type GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification struct {
  1415  	// EncryptedLeakMatchPrefixes: Output only. List of prefixes of the encrypted
  1416  	// potential password leaks that matched the given parameters. They must be
  1417  	// compared with the client-side decryption prefix of
  1418  	// `reencrypted_user_credentials_hash`
  1419  	EncryptedLeakMatchPrefixes []string `json:"encryptedLeakMatchPrefixes,omitempty"`
  1420  	// EncryptedUserCredentialsHash: Optional. Encrypted Scrypt hash of the
  1421  	// canonicalized username+password. It is re-encrypted by the server and
  1422  	// returned through `reencrypted_user_credentials_hash`.
  1423  	EncryptedUserCredentialsHash string `json:"encryptedUserCredentialsHash,omitempty"`
  1424  	// LookupHashPrefix: Required. Exactly 26-bit prefix of the SHA-256 hash of the
  1425  	// canonicalized username. It is used to look up password leaks associated with
  1426  	// that hash prefix.
  1427  	LookupHashPrefix string `json:"lookupHashPrefix,omitempty"`
  1428  	// ReencryptedUserCredentialsHash: Output only. Corresponds to the
  1429  	// re-encryption of the `encrypted_user_credentials_hash` field. It is used to
  1430  	// match potential password leaks within `encrypted_leak_match_prefixes`.
  1431  	ReencryptedUserCredentialsHash string `json:"reencryptedUserCredentialsHash,omitempty"`
  1432  	// ForceSendFields is a list of field names (e.g. "EncryptedLeakMatchPrefixes")
  1433  	// to unconditionally include in API requests. By default, fields with empty or
  1434  	// default values are omitted from API requests. See
  1435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1436  	// details.
  1437  	ForceSendFields []string `json:"-"`
  1438  	// NullFields is a list of field names (e.g. "EncryptedLeakMatchPrefixes") to
  1439  	// include in API requests with the JSON null value. By default, fields with
  1440  	// empty values are omitted from API requests. See
  1441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1442  	NullFields []string `json:"-"`
  1443  }
  1444  
  1445  func (s *GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification) MarshalJSON() ([]byte, error) {
  1446  	type NoMethod GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification
  1447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1448  }
  1449  
  1450  // GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup: A group of related
  1451  // accounts.
  1452  type GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup struct {
  1453  	// Name: Required. Identifier. The resource name for the related account group
  1454  	// in the format
  1455  	// `projects/{project}/relatedaccountgroups/{related_account_group}`.
  1456  	Name string `json:"name,omitempty"`
  1457  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  1458  	// include in API requests. By default, fields with empty or default values are
  1459  	// omitted from API requests. See
  1460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1461  	// details.
  1462  	ForceSendFields []string `json:"-"`
  1463  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  1464  	// with the JSON null value. By default, fields with empty values are omitted
  1465  	// from API requests. See
  1466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1467  	NullFields []string `json:"-"`
  1468  }
  1469  
  1470  func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup) MarshalJSON() ([]byte, error) {
  1471  	type NoMethod GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup
  1472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1473  }
  1474  
  1475  // GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership: A membership
  1476  // in a group of related accounts.
  1477  type GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership struct {
  1478  	// AccountId: The unique stable account identifier of the member. The
  1479  	// identifier corresponds to an `account_id` provided in a previous
  1480  	// `CreateAssessment` or `AnnotateAssessment` call.
  1481  	AccountId string `json:"accountId,omitempty"`
  1482  	// HashedAccountId: Deprecated: use `account_id` instead. The unique stable
  1483  	// hashed account identifier of the member. The identifier corresponds to a
  1484  	// `hashed_account_id` provided in a previous `CreateAssessment` or
  1485  	// `AnnotateAssessment` call.
  1486  	HashedAccountId string `json:"hashedAccountId,omitempty"`
  1487  	// Name: Required. Identifier. The resource name for this membership in the
  1488  	// format
  1489  	// `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{m
  1490  	// embership}`.
  1491  	Name string `json:"name,omitempty"`
  1492  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1493  	// unconditionally include in API requests. By default, fields with empty or
  1494  	// default values are omitted from API requests. See
  1495  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1496  	// details.
  1497  	ForceSendFields []string `json:"-"`
  1498  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1499  	// requests with the JSON null value. By default, fields with empty values are
  1500  	// omitted from API requests. See
  1501  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1502  	NullFields []string `json:"-"`
  1503  }
  1504  
  1505  func (s *GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership) MarshalJSON() ([]byte, error) {
  1506  	type NoMethod GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership
  1507  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1508  }
  1509  
  1510  // GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest: The reorder
  1511  // firewall policies request message.
  1512  type GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest struct {
  1513  	// Names: Required. A list containing all policy names, in the new order. Each
  1514  	// name is in the format
  1515  	// `projects/{project}/firewallpolicies/{firewallpolicy}`.
  1516  	Names []string `json:"names,omitempty"`
  1517  	// ForceSendFields is a list of field names (e.g. "Names") to unconditionally
  1518  	// include in API requests. By default, fields with empty or default values are
  1519  	// omitted from API requests. See
  1520  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1521  	// details.
  1522  	ForceSendFields []string `json:"-"`
  1523  	// NullFields is a list of field names (e.g. "Names") to include in API
  1524  	// requests with the JSON null value. By default, fields with empty values are
  1525  	// omitted from API requests. See
  1526  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1527  	NullFields []string `json:"-"`
  1528  }
  1529  
  1530  func (s *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest) MarshalJSON() ([]byte, error) {
  1531  	type NoMethod GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest
  1532  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1533  }
  1534  
  1535  // GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse: The reorder
  1536  // firewall policies response message.
  1537  type GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse struct {
  1538  	// ServerResponse contains the HTTP response code and headers from the server.
  1539  	googleapi.ServerResponse `json:"-"`
  1540  }
  1541  
  1542  // GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse: Secret key
  1543  // is used only in legacy reCAPTCHA. It must be used in a 3rd party integration
  1544  // with legacy reCAPTCHA.
  1545  type GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse struct {
  1546  	// LegacySecretKey: The secret key (also known as shared secret) authorizes
  1547  	// communication between your application backend and the reCAPTCHA Enterprise
  1548  	// server to create an assessment. The secret key needs to be kept safe for
  1549  	// security purposes.
  1550  	LegacySecretKey string `json:"legacySecretKey,omitempty"`
  1551  
  1552  	// ServerResponse contains the HTTP response code and headers from the server.
  1553  	googleapi.ServerResponse `json:"-"`
  1554  	// ForceSendFields is a list of field names (e.g. "LegacySecretKey") to
  1555  	// unconditionally include in API requests. By default, fields with empty or
  1556  	// default values are omitted from API requests. See
  1557  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1558  	// details.
  1559  	ForceSendFields []string `json:"-"`
  1560  	// NullFields is a list of field names (e.g. "LegacySecretKey") to include in
  1561  	// API requests with the JSON null value. By default, fields with empty values
  1562  	// are omitted from API requests. See
  1563  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1564  	NullFields []string `json:"-"`
  1565  }
  1566  
  1567  func (s *GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse) MarshalJSON() ([]byte, error) {
  1568  	type NoMethod GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse
  1569  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1570  }
  1571  
  1572  // GoogleCloudRecaptchaenterpriseV1RiskAnalysis: Risk analysis result for an
  1573  // event.
  1574  type GoogleCloudRecaptchaenterpriseV1RiskAnalysis struct {
  1575  	// ExtendedVerdictReasons: Output only. Extended verdict reasons to be used for
  1576  	// experimentation only. The set of possible reasons is subject to change.
  1577  	ExtendedVerdictReasons []string `json:"extendedVerdictReasons,omitempty"`
  1578  	// Reasons: Output only. Reasons contributing to the risk analysis verdict.
  1579  	//
  1580  	// Possible values:
  1581  	//   "CLASSIFICATION_REASON_UNSPECIFIED" - Default unspecified type.
  1582  	//   "AUTOMATION" - Interactions matched the behavior of an automated agent.
  1583  	//   "UNEXPECTED_ENVIRONMENT" - The event originated from an illegitimate
  1584  	// environment.
  1585  	//   "TOO_MUCH_TRAFFIC" - Traffic volume from the event source is higher than
  1586  	// normal.
  1587  	//   "UNEXPECTED_USAGE_PATTERNS" - Interactions with the site were
  1588  	// significantly different than expected patterns.
  1589  	//   "LOW_CONFIDENCE_SCORE" - Too little traffic has been received from this
  1590  	// site thus far to generate quality risk analysis.
  1591  	//   "SUSPECTED_CARDING" - The request matches behavioral characteristics of a
  1592  	// carding attack.
  1593  	//   "SUSPECTED_CHARGEBACK" - The request matches behavioral characteristics of
  1594  	// chargebacks for fraud.
  1595  	Reasons []string `json:"reasons,omitempty"`
  1596  	// Score: Output only. Legitimate event score from 0.0 to 1.0. (1.0 means very
  1597  	// likely legitimate traffic while 0.0 means very likely non-legitimate
  1598  	// traffic).
  1599  	Score float64 `json:"score,omitempty"`
  1600  	// ForceSendFields is a list of field names (e.g. "ExtendedVerdictReasons") to
  1601  	// unconditionally include in API requests. By default, fields with empty or
  1602  	// default values are omitted from API requests. See
  1603  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1604  	// details.
  1605  	ForceSendFields []string `json:"-"`
  1606  	// NullFields is a list of field names (e.g. "ExtendedVerdictReasons") to
  1607  	// include in API requests with the JSON null value. By default, fields with
  1608  	// empty values are omitted from API requests. See
  1609  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1610  	NullFields []string `json:"-"`
  1611  }
  1612  
  1613  func (s *GoogleCloudRecaptchaenterpriseV1RiskAnalysis) MarshalJSON() ([]byte, error) {
  1614  	type NoMethod GoogleCloudRecaptchaenterpriseV1RiskAnalysis
  1615  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1616  }
  1617  
  1618  func (s *GoogleCloudRecaptchaenterpriseV1RiskAnalysis) UnmarshalJSON(data []byte) error {
  1619  	type NoMethod GoogleCloudRecaptchaenterpriseV1RiskAnalysis
  1620  	var s1 struct {
  1621  		Score gensupport.JSONFloat64 `json:"score"`
  1622  		*NoMethod
  1623  	}
  1624  	s1.NoMethod = (*NoMethod)(s)
  1625  	if err := json.Unmarshal(data, &s1); err != nil {
  1626  		return err
  1627  	}
  1628  	s.Score = float64(s1.Score)
  1629  	return nil
  1630  }
  1631  
  1632  // GoogleCloudRecaptchaenterpriseV1ScoreDistribution: Score distribution.
  1633  type GoogleCloudRecaptchaenterpriseV1ScoreDistribution struct {
  1634  	// ScoreBuckets: Map key is score value multiplied by 100. The scores are
  1635  	// discrete values between [0, 1]. The maximum number of buckets is on order of
  1636  	// a few dozen, but typically much lower (ie. 10).
  1637  	ScoreBuckets map[string]string `json:"scoreBuckets,omitempty"`
  1638  	// ForceSendFields is a list of field names (e.g. "ScoreBuckets") to
  1639  	// unconditionally include in API requests. By default, fields with empty or
  1640  	// default values are omitted from API requests. See
  1641  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1642  	// details.
  1643  	ForceSendFields []string `json:"-"`
  1644  	// NullFields is a list of field names (e.g. "ScoreBuckets") to include in API
  1645  	// requests with the JSON null value. By default, fields with empty values are
  1646  	// omitted from API requests. See
  1647  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1648  	NullFields []string `json:"-"`
  1649  }
  1650  
  1651  func (s *GoogleCloudRecaptchaenterpriseV1ScoreDistribution) MarshalJSON() ([]byte, error) {
  1652  	type NoMethod GoogleCloudRecaptchaenterpriseV1ScoreDistribution
  1653  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1654  }
  1655  
  1656  // GoogleCloudRecaptchaenterpriseV1ScoreMetrics: Metrics related to scoring.
  1657  type GoogleCloudRecaptchaenterpriseV1ScoreMetrics struct {
  1658  	// ActionMetrics: Action-based metrics. The map key is the action name which
  1659  	// specified by the site owners at time of the "execute" client-side call.
  1660  	ActionMetrics map[string]GoogleCloudRecaptchaenterpriseV1ScoreDistribution `json:"actionMetrics,omitempty"`
  1661  	// OverallMetrics: Aggregated score metrics for all traffic.
  1662  	OverallMetrics *GoogleCloudRecaptchaenterpriseV1ScoreDistribution `json:"overallMetrics,omitempty"`
  1663  	// ForceSendFields is a list of field names (e.g. "ActionMetrics") to
  1664  	// unconditionally include in API requests. By default, fields with empty or
  1665  	// default values are omitted from API requests. See
  1666  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1667  	// details.
  1668  	ForceSendFields []string `json:"-"`
  1669  	// NullFields is a list of field names (e.g. "ActionMetrics") to include in API
  1670  	// requests with the JSON null value. By default, fields with empty values are
  1671  	// omitted from API requests. See
  1672  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1673  	NullFields []string `json:"-"`
  1674  }
  1675  
  1676  func (s *GoogleCloudRecaptchaenterpriseV1ScoreMetrics) MarshalJSON() ([]byte, error) {
  1677  	type NoMethod GoogleCloudRecaptchaenterpriseV1ScoreMetrics
  1678  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1679  }
  1680  
  1681  // GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest:
  1682  // The request message to search related account group memberships.
  1683  type GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest struct {
  1684  	// AccountId: Optional. The unique stable account identifier used to search
  1685  	// connections. The identifier should correspond to an `account_id` provided in
  1686  	// a previous `CreateAssessment` or `AnnotateAssessment` call. Either
  1687  	// hashed_account_id or account_id must be set, but not both.
  1688  	AccountId string `json:"accountId,omitempty"`
  1689  	// HashedAccountId: Optional. Deprecated: use `account_id` instead. The unique
  1690  	// stable hashed account identifier used to search connections. The identifier
  1691  	// should correspond to a `hashed_account_id` provided in a previous
  1692  	// `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id or
  1693  	// account_id must be set, but not both.
  1694  	HashedAccountId string `json:"hashedAccountId,omitempty"`
  1695  	// PageSize: Optional. The maximum number of groups to return. The service
  1696  	// might return fewer than this value. If unspecified, at most 50 groups are
  1697  	// returned. The maximum value is 1000; values above 1000 are coerced to 1000.
  1698  	PageSize int64 `json:"pageSize,omitempty"`
  1699  	// PageToken: Optional. A page token, received from a previous
  1700  	// `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the
  1701  	// subsequent page. When paginating, all other parameters provided to
  1702  	// `SearchRelatedAccountGroupMemberships` must match the call that provided the
  1703  	// page token.
  1704  	PageToken string `json:"pageToken,omitempty"`
  1705  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1706  	// unconditionally include in API requests. By default, fields with empty or
  1707  	// default values are omitted from API requests. See
  1708  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1709  	// details.
  1710  	ForceSendFields []string `json:"-"`
  1711  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1712  	// requests with the JSON null value. By default, fields with empty values are
  1713  	// omitted from API requests. See
  1714  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1715  	NullFields []string `json:"-"`
  1716  }
  1717  
  1718  func (s *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest) MarshalJSON() ([]byte, error) {
  1719  	type NoMethod GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest
  1720  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1721  }
  1722  
  1723  // GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse:
  1724  //
  1725  //	The response to a `SearchRelatedAccountGroupMemberships` call.
  1726  type GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse struct {
  1727  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
  1728  	// next page. If this field is omitted, there are no subsequent pages.
  1729  	NextPageToken string `json:"nextPageToken,omitempty"`
  1730  	// RelatedAccountGroupMemberships: The queried memberships.
  1731  	RelatedAccountGroupMemberships []*GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership `json:"relatedAccountGroupMemberships,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. "NextPageToken") to
  1736  	// unconditionally include in API requests. By default, fields with empty or
  1737  	// default values are 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. "NextPageToken") 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 *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse) MarshalJSON() ([]byte, error) {
  1749  	type NoMethod GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse
  1750  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1751  }
  1752  
  1753  // GoogleCloudRecaptchaenterpriseV1TestingOptions: Options for user acceptance
  1754  // testing.
  1755  type GoogleCloudRecaptchaenterpriseV1TestingOptions struct {
  1756  	// TestingChallenge: Optional. For challenge-based keys only (CHECKBOX,
  1757  	// INVISIBLE), all challenge requests for this site will return nocaptcha if
  1758  	// NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
  1759  	//
  1760  	// Possible values:
  1761  	//   "TESTING_CHALLENGE_UNSPECIFIED" - Perform the normal risk analysis and
  1762  	// return either nocaptcha or a challenge depending on risk and trust factors.
  1763  	//   "NOCAPTCHA" - Challenge requests for this key always return a nocaptcha,
  1764  	// which does not require a solution.
  1765  	//   "UNSOLVABLE_CHALLENGE" - Challenge requests for this key always return an
  1766  	// unsolvable challenge.
  1767  	TestingChallenge string `json:"testingChallenge,omitempty"`
  1768  	// TestingScore: Optional. All assessments for this Key will return this score.
  1769  	// Must be between 0 (likely not legitimate) and 1 (likely legitimate)
  1770  	// inclusive.
  1771  	TestingScore float64 `json:"testingScore,omitempty"`
  1772  	// ForceSendFields is a list of field names (e.g. "TestingChallenge") to
  1773  	// unconditionally include in API requests. By default, fields with empty or
  1774  	// default values are omitted from API requests. See
  1775  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1776  	// details.
  1777  	ForceSendFields []string `json:"-"`
  1778  	// NullFields is a list of field names (e.g. "TestingChallenge") to include in
  1779  	// API requests with the JSON null value. By default, fields with empty values
  1780  	// are omitted from API requests. See
  1781  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1782  	NullFields []string `json:"-"`
  1783  }
  1784  
  1785  func (s *GoogleCloudRecaptchaenterpriseV1TestingOptions) MarshalJSON() ([]byte, error) {
  1786  	type NoMethod GoogleCloudRecaptchaenterpriseV1TestingOptions
  1787  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1788  }
  1789  
  1790  func (s *GoogleCloudRecaptchaenterpriseV1TestingOptions) UnmarshalJSON(data []byte) error {
  1791  	type NoMethod GoogleCloudRecaptchaenterpriseV1TestingOptions
  1792  	var s1 struct {
  1793  		TestingScore gensupport.JSONFloat64 `json:"testingScore"`
  1794  		*NoMethod
  1795  	}
  1796  	s1.NoMethod = (*NoMethod)(s)
  1797  	if err := json.Unmarshal(data, &s1); err != nil {
  1798  		return err
  1799  	}
  1800  	s.TestingScore = float64(s1.TestingScore)
  1801  	return nil
  1802  }
  1803  
  1804  // GoogleCloudRecaptchaenterpriseV1TokenProperties: Properties of the provided
  1805  // event token.
  1806  type GoogleCloudRecaptchaenterpriseV1TokenProperties struct {
  1807  	// Action: Output only. Action name provided at token generation.
  1808  	Action string `json:"action,omitempty"`
  1809  	// AndroidPackageName: Output only. The name of the Android package with which
  1810  	// the token was generated (Android keys only).
  1811  	AndroidPackageName string `json:"androidPackageName,omitempty"`
  1812  	// CreateTime: Output only. The timestamp corresponding to the generation of
  1813  	// the token.
  1814  	CreateTime string `json:"createTime,omitempty"`
  1815  	// Hostname: Output only. The hostname of the page on which the token was
  1816  	// generated (Web keys only).
  1817  	Hostname string `json:"hostname,omitempty"`
  1818  	// InvalidReason: Output only. Reason associated with the response when valid =
  1819  	// false.
  1820  	//
  1821  	// Possible values:
  1822  	//   "INVALID_REASON_UNSPECIFIED" - Default unspecified type.
  1823  	//   "UNKNOWN_INVALID_REASON" - If the failure reason was not accounted for.
  1824  	//   "MALFORMED" - The provided user verification token was malformed.
  1825  	//   "EXPIRED" - The user verification token had expired.
  1826  	//   "DUPE" - The user verification had already been seen.
  1827  	//   "MISSING" - The user verification token was not present.
  1828  	//   "BROWSER_ERROR" - A retriable error (such as network failure) occurred on
  1829  	// the browser. Could easily be simulated by an attacker.
  1830  	InvalidReason string `json:"invalidReason,omitempty"`
  1831  	// IosBundleId: Output only. The ID of the iOS bundle with which the token was
  1832  	// generated (iOS keys only).
  1833  	IosBundleId string `json:"iosBundleId,omitempty"`
  1834  	// Valid: Output only. Whether the provided user response token is valid. When
  1835  	// valid = false, the reason could be specified in invalid_reason or it could
  1836  	// also be due to a user failing to solve a challenge or a sitekey mismatch
  1837  	// (i.e the sitekey used to generate the token was different than the one
  1838  	// specified in the assessment).
  1839  	Valid bool `json:"valid,omitempty"`
  1840  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1841  	// include in API requests. By default, fields with empty or default values are
  1842  	// omitted from API requests. See
  1843  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1844  	// details.
  1845  	ForceSendFields []string `json:"-"`
  1846  	// NullFields is a list of field names (e.g. "Action") to include in API
  1847  	// requests with the JSON null value. By default, fields with empty values are
  1848  	// omitted from API requests. See
  1849  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1850  	NullFields []string `json:"-"`
  1851  }
  1852  
  1853  func (s *GoogleCloudRecaptchaenterpriseV1TokenProperties) MarshalJSON() ([]byte, error) {
  1854  	type NoMethod GoogleCloudRecaptchaenterpriseV1TokenProperties
  1855  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1856  }
  1857  
  1858  // GoogleCloudRecaptchaenterpriseV1TransactionData: Transaction data associated
  1859  // with a payment protected by reCAPTCHA Enterprise.
  1860  type GoogleCloudRecaptchaenterpriseV1TransactionData struct {
  1861  	// BillingAddress: Optional. Address associated with the payment method when
  1862  	// applicable.
  1863  	BillingAddress *GoogleCloudRecaptchaenterpriseV1TransactionDataAddress `json:"billingAddress,omitempty"`
  1864  	// CardBin: Optional. The Bank Identification Number - generally the first 6 or
  1865  	// 8 digits of the card.
  1866  	CardBin string `json:"cardBin,omitempty"`
  1867  	// CardLastFour: Optional. The last four digits of the card.
  1868  	CardLastFour string `json:"cardLastFour,omitempty"`
  1869  	// CurrencyCode: Optional. The currency code in ISO-4217 format.
  1870  	CurrencyCode string `json:"currencyCode,omitempty"`
  1871  	// GatewayInfo: Optional. Information about the payment gateway's response to
  1872  	// the transaction.
  1873  	GatewayInfo *GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo `json:"gatewayInfo,omitempty"`
  1874  	// Items: Optional. Items purchased in this transaction.
  1875  	Items []*GoogleCloudRecaptchaenterpriseV1TransactionDataItem `json:"items,omitempty"`
  1876  	// Merchants: Optional. Information about the user or users fulfilling the
  1877  	// transaction.
  1878  	Merchants []*GoogleCloudRecaptchaenterpriseV1TransactionDataUser `json:"merchants,omitempty"`
  1879  	// PaymentMethod: Optional. The payment method for the transaction. The allowed
  1880  	// values are: * credit-card * debit-card * gift-card * processor-{name} (If a
  1881  	// third-party is used, for example, processor-paypal) * custom-{name} (If an
  1882  	// alternative method is used, for example, custom-crypto)
  1883  	PaymentMethod string `json:"paymentMethod,omitempty"`
  1884  	// ShippingAddress: Optional. Destination address if this transaction involves
  1885  	// shipping a physical item.
  1886  	ShippingAddress *GoogleCloudRecaptchaenterpriseV1TransactionDataAddress `json:"shippingAddress,omitempty"`
  1887  	// ShippingValue: Optional. The value of shipping in the specified currency. 0
  1888  	// for free or no shipping.
  1889  	ShippingValue float64 `json:"shippingValue,omitempty"`
  1890  	// TransactionId: Unique identifier for the transaction. This custom identifier
  1891  	// can be used to reference this transaction in the future, for example,
  1892  	// labeling a refund or chargeback event. Two attempts at the same transaction
  1893  	// should use the same transaction id.
  1894  	TransactionId string `json:"transactionId,omitempty"`
  1895  	// User: Optional. Information about the user paying/initiating the
  1896  	// transaction.
  1897  	User *GoogleCloudRecaptchaenterpriseV1TransactionDataUser `json:"user,omitempty"`
  1898  	// Value: Optional. The decimal value of the transaction in the specified
  1899  	// currency.
  1900  	Value float64 `json:"value,omitempty"`
  1901  	// ForceSendFields is a list of field names (e.g. "BillingAddress") to
  1902  	// unconditionally include in API requests. By default, fields with empty or
  1903  	// default values are omitted from API requests. See
  1904  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1905  	// details.
  1906  	ForceSendFields []string `json:"-"`
  1907  	// NullFields is a list of field names (e.g. "BillingAddress") to include in
  1908  	// API requests with the JSON null value. By default, fields with empty values
  1909  	// are omitted from API requests. See
  1910  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1911  	NullFields []string `json:"-"`
  1912  }
  1913  
  1914  func (s *GoogleCloudRecaptchaenterpriseV1TransactionData) MarshalJSON() ([]byte, error) {
  1915  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionData
  1916  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1917  }
  1918  
  1919  func (s *GoogleCloudRecaptchaenterpriseV1TransactionData) UnmarshalJSON(data []byte) error {
  1920  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionData
  1921  	var s1 struct {
  1922  		ShippingValue gensupport.JSONFloat64 `json:"shippingValue"`
  1923  		Value         gensupport.JSONFloat64 `json:"value"`
  1924  		*NoMethod
  1925  	}
  1926  	s1.NoMethod = (*NoMethod)(s)
  1927  	if err := json.Unmarshal(data, &s1); err != nil {
  1928  		return err
  1929  	}
  1930  	s.ShippingValue = float64(s1.ShippingValue)
  1931  	s.Value = float64(s1.Value)
  1932  	return nil
  1933  }
  1934  
  1935  // GoogleCloudRecaptchaenterpriseV1TransactionDataAddress: Structured address
  1936  // format for billing and shipping addresses.
  1937  type GoogleCloudRecaptchaenterpriseV1TransactionDataAddress struct {
  1938  	// Address: Optional. The first lines of the address. The first line generally
  1939  	// contains the street name and number, and further lines may include
  1940  	// information such as an apartment number.
  1941  	Address []string `json:"address,omitempty"`
  1942  	// AdministrativeArea: Optional. The state, province, or otherwise
  1943  	// administrative area of the address.
  1944  	AdministrativeArea string `json:"administrativeArea,omitempty"`
  1945  	// Locality: Optional. The town/city of the address.
  1946  	Locality string `json:"locality,omitempty"`
  1947  	// PostalCode: Optional. The postal or ZIP code of the address.
  1948  	PostalCode string `json:"postalCode,omitempty"`
  1949  	// Recipient: Optional. The recipient name, potentially including information
  1950  	// such as "care of".
  1951  	Recipient string `json:"recipient,omitempty"`
  1952  	// RegionCode: Optional. The CLDR country/region of the address.
  1953  	RegionCode string `json:"regionCode,omitempty"`
  1954  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  1955  	// include in API requests. By default, fields with empty or default values are
  1956  	// omitted from API requests. See
  1957  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1958  	// details.
  1959  	ForceSendFields []string `json:"-"`
  1960  	// NullFields is a list of field names (e.g. "Address") to include in API
  1961  	// requests with the JSON null value. By default, fields with empty values are
  1962  	// omitted from API requests. See
  1963  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1964  	NullFields []string `json:"-"`
  1965  }
  1966  
  1967  func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataAddress) MarshalJSON() ([]byte, error) {
  1968  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataAddress
  1969  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1970  }
  1971  
  1972  // GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo: Details about
  1973  // the transaction from the gateway.
  1974  type GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo struct {
  1975  	// AvsResponseCode: Optional. AVS response code from the gateway (available
  1976  	// only when reCAPTCHA Enterprise is called after authorization).
  1977  	AvsResponseCode string `json:"avsResponseCode,omitempty"`
  1978  	// CvvResponseCode: Optional. CVV response code from the gateway (available
  1979  	// only when reCAPTCHA Enterprise is called after authorization).
  1980  	CvvResponseCode string `json:"cvvResponseCode,omitempty"`
  1981  	// GatewayResponseCode: Optional. Gateway response code describing the state of
  1982  	// the transaction.
  1983  	GatewayResponseCode string `json:"gatewayResponseCode,omitempty"`
  1984  	// Name: Optional. Name of the gateway service (for example, stripe, square,
  1985  	// paypal).
  1986  	Name string `json:"name,omitempty"`
  1987  	// ForceSendFields is a list of field names (e.g. "AvsResponseCode") to
  1988  	// unconditionally include in API requests. By default, fields with empty or
  1989  	// default values are omitted from API requests. See
  1990  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1991  	// details.
  1992  	ForceSendFields []string `json:"-"`
  1993  	// NullFields is a list of field names (e.g. "AvsResponseCode") to include in
  1994  	// API requests with the JSON null value. By default, fields with empty values
  1995  	// are omitted from API requests. See
  1996  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1997  	NullFields []string `json:"-"`
  1998  }
  1999  
  2000  func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo) MarshalJSON() ([]byte, error) {
  2001  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo
  2002  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2003  }
  2004  
  2005  // GoogleCloudRecaptchaenterpriseV1TransactionDataItem: Line items being
  2006  // purchased in this transaction.
  2007  type GoogleCloudRecaptchaenterpriseV1TransactionDataItem struct {
  2008  	// MerchantAccountId: Optional. When a merchant is specified, its corresponding
  2009  	// account_id. Necessary to populate marketplace-style transactions.
  2010  	MerchantAccountId string `json:"merchantAccountId,omitempty"`
  2011  	// Name: Optional. The full name of the item.
  2012  	Name string `json:"name,omitempty"`
  2013  	// Quantity: Optional. The quantity of this item that is being purchased.
  2014  	Quantity int64 `json:"quantity,omitempty,string"`
  2015  	// Value: Optional. The value per item that the user is paying, in the
  2016  	// transaction currency, after discounts.
  2017  	Value float64 `json:"value,omitempty"`
  2018  	// ForceSendFields is a list of field names (e.g. "MerchantAccountId") to
  2019  	// unconditionally include in API requests. By default, fields with empty or
  2020  	// default values are omitted from API requests. See
  2021  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2022  	// details.
  2023  	ForceSendFields []string `json:"-"`
  2024  	// NullFields is a list of field names (e.g. "MerchantAccountId") to include in
  2025  	// API requests with the JSON null value. By default, fields with empty values
  2026  	// are omitted from API requests. See
  2027  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2028  	NullFields []string `json:"-"`
  2029  }
  2030  
  2031  func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataItem) MarshalJSON() ([]byte, error) {
  2032  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataItem
  2033  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2034  }
  2035  
  2036  func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataItem) UnmarshalJSON(data []byte) error {
  2037  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataItem
  2038  	var s1 struct {
  2039  		Value gensupport.JSONFloat64 `json:"value"`
  2040  		*NoMethod
  2041  	}
  2042  	s1.NoMethod = (*NoMethod)(s)
  2043  	if err := json.Unmarshal(data, &s1); err != nil {
  2044  		return err
  2045  	}
  2046  	s.Value = float64(s1.Value)
  2047  	return nil
  2048  }
  2049  
  2050  // GoogleCloudRecaptchaenterpriseV1TransactionDataUser: Details about a user's
  2051  // account involved in the transaction.
  2052  type GoogleCloudRecaptchaenterpriseV1TransactionDataUser struct {
  2053  	// AccountId: Optional. Unique account identifier for this user. If using
  2054  	// account defender, this should match the hashed_account_id field. Otherwise,
  2055  	// a unique and persistent identifier for this account.
  2056  	AccountId string `json:"accountId,omitempty"`
  2057  	// CreationMs: Optional. The epoch milliseconds of the user's account creation.
  2058  	CreationMs int64 `json:"creationMs,omitempty,string"`
  2059  	// Email: Optional. The email address of the user.
  2060  	Email string `json:"email,omitempty"`
  2061  	// EmailVerified: Optional. Whether the email has been verified to be
  2062  	// accessible by the user (OTP or similar).
  2063  	EmailVerified bool `json:"emailVerified,omitempty"`
  2064  	// PhoneNumber: Optional. The phone number of the user, with country code.
  2065  	PhoneNumber string `json:"phoneNumber,omitempty"`
  2066  	// PhoneVerified: Optional. Whether the phone number has been verified to be
  2067  	// accessible by the user (OTP or similar).
  2068  	PhoneVerified bool `json:"phoneVerified,omitempty"`
  2069  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  2070  	// unconditionally include in API requests. By default, fields with empty or
  2071  	// default values are omitted from API requests. See
  2072  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2073  	// details.
  2074  	ForceSendFields []string `json:"-"`
  2075  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  2076  	// requests with the JSON null value. By default, fields with empty values are
  2077  	// omitted from API requests. See
  2078  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2079  	NullFields []string `json:"-"`
  2080  }
  2081  
  2082  func (s *GoogleCloudRecaptchaenterpriseV1TransactionDataUser) MarshalJSON() ([]byte, error) {
  2083  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionDataUser
  2084  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2085  }
  2086  
  2087  // GoogleCloudRecaptchaenterpriseV1TransactionEvent: Describes an event in the
  2088  // lifecycle of a payment transaction.
  2089  type GoogleCloudRecaptchaenterpriseV1TransactionEvent struct {
  2090  	// EventTime: Optional. Timestamp when this transaction event occurred;
  2091  	// otherwise assumed to be the time of the API call.
  2092  	EventTime string `json:"eventTime,omitempty"`
  2093  	// EventType: Optional. The type of this transaction event.
  2094  	//
  2095  	// Possible values:
  2096  	//   "TRANSACTION_EVENT_TYPE_UNSPECIFIED" - Default, unspecified event type.
  2097  	//   "MERCHANT_APPROVE" - Indicates that the transaction is approved by the
  2098  	// merchant. The accompanying reasons can include terms such as 'INHOUSE',
  2099  	// 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'.
  2100  	//   "MERCHANT_DENY" - Indicates that the transaction is denied and concluded
  2101  	// due to risks detected by the merchant. The accompanying reasons can include
  2102  	// terms such as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'.
  2103  	//   "MANUAL_REVIEW" - Indicates that the transaction is being evaluated by a
  2104  	// human, due to suspicion or risk.
  2105  	//   "AUTHORIZATION" - Indicates that the authorization attempt with the card
  2106  	// issuer succeeded.
  2107  	//   "AUTHORIZATION_DECLINE" - Indicates that the authorization attempt with
  2108  	// the card issuer failed. The accompanying reasons can include Visa's '54'
  2109  	// indicating that the card is expired, or '82' indicating that the CVV is
  2110  	// incorrect.
  2111  	//   "PAYMENT_CAPTURE" - Indicates that the transaction is completed because
  2112  	// the funds were settled.
  2113  	//   "PAYMENT_CAPTURE_DECLINE" - Indicates that the transaction could not be
  2114  	// completed because the funds were not settled.
  2115  	//   "CANCEL" - Indicates that the transaction has been canceled. Specify the
  2116  	// reason for the cancellation. For example, 'INSUFFICIENT_INVENTORY'.
  2117  	//   "CHARGEBACK_INQUIRY" - Indicates that the merchant has received a
  2118  	// chargeback inquiry due to fraud for the transaction, requesting additional
  2119  	// information before a fraud chargeback is officially issued and a formal
  2120  	// chargeback notification is sent.
  2121  	//   "CHARGEBACK_ALERT" - Indicates that the merchant has received a chargeback
  2122  	// alert due to fraud for the transaction. The process of resolving the dispute
  2123  	// without involving the payment network is started.
  2124  	//   "FRAUD_NOTIFICATION" - Indicates that a fraud notification is issued for
  2125  	// the transaction, sent by the payment instrument's issuing bank because the
  2126  	// transaction appears to be fraudulent. We recommend including TC40 or SAFE
  2127  	// data in the `reason` field for this event type. For partial chargebacks, we
  2128  	// recommend that you include an amount in the `value` field.
  2129  	//   "CHARGEBACK" - Indicates that the merchant is informed by the payment
  2130  	// network that the transaction has entered the chargeback process due to
  2131  	// fraud. Reason code examples include Discover's '6005' and '6041'. For
  2132  	// partial chargebacks, we recommend that you include an amount in the `value`
  2133  	// field.
  2134  	//   "CHARGEBACK_REPRESENTMENT" - Indicates that the transaction has entered
  2135  	// the chargeback process due to fraud, and that the merchant has chosen to
  2136  	// enter representment. Reason examples include Discover's '6005' and '6041'.
  2137  	// For partial chargebacks, we recommend that you include an amount in the
  2138  	// `value` field.
  2139  	//   "CHARGEBACK_REVERSE" - Indicates that the transaction has had a fraud
  2140  	// chargeback which was illegitimate and was reversed as a result. For partial
  2141  	// chargebacks, we recommend that you include an amount in the `value` field.
  2142  	//   "REFUND_REQUEST" - Indicates that the merchant has received a refund for a
  2143  	// completed transaction. For partial refunds, we recommend that you include an
  2144  	// amount in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of
  2145  	// exempt tax)
  2146  	//   "REFUND_DECLINE" - Indicates that the merchant has received a refund
  2147  	// request for this transaction, but that they have declined it. For partial
  2148  	// refunds, we recommend that you include an amount in the `value` field.
  2149  	// Reason example: 'TAX_EXEMPT' (partial refund of exempt tax)
  2150  	//   "REFUND" - Indicates that the completed transaction was refunded by the
  2151  	// merchant. For partial refunds, we recommend that you include an amount in
  2152  	// the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt
  2153  	// tax)
  2154  	//   "REFUND_REVERSE" - Indicates that the completed transaction was refunded
  2155  	// by the merchant, and that this refund was reversed. For partial refunds, we
  2156  	// recommend that you include an amount in the `value` field.
  2157  	EventType string `json:"eventType,omitempty"`
  2158  	// Reason: Optional. The reason or standardized code that corresponds with this
  2159  	// transaction event, if one exists. For example, a CHARGEBACK event with code
  2160  	// 6005.
  2161  	Reason string `json:"reason,omitempty"`
  2162  	// Value: Optional. The value that corresponds with this transaction event, if
  2163  	// one exists. For example, a refund event where $5.00 was refunded. Currency
  2164  	// is obtained from the original transaction data.
  2165  	Value float64 `json:"value,omitempty"`
  2166  	// ForceSendFields is a list of field names (e.g. "EventTime") to
  2167  	// unconditionally include in API requests. By default, fields with empty or
  2168  	// default values are omitted from API requests. See
  2169  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2170  	// details.
  2171  	ForceSendFields []string `json:"-"`
  2172  	// NullFields is a list of field names (e.g. "EventTime") to include in API
  2173  	// requests with the JSON null value. By default, fields with empty values are
  2174  	// omitted from API requests. See
  2175  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2176  	NullFields []string `json:"-"`
  2177  }
  2178  
  2179  func (s *GoogleCloudRecaptchaenterpriseV1TransactionEvent) MarshalJSON() ([]byte, error) {
  2180  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionEvent
  2181  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2182  }
  2183  
  2184  func (s *GoogleCloudRecaptchaenterpriseV1TransactionEvent) UnmarshalJSON(data []byte) error {
  2185  	type NoMethod GoogleCloudRecaptchaenterpriseV1TransactionEvent
  2186  	var s1 struct {
  2187  		Value gensupport.JSONFloat64 `json:"value"`
  2188  		*NoMethod
  2189  	}
  2190  	s1.NoMethod = (*NoMethod)(s)
  2191  	if err := json.Unmarshal(data, &s1); err != nil {
  2192  		return err
  2193  	}
  2194  	s.Value = float64(s1.Value)
  2195  	return nil
  2196  }
  2197  
  2198  // GoogleCloudRecaptchaenterpriseV1UserId: An identifier associated with a
  2199  // user.
  2200  type GoogleCloudRecaptchaenterpriseV1UserId struct {
  2201  	// Email: Optional. An email address.
  2202  	Email string `json:"email,omitempty"`
  2203  	// PhoneNumber: Optional. A phone number. Should use the E.164 format.
  2204  	PhoneNumber string `json:"phoneNumber,omitempty"`
  2205  	// Username: Optional. A unique username, if different from all the other
  2206  	// identifiers and `account_id` that are provided. Can be a unique login handle
  2207  	// or display name for a user.
  2208  	Username string `json:"username,omitempty"`
  2209  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
  2210  	// include in API requests. By default, fields with empty or default values are
  2211  	// omitted from API requests. See
  2212  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2213  	// details.
  2214  	ForceSendFields []string `json:"-"`
  2215  	// NullFields is a list of field names (e.g. "Email") to include in API
  2216  	// requests with the JSON null value. By default, fields with empty values are
  2217  	// omitted from API requests. See
  2218  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2219  	NullFields []string `json:"-"`
  2220  }
  2221  
  2222  func (s *GoogleCloudRecaptchaenterpriseV1UserId) MarshalJSON() ([]byte, error) {
  2223  	type NoMethod GoogleCloudRecaptchaenterpriseV1UserId
  2224  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2225  }
  2226  
  2227  // GoogleCloudRecaptchaenterpriseV1UserInfo: User information associated with a
  2228  // request protected by reCAPTCHA Enterprise.
  2229  type GoogleCloudRecaptchaenterpriseV1UserInfo struct {
  2230  	// AccountId: Optional. For logged-in requests or login/registration requests,
  2231  	// the unique account identifier associated with this user. You can use the
  2232  	// username if it is stable (meaning it is the same for every request
  2233  	// associated with the same user), or any stable user ID of your choice. Leave
  2234  	// blank for non logged-in actions or guest checkout.
  2235  	AccountId string `json:"accountId,omitempty"`
  2236  	// CreateAccountTime: Optional. Creation time for this account associated with
  2237  	// this user. Leave blank for non logged-in actions, guest checkout, or when
  2238  	// there is no account associated with the current user.
  2239  	CreateAccountTime string `json:"createAccountTime,omitempty"`
  2240  	// UserIds: Optional. Identifiers associated with this user or request.
  2241  	UserIds []*GoogleCloudRecaptchaenterpriseV1UserId `json:"userIds,omitempty"`
  2242  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  2243  	// unconditionally include in API requests. By default, fields with empty or
  2244  	// default values are omitted from API requests. See
  2245  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2246  	// details.
  2247  	ForceSendFields []string `json:"-"`
  2248  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  2249  	// requests with the JSON null value. By default, fields with empty values are
  2250  	// omitted from API requests. See
  2251  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2252  	NullFields []string `json:"-"`
  2253  }
  2254  
  2255  func (s *GoogleCloudRecaptchaenterpriseV1UserInfo) MarshalJSON() ([]byte, error) {
  2256  	type NoMethod GoogleCloudRecaptchaenterpriseV1UserInfo
  2257  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2258  }
  2259  
  2260  // GoogleCloudRecaptchaenterpriseV1WafSettings: Settings specific to keys that
  2261  // can be used for WAF (Web Application Firewall).
  2262  type GoogleCloudRecaptchaenterpriseV1WafSettings struct {
  2263  	// WafFeature: Required. The WAF feature for which this key is enabled.
  2264  	//
  2265  	// Possible values:
  2266  	//   "WAF_FEATURE_UNSPECIFIED" - Undefined feature.
  2267  	//   "CHALLENGE_PAGE" - Redirects suspicious traffic to reCAPTCHA.
  2268  	//   "SESSION_TOKEN" - Use reCAPTCHA session-tokens to protect the whole user
  2269  	// session on the site's domain.
  2270  	//   "ACTION_TOKEN" - Use reCAPTCHA action-tokens to protect user actions.
  2271  	//   "EXPRESS" - Use reCAPTCHA WAF express protection to protect any content
  2272  	// other than web pages, like APIs and IoT devices.
  2273  	WafFeature string `json:"wafFeature,omitempty"`
  2274  	// WafService: Required. The WAF service that uses this key.
  2275  	//
  2276  	// Possible values:
  2277  	//   "WAF_SERVICE_UNSPECIFIED" - Undefined WAF
  2278  	//   "CA" - Cloud Armor
  2279  	//   "FASTLY" - Fastly
  2280  	//   "CLOUDFLARE" - Cloudflare
  2281  	WafService string `json:"wafService,omitempty"`
  2282  	// ForceSendFields is a list of field names (e.g. "WafFeature") to
  2283  	// unconditionally include in API requests. By default, fields with empty or
  2284  	// default values are omitted from API requests. See
  2285  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2286  	// details.
  2287  	ForceSendFields []string `json:"-"`
  2288  	// NullFields is a list of field names (e.g. "WafFeature") to include in API
  2289  	// requests with the JSON null value. By default, fields with empty values are
  2290  	// omitted from API requests. See
  2291  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2292  	NullFields []string `json:"-"`
  2293  }
  2294  
  2295  func (s *GoogleCloudRecaptchaenterpriseV1WafSettings) MarshalJSON() ([]byte, error) {
  2296  	type NoMethod GoogleCloudRecaptchaenterpriseV1WafSettings
  2297  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2298  }
  2299  
  2300  // GoogleCloudRecaptchaenterpriseV1WebKeySettings: Settings specific to keys
  2301  // that can be used by websites.
  2302  type GoogleCloudRecaptchaenterpriseV1WebKeySettings struct {
  2303  	// AllowAllDomains: Optional. If set to true, it means allowed_domains will not
  2304  	// be enforced.
  2305  	AllowAllDomains bool `json:"allowAllDomains,omitempty"`
  2306  	// AllowAmpTraffic: Optional. If set to true, the key can be used on AMP
  2307  	// (Accelerated Mobile Pages) websites. This is supported only for the SCORE
  2308  	// integration type.
  2309  	AllowAmpTraffic bool `json:"allowAmpTraffic,omitempty"`
  2310  	// AllowedDomains: Optional. Domains or subdomains of websites allowed to use
  2311  	// the key. All subdomains of an allowed domain are automatically allowed. A
  2312  	// valid domain requires a host and must not include any path, port, query or
  2313  	// fragment. Examples: 'example.com' or 'subdomain.example.com'
  2314  	AllowedDomains []string `json:"allowedDomains,omitempty"`
  2315  	// ChallengeSecurityPreference: Optional. Settings for the frequency and
  2316  	// difficulty at which this key triggers captcha challenges. This should only
  2317  	// be specified for IntegrationTypes CHECKBOX and INVISIBLE.
  2318  	//
  2319  	// Possible values:
  2320  	//   "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED" - Default type that indicates
  2321  	// this enum hasn't been specified.
  2322  	//   "USABILITY" - Key tends to show fewer and easier challenges.
  2323  	//   "BALANCE" - Key tends to show balanced (in amount and difficulty)
  2324  	// challenges.
  2325  	//   "SECURITY" - Key tends to show more and harder challenges.
  2326  	ChallengeSecurityPreference string `json:"challengeSecurityPreference,omitempty"`
  2327  	// IntegrationType: Required. Describes how this key is integrated with the
  2328  	// website.
  2329  	//
  2330  	// Possible values:
  2331  	//   "INTEGRATION_TYPE_UNSPECIFIED" - Default type that indicates this enum
  2332  	// hasn't been specified. This is not a valid IntegrationType, one of the other
  2333  	// types must be specified instead.
  2334  	//   "SCORE" - Only used to produce scores. It doesn't display the "I'm not a
  2335  	// robot" checkbox and never shows captcha challenges.
  2336  	//   "CHECKBOX" - Displays the "I'm not a robot" checkbox and may show captcha
  2337  	// challenges after it is checked.
  2338  	//   "INVISIBLE" - Doesn't display the "I'm not a robot" checkbox, but may show
  2339  	// captcha challenges after risk analysis.
  2340  	IntegrationType string `json:"integrationType,omitempty"`
  2341  	// ForceSendFields is a list of field names (e.g. "AllowAllDomains") to
  2342  	// unconditionally include in API requests. By default, fields with empty or
  2343  	// default values are omitted from API requests. See
  2344  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2345  	// details.
  2346  	ForceSendFields []string `json:"-"`
  2347  	// NullFields is a list of field names (e.g. "AllowAllDomains") to include in
  2348  	// API requests with the JSON null value. By default, fields with empty values
  2349  	// are omitted from API requests. See
  2350  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2351  	NullFields []string `json:"-"`
  2352  }
  2353  
  2354  func (s *GoogleCloudRecaptchaenterpriseV1WebKeySettings) MarshalJSON() ([]byte, error) {
  2355  	type NoMethod GoogleCloudRecaptchaenterpriseV1WebKeySettings
  2356  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2357  }
  2358  
  2359  // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
  2360  // defining duplicated empty messages in your APIs. A typical example is to use
  2361  // it as the request or the response type of an API method. For instance:
  2362  // service Foo { rpc Bar(google.protobuf.Empty) returns
  2363  // (google.protobuf.Empty); }
  2364  type GoogleProtobufEmpty struct {
  2365  	// ServerResponse contains the HTTP response code and headers from the server.
  2366  	googleapi.ServerResponse `json:"-"`
  2367  }
  2368  
  2369  // GoogleRpcStatus: The `Status` type defines a logical error model that is
  2370  // suitable for different programming environments, including REST APIs and RPC
  2371  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  2372  // contains three pieces of data: error code, error message, and error details.
  2373  // You can find out more about this error model and how to work with it in the
  2374  // API Design Guide (https://cloud.google.com/apis/design/errors).
  2375  type GoogleRpcStatus struct {
  2376  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2377  	Code int64 `json:"code,omitempty"`
  2378  	// Details: A list of messages that carry the error details. There is a common
  2379  	// set of message types for APIs to use.
  2380  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2381  	// Message: A developer-facing error message, which should be in English. Any
  2382  	// user-facing error message should be localized and sent in the
  2383  	// google.rpc.Status.details field, or localized by the client.
  2384  	Message string `json:"message,omitempty"`
  2385  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2386  	// include in API requests. By default, fields with empty or default values are
  2387  	// omitted from API requests. See
  2388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2389  	// details.
  2390  	ForceSendFields []string `json:"-"`
  2391  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2392  	// with the JSON null value. By default, fields with empty values are omitted
  2393  	// from API requests. See
  2394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2395  	NullFields []string `json:"-"`
  2396  }
  2397  
  2398  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
  2399  	type NoMethod GoogleRpcStatus
  2400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2401  }
  2402  
  2403  type ProjectsAssessmentsAnnotateCall struct {
  2404  	s                                                         *Service
  2405  	name                                                      string
  2406  	googlecloudrecaptchaenterprisev1annotateassessmentrequest *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest
  2407  	urlParams_                                                gensupport.URLParams
  2408  	ctx_                                                      context.Context
  2409  	header_                                                   http.Header
  2410  }
  2411  
  2412  // Annotate: Annotates a previously created Assessment to provide additional
  2413  // information on whether the event turned out to be authentic or fraudulent.
  2414  //
  2415  //   - name: The resource name of the Assessment, in the format
  2416  //     `projects/{project}/assessments/{assessment}`.
  2417  func (r *ProjectsAssessmentsService) Annotate(name string, googlecloudrecaptchaenterprisev1annotateassessmentrequest *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest) *ProjectsAssessmentsAnnotateCall {
  2418  	c := &ProjectsAssessmentsAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2419  	c.name = name
  2420  	c.googlecloudrecaptchaenterprisev1annotateassessmentrequest = googlecloudrecaptchaenterprisev1annotateassessmentrequest
  2421  	return c
  2422  }
  2423  
  2424  // Fields allows partial responses to be retrieved. See
  2425  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2426  // details.
  2427  func (c *ProjectsAssessmentsAnnotateCall) Fields(s ...googleapi.Field) *ProjectsAssessmentsAnnotateCall {
  2428  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2429  	return c
  2430  }
  2431  
  2432  // Context sets the context to be used in this call's Do method.
  2433  func (c *ProjectsAssessmentsAnnotateCall) Context(ctx context.Context) *ProjectsAssessmentsAnnotateCall {
  2434  	c.ctx_ = ctx
  2435  	return c
  2436  }
  2437  
  2438  // Header returns a http.Header that can be modified by the caller to add
  2439  // headers to the request.
  2440  func (c *ProjectsAssessmentsAnnotateCall) Header() http.Header {
  2441  	if c.header_ == nil {
  2442  		c.header_ = make(http.Header)
  2443  	}
  2444  	return c.header_
  2445  }
  2446  
  2447  func (c *ProjectsAssessmentsAnnotateCall) doRequest(alt string) (*http.Response, error) {
  2448  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2449  	var body io.Reader = nil
  2450  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1annotateassessmentrequest)
  2451  	if err != nil {
  2452  		return nil, err
  2453  	}
  2454  	c.urlParams_.Set("alt", alt)
  2455  	c.urlParams_.Set("prettyPrint", "false")
  2456  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:annotate")
  2457  	urls += "?" + c.urlParams_.Encode()
  2458  	req, err := http.NewRequest("POST", urls, body)
  2459  	if err != nil {
  2460  		return nil, err
  2461  	}
  2462  	req.Header = reqHeaders
  2463  	googleapi.Expand(req.URL, map[string]string{
  2464  		"name": c.name,
  2465  	})
  2466  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2467  }
  2468  
  2469  // Do executes the "recaptchaenterprise.projects.assessments.annotate" call.
  2470  // Any non-2xx status code is an error. Response headers are in either
  2471  // *GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse.ServerResponse.He
  2472  // ader or (if a response was returned at all) in
  2473  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2474  // whether the returned error was because http.StatusNotModified was returned.
  2475  func (c *ProjectsAssessmentsAnnotateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse, error) {
  2476  	gensupport.SetOptions(c.urlParams_, opts...)
  2477  	res, err := c.doRequest("json")
  2478  	if res != nil && res.StatusCode == http.StatusNotModified {
  2479  		if res.Body != nil {
  2480  			res.Body.Close()
  2481  		}
  2482  		return nil, gensupport.WrapError(&googleapi.Error{
  2483  			Code:   res.StatusCode,
  2484  			Header: res.Header,
  2485  		})
  2486  	}
  2487  	if err != nil {
  2488  		return nil, err
  2489  	}
  2490  	defer googleapi.CloseBody(res)
  2491  	if err := googleapi.CheckResponse(res); err != nil {
  2492  		return nil, gensupport.WrapError(err)
  2493  	}
  2494  	ret := &GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse{
  2495  		ServerResponse: googleapi.ServerResponse{
  2496  			Header:         res.Header,
  2497  			HTTPStatusCode: res.StatusCode,
  2498  		},
  2499  	}
  2500  	target := &ret
  2501  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2502  		return nil, err
  2503  	}
  2504  	return ret, nil
  2505  }
  2506  
  2507  type ProjectsAssessmentsCreateCall struct {
  2508  	s                                          *Service
  2509  	parent                                     string
  2510  	googlecloudrecaptchaenterprisev1assessment *GoogleCloudRecaptchaenterpriseV1Assessment
  2511  	urlParams_                                 gensupport.URLParams
  2512  	ctx_                                       context.Context
  2513  	header_                                    http.Header
  2514  }
  2515  
  2516  // Create: Creates an Assessment of the likelihood an event is legitimate.
  2517  //
  2518  //   - parent: The name of the project in which the assessment will be created,
  2519  //     in the format `projects/{project}`.
  2520  func (r *ProjectsAssessmentsService) Create(parent string, googlecloudrecaptchaenterprisev1assessment *GoogleCloudRecaptchaenterpriseV1Assessment) *ProjectsAssessmentsCreateCall {
  2521  	c := &ProjectsAssessmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2522  	c.parent = parent
  2523  	c.googlecloudrecaptchaenterprisev1assessment = googlecloudrecaptchaenterprisev1assessment
  2524  	return c
  2525  }
  2526  
  2527  // Fields allows partial responses to be retrieved. See
  2528  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2529  // details.
  2530  func (c *ProjectsAssessmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsAssessmentsCreateCall {
  2531  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2532  	return c
  2533  }
  2534  
  2535  // Context sets the context to be used in this call's Do method.
  2536  func (c *ProjectsAssessmentsCreateCall) Context(ctx context.Context) *ProjectsAssessmentsCreateCall {
  2537  	c.ctx_ = ctx
  2538  	return c
  2539  }
  2540  
  2541  // Header returns a http.Header that can be modified by the caller to add
  2542  // headers to the request.
  2543  func (c *ProjectsAssessmentsCreateCall) Header() http.Header {
  2544  	if c.header_ == nil {
  2545  		c.header_ = make(http.Header)
  2546  	}
  2547  	return c.header_
  2548  }
  2549  
  2550  func (c *ProjectsAssessmentsCreateCall) doRequest(alt string) (*http.Response, error) {
  2551  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2552  	var body io.Reader = nil
  2553  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1assessment)
  2554  	if err != nil {
  2555  		return nil, err
  2556  	}
  2557  	c.urlParams_.Set("alt", alt)
  2558  	c.urlParams_.Set("prettyPrint", "false")
  2559  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/assessments")
  2560  	urls += "?" + c.urlParams_.Encode()
  2561  	req, err := http.NewRequest("POST", urls, body)
  2562  	if err != nil {
  2563  		return nil, err
  2564  	}
  2565  	req.Header = reqHeaders
  2566  	googleapi.Expand(req.URL, map[string]string{
  2567  		"parent": c.parent,
  2568  	})
  2569  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2570  }
  2571  
  2572  // Do executes the "recaptchaenterprise.projects.assessments.create" call.
  2573  // Any non-2xx status code is an error. Response headers are in either
  2574  // *GoogleCloudRecaptchaenterpriseV1Assessment.ServerResponse.Header or (if a
  2575  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2576  // googleapi.IsNotModified to check whether the returned error was because
  2577  // http.StatusNotModified was returned.
  2578  func (c *ProjectsAssessmentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Assessment, error) {
  2579  	gensupport.SetOptions(c.urlParams_, opts...)
  2580  	res, err := c.doRequest("json")
  2581  	if res != nil && res.StatusCode == http.StatusNotModified {
  2582  		if res.Body != nil {
  2583  			res.Body.Close()
  2584  		}
  2585  		return nil, gensupport.WrapError(&googleapi.Error{
  2586  			Code:   res.StatusCode,
  2587  			Header: res.Header,
  2588  		})
  2589  	}
  2590  	if err != nil {
  2591  		return nil, err
  2592  	}
  2593  	defer googleapi.CloseBody(res)
  2594  	if err := googleapi.CheckResponse(res); err != nil {
  2595  		return nil, gensupport.WrapError(err)
  2596  	}
  2597  	ret := &GoogleCloudRecaptchaenterpriseV1Assessment{
  2598  		ServerResponse: googleapi.ServerResponse{
  2599  			Header:         res.Header,
  2600  			HTTPStatusCode: res.StatusCode,
  2601  		},
  2602  	}
  2603  	target := &ret
  2604  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2605  		return nil, err
  2606  	}
  2607  	return ret, nil
  2608  }
  2609  
  2610  type ProjectsFirewallpoliciesCreateCall struct {
  2611  	s                                              *Service
  2612  	parent                                         string
  2613  	googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy
  2614  	urlParams_                                     gensupport.URLParams
  2615  	ctx_                                           context.Context
  2616  	header_                                        http.Header
  2617  }
  2618  
  2619  // Create: Creates a new FirewallPolicy, specifying conditions at which
  2620  // reCAPTCHA Enterprise actions can be executed. A project may have a maximum
  2621  // of 1000 policies.
  2622  //
  2623  //   - parent: The name of the project this policy will apply to, in the format
  2624  //     `projects/{project}`.
  2625  func (r *ProjectsFirewallpoliciesService) Create(parent string, googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) *ProjectsFirewallpoliciesCreateCall {
  2626  	c := &ProjectsFirewallpoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2627  	c.parent = parent
  2628  	c.googlecloudrecaptchaenterprisev1firewallpolicy = googlecloudrecaptchaenterprisev1firewallpolicy
  2629  	return c
  2630  }
  2631  
  2632  // Fields allows partial responses to be retrieved. See
  2633  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2634  // details.
  2635  func (c *ProjectsFirewallpoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesCreateCall {
  2636  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2637  	return c
  2638  }
  2639  
  2640  // Context sets the context to be used in this call's Do method.
  2641  func (c *ProjectsFirewallpoliciesCreateCall) Context(ctx context.Context) *ProjectsFirewallpoliciesCreateCall {
  2642  	c.ctx_ = ctx
  2643  	return c
  2644  }
  2645  
  2646  // Header returns a http.Header that can be modified by the caller to add
  2647  // headers to the request.
  2648  func (c *ProjectsFirewallpoliciesCreateCall) Header() http.Header {
  2649  	if c.header_ == nil {
  2650  		c.header_ = make(http.Header)
  2651  	}
  2652  	return c.header_
  2653  }
  2654  
  2655  func (c *ProjectsFirewallpoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  2656  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2657  	var body io.Reader = nil
  2658  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1firewallpolicy)
  2659  	if err != nil {
  2660  		return nil, err
  2661  	}
  2662  	c.urlParams_.Set("alt", alt)
  2663  	c.urlParams_.Set("prettyPrint", "false")
  2664  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/firewallpolicies")
  2665  	urls += "?" + c.urlParams_.Encode()
  2666  	req, err := http.NewRequest("POST", urls, body)
  2667  	if err != nil {
  2668  		return nil, err
  2669  	}
  2670  	req.Header = reqHeaders
  2671  	googleapi.Expand(req.URL, map[string]string{
  2672  		"parent": c.parent,
  2673  	})
  2674  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2675  }
  2676  
  2677  // Do executes the "recaptchaenterprise.projects.firewallpolicies.create" call.
  2678  // Any non-2xx status code is an error. Response headers are in either
  2679  // *GoogleCloudRecaptchaenterpriseV1FirewallPolicy.ServerResponse.Header or (if
  2680  // a response was returned at all) in error.(*googleapi.Error).Header. Use
  2681  // googleapi.IsNotModified to check whether the returned error was because
  2682  // http.StatusNotModified was returned.
  2683  func (c *ProjectsFirewallpoliciesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1FirewallPolicy, error) {
  2684  	gensupport.SetOptions(c.urlParams_, opts...)
  2685  	res, err := c.doRequest("json")
  2686  	if res != nil && res.StatusCode == http.StatusNotModified {
  2687  		if res.Body != nil {
  2688  			res.Body.Close()
  2689  		}
  2690  		return nil, gensupport.WrapError(&googleapi.Error{
  2691  			Code:   res.StatusCode,
  2692  			Header: res.Header,
  2693  		})
  2694  	}
  2695  	if err != nil {
  2696  		return nil, err
  2697  	}
  2698  	defer googleapi.CloseBody(res)
  2699  	if err := googleapi.CheckResponse(res); err != nil {
  2700  		return nil, gensupport.WrapError(err)
  2701  	}
  2702  	ret := &GoogleCloudRecaptchaenterpriseV1FirewallPolicy{
  2703  		ServerResponse: googleapi.ServerResponse{
  2704  			Header:         res.Header,
  2705  			HTTPStatusCode: res.StatusCode,
  2706  		},
  2707  	}
  2708  	target := &ret
  2709  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2710  		return nil, err
  2711  	}
  2712  	return ret, nil
  2713  }
  2714  
  2715  type ProjectsFirewallpoliciesDeleteCall struct {
  2716  	s          *Service
  2717  	name       string
  2718  	urlParams_ gensupport.URLParams
  2719  	ctx_       context.Context
  2720  	header_    http.Header
  2721  }
  2722  
  2723  // Delete: Deletes the specified firewall policy.
  2724  //
  2725  //   - name: The name of the policy to be deleted, in the format
  2726  //     `projects/{project}/firewallpolicies/{firewallpolicy}`.
  2727  func (r *ProjectsFirewallpoliciesService) Delete(name string) *ProjectsFirewallpoliciesDeleteCall {
  2728  	c := &ProjectsFirewallpoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2729  	c.name = name
  2730  	return c
  2731  }
  2732  
  2733  // Fields allows partial responses to be retrieved. See
  2734  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2735  // details.
  2736  func (c *ProjectsFirewallpoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesDeleteCall {
  2737  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2738  	return c
  2739  }
  2740  
  2741  // Context sets the context to be used in this call's Do method.
  2742  func (c *ProjectsFirewallpoliciesDeleteCall) Context(ctx context.Context) *ProjectsFirewallpoliciesDeleteCall {
  2743  	c.ctx_ = ctx
  2744  	return c
  2745  }
  2746  
  2747  // Header returns a http.Header that can be modified by the caller to add
  2748  // headers to the request.
  2749  func (c *ProjectsFirewallpoliciesDeleteCall) Header() http.Header {
  2750  	if c.header_ == nil {
  2751  		c.header_ = make(http.Header)
  2752  	}
  2753  	return c.header_
  2754  }
  2755  
  2756  func (c *ProjectsFirewallpoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2757  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2758  	var body io.Reader = nil
  2759  	c.urlParams_.Set("alt", alt)
  2760  	c.urlParams_.Set("prettyPrint", "false")
  2761  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2762  	urls += "?" + c.urlParams_.Encode()
  2763  	req, err := http.NewRequest("DELETE", urls, body)
  2764  	if err != nil {
  2765  		return nil, err
  2766  	}
  2767  	req.Header = reqHeaders
  2768  	googleapi.Expand(req.URL, map[string]string{
  2769  		"name": c.name,
  2770  	})
  2771  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2772  }
  2773  
  2774  // Do executes the "recaptchaenterprise.projects.firewallpolicies.delete" call.
  2775  // Any non-2xx status code is an error. Response headers are in either
  2776  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  2777  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2778  // check whether the returned error was because http.StatusNotModified was
  2779  // returned.
  2780  func (c *ProjectsFirewallpoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  2781  	gensupport.SetOptions(c.urlParams_, opts...)
  2782  	res, err := c.doRequest("json")
  2783  	if res != nil && res.StatusCode == http.StatusNotModified {
  2784  		if res.Body != nil {
  2785  			res.Body.Close()
  2786  		}
  2787  		return nil, gensupport.WrapError(&googleapi.Error{
  2788  			Code:   res.StatusCode,
  2789  			Header: res.Header,
  2790  		})
  2791  	}
  2792  	if err != nil {
  2793  		return nil, err
  2794  	}
  2795  	defer googleapi.CloseBody(res)
  2796  	if err := googleapi.CheckResponse(res); err != nil {
  2797  		return nil, gensupport.WrapError(err)
  2798  	}
  2799  	ret := &GoogleProtobufEmpty{
  2800  		ServerResponse: googleapi.ServerResponse{
  2801  			Header:         res.Header,
  2802  			HTTPStatusCode: res.StatusCode,
  2803  		},
  2804  	}
  2805  	target := &ret
  2806  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2807  		return nil, err
  2808  	}
  2809  	return ret, nil
  2810  }
  2811  
  2812  type ProjectsFirewallpoliciesGetCall struct {
  2813  	s            *Service
  2814  	name         string
  2815  	urlParams_   gensupport.URLParams
  2816  	ifNoneMatch_ string
  2817  	ctx_         context.Context
  2818  	header_      http.Header
  2819  }
  2820  
  2821  // Get: Returns the specified firewall policy.
  2822  //
  2823  //   - name: The name of the requested policy, in the format
  2824  //     `projects/{project}/firewallpolicies/{firewallpolicy}`.
  2825  func (r *ProjectsFirewallpoliciesService) Get(name string) *ProjectsFirewallpoliciesGetCall {
  2826  	c := &ProjectsFirewallpoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2827  	c.name = name
  2828  	return c
  2829  }
  2830  
  2831  // Fields allows partial responses to be retrieved. See
  2832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2833  // details.
  2834  func (c *ProjectsFirewallpoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesGetCall {
  2835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2836  	return c
  2837  }
  2838  
  2839  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2840  // object's ETag matches the given value. This is useful for getting updates
  2841  // only after the object has changed since the last request.
  2842  func (c *ProjectsFirewallpoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsFirewallpoliciesGetCall {
  2843  	c.ifNoneMatch_ = entityTag
  2844  	return c
  2845  }
  2846  
  2847  // Context sets the context to be used in this call's Do method.
  2848  func (c *ProjectsFirewallpoliciesGetCall) Context(ctx context.Context) *ProjectsFirewallpoliciesGetCall {
  2849  	c.ctx_ = ctx
  2850  	return c
  2851  }
  2852  
  2853  // Header returns a http.Header that can be modified by the caller to add
  2854  // headers to the request.
  2855  func (c *ProjectsFirewallpoliciesGetCall) Header() http.Header {
  2856  	if c.header_ == nil {
  2857  		c.header_ = make(http.Header)
  2858  	}
  2859  	return c.header_
  2860  }
  2861  
  2862  func (c *ProjectsFirewallpoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  2863  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2864  	if c.ifNoneMatch_ != "" {
  2865  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2866  	}
  2867  	var body io.Reader = nil
  2868  	c.urlParams_.Set("alt", alt)
  2869  	c.urlParams_.Set("prettyPrint", "false")
  2870  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2871  	urls += "?" + c.urlParams_.Encode()
  2872  	req, err := http.NewRequest("GET", urls, body)
  2873  	if err != nil {
  2874  		return nil, err
  2875  	}
  2876  	req.Header = reqHeaders
  2877  	googleapi.Expand(req.URL, map[string]string{
  2878  		"name": c.name,
  2879  	})
  2880  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2881  }
  2882  
  2883  // Do executes the "recaptchaenterprise.projects.firewallpolicies.get" call.
  2884  // Any non-2xx status code is an error. Response headers are in either
  2885  // *GoogleCloudRecaptchaenterpriseV1FirewallPolicy.ServerResponse.Header or (if
  2886  // a response was returned at all) in error.(*googleapi.Error).Header. Use
  2887  // googleapi.IsNotModified to check whether the returned error was because
  2888  // http.StatusNotModified was returned.
  2889  func (c *ProjectsFirewallpoliciesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1FirewallPolicy, error) {
  2890  	gensupport.SetOptions(c.urlParams_, opts...)
  2891  	res, err := c.doRequest("json")
  2892  	if res != nil && res.StatusCode == http.StatusNotModified {
  2893  		if res.Body != nil {
  2894  			res.Body.Close()
  2895  		}
  2896  		return nil, gensupport.WrapError(&googleapi.Error{
  2897  			Code:   res.StatusCode,
  2898  			Header: res.Header,
  2899  		})
  2900  	}
  2901  	if err != nil {
  2902  		return nil, err
  2903  	}
  2904  	defer googleapi.CloseBody(res)
  2905  	if err := googleapi.CheckResponse(res); err != nil {
  2906  		return nil, gensupport.WrapError(err)
  2907  	}
  2908  	ret := &GoogleCloudRecaptchaenterpriseV1FirewallPolicy{
  2909  		ServerResponse: googleapi.ServerResponse{
  2910  			Header:         res.Header,
  2911  			HTTPStatusCode: res.StatusCode,
  2912  		},
  2913  	}
  2914  	target := &ret
  2915  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2916  		return nil, err
  2917  	}
  2918  	return ret, nil
  2919  }
  2920  
  2921  type ProjectsFirewallpoliciesListCall struct {
  2922  	s            *Service
  2923  	parent       string
  2924  	urlParams_   gensupport.URLParams
  2925  	ifNoneMatch_ string
  2926  	ctx_         context.Context
  2927  	header_      http.Header
  2928  }
  2929  
  2930  // List: Returns the list of all firewall policies that belong to a project.
  2931  //
  2932  //   - parent: The name of the project to list the policies for, in the format
  2933  //     `projects/{project}`.
  2934  func (r *ProjectsFirewallpoliciesService) List(parent string) *ProjectsFirewallpoliciesListCall {
  2935  	c := &ProjectsFirewallpoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2936  	c.parent = parent
  2937  	return c
  2938  }
  2939  
  2940  // PageSize sets the optional parameter "pageSize": The maximum number of
  2941  // policies to return. Default is 10. Max limit is 1000.
  2942  func (c *ProjectsFirewallpoliciesListCall) PageSize(pageSize int64) *ProjectsFirewallpoliciesListCall {
  2943  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2944  	return c
  2945  }
  2946  
  2947  // PageToken sets the optional parameter "pageToken": The next_page_token value
  2948  // returned from a previous. ListFirewallPoliciesRequest, if any.
  2949  func (c *ProjectsFirewallpoliciesListCall) PageToken(pageToken string) *ProjectsFirewallpoliciesListCall {
  2950  	c.urlParams_.Set("pageToken", pageToken)
  2951  	return c
  2952  }
  2953  
  2954  // Fields allows partial responses to be retrieved. See
  2955  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2956  // details.
  2957  func (c *ProjectsFirewallpoliciesListCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesListCall {
  2958  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2959  	return c
  2960  }
  2961  
  2962  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2963  // object's ETag matches the given value. This is useful for getting updates
  2964  // only after the object has changed since the last request.
  2965  func (c *ProjectsFirewallpoliciesListCall) IfNoneMatch(entityTag string) *ProjectsFirewallpoliciesListCall {
  2966  	c.ifNoneMatch_ = entityTag
  2967  	return c
  2968  }
  2969  
  2970  // Context sets the context to be used in this call's Do method.
  2971  func (c *ProjectsFirewallpoliciesListCall) Context(ctx context.Context) *ProjectsFirewallpoliciesListCall {
  2972  	c.ctx_ = ctx
  2973  	return c
  2974  }
  2975  
  2976  // Header returns a http.Header that can be modified by the caller to add
  2977  // headers to the request.
  2978  func (c *ProjectsFirewallpoliciesListCall) Header() http.Header {
  2979  	if c.header_ == nil {
  2980  		c.header_ = make(http.Header)
  2981  	}
  2982  	return c.header_
  2983  }
  2984  
  2985  func (c *ProjectsFirewallpoliciesListCall) doRequest(alt string) (*http.Response, error) {
  2986  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2987  	if c.ifNoneMatch_ != "" {
  2988  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2989  	}
  2990  	var body io.Reader = nil
  2991  	c.urlParams_.Set("alt", alt)
  2992  	c.urlParams_.Set("prettyPrint", "false")
  2993  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/firewallpolicies")
  2994  	urls += "?" + c.urlParams_.Encode()
  2995  	req, err := http.NewRequest("GET", urls, body)
  2996  	if err != nil {
  2997  		return nil, err
  2998  	}
  2999  	req.Header = reqHeaders
  3000  	googleapi.Expand(req.URL, map[string]string{
  3001  		"parent": c.parent,
  3002  	})
  3003  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3004  }
  3005  
  3006  // Do executes the "recaptchaenterprise.projects.firewallpolicies.list" call.
  3007  // Any non-2xx status code is an error. Response headers are in either
  3008  // *GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse.ServerResponse.
  3009  // Header or (if a response was returned at all) in
  3010  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3011  // whether the returned error was because http.StatusNotModified was returned.
  3012  func (c *ProjectsFirewallpoliciesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse, error) {
  3013  	gensupport.SetOptions(c.urlParams_, opts...)
  3014  	res, err := c.doRequest("json")
  3015  	if res != nil && res.StatusCode == http.StatusNotModified {
  3016  		if res.Body != nil {
  3017  			res.Body.Close()
  3018  		}
  3019  		return nil, gensupport.WrapError(&googleapi.Error{
  3020  			Code:   res.StatusCode,
  3021  			Header: res.Header,
  3022  		})
  3023  	}
  3024  	if err != nil {
  3025  		return nil, err
  3026  	}
  3027  	defer googleapi.CloseBody(res)
  3028  	if err := googleapi.CheckResponse(res); err != nil {
  3029  		return nil, gensupport.WrapError(err)
  3030  	}
  3031  	ret := &GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse{
  3032  		ServerResponse: googleapi.ServerResponse{
  3033  			Header:         res.Header,
  3034  			HTTPStatusCode: res.StatusCode,
  3035  		},
  3036  	}
  3037  	target := &ret
  3038  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3039  		return nil, err
  3040  	}
  3041  	return ret, nil
  3042  }
  3043  
  3044  // Pages invokes f for each page of results.
  3045  // A non-nil error returned from f will halt the iteration.
  3046  // The provided context supersedes any context provided to the Context method.
  3047  func (c *ProjectsFirewallpoliciesListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse) error) error {
  3048  	c.ctx_ = ctx
  3049  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3050  	for {
  3051  		x, err := c.Do()
  3052  		if err != nil {
  3053  			return err
  3054  		}
  3055  		if err := f(x); err != nil {
  3056  			return err
  3057  		}
  3058  		if x.NextPageToken == "" {
  3059  			return nil
  3060  		}
  3061  		c.PageToken(x.NextPageToken)
  3062  	}
  3063  }
  3064  
  3065  type ProjectsFirewallpoliciesPatchCall struct {
  3066  	s                                              *Service
  3067  	name                                           string
  3068  	googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy
  3069  	urlParams_                                     gensupport.URLParams
  3070  	ctx_                                           context.Context
  3071  	header_                                        http.Header
  3072  }
  3073  
  3074  // Patch: Updates the specified firewall policy.
  3075  //
  3076  //   - name: Identifier. The resource name for the FirewallPolicy in the format
  3077  //     `projects/{project}/firewallpolicies/{firewallpolicy}`.
  3078  func (r *ProjectsFirewallpoliciesService) Patch(name string, googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) *ProjectsFirewallpoliciesPatchCall {
  3079  	c := &ProjectsFirewallpoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3080  	c.name = name
  3081  	c.googlecloudrecaptchaenterprisev1firewallpolicy = googlecloudrecaptchaenterprisev1firewallpolicy
  3082  	return c
  3083  }
  3084  
  3085  // UpdateMask sets the optional parameter "updateMask": The mask to control
  3086  // which fields of the policy get updated. If the mask is not present, all
  3087  // fields will be updated.
  3088  func (c *ProjectsFirewallpoliciesPatchCall) UpdateMask(updateMask string) *ProjectsFirewallpoliciesPatchCall {
  3089  	c.urlParams_.Set("updateMask", updateMask)
  3090  	return c
  3091  }
  3092  
  3093  // Fields allows partial responses to be retrieved. See
  3094  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3095  // details.
  3096  func (c *ProjectsFirewallpoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesPatchCall {
  3097  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3098  	return c
  3099  }
  3100  
  3101  // Context sets the context to be used in this call's Do method.
  3102  func (c *ProjectsFirewallpoliciesPatchCall) Context(ctx context.Context) *ProjectsFirewallpoliciesPatchCall {
  3103  	c.ctx_ = ctx
  3104  	return c
  3105  }
  3106  
  3107  // Header returns a http.Header that can be modified by the caller to add
  3108  // headers to the request.
  3109  func (c *ProjectsFirewallpoliciesPatchCall) Header() http.Header {
  3110  	if c.header_ == nil {
  3111  		c.header_ = make(http.Header)
  3112  	}
  3113  	return c.header_
  3114  }
  3115  
  3116  func (c *ProjectsFirewallpoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  3117  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3118  	var body io.Reader = nil
  3119  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1firewallpolicy)
  3120  	if err != nil {
  3121  		return nil, err
  3122  	}
  3123  	c.urlParams_.Set("alt", alt)
  3124  	c.urlParams_.Set("prettyPrint", "false")
  3125  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3126  	urls += "?" + c.urlParams_.Encode()
  3127  	req, err := http.NewRequest("PATCH", urls, body)
  3128  	if err != nil {
  3129  		return nil, err
  3130  	}
  3131  	req.Header = reqHeaders
  3132  	googleapi.Expand(req.URL, map[string]string{
  3133  		"name": c.name,
  3134  	})
  3135  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3136  }
  3137  
  3138  // Do executes the "recaptchaenterprise.projects.firewallpolicies.patch" call.
  3139  // Any non-2xx status code is an error. Response headers are in either
  3140  // *GoogleCloudRecaptchaenterpriseV1FirewallPolicy.ServerResponse.Header or (if
  3141  // a response was returned at all) in error.(*googleapi.Error).Header. Use
  3142  // googleapi.IsNotModified to check whether the returned error was because
  3143  // http.StatusNotModified was returned.
  3144  func (c *ProjectsFirewallpoliciesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1FirewallPolicy, error) {
  3145  	gensupport.SetOptions(c.urlParams_, opts...)
  3146  	res, err := c.doRequest("json")
  3147  	if res != nil && res.StatusCode == http.StatusNotModified {
  3148  		if res.Body != nil {
  3149  			res.Body.Close()
  3150  		}
  3151  		return nil, gensupport.WrapError(&googleapi.Error{
  3152  			Code:   res.StatusCode,
  3153  			Header: res.Header,
  3154  		})
  3155  	}
  3156  	if err != nil {
  3157  		return nil, err
  3158  	}
  3159  	defer googleapi.CloseBody(res)
  3160  	if err := googleapi.CheckResponse(res); err != nil {
  3161  		return nil, gensupport.WrapError(err)
  3162  	}
  3163  	ret := &GoogleCloudRecaptchaenterpriseV1FirewallPolicy{
  3164  		ServerResponse: googleapi.ServerResponse{
  3165  			Header:         res.Header,
  3166  			HTTPStatusCode: res.StatusCode,
  3167  		},
  3168  	}
  3169  	target := &ret
  3170  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3171  		return nil, err
  3172  	}
  3173  	return ret, nil
  3174  }
  3175  
  3176  type ProjectsFirewallpoliciesReorderCall struct {
  3177  	s                                                              *Service
  3178  	parent                                                         string
  3179  	googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest
  3180  	urlParams_                                                     gensupport.URLParams
  3181  	ctx_                                                           context.Context
  3182  	header_                                                        http.Header
  3183  }
  3184  
  3185  // Reorder: Reorders all firewall policies.
  3186  //
  3187  //   - parent: The name of the project to list the policies for, in the format
  3188  //     `projects/{project}`.
  3189  func (r *ProjectsFirewallpoliciesService) Reorder(parent string, googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest) *ProjectsFirewallpoliciesReorderCall {
  3190  	c := &ProjectsFirewallpoliciesReorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3191  	c.parent = parent
  3192  	c.googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest = googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest
  3193  	return c
  3194  }
  3195  
  3196  // Fields allows partial responses to be retrieved. See
  3197  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3198  // details.
  3199  func (c *ProjectsFirewallpoliciesReorderCall) Fields(s ...googleapi.Field) *ProjectsFirewallpoliciesReorderCall {
  3200  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3201  	return c
  3202  }
  3203  
  3204  // Context sets the context to be used in this call's Do method.
  3205  func (c *ProjectsFirewallpoliciesReorderCall) Context(ctx context.Context) *ProjectsFirewallpoliciesReorderCall {
  3206  	c.ctx_ = ctx
  3207  	return c
  3208  }
  3209  
  3210  // Header returns a http.Header that can be modified by the caller to add
  3211  // headers to the request.
  3212  func (c *ProjectsFirewallpoliciesReorderCall) Header() http.Header {
  3213  	if c.header_ == nil {
  3214  		c.header_ = make(http.Header)
  3215  	}
  3216  	return c.header_
  3217  }
  3218  
  3219  func (c *ProjectsFirewallpoliciesReorderCall) doRequest(alt string) (*http.Response, error) {
  3220  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3221  	var body io.Reader = nil
  3222  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1reorderfirewallpoliciesrequest)
  3223  	if err != nil {
  3224  		return nil, err
  3225  	}
  3226  	c.urlParams_.Set("alt", alt)
  3227  	c.urlParams_.Set("prettyPrint", "false")
  3228  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/firewallpolicies:reorder")
  3229  	urls += "?" + c.urlParams_.Encode()
  3230  	req, err := http.NewRequest("POST", urls, body)
  3231  	if err != nil {
  3232  		return nil, err
  3233  	}
  3234  	req.Header = reqHeaders
  3235  	googleapi.Expand(req.URL, map[string]string{
  3236  		"parent": c.parent,
  3237  	})
  3238  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3239  }
  3240  
  3241  // Do executes the "recaptchaenterprise.projects.firewallpolicies.reorder" call.
  3242  // Any non-2xx status code is an error. Response headers are in either
  3243  // *GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse.ServerRespon
  3244  // se.Header or (if a response was returned at all) in
  3245  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3246  // whether the returned error was because http.StatusNotModified was returned.
  3247  func (c *ProjectsFirewallpoliciesReorderCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse, error) {
  3248  	gensupport.SetOptions(c.urlParams_, opts...)
  3249  	res, err := c.doRequest("json")
  3250  	if res != nil && res.StatusCode == http.StatusNotModified {
  3251  		if res.Body != nil {
  3252  			res.Body.Close()
  3253  		}
  3254  		return nil, gensupport.WrapError(&googleapi.Error{
  3255  			Code:   res.StatusCode,
  3256  			Header: res.Header,
  3257  		})
  3258  	}
  3259  	if err != nil {
  3260  		return nil, err
  3261  	}
  3262  	defer googleapi.CloseBody(res)
  3263  	if err := googleapi.CheckResponse(res); err != nil {
  3264  		return nil, gensupport.WrapError(err)
  3265  	}
  3266  	ret := &GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse{
  3267  		ServerResponse: googleapi.ServerResponse{
  3268  			Header:         res.Header,
  3269  			HTTPStatusCode: res.StatusCode,
  3270  		},
  3271  	}
  3272  	target := &ret
  3273  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3274  		return nil, err
  3275  	}
  3276  	return ret, nil
  3277  }
  3278  
  3279  type ProjectsKeysCreateCall struct {
  3280  	s                                   *Service
  3281  	parent                              string
  3282  	googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key
  3283  	urlParams_                          gensupport.URLParams
  3284  	ctx_                                context.Context
  3285  	header_                             http.Header
  3286  }
  3287  
  3288  // Create: Creates a new reCAPTCHA Enterprise key.
  3289  //
  3290  //   - parent: The name of the project in which the key will be created, in the
  3291  //     format `projects/{project}`.
  3292  func (r *ProjectsKeysService) Create(parent string, googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key) *ProjectsKeysCreateCall {
  3293  	c := &ProjectsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3294  	c.parent = parent
  3295  	c.googlecloudrecaptchaenterprisev1key = googlecloudrecaptchaenterprisev1key
  3296  	return c
  3297  }
  3298  
  3299  // Fields allows partial responses to be retrieved. See
  3300  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3301  // details.
  3302  func (c *ProjectsKeysCreateCall) Fields(s ...googleapi.Field) *ProjectsKeysCreateCall {
  3303  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3304  	return c
  3305  }
  3306  
  3307  // Context sets the context to be used in this call's Do method.
  3308  func (c *ProjectsKeysCreateCall) Context(ctx context.Context) *ProjectsKeysCreateCall {
  3309  	c.ctx_ = ctx
  3310  	return c
  3311  }
  3312  
  3313  // Header returns a http.Header that can be modified by the caller to add
  3314  // headers to the request.
  3315  func (c *ProjectsKeysCreateCall) Header() http.Header {
  3316  	if c.header_ == nil {
  3317  		c.header_ = make(http.Header)
  3318  	}
  3319  	return c.header_
  3320  }
  3321  
  3322  func (c *ProjectsKeysCreateCall) doRequest(alt string) (*http.Response, error) {
  3323  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3324  	var body io.Reader = nil
  3325  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1key)
  3326  	if err != nil {
  3327  		return nil, err
  3328  	}
  3329  	c.urlParams_.Set("alt", alt)
  3330  	c.urlParams_.Set("prettyPrint", "false")
  3331  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys")
  3332  	urls += "?" + c.urlParams_.Encode()
  3333  	req, err := http.NewRequest("POST", urls, body)
  3334  	if err != nil {
  3335  		return nil, err
  3336  	}
  3337  	req.Header = reqHeaders
  3338  	googleapi.Expand(req.URL, map[string]string{
  3339  		"parent": c.parent,
  3340  	})
  3341  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3342  }
  3343  
  3344  // Do executes the "recaptchaenterprise.projects.keys.create" call.
  3345  // Any non-2xx status code is an error. Response headers are in either
  3346  // *GoogleCloudRecaptchaenterpriseV1Key.ServerResponse.Header or (if a response
  3347  // was returned at all) in error.(*googleapi.Error).Header. Use
  3348  // googleapi.IsNotModified to check whether the returned error was because
  3349  // http.StatusNotModified was returned.
  3350  func (c *ProjectsKeysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
  3351  	gensupport.SetOptions(c.urlParams_, opts...)
  3352  	res, err := c.doRequest("json")
  3353  	if res != nil && res.StatusCode == http.StatusNotModified {
  3354  		if res.Body != nil {
  3355  			res.Body.Close()
  3356  		}
  3357  		return nil, gensupport.WrapError(&googleapi.Error{
  3358  			Code:   res.StatusCode,
  3359  			Header: res.Header,
  3360  		})
  3361  	}
  3362  	if err != nil {
  3363  		return nil, err
  3364  	}
  3365  	defer googleapi.CloseBody(res)
  3366  	if err := googleapi.CheckResponse(res); err != nil {
  3367  		return nil, gensupport.WrapError(err)
  3368  	}
  3369  	ret := &GoogleCloudRecaptchaenterpriseV1Key{
  3370  		ServerResponse: googleapi.ServerResponse{
  3371  			Header:         res.Header,
  3372  			HTTPStatusCode: res.StatusCode,
  3373  		},
  3374  	}
  3375  	target := &ret
  3376  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3377  		return nil, err
  3378  	}
  3379  	return ret, nil
  3380  }
  3381  
  3382  type ProjectsKeysDeleteCall struct {
  3383  	s          *Service
  3384  	name       string
  3385  	urlParams_ gensupport.URLParams
  3386  	ctx_       context.Context
  3387  	header_    http.Header
  3388  }
  3389  
  3390  // Delete: Deletes the specified key.
  3391  //
  3392  //   - name: The name of the key to be deleted, in the format
  3393  //     `projects/{project}/keys/{key}`.
  3394  func (r *ProjectsKeysService) Delete(name string) *ProjectsKeysDeleteCall {
  3395  	c := &ProjectsKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3396  	c.name = name
  3397  	return c
  3398  }
  3399  
  3400  // Fields allows partial responses to be retrieved. See
  3401  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3402  // details.
  3403  func (c *ProjectsKeysDeleteCall) Fields(s ...googleapi.Field) *ProjectsKeysDeleteCall {
  3404  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3405  	return c
  3406  }
  3407  
  3408  // Context sets the context to be used in this call's Do method.
  3409  func (c *ProjectsKeysDeleteCall) Context(ctx context.Context) *ProjectsKeysDeleteCall {
  3410  	c.ctx_ = ctx
  3411  	return c
  3412  }
  3413  
  3414  // Header returns a http.Header that can be modified by the caller to add
  3415  // headers to the request.
  3416  func (c *ProjectsKeysDeleteCall) Header() http.Header {
  3417  	if c.header_ == nil {
  3418  		c.header_ = make(http.Header)
  3419  	}
  3420  	return c.header_
  3421  }
  3422  
  3423  func (c *ProjectsKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
  3424  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3425  	var body io.Reader = nil
  3426  	c.urlParams_.Set("alt", alt)
  3427  	c.urlParams_.Set("prettyPrint", "false")
  3428  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3429  	urls += "?" + c.urlParams_.Encode()
  3430  	req, err := http.NewRequest("DELETE", urls, body)
  3431  	if err != nil {
  3432  		return nil, err
  3433  	}
  3434  	req.Header = reqHeaders
  3435  	googleapi.Expand(req.URL, map[string]string{
  3436  		"name": c.name,
  3437  	})
  3438  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3439  }
  3440  
  3441  // Do executes the "recaptchaenterprise.projects.keys.delete" call.
  3442  // Any non-2xx status code is an error. Response headers are in either
  3443  // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
  3444  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3445  // check whether the returned error was because http.StatusNotModified was
  3446  // returned.
  3447  func (c *ProjectsKeysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
  3448  	gensupport.SetOptions(c.urlParams_, opts...)
  3449  	res, err := c.doRequest("json")
  3450  	if res != nil && res.StatusCode == http.StatusNotModified {
  3451  		if res.Body != nil {
  3452  			res.Body.Close()
  3453  		}
  3454  		return nil, gensupport.WrapError(&googleapi.Error{
  3455  			Code:   res.StatusCode,
  3456  			Header: res.Header,
  3457  		})
  3458  	}
  3459  	if err != nil {
  3460  		return nil, err
  3461  	}
  3462  	defer googleapi.CloseBody(res)
  3463  	if err := googleapi.CheckResponse(res); err != nil {
  3464  		return nil, gensupport.WrapError(err)
  3465  	}
  3466  	ret := &GoogleProtobufEmpty{
  3467  		ServerResponse: googleapi.ServerResponse{
  3468  			Header:         res.Header,
  3469  			HTTPStatusCode: res.StatusCode,
  3470  		},
  3471  	}
  3472  	target := &ret
  3473  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3474  		return nil, err
  3475  	}
  3476  	return ret, nil
  3477  }
  3478  
  3479  type ProjectsKeysGetCall struct {
  3480  	s            *Service
  3481  	name         string
  3482  	urlParams_   gensupport.URLParams
  3483  	ifNoneMatch_ string
  3484  	ctx_         context.Context
  3485  	header_      http.Header
  3486  }
  3487  
  3488  // Get: Returns the specified key.
  3489  //
  3490  //   - name: The name of the requested key, in the format
  3491  //     `projects/{project}/keys/{key}`.
  3492  func (r *ProjectsKeysService) Get(name string) *ProjectsKeysGetCall {
  3493  	c := &ProjectsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3494  	c.name = name
  3495  	return c
  3496  }
  3497  
  3498  // Fields allows partial responses to be retrieved. See
  3499  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3500  // details.
  3501  func (c *ProjectsKeysGetCall) Fields(s ...googleapi.Field) *ProjectsKeysGetCall {
  3502  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3503  	return c
  3504  }
  3505  
  3506  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3507  // object's ETag matches the given value. This is useful for getting updates
  3508  // only after the object has changed since the last request.
  3509  func (c *ProjectsKeysGetCall) IfNoneMatch(entityTag string) *ProjectsKeysGetCall {
  3510  	c.ifNoneMatch_ = entityTag
  3511  	return c
  3512  }
  3513  
  3514  // Context sets the context to be used in this call's Do method.
  3515  func (c *ProjectsKeysGetCall) Context(ctx context.Context) *ProjectsKeysGetCall {
  3516  	c.ctx_ = ctx
  3517  	return c
  3518  }
  3519  
  3520  // Header returns a http.Header that can be modified by the caller to add
  3521  // headers to the request.
  3522  func (c *ProjectsKeysGetCall) Header() http.Header {
  3523  	if c.header_ == nil {
  3524  		c.header_ = make(http.Header)
  3525  	}
  3526  	return c.header_
  3527  }
  3528  
  3529  func (c *ProjectsKeysGetCall) doRequest(alt string) (*http.Response, error) {
  3530  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3531  	if c.ifNoneMatch_ != "" {
  3532  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3533  	}
  3534  	var body io.Reader = nil
  3535  	c.urlParams_.Set("alt", alt)
  3536  	c.urlParams_.Set("prettyPrint", "false")
  3537  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3538  	urls += "?" + c.urlParams_.Encode()
  3539  	req, err := http.NewRequest("GET", urls, body)
  3540  	if err != nil {
  3541  		return nil, err
  3542  	}
  3543  	req.Header = reqHeaders
  3544  	googleapi.Expand(req.URL, map[string]string{
  3545  		"name": c.name,
  3546  	})
  3547  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3548  }
  3549  
  3550  // Do executes the "recaptchaenterprise.projects.keys.get" call.
  3551  // Any non-2xx status code is an error. Response headers are in either
  3552  // *GoogleCloudRecaptchaenterpriseV1Key.ServerResponse.Header or (if a response
  3553  // was returned at all) in error.(*googleapi.Error).Header. Use
  3554  // googleapi.IsNotModified to check whether the returned error was because
  3555  // http.StatusNotModified was returned.
  3556  func (c *ProjectsKeysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
  3557  	gensupport.SetOptions(c.urlParams_, opts...)
  3558  	res, err := c.doRequest("json")
  3559  	if res != nil && res.StatusCode == http.StatusNotModified {
  3560  		if res.Body != nil {
  3561  			res.Body.Close()
  3562  		}
  3563  		return nil, gensupport.WrapError(&googleapi.Error{
  3564  			Code:   res.StatusCode,
  3565  			Header: res.Header,
  3566  		})
  3567  	}
  3568  	if err != nil {
  3569  		return nil, err
  3570  	}
  3571  	defer googleapi.CloseBody(res)
  3572  	if err := googleapi.CheckResponse(res); err != nil {
  3573  		return nil, gensupport.WrapError(err)
  3574  	}
  3575  	ret := &GoogleCloudRecaptchaenterpriseV1Key{
  3576  		ServerResponse: googleapi.ServerResponse{
  3577  			Header:         res.Header,
  3578  			HTTPStatusCode: res.StatusCode,
  3579  		},
  3580  	}
  3581  	target := &ret
  3582  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3583  		return nil, err
  3584  	}
  3585  	return ret, nil
  3586  }
  3587  
  3588  type ProjectsKeysGetMetricsCall struct {
  3589  	s            *Service
  3590  	name         string
  3591  	urlParams_   gensupport.URLParams
  3592  	ifNoneMatch_ string
  3593  	ctx_         context.Context
  3594  	header_      http.Header
  3595  }
  3596  
  3597  // GetMetrics: Get some aggregated metrics for a Key. This data can be used to
  3598  // build dashboards.
  3599  //
  3600  //   - name: The name of the requested metrics, in the format
  3601  //     `projects/{project}/keys/{key}/metrics`.
  3602  func (r *ProjectsKeysService) GetMetrics(name string) *ProjectsKeysGetMetricsCall {
  3603  	c := &ProjectsKeysGetMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3604  	c.name = name
  3605  	return c
  3606  }
  3607  
  3608  // Fields allows partial responses to be retrieved. See
  3609  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3610  // details.
  3611  func (c *ProjectsKeysGetMetricsCall) Fields(s ...googleapi.Field) *ProjectsKeysGetMetricsCall {
  3612  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3613  	return c
  3614  }
  3615  
  3616  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3617  // object's ETag matches the given value. This is useful for getting updates
  3618  // only after the object has changed since the last request.
  3619  func (c *ProjectsKeysGetMetricsCall) IfNoneMatch(entityTag string) *ProjectsKeysGetMetricsCall {
  3620  	c.ifNoneMatch_ = entityTag
  3621  	return c
  3622  }
  3623  
  3624  // Context sets the context to be used in this call's Do method.
  3625  func (c *ProjectsKeysGetMetricsCall) Context(ctx context.Context) *ProjectsKeysGetMetricsCall {
  3626  	c.ctx_ = ctx
  3627  	return c
  3628  }
  3629  
  3630  // Header returns a http.Header that can be modified by the caller to add
  3631  // headers to the request.
  3632  func (c *ProjectsKeysGetMetricsCall) Header() http.Header {
  3633  	if c.header_ == nil {
  3634  		c.header_ = make(http.Header)
  3635  	}
  3636  	return c.header_
  3637  }
  3638  
  3639  func (c *ProjectsKeysGetMetricsCall) doRequest(alt string) (*http.Response, error) {
  3640  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3641  	if c.ifNoneMatch_ != "" {
  3642  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3643  	}
  3644  	var body io.Reader = nil
  3645  	c.urlParams_.Set("alt", alt)
  3646  	c.urlParams_.Set("prettyPrint", "false")
  3647  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3648  	urls += "?" + c.urlParams_.Encode()
  3649  	req, err := http.NewRequest("GET", urls, body)
  3650  	if err != nil {
  3651  		return nil, err
  3652  	}
  3653  	req.Header = reqHeaders
  3654  	googleapi.Expand(req.URL, map[string]string{
  3655  		"name": c.name,
  3656  	})
  3657  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3658  }
  3659  
  3660  // Do executes the "recaptchaenterprise.projects.keys.getMetrics" call.
  3661  // Any non-2xx status code is an error. Response headers are in either
  3662  // *GoogleCloudRecaptchaenterpriseV1Metrics.ServerResponse.Header or (if a
  3663  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3664  // googleapi.IsNotModified to check whether the returned error was because
  3665  // http.StatusNotModified was returned.
  3666  func (c *ProjectsKeysGetMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Metrics, error) {
  3667  	gensupport.SetOptions(c.urlParams_, opts...)
  3668  	res, err := c.doRequest("json")
  3669  	if res != nil && res.StatusCode == http.StatusNotModified {
  3670  		if res.Body != nil {
  3671  			res.Body.Close()
  3672  		}
  3673  		return nil, gensupport.WrapError(&googleapi.Error{
  3674  			Code:   res.StatusCode,
  3675  			Header: res.Header,
  3676  		})
  3677  	}
  3678  	if err != nil {
  3679  		return nil, err
  3680  	}
  3681  	defer googleapi.CloseBody(res)
  3682  	if err := googleapi.CheckResponse(res); err != nil {
  3683  		return nil, gensupport.WrapError(err)
  3684  	}
  3685  	ret := &GoogleCloudRecaptchaenterpriseV1Metrics{
  3686  		ServerResponse: googleapi.ServerResponse{
  3687  			Header:         res.Header,
  3688  			HTTPStatusCode: res.StatusCode,
  3689  		},
  3690  	}
  3691  	target := &ret
  3692  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3693  		return nil, err
  3694  	}
  3695  	return ret, nil
  3696  }
  3697  
  3698  type ProjectsKeysListCall struct {
  3699  	s            *Service
  3700  	parent       string
  3701  	urlParams_   gensupport.URLParams
  3702  	ifNoneMatch_ string
  3703  	ctx_         context.Context
  3704  	header_      http.Header
  3705  }
  3706  
  3707  // List: Returns the list of all keys that belong to a project.
  3708  //
  3709  //   - parent: The name of the project that contains the keys that will be
  3710  //     listed, in the format `projects/{project}`.
  3711  func (r *ProjectsKeysService) List(parent string) *ProjectsKeysListCall {
  3712  	c := &ProjectsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3713  	c.parent = parent
  3714  	return c
  3715  }
  3716  
  3717  // PageSize sets the optional parameter "pageSize": The maximum number of keys
  3718  // to return. Default is 10. Max limit is 1000.
  3719  func (c *ProjectsKeysListCall) PageSize(pageSize int64) *ProjectsKeysListCall {
  3720  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3721  	return c
  3722  }
  3723  
  3724  // PageToken sets the optional parameter "pageToken": The next_page_token value
  3725  // returned from a previous. ListKeysRequest, if any.
  3726  func (c *ProjectsKeysListCall) PageToken(pageToken string) *ProjectsKeysListCall {
  3727  	c.urlParams_.Set("pageToken", pageToken)
  3728  	return c
  3729  }
  3730  
  3731  // Fields allows partial responses to be retrieved. See
  3732  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3733  // details.
  3734  func (c *ProjectsKeysListCall) Fields(s ...googleapi.Field) *ProjectsKeysListCall {
  3735  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3736  	return c
  3737  }
  3738  
  3739  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3740  // object's ETag matches the given value. This is useful for getting updates
  3741  // only after the object has changed since the last request.
  3742  func (c *ProjectsKeysListCall) IfNoneMatch(entityTag string) *ProjectsKeysListCall {
  3743  	c.ifNoneMatch_ = entityTag
  3744  	return c
  3745  }
  3746  
  3747  // Context sets the context to be used in this call's Do method.
  3748  func (c *ProjectsKeysListCall) Context(ctx context.Context) *ProjectsKeysListCall {
  3749  	c.ctx_ = ctx
  3750  	return c
  3751  }
  3752  
  3753  // Header returns a http.Header that can be modified by the caller to add
  3754  // headers to the request.
  3755  func (c *ProjectsKeysListCall) Header() http.Header {
  3756  	if c.header_ == nil {
  3757  		c.header_ = make(http.Header)
  3758  	}
  3759  	return c.header_
  3760  }
  3761  
  3762  func (c *ProjectsKeysListCall) doRequest(alt string) (*http.Response, error) {
  3763  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3764  	if c.ifNoneMatch_ != "" {
  3765  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3766  	}
  3767  	var body io.Reader = nil
  3768  	c.urlParams_.Set("alt", alt)
  3769  	c.urlParams_.Set("prettyPrint", "false")
  3770  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/keys")
  3771  	urls += "?" + c.urlParams_.Encode()
  3772  	req, err := http.NewRequest("GET", urls, body)
  3773  	if err != nil {
  3774  		return nil, err
  3775  	}
  3776  	req.Header = reqHeaders
  3777  	googleapi.Expand(req.URL, map[string]string{
  3778  		"parent": c.parent,
  3779  	})
  3780  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3781  }
  3782  
  3783  // Do executes the "recaptchaenterprise.projects.keys.list" call.
  3784  // Any non-2xx status code is an error. Response headers are in either
  3785  // *GoogleCloudRecaptchaenterpriseV1ListKeysResponse.ServerResponse.Header or
  3786  // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
  3787  // googleapi.IsNotModified to check whether the returned error was because
  3788  // http.StatusNotModified was returned.
  3789  func (c *ProjectsKeysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListKeysResponse, error) {
  3790  	gensupport.SetOptions(c.urlParams_, opts...)
  3791  	res, err := c.doRequest("json")
  3792  	if res != nil && res.StatusCode == http.StatusNotModified {
  3793  		if res.Body != nil {
  3794  			res.Body.Close()
  3795  		}
  3796  		return nil, gensupport.WrapError(&googleapi.Error{
  3797  			Code:   res.StatusCode,
  3798  			Header: res.Header,
  3799  		})
  3800  	}
  3801  	if err != nil {
  3802  		return nil, err
  3803  	}
  3804  	defer googleapi.CloseBody(res)
  3805  	if err := googleapi.CheckResponse(res); err != nil {
  3806  		return nil, gensupport.WrapError(err)
  3807  	}
  3808  	ret := &GoogleCloudRecaptchaenterpriseV1ListKeysResponse{
  3809  		ServerResponse: googleapi.ServerResponse{
  3810  			Header:         res.Header,
  3811  			HTTPStatusCode: res.StatusCode,
  3812  		},
  3813  	}
  3814  	target := &ret
  3815  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3816  		return nil, err
  3817  	}
  3818  	return ret, nil
  3819  }
  3820  
  3821  // Pages invokes f for each page of results.
  3822  // A non-nil error returned from f will halt the iteration.
  3823  // The provided context supersedes any context provided to the Context method.
  3824  func (c *ProjectsKeysListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListKeysResponse) error) error {
  3825  	c.ctx_ = ctx
  3826  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3827  	for {
  3828  		x, err := c.Do()
  3829  		if err != nil {
  3830  			return err
  3831  		}
  3832  		if err := f(x); err != nil {
  3833  			return err
  3834  		}
  3835  		if x.NextPageToken == "" {
  3836  			return nil
  3837  		}
  3838  		c.PageToken(x.NextPageToken)
  3839  	}
  3840  }
  3841  
  3842  type ProjectsKeysMigrateCall struct {
  3843  	s                                                 *Service
  3844  	name                                              string
  3845  	googlecloudrecaptchaenterprisev1migratekeyrequest *GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest
  3846  	urlParams_                                        gensupport.URLParams
  3847  	ctx_                                              context.Context
  3848  	header_                                           http.Header
  3849  }
  3850  
  3851  // Migrate: Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
  3852  // Once a key is migrated, it can be used from either product. SiteVerify
  3853  // requests are billed as CreateAssessment calls. You must be authenticated as
  3854  // one of the current owners of the reCAPTCHA Key, and your user must have the
  3855  // reCAPTCHA Enterprise Admin IAM role in the destination project.
  3856  //
  3857  //   - name: The name of the key to be migrated, in the format
  3858  //     `projects/{project}/keys/{key}`.
  3859  func (r *ProjectsKeysService) Migrate(name string, googlecloudrecaptchaenterprisev1migratekeyrequest *GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest) *ProjectsKeysMigrateCall {
  3860  	c := &ProjectsKeysMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3861  	c.name = name
  3862  	c.googlecloudrecaptchaenterprisev1migratekeyrequest = googlecloudrecaptchaenterprisev1migratekeyrequest
  3863  	return c
  3864  }
  3865  
  3866  // Fields allows partial responses to be retrieved. See
  3867  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3868  // details.
  3869  func (c *ProjectsKeysMigrateCall) Fields(s ...googleapi.Field) *ProjectsKeysMigrateCall {
  3870  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3871  	return c
  3872  }
  3873  
  3874  // Context sets the context to be used in this call's Do method.
  3875  func (c *ProjectsKeysMigrateCall) Context(ctx context.Context) *ProjectsKeysMigrateCall {
  3876  	c.ctx_ = ctx
  3877  	return c
  3878  }
  3879  
  3880  // Header returns a http.Header that can be modified by the caller to add
  3881  // headers to the request.
  3882  func (c *ProjectsKeysMigrateCall) Header() http.Header {
  3883  	if c.header_ == nil {
  3884  		c.header_ = make(http.Header)
  3885  	}
  3886  	return c.header_
  3887  }
  3888  
  3889  func (c *ProjectsKeysMigrateCall) doRequest(alt string) (*http.Response, error) {
  3890  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3891  	var body io.Reader = nil
  3892  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1migratekeyrequest)
  3893  	if err != nil {
  3894  		return nil, err
  3895  	}
  3896  	c.urlParams_.Set("alt", alt)
  3897  	c.urlParams_.Set("prettyPrint", "false")
  3898  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:migrate")
  3899  	urls += "?" + c.urlParams_.Encode()
  3900  	req, err := http.NewRequest("POST", urls, body)
  3901  	if err != nil {
  3902  		return nil, err
  3903  	}
  3904  	req.Header = reqHeaders
  3905  	googleapi.Expand(req.URL, map[string]string{
  3906  		"name": c.name,
  3907  	})
  3908  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3909  }
  3910  
  3911  // Do executes the "recaptchaenterprise.projects.keys.migrate" call.
  3912  // Any non-2xx status code is an error. Response headers are in either
  3913  // *GoogleCloudRecaptchaenterpriseV1Key.ServerResponse.Header or (if a response
  3914  // was returned at all) in error.(*googleapi.Error).Header. Use
  3915  // googleapi.IsNotModified to check whether the returned error was because
  3916  // http.StatusNotModified was returned.
  3917  func (c *ProjectsKeysMigrateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
  3918  	gensupport.SetOptions(c.urlParams_, opts...)
  3919  	res, err := c.doRequest("json")
  3920  	if res != nil && res.StatusCode == http.StatusNotModified {
  3921  		if res.Body != nil {
  3922  			res.Body.Close()
  3923  		}
  3924  		return nil, gensupport.WrapError(&googleapi.Error{
  3925  			Code:   res.StatusCode,
  3926  			Header: res.Header,
  3927  		})
  3928  	}
  3929  	if err != nil {
  3930  		return nil, err
  3931  	}
  3932  	defer googleapi.CloseBody(res)
  3933  	if err := googleapi.CheckResponse(res); err != nil {
  3934  		return nil, gensupport.WrapError(err)
  3935  	}
  3936  	ret := &GoogleCloudRecaptchaenterpriseV1Key{
  3937  		ServerResponse: googleapi.ServerResponse{
  3938  			Header:         res.Header,
  3939  			HTTPStatusCode: res.StatusCode,
  3940  		},
  3941  	}
  3942  	target := &ret
  3943  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3944  		return nil, err
  3945  	}
  3946  	return ret, nil
  3947  }
  3948  
  3949  type ProjectsKeysPatchCall struct {
  3950  	s                                   *Service
  3951  	name                                string
  3952  	googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key
  3953  	urlParams_                          gensupport.URLParams
  3954  	ctx_                                context.Context
  3955  	header_                             http.Header
  3956  }
  3957  
  3958  // Patch: Updates the specified key.
  3959  //
  3960  //   - name: Identifier. The resource name for the Key in the format
  3961  //     `projects/{project}/keys/{key}`.
  3962  func (r *ProjectsKeysService) Patch(name string, googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key) *ProjectsKeysPatchCall {
  3963  	c := &ProjectsKeysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3964  	c.name = name
  3965  	c.googlecloudrecaptchaenterprisev1key = googlecloudrecaptchaenterprisev1key
  3966  	return c
  3967  }
  3968  
  3969  // UpdateMask sets the optional parameter "updateMask": The mask to control
  3970  // which fields of the key get updated. If the mask is not present, all fields
  3971  // will be updated.
  3972  func (c *ProjectsKeysPatchCall) UpdateMask(updateMask string) *ProjectsKeysPatchCall {
  3973  	c.urlParams_.Set("updateMask", updateMask)
  3974  	return c
  3975  }
  3976  
  3977  // Fields allows partial responses to be retrieved. See
  3978  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3979  // details.
  3980  func (c *ProjectsKeysPatchCall) Fields(s ...googleapi.Field) *ProjectsKeysPatchCall {
  3981  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3982  	return c
  3983  }
  3984  
  3985  // Context sets the context to be used in this call's Do method.
  3986  func (c *ProjectsKeysPatchCall) Context(ctx context.Context) *ProjectsKeysPatchCall {
  3987  	c.ctx_ = ctx
  3988  	return c
  3989  }
  3990  
  3991  // Header returns a http.Header that can be modified by the caller to add
  3992  // headers to the request.
  3993  func (c *ProjectsKeysPatchCall) Header() http.Header {
  3994  	if c.header_ == nil {
  3995  		c.header_ = make(http.Header)
  3996  	}
  3997  	return c.header_
  3998  }
  3999  
  4000  func (c *ProjectsKeysPatchCall) doRequest(alt string) (*http.Response, error) {
  4001  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4002  	var body io.Reader = nil
  4003  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1key)
  4004  	if err != nil {
  4005  		return nil, err
  4006  	}
  4007  	c.urlParams_.Set("alt", alt)
  4008  	c.urlParams_.Set("prettyPrint", "false")
  4009  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4010  	urls += "?" + c.urlParams_.Encode()
  4011  	req, err := http.NewRequest("PATCH", urls, body)
  4012  	if err != nil {
  4013  		return nil, err
  4014  	}
  4015  	req.Header = reqHeaders
  4016  	googleapi.Expand(req.URL, map[string]string{
  4017  		"name": c.name,
  4018  	})
  4019  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4020  }
  4021  
  4022  // Do executes the "recaptchaenterprise.projects.keys.patch" call.
  4023  // Any non-2xx status code is an error. Response headers are in either
  4024  // *GoogleCloudRecaptchaenterpriseV1Key.ServerResponse.Header or (if a response
  4025  // was returned at all) in error.(*googleapi.Error).Header. Use
  4026  // googleapi.IsNotModified to check whether the returned error was because
  4027  // http.StatusNotModified was returned.
  4028  func (c *ProjectsKeysPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1Key, error) {
  4029  	gensupport.SetOptions(c.urlParams_, opts...)
  4030  	res, err := c.doRequest("json")
  4031  	if res != nil && res.StatusCode == http.StatusNotModified {
  4032  		if res.Body != nil {
  4033  			res.Body.Close()
  4034  		}
  4035  		return nil, gensupport.WrapError(&googleapi.Error{
  4036  			Code:   res.StatusCode,
  4037  			Header: res.Header,
  4038  		})
  4039  	}
  4040  	if err != nil {
  4041  		return nil, err
  4042  	}
  4043  	defer googleapi.CloseBody(res)
  4044  	if err := googleapi.CheckResponse(res); err != nil {
  4045  		return nil, gensupport.WrapError(err)
  4046  	}
  4047  	ret := &GoogleCloudRecaptchaenterpriseV1Key{
  4048  		ServerResponse: googleapi.ServerResponse{
  4049  			Header:         res.Header,
  4050  			HTTPStatusCode: res.StatusCode,
  4051  		},
  4052  	}
  4053  	target := &ret
  4054  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4055  		return nil, err
  4056  	}
  4057  	return ret, nil
  4058  }
  4059  
  4060  type ProjectsKeysRetrieveLegacySecretKeyCall struct {
  4061  	s            *Service
  4062  	key          string
  4063  	urlParams_   gensupport.URLParams
  4064  	ifNoneMatch_ string
  4065  	ctx_         context.Context
  4066  	header_      http.Header
  4067  }
  4068  
  4069  // RetrieveLegacySecretKey: Returns the secret key related to the specified
  4070  // public key. You must use the legacy secret key only in a 3rd party
  4071  // integration with legacy reCAPTCHA.
  4072  //
  4073  //   - key: The public key name linked to the requested secret key in the format
  4074  //     `projects/{project}/keys/{key}`.
  4075  func (r *ProjectsKeysService) RetrieveLegacySecretKey(key string) *ProjectsKeysRetrieveLegacySecretKeyCall {
  4076  	c := &ProjectsKeysRetrieveLegacySecretKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4077  	c.key = key
  4078  	return c
  4079  }
  4080  
  4081  // Fields allows partial responses to be retrieved. See
  4082  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4083  // details.
  4084  func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Fields(s ...googleapi.Field) *ProjectsKeysRetrieveLegacySecretKeyCall {
  4085  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4086  	return c
  4087  }
  4088  
  4089  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4090  // object's ETag matches the given value. This is useful for getting updates
  4091  // only after the object has changed since the last request.
  4092  func (c *ProjectsKeysRetrieveLegacySecretKeyCall) IfNoneMatch(entityTag string) *ProjectsKeysRetrieveLegacySecretKeyCall {
  4093  	c.ifNoneMatch_ = entityTag
  4094  	return c
  4095  }
  4096  
  4097  // Context sets the context to be used in this call's Do method.
  4098  func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Context(ctx context.Context) *ProjectsKeysRetrieveLegacySecretKeyCall {
  4099  	c.ctx_ = ctx
  4100  	return c
  4101  }
  4102  
  4103  // Header returns a http.Header that can be modified by the caller to add
  4104  // headers to the request.
  4105  func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Header() http.Header {
  4106  	if c.header_ == nil {
  4107  		c.header_ = make(http.Header)
  4108  	}
  4109  	return c.header_
  4110  }
  4111  
  4112  func (c *ProjectsKeysRetrieveLegacySecretKeyCall) doRequest(alt string) (*http.Response, error) {
  4113  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4114  	if c.ifNoneMatch_ != "" {
  4115  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4116  	}
  4117  	var body io.Reader = nil
  4118  	c.urlParams_.Set("alt", alt)
  4119  	c.urlParams_.Set("prettyPrint", "false")
  4120  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+key}:retrieveLegacySecretKey")
  4121  	urls += "?" + c.urlParams_.Encode()
  4122  	req, err := http.NewRequest("GET", urls, body)
  4123  	if err != nil {
  4124  		return nil, err
  4125  	}
  4126  	req.Header = reqHeaders
  4127  	googleapi.Expand(req.URL, map[string]string{
  4128  		"key": c.key,
  4129  	})
  4130  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4131  }
  4132  
  4133  // Do executes the "recaptchaenterprise.projects.keys.retrieveLegacySecretKey" call.
  4134  // Any non-2xx status code is an error. Response headers are in either
  4135  // *GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse.ServerRespon
  4136  // se.Header or (if a response was returned at all) in
  4137  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4138  // whether the returned error was because http.StatusNotModified was returned.
  4139  func (c *ProjectsKeysRetrieveLegacySecretKeyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse, error) {
  4140  	gensupport.SetOptions(c.urlParams_, opts...)
  4141  	res, err := c.doRequest("json")
  4142  	if res != nil && res.StatusCode == http.StatusNotModified {
  4143  		if res.Body != nil {
  4144  			res.Body.Close()
  4145  		}
  4146  		return nil, gensupport.WrapError(&googleapi.Error{
  4147  			Code:   res.StatusCode,
  4148  			Header: res.Header,
  4149  		})
  4150  	}
  4151  	if err != nil {
  4152  		return nil, err
  4153  	}
  4154  	defer googleapi.CloseBody(res)
  4155  	if err := googleapi.CheckResponse(res); err != nil {
  4156  		return nil, gensupport.WrapError(err)
  4157  	}
  4158  	ret := &GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse{
  4159  		ServerResponse: googleapi.ServerResponse{
  4160  			Header:         res.Header,
  4161  			HTTPStatusCode: res.StatusCode,
  4162  		},
  4163  	}
  4164  	target := &ret
  4165  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4166  		return nil, err
  4167  	}
  4168  	return ret, nil
  4169  }
  4170  
  4171  type ProjectsRelatedaccountgroupmembershipsSearchCall struct {
  4172  	s                                                                           *Service
  4173  	project                                                                     string
  4174  	googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest
  4175  	urlParams_                                                                  gensupport.URLParams
  4176  	ctx_                                                                        context.Context
  4177  	header_                                                                     http.Header
  4178  }
  4179  
  4180  // Search: Search group memberships related to a given account.
  4181  //
  4182  //   - project: The name of the project to search related account group
  4183  //     memberships from. Specify the project name in the following format:
  4184  //     `projects/{project}`.
  4185  func (r *ProjectsRelatedaccountgroupmembershipsService) Search(project string, googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest) *ProjectsRelatedaccountgroupmembershipsSearchCall {
  4186  	c := &ProjectsRelatedaccountgroupmembershipsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4187  	c.project = project
  4188  	c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest = googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest
  4189  	return c
  4190  }
  4191  
  4192  // Fields allows partial responses to be retrieved. See
  4193  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4194  // details.
  4195  func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Fields(s ...googleapi.Field) *ProjectsRelatedaccountgroupmembershipsSearchCall {
  4196  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4197  	return c
  4198  }
  4199  
  4200  // Context sets the context to be used in this call's Do method.
  4201  func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Context(ctx context.Context) *ProjectsRelatedaccountgroupmembershipsSearchCall {
  4202  	c.ctx_ = ctx
  4203  	return c
  4204  }
  4205  
  4206  // Header returns a http.Header that can be modified by the caller to add
  4207  // headers to the request.
  4208  func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Header() http.Header {
  4209  	if c.header_ == nil {
  4210  		c.header_ = make(http.Header)
  4211  	}
  4212  	return c.header_
  4213  }
  4214  
  4215  func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) doRequest(alt string) (*http.Response, error) {
  4216  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4217  	var body io.Reader = nil
  4218  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest)
  4219  	if err != nil {
  4220  		return nil, err
  4221  	}
  4222  	c.urlParams_.Set("alt", alt)
  4223  	c.urlParams_.Set("prettyPrint", "false")
  4224  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+project}/relatedaccountgroupmemberships:search")
  4225  	urls += "?" + c.urlParams_.Encode()
  4226  	req, err := http.NewRequest("POST", urls, body)
  4227  	if err != nil {
  4228  		return nil, err
  4229  	}
  4230  	req.Header = reqHeaders
  4231  	googleapi.Expand(req.URL, map[string]string{
  4232  		"project": c.project,
  4233  	})
  4234  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4235  }
  4236  
  4237  // Do executes the "recaptchaenterprise.projects.relatedaccountgroupmemberships.search" call.
  4238  // Any non-2xx status code is an error. Response headers are in either
  4239  // *GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse
  4240  // .ServerResponse.Header or (if a response was returned at all) in
  4241  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4242  // whether the returned error was because http.StatusNotModified was returned.
  4243  func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse, error) {
  4244  	gensupport.SetOptions(c.urlParams_, opts...)
  4245  	res, err := c.doRequest("json")
  4246  	if res != nil && res.StatusCode == http.StatusNotModified {
  4247  		if res.Body != nil {
  4248  			res.Body.Close()
  4249  		}
  4250  		return nil, gensupport.WrapError(&googleapi.Error{
  4251  			Code:   res.StatusCode,
  4252  			Header: res.Header,
  4253  		})
  4254  	}
  4255  	if err != nil {
  4256  		return nil, err
  4257  	}
  4258  	defer googleapi.CloseBody(res)
  4259  	if err := googleapi.CheckResponse(res); err != nil {
  4260  		return nil, gensupport.WrapError(err)
  4261  	}
  4262  	ret := &GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse{
  4263  		ServerResponse: googleapi.ServerResponse{
  4264  			Header:         res.Header,
  4265  			HTTPStatusCode: res.StatusCode,
  4266  		},
  4267  	}
  4268  	target := &ret
  4269  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4270  		return nil, err
  4271  	}
  4272  	return ret, nil
  4273  }
  4274  
  4275  // Pages invokes f for each page of results.
  4276  // A non-nil error returned from f will halt the iteration.
  4277  // The provided context supersedes any context provided to the Context method.
  4278  func (c *ProjectsRelatedaccountgroupmembershipsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse) error) error {
  4279  	c.ctx_ = ctx
  4280  	defer func(pt string) {
  4281  		c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest.PageToken = pt
  4282  	}(c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest.PageToken)
  4283  	for {
  4284  		x, err := c.Do()
  4285  		if err != nil {
  4286  			return err
  4287  		}
  4288  		if err := f(x); err != nil {
  4289  			return err
  4290  		}
  4291  		if x.NextPageToken == "" {
  4292  			return nil
  4293  		}
  4294  		c.googlecloudrecaptchaenterprisev1searchrelatedaccountgroupmembershipsrequest.PageToken = x.NextPageToken
  4295  	}
  4296  }
  4297  
  4298  type ProjectsRelatedaccountgroupsListCall struct {
  4299  	s            *Service
  4300  	parent       string
  4301  	urlParams_   gensupport.URLParams
  4302  	ifNoneMatch_ string
  4303  	ctx_         context.Context
  4304  	header_      http.Header
  4305  }
  4306  
  4307  // List: List groups of related accounts.
  4308  //
  4309  //   - parent: The name of the project to list related account groups from, in
  4310  //     the format `projects/{project}`.
  4311  func (r *ProjectsRelatedaccountgroupsService) List(parent string) *ProjectsRelatedaccountgroupsListCall {
  4312  	c := &ProjectsRelatedaccountgroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4313  	c.parent = parent
  4314  	return c
  4315  }
  4316  
  4317  // PageSize sets the optional parameter "pageSize": The maximum number of
  4318  // groups to return. The service might return fewer than this value. If
  4319  // unspecified, at most 50 groups are returned. The maximum value is 1000;
  4320  // values above 1000 are coerced to 1000.
  4321  func (c *ProjectsRelatedaccountgroupsListCall) PageSize(pageSize int64) *ProjectsRelatedaccountgroupsListCall {
  4322  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4323  	return c
  4324  }
  4325  
  4326  // PageToken sets the optional parameter "pageToken": A page token, received
  4327  // from a previous `ListRelatedAccountGroups` call. Provide this to retrieve
  4328  // the subsequent page. When paginating, all other parameters provided to
  4329  // `ListRelatedAccountGroups` must match the call that provided the page token.
  4330  func (c *ProjectsRelatedaccountgroupsListCall) PageToken(pageToken string) *ProjectsRelatedaccountgroupsListCall {
  4331  	c.urlParams_.Set("pageToken", pageToken)
  4332  	return c
  4333  }
  4334  
  4335  // Fields allows partial responses to be retrieved. See
  4336  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4337  // details.
  4338  func (c *ProjectsRelatedaccountgroupsListCall) Fields(s ...googleapi.Field) *ProjectsRelatedaccountgroupsListCall {
  4339  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4340  	return c
  4341  }
  4342  
  4343  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4344  // object's ETag matches the given value. This is useful for getting updates
  4345  // only after the object has changed since the last request.
  4346  func (c *ProjectsRelatedaccountgroupsListCall) IfNoneMatch(entityTag string) *ProjectsRelatedaccountgroupsListCall {
  4347  	c.ifNoneMatch_ = entityTag
  4348  	return c
  4349  }
  4350  
  4351  // Context sets the context to be used in this call's Do method.
  4352  func (c *ProjectsRelatedaccountgroupsListCall) Context(ctx context.Context) *ProjectsRelatedaccountgroupsListCall {
  4353  	c.ctx_ = ctx
  4354  	return c
  4355  }
  4356  
  4357  // Header returns a http.Header that can be modified by the caller to add
  4358  // headers to the request.
  4359  func (c *ProjectsRelatedaccountgroupsListCall) Header() http.Header {
  4360  	if c.header_ == nil {
  4361  		c.header_ = make(http.Header)
  4362  	}
  4363  	return c.header_
  4364  }
  4365  
  4366  func (c *ProjectsRelatedaccountgroupsListCall) doRequest(alt string) (*http.Response, error) {
  4367  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4368  	if c.ifNoneMatch_ != "" {
  4369  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4370  	}
  4371  	var body io.Reader = nil
  4372  	c.urlParams_.Set("alt", alt)
  4373  	c.urlParams_.Set("prettyPrint", "false")
  4374  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/relatedaccountgroups")
  4375  	urls += "?" + c.urlParams_.Encode()
  4376  	req, err := http.NewRequest("GET", urls, body)
  4377  	if err != nil {
  4378  		return nil, err
  4379  	}
  4380  	req.Header = reqHeaders
  4381  	googleapi.Expand(req.URL, map[string]string{
  4382  		"parent": c.parent,
  4383  	})
  4384  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4385  }
  4386  
  4387  // Do executes the "recaptchaenterprise.projects.relatedaccountgroups.list" call.
  4388  // Any non-2xx status code is an error. Response headers are in either
  4389  // *GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse.ServerRespo
  4390  // nse.Header or (if a response was returned at all) in
  4391  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4392  // whether the returned error was because http.StatusNotModified was returned.
  4393  func (c *ProjectsRelatedaccountgroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse, error) {
  4394  	gensupport.SetOptions(c.urlParams_, opts...)
  4395  	res, err := c.doRequest("json")
  4396  	if res != nil && res.StatusCode == http.StatusNotModified {
  4397  		if res.Body != nil {
  4398  			res.Body.Close()
  4399  		}
  4400  		return nil, gensupport.WrapError(&googleapi.Error{
  4401  			Code:   res.StatusCode,
  4402  			Header: res.Header,
  4403  		})
  4404  	}
  4405  	if err != nil {
  4406  		return nil, err
  4407  	}
  4408  	defer googleapi.CloseBody(res)
  4409  	if err := googleapi.CheckResponse(res); err != nil {
  4410  		return nil, gensupport.WrapError(err)
  4411  	}
  4412  	ret := &GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse{
  4413  		ServerResponse: googleapi.ServerResponse{
  4414  			Header:         res.Header,
  4415  			HTTPStatusCode: res.StatusCode,
  4416  		},
  4417  	}
  4418  	target := &ret
  4419  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4420  		return nil, err
  4421  	}
  4422  	return ret, nil
  4423  }
  4424  
  4425  // Pages invokes f for each page of results.
  4426  // A non-nil error returned from f will halt the iteration.
  4427  // The provided context supersedes any context provided to the Context method.
  4428  func (c *ProjectsRelatedaccountgroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse) error) error {
  4429  	c.ctx_ = ctx
  4430  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4431  	for {
  4432  		x, err := c.Do()
  4433  		if err != nil {
  4434  			return err
  4435  		}
  4436  		if err := f(x); err != nil {
  4437  			return err
  4438  		}
  4439  		if x.NextPageToken == "" {
  4440  			return nil
  4441  		}
  4442  		c.PageToken(x.NextPageToken)
  4443  	}
  4444  }
  4445  
  4446  type ProjectsRelatedaccountgroupsMembershipsListCall struct {
  4447  	s            *Service
  4448  	parent       string
  4449  	urlParams_   gensupport.URLParams
  4450  	ifNoneMatch_ string
  4451  	ctx_         context.Context
  4452  	header_      http.Header
  4453  }
  4454  
  4455  // List: Get memberships in a group of related accounts.
  4456  //
  4457  //   - parent: The resource name for the related account group in the format
  4458  //     `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
  4459  func (r *ProjectsRelatedaccountgroupsMembershipsService) List(parent string) *ProjectsRelatedaccountgroupsMembershipsListCall {
  4460  	c := &ProjectsRelatedaccountgroupsMembershipsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4461  	c.parent = parent
  4462  	return c
  4463  }
  4464  
  4465  // PageSize sets the optional parameter "pageSize": The maximum number of
  4466  // accounts to return. The service might return fewer than this value. If
  4467  // unspecified, at most 50 accounts are returned. The maximum value is 1000;
  4468  // values above 1000 are coerced to 1000.
  4469  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) PageSize(pageSize int64) *ProjectsRelatedaccountgroupsMembershipsListCall {
  4470  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4471  	return c
  4472  }
  4473  
  4474  // PageToken sets the optional parameter "pageToken": A page token, received
  4475  // from a previous `ListRelatedAccountGroupMemberships` call. When paginating,
  4476  // all other parameters provided to `ListRelatedAccountGroupMemberships` must
  4477  // match the call that provided the page token.
  4478  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) PageToken(pageToken string) *ProjectsRelatedaccountgroupsMembershipsListCall {
  4479  	c.urlParams_.Set("pageToken", pageToken)
  4480  	return c
  4481  }
  4482  
  4483  // Fields allows partial responses to be retrieved. See
  4484  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4485  // details.
  4486  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Fields(s ...googleapi.Field) *ProjectsRelatedaccountgroupsMembershipsListCall {
  4487  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4488  	return c
  4489  }
  4490  
  4491  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4492  // object's ETag matches the given value. This is useful for getting updates
  4493  // only after the object has changed since the last request.
  4494  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) IfNoneMatch(entityTag string) *ProjectsRelatedaccountgroupsMembershipsListCall {
  4495  	c.ifNoneMatch_ = entityTag
  4496  	return c
  4497  }
  4498  
  4499  // Context sets the context to be used in this call's Do method.
  4500  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Context(ctx context.Context) *ProjectsRelatedaccountgroupsMembershipsListCall {
  4501  	c.ctx_ = ctx
  4502  	return c
  4503  }
  4504  
  4505  // Header returns a http.Header that can be modified by the caller to add
  4506  // headers to the request.
  4507  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Header() http.Header {
  4508  	if c.header_ == nil {
  4509  		c.header_ = make(http.Header)
  4510  	}
  4511  	return c.header_
  4512  }
  4513  
  4514  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) doRequest(alt string) (*http.Response, error) {
  4515  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4516  	if c.ifNoneMatch_ != "" {
  4517  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4518  	}
  4519  	var body io.Reader = nil
  4520  	c.urlParams_.Set("alt", alt)
  4521  	c.urlParams_.Set("prettyPrint", "false")
  4522  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/memberships")
  4523  	urls += "?" + c.urlParams_.Encode()
  4524  	req, err := http.NewRequest("GET", urls, body)
  4525  	if err != nil {
  4526  		return nil, err
  4527  	}
  4528  	req.Header = reqHeaders
  4529  	googleapi.Expand(req.URL, map[string]string{
  4530  		"parent": c.parent,
  4531  	})
  4532  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4533  }
  4534  
  4535  // Do executes the "recaptchaenterprise.projects.relatedaccountgroups.memberships.list" call.
  4536  // Any non-2xx status code is an error. Response headers are in either
  4537  // *GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse.S
  4538  // erverResponse.Header or (if a response was returned at all) in
  4539  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4540  // whether the returned error was because http.StatusNotModified was returned.
  4541  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse, error) {
  4542  	gensupport.SetOptions(c.urlParams_, opts...)
  4543  	res, err := c.doRequest("json")
  4544  	if res != nil && res.StatusCode == http.StatusNotModified {
  4545  		if res.Body != nil {
  4546  			res.Body.Close()
  4547  		}
  4548  		return nil, gensupport.WrapError(&googleapi.Error{
  4549  			Code:   res.StatusCode,
  4550  			Header: res.Header,
  4551  		})
  4552  	}
  4553  	if err != nil {
  4554  		return nil, err
  4555  	}
  4556  	defer googleapi.CloseBody(res)
  4557  	if err := googleapi.CheckResponse(res); err != nil {
  4558  		return nil, gensupport.WrapError(err)
  4559  	}
  4560  	ret := &GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse{
  4561  		ServerResponse: googleapi.ServerResponse{
  4562  			Header:         res.Header,
  4563  			HTTPStatusCode: res.StatusCode,
  4564  		},
  4565  	}
  4566  	target := &ret
  4567  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4568  		return nil, err
  4569  	}
  4570  	return ret, nil
  4571  }
  4572  
  4573  // Pages invokes f for each page of results.
  4574  // A non-nil error returned from f will halt the iteration.
  4575  // The provided context supersedes any context provided to the Context method.
  4576  func (c *ProjectsRelatedaccountgroupsMembershipsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse) error) error {
  4577  	c.ctx_ = ctx
  4578  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4579  	for {
  4580  		x, err := c.Do()
  4581  		if err != nil {
  4582  			return err
  4583  		}
  4584  		if err := f(x); err != nil {
  4585  			return err
  4586  		}
  4587  		if x.NextPageToken == "" {
  4588  			return nil
  4589  		}
  4590  		c.PageToken(x.NextPageToken)
  4591  	}
  4592  }
  4593  

View as plain text