-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
mybusinessverifications-gen.go
1979 lines (1776 loc) · 78.1 KB
/
mybusinessverifications-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2022 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package mybusinessverifications provides access to the My Business Verifications API.
//
// For product documentation, see: https://developers.google.com/my-business/
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/mybusinessverifications/v1"
// ...
// ctx := context.Background()
// mybusinessverificationsService, err := mybusinessverifications.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// mybusinessverificationsService, err := mybusinessverifications.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// mybusinessverificationsService, err := mybusinessverifications.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package mybusinessverifications // import "google.golang.org/api/mybusinessverifications/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "mybusinessverifications:v1"
const apiName = "mybusinessverifications"
const apiVersion = "v1"
const basePath = "https://mybusinessverifications.googleapis.com/"
const mtlsBasePath = "https://mybusinessverifications.mtls.googleapis.com/"
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Locations = NewLocationsService(s)
s.VerificationTokens = NewVerificationTokensService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Locations *LocationsService
VerificationTokens *VerificationTokensService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewLocationsService(s *Service) *LocationsService {
rs := &LocationsService{s: s}
rs.Verifications = NewLocationsVerificationsService(s)
return rs
}
type LocationsService struct {
s *Service
Verifications *LocationsVerificationsService
}
func NewLocationsVerificationsService(s *Service) *LocationsVerificationsService {
rs := &LocationsVerificationsService{s: s}
return rs
}
type LocationsVerificationsService struct {
s *Service
}
func NewVerificationTokensService(s *Service) *VerificationTokensService {
rs := &VerificationTokensService{s: s}
return rs
}
type VerificationTokensService struct {
s *Service
}
// AddressVerificationData: Display data for verifications through
// postcard.
type AddressVerificationData struct {
// Address: Address that a postcard can be sent to.
Address *PostalAddress `json:"address,omitempty"`
// Business: Merchant's business name.
Business string `json:"business,omitempty"`
// ExpectedDeliveryDaysRegion: Expected number of days it takes to
// deliver a postcard to the address's region.
ExpectedDeliveryDaysRegion int64 `json:"expectedDeliveryDaysRegion,omitempty"`
// ForceSendFields is a list of field names (e.g. "Address") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Address") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *AddressVerificationData) MarshalJSON() ([]byte, error) {
type NoMethod AddressVerificationData
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompleteVerificationRequest: Request message for
// Verifications.CompleteVerificationAction.
type CompleteVerificationRequest struct {
// Pin: Required. PIN code received by the merchant to complete the
// verification.
Pin string `json:"pin,omitempty"`
// ForceSendFields is a list of field names (e.g. "Pin") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Pin") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CompleteVerificationRequest) MarshalJSON() ([]byte, error) {
type NoMethod CompleteVerificationRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompleteVerificationResponse: Response message for
// Verifications.CompleteVerificationAction.
type CompleteVerificationResponse struct {
// Verification: The completed verification.
Verification *Verification `json:"verification,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Verification") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Verification") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CompleteVerificationResponse) MarshalJSON() ([]byte, error) {
type NoMethod CompleteVerificationResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ComplyWithGuidelines: Indicates that the location fails to comply
// with our guidelines
// (https://support.google.com/business/answer/3038177).
type ComplyWithGuidelines struct {
// RecommendationReason: The reason why the location is being
// recommended to comply with guidelines.
//
// Possible values:
// "RECOMMENDATION_REASON_UNSPECIFIED" - Not specified.
// "BUSINESS_LOCATION_SUSPENDED" - The business location is suspended.
// To fix this issue, consult the [Help Center
// article](https://support.google.com/business/answer/4569145).
// "BUSINESS_LOCATION_DISABLED" - The business location is disabled.
// To fix this issue, consult the [Help Center
// article](https://support.google.com/business/answer/9334246).
RecommendationReason string `json:"recommendationReason,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "RecommendationReason") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "RecommendationReason") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ComplyWithGuidelines) MarshalJSON() ([]byte, error) {
type NoMethod ComplyWithGuidelines
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// EmailVerificationData: Display data for verifications through email.
type EmailVerificationData struct {
// Domain: Domain name in the email address. e.g. "gmail.com" in
// foo@gmail.com
Domain string `json:"domain,omitempty"`
// IsUserNameEditable: Whether client is allowed to provide a different
// user name.
IsUserNameEditable bool `json:"isUserNameEditable,omitempty"`
// User: User name in the email address. e.g. "foo" in foo@gmail.com
User string `json:"user,omitempty"`
// ForceSendFields is a list of field names (e.g. "Domain") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Domain") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *EmailVerificationData) MarshalJSON() ([]byte, error) {
type NoMethod EmailVerificationData
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FetchVerificationOptionsRequest: Request message for
// Verifications.FetchVerificationOptions.
type FetchVerificationOptionsRequest struct {
// Context: Optional. Extra context information for the verification of
// service businesses. Can only be applied to the locations whose
// business type is CUSTOMER_LOCATION_ONLY. Specifying an accurate
// address could enable more options. INVALID_ARGUMENT will be thrown if
// it is set for other business types of locations.
Context *ServiceBusinessContext `json:"context,omitempty"`
// LanguageCode: Required. The BCP 47 language code representing the
// language that is to be used for the verification process. Available
// options vary by language.
LanguageCode string `json:"languageCode,omitempty"`
// ForceSendFields is a list of field names (e.g. "Context") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Context") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FetchVerificationOptionsRequest) MarshalJSON() ([]byte, error) {
type NoMethod FetchVerificationOptionsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FetchVerificationOptionsResponse: Response message for
// Verifications.FetchVerificationOptions.
type FetchVerificationOptionsResponse struct {
// Options: The available verification options.
Options []*VerificationOption `json:"options,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Options") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Options") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *FetchVerificationOptionsResponse) MarshalJSON() ([]byte, error) {
type NoMethod FetchVerificationOptionsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GenerateVerificationTokenRequest: Request message for
// Verifications.GenerateVerificationToken.
type GenerateVerificationTokenRequest struct {
// Location: Required. The target location.
Location *Location `json:"location,omitempty"`
// ForceSendFields is a list of field names (e.g. "Location") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Location") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GenerateVerificationTokenRequest) MarshalJSON() ([]byte, error) {
type NoMethod GenerateVerificationTokenRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GenerateVerificationTokenResponse: Response message for
// Verifications.GenerateVerificationToken.
type GenerateVerificationTokenResponse struct {
// Token: The generated token to verify the location.
Token *VerificationToken `json:"token,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Token") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Token") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GenerateVerificationTokenResponse) MarshalJSON() ([]byte, error) {
type NoMethod GenerateVerificationTokenResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListVerificationsResponse: Response message for
// Verifications.ListVerifications.
type ListVerificationsResponse struct {
// NextPageToken: If the number of verifications exceeded the requested
// page size, this field will be populated with a token to fetch the
// next page of verification on a subsequent call. If there are no more
// attributes, this field will not be present in the response.
NextPageToken string `json:"nextPageToken,omitempty"`
// Verifications: List of the verifications.
Verifications []*Verification `json:"verifications,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "NextPageToken") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPageToken") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ListVerificationsResponse) MarshalJSON() ([]byte, error) {
type NoMethod ListVerificationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Location: A subset of location info. See the [help center article]
// (https://support.google.com/business/answer/3038177) for a detailed
// description of these fields, or the category endpoint
// (/my-business/reference/rest/v4/categories) for a list of valid
// business categories.
type Location struct {
// Address: Required. A precise, accurate address to describe your
// business location. PO boxes or mailboxes located at remote locations
// are not acceptable. At this time, you can specify a maximum of five
// `address_lines` values in the address.
Address *PostalAddress `json:"address,omitempty"`
// Name: Required. Location name should reflect your business's
// real-world name, as used consistently on your storefront, website,
// and stationery, and as known to customers. Any additional
// information, when relevant, can be included in other fields of the
// resource (for example, `Address`, `Categories`). Don't add
// unnecessary information to your name (for example, prefer "Google"
// over "Google Inc. - Mountain View Corporate Headquarters"). Don't
// include marketing taglines, store codes, special characters, hours or
// closed/open status, phone numbers, website URLs, service/product
// information, location/address or directions, or containment
// information (for example, "Chase ATM in Duane Reade").
Name string `json:"name,omitempty"`
// PrimaryCategoryId: Required. Id of the category that best describes
// the core business this location engages in.
PrimaryCategoryId string `json:"primaryCategoryId,omitempty"`
// PrimaryPhone: Optional. A phone number that connects to your
// individual business location as directly as possible. Use a local
// phone number instead of a central, call center helpline number
// whenever possible.
PrimaryPhone string `json:"primaryPhone,omitempty"`
// WebsiteUri: Optional. A URL for this business. If possible, use a URL
// that represents this individual business location instead of a
// generic website/URL that represents all locations, or the brand.
WebsiteUri string `json:"websiteUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Address") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Address") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Location) MarshalJSON() ([]byte, error) {
type NoMethod Location
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// PostalAddress: Represents a postal address, e.g. for postal delivery
// or payments addresses. Given a postal address, a postal service can
// deliver items to a premise, P.O. Box or similar. It is not intended
// to model geographical locations (roads, towns, mountains). In typical
// usage an address would be created via user input or from importing
// existing data, depending on the type of process. Advice on address
// input / editing: - Use an i18n-ready address widget such as
// https://github.com/google/libaddressinput) - Users should not be
// presented with UI elements for input or editing of fields outside
// countries where that field is used. For more guidance on how to use
// this schema, please see:
// https://support.google.com/business/answer/6397478
type PostalAddress struct {
// AddressLines: Unstructured address lines describing the lower levels
// of an address. Because values in address_lines do not have type
// information and may sometimes contain multiple values in a single
// field (e.g. "Austin, TX"), it is important that the line order is
// clear. The order of address lines should be "envelope order" for the
// country/region of the address. In places where this can vary (e.g.
// Japan), address_language is used to make it explicit (e.g. "ja" for
// large-to-small ordering and "ja-Latn" or "en" for small-to-large).
// This way, the most specific line of an address can be selected based
// on the language. The minimum permitted structural representation of
// an address consists of a region_code with all remaining information
// placed in the address_lines. It would be possible to format such an
// address very approximately without geocoding, but no semantic
// reasoning could be made about any of the address components until it
// was at least partially resolved. Creating an address only containing
// a region_code and address_lines, and then geocoding is the
// recommended way to handle completely unstructured addresses (as
// opposed to guessing which parts of the address should be localities
// or administrative areas).
AddressLines []string `json:"addressLines,omitempty"`
// AdministrativeArea: Optional. Highest administrative subdivision
// which is used for postal addresses of a country or region. For
// example, this can be a state, a province, an oblast, or a prefecture.
// Specifically, for Spain this is the province and not the autonomous
// community (e.g. "Barcelona" and not "Catalonia"). Many countries
// don't use an administrative area in postal addresses. E.g. in
// Switzerland this should be left unpopulated.
AdministrativeArea string `json:"administrativeArea,omitempty"`
// LanguageCode: Optional. BCP-47 language code of the contents of this
// address (if known). This is often the UI language of the input form
// or is expected to match one of the languages used in the address'
// country/region, or their transliterated equivalents. This can affect
// formatting in certain countries, but is not critical to the
// correctness of the data and will never affect any validation or other
// non-formatting related operations. If this value is not known, it
// should be omitted (rather than specifying a possibly incorrect
// default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
LanguageCode string `json:"languageCode,omitempty"`
// Locality: Optional. Generally refers to the city/town portion of the
// address. Examples: US city, IT comune, UK post town. In regions of
// the world where localities are not well defined or do not fit into
// this structure well, leave locality empty and use address_lines.
Locality string `json:"locality,omitempty"`
// Organization: Optional. The name of the organization at the address.
Organization string `json:"organization,omitempty"`
// PostalCode: Optional. Postal code of the address. Not all countries
// use or require postal codes to be present, but where they are used,
// they may trigger additional validation with other parts of the
// address (e.g. state/zip validation in the U.S.A.).
PostalCode string `json:"postalCode,omitempty"`
// Recipients: Optional. The recipient at the address. This field may,
// under certain circumstances, contain multiline information. For
// example, it might contain "care of" information.
Recipients []string `json:"recipients,omitempty"`
// RegionCode: Required. CLDR region code of the country/region of the
// address. This is never inferred and it is up to the user to ensure
// the value is correct. See https://cldr.unicode.org/ and
// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
// for details. Example: "CH" for Switzerland.
RegionCode string `json:"regionCode,omitempty"`
// Revision: The schema revision of the `PostalAddress`. This must be
// set to 0, which is the latest revision. All new revisions **must** be
// backward compatible with old revisions.
Revision int64 `json:"revision,omitempty"`
// SortingCode: Optional. Additional, country-specific, sorting code.
// This is not used in most regions. Where it is used, the value is
// either a string like "CEDEX", optionally followed by a number (e.g.
// "CEDEX 7"), or just a number alone, representing the "sector code"
// (Jamaica), "delivery area indicator" (Malawi) or "post office
// indicator" (e.g. Côte d'Ivoire).
SortingCode string `json:"sortingCode,omitempty"`
// Sublocality: Optional. Sublocality of the address. For example, this
// can be neighborhoods, boroughs, districts.
Sublocality string `json:"sublocality,omitempty"`
// ForceSendFields is a list of field names (e.g. "AddressLines") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AddressLines") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *PostalAddress) MarshalJSON() ([]byte, error) {
type NoMethod PostalAddress
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ResolveOwnershipConflict: Indicates that the location duplicates
// another location that is in good standing.
type ResolveOwnershipConflict struct {
}
// ServiceBusinessContext: Additional data for service business
// verification.
type ServiceBusinessContext struct {
// Address: The verification address of the location. It is used to
// either enable more verification options or send a postcard.
Address *PostalAddress `json:"address,omitempty"`
// ForceSendFields is a list of field names (e.g. "Address") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Address") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ServiceBusinessContext) MarshalJSON() ([]byte, error) {
type NoMethod ServiceBusinessContext
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Verification: A verification represents a verification attempt on a
// location.
type Verification struct {
// CreateTime: The timestamp when the verification is requested.
CreateTime string `json:"createTime,omitempty"`
// Method: The method of the verification.
//
// Possible values:
// "VERIFICATION_METHOD_UNSPECIFIED" - Default value, will result in
// errors.
// "ADDRESS" - Send a postcard with a verification PIN to a specific
// mailing address. The PIN is used to complete verification with
// Google.
// "EMAIL" - Send an email with a verification PIN to a specific email
// address. The PIN is used to complete verification with Google.
// "PHONE_CALL" - Make a phone call with a verification PIN to a
// specific phone number. The PIN is used to complete verification with
// Google.
// "SMS" - Send an SMS with a verification PIN to a specific phone
// number. The PIN is used to complete verification with Google.
// "AUTO" - Verify the location without additional user action. This
// option may not be available for all locations.
// "VETTED_PARTNER" - Used for vetted
// [partners](https://support.google.com/business/answer/7674102). This
// option may not be available for all locations.
Method string `json:"method,omitempty"`
// Name: Resource name of the verification.
Name string `json:"name,omitempty"`
// State: The state of the verification.
//
// Possible values:
// "STATE_UNSPECIFIED" - Default value, will result in errors.
// "PENDING" - The verification is pending.
// "COMPLETED" - The verification is completed.
// "FAILED" - The verification is failed.
State string `json:"state,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Verification) MarshalJSON() ([]byte, error) {
type NoMethod Verification
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// VerificationOption: The verification option represents how to verify
// the location (indicated by verification method) and where the
// verification will be sent to (indicated by display data).
type VerificationOption struct {
// AddressData: Set only if the method is MAIL.
AddressData *AddressVerificationData `json:"addressData,omitempty"`
// EmailData: Set only if the method is EMAIL.
EmailData *EmailVerificationData `json:"emailData,omitempty"`
// PhoneNumber: Set only if the method is PHONE_CALL or SMS. Phone
// number that the PIN will be sent to.
PhoneNumber string `json:"phoneNumber,omitempty"`
// VerificationMethod: Method to verify the location.
//
// Possible values:
// "VERIFICATION_METHOD_UNSPECIFIED" - Default value, will result in
// errors.
// "ADDRESS" - Send a postcard with a verification PIN to a specific
// mailing address. The PIN is used to complete verification with
// Google.
// "EMAIL" - Send an email with a verification PIN to a specific email
// address. The PIN is used to complete verification with Google.
// "PHONE_CALL" - Make a phone call with a verification PIN to a
// specific phone number. The PIN is used to complete verification with
// Google.
// "SMS" - Send an SMS with a verification PIN to a specific phone
// number. The PIN is used to complete verification with Google.
// "AUTO" - Verify the location without additional user action. This
// option may not be available for all locations.
// "VETTED_PARTNER" - Used for vetted
// [partners](https://support.google.com/business/answer/7674102). This
// option may not be available for all locations.
VerificationMethod string `json:"verificationMethod,omitempty"`
// ForceSendFields is a list of field names (e.g. "AddressData") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AddressData") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *VerificationOption) MarshalJSON() ([]byte, error) {
type NoMethod VerificationOption
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// VerificationToken: Token generated by a vetted partner
// (https://support.google.com/business/answer/7674102).
type VerificationToken struct {
// TokenString: The token string.
TokenString string `json:"tokenString,omitempty"`
// ForceSendFields is a list of field names (e.g. "TokenString") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "TokenString") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *VerificationToken) MarshalJSON() ([]byte, error) {
type NoMethod VerificationToken
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Verify: Indicates that the location requires verification. Contains
// information about the current verification actions performed on the
// location.
type Verify struct {
// HasPendingVerification: Indicates whether a verification process has
// already started, and can be completed by the location.
HasPendingVerification bool `json:"hasPendingVerification,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "HasPendingVerification") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HasPendingVerification")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Verify) MarshalJSON() ([]byte, error) {
type NoMethod Verify
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// VerifyLocationRequest: Request message for
// Verifications.VerifyLocation.
type VerifyLocationRequest struct {
// Context: Optional. Extra context information for the verification of
// service businesses. It is only required for the locations whose
// business type is CUSTOMER_LOCATION_ONLY. For ADDRESS verification,
// the address will be used to send out postcard. For other methods, it
// should be the same as the one that is passed to
// GetVerificationOptions. INVALID_ARGUMENT will be thrown if it is set
// for other types of business locations.
Context *ServiceBusinessContext `json:"context,omitempty"`
// EmailAddress: Optional. The input for EMAIL method. Email address
// where the PIN should be sent to. An email address is accepted only if
// it is one of the addresses provided by FetchVerificationOptions. If
// the EmailVerificationData has is_user_name_editable set to true, the
// client may specify a different user name (local-part) but must match
// the domain name.
EmailAddress string `json:"emailAddress,omitempty"`
// LanguageCode: Optional. The BCP 47 language code representing the
// language that is to be used for the verification process.
LanguageCode string `json:"languageCode,omitempty"`
// MailerContact: Optional. The input for ADDRESS method. Contact name
// the mail should be sent to.
MailerContact string `json:"mailerContact,omitempty"`
// Method: Required. Verification method.
//
// Possible values:
// "VERIFICATION_METHOD_UNSPECIFIED" - Default value, will result in
// errors.
// "ADDRESS" - Send a postcard with a verification PIN to a specific
// mailing address. The PIN is used to complete verification with
// Google.
// "EMAIL" - Send an email with a verification PIN to a specific email
// address. The PIN is used to complete verification with Google.
// "PHONE_CALL" - Make a phone call with a verification PIN to a
// specific phone number. The PIN is used to complete verification with
// Google.
// "SMS" - Send an SMS with a verification PIN to a specific phone
// number. The PIN is used to complete verification with Google.
// "AUTO" - Verify the location without additional user action. This
// option may not be available for all locations.
// "VETTED_PARTNER" - Used for vetted
// [partners](https://support.google.com/business/answer/7674102). This
// option may not be available for all locations.
Method string `json:"method,omitempty"`
// PhoneNumber: Optional. The input for PHONE_CALL/SMS method The phone
// number that should be called or be sent SMS to. It must be one of the
// phone numbers in the eligible options.
PhoneNumber string `json:"phoneNumber,omitempty"`
// Token: Optional. The input for VETTED_PARTNER method available to
// select partners. (https://support.google.com/business/answer/7674102)
// The input is not needed for a vetted account. Token that is
// associated to the location. Token that is associated to the location.
Token *VerificationToken `json:"token,omitempty"`
// ForceSendFields is a list of field names (e.g. "Context") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Context") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *VerifyLocationRequest) MarshalJSON() ([]byte, error) {
type NoMethod VerifyLocationRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// VerifyLocationResponse: Response message for
// Verifications.VerifyLocation.
type VerifyLocationResponse struct {
// Verification: The created verification request.