-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
jobs-gen.go
8195 lines (7387 loc) · 345 KB
/
jobs-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 2020 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 jobs provides access to the Cloud Talent Solution API.
//
// For product documentation, see: https://cloud.google.com/talent-solution/job-search/docs/
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/jobs/v2"
// ...
// ctx := context.Background()
// jobsService, err := jobs.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
//
// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
//
// jobsService, err := jobs.NewService(ctx, option.WithScopes(jobs.JobsScope))
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// jobsService, err := jobs.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, ...)
// jobsService, err := jobs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package jobs // import "google.golang.org/api/jobs/v2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
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 = "jobs:v2"
const apiName = "jobs"
const apiVersion = "v2"
const basePath = "https://jobs.googleapis.com/"
const mtlsBasePath = "https://jobs.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
// Manage job postings
JobsScope = "https://www.googleapis.com/auth/jobs"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/jobs",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
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.Companies = NewCompaniesService(s)
s.Jobs = NewJobsService(s)
s.V2 = NewV2Service(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Companies *CompaniesService
Jobs *JobsService
V2 *V2Service
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewCompaniesService(s *Service) *CompaniesService {
rs := &CompaniesService{s: s}
rs.Jobs = NewCompaniesJobsService(s)
return rs
}
type CompaniesService struct {
s *Service
Jobs *CompaniesJobsService
}
func NewCompaniesJobsService(s *Service) *CompaniesJobsService {
rs := &CompaniesJobsService{s: s}
return rs
}
type CompaniesJobsService struct {
s *Service
}
func NewJobsService(s *Service) *JobsService {
rs := &JobsService{s: s}
return rs
}
type JobsService struct {
s *Service
}
func NewV2Service(s *Service) *V2Service {
rs := &V2Service{s: s}
return rs
}
type V2Service struct {
s *Service
}
// BatchDeleteJobsRequest: Input only. Batch delete jobs request.
type BatchDeleteJobsRequest struct {
// Filter: Required. The filter string specifies the jobs to be deleted.
// Supported operator: =, AND The fields eligible for filtering are: *
// `companyName` (Required) * `requisitionId` (Required) Sample Query:
// companyName = "companies/123" AND requisitionId = "req-1"
Filter string `json:"filter,omitempty"`
// ForceSendFields is a list of field names (e.g. "Filter") to
// unconditionally include in API requests. By default, fields with
// empty 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. "Filter") 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 *BatchDeleteJobsRequest) MarshalJSON() ([]byte, error) {
type NoMethod BatchDeleteJobsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// BucketRange: Represents starting and ending value of a range in
// double.
type BucketRange struct {
// From: Starting value of the bucket range.
From float64 `json:"from,omitempty"`
// To: Ending value of the bucket range.
To float64 `json:"to,omitempty"`
// ForceSendFields is a list of field names (e.g. "From") to
// unconditionally include in API requests. By default, fields with
// empty 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. "From") 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 *BucketRange) MarshalJSON() ([]byte, error) {
type NoMethod BucketRange
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *BucketRange) UnmarshalJSON(data []byte) error {
type NoMethod BucketRange
var s1 struct {
From gensupport.JSONFloat64 `json:"from"`
To gensupport.JSONFloat64 `json:"to"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.From = float64(s1.From)
s.To = float64(s1.To)
return nil
}
// BucketizedCount: Represents count of jobs within one bucket.
type BucketizedCount struct {
// Count: Number of jobs whose numeric field value fall into `range`.
Count int64 `json:"count,omitempty"`
// Range: Bucket range on which histogram was performed for the numeric
// field, that is, the count represents number of jobs in this range.
Range *BucketRange `json:"range,omitempty"`
// ForceSendFields is a list of field names (e.g. "Count") to
// unconditionally include in API requests. By default, fields with
// empty 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. "Count") 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 *BucketizedCount) MarshalJSON() ([]byte, error) {
type NoMethod BucketizedCount
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommuteInfo: Output only. Commute details related to this job.
type CommuteInfo struct {
// JobLocation: Location used as the destination in the commute
// calculation.
JobLocation *JobLocation `json:"jobLocation,omitempty"`
// TravelDuration: The number of seconds required to travel to the job
// location from the query location. A duration of 0 seconds indicates
// that the job is not reachable within the requested duration, but was
// returned as part of an expanded query.
TravelDuration string `json:"travelDuration,omitempty"`
// ForceSendFields is a list of field names (e.g. "JobLocation") to
// unconditionally include in API requests. By default, fields with
// empty 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. "JobLocation") 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 *CommuteInfo) MarshalJSON() ([]byte, error) {
type NoMethod CommuteInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CommutePreference: Input only. Parameters needed for commute search.
type CommutePreference struct {
// AllowNonStreetLevelAddress: Optional. If `true`, jobs without street
// level addresses may also be returned. For city level addresses, the
// city center is used. For state and coarser level addresses, text
// matching is used. If this field is set to `false` or is not
// specified, only jobs that include street level addresses will be
// returned by commute search.
AllowNonStreetLevelAddress bool `json:"allowNonStreetLevelAddress,omitempty"`
// DepartureHourLocal: Optional. The departure hour to use to calculate
// traffic impact. Accepts an integer between 0 and 23, representing the
// hour in the time zone of the start_location. Must not be present if
// road_traffic is specified.
DepartureHourLocal int64 `json:"departureHourLocal,omitempty"`
// Method: Required. The method of transportation for which to calculate
// the commute time.
//
// Possible values:
// "COMMUTE_METHOD_UNSPECIFIED" - Commute method is not specified.
// "DRIVING" - Commute time is calculated based on driving time.
// "TRANSIT" - Commute time is calculated based on public transit
// including bus, metro, subway, etc.
Method string `json:"method,omitempty"`
// RoadTraffic: Optional. Specifies the traffic density to use when
// calculating commute time. Must not be present if departure_hour_local
// is specified.
//
// Possible values:
// "ROAD_TRAFFIC_UNSPECIFIED" - Road traffic situation is not
// specified.
// "TRAFFIC_FREE" - Optimal commute time without considering any
// traffic impact.
// "BUSY_HOUR" - Commute time calculation takes in account the peak
// traffic impact.
RoadTraffic string `json:"roadTraffic,omitempty"`
// StartLocation: Required. The latitude and longitude of the location
// from which to calculate the commute time.
StartLocation *LatLng `json:"startLocation,omitempty"`
// TravelTime: Required. The maximum travel time in seconds. The maximum
// allowed value is `3600s` (one hour). Format is `123s`.
TravelTime string `json:"travelTime,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "AllowNonStreetLevelAddress") to unconditionally include in API
// requests. By default, fields with empty 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.
// "AllowNonStreetLevelAddress") 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 *CommutePreference) MarshalJSON() ([]byte, error) {
type NoMethod CommutePreference
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Company: A Company resource represents a company in the service. A
// company is the entity that owns job listings, that is, the hiring
// entity responsible for employing applicants for the job position.
type Company struct {
// CareerPageLink: Optional. The URL to employer's career site or
// careers page on the employer's web site.
CareerPageLink string `json:"careerPageLink,omitempty"`
// CompanyInfoSources: Optional. Identifiers external to the application
// that help to further identify the employer.
CompanyInfoSources []*CompanyInfoSource `json:"companyInfoSources,omitempty"`
// CompanySize: Optional. The employer's company size.
//
// Possible values:
// "COMPANY_SIZE_UNSPECIFIED" - Default value if the size is not
// specified.
// "MINI" - The company has less than 50 employees.
// "SMALL" - The company has between 50 and 99 employees.
// "SMEDIUM" - The company has between 100 and 499 employees.
// "MEDIUM" - The company has between 500 and 999 employees.
// "BIG" - The company has between 1,000 and 4,999 employees.
// "BIGGER" - The company has between 5,000 and 9,999 employees.
// "GIANT" - The company has 10,000 or more employees.
CompanySize string `json:"companySize,omitempty"`
// DisableLocationOptimization: Deprecated. Do not use this field.
// Optional. This field is no longer used. Any value set to it is
// ignored.
DisableLocationOptimization bool `json:"disableLocationOptimization,omitempty"`
// DisplayName: Required. The name of the employer to be displayed with
// the job, for example, "Google, LLC.".
DisplayName string `json:"displayName,omitempty"`
// DistributorBillingCompanyId: Optional. The unique company identifier
// provided by the client to identify an employer for billing purposes.
// Recommended practice is to use the distributor_company_id. Defaults
// to same value as distributor_company_id when a value is not provided.
DistributorBillingCompanyId string `json:"distributorBillingCompanyId,omitempty"`
// DistributorCompanyId: Required. A client's company identifier, used
// to uniquely identify the company. If an employer has a subsidiary or
// sub-brand, such as "Alphabet" and "Google", which the client wishes
// to use as the company displayed on the job. Best practice is to
// create a distinct company identifier for each distinct brand
// displayed. The maximum number of allowed characters is 255.
DistributorCompanyId string `json:"distributorCompanyId,omitempty"`
// EeoText: Optional. Equal Employment Opportunity legal disclaimer text
// to be associated with all jobs, and typically to be displayed in all
// roles. The maximum number of allowed characters is 500.
EeoText string `json:"eeoText,omitempty"`
// HiringAgency: Optional. Set to true if it is the hiring agency that
// post jobs for other employers. Defaults to false if not provided.
HiringAgency bool `json:"hiringAgency,omitempty"`
// HqLocation: Optional. The street address of the company's main
// headquarters, which may be different from the job location. The
// service attempts to geolocate the provided address, and populates a
// more specific location wherever possible in
// structured_company_hq_location.
HqLocation string `json:"hqLocation,omitempty"`
// ImageUrl: Optional. A URL that hosts the employer's company logo. If
// provided, the logo image should be squared at 80x80 pixels. The url
// must be a Google Photos or Google Album url. Only images in these
// Google sub-domains are accepted.
ImageUrl string `json:"imageUrl,omitempty"`
// KeywordSearchableCustomAttributes: Optional. A list of keys of
// filterable Job.custom_attributes, whose corresponding `string_values`
// are used in keyword search. Jobs with `string_values` under these
// specified field keys are returned if any of the values matches the
// search keyword. Custom field values with parenthesis, brackets and
// special symbols might not be properly searchable, and those keyword
// queries need to be surrounded by quotes.
KeywordSearchableCustomAttributes []string `json:"keywordSearchableCustomAttributes,omitempty"`
// KeywordSearchableCustomFields: Deprecated. Use
// keyword_searchable_custom_attributes instead. Optional. A list of
// filterable custom fields that should be used in keyword search. The
// jobs of this company are returned if any of these custom fields
// matches the search keyword. Custom field values with parenthesis,
// brackets and special symbols might not be properly searchable, and
// those keyword queries need to be surrounded by quotes.
KeywordSearchableCustomFields []int64 `json:"keywordSearchableCustomFields,omitempty"`
// Name: Required during company update. The resource name for a
// company. This is generated by the service when a company is created,
// for example, "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd".
Name string `json:"name,omitempty"`
// StructuredCompanyHqLocation: Output only. A structured headquarters
// location of the company, resolved from hq_location if possible.
StructuredCompanyHqLocation *JobLocation `json:"structuredCompanyHqLocation,omitempty"`
// Suspended: Output only. Indicates whether a company is flagged to be
// suspended from public availability by the service when job content
// appears suspicious, abusive, or spammy.
Suspended bool `json:"suspended,omitempty"`
// Title: Deprecated. Use display_name instead. Required. The name of
// the employer to be displayed with the job, for example, "Google,
// LLC.".
Title string `json:"title,omitempty"`
// Website: Optional. The URL representing the company's primary web
// site or home page, such as, "www.google.com".
Website string `json:"website,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CareerPageLink") to
// unconditionally include in API requests. By default, fields with
// empty 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. "CareerPageLink") 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 *Company) MarshalJSON() ([]byte, error) {
type NoMethod Company
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompanyInfoSource: A resource that represents an external Google
// identifier for a company, for example, a Google+ business page or a
// Google Maps business page. For unsupported types, use
// `unknown_type_id`.
type CompanyInfoSource struct {
// FreebaseMid: Optional. The Google's Knowledge Graph value for the
// employer's company.
FreebaseMid string `json:"freebaseMid,omitempty"`
// GplusId: Optional. The numeric identifier for the employer's Google+
// business page.
GplusId string `json:"gplusId,omitempty"`
// MapsCid: Optional. The numeric identifier for the employer's
// headquarters on Google Maps, namely, the Google Maps CID (cell id).
MapsCid string `json:"mapsCid,omitempty"`
// UnknownTypeId: Optional. A Google identifier that does not match any
// of the other types.
UnknownTypeId string `json:"unknownTypeId,omitempty"`
// ForceSendFields is a list of field names (e.g. "FreebaseMid") to
// unconditionally include in API requests. By default, fields with
// empty 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. "FreebaseMid") 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 *CompanyInfoSource) MarshalJSON() ([]byte, error) {
type NoMethod CompanyInfoSource
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompensationEntry: A compensation entry that represents one component
// of compensation, such as base pay, bonus, or other compensation type.
// Annualization: One compensation entry can be annualized if - it
// contains valid amount or range. - and its expected_units_per_year is
// set or can be derived. Its annualized range is determined as (amount
// or range) times expected_units_per_year.
type CompensationEntry struct {
// Amount: Optional. Compensation amount.
Amount *Money `json:"amount,omitempty"`
// Description: Optional. Compensation description. For example, could
// indicate equity terms or provide additional context to an estimated
// bonus.
Description string `json:"description,omitempty"`
// ExpectedUnitsPerYear: Optional. Expected number of units paid each
// year. If not specified, when Job.employment_types is FULLTIME, a
// default value is inferred based on unit. Default values: - HOURLY:
// 2080 - DAILY: 260 - WEEKLY: 52 - MONTHLY: 12 - ANNUAL: 1
ExpectedUnitsPerYear float64 `json:"expectedUnitsPerYear,omitempty"`
// Range: Optional. Compensation range.
Range *CompensationRange `json:"range,omitempty"`
// Type: Required. Compensation type.
//
// Possible values:
// "COMPENSATION_TYPE_UNSPECIFIED" - Default value. Equivalent to
// OTHER_COMPENSATION_TYPE.
// "BASE" - Base compensation: Refers to the fixed amount of money
// paid to an employee by an employer in return for work performed. Base
// compensation does not include benefits, bonuses or any other
// potential compensation from an employer.
// "BONUS" - Bonus.
// "SIGNING_BONUS" - Signing bonus.
// "EQUITY" - Equity.
// "PROFIT_SHARING" - Profit sharing.
// "COMMISSIONS" - Commission.
// "TIPS" - Tips.
// "OTHER_COMPENSATION_TYPE" - Other compensation type.
Type string `json:"type,omitempty"`
// Unit: Optional. Frequency of the specified amount. Default is
// CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED.
//
// Possible values:
// "COMPENSATION_UNIT_UNSPECIFIED" - Default value. Equivalent to
// OTHER_COMPENSATION_UNIT.
// "HOURLY" - Hourly.
// "DAILY" - Daily.
// "WEEKLY" - Weekly
// "MONTHLY" - Monthly.
// "YEARLY" - Yearly.
// "ONE_TIME" - One time.
// "OTHER_COMPENSATION_UNIT" - Other compensation units.
Unit string `json:"unit,omitempty"`
// ForceSendFields is a list of field names (e.g. "Amount") to
// unconditionally include in API requests. By default, fields with
// empty 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. "Amount") 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 *CompensationEntry) MarshalJSON() ([]byte, error) {
type NoMethod CompensationEntry
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *CompensationEntry) UnmarshalJSON(data []byte) error {
type NoMethod CompensationEntry
var s1 struct {
ExpectedUnitsPerYear gensupport.JSONFloat64 `json:"expectedUnitsPerYear"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.ExpectedUnitsPerYear = float64(s1.ExpectedUnitsPerYear)
return nil
}
// CompensationFilter: Input only. Filter on job compensation type and
// amount.
type CompensationFilter struct {
// IncludeJobsWithUnspecifiedCompensationRange: Optional. Whether to
// include jobs whose compensation range is unspecified.
IncludeJobsWithUnspecifiedCompensationRange bool `json:"includeJobsWithUnspecifiedCompensationRange,omitempty"`
// Range: Optional. Compensation range.
Range *CompensationRange `json:"range,omitempty"`
// Type: Required. Type of filter.
//
// Possible values:
// "FILTER_TYPE_UNSPECIFIED" - Filter type unspecified. Position
// holder, INVALID, should never be used.
// "UNIT_ONLY" - Filter by `base compensation entry's` unit. A job is
// a match if and only if the job contains a base CompensationEntry and
// the base CompensationEntry's unit matches provided units. Populate
// one or more units. See CompensationInfo.CompensationEntry for
// definition of base compensation entry.
// "UNIT_AND_AMOUNT" - Filter by `base compensation entry's` unit and
// amount / range. A job is a match if and only if the job contains a
// base CompensationEntry, and the base entry's unit matches provided
// compensation_units and amount or range overlaps with provided
// compensation_range. See CompensationInfo.CompensationEntry for
// definition of base compensation entry. Set exactly one units and
// populate range.
// "ANNUALIZED_BASE_AMOUNT" - Filter by annualized base compensation
// amount and `base compensation entry's` unit. Populate range and zero
// or more units.
// "ANNUALIZED_TOTAL_AMOUNT" - Filter by annualized total compensation
// amount and `base compensation entry's` unit . Populate range and zero
// or more units.
Type string `json:"type,omitempty"`
// Units: Required. Specify desired `base compensation entry's`
// CompensationInfo.CompensationUnit.
//
// Possible values:
// "COMPENSATION_UNIT_UNSPECIFIED" - Default value. Equivalent to
// OTHER_COMPENSATION_UNIT.
// "HOURLY" - Hourly.
// "DAILY" - Daily.
// "WEEKLY" - Weekly
// "MONTHLY" - Monthly.
// "YEARLY" - Yearly.
// "ONE_TIME" - One time.
// "OTHER_COMPENSATION_UNIT" - Other compensation units.
Units []string `json:"units,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "IncludeJobsWithUnspecifiedCompensationRange") to unconditionally
// include in API requests. By default, fields with empty 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.
// "IncludeJobsWithUnspecifiedCompensationRange") 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 *CompensationFilter) MarshalJSON() ([]byte, error) {
type NoMethod CompensationFilter
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompensationHistogramRequest: Input only. Compensation based
// histogram request.
type CompensationHistogramRequest struct {
// BucketingOption: Required. Numeric histogram options, like buckets,
// whether include min or max value.
BucketingOption *NumericBucketingOption `json:"bucketingOption,omitempty"`
// Type: Required. Type of the request, representing which field the
// histogramming should be performed over. A single request can only
// specify one histogram of each `CompensationHistogramRequestType`.
//
// Possible values:
// "COMPENSATION_HISTOGRAM_REQUEST_TYPE_UNSPECIFIED" - Default value.
// Invalid.
// "BASE" - Histogram by job's base compensation. See
// CompensationEntry for definition of base compensation.
// "ANNUALIZED_BASE" - Histogram by job's annualized base
// compensation. See CompensationEntry for definition of annualized base
// compensation.
// "ANNUALIZED_TOTAL" - Histogram by job's annualized total
// compensation. See CompensationEntry for definition of annualized
// total compensation.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "BucketingOption") to
// unconditionally include in API requests. By default, fields with
// empty 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. "BucketingOption") 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 *CompensationHistogramRequest) MarshalJSON() ([]byte, error) {
type NoMethod CompensationHistogramRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompensationHistogramResult: Output only. Compensation based
// histogram result.
type CompensationHistogramResult struct {
// Result: Histogram result.
Result *NumericBucketingResult `json:"result,omitempty"`
// Type: Type of the request, corresponding to
// CompensationHistogramRequest.type.
//
// Possible values:
// "COMPENSATION_HISTOGRAM_REQUEST_TYPE_UNSPECIFIED" - Default value.
// Invalid.
// "BASE" - Histogram by job's base compensation. See
// CompensationEntry for definition of base compensation.
// "ANNUALIZED_BASE" - Histogram by job's annualized base
// compensation. See CompensationEntry for definition of annualized base
// compensation.
// "ANNUALIZED_TOTAL" - Histogram by job's annualized total
// compensation. See CompensationEntry for definition of annualized
// total compensation.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Result") to
// unconditionally include in API requests. By default, fields with
// empty 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. "Result") 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 *CompensationHistogramResult) MarshalJSON() ([]byte, error) {
type NoMethod CompensationHistogramResult
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompensationInfo: Job compensation details.
type CompensationInfo struct {
// Amount: Deprecated. Use entries instead. Optional. The amount of
// compensation or pay for the job. As an alternative,
// compensation_amount_min and compensation_amount_max may be used to
// define a range of compensation.
Amount *Money `json:"amount,omitempty"`
// AnnualizedBaseCompensationRange: Output only. Annualized base
// compensation range. Computed as base compensation entry's
// CompensationEntry.compensation times
// CompensationEntry.expected_units_per_year. See CompensationEntry for
// explanation on compensation annualization.
AnnualizedBaseCompensationRange *CompensationRange `json:"annualizedBaseCompensationRange,omitempty"`
// AnnualizedTotalCompensationRange: Output only. Annualized total
// compensation range. Computed as all compensation entries'
// CompensationEntry.compensation times
// CompensationEntry.expected_units_per_year. See CompensationEntry for
// explanation on compensation annualization.
AnnualizedTotalCompensationRange *CompensationRange `json:"annualizedTotalCompensationRange,omitempty"`
// Entries: Optional. Job compensation information. At most one entry
// can be of type CompensationInfo.CompensationType.BASE, which is
// referred as ** base compensation entry ** for the job.
Entries []*CompensationEntry `json:"entries,omitempty"`
// Max: Deprecated. Use entries instead. Optional. An upper bound on a
// range for compensation or pay for the job. The currency type is
// specified in compensation_amount.
Max *Money `json:"max,omitempty"`
// Min: Deprecated. Use entries instead. Optional. A lower bound on a
// range for compensation or pay for the job. The currency type is
// specified in compensation_amount.
Min *Money `json:"min,omitempty"`
// Type: Deprecated. Use entries instead. Optional. Type of job
// compensation.
//
// Possible values:
// "JOB_COMPENSATION_TYPE_UNSPECIFIED" - The default value if the type
// is not specified.
// "HOURLY" - The job compensation is quoted by the number of hours
// worked.
// "SALARY" - The job compensation is quoted on an annual basis.
// "PER_PROJECT" - The job compensation is quoted by project
// completion.
// "COMMISSION" - The job compensation is quoted based solely on
// commission.
// "OTHER_TYPE" - The job compensation is not quoted according to the
// listed compensation options.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Amount") to
// unconditionally include in API requests. By default, fields with
// empty 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. "Amount") 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 *CompensationInfo) MarshalJSON() ([]byte, error) {
type NoMethod CompensationInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompensationRange: Compensation range.
type CompensationRange struct {
// Max: Optional. The maximum amount of compensation. If left empty, the
// value is set to a maximal compensation value and the currency code is
// set to match the currency code of min_compensation.
Max *Money `json:"max,omitempty"`
// Min: Optional. The minimum amount of compensation. If left empty, the
// value is set to zero and the currency code is set to match the
// currency code of max_compensation.
Min *Money `json:"min,omitempty"`
// ForceSendFields is a list of field names (e.g. "Max") to
// unconditionally include in API requests. By default, fields with
// empty 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. "Max") 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 *CompensationRange) MarshalJSON() ([]byte, error) {
type NoMethod CompensationRange
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CompleteQueryResponse: Output only. Response of auto-complete query.
type CompleteQueryResponse struct {
// CompletionResults: Results of the matching job/company candidates.
CompletionResults []*CompletionResult `json:"completionResults,omitempty"`
// Metadata: Additional information for the API invocation, such as the
// request tracking id.
Metadata *ResponseMetadata `json:"metadata,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "CompletionResults")
// to unconditionally include in API requests. By default, fields with
// empty 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. "CompletionResults") 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 *CompleteQueryResponse) MarshalJSON() ([]byte, error) {
type NoMethod CompleteQueryResponse
raw := NoMethod(*s)