...

Source file src/google.golang.org/api/partners/v2/partners-gen.go

Documentation: google.golang.org/api/partners/v2

     1  // Copyright 2020 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 partners provides access to the Google Partners API.
     8  //
     9  // For product documentation, see: https://developers.google.com/partners/
    10  //
    11  // # Creating a client
    12  //
    13  // Usage example:
    14  //
    15  //	import "google.golang.org/api/partners/v2"
    16  //	...
    17  //	ctx := context.Background()
    18  //	partnersService, err := partners.NewService(ctx)
    19  //
    20  // In this example, Google Application Default Credentials are used for authentication.
    21  //
    22  // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    23  //
    24  // # Other authentication options
    25  //
    26  // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
    27  //
    28  //	partnersService, err := partners.NewService(ctx, option.WithAPIKey("AIza..."))
    29  //
    30  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
    31  //
    32  //	config := &oauth2.Config{...}
    33  //	// ...
    34  //	token, err := config.Exchange(ctx, ...)
    35  //	partnersService, err := partners.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    36  //
    37  // See https://godoc.org/google.golang.org/api/option/ for details on options.
    38  package partners // import "google.golang.org/api/partners/v2"
    39  
    40  import (
    41  	"bytes"
    42  	"context"
    43  	"encoding/json"
    44  	"errors"
    45  	"fmt"
    46  	"io"
    47  	"net/http"
    48  	"net/url"
    49  	"strconv"
    50  	"strings"
    51  
    52  	googleapi "google.golang.org/api/googleapi"
    53  	gensupport "google.golang.org/api/internal/gensupport"
    54  	option "google.golang.org/api/option"
    55  	htransport "google.golang.org/api/transport/http"
    56  )
    57  
    58  // Always reference these packages, just in case the auto-generated code
    59  // below doesn't.
    60  var _ = bytes.NewBuffer
    61  var _ = strconv.Itoa
    62  var _ = fmt.Sprintf
    63  var _ = json.NewDecoder
    64  var _ = io.Copy
    65  var _ = url.Parse
    66  var _ = gensupport.MarshalJSON
    67  var _ = googleapi.Version
    68  var _ = errors.New
    69  var _ = strings.Replace
    70  var _ = context.Canceled
    71  
    72  const apiId = "partners:v2"
    73  const apiName = "partners"
    74  const apiVersion = "v2"
    75  const basePath = "https://partners.googleapis.com/"
    76  
    77  // NewService creates a new Service.
    78  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    79  	client, endpoint, err := htransport.NewClient(ctx, opts...)
    80  	if err != nil {
    81  		return nil, err
    82  	}
    83  	s, err := New(client)
    84  	if err != nil {
    85  		return nil, err
    86  	}
    87  	if endpoint != "" {
    88  		s.BasePath = endpoint
    89  	}
    90  	return s, nil
    91  }
    92  
    93  // New creates a new Service. It uses the provided http.Client for requests.
    94  //
    95  // Deprecated: please use NewService instead.
    96  // To provide a custom HTTP client, use option.WithHTTPClient.
    97  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
    98  func New(client *http.Client) (*Service, error) {
    99  	if client == nil {
   100  		return nil, errors.New("client is nil")
   101  	}
   102  	s := &Service{client: client, BasePath: basePath}
   103  	s.Analytics = NewAnalyticsService(s)
   104  	s.ClientMessages = NewClientMessagesService(s)
   105  	s.Companies = NewCompaniesService(s)
   106  	s.Leads = NewLeadsService(s)
   107  	s.Offers = NewOffersService(s)
   108  	s.UserEvents = NewUserEventsService(s)
   109  	s.UserStates = NewUserStatesService(s)
   110  	s.Users = NewUsersService(s)
   111  	s.V2 = NewV2Service(s)
   112  	return s, nil
   113  }
   114  
   115  type Service struct {
   116  	client    *http.Client
   117  	BasePath  string // API endpoint base URL
   118  	UserAgent string // optional additional User-Agent fragment
   119  
   120  	Analytics *AnalyticsService
   121  
   122  	ClientMessages *ClientMessagesService
   123  
   124  	Companies *CompaniesService
   125  
   126  	Leads *LeadsService
   127  
   128  	Offers *OffersService
   129  
   130  	UserEvents *UserEventsService
   131  
   132  	UserStates *UserStatesService
   133  
   134  	Users *UsersService
   135  
   136  	V2 *V2Service
   137  }
   138  
   139  func (s *Service) userAgent() string {
   140  	if s.UserAgent == "" {
   141  		return googleapi.UserAgent
   142  	}
   143  	return googleapi.UserAgent + " " + s.UserAgent
   144  }
   145  
   146  func NewAnalyticsService(s *Service) *AnalyticsService {
   147  	rs := &AnalyticsService{s: s}
   148  	return rs
   149  }
   150  
   151  type AnalyticsService struct {
   152  	s *Service
   153  }
   154  
   155  func NewClientMessagesService(s *Service) *ClientMessagesService {
   156  	rs := &ClientMessagesService{s: s}
   157  	return rs
   158  }
   159  
   160  type ClientMessagesService struct {
   161  	s *Service
   162  }
   163  
   164  func NewCompaniesService(s *Service) *CompaniesService {
   165  	rs := &CompaniesService{s: s}
   166  	rs.Leads = NewCompaniesLeadsService(s)
   167  	return rs
   168  }
   169  
   170  type CompaniesService struct {
   171  	s *Service
   172  
   173  	Leads *CompaniesLeadsService
   174  }
   175  
   176  func NewCompaniesLeadsService(s *Service) *CompaniesLeadsService {
   177  	rs := &CompaniesLeadsService{s: s}
   178  	return rs
   179  }
   180  
   181  type CompaniesLeadsService struct {
   182  	s *Service
   183  }
   184  
   185  func NewLeadsService(s *Service) *LeadsService {
   186  	rs := &LeadsService{s: s}
   187  	return rs
   188  }
   189  
   190  type LeadsService struct {
   191  	s *Service
   192  }
   193  
   194  func NewOffersService(s *Service) *OffersService {
   195  	rs := &OffersService{s: s}
   196  	rs.History = NewOffersHistoryService(s)
   197  	return rs
   198  }
   199  
   200  type OffersService struct {
   201  	s *Service
   202  
   203  	History *OffersHistoryService
   204  }
   205  
   206  func NewOffersHistoryService(s *Service) *OffersHistoryService {
   207  	rs := &OffersHistoryService{s: s}
   208  	return rs
   209  }
   210  
   211  type OffersHistoryService struct {
   212  	s *Service
   213  }
   214  
   215  func NewUserEventsService(s *Service) *UserEventsService {
   216  	rs := &UserEventsService{s: s}
   217  	return rs
   218  }
   219  
   220  type UserEventsService struct {
   221  	s *Service
   222  }
   223  
   224  func NewUserStatesService(s *Service) *UserStatesService {
   225  	rs := &UserStatesService{s: s}
   226  	return rs
   227  }
   228  
   229  type UserStatesService struct {
   230  	s *Service
   231  }
   232  
   233  func NewUsersService(s *Service) *UsersService {
   234  	rs := &UsersService{s: s}
   235  	return rs
   236  }
   237  
   238  type UsersService struct {
   239  	s *Service
   240  }
   241  
   242  func NewV2Service(s *Service) *V2Service {
   243  	rs := &V2Service{s: s}
   244  	return rs
   245  }
   246  
   247  type V2Service struct {
   248  	s *Service
   249  }
   250  
   251  // AdWordsManagerAccountInfo: Information about a particular AdWords
   252  // Manager Account.
   253  // Read more at https://support.google.com/adwords/answer/6139186
   254  type AdWordsManagerAccountInfo struct {
   255  	// CustomerName: Name of the customer this account represents.
   256  	CustomerName string `json:"customerName,omitempty"`
   257  
   258  	// Id: The AdWords Manager Account id.
   259  	Id int64 `json:"id,omitempty,string"`
   260  
   261  	// ForceSendFields is a list of field names (e.g. "CustomerName") to
   262  	// unconditionally include in API requests. By default, fields with
   263  	// empty values are omitted from API requests. However, any non-pointer,
   264  	// non-interface field appearing in ForceSendFields will be sent to the
   265  	// server regardless of whether the field is empty or not. This may be
   266  	// used to include empty fields in Patch requests.
   267  	ForceSendFields []string `json:"-"`
   268  
   269  	// NullFields is a list of field names (e.g. "CustomerName") to include
   270  	// in API requests with the JSON null value. By default, fields with
   271  	// empty values are omitted from API requests. However, any field with
   272  	// an empty value appearing in NullFields will be sent to the server as
   273  	// null. It is an error if a field in this list has a non-empty value.
   274  	// This may be used to include null fields in Patch requests.
   275  	NullFields []string `json:"-"`
   276  }
   277  
   278  func (s *AdWordsManagerAccountInfo) MarshalJSON() ([]byte, error) {
   279  	type NoMethod AdWordsManagerAccountInfo
   280  	raw := NoMethod(*s)
   281  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   282  }
   283  
   284  // Analytics: Analytics data for a `Company` within a single day.
   285  type Analytics struct {
   286  	// Contacts: Instances of users contacting the `Company`
   287  	// on the specified date.
   288  	Contacts *AnalyticsDataPoint `json:"contacts,omitempty"`
   289  
   290  	// EventDate: Date on which these events occurred.
   291  	EventDate *Date `json:"eventDate,omitempty"`
   292  
   293  	// ProfileViews: Instances of users viewing the `Company` profile
   294  	// on the specified date.
   295  	ProfileViews *AnalyticsDataPoint `json:"profileViews,omitempty"`
   296  
   297  	// SearchViews: Instances of users seeing the `Company` in Google
   298  	// Partners Search results
   299  	// on the specified date.
   300  	SearchViews *AnalyticsDataPoint `json:"searchViews,omitempty"`
   301  
   302  	// ForceSendFields is a list of field names (e.g. "Contacts") to
   303  	// unconditionally include in API requests. By default, fields with
   304  	// empty values are omitted from API requests. However, any non-pointer,
   305  	// non-interface field appearing in ForceSendFields will be sent to the
   306  	// server regardless of whether the field is empty or not. This may be
   307  	// used to include empty fields in Patch requests.
   308  	ForceSendFields []string `json:"-"`
   309  
   310  	// NullFields is a list of field names (e.g. "Contacts") to include in
   311  	// API requests with the JSON null value. By default, fields with empty
   312  	// values are omitted from API requests. However, any field with an
   313  	// empty value appearing in NullFields will be sent to the server as
   314  	// null. It is an error if a field in this list has a non-empty value.
   315  	// This may be used to include null fields in Patch requests.
   316  	NullFields []string `json:"-"`
   317  }
   318  
   319  func (s *Analytics) MarshalJSON() ([]byte, error) {
   320  	type NoMethod Analytics
   321  	raw := NoMethod(*s)
   322  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   323  }
   324  
   325  // AnalyticsDataPoint: Details of the analytics events for a `Company`
   326  // within a single day.
   327  type AnalyticsDataPoint struct {
   328  	// EventCount: Number of times the type of event occurred.
   329  	// Meaning depends on context (e.g. profile views, contacts, etc.).
   330  	EventCount int64 `json:"eventCount,omitempty"`
   331  
   332  	// EventLocations: Location information of where these events occurred.
   333  	EventLocations []*LatLng `json:"eventLocations,omitempty"`
   334  
   335  	// ForceSendFields is a list of field names (e.g. "EventCount") to
   336  	// unconditionally include in API requests. By default, fields with
   337  	// empty values are omitted from API requests. However, any non-pointer,
   338  	// non-interface field appearing in ForceSendFields will be sent to the
   339  	// server regardless of whether the field is empty or not. This may be
   340  	// used to include empty fields in Patch requests.
   341  	ForceSendFields []string `json:"-"`
   342  
   343  	// NullFields is a list of field names (e.g. "EventCount") to include in
   344  	// API requests with the JSON null value. By default, fields with empty
   345  	// values are omitted from API requests. However, any field with an
   346  	// empty value appearing in NullFields will be sent to the server as
   347  	// null. It is an error if a field in this list has a non-empty value.
   348  	// This may be used to include null fields in Patch requests.
   349  	NullFields []string `json:"-"`
   350  }
   351  
   352  func (s *AnalyticsDataPoint) MarshalJSON() ([]byte, error) {
   353  	type NoMethod AnalyticsDataPoint
   354  	raw := NoMethod(*s)
   355  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   356  }
   357  
   358  // AnalyticsSummary: Analytics aggregated data for a `Company` for a
   359  // given date range.
   360  type AnalyticsSummary struct {
   361  	// ContactsCount: Aggregated number of times users contacted the
   362  	// `Company`
   363  	// for given date range.
   364  	ContactsCount int64 `json:"contactsCount,omitempty"`
   365  
   366  	// ProfileViewsCount: Aggregated number of profile views for the
   367  	// `Company` for given date range.
   368  	ProfileViewsCount int64 `json:"profileViewsCount,omitempty"`
   369  
   370  	// SearchViewsCount: Aggregated number of times users saw the
   371  	// `Company`
   372  	// in Google Partners Search results for given date range.
   373  	SearchViewsCount int64 `json:"searchViewsCount,omitempty"`
   374  
   375  	// ForceSendFields is a list of field names (e.g. "ContactsCount") to
   376  	// unconditionally include in API requests. By default, fields with
   377  	// empty values are omitted from API requests. However, any non-pointer,
   378  	// non-interface field appearing in ForceSendFields will be sent to the
   379  	// server regardless of whether the field is empty or not. This may be
   380  	// used to include empty fields in Patch requests.
   381  	ForceSendFields []string `json:"-"`
   382  
   383  	// NullFields is a list of field names (e.g. "ContactsCount") to include
   384  	// in API requests with the JSON null value. By default, fields with
   385  	// empty values are omitted from API requests. However, any field with
   386  	// an empty value appearing in NullFields will be sent to the server as
   387  	// null. It is an error if a field in this list has a non-empty value.
   388  	// This may be used to include null fields in Patch requests.
   389  	NullFields []string `json:"-"`
   390  }
   391  
   392  func (s *AnalyticsSummary) MarshalJSON() ([]byte, error) {
   393  	type NoMethod AnalyticsSummary
   394  	raw := NoMethod(*s)
   395  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   396  }
   397  
   398  // AvailableOffer: Available Offers to be distributed.
   399  type AvailableOffer struct {
   400  	// Available: The number of codes for this offer that are available for
   401  	// distribution.
   402  	Available int64 `json:"available,omitempty"`
   403  
   404  	// CountryOfferInfos: Offer info by country.
   405  	CountryOfferInfos []*CountryOfferInfo `json:"countryOfferInfos,omitempty"`
   406  
   407  	// Description: Description of the offer.
   408  	Description string `json:"description,omitempty"`
   409  
   410  	// Id: ID of this offer.
   411  	Id int64 `json:"id,omitempty,string"`
   412  
   413  	// MaxAccountAge: The maximum age of an account [in days] to be
   414  	// eligible.
   415  	MaxAccountAge int64 `json:"maxAccountAge,omitempty"`
   416  
   417  	// Name: Name of the offer.
   418  	Name string `json:"name,omitempty"`
   419  
   420  	// OfferLevel: Level of this offer.
   421  	//
   422  	// Possible values:
   423  	//   "OFFER_LEVEL_UNSPECIFIED" - Unset.
   424  	//   "OFFER_LEVEL_DENY_PROBLEM" - Users/Agencies that have no offers
   425  	// because of a problem.
   426  	//   "OFFER_LEVEL_DENY_CONTRACT" - Users/Agencies that have no offers
   427  	// due to contractural agreements.
   428  	//   "OFFER_LEVEL_MANUAL" - Users/Agencies that have a
   429  	// manually-configured limit.
   430  	//   "OFFER_LEVEL_LIMIT_0" - Some Agencies don't get any offers.
   431  	//   "OFFER_LEVEL_LIMIT_5" - Basic level gets 5 per month.
   432  	//   "OFFER_LEVEL_LIMIT_15" - Agencies with adequate AHI and spend get
   433  	// 15/month.
   434  	//   "OFFER_LEVEL_LIMIT_50" - Badged partners (even in grace) get 50 per
   435  	// month.
   436  	OfferLevel string `json:"offerLevel,omitempty"`
   437  
   438  	// OfferType: Type of offer.
   439  	//
   440  	// Possible values:
   441  	//   "OFFER_TYPE_UNSPECIFIED" - Unset.
   442  	//   "OFFER_TYPE_SPEND_X_GET_Y" - AdWords spend X get Y.
   443  	//   "OFFER_TYPE_VIDEO" - Youtube video.
   444  	//   "OFFER_TYPE_SPEND_MATCH" - Spend Match up to Y.
   445  	OfferType string `json:"offerType,omitempty"`
   446  
   447  	// QualifiedCustomer: Customers who qualify for this offer.
   448  	QualifiedCustomer []*OfferCustomer `json:"qualifiedCustomer,omitempty"`
   449  
   450  	// QualifiedCustomersComplete: Whether or not the list of qualified
   451  	// customers is definitely complete.
   452  	QualifiedCustomersComplete bool `json:"qualifiedCustomersComplete,omitempty"`
   453  
   454  	// ShowSpecialOfferCopy: Should special text be shown on the offers
   455  	// page.
   456  	ShowSpecialOfferCopy bool `json:"showSpecialOfferCopy,omitempty"`
   457  
   458  	// Terms: Terms of the offer.
   459  	Terms string `json:"terms,omitempty"`
   460  
   461  	// ForceSendFields is a list of field names (e.g. "Available") to
   462  	// unconditionally include in API requests. By default, fields with
   463  	// empty values are omitted from API requests. However, any non-pointer,
   464  	// non-interface field appearing in ForceSendFields will be sent to the
   465  	// server regardless of whether the field is empty or not. This may be
   466  	// used to include empty fields in Patch requests.
   467  	ForceSendFields []string `json:"-"`
   468  
   469  	// NullFields is a list of field names (e.g. "Available") to include in
   470  	// API requests with the JSON null value. By default, fields with empty
   471  	// values are omitted from API requests. However, any field with an
   472  	// empty value appearing in NullFields will be sent to the server as
   473  	// null. It is an error if a field in this list has a non-empty value.
   474  	// This may be used to include null fields in Patch requests.
   475  	NullFields []string `json:"-"`
   476  }
   477  
   478  func (s *AvailableOffer) MarshalJSON() ([]byte, error) {
   479  	type NoMethod AvailableOffer
   480  	raw := NoMethod(*s)
   481  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   482  }
   483  
   484  // Certification: A user's information on a specific certification.
   485  type Certification struct {
   486  	// Achieved: Whether this certification has been achieved.
   487  	Achieved bool `json:"achieved,omitempty"`
   488  
   489  	// CertificationType: The type of certification, the area of expertise.
   490  	//
   491  	// Possible values:
   492  	//   "CERTIFICATION_TYPE_UNSPECIFIED" - Unchosen.
   493  	//   "CT_ADWORDS" - AdWords certified.
   494  	//   "CT_YOUTUBE" - YouTube certified.
   495  	//   "CT_VIDEOADS" - VideoAds certified.
   496  	//   "CT_ANALYTICS" - Analytics certified.
   497  	//   "CT_DOUBLECLICK" - DoubleClick certified.
   498  	//   "CT_SHOPPING" - Shopping certified.
   499  	//   "CT_MOBILE" - Mobile certified.
   500  	//   "CT_DIGITAL_SALES" - Digital sales certified.
   501  	//   "CT_ADWORDS_SEARCH" - AdWords Search certified.
   502  	//   "CT_ADWORDS_DISPLAY" - AdWords Display certified.
   503  	//   "CT_MOBILE_SITES" - Mobile Sites certified.
   504  	CertificationType string `json:"certificationType,omitempty"`
   505  
   506  	// Expiration: Date this certification is due to expire.
   507  	Expiration string `json:"expiration,omitempty"`
   508  
   509  	// LastAchieved: The date the user last achieved certification.
   510  	LastAchieved string `json:"lastAchieved,omitempty"`
   511  
   512  	// Warning: Whether this certification is in the state of warning.
   513  	Warning bool `json:"warning,omitempty"`
   514  
   515  	// ForceSendFields is a list of field names (e.g. "Achieved") to
   516  	// unconditionally include in API requests. By default, fields with
   517  	// empty values are omitted from API requests. However, any non-pointer,
   518  	// non-interface field appearing in ForceSendFields will be sent to the
   519  	// server regardless of whether the field is empty or not. This may be
   520  	// used to include empty fields in Patch requests.
   521  	ForceSendFields []string `json:"-"`
   522  
   523  	// NullFields is a list of field names (e.g. "Achieved") to include in
   524  	// API requests with the JSON null value. By default, fields with empty
   525  	// values are omitted from API requests. However, any field with an
   526  	// empty value appearing in NullFields will be sent to the server as
   527  	// null. It is an error if a field in this list has a non-empty value.
   528  	// This may be used to include null fields in Patch requests.
   529  	NullFields []string `json:"-"`
   530  }
   531  
   532  func (s *Certification) MarshalJSON() ([]byte, error) {
   533  	type NoMethod Certification
   534  	raw := NoMethod(*s)
   535  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   536  }
   537  
   538  // CertificationExamStatus: Status for a Google Partners certification
   539  // exam.
   540  type CertificationExamStatus struct {
   541  	// NumberUsersPass: The number of people who have passed the
   542  	// certification exam.
   543  	NumberUsersPass int64 `json:"numberUsersPass,omitempty"`
   544  
   545  	// Type: The type of certification exam.
   546  	//
   547  	// Possible values:
   548  	//   "CERTIFICATION_EXAM_TYPE_UNSPECIFIED" - Unchosen.
   549  	//   "CET_ADWORDS_FUNDAMENTALS" - Adwords Fundamentals exam.
   550  	//   "CET_ADWORDS_ADVANCED_SEARCH" - AdWords advanced search exam.
   551  	//   "CET_ADWORDS_ADVANCED_DISPLAY" - AdWords advanced display exam.
   552  	//   "CET_VIDEO_ADS" - VideoAds exam.
   553  	//   "CET_DOUBLECLICK" - DoubleClick exam.
   554  	//   "CET_ANALYTICS" - Analytics exam.
   555  	//   "CET_SHOPPING" - Shopping exam.
   556  	//   "CET_MOBILE" - Mobile exam.
   557  	//   "CET_DIGITAL_SALES" - Digital Sales exam.
   558  	//   "CET_MOBILE_SITES" - Mobile Sites exam.
   559  	Type string `json:"type,omitempty"`
   560  
   561  	// ForceSendFields is a list of field names (e.g. "NumberUsersPass") to
   562  	// unconditionally include in API requests. By default, fields with
   563  	// empty values are omitted from API requests. However, any non-pointer,
   564  	// non-interface field appearing in ForceSendFields will be sent to the
   565  	// server regardless of whether the field is empty or not. This may be
   566  	// used to include empty fields in Patch requests.
   567  	ForceSendFields []string `json:"-"`
   568  
   569  	// NullFields is a list of field names (e.g. "NumberUsersPass") to
   570  	// include in API requests with the JSON null value. By default, fields
   571  	// with empty values are omitted from API requests. However, any field
   572  	// with an empty value appearing in NullFields will be sent to the
   573  	// server as null. It is an error if a field in this list has a
   574  	// non-empty value. This may be used to include null fields in Patch
   575  	// requests.
   576  	NullFields []string `json:"-"`
   577  }
   578  
   579  func (s *CertificationExamStatus) MarshalJSON() ([]byte, error) {
   580  	type NoMethod CertificationExamStatus
   581  	raw := NoMethod(*s)
   582  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   583  }
   584  
   585  // CertificationStatus: Google Partners certification status.
   586  type CertificationStatus struct {
   587  	// ExamStatuses: List of certification exam statuses.
   588  	ExamStatuses []*CertificationExamStatus `json:"examStatuses,omitempty"`
   589  
   590  	// IsCertified: Whether certification is passing.
   591  	IsCertified bool `json:"isCertified,omitempty"`
   592  
   593  	// Type: The type of the certification.
   594  	//
   595  	// Possible values:
   596  	//   "CERTIFICATION_TYPE_UNSPECIFIED" - Unchosen.
   597  	//   "CT_ADWORDS" - AdWords certified.
   598  	//   "CT_YOUTUBE" - YouTube certified.
   599  	//   "CT_VIDEOADS" - VideoAds certified.
   600  	//   "CT_ANALYTICS" - Analytics certified.
   601  	//   "CT_DOUBLECLICK" - DoubleClick certified.
   602  	//   "CT_SHOPPING" - Shopping certified.
   603  	//   "CT_MOBILE" - Mobile certified.
   604  	//   "CT_DIGITAL_SALES" - Digital sales certified.
   605  	//   "CT_ADWORDS_SEARCH" - AdWords Search certified.
   606  	//   "CT_ADWORDS_DISPLAY" - AdWords Display certified.
   607  	//   "CT_MOBILE_SITES" - Mobile Sites certified.
   608  	Type string `json:"type,omitempty"`
   609  
   610  	// UserCount: Number of people who are certified,
   611  	UserCount int64 `json:"userCount,omitempty"`
   612  
   613  	// ForceSendFields is a list of field names (e.g. "ExamStatuses") to
   614  	// unconditionally include in API requests. By default, fields with
   615  	// empty values are omitted from API requests. However, any non-pointer,
   616  	// non-interface field appearing in ForceSendFields will be sent to the
   617  	// server regardless of whether the field is empty or not. This may be
   618  	// used to include empty fields in Patch requests.
   619  	ForceSendFields []string `json:"-"`
   620  
   621  	// NullFields is a list of field names (e.g. "ExamStatuses") to include
   622  	// in API requests with the JSON null value. By default, fields with
   623  	// empty values are omitted from API requests. However, any field with
   624  	// an empty value appearing in NullFields will be sent to the server as
   625  	// null. It is an error if a field in this list has a non-empty value.
   626  	// This may be used to include null fields in Patch requests.
   627  	NullFields []string `json:"-"`
   628  }
   629  
   630  func (s *CertificationStatus) MarshalJSON() ([]byte, error) {
   631  	type NoMethod CertificationStatus
   632  	raw := NoMethod(*s)
   633  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   634  }
   635  
   636  // Company: A company resource in the Google Partners API. Once
   637  // certified, it qualifies
   638  // for being searched by advertisers.
   639  type Company struct {
   640  	// AdditionalWebsites: URL of the company's additional websites used to
   641  	// verify the dynamic badges.
   642  	// These are stored as full URLs as entered by the user, but only the
   643  	// TLD will
   644  	// be used for the actual verification.
   645  	AdditionalWebsites []string `json:"additionalWebsites,omitempty"`
   646  
   647  	// AutoApprovalEmailDomains: Email domains that allow users with a
   648  	// matching email address to get
   649  	// auto-approved for associating with this company.
   650  	AutoApprovalEmailDomains []string `json:"autoApprovalEmailDomains,omitempty"`
   651  
   652  	// BadgeAuthorityInAwn: Whether the company's badge authority is in AWN
   653  	BadgeAuthorityInAwn bool `json:"badgeAuthorityInAwn,omitempty"`
   654  
   655  	// BadgeTier: Partner badge tier
   656  	//
   657  	// Possible values:
   658  	//   "BADGE_TIER_NONE" - Tier badge is not set.
   659  	//   "BADGE_TIER_REGULAR" - Agency has regular partner badge.
   660  	//   "BADGE_TIER_PREMIER" - Agency has premier badge.
   661  	BadgeTier string `json:"badgeTier,omitempty"`
   662  
   663  	// CertificationStatuses: The list of Google Partners certification
   664  	// statuses for the company.
   665  	CertificationStatuses []*CertificationStatus `json:"certificationStatuses,omitempty"`
   666  
   667  	// CompanyTypes: Company type labels listed on the company's profile.
   668  	//
   669  	// Possible values:
   670  	//   "COMPANY_TYPE_UNSPECIFIED" - Unchosen.
   671  	//   "FULL_SERVICE_AGENCY" - Handles all aspects of the advertising
   672  	// process.
   673  	//   "MEDIA_AGENCY" - Focuses solely on an advertiser's media placement.
   674  	//   "CREATIVE_AGENCY" - Plans/executes advertising campaigns.
   675  	//   "CDIGITAL_AGENCY" - Like a
   676  	// FULL_SERVICE_AGENCY,
   677  	// but specializing in digital.
   678  	//   "SEM_SEO" - Increases visibility in search engine result pages.
   679  	//   "PERFORMANCE_MARKETING" - Drives promotional efforts for immediate
   680  	// impact.
   681  	//   "ADVERTISING_TOOL_DEVELOPMENT" - Focuses on bid management,
   682  	// conversion, reporting.
   683  	//   "PR" - Establishes favorable relationship with public through
   684  	// low/no-cost
   685  	// communications.
   686  	//   "SELF_MANAGED" - Does not manage other company's accounts, manages
   687  	// own marketing programs.
   688  	//   "RESELLER" - Full-service AdWords account management for local
   689  	// businesses.
   690  	CompanyTypes []string `json:"companyTypes,omitempty"`
   691  
   692  	// ConvertedMinMonthlyBudget: The minimum monthly budget that the
   693  	// company accepts for partner business,
   694  	// converted to the requested currency code.
   695  	ConvertedMinMonthlyBudget *Money `json:"convertedMinMonthlyBudget,omitempty"`
   696  
   697  	// Id: The ID of the company.
   698  	Id string `json:"id,omitempty"`
   699  
   700  	// Industries: Industries the company can help with.
   701  	//
   702  	// Possible values:
   703  	//   "INDUSTRY_UNSPECIFIED" - Unchosen.
   704  	//   "I_AUTOMOTIVE" - The automotive industry.
   705  	//   "I_BUSINESS_TO_BUSINESS" - The business-to-business industry.
   706  	//   "I_CONSUMER_PACKAGED_GOODS" - The consumer packaged goods industry.
   707  	//   "I_EDUCATION" - The education industry.
   708  	//   "I_FINANCE" - The finance industry.
   709  	//   "I_HEALTHCARE" - The healthcare industry.
   710  	//   "I_MEDIA_AND_ENTERTAINMENT" - The media and entertainment industry.
   711  	//   "I_RETAIL" - The retail industry.
   712  	//   "I_TECHNOLOGY" - The technology industry.
   713  	//   "I_TRAVEL" - The travel industry.
   714  	Industries []string `json:"industries,omitempty"`
   715  
   716  	// LocalizedInfos: The list of localized info for the company.
   717  	LocalizedInfos []*LocalizedCompanyInfo `json:"localizedInfos,omitempty"`
   718  
   719  	// Locations: The list of all company locations.
   720  	// If set, must include the
   721  	// primary_location
   722  	// in the list.
   723  	Locations []*Location `json:"locations,omitempty"`
   724  
   725  	// Name: The name of the company.
   726  	Name string `json:"name,omitempty"`
   727  
   728  	// OriginalMinMonthlyBudget: The unconverted minimum monthly budget that
   729  	// the company accepts for partner
   730  	// business.
   731  	OriginalMinMonthlyBudget *Money `json:"originalMinMonthlyBudget,omitempty"`
   732  
   733  	// PrimaryAdwordsManagerAccountId: The Primary AdWords Manager Account
   734  	// id.
   735  	PrimaryAdwordsManagerAccountId int64 `json:"primaryAdwordsManagerAccountId,omitempty,string"`
   736  
   737  	// PrimaryLanguageCode: The primary language code of the company, as
   738  	// defined by
   739  	// <a href="https://tools.ietf.org/html/bcp47">BCP 47</a>
   740  	// (IETF BCP 47, "Tags for Identifying Languages").
   741  	PrimaryLanguageCode string `json:"primaryLanguageCode,omitempty"`
   742  
   743  	// PrimaryLocation: The primary location of the company.
   744  	PrimaryLocation *Location `json:"primaryLocation,omitempty"`
   745  
   746  	// ProfileStatus: The public viewability status of the company's
   747  	// profile.
   748  	//
   749  	// Possible values:
   750  	//   "COMPANY_PROFILE_STATUS_UNSPECIFIED" - Unchosen.
   751  	//   "HIDDEN" - Company profile does not show up publicly.
   752  	//   "PUBLISHED" - Company profile can only be viewed by the profile's
   753  	// URL
   754  	// and not by Google Partner Search.
   755  	//   "SEARCHABLE" - Company profile can be viewed by the profile's
   756  	// URL
   757  	// and by Google Partner Search.
   758  	ProfileStatus string `json:"profileStatus,omitempty"`
   759  
   760  	// PublicProfile: Basic information from the company's public profile.
   761  	PublicProfile *PublicProfile `json:"publicProfile,omitempty"`
   762  
   763  	// Ranks: Information related to the ranking of the company within the
   764  	// list of
   765  	// companies.
   766  	Ranks []*Rank `json:"ranks,omitempty"`
   767  
   768  	// Services: Services the company can help with.
   769  	//
   770  	// Possible values:
   771  	//   "SERVICE_UNSPECIFIED" - Unchosen.
   772  	//   "S_ADVANCED_ADWORDS_SUPPORT" - Help with advanced AdWords support.
   773  	//   "S_ADVERTISING_ON_GOOGLE" - Help with advertising on Google.
   774  	//   "S_AN_ENHANCED_WEBSITE" - Help with an enhanced website.
   775  	//   "S_AN_ONLINE_MARKETING_PLAN" - Help with an online marketing plan.
   776  	//   "S_MOBILE_AND_VIDEO_ADS" - Help with mobile and video ads.
   777  	//   "S_MOBILE_WEBSITE_SERVICES" - Help with mobile websites.
   778  	Services []string `json:"services,omitempty"`
   779  
   780  	// SpecializationStatus: The list of Google Partners specialization
   781  	// statuses for the company.
   782  	SpecializationStatus []*SpecializationStatus `json:"specializationStatus,omitempty"`
   783  
   784  	// WebsiteUrl: URL of the company's website.
   785  	WebsiteUrl string `json:"websiteUrl,omitempty"`
   786  
   787  	// ServerResponse contains the HTTP response code and headers from the
   788  	// server.
   789  	googleapi.ServerResponse `json:"-"`
   790  
   791  	// ForceSendFields is a list of field names (e.g. "AdditionalWebsites")
   792  	// to unconditionally include in API requests. By default, fields with
   793  	// empty values are omitted from API requests. However, any non-pointer,
   794  	// non-interface field appearing in ForceSendFields will be sent to the
   795  	// server regardless of whether the field is empty or not. This may be
   796  	// used to include empty fields in Patch requests.
   797  	ForceSendFields []string `json:"-"`
   798  
   799  	// NullFields is a list of field names (e.g. "AdditionalWebsites") to
   800  	// include in API requests with the JSON null value. By default, fields
   801  	// with empty values are omitted from API requests. However, any field
   802  	// with an empty value appearing in NullFields will be sent to the
   803  	// server as null. It is an error if a field in this list has a
   804  	// non-empty value. This may be used to include null fields in Patch
   805  	// requests.
   806  	NullFields []string `json:"-"`
   807  }
   808  
   809  func (s *Company) MarshalJSON() ([]byte, error) {
   810  	type NoMethod Company
   811  	raw := NoMethod(*s)
   812  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   813  }
   814  
   815  // CompanyRelation: A CompanyRelation resource representing information
   816  // about a user's
   817  // affiliation and standing with a company in Partners.
   818  type CompanyRelation struct {
   819  	// Address: The primary address for this company.
   820  	Address string `json:"address,omitempty"`
   821  
   822  	// BadgeTier: Whether the company is a Partner.
   823  	//
   824  	// Possible values:
   825  	//   "BADGE_TIER_NONE" - Tier badge is not set.
   826  	//   "BADGE_TIER_REGULAR" - Agency has regular partner badge.
   827  	//   "BADGE_TIER_PREMIER" - Agency has premier badge.
   828  	BadgeTier string `json:"badgeTier,omitempty"`
   829  
   830  	// CompanyAdmin: Indicates if the user is an admin for this company.
   831  	CompanyAdmin bool `json:"companyAdmin,omitempty"`
   832  
   833  	// CompanyId: The ID of the company. There may be no id if this is
   834  	// a
   835  	// pending company.5
   836  	CompanyId string `json:"companyId,omitempty"`
   837  
   838  	// CreationTime: The timestamp of when affiliation was
   839  	// requested.
   840  	// @OutputOnly
   841  	CreationTime string `json:"creationTime,omitempty"`
   842  
   843  	// InternalCompanyId: The internal company ID.
   844  	// Only available for a whitelisted set of api clients.
   845  	InternalCompanyId string `json:"internalCompanyId,omitempty"`
   846  
   847  	// IsPending: The flag that indicates if the company is pending
   848  	// verification.
   849  	IsPending bool `json:"isPending,omitempty"`
   850  
   851  	// LogoUrl: A URL to a profile photo, e.g. a G+ profile photo.
   852  	LogoUrl string `json:"logoUrl,omitempty"`
   853  
   854  	// ManagerAccount: The AdWords manager account # associated this
   855  	// company.
   856  	ManagerAccount int64 `json:"managerAccount,omitempty,string"`
   857  
   858  	// Name: The name (in the company's primary language) for the company.
   859  	Name string `json:"name,omitempty"`
   860  
   861  	// PhoneNumber: The phone number for the company's primary address.
   862  	PhoneNumber string `json:"phoneNumber,omitempty"`
   863  
   864  	// PrimaryAddress: The primary location of the company.
   865  	PrimaryAddress *Location `json:"primaryAddress,omitempty"`
   866  
   867  	// PrimaryCountryCode: The primary country code of the company.
   868  	PrimaryCountryCode string `json:"primaryCountryCode,omitempty"`
   869  
   870  	// PrimaryLanguageCode: The primary language code of the company.
   871  	PrimaryLanguageCode string `json:"primaryLanguageCode,omitempty"`
   872  
   873  	// ResolvedTimestamp: The timestamp when the user was
   874  	// approved.
   875  	// @OutputOnly
   876  	ResolvedTimestamp string `json:"resolvedTimestamp,omitempty"`
   877  
   878  	// Segment: The segment the company is classified as.
   879  	//
   880  	// Possible values:
   881  	//   "COMPANY_SEGMENT_UNKNOWN" - Default segment indicates an unknown.
   882  	//   "COMPANY_SEGMENT_NAL" - Segment representing a selected group of
   883  	// Partners
   884  	//   "COMPANY_SEGMENT_PSP" - Segment representing Premier SMB Partners,
   885  	// an AdWords partnership program.
   886  	//   "COMPANY_SEGMENT_PPSP" - A segment of Premier SMB Partners that
   887  	// have relationship with Google.
   888  	Segment []string `json:"segment,omitempty"`
   889  
   890  	// SpecializationStatus: The list of Google Partners specialization
   891  	// statuses for the company.
   892  	SpecializationStatus []*SpecializationStatus `json:"specializationStatus,omitempty"`
   893  
   894  	// State: The state of relationship, in terms of approvals.
   895  	//
   896  	// Possible values:
   897  	//   "USER_COMPANY_REATION_STATE_NONE_SPECIFIED" - Default unspecified
   898  	// value.
   899  	//   "USER_COMPANY_RELATION_STATE_AWAIT_EMAIL" - User has filled in a
   900  	// request to be associated with an company.
   901  	// Now waiting email confirmation.
   902  	//   "USER_COMPANY_RELATION_STATE_AWAIT_ADMIN" - Pending approval from
   903  	// company.
   904  	// Email confirmation will not approve this one.
   905  	//   "USER_COMPANY_RELATION_STATE_APPROVED" - Approved by company.
   906  	State string `json:"state,omitempty"`
   907  
   908  	// Website: The website URL for this company.
   909  	Website string `json:"website,omitempty"`
   910  
   911  	// ServerResponse contains the HTTP response code and headers from the
   912  	// server.
   913  	googleapi.ServerResponse `json:"-"`
   914  
   915  	// ForceSendFields is a list of field names (e.g. "Address") to
   916  	// unconditionally include in API requests. By default, fields with
   917  	// empty values are omitted from API requests. However, any non-pointer,
   918  	// non-interface field appearing in ForceSendFields will be sent to the
   919  	// server regardless of whether the field is empty or not. This may be
   920  	// used to include empty fields in Patch requests.
   921  	ForceSendFields []string `json:"-"`
   922  
   923  	// NullFields is a list of field names (e.g. "Address") to include in
   924  	// API requests with the JSON null value. By default, fields with empty
   925  	// values are omitted from API requests. However, any field with an
   926  	// empty value appearing in NullFields will be sent to the server as
   927  	// null. It is an error if a field in this list has a non-empty value.
   928  	// This may be used to include null fields in Patch requests.
   929  	NullFields []string `json:"-"`
   930  }
   931  
   932  func (s *CompanyRelation) MarshalJSON() ([]byte, error) {
   933  	type NoMethod CompanyRelation
   934  	raw := NoMethod(*s)
   935  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   936  }
   937  
   938  // CountryOfferInfo: Offer info by country.
   939  type CountryOfferInfo struct {
   940  	// GetYAmount: (localized) Get Y amount for that country's offer.
   941  	GetYAmount string `json:"getYAmount,omitempty"`
   942  
   943  	// OfferCountryCode: Country code for which offer codes may be
   944  	// requested.
   945  	OfferCountryCode string `json:"offerCountryCode,omitempty"`
   946  
   947  	// OfferType: Type of offer country is eligible for.
   948  	//
   949  	// Possible values:
   950  	//   "OFFER_TYPE_UNSPECIFIED" - Unset.
   951  	//   "OFFER_TYPE_SPEND_X_GET_Y" - AdWords spend X get Y.
   952  	//   "OFFER_TYPE_VIDEO" - Youtube video.
   953  	//   "OFFER_TYPE_SPEND_MATCH" - Spend Match up to Y.
   954  	OfferType string `json:"offerType,omitempty"`
   955  
   956  	// SpendXAmount: (localized) Spend X amount for that country's offer.
   957  	SpendXAmount string `json:"spendXAmount,omitempty"`
   958  
   959  	// ForceSendFields is a list of field names (e.g. "GetYAmount") to
   960  	// unconditionally include in API requests. By default, fields with
   961  	// empty values are omitted from API requests. However, any non-pointer,
   962  	// non-interface field appearing in ForceSendFields will be sent to the
   963  	// server regardless of whether the field is empty or not. This may be
   964  	// used to include empty fields in Patch requests.
   965  	ForceSendFields []string `json:"-"`
   966  
   967  	// NullFields is a list of field names (e.g. "GetYAmount") to include in
   968  	// API requests with the JSON null value. By default, fields with empty
   969  	// values are omitted from API requests. However, any field with an
   970  	// empty value appearing in NullFields will be sent to the server as
   971  	// null. It is an error if a field in this list has a non-empty value.
   972  	// This may be used to include null fields in Patch requests.
   973  	NullFields []string `json:"-"`
   974  }
   975  
   976  func (s *CountryOfferInfo) MarshalJSON() ([]byte, error) {
   977  	type NoMethod CountryOfferInfo
   978  	raw := NoMethod(*s)
   979  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
   980  }
   981  
   982  // CreateLeadRequest: Request message for CreateLead.
   983  type CreateLeadRequest struct {
   984  	// Lead: The lead resource. The `LeadType` must not be
   985  	// `LEAD_TYPE_UNSPECIFIED`
   986  	// and either `email` or `phone_number` must be provided.
   987  	Lead *Lead `json:"lead,omitempty"`
   988  
   989  	// RecaptchaChallenge: <a
   990  	// href="https://www.google.com/recaptcha/">reCaptcha</a> challenge
   991  	// info.
   992  	RecaptchaChallenge *RecaptchaChallenge `json:"recaptchaChallenge,omitempty"`
   993  
   994  	// RequestMetadata: Current request metadata.
   995  	RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"`
   996  
   997  	// ForceSendFields is a list of field names (e.g. "Lead") to
   998  	// unconditionally include in API requests. By default, fields with
   999  	// empty values are omitted from API requests. However, any non-pointer,
  1000  	// non-interface field appearing in ForceSendFields will be sent to the
  1001  	// server regardless of whether the field is empty or not. This may be
  1002  	// used to include empty fields in Patch requests.
  1003  	ForceSendFields []string `json:"-"`
  1004  
  1005  	// NullFields is a list of field names (e.g. "Lead") to include in API
  1006  	// requests with the JSON null value. By default, fields with empty
  1007  	// values are omitted from API requests. However, any field with an
  1008  	// empty value appearing in NullFields will be sent to the server as
  1009  	// null. It is an error if a field in this list has a non-empty value.
  1010  	// This may be used to include null fields in Patch requests.
  1011  	NullFields []string `json:"-"`
  1012  }
  1013  
  1014  func (s *CreateLeadRequest) MarshalJSON() ([]byte, error) {
  1015  	type NoMethod CreateLeadRequest
  1016  	raw := NoMethod(*s)
  1017  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1018  }
  1019  
  1020  // CreateLeadResponse: Response message for CreateLead.
  1021  type CreateLeadResponse struct {
  1022  	// Lead: Lead that was created depending on the outcome of
  1023  	// <a href="https://www.google.com/recaptcha/">reCaptcha</a> validation.
  1024  	Lead *Lead `json:"lead,omitempty"`
  1025  
  1026  	// RecaptchaStatus: The outcome of <a
  1027  	// href="https://www.google.com/recaptcha/">reCaptcha</a>
  1028  	// validation.
  1029  	//
  1030  	// Possible values:
  1031  	//   "RECAPTCHA_STATUS_UNSPECIFIED" - Unchosen.
  1032  	//   "RS_NOT_NEEDED" - No reCaptcha validation needed.
  1033  	//   "RS_PASSED" - reCaptcha challenge passed.
  1034  	//   "RS_FAILED" - reCaptcha challenge failed.
  1035  	RecaptchaStatus string `json:"recaptchaStatus,omitempty"`
  1036  
  1037  	// ResponseMetadata: Current response metadata.
  1038  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1039  
  1040  	// ServerResponse contains the HTTP response code and headers from the
  1041  	// server.
  1042  	googleapi.ServerResponse `json:"-"`
  1043  
  1044  	// ForceSendFields is a list of field names (e.g. "Lead") to
  1045  	// unconditionally include in API requests. By default, fields with
  1046  	// empty values are omitted from API requests. However, any non-pointer,
  1047  	// non-interface field appearing in ForceSendFields will be sent to the
  1048  	// server regardless of whether the field is empty or not. This may be
  1049  	// used to include empty fields in Patch requests.
  1050  	ForceSendFields []string `json:"-"`
  1051  
  1052  	// NullFields is a list of field names (e.g. "Lead") to include in API
  1053  	// requests with the JSON null value. By default, fields with empty
  1054  	// values are omitted from API requests. However, any field with an
  1055  	// empty value appearing in NullFields will be sent to the server as
  1056  	// null. It is an error if a field in this list has a non-empty value.
  1057  	// This may be used to include null fields in Patch requests.
  1058  	NullFields []string `json:"-"`
  1059  }
  1060  
  1061  func (s *CreateLeadResponse) MarshalJSON() ([]byte, error) {
  1062  	type NoMethod CreateLeadResponse
  1063  	raw := NoMethod(*s)
  1064  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1065  }
  1066  
  1067  // Date: Represents a whole or partial calendar date, e.g. a birthday.
  1068  // The time of day
  1069  // and time zone are either specified elsewhere or are not significant.
  1070  // The date
  1071  // is relative to the Proleptic Gregorian Calendar. This can
  1072  // represent:
  1073  //
  1074  // * A full date, with non-zero year, month and day values
  1075  // * A month and day value, with a zero year, e.g. an anniversary
  1076  // * A year on its own, with zero month and day values
  1077  // * A year and month value, with a zero day, e.g. a credit card
  1078  // expiration date
  1079  //
  1080  // Related types are google.type.TimeOfDay and
  1081  // `google.protobuf.Timestamp`.
  1082  type Date struct {
  1083  	// Day: Day of month. Must be from 1 to 31 and valid for the year and
  1084  	// month, or 0
  1085  	// if specifying a year by itself or a year and month where the day is
  1086  	// not
  1087  	// significant.
  1088  	Day int64 `json:"day,omitempty"`
  1089  
  1090  	// Month: Month of year. Must be from 1 to 12, or 0 if specifying a year
  1091  	// without a
  1092  	// month and day.
  1093  	Month int64 `json:"month,omitempty"`
  1094  
  1095  	// Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
  1096  	// without
  1097  	// a year.
  1098  	Year int64 `json:"year,omitempty"`
  1099  
  1100  	// ForceSendFields is a list of field names (e.g. "Day") to
  1101  	// unconditionally include in API requests. By default, fields with
  1102  	// empty values are omitted from API requests. However, any non-pointer,
  1103  	// non-interface field appearing in ForceSendFields will be sent to the
  1104  	// server regardless of whether the field is empty or not. This may be
  1105  	// used to include empty fields in Patch requests.
  1106  	ForceSendFields []string `json:"-"`
  1107  
  1108  	// NullFields is a list of field names (e.g. "Day") to include in API
  1109  	// requests with the JSON null value. By default, fields with empty
  1110  	// values are omitted from API requests. However, any field with an
  1111  	// empty value appearing in NullFields will be sent to the server as
  1112  	// null. It is an error if a field in this list has a non-empty value.
  1113  	// This may be used to include null fields in Patch requests.
  1114  	NullFields []string `json:"-"`
  1115  }
  1116  
  1117  func (s *Date) MarshalJSON() ([]byte, error) {
  1118  	type NoMethod Date
  1119  	raw := NoMethod(*s)
  1120  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1121  }
  1122  
  1123  // DebugInfo: Debug information about this request.
  1124  type DebugInfo struct {
  1125  	// ServerInfo: Info about the server that serviced this request.
  1126  	ServerInfo string `json:"serverInfo,omitempty"`
  1127  
  1128  	// ServerTraceInfo: Server-side debug stack trace.
  1129  	ServerTraceInfo string `json:"serverTraceInfo,omitempty"`
  1130  
  1131  	// ServiceUrl: URL of the service that handled this request.
  1132  	ServiceUrl string `json:"serviceUrl,omitempty"`
  1133  
  1134  	// ForceSendFields is a list of field names (e.g. "ServerInfo") to
  1135  	// unconditionally include in API requests. By default, fields with
  1136  	// empty values are omitted from API requests. However, any non-pointer,
  1137  	// non-interface field appearing in ForceSendFields will be sent to the
  1138  	// server regardless of whether the field is empty or not. This may be
  1139  	// used to include empty fields in Patch requests.
  1140  	ForceSendFields []string `json:"-"`
  1141  
  1142  	// NullFields is a list of field names (e.g. "ServerInfo") to include in
  1143  	// API requests with the JSON null value. By default, fields with empty
  1144  	// values are omitted from API requests. However, any field with an
  1145  	// empty value appearing in NullFields will be sent to the server as
  1146  	// null. It is an error if a field in this list has a non-empty value.
  1147  	// This may be used to include null fields in Patch requests.
  1148  	NullFields []string `json:"-"`
  1149  }
  1150  
  1151  func (s *DebugInfo) MarshalJSON() ([]byte, error) {
  1152  	type NoMethod DebugInfo
  1153  	raw := NoMethod(*s)
  1154  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1155  }
  1156  
  1157  // Empty: A generic empty message that you can re-use to avoid defining
  1158  // duplicated
  1159  // empty messages in your APIs. A typical example is to use it as the
  1160  // request
  1161  // or the response type of an API method. For instance:
  1162  //
  1163  //	service Foo {
  1164  //	  rpc Bar(google.protobuf.Empty) returns
  1165  //
  1166  // (google.protobuf.Empty);
  1167  //
  1168  //	}
  1169  //
  1170  // The JSON representation for `Empty` is empty JSON object `{}`.
  1171  type Empty struct {
  1172  	// ServerResponse contains the HTTP response code and headers from the
  1173  	// server.
  1174  	googleapi.ServerResponse `json:"-"`
  1175  }
  1176  
  1177  // EventData: Key value data pair for an event.
  1178  type EventData struct {
  1179  	// Key: Data type.
  1180  	//
  1181  	// Possible values:
  1182  	//   "EVENT_DATA_TYPE_UNSPECIFIED" - Unchosen.
  1183  	//   "ACTION" - Action data.
  1184  	//   "AGENCY_ID" - Agency ID data.
  1185  	//   "AGENCY_NAME" - Agency name data.
  1186  	//   "AGENCY_PHONE_NUMBER" - Agency phone number data.
  1187  	//   "AGENCY_WEBSITE" - Agency website data.
  1188  	//   "BUDGET" - Budget data.
  1189  	//   "CENTER_POINT" - Center-point data.
  1190  	//   "CERTIFICATION" - Certification data.
  1191  	//   "COMMENT" - Comment data.
  1192  	//   "COUNTRY" - Country data.
  1193  	//   "CURRENCY" - Currency data.
  1194  	//   "CURRENTLY_VIEWED_AGENCY_ID" - Currently viewed agency ID data.
  1195  	//   "DISTANCE" - Distance data.
  1196  	//   "DISTANCE_TYPE" - Distance type data.
  1197  	//   "EXAM" - Exam data.
  1198  	//   "HISTORY_TOKEN" - History token data.
  1199  	//   "ID" - Identifier data.
  1200  	//   "INDUSTRY" - Industry data.
  1201  	//   "INSIGHT_TAG" - Insight tag data.
  1202  	//   "LANGUAGE" - Language data.
  1203  	//   "LOCATION" - Location  data.
  1204  	//   "MARKETING_OPT_IN" - Marketing opt-in data.
  1205  	//   "QUERY" - Query data.
  1206  	//   "SEARCH_START_INDEX" - Search start index data.
  1207  	//   "SERVICE" - Service data.
  1208  	//   "SHOW_VOW" - Show vow data.
  1209  	//   "SOLUTION" - Solution data.
  1210  	//   "TRAFFIC_SOURCE_ID" - Traffic source ID data.
  1211  	//   "TRAFFIC_SUB_ID" - Traffic sub ID data.
  1212  	//   "VIEW_PORT" - Viewport data.
  1213  	//   "WEBSITE" - Website data.
  1214  	//   "DETAILS" - Details data.
  1215  	//   "EXPERIMENT_ID" - Experiment ID data.
  1216  	//   "GPS_MOTIVATION" - Google Partner Search motivation data.
  1217  	//   "URL" - URL data.
  1218  	//   "ELEMENT_FOCUS" - Element we wanted user to focus on.
  1219  	//   "PROGRESS" - Progress when viewing an item \[0-100\].
  1220  	Key string `json:"key,omitempty"`
  1221  
  1222  	// Values: Data values.
  1223  	Values []string `json:"values,omitempty"`
  1224  
  1225  	// ForceSendFields is a list of field names (e.g. "Key") to
  1226  	// unconditionally include in API requests. By default, fields with
  1227  	// empty values are omitted from API requests. However, any non-pointer,
  1228  	// non-interface field appearing in ForceSendFields will be sent to the
  1229  	// server regardless of whether the field is empty or not. This may be
  1230  	// used to include empty fields in Patch requests.
  1231  	ForceSendFields []string `json:"-"`
  1232  
  1233  	// NullFields is a list of field names (e.g. "Key") to include in API
  1234  	// requests with the JSON null value. By default, fields with empty
  1235  	// values are omitted from API requests. However, any field with an
  1236  	// empty value appearing in NullFields will be sent to the server as
  1237  	// null. It is an error if a field in this list has a non-empty value.
  1238  	// This may be used to include null fields in Patch requests.
  1239  	NullFields []string `json:"-"`
  1240  }
  1241  
  1242  func (s *EventData) MarshalJSON() ([]byte, error) {
  1243  	type NoMethod EventData
  1244  	raw := NoMethod(*s)
  1245  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1246  }
  1247  
  1248  // ExamStatus: A user's information on a specific exam.
  1249  type ExamStatus struct {
  1250  	// ExamType: The type of the exam.
  1251  	//
  1252  	// Possible values:
  1253  	//   "CERTIFICATION_EXAM_TYPE_UNSPECIFIED" - Unchosen.
  1254  	//   "CET_ADWORDS_FUNDAMENTALS" - Adwords Fundamentals exam.
  1255  	//   "CET_ADWORDS_ADVANCED_SEARCH" - AdWords advanced search exam.
  1256  	//   "CET_ADWORDS_ADVANCED_DISPLAY" - AdWords advanced display exam.
  1257  	//   "CET_VIDEO_ADS" - VideoAds exam.
  1258  	//   "CET_DOUBLECLICK" - DoubleClick exam.
  1259  	//   "CET_ANALYTICS" - Analytics exam.
  1260  	//   "CET_SHOPPING" - Shopping exam.
  1261  	//   "CET_MOBILE" - Mobile exam.
  1262  	//   "CET_DIGITAL_SALES" - Digital Sales exam.
  1263  	//   "CET_MOBILE_SITES" - Mobile Sites exam.
  1264  	ExamType string `json:"examType,omitempty"`
  1265  
  1266  	// Expiration: Date this exam is due to expire.
  1267  	Expiration string `json:"expiration,omitempty"`
  1268  
  1269  	// LastPassed: The date the user last passed this exam.
  1270  	LastPassed string `json:"lastPassed,omitempty"`
  1271  
  1272  	// Passed: Whether this exam has been passed and not expired.
  1273  	Passed bool `json:"passed,omitempty"`
  1274  
  1275  	// Taken: The date the user last taken this exam.
  1276  	Taken string `json:"taken,omitempty"`
  1277  
  1278  	// Warning: Whether this exam is in the state of warning.
  1279  	Warning bool `json:"warning,omitempty"`
  1280  
  1281  	// ForceSendFields is a list of field names (e.g. "ExamType") to
  1282  	// unconditionally include in API requests. By default, fields with
  1283  	// empty values are omitted from API requests. However, any non-pointer,
  1284  	// non-interface field appearing in ForceSendFields will be sent to the
  1285  	// server regardless of whether the field is empty or not. This may be
  1286  	// used to include empty fields in Patch requests.
  1287  	ForceSendFields []string `json:"-"`
  1288  
  1289  	// NullFields is a list of field names (e.g. "ExamType") to include in
  1290  	// API requests with the JSON null value. By default, fields with empty
  1291  	// values are omitted from API requests. However, any field with an
  1292  	// empty value appearing in NullFields will be sent to the server as
  1293  	// null. It is an error if a field in this list has a non-empty value.
  1294  	// This may be used to include null fields in Patch requests.
  1295  	NullFields []string `json:"-"`
  1296  }
  1297  
  1298  func (s *ExamStatus) MarshalJSON() ([]byte, error) {
  1299  	type NoMethod ExamStatus
  1300  	raw := NoMethod(*s)
  1301  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1302  }
  1303  
  1304  // GetCompanyResponse: Response message for GetCompany.
  1305  type GetCompanyResponse struct {
  1306  	// Company: The company.
  1307  	Company *Company `json:"company,omitempty"`
  1308  
  1309  	// ResponseMetadata: Current response metadata.
  1310  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1311  
  1312  	// ServerResponse contains the HTTP response code and headers from the
  1313  	// server.
  1314  	googleapi.ServerResponse `json:"-"`
  1315  
  1316  	// ForceSendFields is a list of field names (e.g. "Company") to
  1317  	// unconditionally include in API requests. By default, fields with
  1318  	// empty values are omitted from API requests. However, any non-pointer,
  1319  	// non-interface field appearing in ForceSendFields will be sent to the
  1320  	// server regardless of whether the field is empty or not. This may be
  1321  	// used to include empty fields in Patch requests.
  1322  	ForceSendFields []string `json:"-"`
  1323  
  1324  	// NullFields is a list of field names (e.g. "Company") to include in
  1325  	// API requests with the JSON null value. By default, fields with empty
  1326  	// values are omitted from API requests. However, any field with an
  1327  	// empty value appearing in NullFields will be sent to the server as
  1328  	// null. It is an error if a field in this list has a non-empty value.
  1329  	// This may be used to include null fields in Patch requests.
  1330  	NullFields []string `json:"-"`
  1331  }
  1332  
  1333  func (s *GetCompanyResponse) MarshalJSON() ([]byte, error) {
  1334  	type NoMethod GetCompanyResponse
  1335  	raw := NoMethod(*s)
  1336  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1337  }
  1338  
  1339  // GetPartnersStatusResponse: Response message for
  1340  // GetPartnersStatus.
  1341  type GetPartnersStatusResponse struct {
  1342  	// ResponseMetadata: Current response metadata.
  1343  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1344  
  1345  	// ServerResponse contains the HTTP response code and headers from the
  1346  	// server.
  1347  	googleapi.ServerResponse `json:"-"`
  1348  
  1349  	// ForceSendFields is a list of field names (e.g. "ResponseMetadata") to
  1350  	// unconditionally include in API requests. By default, fields with
  1351  	// empty values are omitted from API requests. However, any non-pointer,
  1352  	// non-interface field appearing in ForceSendFields will be sent to the
  1353  	// server regardless of whether the field is empty or not. This may be
  1354  	// used to include empty fields in Patch requests.
  1355  	ForceSendFields []string `json:"-"`
  1356  
  1357  	// NullFields is a list of field names (e.g. "ResponseMetadata") to
  1358  	// include in API requests with the JSON null value. By default, fields
  1359  	// with empty values are omitted from API requests. However, any field
  1360  	// with an empty value appearing in NullFields will be sent to the
  1361  	// server as null. It is an error if a field in this list has a
  1362  	// non-empty value. This may be used to include null fields in Patch
  1363  	// requests.
  1364  	NullFields []string `json:"-"`
  1365  }
  1366  
  1367  func (s *GetPartnersStatusResponse) MarshalJSON() ([]byte, error) {
  1368  	type NoMethod GetPartnersStatusResponse
  1369  	raw := NoMethod(*s)
  1370  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1371  }
  1372  
  1373  // HistoricalOffer: Historical information about a Google Partners
  1374  // Offer.
  1375  type HistoricalOffer struct {
  1376  	// AdwordsUrl: Client's AdWords page URL.
  1377  	AdwordsUrl string `json:"adwordsUrl,omitempty"`
  1378  
  1379  	// ClientEmail: Email address for client.
  1380  	ClientEmail string `json:"clientEmail,omitempty"`
  1381  
  1382  	// ClientId: ID of client.
  1383  	ClientId int64 `json:"clientId,omitempty,string"`
  1384  
  1385  	// ClientName: Name of the client.
  1386  	ClientName string `json:"clientName,omitempty"`
  1387  
  1388  	// CreationTime: Time offer was first created.
  1389  	CreationTime string `json:"creationTime,omitempty"`
  1390  
  1391  	// ExpirationTime: Time this offer expires.
  1392  	ExpirationTime string `json:"expirationTime,omitempty"`
  1393  
  1394  	// LastModifiedTime: Time last action was taken.
  1395  	LastModifiedTime string `json:"lastModifiedTime,omitempty"`
  1396  
  1397  	// OfferCode: Offer code.
  1398  	OfferCode string `json:"offerCode,omitempty"`
  1399  
  1400  	// OfferCountryCode: Country Code for the offer country.
  1401  	OfferCountryCode string `json:"offerCountryCode,omitempty"`
  1402  
  1403  	// OfferType: Type of offer.
  1404  	//
  1405  	// Possible values:
  1406  	//   "OFFER_TYPE_UNSPECIFIED" - Unset.
  1407  	//   "OFFER_TYPE_SPEND_X_GET_Y" - AdWords spend X get Y.
  1408  	//   "OFFER_TYPE_VIDEO" - Youtube video.
  1409  	//   "OFFER_TYPE_SPEND_MATCH" - Spend Match up to Y.
  1410  	OfferType string `json:"offerType,omitempty"`
  1411  
  1412  	// SenderName: Name (First + Last) of the partners user to whom the
  1413  	// incentive is allocated.
  1414  	SenderName string `json:"senderName,omitempty"`
  1415  
  1416  	// Status: Status of the offer.
  1417  	//
  1418  	// Possible values:
  1419  	//   "OFFER_STATUS_UNSPECIFIED" - Unset.
  1420  	//   "OFFER_STATUS_DISTRIBUTED" - Offer distributed.
  1421  	//   "OFFER_STATUS_REDEEMED" - Offer redeemed.
  1422  	//   "OFFER_STATUS_AWARDED" - Offer awarded.
  1423  	//   "OFFER_STATUS_EXPIRED" - Offer expired.
  1424  	Status string `json:"status,omitempty"`
  1425  
  1426  	// ForceSendFields is a list of field names (e.g. "AdwordsUrl") to
  1427  	// unconditionally include in API requests. By default, fields with
  1428  	// empty values are omitted from API requests. However, any non-pointer,
  1429  	// non-interface field appearing in ForceSendFields will be sent to the
  1430  	// server regardless of whether the field is empty or not. This may be
  1431  	// used to include empty fields in Patch requests.
  1432  	ForceSendFields []string `json:"-"`
  1433  
  1434  	// NullFields is a list of field names (e.g. "AdwordsUrl") to include in
  1435  	// API requests with the JSON null value. By default, fields with empty
  1436  	// values are omitted from API requests. However, any field with an
  1437  	// empty value appearing in NullFields will be sent to the server as
  1438  	// null. It is an error if a field in this list has a non-empty value.
  1439  	// This may be used to include null fields in Patch requests.
  1440  	NullFields []string `json:"-"`
  1441  }
  1442  
  1443  func (s *HistoricalOffer) MarshalJSON() ([]byte, error) {
  1444  	type NoMethod HistoricalOffer
  1445  	raw := NoMethod(*s)
  1446  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1447  }
  1448  
  1449  // LatLng: An object representing a latitude/longitude pair. This is
  1450  // expressed as a pair
  1451  // of doubles representing degrees latitude and degrees longitude.
  1452  // Unless
  1453  // specified otherwise, this must conform to the
  1454  // <a
  1455  // href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
  1456  // st
  1457  // andard</a>. Values must be within normalized ranges.
  1458  type LatLng struct {
  1459  	// Latitude: The latitude in degrees. It must be in the range [-90.0,
  1460  	// +90.0].
  1461  	Latitude float64 `json:"latitude,omitempty"`
  1462  
  1463  	// Longitude: The longitude in degrees. It must be in the range [-180.0,
  1464  	// +180.0].
  1465  	Longitude float64 `json:"longitude,omitempty"`
  1466  
  1467  	// ForceSendFields is a list of field names (e.g. "Latitude") to
  1468  	// unconditionally include in API requests. By default, fields with
  1469  	// empty values are omitted from API requests. However, any non-pointer,
  1470  	// non-interface field appearing in ForceSendFields will be sent to the
  1471  	// server regardless of whether the field is empty or not. This may be
  1472  	// used to include empty fields in Patch requests.
  1473  	ForceSendFields []string `json:"-"`
  1474  
  1475  	// NullFields is a list of field names (e.g. "Latitude") to include in
  1476  	// API requests with the JSON null value. By default, fields with empty
  1477  	// values are omitted from API requests. However, any field with an
  1478  	// empty value appearing in NullFields will be sent to the server as
  1479  	// null. It is an error if a field in this list has a non-empty value.
  1480  	// This may be used to include null fields in Patch requests.
  1481  	NullFields []string `json:"-"`
  1482  }
  1483  
  1484  func (s *LatLng) MarshalJSON() ([]byte, error) {
  1485  	type NoMethod LatLng
  1486  	raw := NoMethod(*s)
  1487  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1488  }
  1489  
  1490  func (s *LatLng) UnmarshalJSON(data []byte) error {
  1491  	type NoMethod LatLng
  1492  	var s1 struct {
  1493  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
  1494  		Longitude gensupport.JSONFloat64 `json:"longitude"`
  1495  		*NoMethod
  1496  	}
  1497  	s1.NoMethod = (*NoMethod)(s)
  1498  	if err := json.Unmarshal(data, &s1); err != nil {
  1499  		return err
  1500  	}
  1501  	s.Latitude = float64(s1.Latitude)
  1502  	s.Longitude = float64(s1.Longitude)
  1503  	return nil
  1504  }
  1505  
  1506  // Lead: A lead resource that represents an advertiser contact for a
  1507  // `Company`. These
  1508  // are usually generated via Google Partner Search (the advertiser
  1509  // portal).
  1510  type Lead struct {
  1511  	// AdwordsCustomerId: The AdWords Customer ID of the lead.
  1512  	AdwordsCustomerId int64 `json:"adwordsCustomerId,omitempty,string"`
  1513  
  1514  	// Comments: Comments lead source gave.
  1515  	Comments string `json:"comments,omitempty"`
  1516  
  1517  	// CreateTime: Timestamp of when this lead was created.
  1518  	CreateTime string `json:"createTime,omitempty"`
  1519  
  1520  	// Email: Email address of lead source.
  1521  	Email string `json:"email,omitempty"`
  1522  
  1523  	// FamilyName: Last name of lead source.
  1524  	FamilyName string `json:"familyName,omitempty"`
  1525  
  1526  	// GivenName: First name of lead source.
  1527  	GivenName string `json:"givenName,omitempty"`
  1528  
  1529  	// GpsMotivations: List of reasons for using Google Partner Search and
  1530  	// creating a lead.
  1531  	//
  1532  	// Possible values:
  1533  	//   "GPS_MOTIVATION_UNSPECIFIED" - Unchosen.
  1534  	//   "GPSM_HELP_WITH_ADVERTISING" - Advertiser needs help with their
  1535  	// advertising.
  1536  	//   "GPSM_HELP_WITH_WEBSITE" - Advertiser needs help with their
  1537  	// website.
  1538  	//   "GPSM_NO_WEBSITE" - Advertiser does not have a website.
  1539  	GpsMotivations []string `json:"gpsMotivations,omitempty"`
  1540  
  1541  	// Id: ID of the lead.
  1542  	Id string `json:"id,omitempty"`
  1543  
  1544  	// LanguageCode: Language code of the lead's language preference, as
  1545  	// defined by
  1546  	// <a href="https://tools.ietf.org/html/bcp47">BCP 47</a>
  1547  	// (IETF BCP 47, "Tags for Identifying Languages").
  1548  	LanguageCode string `json:"languageCode,omitempty"`
  1549  
  1550  	// MarketingOptIn: Whether or not the lead signed up for marketing
  1551  	// emails
  1552  	MarketingOptIn bool `json:"marketingOptIn,omitempty"`
  1553  
  1554  	// MinMonthlyBudget: The minimum monthly budget lead source is willing
  1555  	// to spend.
  1556  	MinMonthlyBudget *Money `json:"minMonthlyBudget,omitempty"`
  1557  
  1558  	// PhoneNumber: Phone number of lead source.
  1559  	PhoneNumber string `json:"phoneNumber,omitempty"`
  1560  
  1561  	// State: The lead's state in relation to the company.
  1562  	//
  1563  	// Possible values:
  1564  	//   "LEAD_STATE_UNSPECIFIED" - Unchosen.
  1565  	//   "LEAD" - Lead not yet contacted.
  1566  	//   "CONTACTED" - Lead has been contacted.
  1567  	//   "CLIENT" - Lead has become a client.
  1568  	//   "OTHER" - Lead in a state not covered by other options.
  1569  	State string `json:"state,omitempty"`
  1570  
  1571  	// Type: Type of lead.
  1572  	//
  1573  	// Possible values:
  1574  	//   "LEAD_TYPE_UNSPECIFIED" - Unchosen.
  1575  	//   "LT_GPS" - Google Partner Search.
  1576  	Type string `json:"type,omitempty"`
  1577  
  1578  	// WebsiteUrl: Website URL of lead source.
  1579  	WebsiteUrl string `json:"websiteUrl,omitempty"`
  1580  
  1581  	// ServerResponse contains the HTTP response code and headers from the
  1582  	// server.
  1583  	googleapi.ServerResponse `json:"-"`
  1584  
  1585  	// ForceSendFields is a list of field names (e.g. "AdwordsCustomerId")
  1586  	// to unconditionally include in API requests. By default, fields with
  1587  	// empty values are omitted from API requests. However, any non-pointer,
  1588  	// non-interface field appearing in ForceSendFields will be sent to the
  1589  	// server regardless of whether the field is empty or not. This may be
  1590  	// used to include empty fields in Patch requests.
  1591  	ForceSendFields []string `json:"-"`
  1592  
  1593  	// NullFields is a list of field names (e.g. "AdwordsCustomerId") to
  1594  	// include in API requests with the JSON null value. By default, fields
  1595  	// with empty values are omitted from API requests. However, any field
  1596  	// with an empty value appearing in NullFields will be sent to the
  1597  	// server as null. It is an error if a field in this list has a
  1598  	// non-empty value. This may be used to include null fields in Patch
  1599  	// requests.
  1600  	NullFields []string `json:"-"`
  1601  }
  1602  
  1603  func (s *Lead) MarshalJSON() ([]byte, error) {
  1604  	type NoMethod Lead
  1605  	raw := NoMethod(*s)
  1606  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1607  }
  1608  
  1609  // ListAnalyticsResponse: Response message for
  1610  // ListAnalytics.
  1611  type ListAnalyticsResponse struct {
  1612  	// Analytics: The list of analytics.
  1613  	// Sorted in ascending order of
  1614  	// Analytics.event_date.
  1615  	Analytics []*Analytics `json:"analytics,omitempty"`
  1616  
  1617  	// AnalyticsSummary: Aggregated information across the
  1618  	// response's
  1619  	// analytics.
  1620  	AnalyticsSummary *AnalyticsSummary `json:"analyticsSummary,omitempty"`
  1621  
  1622  	// NextPageToken: A token to retrieve next page of results.
  1623  	// Pass this value in the `ListAnalyticsRequest.page_token` field in
  1624  	// the
  1625  	// subsequent call to
  1626  	// ListAnalytics to retrieve the
  1627  	// next page of results.
  1628  	NextPageToken string `json:"nextPageToken,omitempty"`
  1629  
  1630  	// ResponseMetadata: Current response metadata.
  1631  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1632  
  1633  	// ServerResponse contains the HTTP response code and headers from the
  1634  	// server.
  1635  	googleapi.ServerResponse `json:"-"`
  1636  
  1637  	// ForceSendFields is a list of field names (e.g. "Analytics") to
  1638  	// unconditionally include in API requests. By default, fields with
  1639  	// empty values are omitted from API requests. However, any non-pointer,
  1640  	// non-interface field appearing in ForceSendFields will be sent to the
  1641  	// server regardless of whether the field is empty or not. This may be
  1642  	// used to include empty fields in Patch requests.
  1643  	ForceSendFields []string `json:"-"`
  1644  
  1645  	// NullFields is a list of field names (e.g. "Analytics") to include in
  1646  	// API requests with the JSON null value. By default, fields with empty
  1647  	// values are omitted from API requests. However, any field with an
  1648  	// empty value appearing in NullFields will be sent to the server as
  1649  	// null. It is an error if a field in this list has a non-empty value.
  1650  	// This may be used to include null fields in Patch requests.
  1651  	NullFields []string `json:"-"`
  1652  }
  1653  
  1654  func (s *ListAnalyticsResponse) MarshalJSON() ([]byte, error) {
  1655  	type NoMethod ListAnalyticsResponse
  1656  	raw := NoMethod(*s)
  1657  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1658  }
  1659  
  1660  // ListCompaniesResponse: Response message for
  1661  // ListCompanies.
  1662  type ListCompaniesResponse struct {
  1663  	// Companies: The list of companies.
  1664  	Companies []*Company `json:"companies,omitempty"`
  1665  
  1666  	// NextPageToken: A token to retrieve next page of results.
  1667  	// Pass this value in the `ListCompaniesRequest.page_token` field in
  1668  	// the
  1669  	// subsequent call to
  1670  	// ListCompanies to retrieve the
  1671  	// next page of results.
  1672  	NextPageToken string `json:"nextPageToken,omitempty"`
  1673  
  1674  	// ResponseMetadata: Current response metadata.
  1675  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1676  
  1677  	// ServerResponse contains the HTTP response code and headers from the
  1678  	// server.
  1679  	googleapi.ServerResponse `json:"-"`
  1680  
  1681  	// ForceSendFields is a list of field names (e.g. "Companies") to
  1682  	// unconditionally include in API requests. By default, fields with
  1683  	// empty values are omitted from API requests. However, any non-pointer,
  1684  	// non-interface field appearing in ForceSendFields will be sent to the
  1685  	// server regardless of whether the field is empty or not. This may be
  1686  	// used to include empty fields in Patch requests.
  1687  	ForceSendFields []string `json:"-"`
  1688  
  1689  	// NullFields is a list of field names (e.g. "Companies") to include in
  1690  	// API requests with the JSON null value. By default, fields with empty
  1691  	// values are omitted from API requests. However, any field with an
  1692  	// empty value appearing in NullFields will be sent to the server as
  1693  	// null. It is an error if a field in this list has a non-empty value.
  1694  	// This may be used to include null fields in Patch requests.
  1695  	NullFields []string `json:"-"`
  1696  }
  1697  
  1698  func (s *ListCompaniesResponse) MarshalJSON() ([]byte, error) {
  1699  	type NoMethod ListCompaniesResponse
  1700  	raw := NoMethod(*s)
  1701  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1702  }
  1703  
  1704  // ListLeadsResponse: Response message for ListLeads.
  1705  type ListLeadsResponse struct {
  1706  	// Leads: The list of leads.
  1707  	Leads []*Lead `json:"leads,omitempty"`
  1708  
  1709  	// NextPageToken: A token to retrieve next page of results.
  1710  	// Pass this value in the `ListLeadsRequest.page_token` field in
  1711  	// the
  1712  	// subsequent call to
  1713  	// ListLeads to retrieve the
  1714  	// next page of results.
  1715  	NextPageToken string `json:"nextPageToken,omitempty"`
  1716  
  1717  	// ResponseMetadata: Current response metadata.
  1718  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1719  
  1720  	// TotalSize: The total count of leads for the given company.
  1721  	TotalSize int64 `json:"totalSize,omitempty"`
  1722  
  1723  	// ServerResponse contains the HTTP response code and headers from the
  1724  	// server.
  1725  	googleapi.ServerResponse `json:"-"`
  1726  
  1727  	// ForceSendFields is a list of field names (e.g. "Leads") to
  1728  	// unconditionally include in API requests. By default, fields with
  1729  	// empty values are omitted from API requests. However, any non-pointer,
  1730  	// non-interface field appearing in ForceSendFields will be sent to the
  1731  	// server regardless of whether the field is empty or not. This may be
  1732  	// used to include empty fields in Patch requests.
  1733  	ForceSendFields []string `json:"-"`
  1734  
  1735  	// NullFields is a list of field names (e.g. "Leads") to include in API
  1736  	// requests with the JSON null value. By default, fields with empty
  1737  	// values are omitted from API requests. However, any field with an
  1738  	// empty value appearing in NullFields will be sent to the server as
  1739  	// null. It is an error if a field in this list has a non-empty value.
  1740  	// This may be used to include null fields in Patch requests.
  1741  	NullFields []string `json:"-"`
  1742  }
  1743  
  1744  func (s *ListLeadsResponse) MarshalJSON() ([]byte, error) {
  1745  	type NoMethod ListLeadsResponse
  1746  	raw := NoMethod(*s)
  1747  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1748  }
  1749  
  1750  // ListOffersHistoryResponse: Response for ListOfferHistory.
  1751  type ListOffersHistoryResponse struct {
  1752  	// CanShowEntireCompany: True if the user has the option to show entire
  1753  	// company history.
  1754  	CanShowEntireCompany bool `json:"canShowEntireCompany,omitempty"`
  1755  
  1756  	// NextPageToken: Supply this token in a ListOffersHistoryRequest to
  1757  	// retrieve the next page.
  1758  	NextPageToken string `json:"nextPageToken,omitempty"`
  1759  
  1760  	// Offers: Historical offers meeting request.
  1761  	Offers []*HistoricalOffer `json:"offers,omitempty"`
  1762  
  1763  	// ResponseMetadata: Current response metadata.
  1764  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1765  
  1766  	// ShowingEntireCompany: True if this response is showing entire company
  1767  	// history.
  1768  	ShowingEntireCompany bool `json:"showingEntireCompany,omitempty"`
  1769  
  1770  	// TotalResults: Number of results across all pages.
  1771  	TotalResults int64 `json:"totalResults,omitempty"`
  1772  
  1773  	// ServerResponse contains the HTTP response code and headers from the
  1774  	// server.
  1775  	googleapi.ServerResponse `json:"-"`
  1776  
  1777  	// ForceSendFields is a list of field names (e.g.
  1778  	// "CanShowEntireCompany") to unconditionally include in API requests.
  1779  	// By default, fields with empty values are omitted from API requests.
  1780  	// However, any non-pointer, non-interface field appearing in
  1781  	// ForceSendFields will be sent to the server regardless of whether the
  1782  	// field is empty or not. This may be used to include empty fields in
  1783  	// Patch requests.
  1784  	ForceSendFields []string `json:"-"`
  1785  
  1786  	// NullFields is a list of field names (e.g. "CanShowEntireCompany") to
  1787  	// include in API requests with the JSON null value. By default, fields
  1788  	// with empty values are omitted from API requests. However, any field
  1789  	// with an empty value appearing in NullFields will be sent to the
  1790  	// server as null. It is an error if a field in this list has a
  1791  	// non-empty value. This may be used to include null fields in Patch
  1792  	// requests.
  1793  	NullFields []string `json:"-"`
  1794  }
  1795  
  1796  func (s *ListOffersHistoryResponse) MarshalJSON() ([]byte, error) {
  1797  	type NoMethod ListOffersHistoryResponse
  1798  	raw := NoMethod(*s)
  1799  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1800  }
  1801  
  1802  // ListOffersResponse: Response for ListOffer.
  1803  type ListOffersResponse struct {
  1804  	// AvailableOffers: Available Offers to be distributed.
  1805  	AvailableOffers []*AvailableOffer `json:"availableOffers,omitempty"`
  1806  
  1807  	// NoOfferReason: Reason why no Offers are available.
  1808  	//
  1809  	// Possible values:
  1810  	//   "NO_OFFER_REASON_UNSPECIFIED" - Unset.
  1811  	//   "NO_OFFER_REASON_NO_MCC" - Not an MCC.
  1812  	//   "NO_OFFER_REASON_LIMIT_REACHED" - Offer limit has been reached.
  1813  	//   "NO_OFFER_REASON_INELIGIBLE" - Ineligible for offers.
  1814  	NoOfferReason string `json:"noOfferReason,omitempty"`
  1815  
  1816  	// ResponseMetadata: Current response metadata.
  1817  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1818  
  1819  	// ServerResponse contains the HTTP response code and headers from the
  1820  	// server.
  1821  	googleapi.ServerResponse `json:"-"`
  1822  
  1823  	// ForceSendFields is a list of field names (e.g. "AvailableOffers") to
  1824  	// unconditionally include in API requests. By default, fields with
  1825  	// empty values are omitted from API requests. However, any non-pointer,
  1826  	// non-interface field appearing in ForceSendFields will be sent to the
  1827  	// server regardless of whether the field is empty or not. This may be
  1828  	// used to include empty fields in Patch requests.
  1829  	ForceSendFields []string `json:"-"`
  1830  
  1831  	// NullFields is a list of field names (e.g. "AvailableOffers") to
  1832  	// include in API requests with the JSON null value. By default, fields
  1833  	// with empty values are omitted from API requests. However, any field
  1834  	// with an empty value appearing in NullFields will be sent to the
  1835  	// server as null. It is an error if a field in this list has a
  1836  	// non-empty value. This may be used to include null fields in Patch
  1837  	// requests.
  1838  	NullFields []string `json:"-"`
  1839  }
  1840  
  1841  func (s *ListOffersResponse) MarshalJSON() ([]byte, error) {
  1842  	type NoMethod ListOffersResponse
  1843  	raw := NoMethod(*s)
  1844  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1845  }
  1846  
  1847  // ListUserStatesResponse: Response message for
  1848  // ListUserStates.
  1849  type ListUserStatesResponse struct {
  1850  	// ResponseMetadata: Current response metadata.
  1851  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  1852  
  1853  	// UserStates: User's states.
  1854  	//
  1855  	// Possible values:
  1856  	//   "USER_STATE_UNSPECIFIED" - Unchosen.
  1857  	//   "US_REQUIRES_RECAPTCHA_FOR_GPS_CONTACT" - User must pass <a
  1858  	// href="https://www.google.com/recaptcha/">reCaptcha</a> to
  1859  	// contact a Partner via Google Partner Search.
  1860  	UserStates []string `json:"userStates,omitempty"`
  1861  
  1862  	// ServerResponse contains the HTTP response code and headers from the
  1863  	// server.
  1864  	googleapi.ServerResponse `json:"-"`
  1865  
  1866  	// ForceSendFields is a list of field names (e.g. "ResponseMetadata") to
  1867  	// unconditionally include in API requests. By default, fields with
  1868  	// empty values are omitted from API requests. However, any non-pointer,
  1869  	// non-interface field appearing in ForceSendFields will be sent to the
  1870  	// server regardless of whether the field is empty or not. This may be
  1871  	// used to include empty fields in Patch requests.
  1872  	ForceSendFields []string `json:"-"`
  1873  
  1874  	// NullFields is a list of field names (e.g. "ResponseMetadata") to
  1875  	// include in API requests with the JSON null value. By default, fields
  1876  	// with empty values are omitted from API requests. However, any field
  1877  	// with an empty value appearing in NullFields will be sent to the
  1878  	// server as null. It is an error if a field in this list has a
  1879  	// non-empty value. This may be used to include null fields in Patch
  1880  	// requests.
  1881  	NullFields []string `json:"-"`
  1882  }
  1883  
  1884  func (s *ListUserStatesResponse) MarshalJSON() ([]byte, error) {
  1885  	type NoMethod ListUserStatesResponse
  1886  	raw := NoMethod(*s)
  1887  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1888  }
  1889  
  1890  // LocalizedCompanyInfo: The localized company information.
  1891  type LocalizedCompanyInfo struct {
  1892  	// CountryCodes: List of country codes for the localized company info.
  1893  	CountryCodes []string `json:"countryCodes,omitempty"`
  1894  
  1895  	// DisplayName: Localized display name.
  1896  	DisplayName string `json:"displayName,omitempty"`
  1897  
  1898  	// LanguageCode: Language code of the localized company info, as defined
  1899  	// by
  1900  	// <a href="https://tools.ietf.org/html/bcp47">BCP 47</a>
  1901  	// (IETF BCP 47, "Tags for Identifying Languages").
  1902  	LanguageCode string `json:"languageCode,omitempty"`
  1903  
  1904  	// Overview: Localized brief description that the company uses to
  1905  	// advertise themselves.
  1906  	Overview string `json:"overview,omitempty"`
  1907  
  1908  	// ForceSendFields is a list of field names (e.g. "CountryCodes") to
  1909  	// unconditionally include in API requests. By default, fields with
  1910  	// empty values are omitted from API requests. However, any non-pointer,
  1911  	// non-interface field appearing in ForceSendFields will be sent to the
  1912  	// server regardless of whether the field is empty or not. This may be
  1913  	// used to include empty fields in Patch requests.
  1914  	ForceSendFields []string `json:"-"`
  1915  
  1916  	// NullFields is a list of field names (e.g. "CountryCodes") to include
  1917  	// in API requests with the JSON null value. By default, fields with
  1918  	// empty values are omitted from API requests. However, any field with
  1919  	// an empty value appearing in NullFields will be sent to the server as
  1920  	// null. It is an error if a field in this list has a non-empty value.
  1921  	// This may be used to include null fields in Patch requests.
  1922  	NullFields []string `json:"-"`
  1923  }
  1924  
  1925  func (s *LocalizedCompanyInfo) MarshalJSON() ([]byte, error) {
  1926  	type NoMethod LocalizedCompanyInfo
  1927  	raw := NoMethod(*s)
  1928  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1929  }
  1930  
  1931  // Location: A location with address and geographic coordinates. May
  1932  // optionally contain a
  1933  // detailed (multi-field) version of the address.
  1934  type Location struct {
  1935  	// Address: The single string version of the address.
  1936  	Address string `json:"address,omitempty"`
  1937  
  1938  	// AddressLine: The following address lines represent the most specific
  1939  	// part of any
  1940  	// address.
  1941  	AddressLine []string `json:"addressLine,omitempty"`
  1942  
  1943  	// AdministrativeArea: Top-level administrative subdivision of this
  1944  	// country.
  1945  	AdministrativeArea string `json:"administrativeArea,omitempty"`
  1946  
  1947  	// DependentLocality: Dependent locality or sublocality. Used for UK
  1948  	// dependent localities, or
  1949  	// neighborhoods or boroughs in other locations.
  1950  	DependentLocality string `json:"dependentLocality,omitempty"`
  1951  
  1952  	// LanguageCode: Language code of the address. Should be in BCP 47
  1953  	// format.
  1954  	LanguageCode string `json:"languageCode,omitempty"`
  1955  
  1956  	// LatLng: The latitude and longitude of the location, in degrees.
  1957  	LatLng *LatLng `json:"latLng,omitempty"`
  1958  
  1959  	// Locality: Generally refers to the city/town portion of an address.
  1960  	Locality string `json:"locality,omitempty"`
  1961  
  1962  	// PostalCode: Values are frequently alphanumeric.
  1963  	PostalCode string `json:"postalCode,omitempty"`
  1964  
  1965  	// RegionCode: CLDR (Common Locale Data Repository) region code .
  1966  	RegionCode string `json:"regionCode,omitempty"`
  1967  
  1968  	// SortingCode: Use of this code is very country-specific, but will
  1969  	// refer to a secondary
  1970  	// classification code for sorting mail.
  1971  	SortingCode string `json:"sortingCode,omitempty"`
  1972  
  1973  	// ForceSendFields is a list of field names (e.g. "Address") to
  1974  	// unconditionally include in API requests. By default, fields with
  1975  	// empty values are omitted from API requests. However, any non-pointer,
  1976  	// non-interface field appearing in ForceSendFields will be sent to the
  1977  	// server regardless of whether the field is empty or not. This may be
  1978  	// used to include empty fields in Patch requests.
  1979  	ForceSendFields []string `json:"-"`
  1980  
  1981  	// NullFields is a list of field names (e.g. "Address") to include in
  1982  	// API requests with the JSON null value. By default, fields with empty
  1983  	// values are omitted from API requests. However, any field with an
  1984  	// empty value appearing in NullFields will be sent to the server as
  1985  	// null. It is an error if a field in this list has a non-empty value.
  1986  	// This may be used to include null fields in Patch requests.
  1987  	NullFields []string `json:"-"`
  1988  }
  1989  
  1990  func (s *Location) MarshalJSON() ([]byte, error) {
  1991  	type NoMethod Location
  1992  	raw := NoMethod(*s)
  1993  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1994  }
  1995  
  1996  // LogMessageRequest: Request message for
  1997  // LogClientMessage.
  1998  type LogMessageRequest struct {
  1999  	// ClientInfo: Map of client info, such as URL, browser navigator,
  2000  	// browser platform, etc.
  2001  	ClientInfo map[string]string `json:"clientInfo,omitempty"`
  2002  
  2003  	// Details: Details about the client message.
  2004  	Details string `json:"details,omitempty"`
  2005  
  2006  	// Level: Message level of client message.
  2007  	//
  2008  	// Possible values:
  2009  	//   "MESSAGE_LEVEL_UNSPECIFIED" - Unchosen.
  2010  	//   "ML_FINE" - Message level for tracing information.
  2011  	//   "ML_INFO" - Message level for informational messages.
  2012  	//   "ML_WARNING" - Message level for potential problems.
  2013  	//   "ML_SEVERE" - Message level for serious failures.
  2014  	Level string `json:"level,omitempty"`
  2015  
  2016  	// RequestMetadata: Current request metadata.
  2017  	RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"`
  2018  
  2019  	// ForceSendFields is a list of field names (e.g. "ClientInfo") to
  2020  	// unconditionally include in API requests. By default, fields with
  2021  	// empty values are omitted from API requests. However, any non-pointer,
  2022  	// non-interface field appearing in ForceSendFields will be sent to the
  2023  	// server regardless of whether the field is empty or not. This may be
  2024  	// used to include empty fields in Patch requests.
  2025  	ForceSendFields []string `json:"-"`
  2026  
  2027  	// NullFields is a list of field names (e.g. "ClientInfo") to include in
  2028  	// API requests with the JSON null value. By default, fields with empty
  2029  	// values are omitted from API requests. However, any field with an
  2030  	// empty value appearing in NullFields will be sent to the server as
  2031  	// null. It is an error if a field in this list has a non-empty value.
  2032  	// This may be used to include null fields in Patch requests.
  2033  	NullFields []string `json:"-"`
  2034  }
  2035  
  2036  func (s *LogMessageRequest) MarshalJSON() ([]byte, error) {
  2037  	type NoMethod LogMessageRequest
  2038  	raw := NoMethod(*s)
  2039  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2040  }
  2041  
  2042  // LogMessageResponse: Response message for
  2043  // LogClientMessage.
  2044  type LogMessageResponse struct {
  2045  	// ResponseMetadata: Current response metadata.
  2046  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  2047  
  2048  	// ServerResponse contains the HTTP response code and headers from the
  2049  	// server.
  2050  	googleapi.ServerResponse `json:"-"`
  2051  
  2052  	// ForceSendFields is a list of field names (e.g. "ResponseMetadata") to
  2053  	// unconditionally include in API requests. By default, fields with
  2054  	// empty values are omitted from API requests. However, any non-pointer,
  2055  	// non-interface field appearing in ForceSendFields will be sent to the
  2056  	// server regardless of whether the field is empty or not. This may be
  2057  	// used to include empty fields in Patch requests.
  2058  	ForceSendFields []string `json:"-"`
  2059  
  2060  	// NullFields is a list of field names (e.g. "ResponseMetadata") to
  2061  	// include in API requests with the JSON null value. By default, fields
  2062  	// with empty values are omitted from API requests. However, any field
  2063  	// with an empty value appearing in NullFields will be sent to the
  2064  	// server as null. It is an error if a field in this list has a
  2065  	// non-empty value. This may be used to include null fields in Patch
  2066  	// requests.
  2067  	NullFields []string `json:"-"`
  2068  }
  2069  
  2070  func (s *LogMessageResponse) MarshalJSON() ([]byte, error) {
  2071  	type NoMethod LogMessageResponse
  2072  	raw := NoMethod(*s)
  2073  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2074  }
  2075  
  2076  // LogUserEventRequest: Request message for
  2077  // LogUserEvent.
  2078  type LogUserEventRequest struct {
  2079  	// EventAction: The action that occurred.
  2080  	//
  2081  	// Possible values:
  2082  	//   "EVENT_ACTION_UNSPECIFIED" - Unchosen.
  2083  	//   "SMB_CLICKED_FIND_A_PARTNER_BUTTON_BOTTOM" - Advertiser clicked
  2084  	// `Find a partner` bottom button.
  2085  	//   "SMB_CLICKED_FIND_A_PARTNER_BUTTON_TOP" - Advertiser clicked `Find
  2086  	// a partner` top button.
  2087  	//   "AGENCY_CLICKED_JOIN_NOW_BUTTON_BOTTOM" - Agency clicked `Join now`
  2088  	// bottom button.
  2089  	//   "AGENCY_CLICKED_JOIN_NOW_BUTTON_TOP" - Agency clicked `Join now`
  2090  	// top button.
  2091  	//   "SMB_CANCELED_PARTNER_CONTACT_FORM" - Advertiser canceled partner
  2092  	// contact form.
  2093  	//   "SMB_CLICKED_CONTACT_A_PARTNER" - Advertiser started partner
  2094  	// contact form.
  2095  	//   "SMB_COMPLETED_PARTNER_CONTACT_FORM" - Advertiser completed partner
  2096  	// contact form.
  2097  	//   "SMB_ENTERED_EMAIL_IN_CONTACT_PARTNER_FORM" - Advertiser entered
  2098  	// email in contact form.
  2099  	//   "SMB_ENTERED_NAME_IN_CONTACT_PARTNER_FORM" - Advertiser entered
  2100  	// name in contact form.
  2101  	//   "SMB_ENTERED_PHONE_IN_CONTACT_PARTNER_FORM" - Advertiser entered
  2102  	// phone in contact form.
  2103  	//   "SMB_FAILED_RECAPTCHA_IN_CONTACT_PARTNER_FORM" - Advertiser failed
  2104  	// <a href="https://www.google.com/recaptcha/">reCaptcha</a>
  2105  	// in contact form.
  2106  	//   "PARTNER_VIEWED_BY_SMB" - Company viewed by advertiser.
  2107  	//   "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_GPS" - Advertiser canceled
  2108  	// partner contact form on Google Partner Search.
  2109  	//   "SMB_CHANGED_A_SEARCH_PARAMETER_TOP" - Advertiser changed a top
  2110  	// search parameter.
  2111  	//   "SMB_CLICKED_CONTACT_A_PARTNER_ON_GPS" - Advertiser started partner
  2112  	// contact form on Google Partner Search.
  2113  	//   "SMB_CLICKED_SHOW_MORE_PARTNERS_BUTTON_BOTTOM" - Advertiser clicked
  2114  	// `Show more partners` bottom button.
  2115  	//   "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_GPS" - Advertiser completed
  2116  	// partner contact form on Google Partner Search.
  2117  	//   "SMB_NO_PARTNERS_AVAILABLE_WITH_SEARCH_CRITERIA" - Advertiser saw
  2118  	// no partners available with search criteria.
  2119  	//   "SMB_PERFORMED_SEARCH_ON_GPS" - Advertiser performed search on
  2120  	// Google Partner Search.
  2121  	//   "SMB_VIEWED_A_PARTNER_ON_GPS" - Advertiser viewed a partner on
  2122  	// Google Partner Search.
  2123  	//   "SMB_CANCELED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE" - Advertiser
  2124  	// canceled partner contact form on profile page.
  2125  	//   "SMB_CLICKED_CONTACT_A_PARTNER_ON_PROFILE_PAGE" - Advertiser
  2126  	// started partner contact form on profile page.
  2127  	//   "SMB_CLICKED_PARTNER_WEBSITE" - Advertiser clicked partner website.
  2128  	//   "SMB_COMPLETED_PARTNER_CONTACT_FORM_ON_PROFILE_PAGE" - Advertiser
  2129  	// completed contact form on profile page.
  2130  	//   "SMB_VIEWED_A_PARTNER_PROFILE" - Advertiser viewed a partner
  2131  	// profile.
  2132  	//   "AGENCY_CLICKED_ACCEPT_TOS_BUTTON" - Agency clicked `accept Terms
  2133  	// Of Service` button.
  2134  	//   "AGENCY_CHANGED_TOS_COUNTRY" - Agency changed Terms Of Service
  2135  	// country.
  2136  	//   "AGENCY_ADDED_ADDRESS_IN_MY_PROFILE_PORTAL" - Agency added address
  2137  	// in profile portal.
  2138  	//   "AGENCY_ADDED_PHONE_NUMBER_IN_MY_PROFILE_PORTAL" - Agency added
  2139  	// phone number in profile portal.
  2140  	//   "AGENCY_CHANGED_PRIMARY_ACCOUNT_ASSOCIATION" - Agency changed
  2141  	// primary account association.
  2142  	//   "AGENCY_CHANGED_PRIMARY_COUNTRY_ASSOCIATION" - Agency changed
  2143  	// primary country association.
  2144  	//   "AGENCY_CLICKED_AFFILIATE_BUTTON_IN_MY_PROFILE_IN_PORTAL" - Agency
  2145  	// clicked `affiliate` button in profile portal.
  2146  	//   "AGENCY_CLICKED_GIVE_EDIT_ACCESS_IN_MY_PROFILE_PORTAL" - Agency
  2147  	// clicked `give edit access` in profile portal.
  2148  	//   "AGENCY_CLICKED_LOG_OUT_IN_MY_PROFILE_PORTAL" - Agency clicked `log
  2149  	// out` in profile portal.
  2150  	//   "AGENCY_CLICKED_MY_PROFILE_LEFT_NAV_IN_PORTAL" - Agency clicked
  2151  	// profile portal left nav.
  2152  	//   "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_COMPLETE_PROFILE" -
  2153  	// Agency clicked `save and continue` at bottom of complete profile.
  2154  	//   "AGENCY_CLICKED_UNAFFILIATE_IN_MY_PROFILE_PORTAL" - Agency clicked
  2155  	// `unaffiliate` in profile portal.
  2156  	//   "AGENCY_FILLED_OUT_COMP_AFFILIATION_IN_MY_PROFILE_PORTAL" - Agency
  2157  	// filled out company affiliation in profile portal.
  2158  	//   "AGENCY_SUCCESSFULLY_CONNECTED_WITH_COMPANY_IN_MY_PROFILE" - Agency
  2159  	// successfully connected with company in profile portal.
  2160  	//   "AGENCY_CLICKED_CREATE_MCC_IN_MY_PROFILE_PORTAL" - Agency clicked
  2161  	// create MCC in profile portal.
  2162  	//   "AGENCY_DIDNT_HAVE_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE" - Agency
  2163  	// did not have an MCC associated on profile portal.
  2164  	//   "AGENCY_HAD_AN_MCC_ASSOCIATED_ON_COMPLETE_PROFILE" - Agency had an
  2165  	// MCC associated on profile portal.
  2166  	//   "AGENCY_ADDED_JOB_FUNCTION_IN_MY_PROFILE_PORTAL" - Agency added job
  2167  	// function in profile portal.
  2168  	//   "AGENCY_LOOKED_AT_JOB_FUNCTION_DROP_DOWN" - Agency looked at job
  2169  	// function drop-down.
  2170  	//   "AGENCY_SELECTED_ACCOUNT_MANAGER_AS_JOB_FUNCTION" - Agency selected
  2171  	// `account manage` as job function.
  2172  	//   "AGENCY_SELECTED_ACCOUNT_PLANNER_AS_JOB_FUNCTION" - Agency selected
  2173  	// `account planner` as job function.
  2174  	//   "AGENCY_SELECTED_ANALYTICS_AS_JOB_FUNCTION" - Agency selected
  2175  	// `Analytics` as job function.
  2176  	//   "AGENCY_SELECTED_CREATIVE_AS_JOB_FUNCTION" - Agency selected
  2177  	// `creative` as job function.
  2178  	//   "AGENCY_SELECTED_MEDIA_BUYER_AS_JOB_FUNCTION" - Agency selected
  2179  	// `media buyer` as job function.
  2180  	//   "AGENCY_SELECTED_MEDIA_PLANNER_AS_JOB_FUNCTION" - Agency selected
  2181  	// `media planner` as job function.
  2182  	//   "AGENCY_SELECTED_OTHER_AS_JOB_FUNCTION" - Agency selected `other`
  2183  	// as job function.
  2184  	//   "AGENCY_SELECTED_PRODUCTION_AS_JOB_FUNCTION" - Agency selected
  2185  	// `production` as job function.
  2186  	//   "AGENCY_SELECTED_SEO_AS_JOB_FUNCTION" - Agency selected `SEO` as
  2187  	// job function.
  2188  	//   "AGENCY_SELECTED_SALES_REP_AS_JOB_FUNCTION" - Agency selected
  2189  	// `sales rep` as job function.
  2190  	//   "AGENCY_SELECTED_SEARCH_SPECIALIST_AS_JOB_FUNCTION" - Agency
  2191  	// selected `search specialist` as job function.
  2192  	//   "AGENCY_ADDED_CHANNELS_IN_MY_PROFILE_PORTAL" - Agency added
  2193  	// channels in profile portal.
  2194  	//   "AGENCY_LOOKED_AT_ADD_CHANNEL_DROP_DOWN" - Agency looked at `add
  2195  	// channel` drop-down.
  2196  	//   "AGENCY_SELECTED_CROSS_CHANNEL_FROM_ADD_CHANNEL" - Agency selected
  2197  	// `cross channel` from add channel drop-down.
  2198  	//   "AGENCY_SELECTED_DISPLAY_FROM_ADD_CHANNEL" - Agency selected
  2199  	// `display` from add channel drop-down.
  2200  	//   "AGENCY_SELECTED_MOBILE_FROM_ADD_CHANNEL" - Agency selected
  2201  	// `mobile` from add channel drop-down.
  2202  	//   "AGENCY_SELECTED_SEARCH_FROM_ADD_CHANNEL" - Agency selected
  2203  	// `search` from add channel drop-down.
  2204  	//   "AGENCY_SELECTED_SOCIAL_FROM_ADD_CHANNEL" - Agency selected
  2205  	// `social` from add channel drop-down.
  2206  	//   "AGENCY_SELECTED_TOOLS_FROM_ADD_CHANNEL" - Agency selected `tools`
  2207  	// from add channel drop-down.
  2208  	//   "AGENCY_SELECTED_YOUTUBE_FROM_ADD_CHANNEL" - Agency selected
  2209  	// `YouTube` from add channel drop-down.
  2210  	//   "AGENCY_ADDED_INDUSTRIES_IN_MY_PROFILE_PORTAL" - Agency added
  2211  	// industries in profile portal.
  2212  	//   "AGENCY_CHANGED_ADD_INDUSTRIES_DROP_DOWN" - Agency changed `add
  2213  	// industries` drop-down.
  2214  	//   "AGENCY_ADDED_MARKETS_IN_MY_PROFILE_PORTAL" - Agency added markets
  2215  	// in profile portal.
  2216  	//   "AGENCY_CHANGED_ADD_MARKETS_DROP_DOWN" - Agency changed `add
  2217  	// markets` drop-down.
  2218  	//   "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_MYPROFILE" - Agency checked
  2219  	// `recieve mail promotions` in profile portal.
  2220  	//   "AGENCY_CHECKED_RECIEVE_MAIL_PROMOTIONS_SIGNUP" - Agency checked
  2221  	// `recieve mail promotions` in sign-up.
  2222  	//   "AGENCY_SELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH" - Agency
  2223  	// selected `opt-in beta tests and market research`.
  2224  	//   "AGENCY_SELECTED_OPT_IN_BETA_TESTS_IN_MY_PROFILE_PORTAL" - Agency
  2225  	// selected `opt-in beta tests` in profile portal.
  2226  	//   "AGENCY_SELECTED_OPT_IN_NEWS_IN_MY_PROFILE_PORTAL" - Agency
  2227  	// selected `opt-in news` in profile portal.
  2228  	//   "AGENCY_SELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS" - Agency
  2229  	// selected `opt-in news invitations and promotions`.
  2230  	//   "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUG_IN_MY_PROFILE_PORTAL" -
  2231  	// Agency selected `opt-in performance SUG` in profile portal.
  2232  	//   "AGENCY_SELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS" - Agency selected
  2233  	// `opt-in performance suggestions`.
  2234  	//   "AGENCY_SELECTED_OPT_IN_SELECT_ALL_EMAIL_NOTIFICATIONS" - Agency
  2235  	// selected `opt-in select all email notifications`.
  2236  	//   "AGENCY_SELECTED_SELECT_ALL_OPT_INS_IN_MY_PROFILE_PORTAL" - Agency
  2237  	// selected `select all opt-ins` in profile portal.
  2238  	//   "AGENCY_CLICKED_BACK_BUTTON_ON_CONNECT_WITH_COMPANY" - Agency
  2239  	// clicked back button on `connect with company`.
  2240  	//   "AGENCY_CLICKED_CONTINUE_TO_OVERVIEW_ON_CONNECT_WITH_COMPANY" -
  2241  	// Agency clicked continue to overview on `connect with company`.
  2242  	//   "AGECNY_CLICKED_CREATE_MCC_CONNECT_WITH_COMPANY_NOT_FOUND" - Agency
  2243  	// clicked `create MCC connect with company not found`.
  2244  	//   "AGECNY_CLICKED_GIVE_EDIT_ACCESS_CONNECT_WITH_COMPANY_NOT_FOUND" -
  2245  	// Agency clicked `give edit access connect with company not found`.
  2246  	//   "AGECNY_CLICKED_LOG_OUT_CONNECT_WITH_COMPANY_NOT_FOUND" - Agency
  2247  	// clicked `log out connect with company not found`.
  2248  	//   "AGENCY_CLICKED_SKIP_FOR_NOW_ON_CONNECT_WITH_COMPANY_PAGE" - Agency
  2249  	// clicked `skip for now on connect with company page`.
  2250  	//   "AGENCY_CLOSED_CONNECTED_TO_COMPANY_X_BUTTON_WRONG_COMPANY" -
  2251  	// Agency closed connection to company.
  2252  	//   "AGENCY_COMPLETED_FIELD_CONNECT_WITH_COMPANY" - Agency completed
  2253  	// field connect with company.
  2254  	//   "AGECNY_FOUND_COMPANY_TO_CONNECT_WITH" - Agency found company to
  2255  	// connect with.
  2256  	//   "AGENCY_SUCCESSFULLY_CREATED_COMPANY" - Agency successfully created
  2257  	// company.
  2258  	//   "AGENCY_ADDED_NEW_COMPANY_LOCATION" - Agency added new company
  2259  	// location.
  2260  	//   "AGENCY_CLICKED_COMMUNITY_JOIN_NOW_LINK_IN_PORTAL_NOTIFICATIONS" -
  2261  	// Agency clicked community `join now link` in portal notifications.
  2262  	//   "AGENCY_CLICKED_CONNECT_TO_COMPANY_LINK_IN_PORTAL_NOTIFICATIONS" -
  2263  	// Agency clicked `connect to company` link in portal notifications.
  2264  	//   "AGENCY_CLICKED_GET_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS" -
  2265  	// Agency cliecked `get certified` link in portal notifications.
  2266  	//
  2267  	// "AGENCY_CLICKED_GET_VIDEO_ADS_CERTIFIED_LINK_IN_PORTAL_NOTIFICATIONS"
  2268  	// - Agency clicked `get VideoAds certified` link in portal
  2269  	// notifications.
  2270  	//   "AGENCY_CLICKED_LINK_TO_MCC_LINK_IN_PORTAL_NOTIFICATIONS" - Agency
  2271  	// clicked `link to MCC` link in portal notifications.
  2272  	//   "AGENCY_CLICKED_INSIGHT_CONTENT_IN_PORTAL" - Agency clicked
  2273  	// `insight content` in portal.
  2274  	//   "AGENCY_CLICKED_INSIGHTS_VIEW_NOW_PITCH_DECKS_IN_PORTAL" - Agency
  2275  	// clicked `insights view now pitch decks` in portal.
  2276  	//   "AGENCY_CLICKED_INSIGHTS_LEFT_NAV_IN_PORTAL" - Agency clicked
  2277  	// `insights` left nav in portal.
  2278  	//   "AGENCY_CLICKED_INSIGHTS_UPLOAD_CONTENT" - Agency clicked `insights
  2279  	// upload content`.
  2280  	//   "AGENCY_CLICKED_INSIGHTS_VIEWED_DEPRECATED" - Agency clicked
  2281  	// `insights viewed deprecated`.
  2282  	//   "AGENCY_CLICKED_COMMUNITY_LEFT_NAV_IN_PORTAL" - Agency clicked
  2283  	// `community` left nav in portal.
  2284  	//   "AGENCY_CLICKED_JOIN_COMMUNITY_BUTTON_COMMUNITY_PORTAL" - Agency
  2285  	// clicked `join community` button in community portal.
  2286  	//   "AGENCY_CLICKED_CERTIFICATIONS_LEFT_NAV_IN_PORTAL" - Agency clicked
  2287  	// `certifications` left nav in portal.
  2288  	//   "AGENCY_CLICKED_CERTIFICATIONS_PRODUCT_LEFT_NAV_IN_PORTAL" - Agency
  2289  	// clicked `certifications product` left nav in portal.
  2290  	//   "AGENCY_CLICKED_PARTNER_STATUS_LEFT_NAV_IN_PORTAL" - Agency clicked
  2291  	// `partner status` left nav in portal.
  2292  	//   "AGENCY_CLICKED_PARTNER_STATUS_PRODUCT_LEFT_NAV_IN_PORTAL" - Agency
  2293  	// clicked `partner status product` left nav in portal.
  2294  	//   "AGENCY_CLICKED_OFFERS_LEFT_NAV_IN_PORTAL" - Agency clicked
  2295  	// `offers` left nav in portal.
  2296  	//   "AGENCY_CLICKED_SEND_BUTTON_ON_OFFERS_PAGE" - Agency clicked `send`
  2297  	// button on offers page.
  2298  	//   "AGENCY_CLICKED_EXAM_DETAILS_ON_CERT_ADWORDS_PAGE" - Agency clicked
  2299  	// `exam details` on certifications AdWords page.
  2300  	//   "AGENCY_CLICKED_SEE_EXAMS_CERTIFICATION_MAIN_PAGE" - Agency clicked
  2301  	// `see exams` certifications main page.
  2302  	//   "AGENCY_CLICKED_TAKE_EXAM_ON_CERT_EXAM_PAGE" - Agency clicked `take
  2303  	// exam` on certifications exam page.
  2304  	//   "AGENCY_OPENED_LAST_ADMIN_DIALOG" - Agency opened `last admin`
  2305  	// dialog.
  2306  	//   "AGENCY_OPENED_DIALOG_WITH_NO_USERS" - Agency opened dialog with no
  2307  	// users.
  2308  	//   "AGENCY_PROMOTED_USER_TO_ADMIN" - Agency promoted user to admin.
  2309  	//   "AGENCY_UNAFFILIATED" - Agency unaffiliated.
  2310  	//   "AGENCY_CHANGED_ROLES" - Agency changed roles.
  2311  	//   "SMB_CLICKED_COMPANY_NAME_LINK_TO_PROFILE" - Advertiser clicked
  2312  	// `company name` link to profile.
  2313  	//   "SMB_VIEWED_ADWORDS_CERTIFICATE" - Advertiser viewed AdWords
  2314  	// certificate.
  2315  	//   "SMB_VIEWED_ADWORDS_SEARCH_CERTIFICATE" - Advertiser viewed AdWords
  2316  	// Search certificate.
  2317  	//   "SMB_VIEWED_ADWORDS_DISPLAY_CERTIFICATE" - Advertiser viewed
  2318  	// AdWords Display certificate.
  2319  	//   "SMB_CLICKED_ADWORDS_CERTIFICATE_HELP_ICON" - Advertiser clicked
  2320  	// AdWords certificate help icon.
  2321  	//   "SMB_VIEWED_ANALYTICS_CERTIFICATE" - Advertiser viewed Analytics
  2322  	// certificate.
  2323  	//   "SMB_VIEWED_DOUBLECLICK_CERTIFICATE" - Advertiser viewed
  2324  	// DoubleClick certificate.
  2325  	//   "SMB_VIEWED_MOBILE_SITES_CERTIFICATE" - Advertiser viewed Mobile
  2326  	// Sites certificate.
  2327  	//   "SMB_VIEWED_VIDEO_ADS_CERTIFICATE" - Advertiser viewed VideoAds
  2328  	// certificate.
  2329  	//   "SMB_VIEWED_SHOPPING_CERTIFICATE" - Advertiser clicked Shopping
  2330  	// certificate help icon.
  2331  	//   "SMB_CLICKED_VIDEO_ADS_CERTIFICATE_HELP_ICON" - Advertiser clicked
  2332  	// VideoAds certificate help icon.
  2333  	//   "SMB_VIEWED_DIGITAL_SALES_CERTIFICATE" - Advertiser viewed Digital
  2334  	// Sales certificate.
  2335  	//   "CLICKED_HELP_AT_BOTTOM" - Clicked `help` at bottom.
  2336  	//   "CLICKED_HELP_AT_TOP" - Clicked `help` at top.
  2337  	//   "CLIENT_ERROR" - Client error occurred.
  2338  	//   "AGENCY_CLICKED_LEFT_NAV_STORIES" - Agency clicked left nav
  2339  	// `stories`.
  2340  	//   "CLICKED" - Click occured.
  2341  	//   "SMB_VIEWED_MOBILE_CERTIFICATE" - Advertiser clicked Mobile
  2342  	// certificate help icon.
  2343  	//   "AGENCY_FAILED_COMPANY_VERIFICATION" - Agency failed the company
  2344  	// verification.
  2345  	//   "VISITED_LANDING" - User visited the landing portion of Google
  2346  	// Partners.
  2347  	//   "VISITED_GPS" - User visited the Google Partner Search portion of
  2348  	// Google Partners.
  2349  	//   "VISITED_AGENCY_PORTAL" - User visited the agency portal portion of
  2350  	// Google Partners.
  2351  	//   "CANCELLED_INDIVIDUAL_SIGN_UP" - User cancelled signing up.
  2352  	//   "CANCELLED_COMPANY_SIGN_UP" - User cancelled signing up their
  2353  	// company.
  2354  	//   "AGENCY_CLICKED_SIGN_IN_BUTTON_TOP" - Agency clicked `Sign in` top
  2355  	// button.
  2356  	//   "AGENCY_CLICKED_SAVE_AND_CONTINUE_AT_BOT_OF_INCOMPLETE_PROFILE" -
  2357  	// Agency clicked `save and continue` at bottom of incomplete profile.
  2358  	//   "AGENCY_UNSELECTED_OPT_IN_NEWS_INVITATIONS_AND_PROMOS" - Agency
  2359  	// unselected `opt-in news invitations and promotions`.
  2360  	//   "AGENCY_UNSELECTED_OPT_IN_BETA_TESTS_AND_MKT_RESEARCH" - Agency
  2361  	// unselected `opt-in beta tests and market research`.
  2362  	//   "AGENCY_UNSELECTED_OPT_IN_PERFORMANCE_SUGGESTIONS" - Agency
  2363  	// unselected `opt-in performance suggestions`.
  2364  	//   "AGENCY_SELECTED_OPT_OUT_UNSELECT_ALL_EMAIL_NOTIFICATIONS" - Agency
  2365  	// selected `opt-out unselect all email notifications`.
  2366  	//   "AGENCY_LINKED_INDIVIDUAL_MCC" - Agency linked their individual
  2367  	// MCC.
  2368  	//   "AGENCY_SUGGESTED_TO_USER" - Agency was suggested to user for
  2369  	// affiliation.
  2370  	//   "AGENCY_IGNORED_SUGGESTED_AGENCIES_AND_SEARCHED" - Agency ignored
  2371  	// suggested agencies and begin searching.
  2372  	//   "AGENCY_PICKED_SUGGESTED_AGENCY" - Agency picked a suggested
  2373  	// agency.
  2374  	//   "AGENCY_SEARCHED_FOR_AGENCIES" - Agency searched for agencies.
  2375  	//   "AGENCY_PICKED_SEARCHED_AGENCY" - Agency picked a searched agency.
  2376  	//   "AGENCY_DISMISSED_AFFILIATION_WIDGET" - Agency dismissed
  2377  	// affiliation widget.
  2378  	//   "AGENCY_CLICKED_INSIGHTS_DOWNLOAD_CONTENT" - Agency clicked on the
  2379  	// download link for downloading content.
  2380  	//   "AGENCY_PROGRESS_INSIGHTS_VIEW_CONTENT" - Agency user is maklingg
  2381  	// progress viewing a content item.
  2382  	//   "AGENCY_CLICKED_CANCEL_ACCEPT_TOS_BUTTON" - Agency clicked `cancel
  2383  	// Terms Of Service` button.
  2384  	//   "SMB_ENTERED_WEBSITE_IN_CONTACT_PARTNER_FORM" - Advertiser entered
  2385  	// website in contact form.
  2386  	//   "AGENCY_SELECTED_OPT_IN_AFA_MIGRATION" - Agency opted in for
  2387  	// migrating their exams to Academy for Ads.
  2388  	//   "AGENCY_SELECTED_OPT_OUT_AFA_MIGRATION" - Agency opted out for
  2389  	// migrating their exams to Academy for Ads.
  2390  	EventAction string `json:"eventAction,omitempty"`
  2391  
  2392  	// EventCategory: The category the action belongs to.
  2393  	//
  2394  	// Possible values:
  2395  	//   "EVENT_CATEGORY_UNSPECIFIED" - Unchosen.
  2396  	//   "GOOGLE_PARTNER_SEARCH" - Google Partner Search category.
  2397  	//   "GOOGLE_PARTNER_SIGNUP_FLOW" - Google Partner sign-up flow
  2398  	// category.
  2399  	//   "GOOGLE_PARTNER_PORTAL" - Google Partner portal category.
  2400  	//   "GOOGLE_PARTNER_PORTAL_MY_PROFILE" - Google Partner portal
  2401  	// my-profile category.
  2402  	//   "GOOGLE_PARTNER_PORTAL_CERTIFICATIONS" - Google Partner portal
  2403  	// certifications category.
  2404  	//   "GOOGLE_PARTNER_PORTAL_COMMUNITY" - Google Partner portal community
  2405  	// category.
  2406  	//   "GOOGLE_PARTNER_PORTAL_INSIGHTS" - Google Partner portal insights
  2407  	// category.
  2408  	//   "GOOGLE_PARTNER_PORTAL_CLIENTS" - Google Partner portal clients
  2409  	// category.
  2410  	//   "GOOGLE_PARTNER_PUBLIC_USER_PROFILE" - Google Partner portal public
  2411  	// user profile category.
  2412  	//   "GOOGLE_PARTNER_PANEL" - Google Partner panel category.
  2413  	//   "GOOGLE_PARTNER_PORTAL_LAST_ADMIN_DIALOG" - Google Partner portal
  2414  	// last admin dialog category.
  2415  	//   "GOOGLE_PARTNER_CLIENT" - Google Partner client category.
  2416  	//   "GOOGLE_PARTNER_PORTAL_COMPANY_PROFILE" - Google Partner portal
  2417  	// company profile category.
  2418  	//   "EXTERNAL_LINKS" - External links category.
  2419  	//   "GOOGLE_PARTNER_LANDING" - Google Partner landing category.
  2420  	EventCategory string `json:"eventCategory,omitempty"`
  2421  
  2422  	// EventDatas: List of event data for the event.
  2423  	EventDatas []*EventData `json:"eventDatas,omitempty"`
  2424  
  2425  	// EventScope: The scope of the event.
  2426  	//
  2427  	// Possible values:
  2428  	//   "EVENT_SCOPE_UNSPECIFIED" - Unchosen.
  2429  	//   "VISITOR" - Based on visitor.
  2430  	//   "SESSION" - Based on session.
  2431  	//   "PAGE" - Based on page visit.
  2432  	EventScope string `json:"eventScope,omitempty"`
  2433  
  2434  	// Lead: Advertiser lead information.
  2435  	Lead *Lead `json:"lead,omitempty"`
  2436  
  2437  	// RequestMetadata: Current request metadata.
  2438  	RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"`
  2439  
  2440  	// Url: The URL where the event occurred.
  2441  	Url string `json:"url,omitempty"`
  2442  
  2443  	// ForceSendFields is a list of field names (e.g. "EventAction") to
  2444  	// unconditionally include in API requests. By default, fields with
  2445  	// empty values are omitted from API requests. However, any non-pointer,
  2446  	// non-interface field appearing in ForceSendFields will be sent to the
  2447  	// server regardless of whether the field is empty or not. This may be
  2448  	// used to include empty fields in Patch requests.
  2449  	ForceSendFields []string `json:"-"`
  2450  
  2451  	// NullFields is a list of field names (e.g. "EventAction") to include
  2452  	// in API requests with the JSON null value. By default, fields with
  2453  	// empty values are omitted from API requests. However, any field with
  2454  	// an empty value appearing in NullFields will be sent to the server as
  2455  	// null. It is an error if a field in this list has a non-empty value.
  2456  	// This may be used to include null fields in Patch requests.
  2457  	NullFields []string `json:"-"`
  2458  }
  2459  
  2460  func (s *LogUserEventRequest) MarshalJSON() ([]byte, error) {
  2461  	type NoMethod LogUserEventRequest
  2462  	raw := NoMethod(*s)
  2463  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2464  }
  2465  
  2466  // LogUserEventResponse: Response message for
  2467  // LogUserEvent.
  2468  type LogUserEventResponse struct {
  2469  	// ResponseMetadata: Current response metadata.
  2470  	ResponseMetadata *ResponseMetadata `json:"responseMetadata,omitempty"`
  2471  
  2472  	// ServerResponse contains the HTTP response code and headers from the
  2473  	// server.
  2474  	googleapi.ServerResponse `json:"-"`
  2475  
  2476  	// ForceSendFields is a list of field names (e.g. "ResponseMetadata") to
  2477  	// unconditionally include in API requests. By default, fields with
  2478  	// empty values are omitted from API requests. However, any non-pointer,
  2479  	// non-interface field appearing in ForceSendFields will be sent to the
  2480  	// server regardless of whether the field is empty or not. This may be
  2481  	// used to include empty fields in Patch requests.
  2482  	ForceSendFields []string `json:"-"`
  2483  
  2484  	// NullFields is a list of field names (e.g. "ResponseMetadata") to
  2485  	// include in API requests with the JSON null value. By default, fields
  2486  	// with empty values are omitted from API requests. However, any field
  2487  	// with an empty value appearing in NullFields will be sent to the
  2488  	// server as null. It is an error if a field in this list has a
  2489  	// non-empty value. This may be used to include null fields in Patch
  2490  	// requests.
  2491  	NullFields []string `json:"-"`
  2492  }
  2493  
  2494  func (s *LogUserEventResponse) MarshalJSON() ([]byte, error) {
  2495  	type NoMethod LogUserEventResponse
  2496  	raw := NoMethod(*s)
  2497  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2498  }
  2499  
  2500  // Money: Represents an amount of money with its currency type.
  2501  type Money struct {
  2502  	// CurrencyCode: The 3-letter currency code defined in ISO 4217.
  2503  	CurrencyCode string `json:"currencyCode,omitempty"`
  2504  
  2505  	// Nanos: Number of nano (10^-9) units of the amount.
  2506  	// The value must be between -999,999,999 and +999,999,999 inclusive.
  2507  	// If `units` is positive, `nanos` must be positive or zero.
  2508  	// If `units` is zero, `nanos` can be positive, zero, or negative.
  2509  	// If `units` is negative, `nanos` must be negative or zero.
  2510  	// For example $-1.75 is represented as `units`=-1 and
  2511  	// `nanos`=-750,000,000.
  2512  	Nanos int64 `json:"nanos,omitempty"`
  2513  
  2514  	// Units: The whole units of the amount.
  2515  	// For example if `currencyCode` is "USD", then 1 unit is one US
  2516  	// dollar.
  2517  	Units int64 `json:"units,omitempty,string"`
  2518  
  2519  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  2520  	// unconditionally include in API requests. By default, fields with
  2521  	// empty values are omitted from API requests. However, any non-pointer,
  2522  	// non-interface field appearing in ForceSendFields will be sent to the
  2523  	// server regardless of whether the field is empty or not. This may be
  2524  	// used to include empty fields in Patch requests.
  2525  	ForceSendFields []string `json:"-"`
  2526  
  2527  	// NullFields is a list of field names (e.g. "CurrencyCode") to include
  2528  	// in API requests with the JSON null value. By default, fields with
  2529  	// empty values are omitted from API requests. However, any field with
  2530  	// an empty value appearing in NullFields will be sent to the server as
  2531  	// null. It is an error if a field in this list has a non-empty value.
  2532  	// This may be used to include null fields in Patch requests.
  2533  	NullFields []string `json:"-"`
  2534  }
  2535  
  2536  func (s *Money) MarshalJSON() ([]byte, error) {
  2537  	type NoMethod Money
  2538  	raw := NoMethod(*s)
  2539  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2540  }
  2541  
  2542  // OfferCustomer: Customers qualified for an offer.
  2543  type OfferCustomer struct {
  2544  	// AdwordsUrl: URL to the customer's AdWords page.
  2545  	AdwordsUrl string `json:"adwordsUrl,omitempty"`
  2546  
  2547  	// CountryCode: Country code of the customer.
  2548  	CountryCode string `json:"countryCode,omitempty"`
  2549  
  2550  	// CreationTime: Time the customer was created.
  2551  	CreationTime string `json:"creationTime,omitempty"`
  2552  
  2553  	// EligibilityDaysLeft: Days the customer is still eligible.
  2554  	EligibilityDaysLeft int64 `json:"eligibilityDaysLeft,omitempty"`
  2555  
  2556  	// ExternalCid: External CID for the customer.
  2557  	ExternalCid int64 `json:"externalCid,omitempty,string"`
  2558  
  2559  	// GetYAmount: Formatted Get Y amount with currency code.
  2560  	GetYAmount string `json:"getYAmount,omitempty"`
  2561  
  2562  	// Name: Name of the customer.
  2563  	Name string `json:"name,omitempty"`
  2564  
  2565  	// OfferType: Type of the offer
  2566  	//
  2567  	// Possible values:
  2568  	//   "OFFER_TYPE_UNSPECIFIED" - Unset.
  2569  	//   "OFFER_TYPE_SPEND_X_GET_Y" - AdWords spend X get Y.
  2570  	//   "OFFER_TYPE_VIDEO" - Youtube video.
  2571  	//   "OFFER_TYPE_SPEND_MATCH" - Spend Match up to Y.
  2572  	OfferType string `json:"offerType,omitempty"`
  2573  
  2574  	// SpendXAmount: Formatted Spend X amount with currency code.
  2575  	SpendXAmount string `json:"spendXAmount,omitempty"`
  2576  
  2577  	// ForceSendFields is a list of field names (e.g. "AdwordsUrl") to
  2578  	// unconditionally include in API requests. By default, fields with
  2579  	// empty values are omitted from API requests. However, any non-pointer,
  2580  	// non-interface field appearing in ForceSendFields will be sent to the
  2581  	// server regardless of whether the field is empty or not. This may be
  2582  	// used to include empty fields in Patch requests.
  2583  	ForceSendFields []string `json:"-"`
  2584  
  2585  	// NullFields is a list of field names (e.g. "AdwordsUrl") to include in
  2586  	// API requests with the JSON null value. By default, fields with empty
  2587  	// values are omitted from API requests. However, any field with an
  2588  	// empty value appearing in NullFields will be sent to the server as
  2589  	// null. It is an error if a field in this list has a non-empty value.
  2590  	// This may be used to include null fields in Patch requests.
  2591  	NullFields []string `json:"-"`
  2592  }
  2593  
  2594  func (s *OfferCustomer) MarshalJSON() ([]byte, error) {
  2595  	type NoMethod OfferCustomer
  2596  	raw := NoMethod(*s)
  2597  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2598  }
  2599  
  2600  // OptIns: A set of opt-ins for a user.
  2601  type OptIns struct {
  2602  	// MarketComm: An opt-in about receiving email from Partners marketing
  2603  	// teams. Includes
  2604  	// member-only events and special promotional offers for Google
  2605  	// products.
  2606  	MarketComm bool `json:"marketComm,omitempty"`
  2607  
  2608  	// PerformanceSuggestions: An opt-in about receiving email with
  2609  	// customized AdWords campaign management
  2610  	// tips.
  2611  	PerformanceSuggestions bool `json:"performanceSuggestions,omitempty"`
  2612  
  2613  	// PhoneContact: An opt-in to allow recieivng phone calls about their
  2614  	// Partners account.
  2615  	PhoneContact bool `json:"phoneContact,omitempty"`
  2616  
  2617  	// PhysicalMail: An opt-in to receive special promotional gifts and
  2618  	// material in the mail.
  2619  	PhysicalMail bool `json:"physicalMail,omitempty"`
  2620  
  2621  	// SpecialOffers: An opt-in about receiving email regarding new features
  2622  	// and products.
  2623  	SpecialOffers bool `json:"specialOffers,omitempty"`
  2624  
  2625  	// ForceSendFields is a list of field names (e.g. "MarketComm") to
  2626  	// unconditionally include in API requests. By default, fields with
  2627  	// empty values are omitted from API requests. However, any non-pointer,
  2628  	// non-interface field appearing in ForceSendFields will be sent to the
  2629  	// server regardless of whether the field is empty or not. This may be
  2630  	// used to include empty fields in Patch requests.
  2631  	ForceSendFields []string `json:"-"`
  2632  
  2633  	// NullFields is a list of field names (e.g. "MarketComm") to include in
  2634  	// API requests with the JSON null value. By default, fields with empty
  2635  	// values are omitted from API requests. However, any field with an
  2636  	// empty value appearing in NullFields will be sent to the server as
  2637  	// null. It is an error if a field in this list has a non-empty value.
  2638  	// This may be used to include null fields in Patch requests.
  2639  	NullFields []string `json:"-"`
  2640  }
  2641  
  2642  func (s *OptIns) MarshalJSON() ([]byte, error) {
  2643  	type NoMethod OptIns
  2644  	raw := NoMethod(*s)
  2645  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2646  }
  2647  
  2648  // PublicProfile: Basic information from a public profile.
  2649  type PublicProfile struct {
  2650  	// DisplayImageUrl: The URL to the main display image of the public
  2651  	// profile. Being deprecated.
  2652  	DisplayImageUrl string `json:"displayImageUrl,omitempty"`
  2653  
  2654  	// DisplayName: The display name of the public profile.
  2655  	DisplayName string `json:"displayName,omitempty"`
  2656  
  2657  	// Id: The ID which can be used to retrieve more details about the
  2658  	// public profile.
  2659  	Id string `json:"id,omitempty"`
  2660  
  2661  	// ProfileImage: The URL to the main profile image of the public
  2662  	// profile.
  2663  	ProfileImage string `json:"profileImage,omitempty"`
  2664  
  2665  	// Url: The URL of the public profile.
  2666  	Url string `json:"url,omitempty"`
  2667  
  2668  	// ForceSendFields is a list of field names (e.g. "DisplayImageUrl") to
  2669  	// unconditionally include in API requests. By default, fields with
  2670  	// empty values are omitted from API requests. However, any non-pointer,
  2671  	// non-interface field appearing in ForceSendFields will be sent to the
  2672  	// server regardless of whether the field is empty or not. This may be
  2673  	// used to include empty fields in Patch requests.
  2674  	ForceSendFields []string `json:"-"`
  2675  
  2676  	// NullFields is a list of field names (e.g. "DisplayImageUrl") to
  2677  	// include in API requests with the JSON null value. By default, fields
  2678  	// with empty values are omitted from API requests. However, any field
  2679  	// with an empty value appearing in NullFields will be sent to the
  2680  	// server as null. It is an error if a field in this list has a
  2681  	// non-empty value. This may be used to include null fields in Patch
  2682  	// requests.
  2683  	NullFields []string `json:"-"`
  2684  }
  2685  
  2686  func (s *PublicProfile) MarshalJSON() ([]byte, error) {
  2687  	type NoMethod PublicProfile
  2688  	raw := NoMethod(*s)
  2689  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2690  }
  2691  
  2692  // Rank: Information related to ranking of results.
  2693  type Rank struct {
  2694  	// Type: The type of rank.
  2695  	//
  2696  	// Possible values:
  2697  	//   "RANK_TYPE_UNSPECIFIED" - Unchosen.
  2698  	//   "RT_FINAL_SCORE" - Total final score.
  2699  	Type string `json:"type,omitempty"`
  2700  
  2701  	// Value: The numerical value of the rank.
  2702  	Value float64 `json:"value,omitempty"`
  2703  
  2704  	// ForceSendFields is a list of field names (e.g. "Type") to
  2705  	// unconditionally include in API requests. By default, fields with
  2706  	// empty values are omitted from API requests. However, any non-pointer,
  2707  	// non-interface field appearing in ForceSendFields will be sent to the
  2708  	// server regardless of whether the field is empty or not. This may be
  2709  	// used to include empty fields in Patch requests.
  2710  	ForceSendFields []string `json:"-"`
  2711  
  2712  	// NullFields is a list of field names (e.g. "Type") to include in API
  2713  	// requests with the JSON null value. By default, fields with empty
  2714  	// values are omitted from API requests. However, any field with an
  2715  	// empty value appearing in NullFields will be sent to the server as
  2716  	// null. It is an error if a field in this list has a non-empty value.
  2717  	// This may be used to include null fields in Patch requests.
  2718  	NullFields []string `json:"-"`
  2719  }
  2720  
  2721  func (s *Rank) MarshalJSON() ([]byte, error) {
  2722  	type NoMethod Rank
  2723  	raw := NoMethod(*s)
  2724  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2725  }
  2726  
  2727  func (s *Rank) UnmarshalJSON(data []byte) error {
  2728  	type NoMethod Rank
  2729  	var s1 struct {
  2730  		Value gensupport.JSONFloat64 `json:"value"`
  2731  		*NoMethod
  2732  	}
  2733  	s1.NoMethod = (*NoMethod)(s)
  2734  	if err := json.Unmarshal(data, &s1); err != nil {
  2735  		return err
  2736  	}
  2737  	s.Value = float64(s1.Value)
  2738  	return nil
  2739  }
  2740  
  2741  // RecaptchaChallenge: <a
  2742  // href="https://www.google.com/recaptcha/">reCaptcha</a> challenge
  2743  // info.
  2744  type RecaptchaChallenge struct {
  2745  	// Id: The ID of the reCaptcha challenge.
  2746  	Id string `json:"id,omitempty"`
  2747  
  2748  	// Response: The response to the reCaptcha challenge.
  2749  	Response string `json:"response,omitempty"`
  2750  
  2751  	// ForceSendFields is a list of field names (e.g. "Id") to
  2752  	// unconditionally include in API requests. By default, fields with
  2753  	// empty values are omitted from API requests. However, any non-pointer,
  2754  	// non-interface field appearing in ForceSendFields will be sent to the
  2755  	// server regardless of whether the field is empty or not. This may be
  2756  	// used to include empty fields in Patch requests.
  2757  	ForceSendFields []string `json:"-"`
  2758  
  2759  	// NullFields is a list of field names (e.g. "Id") to include in API
  2760  	// requests with the JSON null value. By default, fields with empty
  2761  	// values are omitted from API requests. However, any field with an
  2762  	// empty value appearing in NullFields will be sent to the server as
  2763  	// null. It is an error if a field in this list has a non-empty value.
  2764  	// This may be used to include null fields in Patch requests.
  2765  	NullFields []string `json:"-"`
  2766  }
  2767  
  2768  func (s *RecaptchaChallenge) MarshalJSON() ([]byte, error) {
  2769  	type NoMethod RecaptchaChallenge
  2770  	raw := NoMethod(*s)
  2771  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2772  }
  2773  
  2774  // RequestMetadata: Common data that is in each API request.
  2775  type RequestMetadata struct {
  2776  	// ExperimentIds: Experiment IDs the current request belongs to.
  2777  	ExperimentIds []string `json:"experimentIds,omitempty"`
  2778  
  2779  	// Locale: Locale to use for the current request.
  2780  	Locale string `json:"locale,omitempty"`
  2781  
  2782  	// PartnersSessionId: Google Partners session ID.
  2783  	PartnersSessionId string `json:"partnersSessionId,omitempty"`
  2784  
  2785  	// TrafficSource: Source of traffic for the current request.
  2786  	TrafficSource *TrafficSource `json:"trafficSource,omitempty"`
  2787  
  2788  	// UserOverrides: Values to use instead of the user's respective
  2789  	// defaults for the current
  2790  	// request. These are only honored by whitelisted products.
  2791  	UserOverrides *UserOverrides `json:"userOverrides,omitempty"`
  2792  
  2793  	// ForceSendFields is a list of field names (e.g. "ExperimentIds") to
  2794  	// unconditionally include in API requests. By default, fields with
  2795  	// empty values are omitted from API requests. However, any non-pointer,
  2796  	// non-interface field appearing in ForceSendFields will be sent to the
  2797  	// server regardless of whether the field is empty or not. This may be
  2798  	// used to include empty fields in Patch requests.
  2799  	ForceSendFields []string `json:"-"`
  2800  
  2801  	// NullFields is a list of field names (e.g. "ExperimentIds") to include
  2802  	// in API requests with the JSON null value. By default, fields with
  2803  	// empty values are omitted from API requests. However, any field with
  2804  	// an empty value appearing in NullFields will be sent to the server as
  2805  	// null. It is an error if a field in this list has a non-empty value.
  2806  	// This may be used to include null fields in Patch requests.
  2807  	NullFields []string `json:"-"`
  2808  }
  2809  
  2810  func (s *RequestMetadata) MarshalJSON() ([]byte, error) {
  2811  	type NoMethod RequestMetadata
  2812  	raw := NoMethod(*s)
  2813  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2814  }
  2815  
  2816  // ResponseMetadata: Common data that is in each API response.
  2817  type ResponseMetadata struct {
  2818  	// DebugInfo: Debug information about this request.
  2819  	DebugInfo *DebugInfo `json:"debugInfo,omitempty"`
  2820  
  2821  	// ForceSendFields is a list of field names (e.g. "DebugInfo") to
  2822  	// unconditionally include in API requests. By default, fields with
  2823  	// empty values are omitted from API requests. However, any non-pointer,
  2824  	// non-interface field appearing in ForceSendFields will be sent to the
  2825  	// server regardless of whether the field is empty or not. This may be
  2826  	// used to include empty fields in Patch requests.
  2827  	ForceSendFields []string `json:"-"`
  2828  
  2829  	// NullFields is a list of field names (e.g. "DebugInfo") to include in
  2830  	// API requests with the JSON null value. By default, fields with empty
  2831  	// values are omitted from API requests. However, any field with an
  2832  	// empty value appearing in NullFields will be sent to the server as
  2833  	// null. It is an error if a field in this list has a non-empty value.
  2834  	// This may be used to include null fields in Patch requests.
  2835  	NullFields []string `json:"-"`
  2836  }
  2837  
  2838  func (s *ResponseMetadata) MarshalJSON() ([]byte, error) {
  2839  	type NoMethod ResponseMetadata
  2840  	raw := NoMethod(*s)
  2841  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2842  }
  2843  
  2844  // SpecializationStatus: Agency specialization status
  2845  type SpecializationStatus struct {
  2846  	// BadgeSpecialization: The specialization this status is for.
  2847  	//
  2848  	// Possible values:
  2849  	//   "BADGE_SPECIALIZATION_UNKNOWN" - Unknown specialization
  2850  	//   "BADGE_SPECIALIZATION_ADWORDS_SEARCH" - AdWords Search
  2851  	// specialization
  2852  	//   "BADGE_SPECIALIZATION_ADWORDS_DISPLAY" - AdWords Display
  2853  	// specialization
  2854  	//   "BADGE_SPECIALIZATION_ADWORDS_MOBILE" - AdWords Mobile
  2855  	// specialization
  2856  	//   "BADGE_SPECIALIZATION_ADWORDS_VIDEO" - AdWords Video specialization
  2857  	//   "BADGE_SPECIALIZATION_ADWORDS_SHOPPING" - AdWords Shopping
  2858  	// specialization
  2859  	BadgeSpecialization string `json:"badgeSpecialization,omitempty"`
  2860  
  2861  	// BadgeSpecializationState: State of agency specialization.
  2862  	//
  2863  	// Possible values:
  2864  	//   "BADGE_SPECIALIZATION_STATE_UNKNOWN" - Unknown state
  2865  	//   "BADGE_SPECIALIZATION_STATE_PASSED" - Specialization passed
  2866  	//   "BADGE_SPECIALIZATION_STATE_NOT_PASSED" - Specialization not passed
  2867  	//   "BADGE_SPECIALIZATION_STATE_IN_GRACE" - Specialization in grace
  2868  	BadgeSpecializationState string `json:"badgeSpecializationState,omitempty"`
  2869  
  2870  	// ForceSendFields is a list of field names (e.g. "BadgeSpecialization")
  2871  	// to unconditionally include in API requests. By default, fields with
  2872  	// empty values are omitted from API requests. However, any non-pointer,
  2873  	// non-interface field appearing in ForceSendFields will be sent to the
  2874  	// server regardless of whether the field is empty or not. This may be
  2875  	// used to include empty fields in Patch requests.
  2876  	ForceSendFields []string `json:"-"`
  2877  
  2878  	// NullFields is a list of field names (e.g. "BadgeSpecialization") to
  2879  	// include in API requests with the JSON null value. By default, fields
  2880  	// with empty values are omitted from API requests. However, any field
  2881  	// with an empty value appearing in NullFields will be sent to the
  2882  	// server as null. It is an error if a field in this list has a
  2883  	// non-empty value. This may be used to include null fields in Patch
  2884  	// requests.
  2885  	NullFields []string `json:"-"`
  2886  }
  2887  
  2888  func (s *SpecializationStatus) MarshalJSON() ([]byte, error) {
  2889  	type NoMethod SpecializationStatus
  2890  	raw := NoMethod(*s)
  2891  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2892  }
  2893  
  2894  // TrafficSource: Source of traffic for the current request.
  2895  type TrafficSource struct {
  2896  	// TrafficSourceId: Identifier to indicate where the traffic comes
  2897  	// from.
  2898  	// An identifier has multiple letters created by a team which redirected
  2899  	// the
  2900  	// traffic to us.
  2901  	TrafficSourceId string `json:"trafficSourceId,omitempty"`
  2902  
  2903  	// TrafficSubId: Second level identifier to indicate where the traffic
  2904  	// comes from.
  2905  	// An identifier has multiple letters created by a team which redirected
  2906  	// the
  2907  	// traffic to us.
  2908  	TrafficSubId string `json:"trafficSubId,omitempty"`
  2909  
  2910  	// ForceSendFields is a list of field names (e.g. "TrafficSourceId") to
  2911  	// unconditionally include in API requests. By default, fields with
  2912  	// empty values are omitted from API requests. However, any non-pointer,
  2913  	// non-interface field appearing in ForceSendFields will be sent to the
  2914  	// server regardless of whether the field is empty or not. This may be
  2915  	// used to include empty fields in Patch requests.
  2916  	ForceSendFields []string `json:"-"`
  2917  
  2918  	// NullFields is a list of field names (e.g. "TrafficSourceId") to
  2919  	// include in API requests with the JSON null value. By default, fields
  2920  	// with empty values are omitted from API requests. However, any field
  2921  	// with an empty value appearing in NullFields will be sent to the
  2922  	// server as null. It is an error if a field in this list has a
  2923  	// non-empty value. This may be used to include null fields in Patch
  2924  	// requests.
  2925  	NullFields []string `json:"-"`
  2926  }
  2927  
  2928  func (s *TrafficSource) MarshalJSON() ([]byte, error) {
  2929  	type NoMethod TrafficSource
  2930  	raw := NoMethod(*s)
  2931  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2932  }
  2933  
  2934  // User: A resource representing a user of the Partners platform.
  2935  type User struct {
  2936  	// AfaInfoShared: Whether or not the user has opted to share their
  2937  	// Academy for Ads info with
  2938  	// Google Partners.
  2939  	AfaInfoShared bool `json:"afaInfoShared,omitempty"`
  2940  
  2941  	// AvailableAdwordsManagerAccounts: This is the list of AdWords Manager
  2942  	// Accounts the user has edit access to.
  2943  	// If the user has edit access to multiple accounts, the user can choose
  2944  	// the
  2945  	// preferred account and we use this when a personal account is needed.
  2946  	// Can
  2947  	// be empty meaning the user has access to no accounts.
  2948  	// @OutputOnly
  2949  	AvailableAdwordsManagerAccounts []*AdWordsManagerAccountInfo `json:"availableAdwordsManagerAccounts,omitempty"`
  2950  
  2951  	// CertificationStatus: The list of achieved certifications. These are
  2952  	// calculated based on exam
  2953  	// results and other requirements.
  2954  	// @OutputOnly
  2955  	CertificationStatus []*Certification `json:"certificationStatus,omitempty"`
  2956  
  2957  	// Company: The company that the user is associated with.
  2958  	// If not present, the user is not associated with any company.
  2959  	Company *CompanyRelation `json:"company,omitempty"`
  2960  
  2961  	// CompanyVerificationEmail: The email address used by the user used for
  2962  	// company verification.
  2963  	// @OutputOnly
  2964  	CompanyVerificationEmail string `json:"companyVerificationEmail,omitempty"`
  2965  
  2966  	// ExamStatus: The list of exams the user ever taken. For each type of
  2967  	// exam, only one
  2968  	// entry is listed.
  2969  	ExamStatus []*ExamStatus `json:"examStatus,omitempty"`
  2970  
  2971  	// Id: The ID of the user.
  2972  	Id string `json:"id,omitempty"`
  2973  
  2974  	// InternalId: The internal user ID.
  2975  	// Only available for a whitelisted set of api clients.
  2976  	InternalId string `json:"internalId,omitempty"`
  2977  
  2978  	// LastAccessTime: The most recent time the user interacted with the
  2979  	// Partners site.
  2980  	// @OutputOnly
  2981  	LastAccessTime string `json:"lastAccessTime,omitempty"`
  2982  
  2983  	// PrimaryEmails: The list of emails the user has access to/can select
  2984  	// as primary.
  2985  	// @OutputOnly
  2986  	PrimaryEmails []string `json:"primaryEmails,omitempty"`
  2987  
  2988  	// Profile: The profile information of a Partners user, contains all the
  2989  	// directly
  2990  	// editable user information.
  2991  	Profile *UserProfile `json:"profile,omitempty"`
  2992  
  2993  	// PublicProfile: Information about a user's external public profile
  2994  	// outside Google Partners.
  2995  	PublicProfile *PublicProfile `json:"publicProfile,omitempty"`
  2996  
  2997  	// ServerResponse contains the HTTP response code and headers from the
  2998  	// server.
  2999  	googleapi.ServerResponse `json:"-"`
  3000  
  3001  	// ForceSendFields is a list of field names (e.g. "AfaInfoShared") to
  3002  	// unconditionally include in API requests. By default, fields with
  3003  	// empty values are omitted from API requests. However, any non-pointer,
  3004  	// non-interface field appearing in ForceSendFields will be sent to the
  3005  	// server regardless of whether the field is empty or not. This may be
  3006  	// used to include empty fields in Patch requests.
  3007  	ForceSendFields []string `json:"-"`
  3008  
  3009  	// NullFields is a list of field names (e.g. "AfaInfoShared") to include
  3010  	// in API requests with the JSON null value. By default, fields with
  3011  	// empty values are omitted from API requests. However, any field with
  3012  	// an empty value appearing in NullFields will be sent to the server as
  3013  	// null. It is an error if a field in this list has a non-empty value.
  3014  	// This may be used to include null fields in Patch requests.
  3015  	NullFields []string `json:"-"`
  3016  }
  3017  
  3018  func (s *User) MarshalJSON() ([]byte, error) {
  3019  	type NoMethod User
  3020  	raw := NoMethod(*s)
  3021  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3022  }
  3023  
  3024  // UserOverrides: Values to use instead of the user's respective
  3025  // defaults. These are only
  3026  // honored by whitelisted products.
  3027  type UserOverrides struct {
  3028  	// IpAddress: IP address to use instead of the user's geo-located IP
  3029  	// address.
  3030  	IpAddress string `json:"ipAddress,omitempty"`
  3031  
  3032  	// UserId: Logged-in user ID to impersonate instead of the user's ID.
  3033  	UserId string `json:"userId,omitempty"`
  3034  
  3035  	// ForceSendFields is a list of field names (e.g. "IpAddress") to
  3036  	// unconditionally include in API requests. By default, fields with
  3037  	// empty values are omitted from API requests. However, any non-pointer,
  3038  	// non-interface field appearing in ForceSendFields will be sent to the
  3039  	// server regardless of whether the field is empty or not. This may be
  3040  	// used to include empty fields in Patch requests.
  3041  	ForceSendFields []string `json:"-"`
  3042  
  3043  	// NullFields is a list of field names (e.g. "IpAddress") to include in
  3044  	// API requests with the JSON null value. By default, fields with empty
  3045  	// values are omitted from API requests. However, any field with an
  3046  	// empty value appearing in NullFields will be sent to the server as
  3047  	// null. It is an error if a field in this list has a non-empty value.
  3048  	// This may be used to include null fields in Patch requests.
  3049  	NullFields []string `json:"-"`
  3050  }
  3051  
  3052  func (s *UserOverrides) MarshalJSON() ([]byte, error) {
  3053  	type NoMethod UserOverrides
  3054  	raw := NoMethod(*s)
  3055  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3056  }
  3057  
  3058  // UserProfile: The profile information of a Partners user.
  3059  type UserProfile struct {
  3060  	// Address: The user's mailing address, contains multiple fields.
  3061  	Address *Location `json:"address,omitempty"`
  3062  
  3063  	// AdwordsManagerAccount: If the user has edit access to multiple
  3064  	// accounts, the user can choose the
  3065  	// preferred account and it is used when a personal account is needed.
  3066  	// Can
  3067  	// be empty.
  3068  	AdwordsManagerAccount int64 `json:"adwordsManagerAccount,omitempty,string"`
  3069  
  3070  	// Channels: A list of ids representing which channels the user selected
  3071  	// they were in.
  3072  	Channels []string `json:"channels,omitempty"`
  3073  
  3074  	// EmailAddress: The email address the user has selected on the Partners
  3075  	// site as primary.
  3076  	EmailAddress string `json:"emailAddress,omitempty"`
  3077  
  3078  	// EmailOptIns: The list of opt-ins for the user, related to
  3079  	// communication preferences.
  3080  	EmailOptIns *OptIns `json:"emailOptIns,omitempty"`
  3081  
  3082  	// FamilyName: The user's family name.
  3083  	FamilyName string `json:"familyName,omitempty"`
  3084  
  3085  	// GivenName: The user's given name.
  3086  	GivenName string `json:"givenName,omitempty"`
  3087  
  3088  	// Industries: A list of ids representing which industries the user
  3089  	// selected.
  3090  	Industries []string `json:"industries,omitempty"`
  3091  
  3092  	// JobFunctions: A list of ids represnting which job categories the user
  3093  	// selected.
  3094  	JobFunctions []string `json:"jobFunctions,omitempty"`
  3095  
  3096  	// Languages: The list of languages this user understands.
  3097  	Languages []string `json:"languages,omitempty"`
  3098  
  3099  	// Markets: A list of ids representing which markets the user was
  3100  	// interested in.
  3101  	Markets []string `json:"markets,omitempty"`
  3102  
  3103  	// MigrateToAfa: Whether or not to migrate the user's exam data to
  3104  	// Academy for Ads.
  3105  	MigrateToAfa bool `json:"migrateToAfa,omitempty"`
  3106  
  3107  	// PhoneNumber: The user's phone number.
  3108  	PhoneNumber string `json:"phoneNumber,omitempty"`
  3109  
  3110  	// PrimaryCountryCode: The user's primary country, an ISO 2-character
  3111  	// code.
  3112  	PrimaryCountryCode string `json:"primaryCountryCode,omitempty"`
  3113  
  3114  	// ProfilePublic: Whether the user's public profile is visible to anyone
  3115  	// with the URL.
  3116  	ProfilePublic bool `json:"profilePublic,omitempty"`
  3117  
  3118  	// ServerResponse contains the HTTP response code and headers from the
  3119  	// server.
  3120  	googleapi.ServerResponse `json:"-"`
  3121  
  3122  	// ForceSendFields is a list of field names (e.g. "Address") to
  3123  	// unconditionally include in API requests. By default, fields with
  3124  	// empty values are omitted from API requests. However, any non-pointer,
  3125  	// non-interface field appearing in ForceSendFields will be sent to the
  3126  	// server regardless of whether the field is empty or not. This may be
  3127  	// used to include empty fields in Patch requests.
  3128  	ForceSendFields []string `json:"-"`
  3129  
  3130  	// NullFields is a list of field names (e.g. "Address") to include in
  3131  	// API requests with the JSON null value. By default, fields with empty
  3132  	// values are omitted from API requests. However, any field with an
  3133  	// empty value appearing in NullFields will be sent to the server as
  3134  	// null. It is an error if a field in this list has a non-empty value.
  3135  	// This may be used to include null fields in Patch requests.
  3136  	NullFields []string `json:"-"`
  3137  }
  3138  
  3139  func (s *UserProfile) MarshalJSON() ([]byte, error) {
  3140  	type NoMethod UserProfile
  3141  	raw := NoMethod(*s)
  3142  	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3143  }
  3144  
  3145  // method id "partners.analytics.list":
  3146  
  3147  type AnalyticsListCall struct {
  3148  	s            *Service
  3149  	urlParams_   gensupport.URLParams
  3150  	ifNoneMatch_ string
  3151  	ctx_         context.Context
  3152  	header_      http.Header
  3153  }
  3154  
  3155  // List: Lists analytics data for a user's associated company.
  3156  // Should only be called within the context of an authorized logged in
  3157  // user.
  3158  func (r *AnalyticsService) List() *AnalyticsListCall {
  3159  	c := &AnalyticsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3160  	return c
  3161  }
  3162  
  3163  // PageSize sets the optional parameter "pageSize": Requested page size.
  3164  // Server may return fewer analytics than requested.
  3165  // If unspecified or set to 0, default value is 30.
  3166  // Specifies the number of days in the date range when querying
  3167  // analytics.
  3168  // The `page_token` represents the end date of the date range
  3169  // and the start date is calculated using the `page_size` as the
  3170  // number
  3171  // of days BEFORE the end date.
  3172  // Must be a non-negative integer.
  3173  func (c *AnalyticsListCall) PageSize(pageSize int64) *AnalyticsListCall {
  3174  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3175  	return c
  3176  }
  3177  
  3178  // PageToken sets the optional parameter "pageToken": A token
  3179  // identifying a page of results that the server returns.
  3180  // Typically, this is the value of
  3181  // `ListAnalyticsResponse.next_page_token`
  3182  // returned from the previous call to
  3183  // ListAnalytics.
  3184  // Will be a date string in `YYYY-MM-DD` format representing the end
  3185  // date
  3186  // of the date range of results to return.
  3187  // If unspecified or set to "", default value is the current date.
  3188  func (c *AnalyticsListCall) PageToken(pageToken string) *AnalyticsListCall {
  3189  	c.urlParams_.Set("pageToken", pageToken)
  3190  	return c
  3191  }
  3192  
  3193  // RequestMetadataExperimentIds sets the optional parameter
  3194  // "requestMetadata.experimentIds": Experiment IDs the current request
  3195  // belongs to.
  3196  func (c *AnalyticsListCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *AnalyticsListCall {
  3197  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  3198  	return c
  3199  }
  3200  
  3201  // RequestMetadataLocale sets the optional parameter
  3202  // "requestMetadata.locale": Locale to use for the current request.
  3203  func (c *AnalyticsListCall) RequestMetadataLocale(requestMetadataLocale string) *AnalyticsListCall {
  3204  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  3205  	return c
  3206  }
  3207  
  3208  // RequestMetadataPartnersSessionId sets the optional parameter
  3209  // "requestMetadata.partnersSessionId": Google Partners session ID.
  3210  func (c *AnalyticsListCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *AnalyticsListCall {
  3211  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  3212  	return c
  3213  }
  3214  
  3215  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  3216  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  3217  // to indicate where the traffic comes from.
  3218  // An identifier has multiple letters created by a team which redirected
  3219  // the
  3220  // traffic to us.
  3221  func (c *AnalyticsListCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *AnalyticsListCall {
  3222  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  3223  	return c
  3224  }
  3225  
  3226  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  3227  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  3228  // to indicate where the traffic comes from.
  3229  // An identifier has multiple letters created by a team which redirected
  3230  // the
  3231  // traffic to us.
  3232  func (c *AnalyticsListCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *AnalyticsListCall {
  3233  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  3234  	return c
  3235  }
  3236  
  3237  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  3238  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  3239  // of the user's geo-located IP address.
  3240  func (c *AnalyticsListCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *AnalyticsListCall {
  3241  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  3242  	return c
  3243  }
  3244  
  3245  // RequestMetadataUserOverridesUserId sets the optional parameter
  3246  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  3247  // impersonate instead of the user's ID.
  3248  func (c *AnalyticsListCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *AnalyticsListCall {
  3249  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  3250  	return c
  3251  }
  3252  
  3253  // Fields allows partial responses to be retrieved. See
  3254  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3255  // for more information.
  3256  func (c *AnalyticsListCall) Fields(s ...googleapi.Field) *AnalyticsListCall {
  3257  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3258  	return c
  3259  }
  3260  
  3261  // IfNoneMatch sets the optional parameter which makes the operation
  3262  // fail if the object's ETag matches the given value. This is useful for
  3263  // getting updates only after the object has changed since the last
  3264  // request. Use googleapi.IsNotModified to check whether the response
  3265  // error from Do is the result of In-None-Match.
  3266  func (c *AnalyticsListCall) IfNoneMatch(entityTag string) *AnalyticsListCall {
  3267  	c.ifNoneMatch_ = entityTag
  3268  	return c
  3269  }
  3270  
  3271  // Context sets the context to be used in this call's Do method. Any
  3272  // pending HTTP request will be aborted if the provided context is
  3273  // canceled.
  3274  func (c *AnalyticsListCall) Context(ctx context.Context) *AnalyticsListCall {
  3275  	c.ctx_ = ctx
  3276  	return c
  3277  }
  3278  
  3279  // Header returns an http.Header that can be modified by the caller to
  3280  // add HTTP headers to the request.
  3281  func (c *AnalyticsListCall) Header() http.Header {
  3282  	if c.header_ == nil {
  3283  		c.header_ = make(http.Header)
  3284  	}
  3285  	return c.header_
  3286  }
  3287  
  3288  func (c *AnalyticsListCall) doRequest(alt string) (*http.Response, error) {
  3289  	reqHeaders := make(http.Header)
  3290  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3291  	for k, v := range c.header_ {
  3292  		reqHeaders[k] = v
  3293  	}
  3294  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3295  	if c.ifNoneMatch_ != "" {
  3296  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3297  	}
  3298  	var body io.Reader = nil
  3299  	c.urlParams_.Set("alt", alt)
  3300  	c.urlParams_.Set("prettyPrint", "false")
  3301  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/analytics")
  3302  	urls += "?" + c.urlParams_.Encode()
  3303  	req, err := http.NewRequest("GET", urls, body)
  3304  	if err != nil {
  3305  		return nil, err
  3306  	}
  3307  	req.Header = reqHeaders
  3308  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3309  }
  3310  
  3311  // Do executes the "partners.analytics.list" call.
  3312  // Exactly one of *ListAnalyticsResponse or error will be non-nil. Any
  3313  // non-2xx status code is an error. Response headers are in either
  3314  // *ListAnalyticsResponse.ServerResponse.Header or (if a response was
  3315  // returned at all) in error.(*googleapi.Error).Header. Use
  3316  // googleapi.IsNotModified to check whether the returned error was
  3317  // because http.StatusNotModified was returned.
  3318  func (c *AnalyticsListCall) Do(opts ...googleapi.CallOption) (*ListAnalyticsResponse, error) {
  3319  	gensupport.SetOptions(c.urlParams_, opts...)
  3320  	res, err := c.doRequest("json")
  3321  	if res != nil && res.StatusCode == http.StatusNotModified {
  3322  		if res.Body != nil {
  3323  			res.Body.Close()
  3324  		}
  3325  		return nil, &googleapi.Error{
  3326  			Code:   res.StatusCode,
  3327  			Header: res.Header,
  3328  		}
  3329  	}
  3330  	if err != nil {
  3331  		return nil, err
  3332  	}
  3333  	defer googleapi.CloseBody(res)
  3334  	if err := googleapi.CheckResponse(res); err != nil {
  3335  		return nil, err
  3336  	}
  3337  	ret := &ListAnalyticsResponse{
  3338  		ServerResponse: googleapi.ServerResponse{
  3339  			Header:         res.Header,
  3340  			HTTPStatusCode: res.StatusCode,
  3341  		},
  3342  	}
  3343  	target := &ret
  3344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3345  		return nil, err
  3346  	}
  3347  	return ret, nil
  3348  	// {
  3349  	//   "description": "Lists analytics data for a user's associated company.\nShould only be called within the context of an authorized logged in user.",
  3350  	//   "flatPath": "v2/analytics",
  3351  	//   "httpMethod": "GET",
  3352  	//   "id": "partners.analytics.list",
  3353  	//   "parameterOrder": [],
  3354  	//   "parameters": {
  3355  	//     "pageSize": {
  3356  	//       "description": "Requested page size. Server may return fewer analytics than requested.\nIf unspecified or set to 0, default value is 30.\nSpecifies the number of days in the date range when querying analytics.\nThe `page_token` represents the end date of the date range\nand the start date is calculated using the `page_size` as the number\nof days BEFORE the end date.\nMust be a non-negative integer.",
  3357  	//       "format": "int32",
  3358  	//       "location": "query",
  3359  	//       "type": "integer"
  3360  	//     },
  3361  	//     "pageToken": {
  3362  	//       "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListAnalyticsResponse.next_page_token`\nreturned from the previous call to\nListAnalytics.\nWill be a date string in `YYYY-MM-DD` format representing the end date\nof the date range of results to return.\nIf unspecified or set to \"\", default value is the current date.",
  3363  	//       "location": "query",
  3364  	//       "type": "string"
  3365  	//     },
  3366  	//     "requestMetadata.experimentIds": {
  3367  	//       "description": "Experiment IDs the current request belongs to.",
  3368  	//       "location": "query",
  3369  	//       "repeated": true,
  3370  	//       "type": "string"
  3371  	//     },
  3372  	//     "requestMetadata.locale": {
  3373  	//       "description": "Locale to use for the current request.",
  3374  	//       "location": "query",
  3375  	//       "type": "string"
  3376  	//     },
  3377  	//     "requestMetadata.partnersSessionId": {
  3378  	//       "description": "Google Partners session ID.",
  3379  	//       "location": "query",
  3380  	//       "type": "string"
  3381  	//     },
  3382  	//     "requestMetadata.trafficSource.trafficSourceId": {
  3383  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  3384  	//       "location": "query",
  3385  	//       "type": "string"
  3386  	//     },
  3387  	//     "requestMetadata.trafficSource.trafficSubId": {
  3388  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  3389  	//       "location": "query",
  3390  	//       "type": "string"
  3391  	//     },
  3392  	//     "requestMetadata.userOverrides.ipAddress": {
  3393  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  3394  	//       "location": "query",
  3395  	//       "type": "string"
  3396  	//     },
  3397  	//     "requestMetadata.userOverrides.userId": {
  3398  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  3399  	//       "location": "query",
  3400  	//       "type": "string"
  3401  	//     }
  3402  	//   },
  3403  	//   "path": "v2/analytics",
  3404  	//   "response": {
  3405  	//     "$ref": "ListAnalyticsResponse"
  3406  	//   }
  3407  	// }
  3408  
  3409  }
  3410  
  3411  // Pages invokes f for each page of results.
  3412  // A non-nil error returned from f will halt the iteration.
  3413  // The provided context supersedes any context provided to the Context method.
  3414  func (c *AnalyticsListCall) Pages(ctx context.Context, f func(*ListAnalyticsResponse) error) error {
  3415  	c.ctx_ = ctx
  3416  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3417  	for {
  3418  		x, err := c.Do()
  3419  		if err != nil {
  3420  			return err
  3421  		}
  3422  		if err := f(x); err != nil {
  3423  			return err
  3424  		}
  3425  		if x.NextPageToken == "" {
  3426  			return nil
  3427  		}
  3428  		c.PageToken(x.NextPageToken)
  3429  	}
  3430  }
  3431  
  3432  // method id "partners.clientMessages.log":
  3433  
  3434  type ClientMessagesLogCall struct {
  3435  	s                 *Service
  3436  	logmessagerequest *LogMessageRequest
  3437  	urlParams_        gensupport.URLParams
  3438  	ctx_              context.Context
  3439  	header_           http.Header
  3440  }
  3441  
  3442  // Log: Logs a generic message from the client, such as
  3443  // `Failed to render component`, `Profile page is running slow`,
  3444  // `More than 500 users have accessed this result.`, etc.
  3445  func (r *ClientMessagesService) Log(logmessagerequest *LogMessageRequest) *ClientMessagesLogCall {
  3446  	c := &ClientMessagesLogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3447  	c.logmessagerequest = logmessagerequest
  3448  	return c
  3449  }
  3450  
  3451  // Fields allows partial responses to be retrieved. See
  3452  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3453  // for more information.
  3454  func (c *ClientMessagesLogCall) Fields(s ...googleapi.Field) *ClientMessagesLogCall {
  3455  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3456  	return c
  3457  }
  3458  
  3459  // Context sets the context to be used in this call's Do method. Any
  3460  // pending HTTP request will be aborted if the provided context is
  3461  // canceled.
  3462  func (c *ClientMessagesLogCall) Context(ctx context.Context) *ClientMessagesLogCall {
  3463  	c.ctx_ = ctx
  3464  	return c
  3465  }
  3466  
  3467  // Header returns an http.Header that can be modified by the caller to
  3468  // add HTTP headers to the request.
  3469  func (c *ClientMessagesLogCall) Header() http.Header {
  3470  	if c.header_ == nil {
  3471  		c.header_ = make(http.Header)
  3472  	}
  3473  	return c.header_
  3474  }
  3475  
  3476  func (c *ClientMessagesLogCall) doRequest(alt string) (*http.Response, error) {
  3477  	reqHeaders := make(http.Header)
  3478  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3479  	for k, v := range c.header_ {
  3480  		reqHeaders[k] = v
  3481  	}
  3482  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3483  	var body io.Reader = nil
  3484  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmessagerequest)
  3485  	if err != nil {
  3486  		return nil, err
  3487  	}
  3488  	reqHeaders.Set("Content-Type", "application/json")
  3489  	c.urlParams_.Set("alt", alt)
  3490  	c.urlParams_.Set("prettyPrint", "false")
  3491  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/clientMessages:log")
  3492  	urls += "?" + c.urlParams_.Encode()
  3493  	req, err := http.NewRequest("POST", urls, body)
  3494  	if err != nil {
  3495  		return nil, err
  3496  	}
  3497  	req.Header = reqHeaders
  3498  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3499  }
  3500  
  3501  // Do executes the "partners.clientMessages.log" call.
  3502  // Exactly one of *LogMessageResponse or error will be non-nil. Any
  3503  // non-2xx status code is an error. Response headers are in either
  3504  // *LogMessageResponse.ServerResponse.Header or (if a response was
  3505  // returned at all) in error.(*googleapi.Error).Header. Use
  3506  // googleapi.IsNotModified to check whether the returned error was
  3507  // because http.StatusNotModified was returned.
  3508  func (c *ClientMessagesLogCall) Do(opts ...googleapi.CallOption) (*LogMessageResponse, error) {
  3509  	gensupport.SetOptions(c.urlParams_, opts...)
  3510  	res, err := c.doRequest("json")
  3511  	if res != nil && res.StatusCode == http.StatusNotModified {
  3512  		if res.Body != nil {
  3513  			res.Body.Close()
  3514  		}
  3515  		return nil, &googleapi.Error{
  3516  			Code:   res.StatusCode,
  3517  			Header: res.Header,
  3518  		}
  3519  	}
  3520  	if err != nil {
  3521  		return nil, err
  3522  	}
  3523  	defer googleapi.CloseBody(res)
  3524  	if err := googleapi.CheckResponse(res); err != nil {
  3525  		return nil, err
  3526  	}
  3527  	ret := &LogMessageResponse{
  3528  		ServerResponse: googleapi.ServerResponse{
  3529  			Header:         res.Header,
  3530  			HTTPStatusCode: res.StatusCode,
  3531  		},
  3532  	}
  3533  	target := &ret
  3534  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3535  		return nil, err
  3536  	}
  3537  	return ret, nil
  3538  	// {
  3539  	//   "description": "Logs a generic message from the client, such as\n`Failed to render component`, `Profile page is running slow`,\n`More than 500 users have accessed this result.`, etc.",
  3540  	//   "flatPath": "v2/clientMessages:log",
  3541  	//   "httpMethod": "POST",
  3542  	//   "id": "partners.clientMessages.log",
  3543  	//   "parameterOrder": [],
  3544  	//   "parameters": {},
  3545  	//   "path": "v2/clientMessages:log",
  3546  	//   "request": {
  3547  	//     "$ref": "LogMessageRequest"
  3548  	//   },
  3549  	//   "response": {
  3550  	//     "$ref": "LogMessageResponse"
  3551  	//   }
  3552  	// }
  3553  
  3554  }
  3555  
  3556  // method id "partners.companies.get":
  3557  
  3558  type CompaniesGetCall struct {
  3559  	s            *Service
  3560  	companyId    string
  3561  	urlParams_   gensupport.URLParams
  3562  	ifNoneMatch_ string
  3563  	ctx_         context.Context
  3564  	header_      http.Header
  3565  }
  3566  
  3567  // Get: Gets a company.
  3568  func (r *CompaniesService) Get(companyId string) *CompaniesGetCall {
  3569  	c := &CompaniesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3570  	c.companyId = companyId
  3571  	return c
  3572  }
  3573  
  3574  // Address sets the optional parameter "address": The address to use for
  3575  // sorting the company's addresses by proximity.
  3576  // If not given, the geo-located address of the request is used.
  3577  // Used when order_by is set.
  3578  func (c *CompaniesGetCall) Address(address string) *CompaniesGetCall {
  3579  	c.urlParams_.Set("address", address)
  3580  	return c
  3581  }
  3582  
  3583  // CurrencyCode sets the optional parameter "currencyCode": If the
  3584  // company's budget is in a different currency code than this one,
  3585  // then
  3586  // the converted budget is converted to this currency code.
  3587  func (c *CompaniesGetCall) CurrencyCode(currencyCode string) *CompaniesGetCall {
  3588  	c.urlParams_.Set("currencyCode", currencyCode)
  3589  	return c
  3590  }
  3591  
  3592  // OrderBy sets the optional parameter "orderBy": How to order addresses
  3593  // within the returned company. Currently, only
  3594  // `address` and `address desc` is supported which will sorted by
  3595  // closest to
  3596  // farthest in distance from given address and farthest to closest
  3597  // distance
  3598  // from given address respectively.
  3599  func (c *CompaniesGetCall) OrderBy(orderBy string) *CompaniesGetCall {
  3600  	c.urlParams_.Set("orderBy", orderBy)
  3601  	return c
  3602  }
  3603  
  3604  // RequestMetadataExperimentIds sets the optional parameter
  3605  // "requestMetadata.experimentIds": Experiment IDs the current request
  3606  // belongs to.
  3607  func (c *CompaniesGetCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *CompaniesGetCall {
  3608  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  3609  	return c
  3610  }
  3611  
  3612  // RequestMetadataLocale sets the optional parameter
  3613  // "requestMetadata.locale": Locale to use for the current request.
  3614  func (c *CompaniesGetCall) RequestMetadataLocale(requestMetadataLocale string) *CompaniesGetCall {
  3615  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  3616  	return c
  3617  }
  3618  
  3619  // RequestMetadataPartnersSessionId sets the optional parameter
  3620  // "requestMetadata.partnersSessionId": Google Partners session ID.
  3621  func (c *CompaniesGetCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *CompaniesGetCall {
  3622  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  3623  	return c
  3624  }
  3625  
  3626  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  3627  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  3628  // to indicate where the traffic comes from.
  3629  // An identifier has multiple letters created by a team which redirected
  3630  // the
  3631  // traffic to us.
  3632  func (c *CompaniesGetCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *CompaniesGetCall {
  3633  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  3634  	return c
  3635  }
  3636  
  3637  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  3638  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  3639  // to indicate where the traffic comes from.
  3640  // An identifier has multiple letters created by a team which redirected
  3641  // the
  3642  // traffic to us.
  3643  func (c *CompaniesGetCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *CompaniesGetCall {
  3644  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  3645  	return c
  3646  }
  3647  
  3648  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  3649  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  3650  // of the user's geo-located IP address.
  3651  func (c *CompaniesGetCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *CompaniesGetCall {
  3652  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  3653  	return c
  3654  }
  3655  
  3656  // RequestMetadataUserOverridesUserId sets the optional parameter
  3657  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  3658  // impersonate instead of the user's ID.
  3659  func (c *CompaniesGetCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *CompaniesGetCall {
  3660  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  3661  	return c
  3662  }
  3663  
  3664  // View sets the optional parameter "view": The view of `Company`
  3665  // resource to be returned. This must not be
  3666  // `COMPANY_VIEW_UNSPECIFIED`.
  3667  //
  3668  // Possible values:
  3669  //
  3670  //	"COMPANY_VIEW_UNSPECIFIED"
  3671  //	"CV_GOOGLE_PARTNER_SEARCH"
  3672  func (c *CompaniesGetCall) View(view string) *CompaniesGetCall {
  3673  	c.urlParams_.Set("view", view)
  3674  	return c
  3675  }
  3676  
  3677  // Fields allows partial responses to be retrieved. See
  3678  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3679  // for more information.
  3680  func (c *CompaniesGetCall) Fields(s ...googleapi.Field) *CompaniesGetCall {
  3681  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3682  	return c
  3683  }
  3684  
  3685  // IfNoneMatch sets the optional parameter which makes the operation
  3686  // fail if the object's ETag matches the given value. This is useful for
  3687  // getting updates only after the object has changed since the last
  3688  // request. Use googleapi.IsNotModified to check whether the response
  3689  // error from Do is the result of In-None-Match.
  3690  func (c *CompaniesGetCall) IfNoneMatch(entityTag string) *CompaniesGetCall {
  3691  	c.ifNoneMatch_ = entityTag
  3692  	return c
  3693  }
  3694  
  3695  // Context sets the context to be used in this call's Do method. Any
  3696  // pending HTTP request will be aborted if the provided context is
  3697  // canceled.
  3698  func (c *CompaniesGetCall) Context(ctx context.Context) *CompaniesGetCall {
  3699  	c.ctx_ = ctx
  3700  	return c
  3701  }
  3702  
  3703  // Header returns an http.Header that can be modified by the caller to
  3704  // add HTTP headers to the request.
  3705  func (c *CompaniesGetCall) Header() http.Header {
  3706  	if c.header_ == nil {
  3707  		c.header_ = make(http.Header)
  3708  	}
  3709  	return c.header_
  3710  }
  3711  
  3712  func (c *CompaniesGetCall) doRequest(alt string) (*http.Response, error) {
  3713  	reqHeaders := make(http.Header)
  3714  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  3715  	for k, v := range c.header_ {
  3716  		reqHeaders[k] = v
  3717  	}
  3718  	reqHeaders.Set("User-Agent", c.s.userAgent())
  3719  	if c.ifNoneMatch_ != "" {
  3720  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3721  	}
  3722  	var body io.Reader = nil
  3723  	c.urlParams_.Set("alt", alt)
  3724  	c.urlParams_.Set("prettyPrint", "false")
  3725  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/companies/{companyId}")
  3726  	urls += "?" + c.urlParams_.Encode()
  3727  	req, err := http.NewRequest("GET", urls, body)
  3728  	if err != nil {
  3729  		return nil, err
  3730  	}
  3731  	req.Header = reqHeaders
  3732  	googleapi.Expand(req.URL, map[string]string{
  3733  		"companyId": c.companyId,
  3734  	})
  3735  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3736  }
  3737  
  3738  // Do executes the "partners.companies.get" call.
  3739  // Exactly one of *GetCompanyResponse or error will be non-nil. Any
  3740  // non-2xx status code is an error. Response headers are in either
  3741  // *GetCompanyResponse.ServerResponse.Header or (if a response was
  3742  // returned at all) in error.(*googleapi.Error).Header. Use
  3743  // googleapi.IsNotModified to check whether the returned error was
  3744  // because http.StatusNotModified was returned.
  3745  func (c *CompaniesGetCall) Do(opts ...googleapi.CallOption) (*GetCompanyResponse, error) {
  3746  	gensupport.SetOptions(c.urlParams_, opts...)
  3747  	res, err := c.doRequest("json")
  3748  	if res != nil && res.StatusCode == http.StatusNotModified {
  3749  		if res.Body != nil {
  3750  			res.Body.Close()
  3751  		}
  3752  		return nil, &googleapi.Error{
  3753  			Code:   res.StatusCode,
  3754  			Header: res.Header,
  3755  		}
  3756  	}
  3757  	if err != nil {
  3758  		return nil, err
  3759  	}
  3760  	defer googleapi.CloseBody(res)
  3761  	if err := googleapi.CheckResponse(res); err != nil {
  3762  		return nil, err
  3763  	}
  3764  	ret := &GetCompanyResponse{
  3765  		ServerResponse: googleapi.ServerResponse{
  3766  			Header:         res.Header,
  3767  			HTTPStatusCode: res.StatusCode,
  3768  		},
  3769  	}
  3770  	target := &ret
  3771  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3772  		return nil, err
  3773  	}
  3774  	return ret, nil
  3775  	// {
  3776  	//   "description": "Gets a company.",
  3777  	//   "flatPath": "v2/companies/{companyId}",
  3778  	//   "httpMethod": "GET",
  3779  	//   "id": "partners.companies.get",
  3780  	//   "parameterOrder": [
  3781  	//     "companyId"
  3782  	//   ],
  3783  	//   "parameters": {
  3784  	//     "address": {
  3785  	//       "description": "The address to use for sorting the company's addresses by proximity.\nIf not given, the geo-located address of the request is used.\nUsed when order_by is set.",
  3786  	//       "location": "query",
  3787  	//       "type": "string"
  3788  	//     },
  3789  	//     "companyId": {
  3790  	//       "description": "The ID of the company to retrieve.",
  3791  	//       "location": "path",
  3792  	//       "required": true,
  3793  	//       "type": "string"
  3794  	//     },
  3795  	//     "currencyCode": {
  3796  	//       "description": "If the company's budget is in a different currency code than this one, then\nthe converted budget is converted to this currency code.",
  3797  	//       "location": "query",
  3798  	//       "type": "string"
  3799  	//     },
  3800  	//     "orderBy": {
  3801  	//       "description": "How to order addresses within the returned company. Currently, only\n`address` and `address desc` is supported which will sorted by closest to\nfarthest in distance from given address and farthest to closest distance\nfrom given address respectively.",
  3802  	//       "location": "query",
  3803  	//       "type": "string"
  3804  	//     },
  3805  	//     "requestMetadata.experimentIds": {
  3806  	//       "description": "Experiment IDs the current request belongs to.",
  3807  	//       "location": "query",
  3808  	//       "repeated": true,
  3809  	//       "type": "string"
  3810  	//     },
  3811  	//     "requestMetadata.locale": {
  3812  	//       "description": "Locale to use for the current request.",
  3813  	//       "location": "query",
  3814  	//       "type": "string"
  3815  	//     },
  3816  	//     "requestMetadata.partnersSessionId": {
  3817  	//       "description": "Google Partners session ID.",
  3818  	//       "location": "query",
  3819  	//       "type": "string"
  3820  	//     },
  3821  	//     "requestMetadata.trafficSource.trafficSourceId": {
  3822  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  3823  	//       "location": "query",
  3824  	//       "type": "string"
  3825  	//     },
  3826  	//     "requestMetadata.trafficSource.trafficSubId": {
  3827  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  3828  	//       "location": "query",
  3829  	//       "type": "string"
  3830  	//     },
  3831  	//     "requestMetadata.userOverrides.ipAddress": {
  3832  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  3833  	//       "location": "query",
  3834  	//       "type": "string"
  3835  	//     },
  3836  	//     "requestMetadata.userOverrides.userId": {
  3837  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  3838  	//       "location": "query",
  3839  	//       "type": "string"
  3840  	//     },
  3841  	//     "view": {
  3842  	//       "description": "The view of `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`.",
  3843  	//       "enum": [
  3844  	//         "COMPANY_VIEW_UNSPECIFIED",
  3845  	//         "CV_GOOGLE_PARTNER_SEARCH"
  3846  	//       ],
  3847  	//       "location": "query",
  3848  	//       "type": "string"
  3849  	//     }
  3850  	//   },
  3851  	//   "path": "v2/companies/{companyId}",
  3852  	//   "response": {
  3853  	//     "$ref": "GetCompanyResponse"
  3854  	//   }
  3855  	// }
  3856  
  3857  }
  3858  
  3859  // method id "partners.companies.list":
  3860  
  3861  type CompaniesListCall struct {
  3862  	s            *Service
  3863  	urlParams_   gensupport.URLParams
  3864  	ifNoneMatch_ string
  3865  	ctx_         context.Context
  3866  	header_      http.Header
  3867  }
  3868  
  3869  // List: Lists companies.
  3870  func (r *CompaniesService) List() *CompaniesListCall {
  3871  	c := &CompaniesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3872  	return c
  3873  }
  3874  
  3875  // Address sets the optional parameter "address": The address to use
  3876  // when searching for companies.
  3877  // If not given, the geo-located address of the request is used.
  3878  func (c *CompaniesListCall) Address(address string) *CompaniesListCall {
  3879  	c.urlParams_.Set("address", address)
  3880  	return c
  3881  }
  3882  
  3883  // CompanyName sets the optional parameter "companyName": Company name
  3884  // to search for.
  3885  func (c *CompaniesListCall) CompanyName(companyName string) *CompaniesListCall {
  3886  	c.urlParams_.Set("companyName", companyName)
  3887  	return c
  3888  }
  3889  
  3890  // GpsMotivations sets the optional parameter "gpsMotivations": List of
  3891  // reasons for using Google Partner Search to get companies.
  3892  //
  3893  // Possible values:
  3894  //
  3895  //	"GPS_MOTIVATION_UNSPECIFIED"
  3896  //	"GPSM_HELP_WITH_ADVERTISING"
  3897  //	"GPSM_HELP_WITH_WEBSITE"
  3898  //	"GPSM_NO_WEBSITE"
  3899  func (c *CompaniesListCall) GpsMotivations(gpsMotivations ...string) *CompaniesListCall {
  3900  	c.urlParams_.SetMulti("gpsMotivations", append([]string{}, gpsMotivations...))
  3901  	return c
  3902  }
  3903  
  3904  // Industries sets the optional parameter "industries": List of
  3905  // industries the company can help with.
  3906  //
  3907  // Possible values:
  3908  //
  3909  //	"INDUSTRY_UNSPECIFIED"
  3910  //	"I_AUTOMOTIVE"
  3911  //	"I_BUSINESS_TO_BUSINESS"
  3912  //	"I_CONSUMER_PACKAGED_GOODS"
  3913  //	"I_EDUCATION"
  3914  //	"I_FINANCE"
  3915  //	"I_HEALTHCARE"
  3916  //	"I_MEDIA_AND_ENTERTAINMENT"
  3917  //	"I_RETAIL"
  3918  //	"I_TECHNOLOGY"
  3919  //	"I_TRAVEL"
  3920  func (c *CompaniesListCall) Industries(industries ...string) *CompaniesListCall {
  3921  	c.urlParams_.SetMulti("industries", append([]string{}, industries...))
  3922  	return c
  3923  }
  3924  
  3925  // LanguageCodes sets the optional parameter "languageCodes": List of
  3926  // language codes that company can support. Only primary
  3927  // language
  3928  // subtags are accepted as defined by
  3929  // <a href="https://tools.ietf.org/html/bcp47">BCP 47</a>
  3930  // (IETF BCP 47, "Tags for Identifying Languages").
  3931  func (c *CompaniesListCall) LanguageCodes(languageCodes ...string) *CompaniesListCall {
  3932  	c.urlParams_.SetMulti("languageCodes", append([]string{}, languageCodes...))
  3933  	return c
  3934  }
  3935  
  3936  // MaxMonthlyBudgetCurrencyCode sets the optional parameter
  3937  // "maxMonthlyBudget.currencyCode": The 3-letter currency code defined
  3938  // in ISO 4217.
  3939  func (c *CompaniesListCall) MaxMonthlyBudgetCurrencyCode(maxMonthlyBudgetCurrencyCode string) *CompaniesListCall {
  3940  	c.urlParams_.Set("maxMonthlyBudget.currencyCode", maxMonthlyBudgetCurrencyCode)
  3941  	return c
  3942  }
  3943  
  3944  // MaxMonthlyBudgetNanos sets the optional parameter
  3945  // "maxMonthlyBudget.nanos": Number of nano (10^-9) units of the
  3946  // amount.
  3947  // The value must be between -999,999,999 and +999,999,999 inclusive.
  3948  // If `units` is positive, `nanos` must be positive or zero.
  3949  // If `units` is zero, `nanos` can be positive, zero, or negative.
  3950  // If `units` is negative, `nanos` must be negative or zero.
  3951  // For example $-1.75 is represented as `units`=-1 and
  3952  // `nanos`=-750,000,000.
  3953  func (c *CompaniesListCall) MaxMonthlyBudgetNanos(maxMonthlyBudgetNanos int64) *CompaniesListCall {
  3954  	c.urlParams_.Set("maxMonthlyBudget.nanos", fmt.Sprint(maxMonthlyBudgetNanos))
  3955  	return c
  3956  }
  3957  
  3958  // MaxMonthlyBudgetUnits sets the optional parameter
  3959  // "maxMonthlyBudget.units": The whole units of the amount.
  3960  // For example if `currencyCode` is "USD", then 1 unit is one US
  3961  // dollar.
  3962  func (c *CompaniesListCall) MaxMonthlyBudgetUnits(maxMonthlyBudgetUnits int64) *CompaniesListCall {
  3963  	c.urlParams_.Set("maxMonthlyBudget.units", fmt.Sprint(maxMonthlyBudgetUnits))
  3964  	return c
  3965  }
  3966  
  3967  // MinMonthlyBudgetCurrencyCode sets the optional parameter
  3968  // "minMonthlyBudget.currencyCode": The 3-letter currency code defined
  3969  // in ISO 4217.
  3970  func (c *CompaniesListCall) MinMonthlyBudgetCurrencyCode(minMonthlyBudgetCurrencyCode string) *CompaniesListCall {
  3971  	c.urlParams_.Set("minMonthlyBudget.currencyCode", minMonthlyBudgetCurrencyCode)
  3972  	return c
  3973  }
  3974  
  3975  // MinMonthlyBudgetNanos sets the optional parameter
  3976  // "minMonthlyBudget.nanos": Number of nano (10^-9) units of the
  3977  // amount.
  3978  // The value must be between -999,999,999 and +999,999,999 inclusive.
  3979  // If `units` is positive, `nanos` must be positive or zero.
  3980  // If `units` is zero, `nanos` can be positive, zero, or negative.
  3981  // If `units` is negative, `nanos` must be negative or zero.
  3982  // For example $-1.75 is represented as `units`=-1 and
  3983  // `nanos`=-750,000,000.
  3984  func (c *CompaniesListCall) MinMonthlyBudgetNanos(minMonthlyBudgetNanos int64) *CompaniesListCall {
  3985  	c.urlParams_.Set("minMonthlyBudget.nanos", fmt.Sprint(minMonthlyBudgetNanos))
  3986  	return c
  3987  }
  3988  
  3989  // MinMonthlyBudgetUnits sets the optional parameter
  3990  // "minMonthlyBudget.units": The whole units of the amount.
  3991  // For example if `currencyCode` is "USD", then 1 unit is one US
  3992  // dollar.
  3993  func (c *CompaniesListCall) MinMonthlyBudgetUnits(minMonthlyBudgetUnits int64) *CompaniesListCall {
  3994  	c.urlParams_.Set("minMonthlyBudget.units", fmt.Sprint(minMonthlyBudgetUnits))
  3995  	return c
  3996  }
  3997  
  3998  // OrderBy sets the optional parameter "orderBy": How to order addresses
  3999  // within the returned companies. Currently, only
  4000  // `address` and `address desc` is supported which will sorted by
  4001  // closest to
  4002  // farthest in distance from given address and farthest to closest
  4003  // distance
  4004  // from given address respectively.
  4005  func (c *CompaniesListCall) OrderBy(orderBy string) *CompaniesListCall {
  4006  	c.urlParams_.Set("orderBy", orderBy)
  4007  	return c
  4008  }
  4009  
  4010  // PageSize sets the optional parameter "pageSize": Requested page size.
  4011  // Server may return fewer companies than requested.
  4012  // If unspecified, server picks an appropriate default.
  4013  func (c *CompaniesListCall) PageSize(pageSize int64) *CompaniesListCall {
  4014  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4015  	return c
  4016  }
  4017  
  4018  // PageToken sets the optional parameter "pageToken": A token
  4019  // identifying a page of results that the server returns.
  4020  // Typically, this is the value of
  4021  // `ListCompaniesResponse.next_page_token`
  4022  // returned from the previous call to
  4023  // ListCompanies.
  4024  func (c *CompaniesListCall) PageToken(pageToken string) *CompaniesListCall {
  4025  	c.urlParams_.Set("pageToken", pageToken)
  4026  	return c
  4027  }
  4028  
  4029  // RequestMetadataExperimentIds sets the optional parameter
  4030  // "requestMetadata.experimentIds": Experiment IDs the current request
  4031  // belongs to.
  4032  func (c *CompaniesListCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *CompaniesListCall {
  4033  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  4034  	return c
  4035  }
  4036  
  4037  // RequestMetadataLocale sets the optional parameter
  4038  // "requestMetadata.locale": Locale to use for the current request.
  4039  func (c *CompaniesListCall) RequestMetadataLocale(requestMetadataLocale string) *CompaniesListCall {
  4040  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  4041  	return c
  4042  }
  4043  
  4044  // RequestMetadataPartnersSessionId sets the optional parameter
  4045  // "requestMetadata.partnersSessionId": Google Partners session ID.
  4046  func (c *CompaniesListCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *CompaniesListCall {
  4047  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  4048  	return c
  4049  }
  4050  
  4051  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  4052  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  4053  // to indicate where the traffic comes from.
  4054  // An identifier has multiple letters created by a team which redirected
  4055  // the
  4056  // traffic to us.
  4057  func (c *CompaniesListCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *CompaniesListCall {
  4058  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  4059  	return c
  4060  }
  4061  
  4062  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  4063  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  4064  // to indicate where the traffic comes from.
  4065  // An identifier has multiple letters created by a team which redirected
  4066  // the
  4067  // traffic to us.
  4068  func (c *CompaniesListCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *CompaniesListCall {
  4069  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  4070  	return c
  4071  }
  4072  
  4073  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  4074  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  4075  // of the user's geo-located IP address.
  4076  func (c *CompaniesListCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *CompaniesListCall {
  4077  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  4078  	return c
  4079  }
  4080  
  4081  // RequestMetadataUserOverridesUserId sets the optional parameter
  4082  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  4083  // impersonate instead of the user's ID.
  4084  func (c *CompaniesListCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *CompaniesListCall {
  4085  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  4086  	return c
  4087  }
  4088  
  4089  // Services sets the optional parameter "services": List of services
  4090  // that the returned agencies should provide. If this is
  4091  // not empty, any returned agency must have at least one of these
  4092  // services,
  4093  // or one of the specializations in the "specializations" field.
  4094  //
  4095  // Possible values:
  4096  //
  4097  //	"SERVICE_UNSPECIFIED"
  4098  //	"S_ADVANCED_ADWORDS_SUPPORT"
  4099  //	"S_ADVERTISING_ON_GOOGLE"
  4100  //	"S_AN_ENHANCED_WEBSITE"
  4101  //	"S_AN_ONLINE_MARKETING_PLAN"
  4102  //	"S_MOBILE_AND_VIDEO_ADS"
  4103  //	"S_MOBILE_WEBSITE_SERVICES"
  4104  func (c *CompaniesListCall) Services(services ...string) *CompaniesListCall {
  4105  	c.urlParams_.SetMulti("services", append([]string{}, services...))
  4106  	return c
  4107  }
  4108  
  4109  // Specializations sets the optional parameter "specializations": List
  4110  // of specializations that the returned agencies should provide. If
  4111  // this
  4112  // is not empty, any returned agency must have at least one of
  4113  // these
  4114  // specializations, or one of the services in the "services" field.
  4115  //
  4116  // Possible values:
  4117  //
  4118  //	"BADGE_SPECIALIZATION_UNKNOWN"
  4119  //	"BADGE_SPECIALIZATION_ADWORDS_SEARCH"
  4120  //	"BADGE_SPECIALIZATION_ADWORDS_DISPLAY"
  4121  //	"BADGE_SPECIALIZATION_ADWORDS_MOBILE"
  4122  //	"BADGE_SPECIALIZATION_ADWORDS_VIDEO"
  4123  //	"BADGE_SPECIALIZATION_ADWORDS_SHOPPING"
  4124  func (c *CompaniesListCall) Specializations(specializations ...string) *CompaniesListCall {
  4125  	c.urlParams_.SetMulti("specializations", append([]string{}, specializations...))
  4126  	return c
  4127  }
  4128  
  4129  // View sets the optional parameter "view": The view of the `Company`
  4130  // resource to be returned. This must not be
  4131  // `COMPANY_VIEW_UNSPECIFIED`.
  4132  //
  4133  // Possible values:
  4134  //
  4135  //	"COMPANY_VIEW_UNSPECIFIED"
  4136  //	"CV_GOOGLE_PARTNER_SEARCH"
  4137  func (c *CompaniesListCall) View(view string) *CompaniesListCall {
  4138  	c.urlParams_.Set("view", view)
  4139  	return c
  4140  }
  4141  
  4142  // WebsiteUrl sets the optional parameter "websiteUrl": Website URL that
  4143  // will help to find a better matched company.
  4144  // .
  4145  func (c *CompaniesListCall) WebsiteUrl(websiteUrl string) *CompaniesListCall {
  4146  	c.urlParams_.Set("websiteUrl", websiteUrl)
  4147  	return c
  4148  }
  4149  
  4150  // Fields allows partial responses to be retrieved. See
  4151  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4152  // for more information.
  4153  func (c *CompaniesListCall) Fields(s ...googleapi.Field) *CompaniesListCall {
  4154  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4155  	return c
  4156  }
  4157  
  4158  // IfNoneMatch sets the optional parameter which makes the operation
  4159  // fail if the object's ETag matches the given value. This is useful for
  4160  // getting updates only after the object has changed since the last
  4161  // request. Use googleapi.IsNotModified to check whether the response
  4162  // error from Do is the result of In-None-Match.
  4163  func (c *CompaniesListCall) IfNoneMatch(entityTag string) *CompaniesListCall {
  4164  	c.ifNoneMatch_ = entityTag
  4165  	return c
  4166  }
  4167  
  4168  // Context sets the context to be used in this call's Do method. Any
  4169  // pending HTTP request will be aborted if the provided context is
  4170  // canceled.
  4171  func (c *CompaniesListCall) Context(ctx context.Context) *CompaniesListCall {
  4172  	c.ctx_ = ctx
  4173  	return c
  4174  }
  4175  
  4176  // Header returns an http.Header that can be modified by the caller to
  4177  // add HTTP headers to the request.
  4178  func (c *CompaniesListCall) Header() http.Header {
  4179  	if c.header_ == nil {
  4180  		c.header_ = make(http.Header)
  4181  	}
  4182  	return c.header_
  4183  }
  4184  
  4185  func (c *CompaniesListCall) doRequest(alt string) (*http.Response, error) {
  4186  	reqHeaders := make(http.Header)
  4187  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4188  	for k, v := range c.header_ {
  4189  		reqHeaders[k] = v
  4190  	}
  4191  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4192  	if c.ifNoneMatch_ != "" {
  4193  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4194  	}
  4195  	var body io.Reader = nil
  4196  	c.urlParams_.Set("alt", alt)
  4197  	c.urlParams_.Set("prettyPrint", "false")
  4198  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/companies")
  4199  	urls += "?" + c.urlParams_.Encode()
  4200  	req, err := http.NewRequest("GET", urls, body)
  4201  	if err != nil {
  4202  		return nil, err
  4203  	}
  4204  	req.Header = reqHeaders
  4205  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4206  }
  4207  
  4208  // Do executes the "partners.companies.list" call.
  4209  // Exactly one of *ListCompaniesResponse or error will be non-nil. Any
  4210  // non-2xx status code is an error. Response headers are in either
  4211  // *ListCompaniesResponse.ServerResponse.Header or (if a response was
  4212  // returned at all) in error.(*googleapi.Error).Header. Use
  4213  // googleapi.IsNotModified to check whether the returned error was
  4214  // because http.StatusNotModified was returned.
  4215  func (c *CompaniesListCall) Do(opts ...googleapi.CallOption) (*ListCompaniesResponse, error) {
  4216  	gensupport.SetOptions(c.urlParams_, opts...)
  4217  	res, err := c.doRequest("json")
  4218  	if res != nil && res.StatusCode == http.StatusNotModified {
  4219  		if res.Body != nil {
  4220  			res.Body.Close()
  4221  		}
  4222  		return nil, &googleapi.Error{
  4223  			Code:   res.StatusCode,
  4224  			Header: res.Header,
  4225  		}
  4226  	}
  4227  	if err != nil {
  4228  		return nil, err
  4229  	}
  4230  	defer googleapi.CloseBody(res)
  4231  	if err := googleapi.CheckResponse(res); err != nil {
  4232  		return nil, err
  4233  	}
  4234  	ret := &ListCompaniesResponse{
  4235  		ServerResponse: googleapi.ServerResponse{
  4236  			Header:         res.Header,
  4237  			HTTPStatusCode: res.StatusCode,
  4238  		},
  4239  	}
  4240  	target := &ret
  4241  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4242  		return nil, err
  4243  	}
  4244  	return ret, nil
  4245  	// {
  4246  	//   "description": "Lists companies.",
  4247  	//   "flatPath": "v2/companies",
  4248  	//   "httpMethod": "GET",
  4249  	//   "id": "partners.companies.list",
  4250  	//   "parameterOrder": [],
  4251  	//   "parameters": {
  4252  	//     "address": {
  4253  	//       "description": "The address to use when searching for companies.\nIf not given, the geo-located address of the request is used.",
  4254  	//       "location": "query",
  4255  	//       "type": "string"
  4256  	//     },
  4257  	//     "companyName": {
  4258  	//       "description": "Company name to search for.",
  4259  	//       "location": "query",
  4260  	//       "type": "string"
  4261  	//     },
  4262  	//     "gpsMotivations": {
  4263  	//       "description": "List of reasons for using Google Partner Search to get companies.",
  4264  	//       "enum": [
  4265  	//         "GPS_MOTIVATION_UNSPECIFIED",
  4266  	//         "GPSM_HELP_WITH_ADVERTISING",
  4267  	//         "GPSM_HELP_WITH_WEBSITE",
  4268  	//         "GPSM_NO_WEBSITE"
  4269  	//       ],
  4270  	//       "location": "query",
  4271  	//       "repeated": true,
  4272  	//       "type": "string"
  4273  	//     },
  4274  	//     "industries": {
  4275  	//       "description": "List of industries the company can help with.",
  4276  	//       "enum": [
  4277  	//         "INDUSTRY_UNSPECIFIED",
  4278  	//         "I_AUTOMOTIVE",
  4279  	//         "I_BUSINESS_TO_BUSINESS",
  4280  	//         "I_CONSUMER_PACKAGED_GOODS",
  4281  	//         "I_EDUCATION",
  4282  	//         "I_FINANCE",
  4283  	//         "I_HEALTHCARE",
  4284  	//         "I_MEDIA_AND_ENTERTAINMENT",
  4285  	//         "I_RETAIL",
  4286  	//         "I_TECHNOLOGY",
  4287  	//         "I_TRAVEL"
  4288  	//       ],
  4289  	//       "location": "query",
  4290  	//       "repeated": true,
  4291  	//       "type": "string"
  4292  	//     },
  4293  	//     "languageCodes": {
  4294  	//       "description": "List of language codes that company can support. Only primary language\nsubtags are accepted as defined by\n\u003ca href=\"https://tools.ietf.org/html/bcp47\"\u003eBCP 47\u003c/a\u003e\n(IETF BCP 47, \"Tags for Identifying Languages\").",
  4295  	//       "location": "query",
  4296  	//       "repeated": true,
  4297  	//       "type": "string"
  4298  	//     },
  4299  	//     "maxMonthlyBudget.currencyCode": {
  4300  	//       "description": "The 3-letter currency code defined in ISO 4217.",
  4301  	//       "location": "query",
  4302  	//       "type": "string"
  4303  	//     },
  4304  	//     "maxMonthlyBudget.nanos": {
  4305  	//       "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.",
  4306  	//       "format": "int32",
  4307  	//       "location": "query",
  4308  	//       "type": "integer"
  4309  	//     },
  4310  	//     "maxMonthlyBudget.units": {
  4311  	//       "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.",
  4312  	//       "format": "int64",
  4313  	//       "location": "query",
  4314  	//       "type": "string"
  4315  	//     },
  4316  	//     "minMonthlyBudget.currencyCode": {
  4317  	//       "description": "The 3-letter currency code defined in ISO 4217.",
  4318  	//       "location": "query",
  4319  	//       "type": "string"
  4320  	//     },
  4321  	//     "minMonthlyBudget.nanos": {
  4322  	//       "description": "Number of nano (10^-9) units of the amount.\nThe value must be between -999,999,999 and +999,999,999 inclusive.\nIf `units` is positive, `nanos` must be positive or zero.\nIf `units` is zero, `nanos` can be positive, zero, or negative.\nIf `units` is negative, `nanos` must be negative or zero.\nFor example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.",
  4323  	//       "format": "int32",
  4324  	//       "location": "query",
  4325  	//       "type": "integer"
  4326  	//     },
  4327  	//     "minMonthlyBudget.units": {
  4328  	//       "description": "The whole units of the amount.\nFor example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.",
  4329  	//       "format": "int64",
  4330  	//       "location": "query",
  4331  	//       "type": "string"
  4332  	//     },
  4333  	//     "orderBy": {
  4334  	//       "description": "How to order addresses within the returned companies. Currently, only\n`address` and `address desc` is supported which will sorted by closest to\nfarthest in distance from given address and farthest to closest distance\nfrom given address respectively.",
  4335  	//       "location": "query",
  4336  	//       "type": "string"
  4337  	//     },
  4338  	//     "pageSize": {
  4339  	//       "description": "Requested page size. Server may return fewer companies than requested.\nIf unspecified, server picks an appropriate default.",
  4340  	//       "format": "int32",
  4341  	//       "location": "query",
  4342  	//       "type": "integer"
  4343  	//     },
  4344  	//     "pageToken": {
  4345  	//       "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListCompaniesResponse.next_page_token`\nreturned from the previous call to\nListCompanies.",
  4346  	//       "location": "query",
  4347  	//       "type": "string"
  4348  	//     },
  4349  	//     "requestMetadata.experimentIds": {
  4350  	//       "description": "Experiment IDs the current request belongs to.",
  4351  	//       "location": "query",
  4352  	//       "repeated": true,
  4353  	//       "type": "string"
  4354  	//     },
  4355  	//     "requestMetadata.locale": {
  4356  	//       "description": "Locale to use for the current request.",
  4357  	//       "location": "query",
  4358  	//       "type": "string"
  4359  	//     },
  4360  	//     "requestMetadata.partnersSessionId": {
  4361  	//       "description": "Google Partners session ID.",
  4362  	//       "location": "query",
  4363  	//       "type": "string"
  4364  	//     },
  4365  	//     "requestMetadata.trafficSource.trafficSourceId": {
  4366  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  4367  	//       "location": "query",
  4368  	//       "type": "string"
  4369  	//     },
  4370  	//     "requestMetadata.trafficSource.trafficSubId": {
  4371  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  4372  	//       "location": "query",
  4373  	//       "type": "string"
  4374  	//     },
  4375  	//     "requestMetadata.userOverrides.ipAddress": {
  4376  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  4377  	//       "location": "query",
  4378  	//       "type": "string"
  4379  	//     },
  4380  	//     "requestMetadata.userOverrides.userId": {
  4381  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  4382  	//       "location": "query",
  4383  	//       "type": "string"
  4384  	//     },
  4385  	//     "services": {
  4386  	//       "description": "List of services that the returned agencies should provide. If this is\nnot empty, any returned agency must have at least one of these services,\nor one of the specializations in the \"specializations\" field.",
  4387  	//       "enum": [
  4388  	//         "SERVICE_UNSPECIFIED",
  4389  	//         "S_ADVANCED_ADWORDS_SUPPORT",
  4390  	//         "S_ADVERTISING_ON_GOOGLE",
  4391  	//         "S_AN_ENHANCED_WEBSITE",
  4392  	//         "S_AN_ONLINE_MARKETING_PLAN",
  4393  	//         "S_MOBILE_AND_VIDEO_ADS",
  4394  	//         "S_MOBILE_WEBSITE_SERVICES"
  4395  	//       ],
  4396  	//       "location": "query",
  4397  	//       "repeated": true,
  4398  	//       "type": "string"
  4399  	//     },
  4400  	//     "specializations": {
  4401  	//       "description": "List of specializations that the returned agencies should provide. If this\nis not empty, any returned agency must have at least one of these\nspecializations, or one of the services in the \"services\" field.",
  4402  	//       "enum": [
  4403  	//         "BADGE_SPECIALIZATION_UNKNOWN",
  4404  	//         "BADGE_SPECIALIZATION_ADWORDS_SEARCH",
  4405  	//         "BADGE_SPECIALIZATION_ADWORDS_DISPLAY",
  4406  	//         "BADGE_SPECIALIZATION_ADWORDS_MOBILE",
  4407  	//         "BADGE_SPECIALIZATION_ADWORDS_VIDEO",
  4408  	//         "BADGE_SPECIALIZATION_ADWORDS_SHOPPING"
  4409  	//       ],
  4410  	//       "location": "query",
  4411  	//       "repeated": true,
  4412  	//       "type": "string"
  4413  	//     },
  4414  	//     "view": {
  4415  	//       "description": "The view of the `Company` resource to be returned. This must not be\n`COMPANY_VIEW_UNSPECIFIED`.",
  4416  	//       "enum": [
  4417  	//         "COMPANY_VIEW_UNSPECIFIED",
  4418  	//         "CV_GOOGLE_PARTNER_SEARCH"
  4419  	//       ],
  4420  	//       "location": "query",
  4421  	//       "type": "string"
  4422  	//     },
  4423  	//     "websiteUrl": {
  4424  	//       "description": "Website URL that will help to find a better matched company.\n.",
  4425  	//       "location": "query",
  4426  	//       "type": "string"
  4427  	//     }
  4428  	//   },
  4429  	//   "path": "v2/companies",
  4430  	//   "response": {
  4431  	//     "$ref": "ListCompaniesResponse"
  4432  	//   }
  4433  	// }
  4434  
  4435  }
  4436  
  4437  // Pages invokes f for each page of results.
  4438  // A non-nil error returned from f will halt the iteration.
  4439  // The provided context supersedes any context provided to the Context method.
  4440  func (c *CompaniesListCall) Pages(ctx context.Context, f func(*ListCompaniesResponse) error) error {
  4441  	c.ctx_ = ctx
  4442  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4443  	for {
  4444  		x, err := c.Do()
  4445  		if err != nil {
  4446  			return err
  4447  		}
  4448  		if err := f(x); err != nil {
  4449  			return err
  4450  		}
  4451  		if x.NextPageToken == "" {
  4452  			return nil
  4453  		}
  4454  		c.PageToken(x.NextPageToken)
  4455  	}
  4456  }
  4457  
  4458  // method id "partners.companies.leads.create":
  4459  
  4460  type CompaniesLeadsCreateCall struct {
  4461  	s                 *Service
  4462  	companyId         string
  4463  	createleadrequest *CreateLeadRequest
  4464  	urlParams_        gensupport.URLParams
  4465  	ctx_              context.Context
  4466  	header_           http.Header
  4467  }
  4468  
  4469  // Create: Creates an advertiser lead for the given company ID.
  4470  func (r *CompaniesLeadsService) Create(companyId string, createleadrequest *CreateLeadRequest) *CompaniesLeadsCreateCall {
  4471  	c := &CompaniesLeadsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4472  	c.companyId = companyId
  4473  	c.createleadrequest = createleadrequest
  4474  	return c
  4475  }
  4476  
  4477  // Fields allows partial responses to be retrieved. See
  4478  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4479  // for more information.
  4480  func (c *CompaniesLeadsCreateCall) Fields(s ...googleapi.Field) *CompaniesLeadsCreateCall {
  4481  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4482  	return c
  4483  }
  4484  
  4485  // Context sets the context to be used in this call's Do method. Any
  4486  // pending HTTP request will be aborted if the provided context is
  4487  // canceled.
  4488  func (c *CompaniesLeadsCreateCall) Context(ctx context.Context) *CompaniesLeadsCreateCall {
  4489  	c.ctx_ = ctx
  4490  	return c
  4491  }
  4492  
  4493  // Header returns an http.Header that can be modified by the caller to
  4494  // add HTTP headers to the request.
  4495  func (c *CompaniesLeadsCreateCall) Header() http.Header {
  4496  	if c.header_ == nil {
  4497  		c.header_ = make(http.Header)
  4498  	}
  4499  	return c.header_
  4500  }
  4501  
  4502  func (c *CompaniesLeadsCreateCall) doRequest(alt string) (*http.Response, error) {
  4503  	reqHeaders := make(http.Header)
  4504  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4505  	for k, v := range c.header_ {
  4506  		reqHeaders[k] = v
  4507  	}
  4508  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4509  	var body io.Reader = nil
  4510  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createleadrequest)
  4511  	if err != nil {
  4512  		return nil, err
  4513  	}
  4514  	reqHeaders.Set("Content-Type", "application/json")
  4515  	c.urlParams_.Set("alt", alt)
  4516  	c.urlParams_.Set("prettyPrint", "false")
  4517  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/companies/{companyId}/leads")
  4518  	urls += "?" + c.urlParams_.Encode()
  4519  	req, err := http.NewRequest("POST", urls, body)
  4520  	if err != nil {
  4521  		return nil, err
  4522  	}
  4523  	req.Header = reqHeaders
  4524  	googleapi.Expand(req.URL, map[string]string{
  4525  		"companyId": c.companyId,
  4526  	})
  4527  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4528  }
  4529  
  4530  // Do executes the "partners.companies.leads.create" call.
  4531  // Exactly one of *CreateLeadResponse or error will be non-nil. Any
  4532  // non-2xx status code is an error. Response headers are in either
  4533  // *CreateLeadResponse.ServerResponse.Header or (if a response was
  4534  // returned at all) in error.(*googleapi.Error).Header. Use
  4535  // googleapi.IsNotModified to check whether the returned error was
  4536  // because http.StatusNotModified was returned.
  4537  func (c *CompaniesLeadsCreateCall) Do(opts ...googleapi.CallOption) (*CreateLeadResponse, error) {
  4538  	gensupport.SetOptions(c.urlParams_, opts...)
  4539  	res, err := c.doRequest("json")
  4540  	if res != nil && res.StatusCode == http.StatusNotModified {
  4541  		if res.Body != nil {
  4542  			res.Body.Close()
  4543  		}
  4544  		return nil, &googleapi.Error{
  4545  			Code:   res.StatusCode,
  4546  			Header: res.Header,
  4547  		}
  4548  	}
  4549  	if err != nil {
  4550  		return nil, err
  4551  	}
  4552  	defer googleapi.CloseBody(res)
  4553  	if err := googleapi.CheckResponse(res); err != nil {
  4554  		return nil, err
  4555  	}
  4556  	ret := &CreateLeadResponse{
  4557  		ServerResponse: googleapi.ServerResponse{
  4558  			Header:         res.Header,
  4559  			HTTPStatusCode: res.StatusCode,
  4560  		},
  4561  	}
  4562  	target := &ret
  4563  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4564  		return nil, err
  4565  	}
  4566  	return ret, nil
  4567  	// {
  4568  	//   "description": "Creates an advertiser lead for the given company ID.",
  4569  	//   "flatPath": "v2/companies/{companyId}/leads",
  4570  	//   "httpMethod": "POST",
  4571  	//   "id": "partners.companies.leads.create",
  4572  	//   "parameterOrder": [
  4573  	//     "companyId"
  4574  	//   ],
  4575  	//   "parameters": {
  4576  	//     "companyId": {
  4577  	//       "description": "The ID of the company to contact.",
  4578  	//       "location": "path",
  4579  	//       "required": true,
  4580  	//       "type": "string"
  4581  	//     }
  4582  	//   },
  4583  	//   "path": "v2/companies/{companyId}/leads",
  4584  	//   "request": {
  4585  	//     "$ref": "CreateLeadRequest"
  4586  	//   },
  4587  	//   "response": {
  4588  	//     "$ref": "CreateLeadResponse"
  4589  	//   }
  4590  	// }
  4591  
  4592  }
  4593  
  4594  // method id "partners.leads.list":
  4595  
  4596  type LeadsListCall struct {
  4597  	s            *Service
  4598  	urlParams_   gensupport.URLParams
  4599  	ifNoneMatch_ string
  4600  	ctx_         context.Context
  4601  	header_      http.Header
  4602  }
  4603  
  4604  // List: Lists advertiser leads for a user's associated company.
  4605  // Should only be called within the context of an authorized logged in
  4606  // user.
  4607  func (r *LeadsService) List() *LeadsListCall {
  4608  	c := &LeadsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4609  	return c
  4610  }
  4611  
  4612  // OrderBy sets the optional parameter "orderBy": How to order Leads.
  4613  // Currently, only `create_time`
  4614  // and `create_time desc` are supported
  4615  func (c *LeadsListCall) OrderBy(orderBy string) *LeadsListCall {
  4616  	c.urlParams_.Set("orderBy", orderBy)
  4617  	return c
  4618  }
  4619  
  4620  // PageSize sets the optional parameter "pageSize": Requested page size.
  4621  // Server may return fewer leads than requested.
  4622  // If unspecified, server picks an appropriate default.
  4623  func (c *LeadsListCall) PageSize(pageSize int64) *LeadsListCall {
  4624  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4625  	return c
  4626  }
  4627  
  4628  // PageToken sets the optional parameter "pageToken": A token
  4629  // identifying a page of results that the server returns.
  4630  // Typically, this is the value of
  4631  // `ListLeadsResponse.next_page_token`
  4632  // returned from the previous call to
  4633  // ListLeads.
  4634  func (c *LeadsListCall) PageToken(pageToken string) *LeadsListCall {
  4635  	c.urlParams_.Set("pageToken", pageToken)
  4636  	return c
  4637  }
  4638  
  4639  // RequestMetadataExperimentIds sets the optional parameter
  4640  // "requestMetadata.experimentIds": Experiment IDs the current request
  4641  // belongs to.
  4642  func (c *LeadsListCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *LeadsListCall {
  4643  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  4644  	return c
  4645  }
  4646  
  4647  // RequestMetadataLocale sets the optional parameter
  4648  // "requestMetadata.locale": Locale to use for the current request.
  4649  func (c *LeadsListCall) RequestMetadataLocale(requestMetadataLocale string) *LeadsListCall {
  4650  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  4651  	return c
  4652  }
  4653  
  4654  // RequestMetadataPartnersSessionId sets the optional parameter
  4655  // "requestMetadata.partnersSessionId": Google Partners session ID.
  4656  func (c *LeadsListCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *LeadsListCall {
  4657  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  4658  	return c
  4659  }
  4660  
  4661  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  4662  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  4663  // to indicate where the traffic comes from.
  4664  // An identifier has multiple letters created by a team which redirected
  4665  // the
  4666  // traffic to us.
  4667  func (c *LeadsListCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *LeadsListCall {
  4668  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  4669  	return c
  4670  }
  4671  
  4672  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  4673  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  4674  // to indicate where the traffic comes from.
  4675  // An identifier has multiple letters created by a team which redirected
  4676  // the
  4677  // traffic to us.
  4678  func (c *LeadsListCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *LeadsListCall {
  4679  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  4680  	return c
  4681  }
  4682  
  4683  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  4684  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  4685  // of the user's geo-located IP address.
  4686  func (c *LeadsListCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *LeadsListCall {
  4687  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  4688  	return c
  4689  }
  4690  
  4691  // RequestMetadataUserOverridesUserId sets the optional parameter
  4692  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  4693  // impersonate instead of the user's ID.
  4694  func (c *LeadsListCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *LeadsListCall {
  4695  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  4696  	return c
  4697  }
  4698  
  4699  // Fields allows partial responses to be retrieved. See
  4700  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4701  // for more information.
  4702  func (c *LeadsListCall) Fields(s ...googleapi.Field) *LeadsListCall {
  4703  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4704  	return c
  4705  }
  4706  
  4707  // IfNoneMatch sets the optional parameter which makes the operation
  4708  // fail if the object's ETag matches the given value. This is useful for
  4709  // getting updates only after the object has changed since the last
  4710  // request. Use googleapi.IsNotModified to check whether the response
  4711  // error from Do is the result of In-None-Match.
  4712  func (c *LeadsListCall) IfNoneMatch(entityTag string) *LeadsListCall {
  4713  	c.ifNoneMatch_ = entityTag
  4714  	return c
  4715  }
  4716  
  4717  // Context sets the context to be used in this call's Do method. Any
  4718  // pending HTTP request will be aborted if the provided context is
  4719  // canceled.
  4720  func (c *LeadsListCall) Context(ctx context.Context) *LeadsListCall {
  4721  	c.ctx_ = ctx
  4722  	return c
  4723  }
  4724  
  4725  // Header returns an http.Header that can be modified by the caller to
  4726  // add HTTP headers to the request.
  4727  func (c *LeadsListCall) Header() http.Header {
  4728  	if c.header_ == nil {
  4729  		c.header_ = make(http.Header)
  4730  	}
  4731  	return c.header_
  4732  }
  4733  
  4734  func (c *LeadsListCall) doRequest(alt string) (*http.Response, error) {
  4735  	reqHeaders := make(http.Header)
  4736  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4737  	for k, v := range c.header_ {
  4738  		reqHeaders[k] = v
  4739  	}
  4740  	reqHeaders.Set("User-Agent", c.s.userAgent())
  4741  	if c.ifNoneMatch_ != "" {
  4742  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4743  	}
  4744  	var body io.Reader = nil
  4745  	c.urlParams_.Set("alt", alt)
  4746  	c.urlParams_.Set("prettyPrint", "false")
  4747  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/leads")
  4748  	urls += "?" + c.urlParams_.Encode()
  4749  	req, err := http.NewRequest("GET", urls, body)
  4750  	if err != nil {
  4751  		return nil, err
  4752  	}
  4753  	req.Header = reqHeaders
  4754  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4755  }
  4756  
  4757  // Do executes the "partners.leads.list" call.
  4758  // Exactly one of *ListLeadsResponse or error will be non-nil. Any
  4759  // non-2xx status code is an error. Response headers are in either
  4760  // *ListLeadsResponse.ServerResponse.Header or (if a response was
  4761  // returned at all) in error.(*googleapi.Error).Header. Use
  4762  // googleapi.IsNotModified to check whether the returned error was
  4763  // because http.StatusNotModified was returned.
  4764  func (c *LeadsListCall) Do(opts ...googleapi.CallOption) (*ListLeadsResponse, error) {
  4765  	gensupport.SetOptions(c.urlParams_, opts...)
  4766  	res, err := c.doRequest("json")
  4767  	if res != nil && res.StatusCode == http.StatusNotModified {
  4768  		if res.Body != nil {
  4769  			res.Body.Close()
  4770  		}
  4771  		return nil, &googleapi.Error{
  4772  			Code:   res.StatusCode,
  4773  			Header: res.Header,
  4774  		}
  4775  	}
  4776  	if err != nil {
  4777  		return nil, err
  4778  	}
  4779  	defer googleapi.CloseBody(res)
  4780  	if err := googleapi.CheckResponse(res); err != nil {
  4781  		return nil, err
  4782  	}
  4783  	ret := &ListLeadsResponse{
  4784  		ServerResponse: googleapi.ServerResponse{
  4785  			Header:         res.Header,
  4786  			HTTPStatusCode: res.StatusCode,
  4787  		},
  4788  	}
  4789  	target := &ret
  4790  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4791  		return nil, err
  4792  	}
  4793  	return ret, nil
  4794  	// {
  4795  	//   "description": "Lists advertiser leads for a user's associated company.\nShould only be called within the context of an authorized logged in user.",
  4796  	//   "flatPath": "v2/leads",
  4797  	//   "httpMethod": "GET",
  4798  	//   "id": "partners.leads.list",
  4799  	//   "parameterOrder": [],
  4800  	//   "parameters": {
  4801  	//     "orderBy": {
  4802  	//       "description": "How to order Leads. Currently, only `create_time`\nand `create_time desc` are supported",
  4803  	//       "location": "query",
  4804  	//       "type": "string"
  4805  	//     },
  4806  	//     "pageSize": {
  4807  	//       "description": "Requested page size. Server may return fewer leads than requested.\nIf unspecified, server picks an appropriate default.",
  4808  	//       "format": "int32",
  4809  	//       "location": "query",
  4810  	//       "type": "integer"
  4811  	//     },
  4812  	//     "pageToken": {
  4813  	//       "description": "A token identifying a page of results that the server returns.\nTypically, this is the value of `ListLeadsResponse.next_page_token`\nreturned from the previous call to\nListLeads.",
  4814  	//       "location": "query",
  4815  	//       "type": "string"
  4816  	//     },
  4817  	//     "requestMetadata.experimentIds": {
  4818  	//       "description": "Experiment IDs the current request belongs to.",
  4819  	//       "location": "query",
  4820  	//       "repeated": true,
  4821  	//       "type": "string"
  4822  	//     },
  4823  	//     "requestMetadata.locale": {
  4824  	//       "description": "Locale to use for the current request.",
  4825  	//       "location": "query",
  4826  	//       "type": "string"
  4827  	//     },
  4828  	//     "requestMetadata.partnersSessionId": {
  4829  	//       "description": "Google Partners session ID.",
  4830  	//       "location": "query",
  4831  	//       "type": "string"
  4832  	//     },
  4833  	//     "requestMetadata.trafficSource.trafficSourceId": {
  4834  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  4835  	//       "location": "query",
  4836  	//       "type": "string"
  4837  	//     },
  4838  	//     "requestMetadata.trafficSource.trafficSubId": {
  4839  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  4840  	//       "location": "query",
  4841  	//       "type": "string"
  4842  	//     },
  4843  	//     "requestMetadata.userOverrides.ipAddress": {
  4844  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  4845  	//       "location": "query",
  4846  	//       "type": "string"
  4847  	//     },
  4848  	//     "requestMetadata.userOverrides.userId": {
  4849  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  4850  	//       "location": "query",
  4851  	//       "type": "string"
  4852  	//     }
  4853  	//   },
  4854  	//   "path": "v2/leads",
  4855  	//   "response": {
  4856  	//     "$ref": "ListLeadsResponse"
  4857  	//   }
  4858  	// }
  4859  
  4860  }
  4861  
  4862  // Pages invokes f for each page of results.
  4863  // A non-nil error returned from f will halt the iteration.
  4864  // The provided context supersedes any context provided to the Context method.
  4865  func (c *LeadsListCall) Pages(ctx context.Context, f func(*ListLeadsResponse) error) error {
  4866  	c.ctx_ = ctx
  4867  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4868  	for {
  4869  		x, err := c.Do()
  4870  		if err != nil {
  4871  			return err
  4872  		}
  4873  		if err := f(x); err != nil {
  4874  			return err
  4875  		}
  4876  		if x.NextPageToken == "" {
  4877  			return nil
  4878  		}
  4879  		c.PageToken(x.NextPageToken)
  4880  	}
  4881  }
  4882  
  4883  // method id "partners.offers.list":
  4884  
  4885  type OffersListCall struct {
  4886  	s            *Service
  4887  	urlParams_   gensupport.URLParams
  4888  	ifNoneMatch_ string
  4889  	ctx_         context.Context
  4890  	header_      http.Header
  4891  }
  4892  
  4893  // List: Lists the Offers available for the current user
  4894  func (r *OffersService) List() *OffersListCall {
  4895  	c := &OffersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4896  	return c
  4897  }
  4898  
  4899  // RequestMetadataExperimentIds sets the optional parameter
  4900  // "requestMetadata.experimentIds": Experiment IDs the current request
  4901  // belongs to.
  4902  func (c *OffersListCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *OffersListCall {
  4903  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  4904  	return c
  4905  }
  4906  
  4907  // RequestMetadataLocale sets the optional parameter
  4908  // "requestMetadata.locale": Locale to use for the current request.
  4909  func (c *OffersListCall) RequestMetadataLocale(requestMetadataLocale string) *OffersListCall {
  4910  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  4911  	return c
  4912  }
  4913  
  4914  // RequestMetadataPartnersSessionId sets the optional parameter
  4915  // "requestMetadata.partnersSessionId": Google Partners session ID.
  4916  func (c *OffersListCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *OffersListCall {
  4917  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  4918  	return c
  4919  }
  4920  
  4921  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  4922  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  4923  // to indicate where the traffic comes from.
  4924  // An identifier has multiple letters created by a team which redirected
  4925  // the
  4926  // traffic to us.
  4927  func (c *OffersListCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *OffersListCall {
  4928  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  4929  	return c
  4930  }
  4931  
  4932  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  4933  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  4934  // to indicate where the traffic comes from.
  4935  // An identifier has multiple letters created by a team which redirected
  4936  // the
  4937  // traffic to us.
  4938  func (c *OffersListCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *OffersListCall {
  4939  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  4940  	return c
  4941  }
  4942  
  4943  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  4944  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  4945  // of the user's geo-located IP address.
  4946  func (c *OffersListCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *OffersListCall {
  4947  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  4948  	return c
  4949  }
  4950  
  4951  // RequestMetadataUserOverridesUserId sets the optional parameter
  4952  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  4953  // impersonate instead of the user's ID.
  4954  func (c *OffersListCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *OffersListCall {
  4955  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  4956  	return c
  4957  }
  4958  
  4959  // Fields allows partial responses to be retrieved. See
  4960  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4961  // for more information.
  4962  func (c *OffersListCall) Fields(s ...googleapi.Field) *OffersListCall {
  4963  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4964  	return c
  4965  }
  4966  
  4967  // IfNoneMatch sets the optional parameter which makes the operation
  4968  // fail if the object's ETag matches the given value. This is useful for
  4969  // getting updates only after the object has changed since the last
  4970  // request. Use googleapi.IsNotModified to check whether the response
  4971  // error from Do is the result of In-None-Match.
  4972  func (c *OffersListCall) IfNoneMatch(entityTag string) *OffersListCall {
  4973  	c.ifNoneMatch_ = entityTag
  4974  	return c
  4975  }
  4976  
  4977  // Context sets the context to be used in this call's Do method. Any
  4978  // pending HTTP request will be aborted if the provided context is
  4979  // canceled.
  4980  func (c *OffersListCall) Context(ctx context.Context) *OffersListCall {
  4981  	c.ctx_ = ctx
  4982  	return c
  4983  }
  4984  
  4985  // Header returns an http.Header that can be modified by the caller to
  4986  // add HTTP headers to the request.
  4987  func (c *OffersListCall) Header() http.Header {
  4988  	if c.header_ == nil {
  4989  		c.header_ = make(http.Header)
  4990  	}
  4991  	return c.header_
  4992  }
  4993  
  4994  func (c *OffersListCall) doRequest(alt string) (*http.Response, error) {
  4995  	reqHeaders := make(http.Header)
  4996  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  4997  	for k, v := range c.header_ {
  4998  		reqHeaders[k] = v
  4999  	}
  5000  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5001  	if c.ifNoneMatch_ != "" {
  5002  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5003  	}
  5004  	var body io.Reader = nil
  5005  	c.urlParams_.Set("alt", alt)
  5006  	c.urlParams_.Set("prettyPrint", "false")
  5007  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/offers")
  5008  	urls += "?" + c.urlParams_.Encode()
  5009  	req, err := http.NewRequest("GET", urls, body)
  5010  	if err != nil {
  5011  		return nil, err
  5012  	}
  5013  	req.Header = reqHeaders
  5014  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5015  }
  5016  
  5017  // Do executes the "partners.offers.list" call.
  5018  // Exactly one of *ListOffersResponse or error will be non-nil. Any
  5019  // non-2xx status code is an error. Response headers are in either
  5020  // *ListOffersResponse.ServerResponse.Header or (if a response was
  5021  // returned at all) in error.(*googleapi.Error).Header. Use
  5022  // googleapi.IsNotModified to check whether the returned error was
  5023  // because http.StatusNotModified was returned.
  5024  func (c *OffersListCall) Do(opts ...googleapi.CallOption) (*ListOffersResponse, error) {
  5025  	gensupport.SetOptions(c.urlParams_, opts...)
  5026  	res, err := c.doRequest("json")
  5027  	if res != nil && res.StatusCode == http.StatusNotModified {
  5028  		if res.Body != nil {
  5029  			res.Body.Close()
  5030  		}
  5031  		return nil, &googleapi.Error{
  5032  			Code:   res.StatusCode,
  5033  			Header: res.Header,
  5034  		}
  5035  	}
  5036  	if err != nil {
  5037  		return nil, err
  5038  	}
  5039  	defer googleapi.CloseBody(res)
  5040  	if err := googleapi.CheckResponse(res); err != nil {
  5041  		return nil, err
  5042  	}
  5043  	ret := &ListOffersResponse{
  5044  		ServerResponse: googleapi.ServerResponse{
  5045  			Header:         res.Header,
  5046  			HTTPStatusCode: res.StatusCode,
  5047  		},
  5048  	}
  5049  	target := &ret
  5050  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5051  		return nil, err
  5052  	}
  5053  	return ret, nil
  5054  	// {
  5055  	//   "description": "Lists the Offers available for the current user",
  5056  	//   "flatPath": "v2/offers",
  5057  	//   "httpMethod": "GET",
  5058  	//   "id": "partners.offers.list",
  5059  	//   "parameterOrder": [],
  5060  	//   "parameters": {
  5061  	//     "requestMetadata.experimentIds": {
  5062  	//       "description": "Experiment IDs the current request belongs to.",
  5063  	//       "location": "query",
  5064  	//       "repeated": true,
  5065  	//       "type": "string"
  5066  	//     },
  5067  	//     "requestMetadata.locale": {
  5068  	//       "description": "Locale to use for the current request.",
  5069  	//       "location": "query",
  5070  	//       "type": "string"
  5071  	//     },
  5072  	//     "requestMetadata.partnersSessionId": {
  5073  	//       "description": "Google Partners session ID.",
  5074  	//       "location": "query",
  5075  	//       "type": "string"
  5076  	//     },
  5077  	//     "requestMetadata.trafficSource.trafficSourceId": {
  5078  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5079  	//       "location": "query",
  5080  	//       "type": "string"
  5081  	//     },
  5082  	//     "requestMetadata.trafficSource.trafficSubId": {
  5083  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5084  	//       "location": "query",
  5085  	//       "type": "string"
  5086  	//     },
  5087  	//     "requestMetadata.userOverrides.ipAddress": {
  5088  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  5089  	//       "location": "query",
  5090  	//       "type": "string"
  5091  	//     },
  5092  	//     "requestMetadata.userOverrides.userId": {
  5093  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  5094  	//       "location": "query",
  5095  	//       "type": "string"
  5096  	//     }
  5097  	//   },
  5098  	//   "path": "v2/offers",
  5099  	//   "response": {
  5100  	//     "$ref": "ListOffersResponse"
  5101  	//   }
  5102  	// }
  5103  
  5104  }
  5105  
  5106  // method id "partners.offers.history.list":
  5107  
  5108  type OffersHistoryListCall struct {
  5109  	s            *Service
  5110  	urlParams_   gensupport.URLParams
  5111  	ifNoneMatch_ string
  5112  	ctx_         context.Context
  5113  	header_      http.Header
  5114  }
  5115  
  5116  // List: Lists the Historical Offers for the current user (or user's
  5117  // entire company)
  5118  func (r *OffersHistoryService) List() *OffersHistoryListCall {
  5119  	c := &OffersHistoryListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5120  	return c
  5121  }
  5122  
  5123  // EntireCompany sets the optional parameter "entireCompany": if true,
  5124  // show history for the entire company.  Requires user to be admin.
  5125  func (c *OffersHistoryListCall) EntireCompany(entireCompany bool) *OffersHistoryListCall {
  5126  	c.urlParams_.Set("entireCompany", fmt.Sprint(entireCompany))
  5127  	return c
  5128  }
  5129  
  5130  // OrderBy sets the optional parameter "orderBy": Comma-separated list
  5131  // of fields to order by, e.g.: "foo,bar,baz".
  5132  // Use "foo desc" to sort descending.
  5133  // List of valid field names is: name, offer_code, expiration_time,
  5134  // status,
  5135  //
  5136  //	last_modified_time, sender_name, creation_time, country_code,
  5137  //	offer_type.
  5138  func (c *OffersHistoryListCall) OrderBy(orderBy string) *OffersHistoryListCall {
  5139  	c.urlParams_.Set("orderBy", orderBy)
  5140  	return c
  5141  }
  5142  
  5143  // PageSize sets the optional parameter "pageSize": Maximum number of
  5144  // rows to return per page.
  5145  func (c *OffersHistoryListCall) PageSize(pageSize int64) *OffersHistoryListCall {
  5146  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5147  	return c
  5148  }
  5149  
  5150  // PageToken sets the optional parameter "pageToken": Token to retrieve
  5151  // a specific page.
  5152  func (c *OffersHistoryListCall) PageToken(pageToken string) *OffersHistoryListCall {
  5153  	c.urlParams_.Set("pageToken", pageToken)
  5154  	return c
  5155  }
  5156  
  5157  // RequestMetadataExperimentIds sets the optional parameter
  5158  // "requestMetadata.experimentIds": Experiment IDs the current request
  5159  // belongs to.
  5160  func (c *OffersHistoryListCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *OffersHistoryListCall {
  5161  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  5162  	return c
  5163  }
  5164  
  5165  // RequestMetadataLocale sets the optional parameter
  5166  // "requestMetadata.locale": Locale to use for the current request.
  5167  func (c *OffersHistoryListCall) RequestMetadataLocale(requestMetadataLocale string) *OffersHistoryListCall {
  5168  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  5169  	return c
  5170  }
  5171  
  5172  // RequestMetadataPartnersSessionId sets the optional parameter
  5173  // "requestMetadata.partnersSessionId": Google Partners session ID.
  5174  func (c *OffersHistoryListCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *OffersHistoryListCall {
  5175  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  5176  	return c
  5177  }
  5178  
  5179  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  5180  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  5181  // to indicate where the traffic comes from.
  5182  // An identifier has multiple letters created by a team which redirected
  5183  // the
  5184  // traffic to us.
  5185  func (c *OffersHistoryListCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *OffersHistoryListCall {
  5186  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  5187  	return c
  5188  }
  5189  
  5190  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  5191  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  5192  // to indicate where the traffic comes from.
  5193  // An identifier has multiple letters created by a team which redirected
  5194  // the
  5195  // traffic to us.
  5196  func (c *OffersHistoryListCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *OffersHistoryListCall {
  5197  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  5198  	return c
  5199  }
  5200  
  5201  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  5202  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  5203  // of the user's geo-located IP address.
  5204  func (c *OffersHistoryListCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *OffersHistoryListCall {
  5205  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  5206  	return c
  5207  }
  5208  
  5209  // RequestMetadataUserOverridesUserId sets the optional parameter
  5210  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  5211  // impersonate instead of the user's ID.
  5212  func (c *OffersHistoryListCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *OffersHistoryListCall {
  5213  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  5214  	return c
  5215  }
  5216  
  5217  // Fields allows partial responses to be retrieved. See
  5218  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5219  // for more information.
  5220  func (c *OffersHistoryListCall) Fields(s ...googleapi.Field) *OffersHistoryListCall {
  5221  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5222  	return c
  5223  }
  5224  
  5225  // IfNoneMatch sets the optional parameter which makes the operation
  5226  // fail if the object's ETag matches the given value. This is useful for
  5227  // getting updates only after the object has changed since the last
  5228  // request. Use googleapi.IsNotModified to check whether the response
  5229  // error from Do is the result of In-None-Match.
  5230  func (c *OffersHistoryListCall) IfNoneMatch(entityTag string) *OffersHistoryListCall {
  5231  	c.ifNoneMatch_ = entityTag
  5232  	return c
  5233  }
  5234  
  5235  // Context sets the context to be used in this call's Do method. Any
  5236  // pending HTTP request will be aborted if the provided context is
  5237  // canceled.
  5238  func (c *OffersHistoryListCall) Context(ctx context.Context) *OffersHistoryListCall {
  5239  	c.ctx_ = ctx
  5240  	return c
  5241  }
  5242  
  5243  // Header returns an http.Header that can be modified by the caller to
  5244  // add HTTP headers to the request.
  5245  func (c *OffersHistoryListCall) Header() http.Header {
  5246  	if c.header_ == nil {
  5247  		c.header_ = make(http.Header)
  5248  	}
  5249  	return c.header_
  5250  }
  5251  
  5252  func (c *OffersHistoryListCall) doRequest(alt string) (*http.Response, error) {
  5253  	reqHeaders := make(http.Header)
  5254  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5255  	for k, v := range c.header_ {
  5256  		reqHeaders[k] = v
  5257  	}
  5258  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5259  	if c.ifNoneMatch_ != "" {
  5260  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5261  	}
  5262  	var body io.Reader = nil
  5263  	c.urlParams_.Set("alt", alt)
  5264  	c.urlParams_.Set("prettyPrint", "false")
  5265  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/offers/history")
  5266  	urls += "?" + c.urlParams_.Encode()
  5267  	req, err := http.NewRequest("GET", urls, body)
  5268  	if err != nil {
  5269  		return nil, err
  5270  	}
  5271  	req.Header = reqHeaders
  5272  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5273  }
  5274  
  5275  // Do executes the "partners.offers.history.list" call.
  5276  // Exactly one of *ListOffersHistoryResponse or error will be non-nil.
  5277  // Any non-2xx status code is an error. Response headers are in either
  5278  // *ListOffersHistoryResponse.ServerResponse.Header or (if a response
  5279  // was returned at all) in error.(*googleapi.Error).Header. Use
  5280  // googleapi.IsNotModified to check whether the returned error was
  5281  // because http.StatusNotModified was returned.
  5282  func (c *OffersHistoryListCall) Do(opts ...googleapi.CallOption) (*ListOffersHistoryResponse, error) {
  5283  	gensupport.SetOptions(c.urlParams_, opts...)
  5284  	res, err := c.doRequest("json")
  5285  	if res != nil && res.StatusCode == http.StatusNotModified {
  5286  		if res.Body != nil {
  5287  			res.Body.Close()
  5288  		}
  5289  		return nil, &googleapi.Error{
  5290  			Code:   res.StatusCode,
  5291  			Header: res.Header,
  5292  		}
  5293  	}
  5294  	if err != nil {
  5295  		return nil, err
  5296  	}
  5297  	defer googleapi.CloseBody(res)
  5298  	if err := googleapi.CheckResponse(res); err != nil {
  5299  		return nil, err
  5300  	}
  5301  	ret := &ListOffersHistoryResponse{
  5302  		ServerResponse: googleapi.ServerResponse{
  5303  			Header:         res.Header,
  5304  			HTTPStatusCode: res.StatusCode,
  5305  		},
  5306  	}
  5307  	target := &ret
  5308  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5309  		return nil, err
  5310  	}
  5311  	return ret, nil
  5312  	// {
  5313  	//   "description": "Lists the Historical Offers for the current user (or user's entire company)",
  5314  	//   "flatPath": "v2/offers/history",
  5315  	//   "httpMethod": "GET",
  5316  	//   "id": "partners.offers.history.list",
  5317  	//   "parameterOrder": [],
  5318  	//   "parameters": {
  5319  	//     "entireCompany": {
  5320  	//       "description": "if true, show history for the entire company.  Requires user to be admin.",
  5321  	//       "location": "query",
  5322  	//       "type": "boolean"
  5323  	//     },
  5324  	//     "orderBy": {
  5325  	//       "description": "Comma-separated list of fields to order by, e.g.: \"foo,bar,baz\".\nUse \"foo desc\" to sort descending.\nList of valid field names is: name, offer_code, expiration_time, status,\n    last_modified_time, sender_name, creation_time, country_code,\n    offer_type.",
  5326  	//       "location": "query",
  5327  	//       "type": "string"
  5328  	//     },
  5329  	//     "pageSize": {
  5330  	//       "description": "Maximum number of rows to return per page.",
  5331  	//       "format": "int32",
  5332  	//       "location": "query",
  5333  	//       "type": "integer"
  5334  	//     },
  5335  	//     "pageToken": {
  5336  	//       "description": "Token to retrieve a specific page.",
  5337  	//       "location": "query",
  5338  	//       "type": "string"
  5339  	//     },
  5340  	//     "requestMetadata.experimentIds": {
  5341  	//       "description": "Experiment IDs the current request belongs to.",
  5342  	//       "location": "query",
  5343  	//       "repeated": true,
  5344  	//       "type": "string"
  5345  	//     },
  5346  	//     "requestMetadata.locale": {
  5347  	//       "description": "Locale to use for the current request.",
  5348  	//       "location": "query",
  5349  	//       "type": "string"
  5350  	//     },
  5351  	//     "requestMetadata.partnersSessionId": {
  5352  	//       "description": "Google Partners session ID.",
  5353  	//       "location": "query",
  5354  	//       "type": "string"
  5355  	//     },
  5356  	//     "requestMetadata.trafficSource.trafficSourceId": {
  5357  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5358  	//       "location": "query",
  5359  	//       "type": "string"
  5360  	//     },
  5361  	//     "requestMetadata.trafficSource.trafficSubId": {
  5362  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5363  	//       "location": "query",
  5364  	//       "type": "string"
  5365  	//     },
  5366  	//     "requestMetadata.userOverrides.ipAddress": {
  5367  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  5368  	//       "location": "query",
  5369  	//       "type": "string"
  5370  	//     },
  5371  	//     "requestMetadata.userOverrides.userId": {
  5372  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  5373  	//       "location": "query",
  5374  	//       "type": "string"
  5375  	//     }
  5376  	//   },
  5377  	//   "path": "v2/offers/history",
  5378  	//   "response": {
  5379  	//     "$ref": "ListOffersHistoryResponse"
  5380  	//   }
  5381  	// }
  5382  
  5383  }
  5384  
  5385  // Pages invokes f for each page of results.
  5386  // A non-nil error returned from f will halt the iteration.
  5387  // The provided context supersedes any context provided to the Context method.
  5388  func (c *OffersHistoryListCall) Pages(ctx context.Context, f func(*ListOffersHistoryResponse) error) error {
  5389  	c.ctx_ = ctx
  5390  	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5391  	for {
  5392  		x, err := c.Do()
  5393  		if err != nil {
  5394  			return err
  5395  		}
  5396  		if err := f(x); err != nil {
  5397  			return err
  5398  		}
  5399  		if x.NextPageToken == "" {
  5400  			return nil
  5401  		}
  5402  		c.PageToken(x.NextPageToken)
  5403  	}
  5404  }
  5405  
  5406  // method id "partners.userEvents.log":
  5407  
  5408  type UserEventsLogCall struct {
  5409  	s                   *Service
  5410  	logusereventrequest *LogUserEventRequest
  5411  	urlParams_          gensupport.URLParams
  5412  	ctx_                context.Context
  5413  	header_             http.Header
  5414  }
  5415  
  5416  // Log: Logs a user event.
  5417  func (r *UserEventsService) Log(logusereventrequest *LogUserEventRequest) *UserEventsLogCall {
  5418  	c := &UserEventsLogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5419  	c.logusereventrequest = logusereventrequest
  5420  	return c
  5421  }
  5422  
  5423  // Fields allows partial responses to be retrieved. See
  5424  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5425  // for more information.
  5426  func (c *UserEventsLogCall) Fields(s ...googleapi.Field) *UserEventsLogCall {
  5427  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5428  	return c
  5429  }
  5430  
  5431  // Context sets the context to be used in this call's Do method. Any
  5432  // pending HTTP request will be aborted if the provided context is
  5433  // canceled.
  5434  func (c *UserEventsLogCall) Context(ctx context.Context) *UserEventsLogCall {
  5435  	c.ctx_ = ctx
  5436  	return c
  5437  }
  5438  
  5439  // Header returns an http.Header that can be modified by the caller to
  5440  // add HTTP headers to the request.
  5441  func (c *UserEventsLogCall) Header() http.Header {
  5442  	if c.header_ == nil {
  5443  		c.header_ = make(http.Header)
  5444  	}
  5445  	return c.header_
  5446  }
  5447  
  5448  func (c *UserEventsLogCall) doRequest(alt string) (*http.Response, error) {
  5449  	reqHeaders := make(http.Header)
  5450  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5451  	for k, v := range c.header_ {
  5452  		reqHeaders[k] = v
  5453  	}
  5454  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5455  	var body io.Reader = nil
  5456  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.logusereventrequest)
  5457  	if err != nil {
  5458  		return nil, err
  5459  	}
  5460  	reqHeaders.Set("Content-Type", "application/json")
  5461  	c.urlParams_.Set("alt", alt)
  5462  	c.urlParams_.Set("prettyPrint", "false")
  5463  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/userEvents:log")
  5464  	urls += "?" + c.urlParams_.Encode()
  5465  	req, err := http.NewRequest("POST", urls, body)
  5466  	if err != nil {
  5467  		return nil, err
  5468  	}
  5469  	req.Header = reqHeaders
  5470  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5471  }
  5472  
  5473  // Do executes the "partners.userEvents.log" call.
  5474  // Exactly one of *LogUserEventResponse or error will be non-nil. Any
  5475  // non-2xx status code is an error. Response headers are in either
  5476  // *LogUserEventResponse.ServerResponse.Header or (if a response was
  5477  // returned at all) in error.(*googleapi.Error).Header. Use
  5478  // googleapi.IsNotModified to check whether the returned error was
  5479  // because http.StatusNotModified was returned.
  5480  func (c *UserEventsLogCall) Do(opts ...googleapi.CallOption) (*LogUserEventResponse, error) {
  5481  	gensupport.SetOptions(c.urlParams_, opts...)
  5482  	res, err := c.doRequest("json")
  5483  	if res != nil && res.StatusCode == http.StatusNotModified {
  5484  		if res.Body != nil {
  5485  			res.Body.Close()
  5486  		}
  5487  		return nil, &googleapi.Error{
  5488  			Code:   res.StatusCode,
  5489  			Header: res.Header,
  5490  		}
  5491  	}
  5492  	if err != nil {
  5493  		return nil, err
  5494  	}
  5495  	defer googleapi.CloseBody(res)
  5496  	if err := googleapi.CheckResponse(res); err != nil {
  5497  		return nil, err
  5498  	}
  5499  	ret := &LogUserEventResponse{
  5500  		ServerResponse: googleapi.ServerResponse{
  5501  			Header:         res.Header,
  5502  			HTTPStatusCode: res.StatusCode,
  5503  		},
  5504  	}
  5505  	target := &ret
  5506  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5507  		return nil, err
  5508  	}
  5509  	return ret, nil
  5510  	// {
  5511  	//   "description": "Logs a user event.",
  5512  	//   "flatPath": "v2/userEvents:log",
  5513  	//   "httpMethod": "POST",
  5514  	//   "id": "partners.userEvents.log",
  5515  	//   "parameterOrder": [],
  5516  	//   "parameters": {},
  5517  	//   "path": "v2/userEvents:log",
  5518  	//   "request": {
  5519  	//     "$ref": "LogUserEventRequest"
  5520  	//   },
  5521  	//   "response": {
  5522  	//     "$ref": "LogUserEventResponse"
  5523  	//   }
  5524  	// }
  5525  
  5526  }
  5527  
  5528  // method id "partners.userStates.list":
  5529  
  5530  type UserStatesListCall struct {
  5531  	s            *Service
  5532  	urlParams_   gensupport.URLParams
  5533  	ifNoneMatch_ string
  5534  	ctx_         context.Context
  5535  	header_      http.Header
  5536  }
  5537  
  5538  // List: Lists states for current user.
  5539  func (r *UserStatesService) List() *UserStatesListCall {
  5540  	c := &UserStatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5541  	return c
  5542  }
  5543  
  5544  // RequestMetadataExperimentIds sets the optional parameter
  5545  // "requestMetadata.experimentIds": Experiment IDs the current request
  5546  // belongs to.
  5547  func (c *UserStatesListCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *UserStatesListCall {
  5548  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  5549  	return c
  5550  }
  5551  
  5552  // RequestMetadataLocale sets the optional parameter
  5553  // "requestMetadata.locale": Locale to use for the current request.
  5554  func (c *UserStatesListCall) RequestMetadataLocale(requestMetadataLocale string) *UserStatesListCall {
  5555  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  5556  	return c
  5557  }
  5558  
  5559  // RequestMetadataPartnersSessionId sets the optional parameter
  5560  // "requestMetadata.partnersSessionId": Google Partners session ID.
  5561  func (c *UserStatesListCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *UserStatesListCall {
  5562  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  5563  	return c
  5564  }
  5565  
  5566  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  5567  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  5568  // to indicate where the traffic comes from.
  5569  // An identifier has multiple letters created by a team which redirected
  5570  // the
  5571  // traffic to us.
  5572  func (c *UserStatesListCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *UserStatesListCall {
  5573  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  5574  	return c
  5575  }
  5576  
  5577  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  5578  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  5579  // to indicate where the traffic comes from.
  5580  // An identifier has multiple letters created by a team which redirected
  5581  // the
  5582  // traffic to us.
  5583  func (c *UserStatesListCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *UserStatesListCall {
  5584  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  5585  	return c
  5586  }
  5587  
  5588  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  5589  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  5590  // of the user's geo-located IP address.
  5591  func (c *UserStatesListCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *UserStatesListCall {
  5592  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  5593  	return c
  5594  }
  5595  
  5596  // RequestMetadataUserOverridesUserId sets the optional parameter
  5597  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  5598  // impersonate instead of the user's ID.
  5599  func (c *UserStatesListCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *UserStatesListCall {
  5600  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  5601  	return c
  5602  }
  5603  
  5604  // Fields allows partial responses to be retrieved. See
  5605  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5606  // for more information.
  5607  func (c *UserStatesListCall) Fields(s ...googleapi.Field) *UserStatesListCall {
  5608  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5609  	return c
  5610  }
  5611  
  5612  // IfNoneMatch sets the optional parameter which makes the operation
  5613  // fail if the object's ETag matches the given value. This is useful for
  5614  // getting updates only after the object has changed since the last
  5615  // request. Use googleapi.IsNotModified to check whether the response
  5616  // error from Do is the result of In-None-Match.
  5617  func (c *UserStatesListCall) IfNoneMatch(entityTag string) *UserStatesListCall {
  5618  	c.ifNoneMatch_ = entityTag
  5619  	return c
  5620  }
  5621  
  5622  // Context sets the context to be used in this call's Do method. Any
  5623  // pending HTTP request will be aborted if the provided context is
  5624  // canceled.
  5625  func (c *UserStatesListCall) Context(ctx context.Context) *UserStatesListCall {
  5626  	c.ctx_ = ctx
  5627  	return c
  5628  }
  5629  
  5630  // Header returns an http.Header that can be modified by the caller to
  5631  // add HTTP headers to the request.
  5632  func (c *UserStatesListCall) Header() http.Header {
  5633  	if c.header_ == nil {
  5634  		c.header_ = make(http.Header)
  5635  	}
  5636  	return c.header_
  5637  }
  5638  
  5639  func (c *UserStatesListCall) doRequest(alt string) (*http.Response, error) {
  5640  	reqHeaders := make(http.Header)
  5641  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5642  	for k, v := range c.header_ {
  5643  		reqHeaders[k] = v
  5644  	}
  5645  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5646  	if c.ifNoneMatch_ != "" {
  5647  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5648  	}
  5649  	var body io.Reader = nil
  5650  	c.urlParams_.Set("alt", alt)
  5651  	c.urlParams_.Set("prettyPrint", "false")
  5652  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/userStates")
  5653  	urls += "?" + c.urlParams_.Encode()
  5654  	req, err := http.NewRequest("GET", urls, body)
  5655  	if err != nil {
  5656  		return nil, err
  5657  	}
  5658  	req.Header = reqHeaders
  5659  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5660  }
  5661  
  5662  // Do executes the "partners.userStates.list" call.
  5663  // Exactly one of *ListUserStatesResponse or error will be non-nil. Any
  5664  // non-2xx status code is an error. Response headers are in either
  5665  // *ListUserStatesResponse.ServerResponse.Header or (if a response was
  5666  // returned at all) in error.(*googleapi.Error).Header. Use
  5667  // googleapi.IsNotModified to check whether the returned error was
  5668  // because http.StatusNotModified was returned.
  5669  func (c *UserStatesListCall) Do(opts ...googleapi.CallOption) (*ListUserStatesResponse, error) {
  5670  	gensupport.SetOptions(c.urlParams_, opts...)
  5671  	res, err := c.doRequest("json")
  5672  	if res != nil && res.StatusCode == http.StatusNotModified {
  5673  		if res.Body != nil {
  5674  			res.Body.Close()
  5675  		}
  5676  		return nil, &googleapi.Error{
  5677  			Code:   res.StatusCode,
  5678  			Header: res.Header,
  5679  		}
  5680  	}
  5681  	if err != nil {
  5682  		return nil, err
  5683  	}
  5684  	defer googleapi.CloseBody(res)
  5685  	if err := googleapi.CheckResponse(res); err != nil {
  5686  		return nil, err
  5687  	}
  5688  	ret := &ListUserStatesResponse{
  5689  		ServerResponse: googleapi.ServerResponse{
  5690  			Header:         res.Header,
  5691  			HTTPStatusCode: res.StatusCode,
  5692  		},
  5693  	}
  5694  	target := &ret
  5695  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5696  		return nil, err
  5697  	}
  5698  	return ret, nil
  5699  	// {
  5700  	//   "description": "Lists states for current user.",
  5701  	//   "flatPath": "v2/userStates",
  5702  	//   "httpMethod": "GET",
  5703  	//   "id": "partners.userStates.list",
  5704  	//   "parameterOrder": [],
  5705  	//   "parameters": {
  5706  	//     "requestMetadata.experimentIds": {
  5707  	//       "description": "Experiment IDs the current request belongs to.",
  5708  	//       "location": "query",
  5709  	//       "repeated": true,
  5710  	//       "type": "string"
  5711  	//     },
  5712  	//     "requestMetadata.locale": {
  5713  	//       "description": "Locale to use for the current request.",
  5714  	//       "location": "query",
  5715  	//       "type": "string"
  5716  	//     },
  5717  	//     "requestMetadata.partnersSessionId": {
  5718  	//       "description": "Google Partners session ID.",
  5719  	//       "location": "query",
  5720  	//       "type": "string"
  5721  	//     },
  5722  	//     "requestMetadata.trafficSource.trafficSourceId": {
  5723  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5724  	//       "location": "query",
  5725  	//       "type": "string"
  5726  	//     },
  5727  	//     "requestMetadata.trafficSource.trafficSubId": {
  5728  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5729  	//       "location": "query",
  5730  	//       "type": "string"
  5731  	//     },
  5732  	//     "requestMetadata.userOverrides.ipAddress": {
  5733  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  5734  	//       "location": "query",
  5735  	//       "type": "string"
  5736  	//     },
  5737  	//     "requestMetadata.userOverrides.userId": {
  5738  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  5739  	//       "location": "query",
  5740  	//       "type": "string"
  5741  	//     }
  5742  	//   },
  5743  	//   "path": "v2/userStates",
  5744  	//   "response": {
  5745  	//     "$ref": "ListUserStatesResponse"
  5746  	//   }
  5747  	// }
  5748  
  5749  }
  5750  
  5751  // method id "partners.users.createCompanyRelation":
  5752  
  5753  type UsersCreateCompanyRelationCall struct {
  5754  	s               *Service
  5755  	userId          string
  5756  	companyrelation *CompanyRelation
  5757  	urlParams_      gensupport.URLParams
  5758  	ctx_            context.Context
  5759  	header_         http.Header
  5760  }
  5761  
  5762  // CreateCompanyRelation: Creates a user's company relation. Affiliates
  5763  // the user to a company.
  5764  func (r *UsersService) CreateCompanyRelation(userId string, companyrelation *CompanyRelation) *UsersCreateCompanyRelationCall {
  5765  	c := &UsersCreateCompanyRelationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5766  	c.userId = userId
  5767  	c.companyrelation = companyrelation
  5768  	return c
  5769  }
  5770  
  5771  // RequestMetadataExperimentIds sets the optional parameter
  5772  // "requestMetadata.experimentIds": Experiment IDs the current request
  5773  // belongs to.
  5774  func (c *UsersCreateCompanyRelationCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *UsersCreateCompanyRelationCall {
  5775  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  5776  	return c
  5777  }
  5778  
  5779  // RequestMetadataLocale sets the optional parameter
  5780  // "requestMetadata.locale": Locale to use for the current request.
  5781  func (c *UsersCreateCompanyRelationCall) RequestMetadataLocale(requestMetadataLocale string) *UsersCreateCompanyRelationCall {
  5782  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  5783  	return c
  5784  }
  5785  
  5786  // RequestMetadataPartnersSessionId sets the optional parameter
  5787  // "requestMetadata.partnersSessionId": Google Partners session ID.
  5788  func (c *UsersCreateCompanyRelationCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *UsersCreateCompanyRelationCall {
  5789  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  5790  	return c
  5791  }
  5792  
  5793  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  5794  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  5795  // to indicate where the traffic comes from.
  5796  // An identifier has multiple letters created by a team which redirected
  5797  // the
  5798  // traffic to us.
  5799  func (c *UsersCreateCompanyRelationCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *UsersCreateCompanyRelationCall {
  5800  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  5801  	return c
  5802  }
  5803  
  5804  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  5805  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  5806  // to indicate where the traffic comes from.
  5807  // An identifier has multiple letters created by a team which redirected
  5808  // the
  5809  // traffic to us.
  5810  func (c *UsersCreateCompanyRelationCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *UsersCreateCompanyRelationCall {
  5811  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  5812  	return c
  5813  }
  5814  
  5815  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  5816  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  5817  // of the user's geo-located IP address.
  5818  func (c *UsersCreateCompanyRelationCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *UsersCreateCompanyRelationCall {
  5819  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  5820  	return c
  5821  }
  5822  
  5823  // RequestMetadataUserOverridesUserId sets the optional parameter
  5824  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  5825  // impersonate instead of the user's ID.
  5826  func (c *UsersCreateCompanyRelationCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *UsersCreateCompanyRelationCall {
  5827  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  5828  	return c
  5829  }
  5830  
  5831  // Fields allows partial responses to be retrieved. See
  5832  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5833  // for more information.
  5834  func (c *UsersCreateCompanyRelationCall) Fields(s ...googleapi.Field) *UsersCreateCompanyRelationCall {
  5835  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5836  	return c
  5837  }
  5838  
  5839  // Context sets the context to be used in this call's Do method. Any
  5840  // pending HTTP request will be aborted if the provided context is
  5841  // canceled.
  5842  func (c *UsersCreateCompanyRelationCall) Context(ctx context.Context) *UsersCreateCompanyRelationCall {
  5843  	c.ctx_ = ctx
  5844  	return c
  5845  }
  5846  
  5847  // Header returns an http.Header that can be modified by the caller to
  5848  // add HTTP headers to the request.
  5849  func (c *UsersCreateCompanyRelationCall) Header() http.Header {
  5850  	if c.header_ == nil {
  5851  		c.header_ = make(http.Header)
  5852  	}
  5853  	return c.header_
  5854  }
  5855  
  5856  func (c *UsersCreateCompanyRelationCall) doRequest(alt string) (*http.Response, error) {
  5857  	reqHeaders := make(http.Header)
  5858  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  5859  	for k, v := range c.header_ {
  5860  		reqHeaders[k] = v
  5861  	}
  5862  	reqHeaders.Set("User-Agent", c.s.userAgent())
  5863  	var body io.Reader = nil
  5864  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.companyrelation)
  5865  	if err != nil {
  5866  		return nil, err
  5867  	}
  5868  	reqHeaders.Set("Content-Type", "application/json")
  5869  	c.urlParams_.Set("alt", alt)
  5870  	c.urlParams_.Set("prettyPrint", "false")
  5871  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}/companyRelation")
  5872  	urls += "?" + c.urlParams_.Encode()
  5873  	req, err := http.NewRequest("PUT", urls, body)
  5874  	if err != nil {
  5875  		return nil, err
  5876  	}
  5877  	req.Header = reqHeaders
  5878  	googleapi.Expand(req.URL, map[string]string{
  5879  		"userId": c.userId,
  5880  	})
  5881  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5882  }
  5883  
  5884  // Do executes the "partners.users.createCompanyRelation" call.
  5885  // Exactly one of *CompanyRelation or error will be non-nil. Any non-2xx
  5886  // status code is an error. Response headers are in either
  5887  // *CompanyRelation.ServerResponse.Header or (if a response was returned
  5888  // at all) in error.(*googleapi.Error).Header. Use
  5889  // googleapi.IsNotModified to check whether the returned error was
  5890  // because http.StatusNotModified was returned.
  5891  func (c *UsersCreateCompanyRelationCall) Do(opts ...googleapi.CallOption) (*CompanyRelation, error) {
  5892  	gensupport.SetOptions(c.urlParams_, opts...)
  5893  	res, err := c.doRequest("json")
  5894  	if res != nil && res.StatusCode == http.StatusNotModified {
  5895  		if res.Body != nil {
  5896  			res.Body.Close()
  5897  		}
  5898  		return nil, &googleapi.Error{
  5899  			Code:   res.StatusCode,
  5900  			Header: res.Header,
  5901  		}
  5902  	}
  5903  	if err != nil {
  5904  		return nil, err
  5905  	}
  5906  	defer googleapi.CloseBody(res)
  5907  	if err := googleapi.CheckResponse(res); err != nil {
  5908  		return nil, err
  5909  	}
  5910  	ret := &CompanyRelation{
  5911  		ServerResponse: googleapi.ServerResponse{
  5912  			Header:         res.Header,
  5913  			HTTPStatusCode: res.StatusCode,
  5914  		},
  5915  	}
  5916  	target := &ret
  5917  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5918  		return nil, err
  5919  	}
  5920  	return ret, nil
  5921  	// {
  5922  	//   "description": "Creates a user's company relation. Affiliates the user to a company.",
  5923  	//   "flatPath": "v2/users/{userId}/companyRelation",
  5924  	//   "httpMethod": "PUT",
  5925  	//   "id": "partners.users.createCompanyRelation",
  5926  	//   "parameterOrder": [
  5927  	//     "userId"
  5928  	//   ],
  5929  	//   "parameters": {
  5930  	//     "requestMetadata.experimentIds": {
  5931  	//       "description": "Experiment IDs the current request belongs to.",
  5932  	//       "location": "query",
  5933  	//       "repeated": true,
  5934  	//       "type": "string"
  5935  	//     },
  5936  	//     "requestMetadata.locale": {
  5937  	//       "description": "Locale to use for the current request.",
  5938  	//       "location": "query",
  5939  	//       "type": "string"
  5940  	//     },
  5941  	//     "requestMetadata.partnersSessionId": {
  5942  	//       "description": "Google Partners session ID.",
  5943  	//       "location": "query",
  5944  	//       "type": "string"
  5945  	//     },
  5946  	//     "requestMetadata.trafficSource.trafficSourceId": {
  5947  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5948  	//       "location": "query",
  5949  	//       "type": "string"
  5950  	//     },
  5951  	//     "requestMetadata.trafficSource.trafficSubId": {
  5952  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  5953  	//       "location": "query",
  5954  	//       "type": "string"
  5955  	//     },
  5956  	//     "requestMetadata.userOverrides.ipAddress": {
  5957  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  5958  	//       "location": "query",
  5959  	//       "type": "string"
  5960  	//     },
  5961  	//     "requestMetadata.userOverrides.userId": {
  5962  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  5963  	//       "location": "query",
  5964  	//       "type": "string"
  5965  	//     },
  5966  	//     "userId": {
  5967  	//       "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.",
  5968  	//       "location": "path",
  5969  	//       "required": true,
  5970  	//       "type": "string"
  5971  	//     }
  5972  	//   },
  5973  	//   "path": "v2/users/{userId}/companyRelation",
  5974  	//   "request": {
  5975  	//     "$ref": "CompanyRelation"
  5976  	//   },
  5977  	//   "response": {
  5978  	//     "$ref": "CompanyRelation"
  5979  	//   }
  5980  	// }
  5981  
  5982  }
  5983  
  5984  // method id "partners.users.deleteCompanyRelation":
  5985  
  5986  type UsersDeleteCompanyRelationCall struct {
  5987  	s          *Service
  5988  	userId     string
  5989  	urlParams_ gensupport.URLParams
  5990  	ctx_       context.Context
  5991  	header_    http.Header
  5992  }
  5993  
  5994  // DeleteCompanyRelation: Deletes a user's company relation.
  5995  // Unaffiliaites the user from a company.
  5996  func (r *UsersService) DeleteCompanyRelation(userId string) *UsersDeleteCompanyRelationCall {
  5997  	c := &UsersDeleteCompanyRelationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5998  	c.userId = userId
  5999  	return c
  6000  }
  6001  
  6002  // RequestMetadataExperimentIds sets the optional parameter
  6003  // "requestMetadata.experimentIds": Experiment IDs the current request
  6004  // belongs to.
  6005  func (c *UsersDeleteCompanyRelationCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *UsersDeleteCompanyRelationCall {
  6006  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  6007  	return c
  6008  }
  6009  
  6010  // RequestMetadataLocale sets the optional parameter
  6011  // "requestMetadata.locale": Locale to use for the current request.
  6012  func (c *UsersDeleteCompanyRelationCall) RequestMetadataLocale(requestMetadataLocale string) *UsersDeleteCompanyRelationCall {
  6013  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  6014  	return c
  6015  }
  6016  
  6017  // RequestMetadataPartnersSessionId sets the optional parameter
  6018  // "requestMetadata.partnersSessionId": Google Partners session ID.
  6019  func (c *UsersDeleteCompanyRelationCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *UsersDeleteCompanyRelationCall {
  6020  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  6021  	return c
  6022  }
  6023  
  6024  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  6025  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  6026  // to indicate where the traffic comes from.
  6027  // An identifier has multiple letters created by a team which redirected
  6028  // the
  6029  // traffic to us.
  6030  func (c *UsersDeleteCompanyRelationCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *UsersDeleteCompanyRelationCall {
  6031  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  6032  	return c
  6033  }
  6034  
  6035  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  6036  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  6037  // to indicate where the traffic comes from.
  6038  // An identifier has multiple letters created by a team which redirected
  6039  // the
  6040  // traffic to us.
  6041  func (c *UsersDeleteCompanyRelationCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *UsersDeleteCompanyRelationCall {
  6042  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  6043  	return c
  6044  }
  6045  
  6046  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  6047  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  6048  // of the user's geo-located IP address.
  6049  func (c *UsersDeleteCompanyRelationCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *UsersDeleteCompanyRelationCall {
  6050  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  6051  	return c
  6052  }
  6053  
  6054  // RequestMetadataUserOverridesUserId sets the optional parameter
  6055  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  6056  // impersonate instead of the user's ID.
  6057  func (c *UsersDeleteCompanyRelationCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *UsersDeleteCompanyRelationCall {
  6058  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  6059  	return c
  6060  }
  6061  
  6062  // Fields allows partial responses to be retrieved. See
  6063  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6064  // for more information.
  6065  func (c *UsersDeleteCompanyRelationCall) Fields(s ...googleapi.Field) *UsersDeleteCompanyRelationCall {
  6066  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6067  	return c
  6068  }
  6069  
  6070  // Context sets the context to be used in this call's Do method. Any
  6071  // pending HTTP request will be aborted if the provided context is
  6072  // canceled.
  6073  func (c *UsersDeleteCompanyRelationCall) Context(ctx context.Context) *UsersDeleteCompanyRelationCall {
  6074  	c.ctx_ = ctx
  6075  	return c
  6076  }
  6077  
  6078  // Header returns an http.Header that can be modified by the caller to
  6079  // add HTTP headers to the request.
  6080  func (c *UsersDeleteCompanyRelationCall) Header() http.Header {
  6081  	if c.header_ == nil {
  6082  		c.header_ = make(http.Header)
  6083  	}
  6084  	return c.header_
  6085  }
  6086  
  6087  func (c *UsersDeleteCompanyRelationCall) doRequest(alt string) (*http.Response, error) {
  6088  	reqHeaders := make(http.Header)
  6089  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6090  	for k, v := range c.header_ {
  6091  		reqHeaders[k] = v
  6092  	}
  6093  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6094  	var body io.Reader = nil
  6095  	c.urlParams_.Set("alt", alt)
  6096  	c.urlParams_.Set("prettyPrint", "false")
  6097  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}/companyRelation")
  6098  	urls += "?" + c.urlParams_.Encode()
  6099  	req, err := http.NewRequest("DELETE", urls, body)
  6100  	if err != nil {
  6101  		return nil, err
  6102  	}
  6103  	req.Header = reqHeaders
  6104  	googleapi.Expand(req.URL, map[string]string{
  6105  		"userId": c.userId,
  6106  	})
  6107  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6108  }
  6109  
  6110  // Do executes the "partners.users.deleteCompanyRelation" call.
  6111  // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  6112  // code is an error. Response headers are in either
  6113  // *Empty.ServerResponse.Header or (if a response was returned at all)
  6114  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6115  // check whether the returned error was because http.StatusNotModified
  6116  // was returned.
  6117  func (c *UsersDeleteCompanyRelationCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6118  	gensupport.SetOptions(c.urlParams_, opts...)
  6119  	res, err := c.doRequest("json")
  6120  	if res != nil && res.StatusCode == http.StatusNotModified {
  6121  		if res.Body != nil {
  6122  			res.Body.Close()
  6123  		}
  6124  		return nil, &googleapi.Error{
  6125  			Code:   res.StatusCode,
  6126  			Header: res.Header,
  6127  		}
  6128  	}
  6129  	if err != nil {
  6130  		return nil, err
  6131  	}
  6132  	defer googleapi.CloseBody(res)
  6133  	if err := googleapi.CheckResponse(res); err != nil {
  6134  		return nil, err
  6135  	}
  6136  	ret := &Empty{
  6137  		ServerResponse: googleapi.ServerResponse{
  6138  			Header:         res.Header,
  6139  			HTTPStatusCode: res.StatusCode,
  6140  		},
  6141  	}
  6142  	target := &ret
  6143  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6144  		return nil, err
  6145  	}
  6146  	return ret, nil
  6147  	// {
  6148  	//   "description": "Deletes a user's company relation. Unaffiliaites the user from a company.",
  6149  	//   "flatPath": "v2/users/{userId}/companyRelation",
  6150  	//   "httpMethod": "DELETE",
  6151  	//   "id": "partners.users.deleteCompanyRelation",
  6152  	//   "parameterOrder": [
  6153  	//     "userId"
  6154  	//   ],
  6155  	//   "parameters": {
  6156  	//     "requestMetadata.experimentIds": {
  6157  	//       "description": "Experiment IDs the current request belongs to.",
  6158  	//       "location": "query",
  6159  	//       "repeated": true,
  6160  	//       "type": "string"
  6161  	//     },
  6162  	//     "requestMetadata.locale": {
  6163  	//       "description": "Locale to use for the current request.",
  6164  	//       "location": "query",
  6165  	//       "type": "string"
  6166  	//     },
  6167  	//     "requestMetadata.partnersSessionId": {
  6168  	//       "description": "Google Partners session ID.",
  6169  	//       "location": "query",
  6170  	//       "type": "string"
  6171  	//     },
  6172  	//     "requestMetadata.trafficSource.trafficSourceId": {
  6173  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6174  	//       "location": "query",
  6175  	//       "type": "string"
  6176  	//     },
  6177  	//     "requestMetadata.trafficSource.trafficSubId": {
  6178  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6179  	//       "location": "query",
  6180  	//       "type": "string"
  6181  	//     },
  6182  	//     "requestMetadata.userOverrides.ipAddress": {
  6183  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  6184  	//       "location": "query",
  6185  	//       "type": "string"
  6186  	//     },
  6187  	//     "requestMetadata.userOverrides.userId": {
  6188  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  6189  	//       "location": "query",
  6190  	//       "type": "string"
  6191  	//     },
  6192  	//     "userId": {
  6193  	//       "description": "The ID of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean\nthe currently authenticated user.",
  6194  	//       "location": "path",
  6195  	//       "required": true,
  6196  	//       "type": "string"
  6197  	//     }
  6198  	//   },
  6199  	//   "path": "v2/users/{userId}/companyRelation",
  6200  	//   "response": {
  6201  	//     "$ref": "Empty"
  6202  	//   }
  6203  	// }
  6204  
  6205  }
  6206  
  6207  // method id "partners.users.get":
  6208  
  6209  type UsersGetCall struct {
  6210  	s            *Service
  6211  	userId       string
  6212  	urlParams_   gensupport.URLParams
  6213  	ifNoneMatch_ string
  6214  	ctx_         context.Context
  6215  	header_      http.Header
  6216  }
  6217  
  6218  // Get: Gets a user.
  6219  func (r *UsersService) Get(userId string) *UsersGetCall {
  6220  	c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6221  	c.userId = userId
  6222  	return c
  6223  }
  6224  
  6225  // RequestMetadataExperimentIds sets the optional parameter
  6226  // "requestMetadata.experimentIds": Experiment IDs the current request
  6227  // belongs to.
  6228  func (c *UsersGetCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *UsersGetCall {
  6229  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  6230  	return c
  6231  }
  6232  
  6233  // RequestMetadataLocale sets the optional parameter
  6234  // "requestMetadata.locale": Locale to use for the current request.
  6235  func (c *UsersGetCall) RequestMetadataLocale(requestMetadataLocale string) *UsersGetCall {
  6236  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  6237  	return c
  6238  }
  6239  
  6240  // RequestMetadataPartnersSessionId sets the optional parameter
  6241  // "requestMetadata.partnersSessionId": Google Partners session ID.
  6242  func (c *UsersGetCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *UsersGetCall {
  6243  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  6244  	return c
  6245  }
  6246  
  6247  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  6248  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  6249  // to indicate where the traffic comes from.
  6250  // An identifier has multiple letters created by a team which redirected
  6251  // the
  6252  // traffic to us.
  6253  func (c *UsersGetCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *UsersGetCall {
  6254  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  6255  	return c
  6256  }
  6257  
  6258  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  6259  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  6260  // to indicate where the traffic comes from.
  6261  // An identifier has multiple letters created by a team which redirected
  6262  // the
  6263  // traffic to us.
  6264  func (c *UsersGetCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *UsersGetCall {
  6265  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  6266  	return c
  6267  }
  6268  
  6269  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  6270  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  6271  // of the user's geo-located IP address.
  6272  func (c *UsersGetCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *UsersGetCall {
  6273  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  6274  	return c
  6275  }
  6276  
  6277  // RequestMetadataUserOverridesUserId sets the optional parameter
  6278  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  6279  // impersonate instead of the user's ID.
  6280  func (c *UsersGetCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *UsersGetCall {
  6281  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  6282  	return c
  6283  }
  6284  
  6285  // UserView sets the optional parameter "userView": Specifies what parts
  6286  // of the user information to return.
  6287  //
  6288  // Possible values:
  6289  //
  6290  //	"BASIC"
  6291  //	"PROFILE"
  6292  //	"PUBLIC_PROFILE"
  6293  func (c *UsersGetCall) UserView(userView string) *UsersGetCall {
  6294  	c.urlParams_.Set("userView", userView)
  6295  	return c
  6296  }
  6297  
  6298  // Fields allows partial responses to be retrieved. See
  6299  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6300  // for more information.
  6301  func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
  6302  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6303  	return c
  6304  }
  6305  
  6306  // IfNoneMatch sets the optional parameter which makes the operation
  6307  // fail if the object's ETag matches the given value. This is useful for
  6308  // getting updates only after the object has changed since the last
  6309  // request. Use googleapi.IsNotModified to check whether the response
  6310  // error from Do is the result of In-None-Match.
  6311  func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
  6312  	c.ifNoneMatch_ = entityTag
  6313  	return c
  6314  }
  6315  
  6316  // Context sets the context to be used in this call's Do method. Any
  6317  // pending HTTP request will be aborted if the provided context is
  6318  // canceled.
  6319  func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
  6320  	c.ctx_ = ctx
  6321  	return c
  6322  }
  6323  
  6324  // Header returns an http.Header that can be modified by the caller to
  6325  // add HTTP headers to the request.
  6326  func (c *UsersGetCall) Header() http.Header {
  6327  	if c.header_ == nil {
  6328  		c.header_ = make(http.Header)
  6329  	}
  6330  	return c.header_
  6331  }
  6332  
  6333  func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
  6334  	reqHeaders := make(http.Header)
  6335  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6336  	for k, v := range c.header_ {
  6337  		reqHeaders[k] = v
  6338  	}
  6339  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6340  	if c.ifNoneMatch_ != "" {
  6341  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6342  	}
  6343  	var body io.Reader = nil
  6344  	c.urlParams_.Set("alt", alt)
  6345  	c.urlParams_.Set("prettyPrint", "false")
  6346  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{userId}")
  6347  	urls += "?" + c.urlParams_.Encode()
  6348  	req, err := http.NewRequest("GET", urls, body)
  6349  	if err != nil {
  6350  		return nil, err
  6351  	}
  6352  	req.Header = reqHeaders
  6353  	googleapi.Expand(req.URL, map[string]string{
  6354  		"userId": c.userId,
  6355  	})
  6356  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6357  }
  6358  
  6359  // Do executes the "partners.users.get" call.
  6360  // Exactly one of *User or error will be non-nil. Any non-2xx status
  6361  // code is an error. Response headers are in either
  6362  // *User.ServerResponse.Header or (if a response was returned at all) in
  6363  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6364  // whether the returned error was because http.StatusNotModified was
  6365  // returned.
  6366  func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
  6367  	gensupport.SetOptions(c.urlParams_, opts...)
  6368  	res, err := c.doRequest("json")
  6369  	if res != nil && res.StatusCode == http.StatusNotModified {
  6370  		if res.Body != nil {
  6371  			res.Body.Close()
  6372  		}
  6373  		return nil, &googleapi.Error{
  6374  			Code:   res.StatusCode,
  6375  			Header: res.Header,
  6376  		}
  6377  	}
  6378  	if err != nil {
  6379  		return nil, err
  6380  	}
  6381  	defer googleapi.CloseBody(res)
  6382  	if err := googleapi.CheckResponse(res); err != nil {
  6383  		return nil, err
  6384  	}
  6385  	ret := &User{
  6386  		ServerResponse: googleapi.ServerResponse{
  6387  			Header:         res.Header,
  6388  			HTTPStatusCode: res.StatusCode,
  6389  		},
  6390  	}
  6391  	target := &ret
  6392  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6393  		return nil, err
  6394  	}
  6395  	return ret, nil
  6396  	// {
  6397  	//   "description": "Gets a user.",
  6398  	//   "flatPath": "v2/users/{userId}",
  6399  	//   "httpMethod": "GET",
  6400  	//   "id": "partners.users.get",
  6401  	//   "parameterOrder": [
  6402  	//     "userId"
  6403  	//   ],
  6404  	//   "parameters": {
  6405  	//     "requestMetadata.experimentIds": {
  6406  	//       "description": "Experiment IDs the current request belongs to.",
  6407  	//       "location": "query",
  6408  	//       "repeated": true,
  6409  	//       "type": "string"
  6410  	//     },
  6411  	//     "requestMetadata.locale": {
  6412  	//       "description": "Locale to use for the current request.",
  6413  	//       "location": "query",
  6414  	//       "type": "string"
  6415  	//     },
  6416  	//     "requestMetadata.partnersSessionId": {
  6417  	//       "description": "Google Partners session ID.",
  6418  	//       "location": "query",
  6419  	//       "type": "string"
  6420  	//     },
  6421  	//     "requestMetadata.trafficSource.trafficSourceId": {
  6422  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6423  	//       "location": "query",
  6424  	//       "type": "string"
  6425  	//     },
  6426  	//     "requestMetadata.trafficSource.trafficSubId": {
  6427  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6428  	//       "location": "query",
  6429  	//       "type": "string"
  6430  	//     },
  6431  	//     "requestMetadata.userOverrides.ipAddress": {
  6432  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  6433  	//       "location": "query",
  6434  	//       "type": "string"
  6435  	//     },
  6436  	//     "requestMetadata.userOverrides.userId": {
  6437  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  6438  	//       "location": "query",
  6439  	//       "type": "string"
  6440  	//     },
  6441  	//     "userId": {
  6442  	//       "description": "Identifier of the user. Can be set to \u003ccode\u003eme\u003c/code\u003e to mean the currently\nauthenticated user.",
  6443  	//       "location": "path",
  6444  	//       "required": true,
  6445  	//       "type": "string"
  6446  	//     },
  6447  	//     "userView": {
  6448  	//       "description": "Specifies what parts of the user information to return.",
  6449  	//       "enum": [
  6450  	//         "BASIC",
  6451  	//         "PROFILE",
  6452  	//         "PUBLIC_PROFILE"
  6453  	//       ],
  6454  	//       "location": "query",
  6455  	//       "type": "string"
  6456  	//     }
  6457  	//   },
  6458  	//   "path": "v2/users/{userId}",
  6459  	//   "response": {
  6460  	//     "$ref": "User"
  6461  	//   }
  6462  	// }
  6463  
  6464  }
  6465  
  6466  // method id "partners.users.updateProfile":
  6467  
  6468  type UsersUpdateProfileCall struct {
  6469  	s           *Service
  6470  	userprofile *UserProfile
  6471  	urlParams_  gensupport.URLParams
  6472  	ctx_        context.Context
  6473  	header_     http.Header
  6474  }
  6475  
  6476  // UpdateProfile: Updates a user's profile. A user can only update their
  6477  // own profile and
  6478  // should only be called within the context of a logged in user.
  6479  func (r *UsersService) UpdateProfile(userprofile *UserProfile) *UsersUpdateProfileCall {
  6480  	c := &UsersUpdateProfileCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6481  	c.userprofile = userprofile
  6482  	return c
  6483  }
  6484  
  6485  // RequestMetadataExperimentIds sets the optional parameter
  6486  // "requestMetadata.experimentIds": Experiment IDs the current request
  6487  // belongs to.
  6488  func (c *UsersUpdateProfileCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *UsersUpdateProfileCall {
  6489  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  6490  	return c
  6491  }
  6492  
  6493  // RequestMetadataLocale sets the optional parameter
  6494  // "requestMetadata.locale": Locale to use for the current request.
  6495  func (c *UsersUpdateProfileCall) RequestMetadataLocale(requestMetadataLocale string) *UsersUpdateProfileCall {
  6496  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  6497  	return c
  6498  }
  6499  
  6500  // RequestMetadataPartnersSessionId sets the optional parameter
  6501  // "requestMetadata.partnersSessionId": Google Partners session ID.
  6502  func (c *UsersUpdateProfileCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *UsersUpdateProfileCall {
  6503  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  6504  	return c
  6505  }
  6506  
  6507  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  6508  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  6509  // to indicate where the traffic comes from.
  6510  // An identifier has multiple letters created by a team which redirected
  6511  // the
  6512  // traffic to us.
  6513  func (c *UsersUpdateProfileCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *UsersUpdateProfileCall {
  6514  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  6515  	return c
  6516  }
  6517  
  6518  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  6519  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  6520  // to indicate where the traffic comes from.
  6521  // An identifier has multiple letters created by a team which redirected
  6522  // the
  6523  // traffic to us.
  6524  func (c *UsersUpdateProfileCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *UsersUpdateProfileCall {
  6525  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  6526  	return c
  6527  }
  6528  
  6529  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  6530  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  6531  // of the user's geo-located IP address.
  6532  func (c *UsersUpdateProfileCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *UsersUpdateProfileCall {
  6533  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  6534  	return c
  6535  }
  6536  
  6537  // RequestMetadataUserOverridesUserId sets the optional parameter
  6538  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  6539  // impersonate instead of the user's ID.
  6540  func (c *UsersUpdateProfileCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *UsersUpdateProfileCall {
  6541  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  6542  	return c
  6543  }
  6544  
  6545  // Fields allows partial responses to be retrieved. See
  6546  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6547  // for more information.
  6548  func (c *UsersUpdateProfileCall) Fields(s ...googleapi.Field) *UsersUpdateProfileCall {
  6549  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6550  	return c
  6551  }
  6552  
  6553  // Context sets the context to be used in this call's Do method. Any
  6554  // pending HTTP request will be aborted if the provided context is
  6555  // canceled.
  6556  func (c *UsersUpdateProfileCall) Context(ctx context.Context) *UsersUpdateProfileCall {
  6557  	c.ctx_ = ctx
  6558  	return c
  6559  }
  6560  
  6561  // Header returns an http.Header that can be modified by the caller to
  6562  // add HTTP headers to the request.
  6563  func (c *UsersUpdateProfileCall) Header() http.Header {
  6564  	if c.header_ == nil {
  6565  		c.header_ = make(http.Header)
  6566  	}
  6567  	return c.header_
  6568  }
  6569  
  6570  func (c *UsersUpdateProfileCall) doRequest(alt string) (*http.Response, error) {
  6571  	reqHeaders := make(http.Header)
  6572  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6573  	for k, v := range c.header_ {
  6574  		reqHeaders[k] = v
  6575  	}
  6576  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6577  	var body io.Reader = nil
  6578  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.userprofile)
  6579  	if err != nil {
  6580  		return nil, err
  6581  	}
  6582  	reqHeaders.Set("Content-Type", "application/json")
  6583  	c.urlParams_.Set("alt", alt)
  6584  	c.urlParams_.Set("prettyPrint", "false")
  6585  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/profile")
  6586  	urls += "?" + c.urlParams_.Encode()
  6587  	req, err := http.NewRequest("PATCH", urls, body)
  6588  	if err != nil {
  6589  		return nil, err
  6590  	}
  6591  	req.Header = reqHeaders
  6592  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6593  }
  6594  
  6595  // Do executes the "partners.users.updateProfile" call.
  6596  // Exactly one of *UserProfile or error will be non-nil. Any non-2xx
  6597  // status code is an error. Response headers are in either
  6598  // *UserProfile.ServerResponse.Header or (if a response was returned at
  6599  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  6600  // to check whether the returned error was because
  6601  // http.StatusNotModified was returned.
  6602  func (c *UsersUpdateProfileCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
  6603  	gensupport.SetOptions(c.urlParams_, opts...)
  6604  	res, err := c.doRequest("json")
  6605  	if res != nil && res.StatusCode == http.StatusNotModified {
  6606  		if res.Body != nil {
  6607  			res.Body.Close()
  6608  		}
  6609  		return nil, &googleapi.Error{
  6610  			Code:   res.StatusCode,
  6611  			Header: res.Header,
  6612  		}
  6613  	}
  6614  	if err != nil {
  6615  		return nil, err
  6616  	}
  6617  	defer googleapi.CloseBody(res)
  6618  	if err := googleapi.CheckResponse(res); err != nil {
  6619  		return nil, err
  6620  	}
  6621  	ret := &UserProfile{
  6622  		ServerResponse: googleapi.ServerResponse{
  6623  			Header:         res.Header,
  6624  			HTTPStatusCode: res.StatusCode,
  6625  		},
  6626  	}
  6627  	target := &ret
  6628  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6629  		return nil, err
  6630  	}
  6631  	return ret, nil
  6632  	// {
  6633  	//   "description": "Updates a user's profile. A user can only update their own profile and\nshould only be called within the context of a logged in user.",
  6634  	//   "flatPath": "v2/users/profile",
  6635  	//   "httpMethod": "PATCH",
  6636  	//   "id": "partners.users.updateProfile",
  6637  	//   "parameterOrder": [],
  6638  	//   "parameters": {
  6639  	//     "requestMetadata.experimentIds": {
  6640  	//       "description": "Experiment IDs the current request belongs to.",
  6641  	//       "location": "query",
  6642  	//       "repeated": true,
  6643  	//       "type": "string"
  6644  	//     },
  6645  	//     "requestMetadata.locale": {
  6646  	//       "description": "Locale to use for the current request.",
  6647  	//       "location": "query",
  6648  	//       "type": "string"
  6649  	//     },
  6650  	//     "requestMetadata.partnersSessionId": {
  6651  	//       "description": "Google Partners session ID.",
  6652  	//       "location": "query",
  6653  	//       "type": "string"
  6654  	//     },
  6655  	//     "requestMetadata.trafficSource.trafficSourceId": {
  6656  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6657  	//       "location": "query",
  6658  	//       "type": "string"
  6659  	//     },
  6660  	//     "requestMetadata.trafficSource.trafficSubId": {
  6661  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6662  	//       "location": "query",
  6663  	//       "type": "string"
  6664  	//     },
  6665  	//     "requestMetadata.userOverrides.ipAddress": {
  6666  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  6667  	//       "location": "query",
  6668  	//       "type": "string"
  6669  	//     },
  6670  	//     "requestMetadata.userOverrides.userId": {
  6671  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  6672  	//       "location": "query",
  6673  	//       "type": "string"
  6674  	//     }
  6675  	//   },
  6676  	//   "path": "v2/users/profile",
  6677  	//   "request": {
  6678  	//     "$ref": "UserProfile"
  6679  	//   },
  6680  	//   "response": {
  6681  	//     "$ref": "UserProfile"
  6682  	//   }
  6683  	// }
  6684  
  6685  }
  6686  
  6687  // method id "partners.getPartnersstatus":
  6688  
  6689  type V2GetPartnersstatusCall struct {
  6690  	s            *Service
  6691  	urlParams_   gensupport.URLParams
  6692  	ifNoneMatch_ string
  6693  	ctx_         context.Context
  6694  	header_      http.Header
  6695  }
  6696  
  6697  // GetPartnersstatus: Gets Partners Status of the logged in user's
  6698  // agency.
  6699  // Should only be called if the logged in user is the admin of the
  6700  // agency.
  6701  func (r *V2Service) GetPartnersstatus() *V2GetPartnersstatusCall {
  6702  	c := &V2GetPartnersstatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6703  	return c
  6704  }
  6705  
  6706  // RequestMetadataExperimentIds sets the optional parameter
  6707  // "requestMetadata.experimentIds": Experiment IDs the current request
  6708  // belongs to.
  6709  func (c *V2GetPartnersstatusCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *V2GetPartnersstatusCall {
  6710  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  6711  	return c
  6712  }
  6713  
  6714  // RequestMetadataLocale sets the optional parameter
  6715  // "requestMetadata.locale": Locale to use for the current request.
  6716  func (c *V2GetPartnersstatusCall) RequestMetadataLocale(requestMetadataLocale string) *V2GetPartnersstatusCall {
  6717  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  6718  	return c
  6719  }
  6720  
  6721  // RequestMetadataPartnersSessionId sets the optional parameter
  6722  // "requestMetadata.partnersSessionId": Google Partners session ID.
  6723  func (c *V2GetPartnersstatusCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *V2GetPartnersstatusCall {
  6724  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  6725  	return c
  6726  }
  6727  
  6728  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  6729  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  6730  // to indicate where the traffic comes from.
  6731  // An identifier has multiple letters created by a team which redirected
  6732  // the
  6733  // traffic to us.
  6734  func (c *V2GetPartnersstatusCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *V2GetPartnersstatusCall {
  6735  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  6736  	return c
  6737  }
  6738  
  6739  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  6740  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  6741  // to indicate where the traffic comes from.
  6742  // An identifier has multiple letters created by a team which redirected
  6743  // the
  6744  // traffic to us.
  6745  func (c *V2GetPartnersstatusCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *V2GetPartnersstatusCall {
  6746  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  6747  	return c
  6748  }
  6749  
  6750  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  6751  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  6752  // of the user's geo-located IP address.
  6753  func (c *V2GetPartnersstatusCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *V2GetPartnersstatusCall {
  6754  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  6755  	return c
  6756  }
  6757  
  6758  // RequestMetadataUserOverridesUserId sets the optional parameter
  6759  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  6760  // impersonate instead of the user's ID.
  6761  func (c *V2GetPartnersstatusCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *V2GetPartnersstatusCall {
  6762  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  6763  	return c
  6764  }
  6765  
  6766  // Fields allows partial responses to be retrieved. See
  6767  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6768  // for more information.
  6769  func (c *V2GetPartnersstatusCall) Fields(s ...googleapi.Field) *V2GetPartnersstatusCall {
  6770  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6771  	return c
  6772  }
  6773  
  6774  // IfNoneMatch sets the optional parameter which makes the operation
  6775  // fail if the object's ETag matches the given value. This is useful for
  6776  // getting updates only after the object has changed since the last
  6777  // request. Use googleapi.IsNotModified to check whether the response
  6778  // error from Do is the result of In-None-Match.
  6779  func (c *V2GetPartnersstatusCall) IfNoneMatch(entityTag string) *V2GetPartnersstatusCall {
  6780  	c.ifNoneMatch_ = entityTag
  6781  	return c
  6782  }
  6783  
  6784  // Context sets the context to be used in this call's Do method. Any
  6785  // pending HTTP request will be aborted if the provided context is
  6786  // canceled.
  6787  func (c *V2GetPartnersstatusCall) Context(ctx context.Context) *V2GetPartnersstatusCall {
  6788  	c.ctx_ = ctx
  6789  	return c
  6790  }
  6791  
  6792  // Header returns an http.Header that can be modified by the caller to
  6793  // add HTTP headers to the request.
  6794  func (c *V2GetPartnersstatusCall) Header() http.Header {
  6795  	if c.header_ == nil {
  6796  		c.header_ = make(http.Header)
  6797  	}
  6798  	return c.header_
  6799  }
  6800  
  6801  func (c *V2GetPartnersstatusCall) doRequest(alt string) (*http.Response, error) {
  6802  	reqHeaders := make(http.Header)
  6803  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  6804  	for k, v := range c.header_ {
  6805  		reqHeaders[k] = v
  6806  	}
  6807  	reqHeaders.Set("User-Agent", c.s.userAgent())
  6808  	if c.ifNoneMatch_ != "" {
  6809  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6810  	}
  6811  	var body io.Reader = nil
  6812  	c.urlParams_.Set("alt", alt)
  6813  	c.urlParams_.Set("prettyPrint", "false")
  6814  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partnersstatus")
  6815  	urls += "?" + c.urlParams_.Encode()
  6816  	req, err := http.NewRequest("GET", urls, body)
  6817  	if err != nil {
  6818  		return nil, err
  6819  	}
  6820  	req.Header = reqHeaders
  6821  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6822  }
  6823  
  6824  // Do executes the "partners.getPartnersstatus" call.
  6825  // Exactly one of *GetPartnersStatusResponse or error will be non-nil.
  6826  // Any non-2xx status code is an error. Response headers are in either
  6827  // *GetPartnersStatusResponse.ServerResponse.Header or (if a response
  6828  // was returned at all) in error.(*googleapi.Error).Header. Use
  6829  // googleapi.IsNotModified to check whether the returned error was
  6830  // because http.StatusNotModified was returned.
  6831  func (c *V2GetPartnersstatusCall) Do(opts ...googleapi.CallOption) (*GetPartnersStatusResponse, error) {
  6832  	gensupport.SetOptions(c.urlParams_, opts...)
  6833  	res, err := c.doRequest("json")
  6834  	if res != nil && res.StatusCode == http.StatusNotModified {
  6835  		if res.Body != nil {
  6836  			res.Body.Close()
  6837  		}
  6838  		return nil, &googleapi.Error{
  6839  			Code:   res.StatusCode,
  6840  			Header: res.Header,
  6841  		}
  6842  	}
  6843  	if err != nil {
  6844  		return nil, err
  6845  	}
  6846  	defer googleapi.CloseBody(res)
  6847  	if err := googleapi.CheckResponse(res); err != nil {
  6848  		return nil, err
  6849  	}
  6850  	ret := &GetPartnersStatusResponse{
  6851  		ServerResponse: googleapi.ServerResponse{
  6852  			Header:         res.Header,
  6853  			HTTPStatusCode: res.StatusCode,
  6854  		},
  6855  	}
  6856  	target := &ret
  6857  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6858  		return nil, err
  6859  	}
  6860  	return ret, nil
  6861  	// {
  6862  	//   "description": "Gets Partners Status of the logged in user's agency.\nShould only be called if the logged in user is the admin of the agency.",
  6863  	//   "flatPath": "v2/partnersstatus",
  6864  	//   "httpMethod": "GET",
  6865  	//   "id": "partners.getPartnersstatus",
  6866  	//   "parameterOrder": [],
  6867  	//   "parameters": {
  6868  	//     "requestMetadata.experimentIds": {
  6869  	//       "description": "Experiment IDs the current request belongs to.",
  6870  	//       "location": "query",
  6871  	//       "repeated": true,
  6872  	//       "type": "string"
  6873  	//     },
  6874  	//     "requestMetadata.locale": {
  6875  	//       "description": "Locale to use for the current request.",
  6876  	//       "location": "query",
  6877  	//       "type": "string"
  6878  	//     },
  6879  	//     "requestMetadata.partnersSessionId": {
  6880  	//       "description": "Google Partners session ID.",
  6881  	//       "location": "query",
  6882  	//       "type": "string"
  6883  	//     },
  6884  	//     "requestMetadata.trafficSource.trafficSourceId": {
  6885  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6886  	//       "location": "query",
  6887  	//       "type": "string"
  6888  	//     },
  6889  	//     "requestMetadata.trafficSource.trafficSubId": {
  6890  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  6891  	//       "location": "query",
  6892  	//       "type": "string"
  6893  	//     },
  6894  	//     "requestMetadata.userOverrides.ipAddress": {
  6895  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  6896  	//       "location": "query",
  6897  	//       "type": "string"
  6898  	//     },
  6899  	//     "requestMetadata.userOverrides.userId": {
  6900  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  6901  	//       "location": "query",
  6902  	//       "type": "string"
  6903  	//     }
  6904  	//   },
  6905  	//   "path": "v2/partnersstatus",
  6906  	//   "response": {
  6907  	//     "$ref": "GetPartnersStatusResponse"
  6908  	//   }
  6909  	// }
  6910  
  6911  }
  6912  
  6913  // method id "partners.updateCompanies":
  6914  
  6915  type V2UpdateCompaniesCall struct {
  6916  	s          *Service
  6917  	company    *Company
  6918  	urlParams_ gensupport.URLParams
  6919  	ctx_       context.Context
  6920  	header_    http.Header
  6921  }
  6922  
  6923  // UpdateCompanies: Update company.
  6924  // Should only be called within the context of an authorized logged in
  6925  // user.
  6926  func (r *V2Service) UpdateCompanies(company *Company) *V2UpdateCompaniesCall {
  6927  	c := &V2UpdateCompaniesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6928  	c.company = company
  6929  	return c
  6930  }
  6931  
  6932  // RequestMetadataExperimentIds sets the optional parameter
  6933  // "requestMetadata.experimentIds": Experiment IDs the current request
  6934  // belongs to.
  6935  func (c *V2UpdateCompaniesCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *V2UpdateCompaniesCall {
  6936  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  6937  	return c
  6938  }
  6939  
  6940  // RequestMetadataLocale sets the optional parameter
  6941  // "requestMetadata.locale": Locale to use for the current request.
  6942  func (c *V2UpdateCompaniesCall) RequestMetadataLocale(requestMetadataLocale string) *V2UpdateCompaniesCall {
  6943  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  6944  	return c
  6945  }
  6946  
  6947  // RequestMetadataPartnersSessionId sets the optional parameter
  6948  // "requestMetadata.partnersSessionId": Google Partners session ID.
  6949  func (c *V2UpdateCompaniesCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *V2UpdateCompaniesCall {
  6950  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  6951  	return c
  6952  }
  6953  
  6954  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  6955  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  6956  // to indicate where the traffic comes from.
  6957  // An identifier has multiple letters created by a team which redirected
  6958  // the
  6959  // traffic to us.
  6960  func (c *V2UpdateCompaniesCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *V2UpdateCompaniesCall {
  6961  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  6962  	return c
  6963  }
  6964  
  6965  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  6966  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  6967  // to indicate where the traffic comes from.
  6968  // An identifier has multiple letters created by a team which redirected
  6969  // the
  6970  // traffic to us.
  6971  func (c *V2UpdateCompaniesCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *V2UpdateCompaniesCall {
  6972  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  6973  	return c
  6974  }
  6975  
  6976  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  6977  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  6978  // of the user's geo-located IP address.
  6979  func (c *V2UpdateCompaniesCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *V2UpdateCompaniesCall {
  6980  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  6981  	return c
  6982  }
  6983  
  6984  // RequestMetadataUserOverridesUserId sets the optional parameter
  6985  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  6986  // impersonate instead of the user's ID.
  6987  func (c *V2UpdateCompaniesCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *V2UpdateCompaniesCall {
  6988  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  6989  	return c
  6990  }
  6991  
  6992  // UpdateMask sets the optional parameter "updateMask": Standard field
  6993  // mask for the set of fields to be updated.
  6994  // Required with at least 1 value in FieldMask's paths.
  6995  func (c *V2UpdateCompaniesCall) UpdateMask(updateMask string) *V2UpdateCompaniesCall {
  6996  	c.urlParams_.Set("updateMask", updateMask)
  6997  	return c
  6998  }
  6999  
  7000  // Fields allows partial responses to be retrieved. See
  7001  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7002  // for more information.
  7003  func (c *V2UpdateCompaniesCall) Fields(s ...googleapi.Field) *V2UpdateCompaniesCall {
  7004  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7005  	return c
  7006  }
  7007  
  7008  // Context sets the context to be used in this call's Do method. Any
  7009  // pending HTTP request will be aborted if the provided context is
  7010  // canceled.
  7011  func (c *V2UpdateCompaniesCall) Context(ctx context.Context) *V2UpdateCompaniesCall {
  7012  	c.ctx_ = ctx
  7013  	return c
  7014  }
  7015  
  7016  // Header returns an http.Header that can be modified by the caller to
  7017  // add HTTP headers to the request.
  7018  func (c *V2UpdateCompaniesCall) Header() http.Header {
  7019  	if c.header_ == nil {
  7020  		c.header_ = make(http.Header)
  7021  	}
  7022  	return c.header_
  7023  }
  7024  
  7025  func (c *V2UpdateCompaniesCall) doRequest(alt string) (*http.Response, error) {
  7026  	reqHeaders := make(http.Header)
  7027  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7028  	for k, v := range c.header_ {
  7029  		reqHeaders[k] = v
  7030  	}
  7031  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7032  	var body io.Reader = nil
  7033  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.company)
  7034  	if err != nil {
  7035  		return nil, err
  7036  	}
  7037  	reqHeaders.Set("Content-Type", "application/json")
  7038  	c.urlParams_.Set("alt", alt)
  7039  	c.urlParams_.Set("prettyPrint", "false")
  7040  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/companies")
  7041  	urls += "?" + c.urlParams_.Encode()
  7042  	req, err := http.NewRequest("PATCH", urls, body)
  7043  	if err != nil {
  7044  		return nil, err
  7045  	}
  7046  	req.Header = reqHeaders
  7047  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7048  }
  7049  
  7050  // Do executes the "partners.updateCompanies" call.
  7051  // Exactly one of *Company or error will be non-nil. Any non-2xx status
  7052  // code is an error. Response headers are in either
  7053  // *Company.ServerResponse.Header or (if a response was returned at all)
  7054  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7055  // check whether the returned error was because http.StatusNotModified
  7056  // was returned.
  7057  func (c *V2UpdateCompaniesCall) Do(opts ...googleapi.CallOption) (*Company, error) {
  7058  	gensupport.SetOptions(c.urlParams_, opts...)
  7059  	res, err := c.doRequest("json")
  7060  	if res != nil && res.StatusCode == http.StatusNotModified {
  7061  		if res.Body != nil {
  7062  			res.Body.Close()
  7063  		}
  7064  		return nil, &googleapi.Error{
  7065  			Code:   res.StatusCode,
  7066  			Header: res.Header,
  7067  		}
  7068  	}
  7069  	if err != nil {
  7070  		return nil, err
  7071  	}
  7072  	defer googleapi.CloseBody(res)
  7073  	if err := googleapi.CheckResponse(res); err != nil {
  7074  		return nil, err
  7075  	}
  7076  	ret := &Company{
  7077  		ServerResponse: googleapi.ServerResponse{
  7078  			Header:         res.Header,
  7079  			HTTPStatusCode: res.StatusCode,
  7080  		},
  7081  	}
  7082  	target := &ret
  7083  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7084  		return nil, err
  7085  	}
  7086  	return ret, nil
  7087  	// {
  7088  	//   "description": "Update company.\nShould only be called within the context of an authorized logged in user.",
  7089  	//   "flatPath": "v2/companies",
  7090  	//   "httpMethod": "PATCH",
  7091  	//   "id": "partners.updateCompanies",
  7092  	//   "parameterOrder": [],
  7093  	//   "parameters": {
  7094  	//     "requestMetadata.experimentIds": {
  7095  	//       "description": "Experiment IDs the current request belongs to.",
  7096  	//       "location": "query",
  7097  	//       "repeated": true,
  7098  	//       "type": "string"
  7099  	//     },
  7100  	//     "requestMetadata.locale": {
  7101  	//       "description": "Locale to use for the current request.",
  7102  	//       "location": "query",
  7103  	//       "type": "string"
  7104  	//     },
  7105  	//     "requestMetadata.partnersSessionId": {
  7106  	//       "description": "Google Partners session ID.",
  7107  	//       "location": "query",
  7108  	//       "type": "string"
  7109  	//     },
  7110  	//     "requestMetadata.trafficSource.trafficSourceId": {
  7111  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  7112  	//       "location": "query",
  7113  	//       "type": "string"
  7114  	//     },
  7115  	//     "requestMetadata.trafficSource.trafficSubId": {
  7116  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  7117  	//       "location": "query",
  7118  	//       "type": "string"
  7119  	//     },
  7120  	//     "requestMetadata.userOverrides.ipAddress": {
  7121  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  7122  	//       "location": "query",
  7123  	//       "type": "string"
  7124  	//     },
  7125  	//     "requestMetadata.userOverrides.userId": {
  7126  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  7127  	//       "location": "query",
  7128  	//       "type": "string"
  7129  	//     },
  7130  	//     "updateMask": {
  7131  	//       "description": "Standard field mask for the set of fields to be updated.\nRequired with at least 1 value in FieldMask's paths.",
  7132  	//       "format": "google-fieldmask",
  7133  	//       "location": "query",
  7134  	//       "type": "string"
  7135  	//     }
  7136  	//   },
  7137  	//   "path": "v2/companies",
  7138  	//   "request": {
  7139  	//     "$ref": "Company"
  7140  	//   },
  7141  	//   "response": {
  7142  	//     "$ref": "Company"
  7143  	//   }
  7144  	// }
  7145  
  7146  }
  7147  
  7148  // method id "partners.updateLeads":
  7149  
  7150  type V2UpdateLeadsCall struct {
  7151  	s          *Service
  7152  	lead       *Lead
  7153  	urlParams_ gensupport.URLParams
  7154  	ctx_       context.Context
  7155  	header_    http.Header
  7156  }
  7157  
  7158  // UpdateLeads: Updates the specified lead.
  7159  func (r *V2Service) UpdateLeads(lead *Lead) *V2UpdateLeadsCall {
  7160  	c := &V2UpdateLeadsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7161  	c.lead = lead
  7162  	return c
  7163  }
  7164  
  7165  // RequestMetadataExperimentIds sets the optional parameter
  7166  // "requestMetadata.experimentIds": Experiment IDs the current request
  7167  // belongs to.
  7168  func (c *V2UpdateLeadsCall) RequestMetadataExperimentIds(requestMetadataExperimentIds ...string) *V2UpdateLeadsCall {
  7169  	c.urlParams_.SetMulti("requestMetadata.experimentIds", append([]string{}, requestMetadataExperimentIds...))
  7170  	return c
  7171  }
  7172  
  7173  // RequestMetadataLocale sets the optional parameter
  7174  // "requestMetadata.locale": Locale to use for the current request.
  7175  func (c *V2UpdateLeadsCall) RequestMetadataLocale(requestMetadataLocale string) *V2UpdateLeadsCall {
  7176  	c.urlParams_.Set("requestMetadata.locale", requestMetadataLocale)
  7177  	return c
  7178  }
  7179  
  7180  // RequestMetadataPartnersSessionId sets the optional parameter
  7181  // "requestMetadata.partnersSessionId": Google Partners session ID.
  7182  func (c *V2UpdateLeadsCall) RequestMetadataPartnersSessionId(requestMetadataPartnersSessionId string) *V2UpdateLeadsCall {
  7183  	c.urlParams_.Set("requestMetadata.partnersSessionId", requestMetadataPartnersSessionId)
  7184  	return c
  7185  }
  7186  
  7187  // RequestMetadataTrafficSourceTrafficSourceId sets the optional
  7188  // parameter "requestMetadata.trafficSource.trafficSourceId": Identifier
  7189  // to indicate where the traffic comes from.
  7190  // An identifier has multiple letters created by a team which redirected
  7191  // the
  7192  // traffic to us.
  7193  func (c *V2UpdateLeadsCall) RequestMetadataTrafficSourceTrafficSourceId(requestMetadataTrafficSourceTrafficSourceId string) *V2UpdateLeadsCall {
  7194  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSourceId", requestMetadataTrafficSourceTrafficSourceId)
  7195  	return c
  7196  }
  7197  
  7198  // RequestMetadataTrafficSourceTrafficSubId sets the optional parameter
  7199  // "requestMetadata.trafficSource.trafficSubId": Second level identifier
  7200  // to indicate where the traffic comes from.
  7201  // An identifier has multiple letters created by a team which redirected
  7202  // the
  7203  // traffic to us.
  7204  func (c *V2UpdateLeadsCall) RequestMetadataTrafficSourceTrafficSubId(requestMetadataTrafficSourceTrafficSubId string) *V2UpdateLeadsCall {
  7205  	c.urlParams_.Set("requestMetadata.trafficSource.trafficSubId", requestMetadataTrafficSourceTrafficSubId)
  7206  	return c
  7207  }
  7208  
  7209  // RequestMetadataUserOverridesIpAddress sets the optional parameter
  7210  // "requestMetadata.userOverrides.ipAddress": IP address to use instead
  7211  // of the user's geo-located IP address.
  7212  func (c *V2UpdateLeadsCall) RequestMetadataUserOverridesIpAddress(requestMetadataUserOverridesIpAddress string) *V2UpdateLeadsCall {
  7213  	c.urlParams_.Set("requestMetadata.userOverrides.ipAddress", requestMetadataUserOverridesIpAddress)
  7214  	return c
  7215  }
  7216  
  7217  // RequestMetadataUserOverridesUserId sets the optional parameter
  7218  // "requestMetadata.userOverrides.userId": Logged-in user ID to
  7219  // impersonate instead of the user's ID.
  7220  func (c *V2UpdateLeadsCall) RequestMetadataUserOverridesUserId(requestMetadataUserOverridesUserId string) *V2UpdateLeadsCall {
  7221  	c.urlParams_.Set("requestMetadata.userOverrides.userId", requestMetadataUserOverridesUserId)
  7222  	return c
  7223  }
  7224  
  7225  // UpdateMask sets the optional parameter "updateMask": Standard field
  7226  // mask for the set of fields to be updated.
  7227  // Required with at least 1 value in FieldMask's paths.
  7228  // Only `state` and `adwords_customer_id` are currently supported.
  7229  func (c *V2UpdateLeadsCall) UpdateMask(updateMask string) *V2UpdateLeadsCall {
  7230  	c.urlParams_.Set("updateMask", updateMask)
  7231  	return c
  7232  }
  7233  
  7234  // Fields allows partial responses to be retrieved. See
  7235  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7236  // for more information.
  7237  func (c *V2UpdateLeadsCall) Fields(s ...googleapi.Field) *V2UpdateLeadsCall {
  7238  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7239  	return c
  7240  }
  7241  
  7242  // Context sets the context to be used in this call's Do method. Any
  7243  // pending HTTP request will be aborted if the provided context is
  7244  // canceled.
  7245  func (c *V2UpdateLeadsCall) Context(ctx context.Context) *V2UpdateLeadsCall {
  7246  	c.ctx_ = ctx
  7247  	return c
  7248  }
  7249  
  7250  // Header returns an http.Header that can be modified by the caller to
  7251  // add HTTP headers to the request.
  7252  func (c *V2UpdateLeadsCall) Header() http.Header {
  7253  	if c.header_ == nil {
  7254  		c.header_ = make(http.Header)
  7255  	}
  7256  	return c.header_
  7257  }
  7258  
  7259  func (c *V2UpdateLeadsCall) doRequest(alt string) (*http.Response, error) {
  7260  	reqHeaders := make(http.Header)
  7261  	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
  7262  	for k, v := range c.header_ {
  7263  		reqHeaders[k] = v
  7264  	}
  7265  	reqHeaders.Set("User-Agent", c.s.userAgent())
  7266  	var body io.Reader = nil
  7267  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lead)
  7268  	if err != nil {
  7269  		return nil, err
  7270  	}
  7271  	reqHeaders.Set("Content-Type", "application/json")
  7272  	c.urlParams_.Set("alt", alt)
  7273  	c.urlParams_.Set("prettyPrint", "false")
  7274  	urls := googleapi.ResolveRelative(c.s.BasePath, "v2/leads")
  7275  	urls += "?" + c.urlParams_.Encode()
  7276  	req, err := http.NewRequest("PATCH", urls, body)
  7277  	if err != nil {
  7278  		return nil, err
  7279  	}
  7280  	req.Header = reqHeaders
  7281  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7282  }
  7283  
  7284  // Do executes the "partners.updateLeads" call.
  7285  // Exactly one of *Lead or error will be non-nil. Any non-2xx status
  7286  // code is an error. Response headers are in either
  7287  // *Lead.ServerResponse.Header or (if a response was returned at all) in
  7288  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7289  // whether the returned error was because http.StatusNotModified was
  7290  // returned.
  7291  func (c *V2UpdateLeadsCall) Do(opts ...googleapi.CallOption) (*Lead, error) {
  7292  	gensupport.SetOptions(c.urlParams_, opts...)
  7293  	res, err := c.doRequest("json")
  7294  	if res != nil && res.StatusCode == http.StatusNotModified {
  7295  		if res.Body != nil {
  7296  			res.Body.Close()
  7297  		}
  7298  		return nil, &googleapi.Error{
  7299  			Code:   res.StatusCode,
  7300  			Header: res.Header,
  7301  		}
  7302  	}
  7303  	if err != nil {
  7304  		return nil, err
  7305  	}
  7306  	defer googleapi.CloseBody(res)
  7307  	if err := googleapi.CheckResponse(res); err != nil {
  7308  		return nil, err
  7309  	}
  7310  	ret := &Lead{
  7311  		ServerResponse: googleapi.ServerResponse{
  7312  			Header:         res.Header,
  7313  			HTTPStatusCode: res.StatusCode,
  7314  		},
  7315  	}
  7316  	target := &ret
  7317  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7318  		return nil, err
  7319  	}
  7320  	return ret, nil
  7321  	// {
  7322  	//   "description": "Updates the specified lead.",
  7323  	//   "flatPath": "v2/leads",
  7324  	//   "httpMethod": "PATCH",
  7325  	//   "id": "partners.updateLeads",
  7326  	//   "parameterOrder": [],
  7327  	//   "parameters": {
  7328  	//     "requestMetadata.experimentIds": {
  7329  	//       "description": "Experiment IDs the current request belongs to.",
  7330  	//       "location": "query",
  7331  	//       "repeated": true,
  7332  	//       "type": "string"
  7333  	//     },
  7334  	//     "requestMetadata.locale": {
  7335  	//       "description": "Locale to use for the current request.",
  7336  	//       "location": "query",
  7337  	//       "type": "string"
  7338  	//     },
  7339  	//     "requestMetadata.partnersSessionId": {
  7340  	//       "description": "Google Partners session ID.",
  7341  	//       "location": "query",
  7342  	//       "type": "string"
  7343  	//     },
  7344  	//     "requestMetadata.trafficSource.trafficSourceId": {
  7345  	//       "description": "Identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  7346  	//       "location": "query",
  7347  	//       "type": "string"
  7348  	//     },
  7349  	//     "requestMetadata.trafficSource.trafficSubId": {
  7350  	//       "description": "Second level identifier to indicate where the traffic comes from.\nAn identifier has multiple letters created by a team which redirected the\ntraffic to us.",
  7351  	//       "location": "query",
  7352  	//       "type": "string"
  7353  	//     },
  7354  	//     "requestMetadata.userOverrides.ipAddress": {
  7355  	//       "description": "IP address to use instead of the user's geo-located IP address.",
  7356  	//       "location": "query",
  7357  	//       "type": "string"
  7358  	//     },
  7359  	//     "requestMetadata.userOverrides.userId": {
  7360  	//       "description": "Logged-in user ID to impersonate instead of the user's ID.",
  7361  	//       "location": "query",
  7362  	//       "type": "string"
  7363  	//     },
  7364  	//     "updateMask": {
  7365  	//       "description": "Standard field mask for the set of fields to be updated.\nRequired with at least 1 value in FieldMask's paths.\nOnly `state` and `adwords_customer_id` are currently supported.",
  7366  	//       "format": "google-fieldmask",
  7367  	//       "location": "query",
  7368  	//       "type": "string"
  7369  	//     }
  7370  	//   },
  7371  	//   "path": "v2/leads",
  7372  	//   "request": {
  7373  	//     "$ref": "Lead"
  7374  	//   },
  7375  	//   "response": {
  7376  	//     "$ref": "Lead"
  7377  	//   }
  7378  	// }
  7379  
  7380  }
  7381  

View as plain text