...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package mybusinessbusinessinformation provides access to the My Business Business Information API.
     8  //
     9  // For product documentation, see: https://developers.google.com/my-business/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/mybusinessbusinessinformation/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	mybusinessbusinessinformationService, err := mybusinessbusinessinformation.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	mybusinessbusinessinformationService, err := mybusinessbusinessinformation.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	mybusinessbusinessinformationService, err := mybusinessbusinessinformation.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package mybusinessbusinessinformation // import "google.golang.org/api/mybusinessbusinessinformation/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "mybusinessbusinessinformation:v1"
    90  const apiName = "mybusinessbusinessinformation"
    91  const apiVersion = "v1"
    92  const basePath = "https://mybusinessbusinessinformation.googleapis.com/"
    93  const basePathTemplate = "https://mybusinessbusinessinformation.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://mybusinessbusinessinformation.mtls.googleapis.com/"
    95  
    96  // NewService creates a new Service.
    97  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
    98  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
    99  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   100  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   101  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   102  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	s, err := New(client)
   107  	if err != nil {
   108  		return nil, err
   109  	}
   110  	if endpoint != "" {
   111  		s.BasePath = endpoint
   112  	}
   113  	return s, nil
   114  }
   115  
   116  // New creates a new Service. It uses the provided http.Client for requests.
   117  //
   118  // Deprecated: please use NewService instead.
   119  // To provide a custom HTTP client, use option.WithHTTPClient.
   120  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   121  func New(client *http.Client) (*Service, error) {
   122  	if client == nil {
   123  		return nil, errors.New("client is nil")
   124  	}
   125  	s := &Service{client: client, BasePath: basePath}
   126  	s.Accounts = NewAccountsService(s)
   127  	s.Attributes = NewAttributesService(s)
   128  	s.Categories = NewCategoriesService(s)
   129  	s.Chains = NewChainsService(s)
   130  	s.GoogleLocations = NewGoogleLocationsService(s)
   131  	s.Locations = NewLocationsService(s)
   132  	return s, nil
   133  }
   134  
   135  type Service struct {
   136  	client    *http.Client
   137  	BasePath  string // API endpoint base URL
   138  	UserAgent string // optional additional User-Agent fragment
   139  
   140  	Accounts *AccountsService
   141  
   142  	Attributes *AttributesService
   143  
   144  	Categories *CategoriesService
   145  
   146  	Chains *ChainsService
   147  
   148  	GoogleLocations *GoogleLocationsService
   149  
   150  	Locations *LocationsService
   151  }
   152  
   153  func (s *Service) userAgent() string {
   154  	if s.UserAgent == "" {
   155  		return googleapi.UserAgent
   156  	}
   157  	return googleapi.UserAgent + " " + s.UserAgent
   158  }
   159  
   160  func NewAccountsService(s *Service) *AccountsService {
   161  	rs := &AccountsService{s: s}
   162  	rs.Locations = NewAccountsLocationsService(s)
   163  	return rs
   164  }
   165  
   166  type AccountsService struct {
   167  	s *Service
   168  
   169  	Locations *AccountsLocationsService
   170  }
   171  
   172  func NewAccountsLocationsService(s *Service) *AccountsLocationsService {
   173  	rs := &AccountsLocationsService{s: s}
   174  	return rs
   175  }
   176  
   177  type AccountsLocationsService struct {
   178  	s *Service
   179  }
   180  
   181  func NewAttributesService(s *Service) *AttributesService {
   182  	rs := &AttributesService{s: s}
   183  	return rs
   184  }
   185  
   186  type AttributesService struct {
   187  	s *Service
   188  }
   189  
   190  func NewCategoriesService(s *Service) *CategoriesService {
   191  	rs := &CategoriesService{s: s}
   192  	return rs
   193  }
   194  
   195  type CategoriesService struct {
   196  	s *Service
   197  }
   198  
   199  func NewChainsService(s *Service) *ChainsService {
   200  	rs := &ChainsService{s: s}
   201  	return rs
   202  }
   203  
   204  type ChainsService struct {
   205  	s *Service
   206  }
   207  
   208  func NewGoogleLocationsService(s *Service) *GoogleLocationsService {
   209  	rs := &GoogleLocationsService{s: s}
   210  	return rs
   211  }
   212  
   213  type GoogleLocationsService struct {
   214  	s *Service
   215  }
   216  
   217  func NewLocationsService(s *Service) *LocationsService {
   218  	rs := &LocationsService{s: s}
   219  	rs.Attributes = NewLocationsAttributesService(s)
   220  	return rs
   221  }
   222  
   223  type LocationsService struct {
   224  	s *Service
   225  
   226  	Attributes *LocationsAttributesService
   227  }
   228  
   229  func NewLocationsAttributesService(s *Service) *LocationsAttributesService {
   230  	rs := &LocationsAttributesService{s: s}
   231  	return rs
   232  }
   233  
   234  type LocationsAttributesService struct {
   235  	s *Service
   236  }
   237  
   238  // AdWordsLocationExtensions: Additional information that is surfaced in
   239  // AdWords.
   240  type AdWordsLocationExtensions struct {
   241  	// AdPhone: Required. An alternate phone number to display on AdWords location
   242  	// extensions instead of the location's primary phone number.
   243  	AdPhone string `json:"adPhone,omitempty"`
   244  	// ForceSendFields is a list of field names (e.g. "AdPhone") to unconditionally
   245  	// include in API requests. By default, fields with empty or default values are
   246  	// omitted from API requests. See
   247  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   248  	// details.
   249  	ForceSendFields []string `json:"-"`
   250  	// NullFields is a list of field names (e.g. "AdPhone") to include in API
   251  	// requests with the JSON null value. By default, fields with empty values are
   252  	// omitted from API requests. See
   253  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   254  	NullFields []string `json:"-"`
   255  }
   256  
   257  func (s *AdWordsLocationExtensions) MarshalJSON() ([]byte, error) {
   258  	type NoMethod AdWordsLocationExtensions
   259  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   260  }
   261  
   262  // Attribute: A location attribute. Attributes provide additional information
   263  // about a location. The attributes that can be set on a location may vary
   264  // based on the properties of that location (for example, category). Available
   265  // attributes are determined by Google and may be added and removed without API
   266  // changes.
   267  type Attribute struct {
   268  	// Name: Required. The resource name for this attribute.
   269  	Name string `json:"name,omitempty"`
   270  	// RepeatedEnumValue: When the attribute value type is REPEATED_ENUM, this
   271  	// contains the attribute value, and the other values fields must be empty.
   272  	RepeatedEnumValue *RepeatedEnumAttributeValue `json:"repeatedEnumValue,omitempty"`
   273  	// UriValues: When the attribute value type is URL, this field contains the
   274  	// value(s) for this attribute, and the other values fields must be empty.
   275  	UriValues []*UriAttributeValue `json:"uriValues,omitempty"`
   276  	// ValueType: Output only. The type of value that this attribute contains. This
   277  	// should be used to determine how to interpret the value.
   278  	//
   279  	// Possible values:
   280  	//   "ATTRIBUTE_VALUE_TYPE_UNSPECIFIED" - Not specified.
   281  	//   "BOOL" - The values for this attribute are boolean values.
   282  	//   "ENUM" - The attribute has a predetermined list of available values that
   283  	// can be used. Metadata for this attribute will list these values.
   284  	//   "URL" - The values for this attribute are URLs.
   285  	//   "REPEATED_ENUM" - The attribute value is an enum with multiple possible
   286  	// values that can be explicitly set or unset.
   287  	ValueType string `json:"valueType,omitempty"`
   288  	// Values: The values for this attribute. The type of the values supplied must
   289  	// match that expected for that attribute. This is a repeated field where
   290  	// multiple attribute values may be provided. Attribute types only support one
   291  	// value.
   292  	Values []interface{} `json:"values,omitempty"`
   293  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
   294  	// include in API requests. By default, fields with empty or default values are
   295  	// omitted from API requests. See
   296  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   297  	// details.
   298  	ForceSendFields []string `json:"-"`
   299  	// NullFields is a list of field names (e.g. "Name") to include in API requests
   300  	// with the JSON null value. By default, fields with empty values are omitted
   301  	// from API requests. See
   302  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   303  	NullFields []string `json:"-"`
   304  }
   305  
   306  func (s *Attribute) MarshalJSON() ([]byte, error) {
   307  	type NoMethod Attribute
   308  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   309  }
   310  
   311  // AttributeMetadata: Metadata for an attribute. Contains display information
   312  // for the attribute, including a localized name and a heading for grouping
   313  // related attributes together.
   314  type AttributeMetadata struct {
   315  	// Deprecated -- If true, the attribute is deprecated and should no longer be
   316  	// used. If deprecated, updating this attribute will not result in an error,
   317  	// but updates will not be saved. At some point after being deprecated, the
   318  	// attribute will be removed entirely and it will become an error.
   319  	Deprecated bool `json:"deprecated,omitempty"`
   320  	// DisplayName: The localized display name for the attribute, if available;
   321  	// otherwise, the English display name.
   322  	DisplayName string `json:"displayName,omitempty"`
   323  	// GroupDisplayName: The localized display name of the group that contains this
   324  	// attribute, if available; otherwise, the English group name. Related
   325  	// attributes are collected into a group and should be displayed together under
   326  	// the heading given here.
   327  	GroupDisplayName string `json:"groupDisplayName,omitempty"`
   328  	// Parent: The unique identifier for the attribute.
   329  	Parent string `json:"parent,omitempty"`
   330  	// Repeatable: If true, the attribute supports multiple values. If false, only
   331  	// a single value should be provided.
   332  	Repeatable bool `json:"repeatable,omitempty"`
   333  	// ValueMetadata: For some types of attributes (for example, enums), a list of
   334  	// supported values and corresponding display names for those values is
   335  	// provided.
   336  	ValueMetadata []*AttributeValueMetadata `json:"valueMetadata,omitempty"`
   337  	// ValueType: The value type for the attribute. Values set and retrieved should
   338  	// be expected to be of this type.
   339  	//
   340  	// Possible values:
   341  	//   "ATTRIBUTE_VALUE_TYPE_UNSPECIFIED" - Not specified.
   342  	//   "BOOL" - The values for this attribute are boolean values.
   343  	//   "ENUM" - The attribute has a predetermined list of available values that
   344  	// can be used. Metadata for this attribute will list these values.
   345  	//   "URL" - The values for this attribute are URLs.
   346  	//   "REPEATED_ENUM" - The attribute value is an enum with multiple possible
   347  	// values that can be explicitly set or unset.
   348  	ValueType string `json:"valueType,omitempty"`
   349  	// ForceSendFields is a list of field names (e.g. "Deprecated") to
   350  	// unconditionally include in API requests. By default, fields with empty or
   351  	// default values are omitted from API requests. See
   352  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   353  	// details.
   354  	ForceSendFields []string `json:"-"`
   355  	// NullFields is a list of field names (e.g. "Deprecated") to include in API
   356  	// requests with the JSON null value. By default, fields with empty values are
   357  	// omitted from API requests. See
   358  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   359  	NullFields []string `json:"-"`
   360  }
   361  
   362  func (s *AttributeMetadata) MarshalJSON() ([]byte, error) {
   363  	type NoMethod AttributeMetadata
   364  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   365  }
   366  
   367  // AttributeValueMetadata: Metadata for supported attribute values.
   368  type AttributeValueMetadata struct {
   369  	// DisplayName: The display name for this value, localized where available;
   370  	// otherwise, in English. The value display name is intended to be used in
   371  	// context with the attribute display name. For example, for a "WiFi" enum
   372  	// attribute, this could contain "Paid" to represent paid Wi-Fi.
   373  	DisplayName string `json:"displayName,omitempty"`
   374  	// Value: The attribute value.
   375  	Value interface{} `json:"value,omitempty"`
   376  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   377  	// unconditionally include in API requests. By default, fields with empty or
   378  	// default values are omitted from API requests. See
   379  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   380  	// details.
   381  	ForceSendFields []string `json:"-"`
   382  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   383  	// requests with the JSON null value. By default, fields with empty values are
   384  	// omitted from API requests. See
   385  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   386  	NullFields []string `json:"-"`
   387  }
   388  
   389  func (s *AttributeValueMetadata) MarshalJSON() ([]byte, error) {
   390  	type NoMethod AttributeValueMetadata
   391  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   392  }
   393  
   394  // Attributes: A container for all the attributes for a given location.
   395  type Attributes struct {
   396  	// Attributes: A collection of attributes that need to be updated.
   397  	Attributes []*Attribute `json:"attributes,omitempty"`
   398  	// Name: Required. Google identifier for this location in the form of
   399  	// `locations/{location_id}/attributes`.
   400  	Name string `json:"name,omitempty"`
   401  
   402  	// ServerResponse contains the HTTP response code and headers from the server.
   403  	googleapi.ServerResponse `json:"-"`
   404  	// ForceSendFields is a list of field names (e.g. "Attributes") to
   405  	// unconditionally include in API requests. By default, fields with empty or
   406  	// default values are omitted from API requests. See
   407  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   408  	// details.
   409  	ForceSendFields []string `json:"-"`
   410  	// NullFields is a list of field names (e.g. "Attributes") to include in API
   411  	// requests with the JSON null value. By default, fields with empty values are
   412  	// omitted from API requests. See
   413  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   414  	NullFields []string `json:"-"`
   415  }
   416  
   417  func (s *Attributes) MarshalJSON() ([]byte, error) {
   418  	type NoMethod Attributes
   419  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   420  }
   421  
   422  // BatchGetCategoriesResponse: Response message for
   423  // BusinessCategories.BatchGetBusinessCategories.
   424  type BatchGetCategoriesResponse struct {
   425  	// Categories: Categories that match the GConcept ids provided in the request.
   426  	// They will not come in the same order as category ids in the request.
   427  	Categories []*Category `json:"categories,omitempty"`
   428  
   429  	// ServerResponse contains the HTTP response code and headers from the server.
   430  	googleapi.ServerResponse `json:"-"`
   431  	// ForceSendFields is a list of field names (e.g. "Categories") to
   432  	// unconditionally include in API requests. By default, fields with empty or
   433  	// default values are omitted from API requests. See
   434  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   435  	// details.
   436  	ForceSendFields []string `json:"-"`
   437  	// NullFields is a list of field names (e.g. "Categories") to include in API
   438  	// requests with the JSON null value. By default, fields with empty values are
   439  	// omitted from API requests. See
   440  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   441  	NullFields []string `json:"-"`
   442  }
   443  
   444  func (s *BatchGetCategoriesResponse) MarshalJSON() ([]byte, error) {
   445  	type NoMethod BatchGetCategoriesResponse
   446  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   447  }
   448  
   449  // BusinessHours: Represents the time periods that this location is open for
   450  // business. Holds a collection of TimePeriod instances.
   451  type BusinessHours struct {
   452  	// Periods: Required. A collection of times that this location is open for
   453  	// business. Each period represents a range of hours when the location is open
   454  	// during the week.
   455  	Periods []*TimePeriod `json:"periods,omitempty"`
   456  	// ForceSendFields is a list of field names (e.g. "Periods") to unconditionally
   457  	// include in API requests. By default, fields with empty or default values are
   458  	// omitted from API requests. See
   459  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   460  	// details.
   461  	ForceSendFields []string `json:"-"`
   462  	// NullFields is a list of field names (e.g. "Periods") to include in API
   463  	// requests with the JSON null value. By default, fields with empty values are
   464  	// omitted from API requests. See
   465  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   466  	NullFields []string `json:"-"`
   467  }
   468  
   469  func (s *BusinessHours) MarshalJSON() ([]byte, error) {
   470  	type NoMethod BusinessHours
   471  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   472  }
   473  
   474  // Categories: A collection of categories that describes the business. During
   475  // updates, both fields must be set. Clients are prohibited from individually
   476  // updating the primary or additional categories using the update mask.
   477  type Categories struct {
   478  	// AdditionalCategories: Optional. Additional categories to describe your
   479  	// business. Categories help your customers find accurate, specific results for
   480  	// services they're interested in. To keep your business information accurate
   481  	// and live, make sure that you use as few categories as possible to describe
   482  	// your overall core business. Choose categories that are as specific as
   483  	// possible, but representative of your main business.
   484  	AdditionalCategories []*Category `json:"additionalCategories,omitempty"`
   485  	// PrimaryCategory: Required. Category that best describes the core business
   486  	// this location engages in.
   487  	PrimaryCategory *Category `json:"primaryCategory,omitempty"`
   488  	// ForceSendFields is a list of field names (e.g. "AdditionalCategories") to
   489  	// unconditionally include in API requests. By default, fields with empty or
   490  	// default values are omitted from API requests. See
   491  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   492  	// details.
   493  	ForceSendFields []string `json:"-"`
   494  	// NullFields is a list of field names (e.g. "AdditionalCategories") to include
   495  	// in API requests with the JSON null value. By default, fields with empty
   496  	// values are omitted from API requests. See
   497  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   498  	NullFields []string `json:"-"`
   499  }
   500  
   501  func (s *Categories) MarshalJSON() ([]byte, error) {
   502  	type NoMethod Categories
   503  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   504  }
   505  
   506  // Category: A category describing what this business is (not what it does).
   507  // For a list of valid category IDs, and the mappings to their human-readable
   508  // names, see `categories.list`.
   509  type Category struct {
   510  	// DisplayName: Output only. The human-readable name of the category. This is
   511  	// set when reading the location. When modifying the location, `category_id`
   512  	// must be set.
   513  	DisplayName string `json:"displayName,omitempty"`
   514  	// MoreHoursTypes: Output only. More hours types that are available for this
   515  	// business category.
   516  	MoreHoursTypes []*MoreHoursType `json:"moreHoursTypes,omitempty"`
   517  	// Name: Required. A stable ID (provided by Google) for this category. The
   518  	// value must be specified when modifying the category (when creating or
   519  	// updating a location).
   520  	Name string `json:"name,omitempty"`
   521  	// ServiceTypes: Output only. A list of all the service types that are
   522  	// available for this business category.
   523  	ServiceTypes []*ServiceType `json:"serviceTypes,omitempty"`
   524  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   525  	// unconditionally include in API requests. By default, fields with empty or
   526  	// default values are omitted from API requests. See
   527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   528  	// details.
   529  	ForceSendFields []string `json:"-"`
   530  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   531  	// requests with the JSON null value. By default, fields with empty values are
   532  	// omitted from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   534  	NullFields []string `json:"-"`
   535  }
   536  
   537  func (s *Category) MarshalJSON() ([]byte, error) {
   538  	type NoMethod Category
   539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   540  }
   541  
   542  // Chain: A chain is a brand that your business's locations can be affiliated
   543  // with.
   544  type Chain struct {
   545  	// ChainNames: Names of the chain.
   546  	ChainNames []*ChainName `json:"chainNames,omitempty"`
   547  	// LocationCount: Number of locations that are part of this chain.
   548  	LocationCount int64 `json:"locationCount,omitempty"`
   549  	// Name: Required. The chain's resource name, in the format
   550  	// `chains/{chain_id}`.
   551  	Name string `json:"name,omitempty"`
   552  	// Websites: Websites of the chain.
   553  	Websites []*ChainUri `json:"websites,omitempty"`
   554  
   555  	// ServerResponse contains the HTTP response code and headers from the server.
   556  	googleapi.ServerResponse `json:"-"`
   557  	// ForceSendFields is a list of field names (e.g. "ChainNames") to
   558  	// unconditionally include in API requests. By default, fields with empty or
   559  	// default values are omitted from API requests. See
   560  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   561  	// details.
   562  	ForceSendFields []string `json:"-"`
   563  	// NullFields is a list of field names (e.g. "ChainNames") to include in API
   564  	// requests with the JSON null value. By default, fields with empty values are
   565  	// omitted from API requests. See
   566  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   567  	NullFields []string `json:"-"`
   568  }
   569  
   570  func (s *Chain) MarshalJSON() ([]byte, error) {
   571  	type NoMethod Chain
   572  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   573  }
   574  
   575  // ChainName: Name to be used when displaying the chain.
   576  type ChainName struct {
   577  	// DisplayName: The display name for this chain.
   578  	DisplayName string `json:"displayName,omitempty"`
   579  	// LanguageCode: The BCP 47 code of language of the name.
   580  	LanguageCode string `json:"languageCode,omitempty"`
   581  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   582  	// unconditionally include in API requests. By default, fields with empty or
   583  	// default values are omitted from API requests. See
   584  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   585  	// details.
   586  	ForceSendFields []string `json:"-"`
   587  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   588  	// requests with the JSON null value. By default, fields with empty values are
   589  	// omitted from API requests. See
   590  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   591  	NullFields []string `json:"-"`
   592  }
   593  
   594  func (s *ChainName) MarshalJSON() ([]byte, error) {
   595  	type NoMethod ChainName
   596  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   597  }
   598  
   599  // ChainUri: Url to be used when displaying the chain.
   600  type ChainUri struct {
   601  	// Uri: The uri for this chain.
   602  	Uri string `json:"uri,omitempty"`
   603  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
   604  	// include in API requests. By default, fields with empty or default values are
   605  	// omitted from API requests. See
   606  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   607  	// details.
   608  	ForceSendFields []string `json:"-"`
   609  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
   610  	// with the JSON null value. By default, fields with empty values are omitted
   611  	// from API requests. See
   612  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   613  	NullFields []string `json:"-"`
   614  }
   615  
   616  func (s *ChainUri) MarshalJSON() ([]byte, error) {
   617  	type NoMethod ChainUri
   618  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   619  }
   620  
   621  // Date: Represents a whole or partial calendar date, such as a birthday. The
   622  // time of day and time zone are either specified elsewhere or are
   623  // insignificant. The date is relative to the Gregorian Calendar. This can
   624  // represent one of the following: * A full date, with non-zero year, month,
   625  // and day values. * A month and day, with a zero year (for example, an
   626  // anniversary). * A year on its own, with a zero month and a zero day. * A
   627  // year and month, with a zero day (for example, a credit card expiration
   628  // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
   629  // google.protobuf.Timestamp
   630  type Date struct {
   631  	// Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
   632  	// or 0 to specify a year by itself or a year and month where the day isn't
   633  	// significant.
   634  	Day int64 `json:"day,omitempty"`
   635  	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
   636  	// a month and day.
   637  	Month int64 `json:"month,omitempty"`
   638  	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
   639  	// without a year.
   640  	Year int64 `json:"year,omitempty"`
   641  	// ForceSendFields is a list of field names (e.g. "Day") to unconditionally
   642  	// include in API requests. By default, fields with empty or default values are
   643  	// omitted from API requests. See
   644  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   645  	// details.
   646  	ForceSendFields []string `json:"-"`
   647  	// NullFields is a list of field names (e.g. "Day") to include in API requests
   648  	// with the JSON null value. By default, fields with empty values are omitted
   649  	// from API requests. See
   650  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   651  	NullFields []string `json:"-"`
   652  }
   653  
   654  func (s *Date) MarshalJSON() ([]byte, error) {
   655  	type NoMethod Date
   656  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   657  }
   658  
   659  // Empty: A generic empty message that you can re-use to avoid defining
   660  // duplicated empty messages in your APIs. A typical example is to use it as
   661  // the request or the response type of an API method. For instance: service Foo
   662  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   663  type Empty struct {
   664  	// ServerResponse contains the HTTP response code and headers from the server.
   665  	googleapi.ServerResponse `json:"-"`
   666  }
   667  
   668  // FreeFormServiceItem: Represents a free-form service offered by the merchant.
   669  // These are services that are not exposed as part of our structure service
   670  // data. The merchant manually enters the names for of such services via a
   671  // geomerchant surface.
   672  type FreeFormServiceItem struct {
   673  	// Category: Required. This field represents the category name (i.e. the
   674  	// category's stable ID). The `category` and `service_type_id` should match the
   675  	// possible combinations provided in the `Category` message.
   676  	Category string `json:"category,omitempty"`
   677  	// Label: Required. Language-tagged labels for the item. We recommend that item
   678  	// names be 140 characters or less, and descriptions 250 characters or less.
   679  	// This field should only be set if the input is a custom service item.
   680  	// Standardized service types should be updated via service_type_id.
   681  	Label *Label `json:"label,omitempty"`
   682  	// ForceSendFields is a list of field names (e.g. "Category") to
   683  	// unconditionally include in API requests. By default, fields with empty or
   684  	// default values are omitted from API requests. See
   685  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   686  	// details.
   687  	ForceSendFields []string `json:"-"`
   688  	// NullFields is a list of field names (e.g. "Category") to include in API
   689  	// requests with the JSON null value. By default, fields with empty values are
   690  	// omitted from API requests. See
   691  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   692  	NullFields []string `json:"-"`
   693  }
   694  
   695  func (s *FreeFormServiceItem) MarshalJSON() ([]byte, error) {
   696  	type NoMethod FreeFormServiceItem
   697  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   698  }
   699  
   700  // GoogleLocation: Represents a Location that is present on Google. This can be
   701  // a location that has been claimed by the user, someone else, or could be
   702  // unclaimed.
   703  type GoogleLocation struct {
   704  	// Location: The sparsely populated Location information. This field can be
   705  	// re-used in CreateLocation if it is not currently claimed by a user.
   706  	Location *Location `json:"location,omitempty"`
   707  	// Name: Resource name of this GoogleLocation, in the format
   708  	// `googleLocations/{googleLocationId}`.
   709  	Name string `json:"name,omitempty"`
   710  	// RequestAdminRightsUri: A URL that will redirect the user to the request
   711  	// admin rights UI. This field is only present if the location has already been
   712  	// claimed by any user, including the current user.
   713  	RequestAdminRightsUri string `json:"requestAdminRightsUri,omitempty"`
   714  	// ForceSendFields is a list of field names (e.g. "Location") to
   715  	// unconditionally include in API requests. By default, fields with empty or
   716  	// default values are omitted from API requests. See
   717  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   718  	// details.
   719  	ForceSendFields []string `json:"-"`
   720  	// NullFields is a list of field names (e.g. "Location") to include in API
   721  	// requests with the JSON null value. By default, fields with empty values are
   722  	// omitted from API requests. See
   723  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   724  	NullFields []string `json:"-"`
   725  }
   726  
   727  func (s *GoogleLocation) MarshalJSON() ([]byte, error) {
   728  	type NoMethod GoogleLocation
   729  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   730  }
   731  
   732  // GoogleUpdatedLocation: Represents a location that was modified by Google.
   733  type GoogleUpdatedLocation struct {
   734  	// DiffMask: The fields that Google updated.
   735  	DiffMask string `json:"diffMask,omitempty"`
   736  	// Location: The Google-updated version of this location.
   737  	Location *Location `json:"location,omitempty"`
   738  	// PendingMask: The fields that have pending edits that haven't yet been pushed
   739  	// to Maps and Search.
   740  	PendingMask string `json:"pendingMask,omitempty"`
   741  
   742  	// ServerResponse contains the HTTP response code and headers from the server.
   743  	googleapi.ServerResponse `json:"-"`
   744  	// ForceSendFields is a list of field names (e.g. "DiffMask") to
   745  	// unconditionally include in API requests. By default, fields with empty or
   746  	// default values are omitted from API requests. See
   747  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   748  	// details.
   749  	ForceSendFields []string `json:"-"`
   750  	// NullFields is a list of field names (e.g. "DiffMask") to include in API
   751  	// requests with the JSON null value. By default, fields with empty values are
   752  	// omitted from API requests. See
   753  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   754  	NullFields []string `json:"-"`
   755  }
   756  
   757  func (s *GoogleUpdatedLocation) MarshalJSON() ([]byte, error) {
   758  	type NoMethod GoogleUpdatedLocation
   759  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   760  }
   761  
   762  // Label: Label to be used when displaying the price list, section, or item.
   763  type Label struct {
   764  	// Description: Optional. Description of the price list, section, or item.
   765  	Description string `json:"description,omitempty"`
   766  	// DisplayName: Required. Display name for the price list, section, or item.
   767  	DisplayName string `json:"displayName,omitempty"`
   768  	// LanguageCode: Optional. The BCP-47 language code that these strings apply
   769  	// for. Only one set of labels may be set per language.
   770  	LanguageCode string `json:"languageCode,omitempty"`
   771  	// ForceSendFields is a list of field names (e.g. "Description") to
   772  	// unconditionally include in API requests. By default, fields with empty or
   773  	// default values are omitted from API requests. See
   774  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   775  	// details.
   776  	ForceSendFields []string `json:"-"`
   777  	// NullFields is a list of field names (e.g. "Description") to include in API
   778  	// requests with the JSON null value. By default, fields with empty values are
   779  	// omitted from API requests. See
   780  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   781  	NullFields []string `json:"-"`
   782  }
   783  
   784  func (s *Label) MarshalJSON() ([]byte, error) {
   785  	type NoMethod Label
   786  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   787  }
   788  
   789  // LatLng: An object that represents a latitude/longitude pair. This is
   790  // expressed as a pair of doubles to represent degrees latitude and degrees
   791  // longitude. Unless specified otherwise, this object must conform to the WGS84
   792  // standard. Values must be within normalized ranges.
   793  type LatLng struct {
   794  	// Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0].
   795  	Latitude float64 `json:"latitude,omitempty"`
   796  	// Longitude: The longitude in degrees. It must be in the range [-180.0,
   797  	// +180.0].
   798  	Longitude float64 `json:"longitude,omitempty"`
   799  	// ForceSendFields is a list of field names (e.g. "Latitude") to
   800  	// unconditionally include in API requests. By default, fields with empty or
   801  	// default values are omitted from API requests. See
   802  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   803  	// details.
   804  	ForceSendFields []string `json:"-"`
   805  	// NullFields is a list of field names (e.g. "Latitude") to include in API
   806  	// requests with the JSON null value. By default, fields with empty values are
   807  	// omitted from API requests. See
   808  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   809  	NullFields []string `json:"-"`
   810  }
   811  
   812  func (s *LatLng) MarshalJSON() ([]byte, error) {
   813  	type NoMethod LatLng
   814  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   815  }
   816  
   817  func (s *LatLng) UnmarshalJSON(data []byte) error {
   818  	type NoMethod LatLng
   819  	var s1 struct {
   820  		Latitude  gensupport.JSONFloat64 `json:"latitude"`
   821  		Longitude gensupport.JSONFloat64 `json:"longitude"`
   822  		*NoMethod
   823  	}
   824  	s1.NoMethod = (*NoMethod)(s)
   825  	if err := json.Unmarshal(data, &s1); err != nil {
   826  		return err
   827  	}
   828  	s.Latitude = float64(s1.Latitude)
   829  	s.Longitude = float64(s1.Longitude)
   830  	return nil
   831  }
   832  
   833  // ListAttributeMetadataResponse: Response for
   834  // AttributesService.ListAttributeMetadata.
   835  type ListAttributeMetadataResponse struct {
   836  	// AttributeMetadata: A collection of attribute metadata for the available
   837  	// attributes.
   838  	AttributeMetadata []*AttributeMetadata `json:"attributeMetadata,omitempty"`
   839  	// NextPageToken: If the number of attributes exceeded the requested page size,
   840  	// this field will be populated with a token to fetch the next page of
   841  	// attributes on a subsequent call to `attributes.list`. If there are no more
   842  	// attributes, this field will not be present in the response.
   843  	NextPageToken string `json:"nextPageToken,omitempty"`
   844  
   845  	// ServerResponse contains the HTTP response code and headers from the server.
   846  	googleapi.ServerResponse `json:"-"`
   847  	// ForceSendFields is a list of field names (e.g. "AttributeMetadata") to
   848  	// unconditionally include in API requests. By default, fields with empty or
   849  	// default values are omitted from API requests. See
   850  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   851  	// details.
   852  	ForceSendFields []string `json:"-"`
   853  	// NullFields is a list of field names (e.g. "AttributeMetadata") to include in
   854  	// API requests with the JSON null value. By default, fields with empty values
   855  	// are omitted from API requests. See
   856  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   857  	NullFields []string `json:"-"`
   858  }
   859  
   860  func (s *ListAttributeMetadataResponse) MarshalJSON() ([]byte, error) {
   861  	type NoMethod ListAttributeMetadataResponse
   862  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   863  }
   864  
   865  // ListCategoriesResponse: Response message for
   866  // BusinessCategories.ListCategories.
   867  type ListCategoriesResponse struct {
   868  	// Categories: The matching categories based on the requested parameters.
   869  	Categories []*Category `json:"categories,omitempty"`
   870  	// NextPageToken: If the number of categories exceeded the requested page size,
   871  	// this field will be populated with a token to fetch the next page of
   872  	// categories on a subsequent call to `ListCategories`.
   873  	NextPageToken string `json:"nextPageToken,omitempty"`
   874  
   875  	// ServerResponse contains the HTTP response code and headers from the server.
   876  	googleapi.ServerResponse `json:"-"`
   877  	// ForceSendFields is a list of field names (e.g. "Categories") to
   878  	// unconditionally include in API requests. By default, fields with empty or
   879  	// default values are omitted from API requests. See
   880  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   881  	// details.
   882  	ForceSendFields []string `json:"-"`
   883  	// NullFields is a list of field names (e.g. "Categories") to include in API
   884  	// requests with the JSON null value. By default, fields with empty values are
   885  	// omitted from API requests. See
   886  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   887  	NullFields []string `json:"-"`
   888  }
   889  
   890  func (s *ListCategoriesResponse) MarshalJSON() ([]byte, error) {
   891  	type NoMethod ListCategoriesResponse
   892  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   893  }
   894  
   895  // ListLocationsResponse: Response message for Locations.ListLocations.
   896  type ListLocationsResponse struct {
   897  	// Locations: The locations.
   898  	Locations []*Location `json:"locations,omitempty"`
   899  	// NextPageToken: If the number of locations exceeded the requested page size,
   900  	// this field is populated with a token to fetch the next page of locations on
   901  	// a subsequent call to `ListLocations`. If there are no more locations, this
   902  	// field is not present in the response.
   903  	NextPageToken string `json:"nextPageToken,omitempty"`
   904  	// TotalSize: The approximate number of Locations in the list irrespective of
   905  	// pagination. This field will only be returned if `filter` is used as a query
   906  	// parameter.
   907  	TotalSize int64 `json:"totalSize,omitempty"`
   908  
   909  	// ServerResponse contains the HTTP response code and headers from the server.
   910  	googleapi.ServerResponse `json:"-"`
   911  	// ForceSendFields is a list of field names (e.g. "Locations") to
   912  	// unconditionally include in API requests. By default, fields with empty or
   913  	// default values are omitted from API requests. See
   914  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   915  	// details.
   916  	ForceSendFields []string `json:"-"`
   917  	// NullFields is a list of field names (e.g. "Locations") to include in API
   918  	// requests with the JSON null value. By default, fields with empty values are
   919  	// omitted from API requests. See
   920  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   921  	NullFields []string `json:"-"`
   922  }
   923  
   924  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   925  	type NoMethod ListLocationsResponse
   926  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   927  }
   928  
   929  // Location: A location. See the [help center article]
   930  // (https://support.google.com/business/answer/3038177) for a detailed
   931  // description of these fields, or the category endpoint
   932  // (/my-business/reference/rest/v4/categories) for a list of valid business
   933  // categories.
   934  type Location struct {
   935  	// AdWordsLocationExtensions: Optional. Additional information that is surfaced
   936  	// in AdWords.
   937  	AdWordsLocationExtensions *AdWordsLocationExtensions `json:"adWordsLocationExtensions,omitempty"`
   938  	// Categories: Optional. The different categories that describe the business.
   939  	Categories *Categories `json:"categories,omitempty"`
   940  	// Labels: Optional. A collection of free-form strings to allow you to tag your
   941  	// business. These labels are NOT user facing; only you can see them. Must be
   942  	// between 1-255 characters per label.
   943  	Labels []string `json:"labels,omitempty"`
   944  	// LanguageCode: Immutable. The language of the location. Set during creation
   945  	// and not updateable.
   946  	LanguageCode string `json:"languageCode,omitempty"`
   947  	// Latlng: Optional. User-provided latitude and longitude. When creating a
   948  	// location, this field is ignored if the provided address geocodes
   949  	// successfully. This field is only returned on get requests if the
   950  	// user-provided `latlng` value was accepted during create, or the `latlng`
   951  	// value was updated through the Google Business Profile website. This field
   952  	// can only be updated by approved clients.
   953  	Latlng *LatLng `json:"latlng,omitempty"`
   954  	// Metadata: Output only. Additional non-user-editable information.
   955  	Metadata *Metadata `json:"metadata,omitempty"`
   956  	// MoreHours: Optional. More hours for a business's different departments or
   957  	// specific customers.
   958  	MoreHours []*MoreHours `json:"moreHours,omitempty"`
   959  	// Name: Google identifier for this location in the form:
   960  	// `locations/{location_id}`.
   961  	Name string `json:"name,omitempty"`
   962  	// OpenInfo: Optional. A flag that indicates whether the location is currently
   963  	// open for business.
   964  	OpenInfo *OpenInfo `json:"openInfo,omitempty"`
   965  	// PhoneNumbers: Optional. The different phone numbers that customers can use
   966  	// to get in touch with the business.
   967  	PhoneNumbers *PhoneNumbers `json:"phoneNumbers,omitempty"`
   968  	// Profile: Optional. Describes your business in your own voice and shares with
   969  	// users the unique story of your business and offerings. This field is
   970  	// required for all categories except lodging categories (e.g. hotels, motels,
   971  	// inns).
   972  	Profile *Profile `json:"profile,omitempty"`
   973  	// RegularHours: Optional. Operating hours for the business.
   974  	RegularHours *BusinessHours `json:"regularHours,omitempty"`
   975  	// RelationshipData: Optional. All locations and chain related to this one.
   976  	RelationshipData *RelationshipData `json:"relationshipData,omitempty"`
   977  	// ServiceArea: Optional. Service area businesses provide their service at the
   978  	// customer's location. If this business is a service area business, this field
   979  	// describes the area(s) serviced by the business.
   980  	ServiceArea *ServiceAreaBusiness `json:"serviceArea,omitempty"`
   981  	// ServiceItems: Optional. List of services supported by merchants. A service
   982  	// can be haircut, install water heater, etc. Duplicated service items will be
   983  	// removed automatically.
   984  	ServiceItems []*ServiceItem `json:"serviceItems,omitempty"`
   985  	// SpecialHours: Optional. Special hours for the business. This typically
   986  	// includes holiday hours, and other times outside of regular operating hours.
   987  	// These override regular business hours. This field cannot be set without
   988  	// regular hours.
   989  	SpecialHours *SpecialHours `json:"specialHours,omitempty"`
   990  	// StoreCode: Optional. External identifier for this location, which must be
   991  	// unique within a given account. This is a means of associating the location
   992  	// with your own records.
   993  	StoreCode string `json:"storeCode,omitempty"`
   994  	// StorefrontAddress: Optional. A precise, accurate address to describe your
   995  	// business location. PO boxes or mailboxes located at remote locations are not
   996  	// acceptable. At this time, you can specify a maximum of five `address_lines`
   997  	// values in the address. This field should only be set for businesses that
   998  	// have a storefront. This field should not be set for locations of type
   999  	// `CUSTOMER_LOCATION_ONLY` but if set, any value provided will be discarded.
  1000  	StorefrontAddress *PostalAddress `json:"storefrontAddress,omitempty"`
  1001  	// Title: Required. Location name should reflect your business's real-world
  1002  	// name, as used consistently on your storefront, website, and stationery, and
  1003  	// as known to customers. Any additional information, when relevant, can be
  1004  	// included in other fields of the resource (for example, `Address`,
  1005  	// `Categories`). Don't add unnecessary information to your name (for example,
  1006  	// prefer "Google" over "Google Inc. - Mountain View Corporate Headquarters").
  1007  	// Don't include marketing taglines, store codes, special characters, hours or
  1008  	// closed/open status, phone numbers, website URLs, service/product
  1009  	// information, location/address or directions, or containment information (for
  1010  	// example, "Chase ATM in Duane Reade").
  1011  	Title string `json:"title,omitempty"`
  1012  	// WebsiteUri: Optional. A URL for this business. If possible, use a URL that
  1013  	// represents this individual business location instead of a generic
  1014  	// website/URL that represents all locations, or the brand.
  1015  	WebsiteUri string `json:"websiteUri,omitempty"`
  1016  
  1017  	// ServerResponse contains the HTTP response code and headers from the server.
  1018  	googleapi.ServerResponse `json:"-"`
  1019  	// ForceSendFields is a list of field names (e.g. "AdWordsLocationExtensions")
  1020  	// to unconditionally include in API requests. By default, fields with empty or
  1021  	// default values are omitted from API requests. See
  1022  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1023  	// details.
  1024  	ForceSendFields []string `json:"-"`
  1025  	// NullFields is a list of field names (e.g. "AdWordsLocationExtensions") to
  1026  	// include in API requests with the JSON null value. By default, fields with
  1027  	// empty values are omitted from API requests. See
  1028  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1029  	NullFields []string `json:"-"`
  1030  }
  1031  
  1032  func (s *Location) MarshalJSON() ([]byte, error) {
  1033  	type NoMethod Location
  1034  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1035  }
  1036  
  1037  // Metadata: Additional non-user-editable information about the location.
  1038  type Metadata struct {
  1039  	// CanDelete: Output only. Indicates whether the location can be deleted using
  1040  	// the API.
  1041  	CanDelete bool `json:"canDelete,omitempty"`
  1042  	// CanHaveBusinessCalls: Output only. Indicates if the listing is eligible for
  1043  	// business calls.
  1044  	CanHaveBusinessCalls bool `json:"canHaveBusinessCalls,omitempty"`
  1045  	// CanHaveFoodMenus: Output only. Indicates if the listing is eligible for food
  1046  	// menu.
  1047  	CanHaveFoodMenus bool `json:"canHaveFoodMenus,omitempty"`
  1048  	// CanModifyServiceList: Output only. Indicates if the listing can modify the
  1049  	// service list.
  1050  	CanModifyServiceList bool `json:"canModifyServiceList,omitempty"`
  1051  	// CanOperateHealthData: Output only. Indicates whether the location can
  1052  	// operate on Health data.
  1053  	CanOperateHealthData bool `json:"canOperateHealthData,omitempty"`
  1054  	// CanOperateLocalPost: Output only. Indicates if the listing can manage local
  1055  	// posts.
  1056  	CanOperateLocalPost bool `json:"canOperateLocalPost,omitempty"`
  1057  	// CanOperateLodgingData: Output only. Indicates whether the location can
  1058  	// operate on Lodging data.
  1059  	CanOperateLodgingData bool `json:"canOperateLodgingData,omitempty"`
  1060  	// DuplicateLocation: Output only. The location resource that this location
  1061  	// duplicates.
  1062  	DuplicateLocation string `json:"duplicateLocation,omitempty"`
  1063  	// HasGoogleUpdated: Output only. Indicates whether the place ID associated
  1064  	// with this location has updates that need to be updated or rejected by the
  1065  	// client. If this boolean is set, you should call the `getGoogleUpdated`
  1066  	// method to lookup information that's needs to be verified.
  1067  	HasGoogleUpdated bool `json:"hasGoogleUpdated,omitempty"`
  1068  	// HasPendingEdits: Output only. Indicates whether any of this Location's
  1069  	// properties are in the edit pending state.
  1070  	HasPendingEdits bool `json:"hasPendingEdits,omitempty"`
  1071  	// HasVoiceOfMerchant: Output only. Indicates if the listing has Voice of
  1072  	// Merchant. If this boolean is false, you should call the
  1073  	// locations.getVoiceOfMerchantState API to get details as to why they do not
  1074  	// have Voice of Merchant.
  1075  	HasVoiceOfMerchant bool `json:"hasVoiceOfMerchant,omitempty"`
  1076  	// MapsUri: Output only. A link to the location on Maps.
  1077  	MapsUri string `json:"mapsUri,omitempty"`
  1078  	// NewReviewUri: Output only. A link to the page on Google Search where a
  1079  	// customer can leave a review for the location.
  1080  	NewReviewUri string `json:"newReviewUri,omitempty"`
  1081  	// PlaceId: Output only. If this locationappears on Google Maps, this field is
  1082  	// populated with the place ID for the location. This ID can be used in various
  1083  	// Places APIs. This field can be set during Create calls, but not for Update.
  1084  	PlaceId string `json:"placeId,omitempty"`
  1085  	// ForceSendFields is a list of field names (e.g. "CanDelete") to
  1086  	// unconditionally include in API requests. By default, fields with empty or
  1087  	// default values are omitted from API requests. See
  1088  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1089  	// details.
  1090  	ForceSendFields []string `json:"-"`
  1091  	// NullFields is a list of field names (e.g. "CanDelete") to include in API
  1092  	// requests with the JSON null value. By default, fields with empty values are
  1093  	// omitted from API requests. See
  1094  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1095  	NullFields []string `json:"-"`
  1096  }
  1097  
  1098  func (s *Metadata) MarshalJSON() ([]byte, error) {
  1099  	type NoMethod Metadata
  1100  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1101  }
  1102  
  1103  // Money: Represents an amount of money with its currency type.
  1104  type Money struct {
  1105  	// CurrencyCode: The three-letter currency code defined in ISO 4217.
  1106  	CurrencyCode string `json:"currencyCode,omitempty"`
  1107  	// Nanos: Number of nano (10^-9) units of the amount. The value must be between
  1108  	// -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
  1109  	// must be positive or zero. If `units` is zero, `nanos` can be positive, zero,
  1110  	// or negative. If `units` is negative, `nanos` must be negative or zero. For
  1111  	// example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
  1112  	Nanos int64 `json:"nanos,omitempty"`
  1113  	// Units: The whole units of the amount. For example if `currencyCode` is
  1114  	// "USD", then 1 unit is one US dollar.
  1115  	Units int64 `json:"units,omitempty,string"`
  1116  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  1117  	// unconditionally include in API requests. By default, fields with empty or
  1118  	// default values are omitted from API requests. See
  1119  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1120  	// details.
  1121  	ForceSendFields []string `json:"-"`
  1122  	// NullFields is a list of field names (e.g. "CurrencyCode") to include in API
  1123  	// requests with the JSON null value. By default, fields with empty values are
  1124  	// omitted from API requests. See
  1125  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1126  	NullFields []string `json:"-"`
  1127  }
  1128  
  1129  func (s *Money) MarshalJSON() ([]byte, error) {
  1130  	type NoMethod Money
  1131  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1132  }
  1133  
  1134  // MoreHours: The time periods during which a location is open for certain
  1135  // types of business.
  1136  type MoreHours struct {
  1137  	// HoursTypeId: Required. Type of hours. Clients should call {#link
  1138  	// businessCategories:BatchGet} to get supported hours types for categories of
  1139  	// their locations.
  1140  	HoursTypeId string `json:"hoursTypeId,omitempty"`
  1141  	// Periods: Required. A collection of times that this location is open. Each
  1142  	// period represents a range of hours when the location is open during the
  1143  	// week.
  1144  	Periods []*TimePeriod `json:"periods,omitempty"`
  1145  	// ForceSendFields is a list of field names (e.g. "HoursTypeId") to
  1146  	// unconditionally include in API requests. By default, fields with empty or
  1147  	// default values are omitted from API requests. See
  1148  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1149  	// details.
  1150  	ForceSendFields []string `json:"-"`
  1151  	// NullFields is a list of field names (e.g. "HoursTypeId") to include in API
  1152  	// requests with the JSON null value. By default, fields with empty values are
  1153  	// omitted from API requests. See
  1154  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1155  	NullFields []string `json:"-"`
  1156  }
  1157  
  1158  func (s *MoreHours) MarshalJSON() ([]byte, error) {
  1159  	type NoMethod MoreHours
  1160  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1161  }
  1162  
  1163  // MoreHoursType: More hours types that a business can offers, in addition to
  1164  // its regular hours.
  1165  type MoreHoursType struct {
  1166  	// DisplayName: Output only. The human-readable English display name for the
  1167  	// hours type.
  1168  	DisplayName string `json:"displayName,omitempty"`
  1169  	// HoursTypeId: Output only. A stable ID provided by Google for this hours
  1170  	// type.
  1171  	HoursTypeId string `json:"hoursTypeId,omitempty"`
  1172  	// LocalizedDisplayName: Output only. The human-readable localized display name
  1173  	// for the hours type.
  1174  	LocalizedDisplayName string `json:"localizedDisplayName,omitempty"`
  1175  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1176  	// unconditionally include in API requests. By default, fields with empty or
  1177  	// default values are omitted from API requests. See
  1178  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1179  	// details.
  1180  	ForceSendFields []string `json:"-"`
  1181  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1182  	// requests with the JSON null value. By default, fields with empty values are
  1183  	// omitted from API requests. See
  1184  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1185  	NullFields []string `json:"-"`
  1186  }
  1187  
  1188  func (s *MoreHoursType) MarshalJSON() ([]byte, error) {
  1189  	type NoMethod MoreHoursType
  1190  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1191  }
  1192  
  1193  // OpenInfo: Information related to the opening state of the business.
  1194  type OpenInfo struct {
  1195  	// CanReopen: Output only. Indicates whether this business is eligible for
  1196  	// re-open.
  1197  	CanReopen bool `json:"canReopen,omitempty"`
  1198  	// OpeningDate: Optional. The date on which the location first opened. If the
  1199  	// exact day is not known, month and year only can be provided. The date must
  1200  	// be in the past or be no more than one year in the future.
  1201  	OpeningDate *Date `json:"openingDate,omitempty"`
  1202  	// Status: Required. Indicates whether or not the Location is currently open
  1203  	// for business. All locations are open by default, unless updated to be
  1204  	// closed.
  1205  	//
  1206  	// Possible values:
  1207  	//   "OPEN_FOR_BUSINESS_UNSPECIFIED" - Not specified.
  1208  	//   "OPEN" - Indicates that the location is open.
  1209  	//   "CLOSED_PERMANENTLY" - Indicates that the location has been permanently
  1210  	// closed.
  1211  	//   "CLOSED_TEMPORARILY" - Indicates that the location has been temporarily
  1212  	// closed.
  1213  	Status string `json:"status,omitempty"`
  1214  	// ForceSendFields is a list of field names (e.g. "CanReopen") to
  1215  	// unconditionally include in API requests. By default, fields with empty or
  1216  	// default values are omitted from API requests. See
  1217  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1218  	// details.
  1219  	ForceSendFields []string `json:"-"`
  1220  	// NullFields is a list of field names (e.g. "CanReopen") to include in API
  1221  	// requests with the JSON null value. By default, fields with empty values are
  1222  	// omitted from API requests. See
  1223  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1224  	NullFields []string `json:"-"`
  1225  }
  1226  
  1227  func (s *OpenInfo) MarshalJSON() ([]byte, error) {
  1228  	type NoMethod OpenInfo
  1229  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1230  }
  1231  
  1232  // PhoneNumbers: A collection of phone numbers for the business. During
  1233  // updates, both fields must be set. Clients may not update just the primary or
  1234  // additional phone numbers using the update mask. International phone format
  1235  // is preferred, such as "+1 415 555 0132", see more in
  1236  // (https://developers.google.com/style/phone-numbers#international-phone-numbers).
  1237  type PhoneNumbers struct {
  1238  	// AdditionalPhones: Optional. Up to two phone numbers (mobile or landline, no
  1239  	// fax) at which your business can be called, in addition to your primary phone
  1240  	// number.
  1241  	AdditionalPhones []string `json:"additionalPhones,omitempty"`
  1242  	// PrimaryPhone: Required. A phone number that connects to your individual
  1243  	// business location as directly as possible. Use a local phone number instead
  1244  	// of a central, call center helpline number whenever possible.
  1245  	PrimaryPhone string `json:"primaryPhone,omitempty"`
  1246  	// ForceSendFields is a list of field names (e.g. "AdditionalPhones") to
  1247  	// unconditionally include in API requests. By default, fields with empty or
  1248  	// default values are omitted from API requests. See
  1249  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1250  	// details.
  1251  	ForceSendFields []string `json:"-"`
  1252  	// NullFields is a list of field names (e.g. "AdditionalPhones") to include in
  1253  	// API requests with the JSON null value. By default, fields with empty values
  1254  	// are omitted from API requests. See
  1255  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1256  	NullFields []string `json:"-"`
  1257  }
  1258  
  1259  func (s *PhoneNumbers) MarshalJSON() ([]byte, error) {
  1260  	type NoMethod PhoneNumbers
  1261  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1262  }
  1263  
  1264  // PlaceInfo: Defines an area that's represented by a place ID.
  1265  type PlaceInfo struct {
  1266  	// PlaceId: Required. The ID of the place. Must correspond to a region.
  1267  	// (https://developers.google.com/places/web-service/supported_types#table3)
  1268  	PlaceId string `json:"placeId,omitempty"`
  1269  	// PlaceName: Required. The localized name of the place. For example,
  1270  	// `Scottsdale, AZ`.
  1271  	PlaceName string `json:"placeName,omitempty"`
  1272  	// ForceSendFields is a list of field names (e.g. "PlaceId") to unconditionally
  1273  	// include in API requests. By default, fields with empty or default values are
  1274  	// omitted from API requests. See
  1275  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1276  	// details.
  1277  	ForceSendFields []string `json:"-"`
  1278  	// NullFields is a list of field names (e.g. "PlaceId") to include in API
  1279  	// requests with the JSON null value. By default, fields with empty values are
  1280  	// omitted from API requests. See
  1281  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1282  	NullFields []string `json:"-"`
  1283  }
  1284  
  1285  func (s *PlaceInfo) MarshalJSON() ([]byte, error) {
  1286  	type NoMethod PlaceInfo
  1287  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1288  }
  1289  
  1290  // Places: Defines the union of areas represented by a set of places.
  1291  type Places struct {
  1292  	// PlaceInfos: The areas represented by place IDs. Limited to a maximum of 20
  1293  	// places.
  1294  	PlaceInfos []*PlaceInfo `json:"placeInfos,omitempty"`
  1295  	// ForceSendFields is a list of field names (e.g. "PlaceInfos") to
  1296  	// unconditionally include in API requests. By default, fields with empty or
  1297  	// default values are omitted from API requests. See
  1298  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1299  	// details.
  1300  	ForceSendFields []string `json:"-"`
  1301  	// NullFields is a list of field names (e.g. "PlaceInfos") to include in API
  1302  	// requests with the JSON null value. By default, fields with empty values are
  1303  	// omitted from API requests. See
  1304  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1305  	NullFields []string `json:"-"`
  1306  }
  1307  
  1308  func (s *Places) MarshalJSON() ([]byte, error) {
  1309  	type NoMethod Places
  1310  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1311  }
  1312  
  1313  // PostalAddress: Represents a postal address, e.g. for postal delivery or
  1314  // payments addresses. Given a postal address, a postal service can deliver
  1315  // items to a premise, P.O. Box or similar. It is not intended to model
  1316  // geographical locations (roads, towns, mountains). In typical usage an
  1317  // address would be created via user input or from importing existing data,
  1318  // depending on the type of process. Advice on address input / editing: - Use
  1319  // an internationalization-ready address widget such as
  1320  // https://github.com/google/libaddressinput) - Users should not be presented
  1321  // with UI elements for input or editing of fields outside countries where that
  1322  // field is used. For more guidance on how to use this schema, please see:
  1323  // https://support.google.com/business/answer/6397478
  1324  type PostalAddress struct {
  1325  	// AddressLines: Unstructured address lines describing the lower levels of an
  1326  	// address. Because values in address_lines do not have type information and
  1327  	// may sometimes contain multiple values in a single field (e.g. "Austin, TX"),
  1328  	// it is important that the line order is clear. The order of address lines
  1329  	// should be "envelope order" for the country/region of the address. In places
  1330  	// where this can vary (e.g. Japan), address_language is used to make it
  1331  	// explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for
  1332  	// small-to-large). This way, the most specific line of an address can be
  1333  	// selected based on the language. The minimum permitted structural
  1334  	// representation of an address consists of a region_code with all remaining
  1335  	// information placed in the address_lines. It would be possible to format such
  1336  	// an address very approximately without geocoding, but no semantic reasoning
  1337  	// could be made about any of the address components until it was at least
  1338  	// partially resolved. Creating an address only containing a region_code and
  1339  	// address_lines, and then geocoding is the recommended way to handle
  1340  	// completely unstructured addresses (as opposed to guessing which parts of the
  1341  	// address should be localities or administrative areas).
  1342  	AddressLines []string `json:"addressLines,omitempty"`
  1343  	// AdministrativeArea: Optional. Highest administrative subdivision which is
  1344  	// used for postal addresses of a country or region. For example, this can be a
  1345  	// state, a province, an oblast, or a prefecture. Specifically, for Spain this
  1346  	// is the province and not the autonomous community (e.g. "Barcelona" and not
  1347  	// "Catalonia"). Many countries don't use an administrative area in postal
  1348  	// addresses. E.g. in Switzerland this should be left unpopulated.
  1349  	AdministrativeArea string `json:"administrativeArea,omitempty"`
  1350  	// LanguageCode: Optional. BCP-47 language code of the contents of this address
  1351  	// (if known). This is often the UI language of the input form or is expected
  1352  	// to match one of the languages used in the address' country/region, or their
  1353  	// transliterated equivalents. This can affect formatting in certain countries,
  1354  	// but is not critical to the correctness of the data and will never affect any
  1355  	// validation or other non-formatting related operations. If this value is not
  1356  	// known, it should be omitted (rather than specifying a possibly incorrect
  1357  	// default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
  1358  	LanguageCode string `json:"languageCode,omitempty"`
  1359  	// Locality: Optional. Generally refers to the city/town portion of the
  1360  	// address. Examples: US city, IT comune, UK post town. In regions of the world
  1361  	// where localities are not well defined or do not fit into this structure
  1362  	// well, leave locality empty and use address_lines.
  1363  	Locality string `json:"locality,omitempty"`
  1364  	// Organization: Optional. The name of the organization at the address.
  1365  	Organization string `json:"organization,omitempty"`
  1366  	// PostalCode: Optional. Postal code of the address. Not all countries use or
  1367  	// require postal codes to be present, but where they are used, they may
  1368  	// trigger additional validation with other parts of the address (e.g.
  1369  	// state/zip validation in the U.S.A.).
  1370  	PostalCode string `json:"postalCode,omitempty"`
  1371  	// Recipients: Optional. The recipient at the address. This field may, under
  1372  	// certain circumstances, contain multiline information. For example, it might
  1373  	// contain "care of" information.
  1374  	Recipients []string `json:"recipients,omitempty"`
  1375  	// RegionCode: Required. CLDR region code of the country/region of the address.
  1376  	// This is never inferred and it is up to the user to ensure the value is
  1377  	// correct. See https://cldr.unicode.org/ and
  1378  	// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
  1379  	// for details. Example: "CH" for Switzerland.
  1380  	RegionCode string `json:"regionCode,omitempty"`
  1381  	// Revision: The schema revision of the `PostalAddress`. This must be set to 0,
  1382  	// which is the latest revision. All new revisions **must** be backward
  1383  	// compatible with old revisions.
  1384  	Revision int64 `json:"revision,omitempty"`
  1385  	// SortingCode: Optional. Additional, country-specific, sorting code. This is
  1386  	// not used in most regions. Where it is used, the value is either a string
  1387  	// like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a
  1388  	// number alone, representing the "sector code" (Jamaica), "delivery area
  1389  	// indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
  1390  	SortingCode string `json:"sortingCode,omitempty"`
  1391  	// Sublocality: Optional. Sublocality of the address. For example, this can be
  1392  	// neighborhoods, boroughs, districts.
  1393  	Sublocality string `json:"sublocality,omitempty"`
  1394  	// ForceSendFields is a list of field names (e.g. "AddressLines") to
  1395  	// unconditionally include in API requests. By default, fields with empty or
  1396  	// default values are omitted from API requests. See
  1397  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1398  	// details.
  1399  	ForceSendFields []string `json:"-"`
  1400  	// NullFields is a list of field names (e.g. "AddressLines") to include in API
  1401  	// requests with the JSON null value. By default, fields with empty values are
  1402  	// omitted from API requests. See
  1403  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1404  	NullFields []string `json:"-"`
  1405  }
  1406  
  1407  func (s *PostalAddress) MarshalJSON() ([]byte, error) {
  1408  	type NoMethod PostalAddress
  1409  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1410  }
  1411  
  1412  // Profile: All information pertaining to the location's profile.
  1413  type Profile struct {
  1414  	// Description: Required. Description of the location in your own voice, not
  1415  	// editable by anyone else.
  1416  	Description string `json:"description,omitempty"`
  1417  	// ForceSendFields is a list of field names (e.g. "Description") to
  1418  	// unconditionally include in API requests. By default, fields with empty or
  1419  	// default values are omitted from API requests. See
  1420  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1421  	// details.
  1422  	ForceSendFields []string `json:"-"`
  1423  	// NullFields is a list of field names (e.g. "Description") to include in API
  1424  	// requests with the JSON null value. By default, fields with empty values are
  1425  	// omitted from API requests. See
  1426  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1427  	NullFields []string `json:"-"`
  1428  }
  1429  
  1430  func (s *Profile) MarshalJSON() ([]byte, error) {
  1431  	type NoMethod Profile
  1432  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1433  }
  1434  
  1435  // RelationshipData: Information of all parent and children locations related
  1436  // to this one.
  1437  type RelationshipData struct {
  1438  	// ChildrenLocations: The list of children locations that this location has
  1439  	// relations with.
  1440  	ChildrenLocations []*RelevantLocation `json:"childrenLocations,omitempty"`
  1441  	// ParentChain: The resource name of the Chain that this location is member of.
  1442  	// How to find Chain ID
  1443  	ParentChain string `json:"parentChain,omitempty"`
  1444  	// ParentLocation: The parent location that this location has relations with.
  1445  	ParentLocation *RelevantLocation `json:"parentLocation,omitempty"`
  1446  	// ForceSendFields is a list of field names (e.g. "ChildrenLocations") to
  1447  	// unconditionally include in API requests. By default, fields with empty or
  1448  	// default values are omitted from API requests. See
  1449  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1450  	// details.
  1451  	ForceSendFields []string `json:"-"`
  1452  	// NullFields is a list of field names (e.g. "ChildrenLocations") to include in
  1453  	// API requests with the JSON null value. By default, fields with empty values
  1454  	// are omitted from API requests. See
  1455  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1456  	NullFields []string `json:"-"`
  1457  }
  1458  
  1459  func (s *RelationshipData) MarshalJSON() ([]byte, error) {
  1460  	type NoMethod RelationshipData
  1461  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1462  }
  1463  
  1464  // RelevantLocation: Information about another location that is related to
  1465  // current one. The relation can be any one of DEPARTMENT_OF or
  1466  // INDEPENDENT_ESTABLISHMENT_OF, and the location specified here can be on
  1467  // either side (parent/child) of the location.
  1468  type RelevantLocation struct {
  1469  	// PlaceId: Required. Specify the location that is on the other side of the
  1470  	// relation by its placeID.
  1471  	PlaceId string `json:"placeId,omitempty"`
  1472  	// RelationType: Required. The type of the relationship.
  1473  	//
  1474  	// Possible values:
  1475  	//   "RELATION_TYPE_UNSPECIFIED" - Type unspecified.
  1476  	//   "DEPARTMENT_OF" - This represents a relation between 2 locations which
  1477  	// share one physical area, same brand/upper management/organization, but with
  1478  	// different key attributes like store hours or phone numbers. For example,
  1479  	// Costco Pharmacy is a department in Costco Wholesale.
  1480  	//   "INDEPENDENT_ESTABLISHMENT_IN" - This represents the cases where 2
  1481  	// locations are co-located in the same physical location, but from different
  1482  	// companies (e.g. Starbucks in a Safeway, shops in a mall).
  1483  	RelationType string `json:"relationType,omitempty"`
  1484  	// ForceSendFields is a list of field names (e.g. "PlaceId") to unconditionally
  1485  	// include in API requests. By default, fields with empty or default values are
  1486  	// omitted from API requests. See
  1487  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1488  	// details.
  1489  	ForceSendFields []string `json:"-"`
  1490  	// NullFields is a list of field names (e.g. "PlaceId") to include in API
  1491  	// requests with the JSON null value. By default, fields with empty values are
  1492  	// omitted from API requests. See
  1493  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1494  	NullFields []string `json:"-"`
  1495  }
  1496  
  1497  func (s *RelevantLocation) MarshalJSON() ([]byte, error) {
  1498  	type NoMethod RelevantLocation
  1499  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1500  }
  1501  
  1502  // RepeatedEnumAttributeValue: Values for an attribute with a `value_type` of
  1503  // REPEATED_ENUM. This consists of two lists of value IDs: those that are set
  1504  // (true) and those that are unset (false). Values absent are considered
  1505  // unknown. At least one value must be specified.
  1506  type RepeatedEnumAttributeValue struct {
  1507  	// SetValues: Enum values that are set.
  1508  	SetValues []string `json:"setValues,omitempty"`
  1509  	// UnsetValues: Enum values that are unset.
  1510  	UnsetValues []string `json:"unsetValues,omitempty"`
  1511  	// ForceSendFields is a list of field names (e.g. "SetValues") to
  1512  	// unconditionally include in API requests. By default, fields with empty or
  1513  	// default values are omitted from API requests. See
  1514  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1515  	// details.
  1516  	ForceSendFields []string `json:"-"`
  1517  	// NullFields is a list of field names (e.g. "SetValues") to include in API
  1518  	// requests with the JSON null value. By default, fields with empty values are
  1519  	// omitted from API requests. See
  1520  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1521  	NullFields []string `json:"-"`
  1522  }
  1523  
  1524  func (s *RepeatedEnumAttributeValue) MarshalJSON() ([]byte, error) {
  1525  	type NoMethod RepeatedEnumAttributeValue
  1526  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1527  }
  1528  
  1529  // SearchChainsResponse: Response message for Locations.SearchChains.
  1530  type SearchChainsResponse struct {
  1531  	// Chains: Chains that match the queried chain_display_name in
  1532  	// SearchChainsRequest. If there are no matches, this field will be empty.
  1533  	// Results are listed in order of relevance.
  1534  	Chains []*Chain `json:"chains,omitempty"`
  1535  
  1536  	// ServerResponse contains the HTTP response code and headers from the server.
  1537  	googleapi.ServerResponse `json:"-"`
  1538  	// ForceSendFields is a list of field names (e.g. "Chains") to unconditionally
  1539  	// include in API requests. By default, fields with empty or default values are
  1540  	// omitted from API requests. See
  1541  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1542  	// details.
  1543  	ForceSendFields []string `json:"-"`
  1544  	// NullFields is a list of field names (e.g. "Chains") to include in API
  1545  	// requests with the JSON null value. By default, fields with empty values are
  1546  	// omitted from API requests. See
  1547  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1548  	NullFields []string `json:"-"`
  1549  }
  1550  
  1551  func (s *SearchChainsResponse) MarshalJSON() ([]byte, error) {
  1552  	type NoMethod SearchChainsResponse
  1553  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1554  }
  1555  
  1556  // SearchGoogleLocationsRequest: Request message for
  1557  // GoogleLocations.SearchGoogleLocations.
  1558  type SearchGoogleLocationsRequest struct {
  1559  	// Location: Location to search for. If provided, will find locations which
  1560  	// match the provided location details.
  1561  	Location *Location `json:"location,omitempty"`
  1562  	// PageSize: The number of matches to return. The default value is 3, with a
  1563  	// maximum of 10. Note that latency may increase if more are requested. There
  1564  	// is no pagination.
  1565  	PageSize int64 `json:"pageSize,omitempty"`
  1566  	// Query: Text query to search for. The search results from a query string will
  1567  	// be less accurate than if providing an exact location, but can provide more
  1568  	// inexact matches.
  1569  	Query string `json:"query,omitempty"`
  1570  	// ForceSendFields is a list of field names (e.g. "Location") to
  1571  	// unconditionally include in API requests. By default, fields with empty or
  1572  	// default values are omitted from API requests. See
  1573  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1574  	// details.
  1575  	ForceSendFields []string `json:"-"`
  1576  	// NullFields is a list of field names (e.g. "Location") to include in API
  1577  	// requests with the JSON null value. By default, fields with empty values are
  1578  	// omitted from API requests. See
  1579  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1580  	NullFields []string `json:"-"`
  1581  }
  1582  
  1583  func (s *SearchGoogleLocationsRequest) MarshalJSON() ([]byte, error) {
  1584  	type NoMethod SearchGoogleLocationsRequest
  1585  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1586  }
  1587  
  1588  // SearchGoogleLocationsResponse: Response message for
  1589  // GoogleLocations.SearchGoogleLocations.
  1590  type SearchGoogleLocationsResponse struct {
  1591  	// GoogleLocations: A collection of GoogleLocations that are potential matches
  1592  	// to the specified request, listed in order from most to least accuracy.
  1593  	GoogleLocations []*GoogleLocation `json:"googleLocations,omitempty"`
  1594  
  1595  	// ServerResponse contains the HTTP response code and headers from the server.
  1596  	googleapi.ServerResponse `json:"-"`
  1597  	// ForceSendFields is a list of field names (e.g. "GoogleLocations") to
  1598  	// unconditionally include in API requests. By default, fields with empty or
  1599  	// default values are omitted from API requests. See
  1600  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1601  	// details.
  1602  	ForceSendFields []string `json:"-"`
  1603  	// NullFields is a list of field names (e.g. "GoogleLocations") to include in
  1604  	// API requests with the JSON null value. By default, fields with empty values
  1605  	// are omitted from API requests. See
  1606  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1607  	NullFields []string `json:"-"`
  1608  }
  1609  
  1610  func (s *SearchGoogleLocationsResponse) MarshalJSON() ([]byte, error) {
  1611  	type NoMethod SearchGoogleLocationsResponse
  1612  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1613  }
  1614  
  1615  // ServiceAreaBusiness: Service area businesses provide their service at the
  1616  // customer's location (for example, a locksmith or plumber).
  1617  type ServiceAreaBusiness struct {
  1618  	// BusinessType: Required. Indicates the type of the service area business.
  1619  	//
  1620  	// Possible values:
  1621  	//   "BUSINESS_TYPE_UNSPECIFIED" - Output only. Not specified.
  1622  	//   "CUSTOMER_LOCATION_ONLY" - Offers service only in the surrounding area
  1623  	// (not at the business address). If a business is being updated from a
  1624  	// CUSTOMER_AND_BUSINESS_LOCATION to a CUSTOMER_LOCATION_ONLY, the location
  1625  	// update must include field mask `storefront_address` and set the field to
  1626  	// empty.
  1627  	//   "CUSTOMER_AND_BUSINESS_LOCATION" - Offers service at the business address
  1628  	// and the surrounding area.
  1629  	BusinessType string `json:"businessType,omitempty"`
  1630  	// Places: The area that this business serves defined through a set of places.
  1631  	Places *Places `json:"places,omitempty"`
  1632  	// RegionCode: Immutable. CLDR region code of the country/region that this
  1633  	// service area business is based in. See http://cldr.unicode.org/ and
  1634  	// http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
  1635  	// for details. Example: "CH" for Switzerland. This field is required for
  1636  	// CUSTOMER_LOCATION_ONLY businesses, and is ignored otherwise. The region
  1637  	// specified here can be different from regions for the areas that this
  1638  	// business serves (e.g. service area businesses that provide services in
  1639  	// regions other than the one that they are based in). If this location
  1640  	// requires verification after creation, the address provided for verification
  1641  	// purposes *must* be located within this region, and the business owner or
  1642  	// their authorized representative *must* be able to receive postal mail at the
  1643  	// provided verification address.
  1644  	RegionCode string `json:"regionCode,omitempty"`
  1645  	// ForceSendFields is a list of field names (e.g. "BusinessType") to
  1646  	// unconditionally include in API requests. By default, fields with empty or
  1647  	// default values are omitted from API requests. See
  1648  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1649  	// details.
  1650  	ForceSendFields []string `json:"-"`
  1651  	// NullFields is a list of field names (e.g. "BusinessType") to include in API
  1652  	// requests with the JSON null value. By default, fields with empty values are
  1653  	// omitted from API requests. See
  1654  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1655  	NullFields []string `json:"-"`
  1656  }
  1657  
  1658  func (s *ServiceAreaBusiness) MarshalJSON() ([]byte, error) {
  1659  	type NoMethod ServiceAreaBusiness
  1660  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1661  }
  1662  
  1663  // ServiceItem: A message that describes a single service item. It is used to
  1664  // describe the type of service that the merchant provides. For example,
  1665  // haircut can be a service.
  1666  type ServiceItem struct {
  1667  	// FreeFormServiceItem: Optional. This field will be set case of free-form
  1668  	// services data.
  1669  	FreeFormServiceItem *FreeFormServiceItem `json:"freeFormServiceItem,omitempty"`
  1670  	// Price: Optional. Represents the monetary price of the service item. We
  1671  	// recommend that currency_code and units should be set when including a price.
  1672  	// This will be treated as a fixed price for the service item.
  1673  	Price *Money `json:"price,omitempty"`
  1674  	// StructuredServiceItem: Optional. This field will be set case of structured
  1675  	// services data.
  1676  	StructuredServiceItem *StructuredServiceItem `json:"structuredServiceItem,omitempty"`
  1677  	// ForceSendFields is a list of field names (e.g. "FreeFormServiceItem") to
  1678  	// unconditionally include in API requests. By default, fields with empty or
  1679  	// default values are omitted from API requests. See
  1680  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1681  	// details.
  1682  	ForceSendFields []string `json:"-"`
  1683  	// NullFields is a list of field names (e.g. "FreeFormServiceItem") to include
  1684  	// in API requests with the JSON null value. By default, fields with empty
  1685  	// values are omitted from API requests. See
  1686  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1687  	NullFields []string `json:"-"`
  1688  }
  1689  
  1690  func (s *ServiceItem) MarshalJSON() ([]byte, error) {
  1691  	type NoMethod ServiceItem
  1692  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1693  }
  1694  
  1695  // ServiceType: A message describing a service type that the business offers.
  1696  type ServiceType struct {
  1697  	// DisplayName: Output only. The human-readable display name for the service
  1698  	// type.
  1699  	DisplayName string `json:"displayName,omitempty"`
  1700  	// ServiceTypeId: Output only. A stable ID (provided by Google) for this
  1701  	// service type.
  1702  	ServiceTypeId string `json:"serviceTypeId,omitempty"`
  1703  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1704  	// unconditionally include in API requests. By default, fields with empty or
  1705  	// default values are omitted from API requests. See
  1706  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1707  	// details.
  1708  	ForceSendFields []string `json:"-"`
  1709  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1710  	// requests with the JSON null value. By default, fields with empty values are
  1711  	// omitted from API requests. See
  1712  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1713  	NullFields []string `json:"-"`
  1714  }
  1715  
  1716  func (s *ServiceType) MarshalJSON() ([]byte, error) {
  1717  	type NoMethod ServiceType
  1718  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1719  }
  1720  
  1721  // SpecialHourPeriod: Represents a single time period when a location's
  1722  // operational hours differ from its normal business hours. A special hour
  1723  // period must represent a range of less than 24 hours. The `open_time` and
  1724  // `start_date` must predate the `close_time` and `end_date`. The `close_time`
  1725  // and `end_date` can extend to 11:59 a.m. on the day after the specified
  1726  // `start_date`. For example, the following inputs are valid:
  1727  // start_date=2015-11-23, open_time=08:00, close_time=18:00
  1728  // start_date=2015-11-23, end_date=2015-11-23, open_time=08:00,
  1729  // close_time=18:00 start_date=2015-11-23, end_date=2015-11-24,
  1730  // open_time=13:00, close_time=11:59 The following inputs are not valid:
  1731  // start_date=2015-11-23, open_time=13:00, close_time=11:59
  1732  // start_date=2015-11-23, end_date=2015-11-24, open_time=13:00,
  1733  // close_time=12:00 start_date=2015-11-23, end_date=2015-11-25,
  1734  // open_time=08:00, close_time=18:00
  1735  type SpecialHourPeriod struct {
  1736  	// CloseTime: Optional. Valid values are 00:00-24:00, where 24:00 represents
  1737  	// midnight at the end of the specified day field. Must be specified if
  1738  	// `closed` is false.
  1739  	CloseTime *TimeOfDay `json:"closeTime,omitempty"`
  1740  	// Closed: Optional. If true, `end_date`, `open_time`, and `close_time` are
  1741  	// ignored, and the date specified in `start_date` is treated as the location
  1742  	// being closed for the entire day.
  1743  	Closed bool `json:"closed,omitempty"`
  1744  	// EndDate: Optional. The calendar date this special hour period ends on. If
  1745  	// `end_date` field is not set, default to the date specified in `start_date`.
  1746  	// If set, this field must be equal to or at most 1 day after `start_date`.
  1747  	EndDate *Date `json:"endDate,omitempty"`
  1748  	// OpenTime: Optional. Valid values are 00:00-24:00 where 24:00 represents
  1749  	// midnight at the end of the specified day field. Must be specified if
  1750  	// `closed` is false.
  1751  	OpenTime *TimeOfDay `json:"openTime,omitempty"`
  1752  	// StartDate: Required. The calendar date this special hour period starts on.
  1753  	StartDate *Date `json:"startDate,omitempty"`
  1754  	// ForceSendFields is a list of field names (e.g. "CloseTime") to
  1755  	// unconditionally include in API requests. By default, fields with empty or
  1756  	// default values are omitted from API requests. See
  1757  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1758  	// details.
  1759  	ForceSendFields []string `json:"-"`
  1760  	// NullFields is a list of field names (e.g. "CloseTime") to include in API
  1761  	// requests with the JSON null value. By default, fields with empty values are
  1762  	// omitted from API requests. See
  1763  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1764  	NullFields []string `json:"-"`
  1765  }
  1766  
  1767  func (s *SpecialHourPeriod) MarshalJSON() ([]byte, error) {
  1768  	type NoMethod SpecialHourPeriod
  1769  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1770  }
  1771  
  1772  // SpecialHours: Represents a set of time periods when a location's operational
  1773  // hours differ from its normal business hours.
  1774  type SpecialHours struct {
  1775  	// SpecialHourPeriods: Required. A list of exceptions to the business's regular
  1776  	// hours.
  1777  	SpecialHourPeriods []*SpecialHourPeriod `json:"specialHourPeriods,omitempty"`
  1778  	// ForceSendFields is a list of field names (e.g. "SpecialHourPeriods") to
  1779  	// unconditionally include in API requests. By default, fields with empty or
  1780  	// default values are omitted from API requests. See
  1781  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1782  	// details.
  1783  	ForceSendFields []string `json:"-"`
  1784  	// NullFields is a list of field names (e.g. "SpecialHourPeriods") to include
  1785  	// in API requests with the JSON null value. By default, fields with empty
  1786  	// values are omitted from API requests. See
  1787  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1788  	NullFields []string `json:"-"`
  1789  }
  1790  
  1791  func (s *SpecialHours) MarshalJSON() ([]byte, error) {
  1792  	type NoMethod SpecialHours
  1793  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1794  }
  1795  
  1796  // StructuredServiceItem: Represents a structured service offered by the
  1797  // merchant. For eg: toilet_installation.
  1798  type StructuredServiceItem struct {
  1799  	// Description: Optional. Description of structured service item. The character
  1800  	// limit is 300.
  1801  	Description string `json:"description,omitempty"`
  1802  	// ServiceTypeId: Required. The `service_type_id` field is a Google provided
  1803  	// unique ID that can be found in `ServiceType`. This information is provided
  1804  	// by `BatchGetCategories` rpc service.
  1805  	ServiceTypeId string `json:"serviceTypeId,omitempty"`
  1806  	// ForceSendFields is a list of field names (e.g. "Description") to
  1807  	// unconditionally include in API requests. By default, fields with empty or
  1808  	// default values are omitted from API requests. See
  1809  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1810  	// details.
  1811  	ForceSendFields []string `json:"-"`
  1812  	// NullFields is a list of field names (e.g. "Description") to include in API
  1813  	// requests with the JSON null value. By default, fields with empty values are
  1814  	// omitted from API requests. See
  1815  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1816  	NullFields []string `json:"-"`
  1817  }
  1818  
  1819  func (s *StructuredServiceItem) MarshalJSON() ([]byte, error) {
  1820  	type NoMethod StructuredServiceItem
  1821  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1822  }
  1823  
  1824  // TimeOfDay: Represents a time of day. The date and time zone are either not
  1825  // significant or are specified elsewhere. An API may choose to allow leap
  1826  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  1827  type TimeOfDay struct {
  1828  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  1829  	// choose to allow the value "24:00:00" for scenarios like business closing
  1830  	// time.
  1831  	Hours int64 `json:"hours,omitempty"`
  1832  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  1833  	Minutes int64 `json:"minutes,omitempty"`
  1834  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  1835  	Nanos int64 `json:"nanos,omitempty"`
  1836  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  1837  	// API may allow the value 60 if it allows leap-seconds.
  1838  	Seconds int64 `json:"seconds,omitempty"`
  1839  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  1840  	// include in API requests. By default, fields with empty or default values are
  1841  	// omitted from API requests. See
  1842  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1843  	// details.
  1844  	ForceSendFields []string `json:"-"`
  1845  	// NullFields is a list of field names (e.g. "Hours") to include in API
  1846  	// requests with the JSON null value. By default, fields with empty values are
  1847  	// omitted from API requests. See
  1848  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1849  	NullFields []string `json:"-"`
  1850  }
  1851  
  1852  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  1853  	type NoMethod TimeOfDay
  1854  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1855  }
  1856  
  1857  // TimePeriod: Represents a span of time that the business is open, starting on
  1858  // the specified open day/time and closing on the specified close day/time. The
  1859  // closing time must occur after the opening time, for example later in the
  1860  // same day, or on a subsequent day.
  1861  type TimePeriod struct {
  1862  	// CloseDay: Required. Indicates the day of the week this period ends on.
  1863  	//
  1864  	// Possible values:
  1865  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  1866  	//   "MONDAY" - Monday
  1867  	//   "TUESDAY" - Tuesday
  1868  	//   "WEDNESDAY" - Wednesday
  1869  	//   "THURSDAY" - Thursday
  1870  	//   "FRIDAY" - Friday
  1871  	//   "SATURDAY" - Saturday
  1872  	//   "SUNDAY" - Sunday
  1873  	CloseDay string `json:"closeDay,omitempty"`
  1874  	// CloseTime: Required. Valid values are 00:00-24:00, where 24:00 represents
  1875  	// midnight at the end of the specified day field.
  1876  	CloseTime *TimeOfDay `json:"closeTime,omitempty"`
  1877  	// OpenDay: Required. Indicates the day of the week this period starts on.
  1878  	//
  1879  	// Possible values:
  1880  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  1881  	//   "MONDAY" - Monday
  1882  	//   "TUESDAY" - Tuesday
  1883  	//   "WEDNESDAY" - Wednesday
  1884  	//   "THURSDAY" - Thursday
  1885  	//   "FRIDAY" - Friday
  1886  	//   "SATURDAY" - Saturday
  1887  	//   "SUNDAY" - Sunday
  1888  	OpenDay string `json:"openDay,omitempty"`
  1889  	// OpenTime: Required. Valid values are 00:00-24:00, where 24:00 represents
  1890  	// midnight at the end of the specified day field.
  1891  	OpenTime *TimeOfDay `json:"openTime,omitempty"`
  1892  	// ForceSendFields is a list of field names (e.g. "CloseDay") to
  1893  	// unconditionally include in API requests. By default, fields with empty or
  1894  	// default values are omitted from API requests. See
  1895  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1896  	// details.
  1897  	ForceSendFields []string `json:"-"`
  1898  	// NullFields is a list of field names (e.g. "CloseDay") to include in API
  1899  	// requests with the JSON null value. By default, fields with empty values are
  1900  	// omitted from API requests. See
  1901  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1902  	NullFields []string `json:"-"`
  1903  }
  1904  
  1905  func (s *TimePeriod) MarshalJSON() ([]byte, error) {
  1906  	type NoMethod TimePeriod
  1907  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1908  }
  1909  
  1910  // UriAttributeValue: Values for an attribute with a `value_type` of URL.
  1911  type UriAttributeValue struct {
  1912  	// Uri: Required. The proposed URI value for this attribute.
  1913  	Uri string `json:"uri,omitempty"`
  1914  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1915  	// include in API requests. By default, fields with empty or default values are
  1916  	// omitted from API requests. See
  1917  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1918  	// details.
  1919  	ForceSendFields []string `json:"-"`
  1920  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1921  	// with the JSON null value. By default, fields with empty values are omitted
  1922  	// from API requests. See
  1923  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1924  	NullFields []string `json:"-"`
  1925  }
  1926  
  1927  func (s *UriAttributeValue) MarshalJSON() ([]byte, error) {
  1928  	type NoMethod UriAttributeValue
  1929  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1930  }
  1931  
  1932  type AccountsLocationsCreateCall struct {
  1933  	s          *Service
  1934  	parent     string
  1935  	location   *Location
  1936  	urlParams_ gensupport.URLParams
  1937  	ctx_       context.Context
  1938  	header_    http.Header
  1939  }
  1940  
  1941  // Create: Creates a new Location that will be owned by the logged in user.
  1942  //
  1943  // - parent: The name of the account in which to create this location.
  1944  func (r *AccountsLocationsService) Create(parent string, location *Location) *AccountsLocationsCreateCall {
  1945  	c := &AccountsLocationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1946  	c.parent = parent
  1947  	c.location = location
  1948  	return c
  1949  }
  1950  
  1951  // RequestId sets the optional parameter "requestId": A unique request ID for
  1952  // the server to detect duplicated requests. We recommend using UUIDs. Max
  1953  // length is 50 characters.
  1954  func (c *AccountsLocationsCreateCall) RequestId(requestId string) *AccountsLocationsCreateCall {
  1955  	c.urlParams_.Set("requestId", requestId)
  1956  	return c
  1957  }
  1958  
  1959  // ValidateOnly sets the optional parameter "validateOnly": If true, the
  1960  // request is validated without actually creating the location.
  1961  func (c *AccountsLocationsCreateCall) ValidateOnly(validateOnly bool) *AccountsLocationsCreateCall {
  1962  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  1963  	return c
  1964  }
  1965  
  1966  // Fields allows partial responses to be retrieved. See
  1967  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1968  // details.
  1969  func (c *AccountsLocationsCreateCall) Fields(s ...googleapi.Field) *AccountsLocationsCreateCall {
  1970  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1971  	return c
  1972  }
  1973  
  1974  // Context sets the context to be used in this call's Do method.
  1975  func (c *AccountsLocationsCreateCall) Context(ctx context.Context) *AccountsLocationsCreateCall {
  1976  	c.ctx_ = ctx
  1977  	return c
  1978  }
  1979  
  1980  // Header returns a http.Header that can be modified by the caller to add
  1981  // headers to the request.
  1982  func (c *AccountsLocationsCreateCall) Header() http.Header {
  1983  	if c.header_ == nil {
  1984  		c.header_ = make(http.Header)
  1985  	}
  1986  	return c.header_
  1987  }
  1988  
  1989  func (c *AccountsLocationsCreateCall) doRequest(alt string) (*http.Response, error) {
  1990  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1991  	var body io.Reader = nil
  1992  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.location)
  1993  	if err != nil {
  1994  		return nil, err
  1995  	}
  1996  	c.urlParams_.Set("alt", alt)
  1997  	c.urlParams_.Set("prettyPrint", "false")
  1998  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/locations")
  1999  	urls += "?" + c.urlParams_.Encode()
  2000  	req, err := http.NewRequest("POST", urls, body)
  2001  	if err != nil {
  2002  		return nil, err
  2003  	}
  2004  	req.Header = reqHeaders
  2005  	googleapi.Expand(req.URL, map[string]string{
  2006  		"parent": c.parent,
  2007  	})
  2008  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2009  }
  2010  
  2011  // Do executes the "mybusinessbusinessinformation.accounts.locations.create" call.
  2012  // Any non-2xx status code is an error. Response headers are in either
  2013  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2014  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2015  // whether the returned error was because http.StatusNotModified was returned.
  2016  func (c *AccountsLocationsCreateCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2017  	gensupport.SetOptions(c.urlParams_, opts...)
  2018  	res, err := c.doRequest("json")
  2019  	if res != nil && res.StatusCode == http.StatusNotModified {
  2020  		if res.Body != nil {
  2021  			res.Body.Close()
  2022  		}
  2023  		return nil, gensupport.WrapError(&googleapi.Error{
  2024  			Code:   res.StatusCode,
  2025  			Header: res.Header,
  2026  		})
  2027  	}
  2028  	if err != nil {
  2029  		return nil, err
  2030  	}
  2031  	defer googleapi.CloseBody(res)
  2032  	if err := googleapi.CheckResponse(res); err != nil {
  2033  		return nil, gensupport.WrapError(err)
  2034  	}
  2035  	ret := &Location{
  2036  		ServerResponse: googleapi.ServerResponse{
  2037  			Header:         res.Header,
  2038  			HTTPStatusCode: res.StatusCode,
  2039  		},
  2040  	}
  2041  	target := &ret
  2042  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2043  		return nil, err
  2044  	}
  2045  	return ret, nil
  2046  }
  2047  
  2048  type AccountsLocationsListCall struct {
  2049  	s            *Service
  2050  	parent       string
  2051  	urlParams_   gensupport.URLParams
  2052  	ifNoneMatch_ string
  2053  	ctx_         context.Context
  2054  	header_      http.Header
  2055  }
  2056  
  2057  // List: Lists the locations for the specified account.
  2058  //
  2059  //   - parent: The name of the account to fetch locations from. If the parent
  2060  //     Account is of AccountType PERSONAL, only Locations that are directly owned
  2061  //     by the Account are returned, otherwise it will return all accessible
  2062  //     locations from the Account, either directly or indirectly.
  2063  func (r *AccountsLocationsService) List(parent string) *AccountsLocationsListCall {
  2064  	c := &AccountsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2065  	c.parent = parent
  2066  	return c
  2067  }
  2068  
  2069  // Filter sets the optional parameter "filter": A filter constraining the
  2070  // locations to return. The response includes only entries that match the
  2071  // filter. If `filter` is empty, then constraints are applied and all locations
  2072  // (paginated) are retrieved for the requested account. For more information
  2073  // about valid fields and example usage, see Work with Location Data Guide
  2074  // (https://developers.google.com/my-business/content/location-data#filter_results_when_you_list_locations).
  2075  func (c *AccountsLocationsListCall) Filter(filter string) *AccountsLocationsListCall {
  2076  	c.urlParams_.Set("filter", filter)
  2077  	return c
  2078  }
  2079  
  2080  // OrderBy sets the optional parameter "orderBy": Sorting order for the
  2081  // request. Multiple fields should be comma-separated, following SQL syntax.
  2082  // The default sorting order is ascending. To specify descending order, a
  2083  // suffix " desc" should be added. Valid fields to order_by are title and
  2084  // store_code. For example: "title, store_code desc" or "title" or "store_code
  2085  // desc"
  2086  func (c *AccountsLocationsListCall) OrderBy(orderBy string) *AccountsLocationsListCall {
  2087  	c.urlParams_.Set("orderBy", orderBy)
  2088  	return c
  2089  }
  2090  
  2091  // PageSize sets the optional parameter "pageSize": How many locations to fetch
  2092  // per page. Default value is 10 if not set. Minimum is 1, and maximum page
  2093  // size is 100.
  2094  func (c *AccountsLocationsListCall) PageSize(pageSize int64) *AccountsLocationsListCall {
  2095  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2096  	return c
  2097  }
  2098  
  2099  // PageToken sets the optional parameter "pageToken": If specified, it fetches
  2100  // the next `page` of locations. The page token is returned by previous calls
  2101  // to `ListLocations` when there were more locations than could fit in the
  2102  // requested page size.
  2103  func (c *AccountsLocationsListCall) PageToken(pageToken string) *AccountsLocationsListCall {
  2104  	c.urlParams_.Set("pageToken", pageToken)
  2105  	return c
  2106  }
  2107  
  2108  // ReadMask sets the optional parameter "readMask": Required. Read mask to
  2109  // specify what fields will be returned in the response.
  2110  func (c *AccountsLocationsListCall) ReadMask(readMask string) *AccountsLocationsListCall {
  2111  	c.urlParams_.Set("readMask", readMask)
  2112  	return c
  2113  }
  2114  
  2115  // Fields allows partial responses to be retrieved. See
  2116  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2117  // details.
  2118  func (c *AccountsLocationsListCall) Fields(s ...googleapi.Field) *AccountsLocationsListCall {
  2119  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2120  	return c
  2121  }
  2122  
  2123  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2124  // object's ETag matches the given value. This is useful for getting updates
  2125  // only after the object has changed since the last request.
  2126  func (c *AccountsLocationsListCall) IfNoneMatch(entityTag string) *AccountsLocationsListCall {
  2127  	c.ifNoneMatch_ = entityTag
  2128  	return c
  2129  }
  2130  
  2131  // Context sets the context to be used in this call's Do method.
  2132  func (c *AccountsLocationsListCall) Context(ctx context.Context) *AccountsLocationsListCall {
  2133  	c.ctx_ = ctx
  2134  	return c
  2135  }
  2136  
  2137  // Header returns a http.Header that can be modified by the caller to add
  2138  // headers to the request.
  2139  func (c *AccountsLocationsListCall) Header() http.Header {
  2140  	if c.header_ == nil {
  2141  		c.header_ = make(http.Header)
  2142  	}
  2143  	return c.header_
  2144  }
  2145  
  2146  func (c *AccountsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2147  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2148  	if c.ifNoneMatch_ != "" {
  2149  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2150  	}
  2151  	var body io.Reader = nil
  2152  	c.urlParams_.Set("alt", alt)
  2153  	c.urlParams_.Set("prettyPrint", "false")
  2154  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/locations")
  2155  	urls += "?" + c.urlParams_.Encode()
  2156  	req, err := http.NewRequest("GET", urls, body)
  2157  	if err != nil {
  2158  		return nil, err
  2159  	}
  2160  	req.Header = reqHeaders
  2161  	googleapi.Expand(req.URL, map[string]string{
  2162  		"parent": c.parent,
  2163  	})
  2164  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2165  }
  2166  
  2167  // Do executes the "mybusinessbusinessinformation.accounts.locations.list" call.
  2168  // Any non-2xx status code is an error. Response headers are in either
  2169  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2170  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2171  // check whether the returned error was because http.StatusNotModified was
  2172  // returned.
  2173  func (c *AccountsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2174  	gensupport.SetOptions(c.urlParams_, opts...)
  2175  	res, err := c.doRequest("json")
  2176  	if res != nil && res.StatusCode == http.StatusNotModified {
  2177  		if res.Body != nil {
  2178  			res.Body.Close()
  2179  		}
  2180  		return nil, gensupport.WrapError(&googleapi.Error{
  2181  			Code:   res.StatusCode,
  2182  			Header: res.Header,
  2183  		})
  2184  	}
  2185  	if err != nil {
  2186  		return nil, err
  2187  	}
  2188  	defer googleapi.CloseBody(res)
  2189  	if err := googleapi.CheckResponse(res); err != nil {
  2190  		return nil, gensupport.WrapError(err)
  2191  	}
  2192  	ret := &ListLocationsResponse{
  2193  		ServerResponse: googleapi.ServerResponse{
  2194  			Header:         res.Header,
  2195  			HTTPStatusCode: res.StatusCode,
  2196  		},
  2197  	}
  2198  	target := &ret
  2199  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2200  		return nil, err
  2201  	}
  2202  	return ret, nil
  2203  }
  2204  
  2205  // Pages invokes f for each page of results.
  2206  // A non-nil error returned from f will halt the iteration.
  2207  // The provided context supersedes any context provided to the Context method.
  2208  func (c *AccountsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2209  	c.ctx_ = ctx
  2210  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2211  	for {
  2212  		x, err := c.Do()
  2213  		if err != nil {
  2214  			return err
  2215  		}
  2216  		if err := f(x); err != nil {
  2217  			return err
  2218  		}
  2219  		if x.NextPageToken == "" {
  2220  			return nil
  2221  		}
  2222  		c.PageToken(x.NextPageToken)
  2223  	}
  2224  }
  2225  
  2226  type AttributesListCall struct {
  2227  	s            *Service
  2228  	urlParams_   gensupport.URLParams
  2229  	ifNoneMatch_ string
  2230  	ctx_         context.Context
  2231  	header_      http.Header
  2232  }
  2233  
  2234  // List: Returns the list of attributes that would be available for a location
  2235  // with the given primary category and country.
  2236  func (r *AttributesService) List() *AttributesListCall {
  2237  	c := &AttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2238  	return c
  2239  }
  2240  
  2241  // CategoryName sets the optional parameter "categoryName": The primary
  2242  // category stable ID to find available attributes. Must be of the format
  2243  // categories/{category_id}.
  2244  func (c *AttributesListCall) CategoryName(categoryName string) *AttributesListCall {
  2245  	c.urlParams_.Set("categoryName", categoryName)
  2246  	return c
  2247  }
  2248  
  2249  // LanguageCode sets the optional parameter "languageCode": The BCP 47 code of
  2250  // language to get attribute display names in. If this language is not
  2251  // available, they will be provided in English.
  2252  func (c *AttributesListCall) LanguageCode(languageCode string) *AttributesListCall {
  2253  	c.urlParams_.Set("languageCode", languageCode)
  2254  	return c
  2255  }
  2256  
  2257  // PageSize sets the optional parameter "pageSize": How many attributes to
  2258  // include per page. Default is 200, minimum is 1.
  2259  func (c *AttributesListCall) PageSize(pageSize int64) *AttributesListCall {
  2260  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2261  	return c
  2262  }
  2263  
  2264  // PageToken sets the optional parameter "pageToken": If specified, the next
  2265  // page of attribute metadata is retrieved.
  2266  func (c *AttributesListCall) PageToken(pageToken string) *AttributesListCall {
  2267  	c.urlParams_.Set("pageToken", pageToken)
  2268  	return c
  2269  }
  2270  
  2271  // Parent sets the optional parameter "parent": Resource name of the location
  2272  // to look up available attributes. If this field is set, category_name,
  2273  // region_code, language_code and show_all are not required and must not be
  2274  // set.
  2275  func (c *AttributesListCall) Parent(parent string) *AttributesListCall {
  2276  	c.urlParams_.Set("parent", parent)
  2277  	return c
  2278  }
  2279  
  2280  // RegionCode sets the optional parameter "regionCode": The ISO 3166-1 alpha-2
  2281  // country code to find available attributes.
  2282  func (c *AttributesListCall) RegionCode(regionCode string) *AttributesListCall {
  2283  	c.urlParams_.Set("regionCode", regionCode)
  2284  	return c
  2285  }
  2286  
  2287  // ShowAll sets the optional parameter "showAll": Metadata for all available
  2288  // attributes are returned when this field is set to true, disregarding parent
  2289  // and category_name fields. language_code and region_code are required when
  2290  // show_all is set to true.
  2291  func (c *AttributesListCall) ShowAll(showAll bool) *AttributesListCall {
  2292  	c.urlParams_.Set("showAll", fmt.Sprint(showAll))
  2293  	return c
  2294  }
  2295  
  2296  // Fields allows partial responses to be retrieved. See
  2297  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2298  // details.
  2299  func (c *AttributesListCall) Fields(s ...googleapi.Field) *AttributesListCall {
  2300  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2301  	return c
  2302  }
  2303  
  2304  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2305  // object's ETag matches the given value. This is useful for getting updates
  2306  // only after the object has changed since the last request.
  2307  func (c *AttributesListCall) IfNoneMatch(entityTag string) *AttributesListCall {
  2308  	c.ifNoneMatch_ = entityTag
  2309  	return c
  2310  }
  2311  
  2312  // Context sets the context to be used in this call's Do method.
  2313  func (c *AttributesListCall) Context(ctx context.Context) *AttributesListCall {
  2314  	c.ctx_ = ctx
  2315  	return c
  2316  }
  2317  
  2318  // Header returns a http.Header that can be modified by the caller to add
  2319  // headers to the request.
  2320  func (c *AttributesListCall) Header() http.Header {
  2321  	if c.header_ == nil {
  2322  		c.header_ = make(http.Header)
  2323  	}
  2324  	return c.header_
  2325  }
  2326  
  2327  func (c *AttributesListCall) doRequest(alt string) (*http.Response, error) {
  2328  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2329  	if c.ifNoneMatch_ != "" {
  2330  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2331  	}
  2332  	var body io.Reader = nil
  2333  	c.urlParams_.Set("alt", alt)
  2334  	c.urlParams_.Set("prettyPrint", "false")
  2335  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/attributes")
  2336  	urls += "?" + c.urlParams_.Encode()
  2337  	req, err := http.NewRequest("GET", urls, body)
  2338  	if err != nil {
  2339  		return nil, err
  2340  	}
  2341  	req.Header = reqHeaders
  2342  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2343  }
  2344  
  2345  // Do executes the "mybusinessbusinessinformation.attributes.list" call.
  2346  // Any non-2xx status code is an error. Response headers are in either
  2347  // *ListAttributeMetadataResponse.ServerResponse.Header or (if a response was
  2348  // returned at all) in error.(*googleapi.Error).Header. Use
  2349  // googleapi.IsNotModified to check whether the returned error was because
  2350  // http.StatusNotModified was returned.
  2351  func (c *AttributesListCall) Do(opts ...googleapi.CallOption) (*ListAttributeMetadataResponse, error) {
  2352  	gensupport.SetOptions(c.urlParams_, opts...)
  2353  	res, err := c.doRequest("json")
  2354  	if res != nil && res.StatusCode == http.StatusNotModified {
  2355  		if res.Body != nil {
  2356  			res.Body.Close()
  2357  		}
  2358  		return nil, gensupport.WrapError(&googleapi.Error{
  2359  			Code:   res.StatusCode,
  2360  			Header: res.Header,
  2361  		})
  2362  	}
  2363  	if err != nil {
  2364  		return nil, err
  2365  	}
  2366  	defer googleapi.CloseBody(res)
  2367  	if err := googleapi.CheckResponse(res); err != nil {
  2368  		return nil, gensupport.WrapError(err)
  2369  	}
  2370  	ret := &ListAttributeMetadataResponse{
  2371  		ServerResponse: googleapi.ServerResponse{
  2372  			Header:         res.Header,
  2373  			HTTPStatusCode: res.StatusCode,
  2374  		},
  2375  	}
  2376  	target := &ret
  2377  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2378  		return nil, err
  2379  	}
  2380  	return ret, nil
  2381  }
  2382  
  2383  // Pages invokes f for each page of results.
  2384  // A non-nil error returned from f will halt the iteration.
  2385  // The provided context supersedes any context provided to the Context method.
  2386  func (c *AttributesListCall) Pages(ctx context.Context, f func(*ListAttributeMetadataResponse) error) error {
  2387  	c.ctx_ = ctx
  2388  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2389  	for {
  2390  		x, err := c.Do()
  2391  		if err != nil {
  2392  			return err
  2393  		}
  2394  		if err := f(x); err != nil {
  2395  			return err
  2396  		}
  2397  		if x.NextPageToken == "" {
  2398  			return nil
  2399  		}
  2400  		c.PageToken(x.NextPageToken)
  2401  	}
  2402  }
  2403  
  2404  type CategoriesBatchGetCall struct {
  2405  	s            *Service
  2406  	urlParams_   gensupport.URLParams
  2407  	ifNoneMatch_ string
  2408  	ctx_         context.Context
  2409  	header_      http.Header
  2410  }
  2411  
  2412  // BatchGet: Returns a list of business categories for the provided language
  2413  // and GConcept ids.
  2414  func (r *CategoriesService) BatchGet() *CategoriesBatchGetCall {
  2415  	c := &CategoriesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2416  	return c
  2417  }
  2418  
  2419  // LanguageCode sets the optional parameter "languageCode": Required. The BCP
  2420  // 47 code of language that the category names should be returned in.
  2421  func (c *CategoriesBatchGetCall) LanguageCode(languageCode string) *CategoriesBatchGetCall {
  2422  	c.urlParams_.Set("languageCode", languageCode)
  2423  	return c
  2424  }
  2425  
  2426  // Names sets the optional parameter "names": Required. At least one name must
  2427  // be set. The GConcept ids the localized category names should be returned
  2428  // for. To return details for more than one category, repeat this parameter in
  2429  // the request.
  2430  func (c *CategoriesBatchGetCall) Names(names ...string) *CategoriesBatchGetCall {
  2431  	c.urlParams_.SetMulti("names", append([]string{}, names...))
  2432  	return c
  2433  }
  2434  
  2435  // RegionCode sets the optional parameter "regionCode": The ISO 3166-1 alpha-2
  2436  // country code used to infer non-standard language.
  2437  func (c *CategoriesBatchGetCall) RegionCode(regionCode string) *CategoriesBatchGetCall {
  2438  	c.urlParams_.Set("regionCode", regionCode)
  2439  	return c
  2440  }
  2441  
  2442  // View sets the optional parameter "view": Required. Specifies which parts to
  2443  // the Category resource should be returned in the response.
  2444  //
  2445  // Possible values:
  2446  //
  2447  //	"CATEGORY_VIEW_UNSPECIFIED" - Not specified, equivalent to
  2448  //
  2449  // CATEGORY_METADATA_ONLY.
  2450  //
  2451  //	"BASIC" - The server response will only include Category fields
  2452  //
  2453  // display_name, category_id and language_code. It omits any service type
  2454  // metadata related fields.
  2455  //
  2456  //	"FULL" - Returns all the fields in the response.
  2457  func (c *CategoriesBatchGetCall) View(view string) *CategoriesBatchGetCall {
  2458  	c.urlParams_.Set("view", view)
  2459  	return c
  2460  }
  2461  
  2462  // Fields allows partial responses to be retrieved. See
  2463  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2464  // details.
  2465  func (c *CategoriesBatchGetCall) Fields(s ...googleapi.Field) *CategoriesBatchGetCall {
  2466  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2467  	return c
  2468  }
  2469  
  2470  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2471  // object's ETag matches the given value. This is useful for getting updates
  2472  // only after the object has changed since the last request.
  2473  func (c *CategoriesBatchGetCall) IfNoneMatch(entityTag string) *CategoriesBatchGetCall {
  2474  	c.ifNoneMatch_ = entityTag
  2475  	return c
  2476  }
  2477  
  2478  // Context sets the context to be used in this call's Do method.
  2479  func (c *CategoriesBatchGetCall) Context(ctx context.Context) *CategoriesBatchGetCall {
  2480  	c.ctx_ = ctx
  2481  	return c
  2482  }
  2483  
  2484  // Header returns a http.Header that can be modified by the caller to add
  2485  // headers to the request.
  2486  func (c *CategoriesBatchGetCall) Header() http.Header {
  2487  	if c.header_ == nil {
  2488  		c.header_ = make(http.Header)
  2489  	}
  2490  	return c.header_
  2491  }
  2492  
  2493  func (c *CategoriesBatchGetCall) doRequest(alt string) (*http.Response, error) {
  2494  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2495  	if c.ifNoneMatch_ != "" {
  2496  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2497  	}
  2498  	var body io.Reader = nil
  2499  	c.urlParams_.Set("alt", alt)
  2500  	c.urlParams_.Set("prettyPrint", "false")
  2501  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/categories:batchGet")
  2502  	urls += "?" + c.urlParams_.Encode()
  2503  	req, err := http.NewRequest("GET", urls, body)
  2504  	if err != nil {
  2505  		return nil, err
  2506  	}
  2507  	req.Header = reqHeaders
  2508  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2509  }
  2510  
  2511  // Do executes the "mybusinessbusinessinformation.categories.batchGet" call.
  2512  // Any non-2xx status code is an error. Response headers are in either
  2513  // *BatchGetCategoriesResponse.ServerResponse.Header or (if a response was
  2514  // returned at all) in error.(*googleapi.Error).Header. Use
  2515  // googleapi.IsNotModified to check whether the returned error was because
  2516  // http.StatusNotModified was returned.
  2517  func (c *CategoriesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetCategoriesResponse, error) {
  2518  	gensupport.SetOptions(c.urlParams_, opts...)
  2519  	res, err := c.doRequest("json")
  2520  	if res != nil && res.StatusCode == http.StatusNotModified {
  2521  		if res.Body != nil {
  2522  			res.Body.Close()
  2523  		}
  2524  		return nil, gensupport.WrapError(&googleapi.Error{
  2525  			Code:   res.StatusCode,
  2526  			Header: res.Header,
  2527  		})
  2528  	}
  2529  	if err != nil {
  2530  		return nil, err
  2531  	}
  2532  	defer googleapi.CloseBody(res)
  2533  	if err := googleapi.CheckResponse(res); err != nil {
  2534  		return nil, gensupport.WrapError(err)
  2535  	}
  2536  	ret := &BatchGetCategoriesResponse{
  2537  		ServerResponse: googleapi.ServerResponse{
  2538  			Header:         res.Header,
  2539  			HTTPStatusCode: res.StatusCode,
  2540  		},
  2541  	}
  2542  	target := &ret
  2543  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2544  		return nil, err
  2545  	}
  2546  	return ret, nil
  2547  }
  2548  
  2549  type CategoriesListCall struct {
  2550  	s            *Service
  2551  	urlParams_   gensupport.URLParams
  2552  	ifNoneMatch_ string
  2553  	ctx_         context.Context
  2554  	header_      http.Header
  2555  }
  2556  
  2557  // List: Returns a list of business categories. Search will match the category
  2558  // name but not the category ID. Search only matches the front of a category
  2559  // name (that is, 'food' may return 'Food Court' but not 'Fast Food
  2560  // Restaurant').
  2561  func (r *CategoriesService) List() *CategoriesListCall {
  2562  	c := &CategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2563  	return c
  2564  }
  2565  
  2566  // Filter sets the optional parameter "filter": Filter string from user. The
  2567  // only field that supported is `displayName`. Eg: `filter=displayName=foo`.
  2568  func (c *CategoriesListCall) Filter(filter string) *CategoriesListCall {
  2569  	c.urlParams_.Set("filter", filter)
  2570  	return c
  2571  }
  2572  
  2573  // LanguageCode sets the optional parameter "languageCode": Required. The BCP
  2574  // 47 code of language.
  2575  func (c *CategoriesListCall) LanguageCode(languageCode string) *CategoriesListCall {
  2576  	c.urlParams_.Set("languageCode", languageCode)
  2577  	return c
  2578  }
  2579  
  2580  // PageSize sets the optional parameter "pageSize": How many categories to
  2581  // fetch per page. Default is 100, minimum is 1, and maximum page size is 100.
  2582  func (c *CategoriesListCall) PageSize(pageSize int64) *CategoriesListCall {
  2583  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2584  	return c
  2585  }
  2586  
  2587  // PageToken sets the optional parameter "pageToken": If specified, the next
  2588  // page of categories will be fetched.
  2589  func (c *CategoriesListCall) PageToken(pageToken string) *CategoriesListCall {
  2590  	c.urlParams_.Set("pageToken", pageToken)
  2591  	return c
  2592  }
  2593  
  2594  // RegionCode sets the optional parameter "regionCode": Required. The ISO
  2595  // 3166-1 alpha-2 country code.
  2596  func (c *CategoriesListCall) RegionCode(regionCode string) *CategoriesListCall {
  2597  	c.urlParams_.Set("regionCode", regionCode)
  2598  	return c
  2599  }
  2600  
  2601  // View sets the optional parameter "view": Required. Specifies which parts to
  2602  // the Category resource should be returned in the response.
  2603  //
  2604  // Possible values:
  2605  //
  2606  //	"CATEGORY_VIEW_UNSPECIFIED" - Not specified, equivalent to
  2607  //
  2608  // CATEGORY_METADATA_ONLY.
  2609  //
  2610  //	"BASIC" - The server response will only include Category fields
  2611  //
  2612  // display_name, category_id and language_code. It omits any service type
  2613  // metadata related fields.
  2614  //
  2615  //	"FULL" - Returns all the fields in the response.
  2616  func (c *CategoriesListCall) View(view string) *CategoriesListCall {
  2617  	c.urlParams_.Set("view", view)
  2618  	return c
  2619  }
  2620  
  2621  // Fields allows partial responses to be retrieved. See
  2622  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2623  // details.
  2624  func (c *CategoriesListCall) Fields(s ...googleapi.Field) *CategoriesListCall {
  2625  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2626  	return c
  2627  }
  2628  
  2629  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2630  // object's ETag matches the given value. This is useful for getting updates
  2631  // only after the object has changed since the last request.
  2632  func (c *CategoriesListCall) IfNoneMatch(entityTag string) *CategoriesListCall {
  2633  	c.ifNoneMatch_ = entityTag
  2634  	return c
  2635  }
  2636  
  2637  // Context sets the context to be used in this call's Do method.
  2638  func (c *CategoriesListCall) Context(ctx context.Context) *CategoriesListCall {
  2639  	c.ctx_ = ctx
  2640  	return c
  2641  }
  2642  
  2643  // Header returns a http.Header that can be modified by the caller to add
  2644  // headers to the request.
  2645  func (c *CategoriesListCall) Header() http.Header {
  2646  	if c.header_ == nil {
  2647  		c.header_ = make(http.Header)
  2648  	}
  2649  	return c.header_
  2650  }
  2651  
  2652  func (c *CategoriesListCall) doRequest(alt string) (*http.Response, error) {
  2653  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2654  	if c.ifNoneMatch_ != "" {
  2655  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2656  	}
  2657  	var body io.Reader = nil
  2658  	c.urlParams_.Set("alt", alt)
  2659  	c.urlParams_.Set("prettyPrint", "false")
  2660  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/categories")
  2661  	urls += "?" + c.urlParams_.Encode()
  2662  	req, err := http.NewRequest("GET", urls, body)
  2663  	if err != nil {
  2664  		return nil, err
  2665  	}
  2666  	req.Header = reqHeaders
  2667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2668  }
  2669  
  2670  // Do executes the "mybusinessbusinessinformation.categories.list" call.
  2671  // Any non-2xx status code is an error. Response headers are in either
  2672  // *ListCategoriesResponse.ServerResponse.Header or (if a response was returned
  2673  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2674  // check whether the returned error was because http.StatusNotModified was
  2675  // returned.
  2676  func (c *CategoriesListCall) Do(opts ...googleapi.CallOption) (*ListCategoriesResponse, error) {
  2677  	gensupport.SetOptions(c.urlParams_, opts...)
  2678  	res, err := c.doRequest("json")
  2679  	if res != nil && res.StatusCode == http.StatusNotModified {
  2680  		if res.Body != nil {
  2681  			res.Body.Close()
  2682  		}
  2683  		return nil, gensupport.WrapError(&googleapi.Error{
  2684  			Code:   res.StatusCode,
  2685  			Header: res.Header,
  2686  		})
  2687  	}
  2688  	if err != nil {
  2689  		return nil, err
  2690  	}
  2691  	defer googleapi.CloseBody(res)
  2692  	if err := googleapi.CheckResponse(res); err != nil {
  2693  		return nil, gensupport.WrapError(err)
  2694  	}
  2695  	ret := &ListCategoriesResponse{
  2696  		ServerResponse: googleapi.ServerResponse{
  2697  			Header:         res.Header,
  2698  			HTTPStatusCode: res.StatusCode,
  2699  		},
  2700  	}
  2701  	target := &ret
  2702  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2703  		return nil, err
  2704  	}
  2705  	return ret, nil
  2706  }
  2707  
  2708  // Pages invokes f for each page of results.
  2709  // A non-nil error returned from f will halt the iteration.
  2710  // The provided context supersedes any context provided to the Context method.
  2711  func (c *CategoriesListCall) Pages(ctx context.Context, f func(*ListCategoriesResponse) error) error {
  2712  	c.ctx_ = ctx
  2713  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2714  	for {
  2715  		x, err := c.Do()
  2716  		if err != nil {
  2717  			return err
  2718  		}
  2719  		if err := f(x); err != nil {
  2720  			return err
  2721  		}
  2722  		if x.NextPageToken == "" {
  2723  			return nil
  2724  		}
  2725  		c.PageToken(x.NextPageToken)
  2726  	}
  2727  }
  2728  
  2729  type ChainsGetCall struct {
  2730  	s            *Service
  2731  	name         string
  2732  	urlParams_   gensupport.URLParams
  2733  	ifNoneMatch_ string
  2734  	ctx_         context.Context
  2735  	header_      http.Header
  2736  }
  2737  
  2738  // Get: Gets the specified chain. Returns `NOT_FOUND` if the chain does not
  2739  // exist.
  2740  //
  2741  // - name: The chain's resource name, in the format `chains/{chain_place_id}`.
  2742  func (r *ChainsService) Get(name string) *ChainsGetCall {
  2743  	c := &ChainsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2744  	c.name = name
  2745  	return c
  2746  }
  2747  
  2748  // Fields allows partial responses to be retrieved. See
  2749  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2750  // details.
  2751  func (c *ChainsGetCall) Fields(s ...googleapi.Field) *ChainsGetCall {
  2752  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2753  	return c
  2754  }
  2755  
  2756  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2757  // object's ETag matches the given value. This is useful for getting updates
  2758  // only after the object has changed since the last request.
  2759  func (c *ChainsGetCall) IfNoneMatch(entityTag string) *ChainsGetCall {
  2760  	c.ifNoneMatch_ = entityTag
  2761  	return c
  2762  }
  2763  
  2764  // Context sets the context to be used in this call's Do method.
  2765  func (c *ChainsGetCall) Context(ctx context.Context) *ChainsGetCall {
  2766  	c.ctx_ = ctx
  2767  	return c
  2768  }
  2769  
  2770  // Header returns a http.Header that can be modified by the caller to add
  2771  // headers to the request.
  2772  func (c *ChainsGetCall) Header() http.Header {
  2773  	if c.header_ == nil {
  2774  		c.header_ = make(http.Header)
  2775  	}
  2776  	return c.header_
  2777  }
  2778  
  2779  func (c *ChainsGetCall) doRequest(alt string) (*http.Response, error) {
  2780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2781  	if c.ifNoneMatch_ != "" {
  2782  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2783  	}
  2784  	var body io.Reader = nil
  2785  	c.urlParams_.Set("alt", alt)
  2786  	c.urlParams_.Set("prettyPrint", "false")
  2787  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2788  	urls += "?" + c.urlParams_.Encode()
  2789  	req, err := http.NewRequest("GET", urls, body)
  2790  	if err != nil {
  2791  		return nil, err
  2792  	}
  2793  	req.Header = reqHeaders
  2794  	googleapi.Expand(req.URL, map[string]string{
  2795  		"name": c.name,
  2796  	})
  2797  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2798  }
  2799  
  2800  // Do executes the "mybusinessbusinessinformation.chains.get" call.
  2801  // Any non-2xx status code is an error. Response headers are in either
  2802  // *Chain.ServerResponse.Header or (if a response was returned at all) in
  2803  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2804  // whether the returned error was because http.StatusNotModified was returned.
  2805  func (c *ChainsGetCall) Do(opts ...googleapi.CallOption) (*Chain, error) {
  2806  	gensupport.SetOptions(c.urlParams_, opts...)
  2807  	res, err := c.doRequest("json")
  2808  	if res != nil && res.StatusCode == http.StatusNotModified {
  2809  		if res.Body != nil {
  2810  			res.Body.Close()
  2811  		}
  2812  		return nil, gensupport.WrapError(&googleapi.Error{
  2813  			Code:   res.StatusCode,
  2814  			Header: res.Header,
  2815  		})
  2816  	}
  2817  	if err != nil {
  2818  		return nil, err
  2819  	}
  2820  	defer googleapi.CloseBody(res)
  2821  	if err := googleapi.CheckResponse(res); err != nil {
  2822  		return nil, gensupport.WrapError(err)
  2823  	}
  2824  	ret := &Chain{
  2825  		ServerResponse: googleapi.ServerResponse{
  2826  			Header:         res.Header,
  2827  			HTTPStatusCode: res.StatusCode,
  2828  		},
  2829  	}
  2830  	target := &ret
  2831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2832  		return nil, err
  2833  	}
  2834  	return ret, nil
  2835  }
  2836  
  2837  type ChainsSearchCall struct {
  2838  	s            *Service
  2839  	urlParams_   gensupport.URLParams
  2840  	ifNoneMatch_ string
  2841  	ctx_         context.Context
  2842  	header_      http.Header
  2843  }
  2844  
  2845  // Search: Searches the chain based on chain name.
  2846  func (r *ChainsService) Search() *ChainsSearchCall {
  2847  	c := &ChainsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2848  	return c
  2849  }
  2850  
  2851  // ChainName sets the optional parameter "chainName": Required. Search for a
  2852  // chain by its name. Exact/partial/fuzzy/related queries are supported.
  2853  // Examples: "walmart", "wal-mart", "walmmmart", "沃尔玛"
  2854  func (c *ChainsSearchCall) ChainName(chainName string) *ChainsSearchCall {
  2855  	c.urlParams_.Set("chainName", chainName)
  2856  	return c
  2857  }
  2858  
  2859  // PageSize sets the optional parameter "pageSize": The maximum number of
  2860  // matched chains to return from this query. The default is 10. The maximum
  2861  // possible value is 500.
  2862  func (c *ChainsSearchCall) PageSize(pageSize int64) *ChainsSearchCall {
  2863  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2864  	return c
  2865  }
  2866  
  2867  // Fields allows partial responses to be retrieved. See
  2868  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2869  // details.
  2870  func (c *ChainsSearchCall) Fields(s ...googleapi.Field) *ChainsSearchCall {
  2871  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2872  	return c
  2873  }
  2874  
  2875  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2876  // object's ETag matches the given value. This is useful for getting updates
  2877  // only after the object has changed since the last request.
  2878  func (c *ChainsSearchCall) IfNoneMatch(entityTag string) *ChainsSearchCall {
  2879  	c.ifNoneMatch_ = entityTag
  2880  	return c
  2881  }
  2882  
  2883  // Context sets the context to be used in this call's Do method.
  2884  func (c *ChainsSearchCall) Context(ctx context.Context) *ChainsSearchCall {
  2885  	c.ctx_ = ctx
  2886  	return c
  2887  }
  2888  
  2889  // Header returns a http.Header that can be modified by the caller to add
  2890  // headers to the request.
  2891  func (c *ChainsSearchCall) Header() http.Header {
  2892  	if c.header_ == nil {
  2893  		c.header_ = make(http.Header)
  2894  	}
  2895  	return c.header_
  2896  }
  2897  
  2898  func (c *ChainsSearchCall) doRequest(alt string) (*http.Response, error) {
  2899  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2900  	if c.ifNoneMatch_ != "" {
  2901  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2902  	}
  2903  	var body io.Reader = nil
  2904  	c.urlParams_.Set("alt", alt)
  2905  	c.urlParams_.Set("prettyPrint", "false")
  2906  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/chains:search")
  2907  	urls += "?" + c.urlParams_.Encode()
  2908  	req, err := http.NewRequest("GET", urls, body)
  2909  	if err != nil {
  2910  		return nil, err
  2911  	}
  2912  	req.Header = reqHeaders
  2913  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2914  }
  2915  
  2916  // Do executes the "mybusinessbusinessinformation.chains.search" call.
  2917  // Any non-2xx status code is an error. Response headers are in either
  2918  // *SearchChainsResponse.ServerResponse.Header or (if a response was returned
  2919  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2920  // check whether the returned error was because http.StatusNotModified was
  2921  // returned.
  2922  func (c *ChainsSearchCall) Do(opts ...googleapi.CallOption) (*SearchChainsResponse, error) {
  2923  	gensupport.SetOptions(c.urlParams_, opts...)
  2924  	res, err := c.doRequest("json")
  2925  	if res != nil && res.StatusCode == http.StatusNotModified {
  2926  		if res.Body != nil {
  2927  			res.Body.Close()
  2928  		}
  2929  		return nil, gensupport.WrapError(&googleapi.Error{
  2930  			Code:   res.StatusCode,
  2931  			Header: res.Header,
  2932  		})
  2933  	}
  2934  	if err != nil {
  2935  		return nil, err
  2936  	}
  2937  	defer googleapi.CloseBody(res)
  2938  	if err := googleapi.CheckResponse(res); err != nil {
  2939  		return nil, gensupport.WrapError(err)
  2940  	}
  2941  	ret := &SearchChainsResponse{
  2942  		ServerResponse: googleapi.ServerResponse{
  2943  			Header:         res.Header,
  2944  			HTTPStatusCode: res.StatusCode,
  2945  		},
  2946  	}
  2947  	target := &ret
  2948  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2949  		return nil, err
  2950  	}
  2951  	return ret, nil
  2952  }
  2953  
  2954  type GoogleLocationsSearchCall struct {
  2955  	s                            *Service
  2956  	searchgooglelocationsrequest *SearchGoogleLocationsRequest
  2957  	urlParams_                   gensupport.URLParams
  2958  	ctx_                         context.Context
  2959  	header_                      http.Header
  2960  }
  2961  
  2962  // Search: Search all of the possible locations that are a match to the
  2963  // specified request.
  2964  func (r *GoogleLocationsService) Search(searchgooglelocationsrequest *SearchGoogleLocationsRequest) *GoogleLocationsSearchCall {
  2965  	c := &GoogleLocationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2966  	c.searchgooglelocationsrequest = searchgooglelocationsrequest
  2967  	return c
  2968  }
  2969  
  2970  // Fields allows partial responses to be retrieved. See
  2971  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2972  // details.
  2973  func (c *GoogleLocationsSearchCall) Fields(s ...googleapi.Field) *GoogleLocationsSearchCall {
  2974  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2975  	return c
  2976  }
  2977  
  2978  // Context sets the context to be used in this call's Do method.
  2979  func (c *GoogleLocationsSearchCall) Context(ctx context.Context) *GoogleLocationsSearchCall {
  2980  	c.ctx_ = ctx
  2981  	return c
  2982  }
  2983  
  2984  // Header returns a http.Header that can be modified by the caller to add
  2985  // headers to the request.
  2986  func (c *GoogleLocationsSearchCall) Header() http.Header {
  2987  	if c.header_ == nil {
  2988  		c.header_ = make(http.Header)
  2989  	}
  2990  	return c.header_
  2991  }
  2992  
  2993  func (c *GoogleLocationsSearchCall) doRequest(alt string) (*http.Response, error) {
  2994  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2995  	var body io.Reader = nil
  2996  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchgooglelocationsrequest)
  2997  	if err != nil {
  2998  		return nil, err
  2999  	}
  3000  	c.urlParams_.Set("alt", alt)
  3001  	c.urlParams_.Set("prettyPrint", "false")
  3002  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/googleLocations:search")
  3003  	urls += "?" + c.urlParams_.Encode()
  3004  	req, err := http.NewRequest("POST", urls, body)
  3005  	if err != nil {
  3006  		return nil, err
  3007  	}
  3008  	req.Header = reqHeaders
  3009  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3010  }
  3011  
  3012  // Do executes the "mybusinessbusinessinformation.googleLocations.search" call.
  3013  // Any non-2xx status code is an error. Response headers are in either
  3014  // *SearchGoogleLocationsResponse.ServerResponse.Header or (if a response was
  3015  // returned at all) in error.(*googleapi.Error).Header. Use
  3016  // googleapi.IsNotModified to check whether the returned error was because
  3017  // http.StatusNotModified was returned.
  3018  func (c *GoogleLocationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchGoogleLocationsResponse, error) {
  3019  	gensupport.SetOptions(c.urlParams_, opts...)
  3020  	res, err := c.doRequest("json")
  3021  	if res != nil && res.StatusCode == http.StatusNotModified {
  3022  		if res.Body != nil {
  3023  			res.Body.Close()
  3024  		}
  3025  		return nil, gensupport.WrapError(&googleapi.Error{
  3026  			Code:   res.StatusCode,
  3027  			Header: res.Header,
  3028  		})
  3029  	}
  3030  	if err != nil {
  3031  		return nil, err
  3032  	}
  3033  	defer googleapi.CloseBody(res)
  3034  	if err := googleapi.CheckResponse(res); err != nil {
  3035  		return nil, gensupport.WrapError(err)
  3036  	}
  3037  	ret := &SearchGoogleLocationsResponse{
  3038  		ServerResponse: googleapi.ServerResponse{
  3039  			Header:         res.Header,
  3040  			HTTPStatusCode: res.StatusCode,
  3041  		},
  3042  	}
  3043  	target := &ret
  3044  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3045  		return nil, err
  3046  	}
  3047  	return ret, nil
  3048  }
  3049  
  3050  type LocationsDeleteCall struct {
  3051  	s          *Service
  3052  	name       string
  3053  	urlParams_ gensupport.URLParams
  3054  	ctx_       context.Context
  3055  	header_    http.Header
  3056  }
  3057  
  3058  // Delete: Deletes a location. If this location cannot be deleted using the API
  3059  // and it is marked so in the
  3060  // `google.mybusiness.businessinformation.v1.LocationState`, use the Google
  3061  // Business Profile (https://business.google.com/manage/) website.
  3062  //
  3063  // - name: The name of the location to delete.
  3064  func (r *LocationsService) Delete(name string) *LocationsDeleteCall {
  3065  	c := &LocationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3066  	c.name = name
  3067  	return c
  3068  }
  3069  
  3070  // Fields allows partial responses to be retrieved. See
  3071  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3072  // details.
  3073  func (c *LocationsDeleteCall) Fields(s ...googleapi.Field) *LocationsDeleteCall {
  3074  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3075  	return c
  3076  }
  3077  
  3078  // Context sets the context to be used in this call's Do method.
  3079  func (c *LocationsDeleteCall) Context(ctx context.Context) *LocationsDeleteCall {
  3080  	c.ctx_ = ctx
  3081  	return c
  3082  }
  3083  
  3084  // Header returns a http.Header that can be modified by the caller to add
  3085  // headers to the request.
  3086  func (c *LocationsDeleteCall) Header() http.Header {
  3087  	if c.header_ == nil {
  3088  		c.header_ = make(http.Header)
  3089  	}
  3090  	return c.header_
  3091  }
  3092  
  3093  func (c *LocationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3094  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3095  	var body io.Reader = nil
  3096  	c.urlParams_.Set("alt", alt)
  3097  	c.urlParams_.Set("prettyPrint", "false")
  3098  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3099  	urls += "?" + c.urlParams_.Encode()
  3100  	req, err := http.NewRequest("DELETE", urls, body)
  3101  	if err != nil {
  3102  		return nil, err
  3103  	}
  3104  	req.Header = reqHeaders
  3105  	googleapi.Expand(req.URL, map[string]string{
  3106  		"name": c.name,
  3107  	})
  3108  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3109  }
  3110  
  3111  // Do executes the "mybusinessbusinessinformation.locations.delete" call.
  3112  // Any non-2xx status code is an error. Response headers are in either
  3113  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3114  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3115  // whether the returned error was because http.StatusNotModified was returned.
  3116  func (c *LocationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3117  	gensupport.SetOptions(c.urlParams_, opts...)
  3118  	res, err := c.doRequest("json")
  3119  	if res != nil && res.StatusCode == http.StatusNotModified {
  3120  		if res.Body != nil {
  3121  			res.Body.Close()
  3122  		}
  3123  		return nil, gensupport.WrapError(&googleapi.Error{
  3124  			Code:   res.StatusCode,
  3125  			Header: res.Header,
  3126  		})
  3127  	}
  3128  	if err != nil {
  3129  		return nil, err
  3130  	}
  3131  	defer googleapi.CloseBody(res)
  3132  	if err := googleapi.CheckResponse(res); err != nil {
  3133  		return nil, gensupport.WrapError(err)
  3134  	}
  3135  	ret := &Empty{
  3136  		ServerResponse: googleapi.ServerResponse{
  3137  			Header:         res.Header,
  3138  			HTTPStatusCode: res.StatusCode,
  3139  		},
  3140  	}
  3141  	target := &ret
  3142  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3143  		return nil, err
  3144  	}
  3145  	return ret, nil
  3146  }
  3147  
  3148  type LocationsGetCall struct {
  3149  	s            *Service
  3150  	name         string
  3151  	urlParams_   gensupport.URLParams
  3152  	ifNoneMatch_ string
  3153  	ctx_         context.Context
  3154  	header_      http.Header
  3155  }
  3156  
  3157  // Get: Returns the specified location.
  3158  //
  3159  // - name: The name of the location to fetch.
  3160  func (r *LocationsService) Get(name string) *LocationsGetCall {
  3161  	c := &LocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3162  	c.name = name
  3163  	return c
  3164  }
  3165  
  3166  // ReadMask sets the optional parameter "readMask": Required. Read mask to
  3167  // specify what fields will be returned in the response.
  3168  func (c *LocationsGetCall) ReadMask(readMask string) *LocationsGetCall {
  3169  	c.urlParams_.Set("readMask", readMask)
  3170  	return c
  3171  }
  3172  
  3173  // Fields allows partial responses to be retrieved. See
  3174  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3175  // details.
  3176  func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall {
  3177  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3178  	return c
  3179  }
  3180  
  3181  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3182  // object's ETag matches the given value. This is useful for getting updates
  3183  // only after the object has changed since the last request.
  3184  func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall {
  3185  	c.ifNoneMatch_ = entityTag
  3186  	return c
  3187  }
  3188  
  3189  // Context sets the context to be used in this call's Do method.
  3190  func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall {
  3191  	c.ctx_ = ctx
  3192  	return c
  3193  }
  3194  
  3195  // Header returns a http.Header that can be modified by the caller to add
  3196  // headers to the request.
  3197  func (c *LocationsGetCall) Header() http.Header {
  3198  	if c.header_ == nil {
  3199  		c.header_ = make(http.Header)
  3200  	}
  3201  	return c.header_
  3202  }
  3203  
  3204  func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3205  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3206  	if c.ifNoneMatch_ != "" {
  3207  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3208  	}
  3209  	var body io.Reader = nil
  3210  	c.urlParams_.Set("alt", alt)
  3211  	c.urlParams_.Set("prettyPrint", "false")
  3212  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3213  	urls += "?" + c.urlParams_.Encode()
  3214  	req, err := http.NewRequest("GET", urls, body)
  3215  	if err != nil {
  3216  		return nil, err
  3217  	}
  3218  	req.Header = reqHeaders
  3219  	googleapi.Expand(req.URL, map[string]string{
  3220  		"name": c.name,
  3221  	})
  3222  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3223  }
  3224  
  3225  // Do executes the "mybusinessbusinessinformation.locations.get" call.
  3226  // Any non-2xx status code is an error. Response headers are in either
  3227  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3228  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3229  // whether the returned error was because http.StatusNotModified was returned.
  3230  func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3231  	gensupport.SetOptions(c.urlParams_, opts...)
  3232  	res, err := c.doRequest("json")
  3233  	if res != nil && res.StatusCode == http.StatusNotModified {
  3234  		if res.Body != nil {
  3235  			res.Body.Close()
  3236  		}
  3237  		return nil, gensupport.WrapError(&googleapi.Error{
  3238  			Code:   res.StatusCode,
  3239  			Header: res.Header,
  3240  		})
  3241  	}
  3242  	if err != nil {
  3243  		return nil, err
  3244  	}
  3245  	defer googleapi.CloseBody(res)
  3246  	if err := googleapi.CheckResponse(res); err != nil {
  3247  		return nil, gensupport.WrapError(err)
  3248  	}
  3249  	ret := &Location{
  3250  		ServerResponse: googleapi.ServerResponse{
  3251  			Header:         res.Header,
  3252  			HTTPStatusCode: res.StatusCode,
  3253  		},
  3254  	}
  3255  	target := &ret
  3256  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3257  		return nil, err
  3258  	}
  3259  	return ret, nil
  3260  }
  3261  
  3262  type LocationsGetAttributesCall struct {
  3263  	s            *Service
  3264  	nameid       string
  3265  	urlParams_   gensupport.URLParams
  3266  	ifNoneMatch_ string
  3267  	ctx_         context.Context
  3268  	header_      http.Header
  3269  }
  3270  
  3271  // GetAttributes: Looks up all the attributes set for a given location.
  3272  //
  3273  //   - name: Google identifier for this location in the form of
  3274  //     `locations/{location_id}/attributes`.
  3275  func (r *LocationsService) GetAttributes(nameid string) *LocationsGetAttributesCall {
  3276  	c := &LocationsGetAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3277  	c.nameid = nameid
  3278  	return c
  3279  }
  3280  
  3281  // Fields allows partial responses to be retrieved. See
  3282  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3283  // details.
  3284  func (c *LocationsGetAttributesCall) Fields(s ...googleapi.Field) *LocationsGetAttributesCall {
  3285  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3286  	return c
  3287  }
  3288  
  3289  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3290  // object's ETag matches the given value. This is useful for getting updates
  3291  // only after the object has changed since the last request.
  3292  func (c *LocationsGetAttributesCall) IfNoneMatch(entityTag string) *LocationsGetAttributesCall {
  3293  	c.ifNoneMatch_ = entityTag
  3294  	return c
  3295  }
  3296  
  3297  // Context sets the context to be used in this call's Do method.
  3298  func (c *LocationsGetAttributesCall) Context(ctx context.Context) *LocationsGetAttributesCall {
  3299  	c.ctx_ = ctx
  3300  	return c
  3301  }
  3302  
  3303  // Header returns a http.Header that can be modified by the caller to add
  3304  // headers to the request.
  3305  func (c *LocationsGetAttributesCall) Header() http.Header {
  3306  	if c.header_ == nil {
  3307  		c.header_ = make(http.Header)
  3308  	}
  3309  	return c.header_
  3310  }
  3311  
  3312  func (c *LocationsGetAttributesCall) doRequest(alt string) (*http.Response, error) {
  3313  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3314  	if c.ifNoneMatch_ != "" {
  3315  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3316  	}
  3317  	var body io.Reader = nil
  3318  	c.urlParams_.Set("alt", alt)
  3319  	c.urlParams_.Set("prettyPrint", "false")
  3320  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3321  	urls += "?" + c.urlParams_.Encode()
  3322  	req, err := http.NewRequest("GET", urls, body)
  3323  	if err != nil {
  3324  		return nil, err
  3325  	}
  3326  	req.Header = reqHeaders
  3327  	googleapi.Expand(req.URL, map[string]string{
  3328  		"name": c.nameid,
  3329  	})
  3330  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3331  }
  3332  
  3333  // Do executes the "mybusinessbusinessinformation.locations.getAttributes" call.
  3334  // Any non-2xx status code is an error. Response headers are in either
  3335  // *Attributes.ServerResponse.Header or (if a response was returned at all) in
  3336  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3337  // whether the returned error was because http.StatusNotModified was returned.
  3338  func (c *LocationsGetAttributesCall) Do(opts ...googleapi.CallOption) (*Attributes, error) {
  3339  	gensupport.SetOptions(c.urlParams_, opts...)
  3340  	res, err := c.doRequest("json")
  3341  	if res != nil && res.StatusCode == http.StatusNotModified {
  3342  		if res.Body != nil {
  3343  			res.Body.Close()
  3344  		}
  3345  		return nil, gensupport.WrapError(&googleapi.Error{
  3346  			Code:   res.StatusCode,
  3347  			Header: res.Header,
  3348  		})
  3349  	}
  3350  	if err != nil {
  3351  		return nil, err
  3352  	}
  3353  	defer googleapi.CloseBody(res)
  3354  	if err := googleapi.CheckResponse(res); err != nil {
  3355  		return nil, gensupport.WrapError(err)
  3356  	}
  3357  	ret := &Attributes{
  3358  		ServerResponse: googleapi.ServerResponse{
  3359  			Header:         res.Header,
  3360  			HTTPStatusCode: res.StatusCode,
  3361  		},
  3362  	}
  3363  	target := &ret
  3364  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3365  		return nil, err
  3366  	}
  3367  	return ret, nil
  3368  }
  3369  
  3370  type LocationsGetGoogleUpdatedCall struct {
  3371  	s            *Service
  3372  	name         string
  3373  	urlParams_   gensupport.URLParams
  3374  	ifNoneMatch_ string
  3375  	ctx_         context.Context
  3376  	header_      http.Header
  3377  }
  3378  
  3379  // GetGoogleUpdated: Gets the Google-updated version of the specified location.
  3380  //
  3381  // - name: The name of the location to fetch.
  3382  func (r *LocationsService) GetGoogleUpdated(name string) *LocationsGetGoogleUpdatedCall {
  3383  	c := &LocationsGetGoogleUpdatedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3384  	c.name = name
  3385  	return c
  3386  }
  3387  
  3388  // ReadMask sets the optional parameter "readMask": Required. Read mask to
  3389  // specify what fields will be returned in the response.
  3390  func (c *LocationsGetGoogleUpdatedCall) ReadMask(readMask string) *LocationsGetGoogleUpdatedCall {
  3391  	c.urlParams_.Set("readMask", readMask)
  3392  	return c
  3393  }
  3394  
  3395  // Fields allows partial responses to be retrieved. See
  3396  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3397  // details.
  3398  func (c *LocationsGetGoogleUpdatedCall) Fields(s ...googleapi.Field) *LocationsGetGoogleUpdatedCall {
  3399  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3400  	return c
  3401  }
  3402  
  3403  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3404  // object's ETag matches the given value. This is useful for getting updates
  3405  // only after the object has changed since the last request.
  3406  func (c *LocationsGetGoogleUpdatedCall) IfNoneMatch(entityTag string) *LocationsGetGoogleUpdatedCall {
  3407  	c.ifNoneMatch_ = entityTag
  3408  	return c
  3409  }
  3410  
  3411  // Context sets the context to be used in this call's Do method.
  3412  func (c *LocationsGetGoogleUpdatedCall) Context(ctx context.Context) *LocationsGetGoogleUpdatedCall {
  3413  	c.ctx_ = ctx
  3414  	return c
  3415  }
  3416  
  3417  // Header returns a http.Header that can be modified by the caller to add
  3418  // headers to the request.
  3419  func (c *LocationsGetGoogleUpdatedCall) Header() http.Header {
  3420  	if c.header_ == nil {
  3421  		c.header_ = make(http.Header)
  3422  	}
  3423  	return c.header_
  3424  }
  3425  
  3426  func (c *LocationsGetGoogleUpdatedCall) doRequest(alt string) (*http.Response, error) {
  3427  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3428  	if c.ifNoneMatch_ != "" {
  3429  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3430  	}
  3431  	var body io.Reader = nil
  3432  	c.urlParams_.Set("alt", alt)
  3433  	c.urlParams_.Set("prettyPrint", "false")
  3434  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getGoogleUpdated")
  3435  	urls += "?" + c.urlParams_.Encode()
  3436  	req, err := http.NewRequest("GET", urls, body)
  3437  	if err != nil {
  3438  		return nil, err
  3439  	}
  3440  	req.Header = reqHeaders
  3441  	googleapi.Expand(req.URL, map[string]string{
  3442  		"name": c.name,
  3443  	})
  3444  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3445  }
  3446  
  3447  // Do executes the "mybusinessbusinessinformation.locations.getGoogleUpdated" call.
  3448  // Any non-2xx status code is an error. Response headers are in either
  3449  // *GoogleUpdatedLocation.ServerResponse.Header or (if a response was returned
  3450  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3451  // check whether the returned error was because http.StatusNotModified was
  3452  // returned.
  3453  func (c *LocationsGetGoogleUpdatedCall) Do(opts ...googleapi.CallOption) (*GoogleUpdatedLocation, error) {
  3454  	gensupport.SetOptions(c.urlParams_, opts...)
  3455  	res, err := c.doRequest("json")
  3456  	if res != nil && res.StatusCode == http.StatusNotModified {
  3457  		if res.Body != nil {
  3458  			res.Body.Close()
  3459  		}
  3460  		return nil, gensupport.WrapError(&googleapi.Error{
  3461  			Code:   res.StatusCode,
  3462  			Header: res.Header,
  3463  		})
  3464  	}
  3465  	if err != nil {
  3466  		return nil, err
  3467  	}
  3468  	defer googleapi.CloseBody(res)
  3469  	if err := googleapi.CheckResponse(res); err != nil {
  3470  		return nil, gensupport.WrapError(err)
  3471  	}
  3472  	ret := &GoogleUpdatedLocation{
  3473  		ServerResponse: googleapi.ServerResponse{
  3474  			Header:         res.Header,
  3475  			HTTPStatusCode: res.StatusCode,
  3476  		},
  3477  	}
  3478  	target := &ret
  3479  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3480  		return nil, err
  3481  	}
  3482  	return ret, nil
  3483  }
  3484  
  3485  type LocationsPatchCall struct {
  3486  	s          *Service
  3487  	nameid     string
  3488  	location   *Location
  3489  	urlParams_ gensupport.URLParams
  3490  	ctx_       context.Context
  3491  	header_    http.Header
  3492  }
  3493  
  3494  // Patch: Updates the specified location.
  3495  //
  3496  //   - name: Google identifier for this location in the form:
  3497  //     `locations/{location_id}`.
  3498  func (r *LocationsService) Patch(nameid string, location *Location) *LocationsPatchCall {
  3499  	c := &LocationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3500  	c.nameid = nameid
  3501  	c.location = location
  3502  	return c
  3503  }
  3504  
  3505  // UpdateMask sets the optional parameter "updateMask": Required. The specific
  3506  // fields to update.
  3507  func (c *LocationsPatchCall) UpdateMask(updateMask string) *LocationsPatchCall {
  3508  	c.urlParams_.Set("updateMask", updateMask)
  3509  	return c
  3510  }
  3511  
  3512  // ValidateOnly sets the optional parameter "validateOnly": If true, the
  3513  // request is validated without actually updating the location. When this field
  3514  // is set, we will only return validation errors if there were any. The
  3515  // response will be empty if no errors were found.
  3516  func (c *LocationsPatchCall) ValidateOnly(validateOnly bool) *LocationsPatchCall {
  3517  	c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
  3518  	return c
  3519  }
  3520  
  3521  // Fields allows partial responses to be retrieved. See
  3522  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3523  // details.
  3524  func (c *LocationsPatchCall) Fields(s ...googleapi.Field) *LocationsPatchCall {
  3525  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3526  	return c
  3527  }
  3528  
  3529  // Context sets the context to be used in this call's Do method.
  3530  func (c *LocationsPatchCall) Context(ctx context.Context) *LocationsPatchCall {
  3531  	c.ctx_ = ctx
  3532  	return c
  3533  }
  3534  
  3535  // Header returns a http.Header that can be modified by the caller to add
  3536  // headers to the request.
  3537  func (c *LocationsPatchCall) Header() http.Header {
  3538  	if c.header_ == nil {
  3539  		c.header_ = make(http.Header)
  3540  	}
  3541  	return c.header_
  3542  }
  3543  
  3544  func (c *LocationsPatchCall) doRequest(alt string) (*http.Response, error) {
  3545  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3546  	var body io.Reader = nil
  3547  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.location)
  3548  	if err != nil {
  3549  		return nil, err
  3550  	}
  3551  	c.urlParams_.Set("alt", alt)
  3552  	c.urlParams_.Set("prettyPrint", "false")
  3553  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3554  	urls += "?" + c.urlParams_.Encode()
  3555  	req, err := http.NewRequest("PATCH", urls, body)
  3556  	if err != nil {
  3557  		return nil, err
  3558  	}
  3559  	req.Header = reqHeaders
  3560  	googleapi.Expand(req.URL, map[string]string{
  3561  		"name": c.nameid,
  3562  	})
  3563  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3564  }
  3565  
  3566  // Do executes the "mybusinessbusinessinformation.locations.patch" call.
  3567  // Any non-2xx status code is an error. Response headers are in either
  3568  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3569  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3570  // whether the returned error was because http.StatusNotModified was returned.
  3571  func (c *LocationsPatchCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3572  	gensupport.SetOptions(c.urlParams_, opts...)
  3573  	res, err := c.doRequest("json")
  3574  	if res != nil && res.StatusCode == http.StatusNotModified {
  3575  		if res.Body != nil {
  3576  			res.Body.Close()
  3577  		}
  3578  		return nil, gensupport.WrapError(&googleapi.Error{
  3579  			Code:   res.StatusCode,
  3580  			Header: res.Header,
  3581  		})
  3582  	}
  3583  	if err != nil {
  3584  		return nil, err
  3585  	}
  3586  	defer googleapi.CloseBody(res)
  3587  	if err := googleapi.CheckResponse(res); err != nil {
  3588  		return nil, gensupport.WrapError(err)
  3589  	}
  3590  	ret := &Location{
  3591  		ServerResponse: googleapi.ServerResponse{
  3592  			Header:         res.Header,
  3593  			HTTPStatusCode: res.StatusCode,
  3594  		},
  3595  	}
  3596  	target := &ret
  3597  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3598  		return nil, err
  3599  	}
  3600  	return ret, nil
  3601  }
  3602  
  3603  type LocationsUpdateAttributesCall struct {
  3604  	s          *Service
  3605  	nameid     string
  3606  	attributes *Attributes
  3607  	urlParams_ gensupport.URLParams
  3608  	ctx_       context.Context
  3609  	header_    http.Header
  3610  }
  3611  
  3612  // UpdateAttributes: Update attributes for a given location.
  3613  //
  3614  //   - name: Google identifier for this location in the form of
  3615  //     `locations/{location_id}/attributes`.
  3616  func (r *LocationsService) UpdateAttributes(nameid string, attributes *Attributes) *LocationsUpdateAttributesCall {
  3617  	c := &LocationsUpdateAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3618  	c.nameid = nameid
  3619  	c.attributes = attributes
  3620  	return c
  3621  }
  3622  
  3623  // AttributeMask sets the optional parameter "attributeMask": Required.
  3624  // Attribute name of attributes that you'd like to update. Represented by
  3625  // `attributes/{attribute}`. Updates: All attributes provided in the attributes
  3626  // field that you would like to update must be set in the `attribute_mask`.
  3627  // Attributes set in the above list but not in the `attribute_mask` will be
  3628  // ignored. Deletes: If you'd like to delete certain attributes, they must be
  3629  // specified in the `attribute_mask` with no matching entry in the attributes
  3630  // list. If you'd like to delete all attributes set on a location, you should
  3631  // look up all the applicable attributes for the location and then add them to
  3632  // the `attribute_mask` with an empty attributes field.
  3633  func (c *LocationsUpdateAttributesCall) AttributeMask(attributeMask string) *LocationsUpdateAttributesCall {
  3634  	c.urlParams_.Set("attributeMask", attributeMask)
  3635  	return c
  3636  }
  3637  
  3638  // Fields allows partial responses to be retrieved. See
  3639  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3640  // details.
  3641  func (c *LocationsUpdateAttributesCall) Fields(s ...googleapi.Field) *LocationsUpdateAttributesCall {
  3642  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3643  	return c
  3644  }
  3645  
  3646  // Context sets the context to be used in this call's Do method.
  3647  func (c *LocationsUpdateAttributesCall) Context(ctx context.Context) *LocationsUpdateAttributesCall {
  3648  	c.ctx_ = ctx
  3649  	return c
  3650  }
  3651  
  3652  // Header returns a http.Header that can be modified by the caller to add
  3653  // headers to the request.
  3654  func (c *LocationsUpdateAttributesCall) Header() http.Header {
  3655  	if c.header_ == nil {
  3656  		c.header_ = make(http.Header)
  3657  	}
  3658  	return c.header_
  3659  }
  3660  
  3661  func (c *LocationsUpdateAttributesCall) doRequest(alt string) (*http.Response, error) {
  3662  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3663  	var body io.Reader = nil
  3664  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.attributes)
  3665  	if err != nil {
  3666  		return nil, err
  3667  	}
  3668  	c.urlParams_.Set("alt", alt)
  3669  	c.urlParams_.Set("prettyPrint", "false")
  3670  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3671  	urls += "?" + c.urlParams_.Encode()
  3672  	req, err := http.NewRequest("PATCH", urls, body)
  3673  	if err != nil {
  3674  		return nil, err
  3675  	}
  3676  	req.Header = reqHeaders
  3677  	googleapi.Expand(req.URL, map[string]string{
  3678  		"name": c.nameid,
  3679  	})
  3680  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3681  }
  3682  
  3683  // Do executes the "mybusinessbusinessinformation.locations.updateAttributes" call.
  3684  // Any non-2xx status code is an error. Response headers are in either
  3685  // *Attributes.ServerResponse.Header or (if a response was returned at all) in
  3686  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3687  // whether the returned error was because http.StatusNotModified was returned.
  3688  func (c *LocationsUpdateAttributesCall) Do(opts ...googleapi.CallOption) (*Attributes, error) {
  3689  	gensupport.SetOptions(c.urlParams_, opts...)
  3690  	res, err := c.doRequest("json")
  3691  	if res != nil && res.StatusCode == http.StatusNotModified {
  3692  		if res.Body != nil {
  3693  			res.Body.Close()
  3694  		}
  3695  		return nil, gensupport.WrapError(&googleapi.Error{
  3696  			Code:   res.StatusCode,
  3697  			Header: res.Header,
  3698  		})
  3699  	}
  3700  	if err != nil {
  3701  		return nil, err
  3702  	}
  3703  	defer googleapi.CloseBody(res)
  3704  	if err := googleapi.CheckResponse(res); err != nil {
  3705  		return nil, gensupport.WrapError(err)
  3706  	}
  3707  	ret := &Attributes{
  3708  		ServerResponse: googleapi.ServerResponse{
  3709  			Header:         res.Header,
  3710  			HTTPStatusCode: res.StatusCode,
  3711  		},
  3712  	}
  3713  	target := &ret
  3714  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3715  		return nil, err
  3716  	}
  3717  	return ret, nil
  3718  }
  3719  
  3720  type LocationsAttributesGetGoogleUpdatedCall struct {
  3721  	s            *Service
  3722  	nameid       string
  3723  	urlParams_   gensupport.URLParams
  3724  	ifNoneMatch_ string
  3725  	ctx_         context.Context
  3726  	header_      http.Header
  3727  }
  3728  
  3729  // GetGoogleUpdated: Gets the Google-updated version of the specified location.
  3730  //
  3731  //   - name: Google identifier for this location in the form of
  3732  //     `locations/{location_id}/attributes`.
  3733  func (r *LocationsAttributesService) GetGoogleUpdated(nameid string) *LocationsAttributesGetGoogleUpdatedCall {
  3734  	c := &LocationsAttributesGetGoogleUpdatedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3735  	c.nameid = nameid
  3736  	return c
  3737  }
  3738  
  3739  // Fields allows partial responses to be retrieved. See
  3740  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3741  // details.
  3742  func (c *LocationsAttributesGetGoogleUpdatedCall) Fields(s ...googleapi.Field) *LocationsAttributesGetGoogleUpdatedCall {
  3743  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3744  	return c
  3745  }
  3746  
  3747  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3748  // object's ETag matches the given value. This is useful for getting updates
  3749  // only after the object has changed since the last request.
  3750  func (c *LocationsAttributesGetGoogleUpdatedCall) IfNoneMatch(entityTag string) *LocationsAttributesGetGoogleUpdatedCall {
  3751  	c.ifNoneMatch_ = entityTag
  3752  	return c
  3753  }
  3754  
  3755  // Context sets the context to be used in this call's Do method.
  3756  func (c *LocationsAttributesGetGoogleUpdatedCall) Context(ctx context.Context) *LocationsAttributesGetGoogleUpdatedCall {
  3757  	c.ctx_ = ctx
  3758  	return c
  3759  }
  3760  
  3761  // Header returns a http.Header that can be modified by the caller to add
  3762  // headers to the request.
  3763  func (c *LocationsAttributesGetGoogleUpdatedCall) Header() http.Header {
  3764  	if c.header_ == nil {
  3765  		c.header_ = make(http.Header)
  3766  	}
  3767  	return c.header_
  3768  }
  3769  
  3770  func (c *LocationsAttributesGetGoogleUpdatedCall) doRequest(alt string) (*http.Response, error) {
  3771  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3772  	if c.ifNoneMatch_ != "" {
  3773  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3774  	}
  3775  	var body io.Reader = nil
  3776  	c.urlParams_.Set("alt", alt)
  3777  	c.urlParams_.Set("prettyPrint", "false")
  3778  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getGoogleUpdated")
  3779  	urls += "?" + c.urlParams_.Encode()
  3780  	req, err := http.NewRequest("GET", urls, body)
  3781  	if err != nil {
  3782  		return nil, err
  3783  	}
  3784  	req.Header = reqHeaders
  3785  	googleapi.Expand(req.URL, map[string]string{
  3786  		"name": c.nameid,
  3787  	})
  3788  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3789  }
  3790  
  3791  // Do executes the "mybusinessbusinessinformation.locations.attributes.getGoogleUpdated" call.
  3792  // Any non-2xx status code is an error. Response headers are in either
  3793  // *Attributes.ServerResponse.Header or (if a response was returned at all) in
  3794  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3795  // whether the returned error was because http.StatusNotModified was returned.
  3796  func (c *LocationsAttributesGetGoogleUpdatedCall) Do(opts ...googleapi.CallOption) (*Attributes, error) {
  3797  	gensupport.SetOptions(c.urlParams_, opts...)
  3798  	res, err := c.doRequest("json")
  3799  	if res != nil && res.StatusCode == http.StatusNotModified {
  3800  		if res.Body != nil {
  3801  			res.Body.Close()
  3802  		}
  3803  		return nil, gensupport.WrapError(&googleapi.Error{
  3804  			Code:   res.StatusCode,
  3805  			Header: res.Header,
  3806  		})
  3807  	}
  3808  	if err != nil {
  3809  		return nil, err
  3810  	}
  3811  	defer googleapi.CloseBody(res)
  3812  	if err := googleapi.CheckResponse(res); err != nil {
  3813  		return nil, gensupport.WrapError(err)
  3814  	}
  3815  	ret := &Attributes{
  3816  		ServerResponse: googleapi.ServerResponse{
  3817  			Header:         res.Header,
  3818  			HTTPStatusCode: res.StatusCode,
  3819  		},
  3820  	}
  3821  	target := &ret
  3822  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3823  		return nil, err
  3824  	}
  3825  	return ret, nil
  3826  }
  3827  

View as plain text