Debian Codegraph @

jobs/v3p1beta1/jobs-gen.go

raw symbols SCIP
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package jobs provides access to the Cloud Talent Solution API.
8 //
9 // For product documentation, see: https://cloud.google.com/talent-solution/job-search/docs/
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/jobs/v3p1beta1"
27 // ...
28 // ctx := context.Background()
29 // jobsService, err := jobs.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // By default, all available scopes (see "Constants") are used to authenticate.
38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
39 //
40 // jobsService, err := jobs.NewService(ctx, option.WithScopes(jobs.JobsScope))
41 //
42 // To use an API key for authentication (note: some APIs do not support API
43 // keys), use [google.golang.org/api/option.WithAPIKey]:
44 //
45 // jobsService, err := jobs.NewService(ctx, option.WithAPIKey("AIza..."))
46 //
47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
48 // flow, use [google.golang.org/api/option.WithTokenSource]:
49 //
50 // config := &oauth2.Config{...}
51 // // ...
52 // token, err := config.Exchange(ctx, ...)
53 // jobsService, err := jobs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
54 //
55 // See [google.golang.org/api/option.ClientOption] for details on options.
56 package jobs // import "google.golang.org/api/jobs/v3p1beta1"
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "log/slog"
66 "net/http"
67 "net/url"
68 "strconv"
69 "strings"
70
71 "github.com/googleapis/gax-go/v2/internallog"
72 googleapi "google.golang.org/api/googleapi"
73 internal "google.golang.org/api/internal"
74 gensupport "google.golang.org/api/internal/gensupport"
75 option "google.golang.org/api/option"
76 internaloption "google.golang.org/api/option/internaloption"
77 htransport "google.golang.org/api/transport/http"
78 )
79
80 // Always reference these packages, just in case the auto-generated code
81 // below doesn't.
82 var _ = bytes.NewBuffer
83 var _ = strconv.Itoa
84 var _ = fmt.Sprintf
85 var _ = json.NewDecoder
86 var _ = io.Copy
87 var _ = url.Parse
88 var _ = gensupport.MarshalJSON
89 var _ = googleapi.Version
90 var _ = errors.New
91 var _ = strings.Replace
92 var _ = context.Canceled
93 var _ = internaloption.WithDefaultEndpoint
94 var _ = internal.Version
95 var _ = internallog.New
96
97 const apiId = "jobs:v3p1beta1"
98 const apiName = "jobs"
99 const apiVersion = "v3p1beta1"
100 const basePath = "https://jobs.googleapis.com/"
101 const basePathTemplate = "https://jobs.UNIVERSE_DOMAIN/"
102 const mtlsBasePath = "https://jobs.mtls.googleapis.com/"
103
104 // OAuth2 scopes used by this API.
105 const (
106 // See, edit, configure, and delete your Google Cloud data and see the email
107 // address for your Google Account.
108 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
109
110 // Manage job postings
111 JobsScope = "https://www.googleapis.com/auth/jobs"
112 )
113
114 // NewService creates a new Service.
115 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
116 scopesOption := internaloption.WithDefaultScopes(
117 "https://www.googleapis.com/auth/cloud-platform",
118 "https://www.googleapis.com/auth/jobs",
119 )
120 // NOTE: prepend, so we don't override user-specified scopes.
121 opts = append([]option.ClientOption{scopesOption}, opts...)
122 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
123 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
124 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
125 opts = append(opts, internaloption.EnableNewAuthLibrary())
126 client, endpoint, err := htransport.NewClient(ctx, opts...)
127 if err != nil {
128 return nil, err
129 }
130 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
131 s.Projects = NewProjectsService(s)
132 if endpoint != "" {
133 s.BasePath = endpoint
134 }
135 return s, nil
136 }
137
138 // New creates a new Service. It uses the provided http.Client for requests.
139 //
140 // Deprecated: please use NewService instead.
141 // To provide a custom HTTP client, use option.WithHTTPClient.
142 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
143 func New(client *http.Client) (*Service, error) {
144 if client == nil {
145 return nil, errors.New("client is nil")
146 }
147 return NewService(context.TODO(), option.WithHTTPClient(client))
148 }
149
150 type Service struct {
151 client *http.Client
152 logger *slog.Logger
153 BasePath string // API endpoint base URL
154 UserAgent string // optional additional User-Agent fragment
155
156 Projects *ProjectsService
157 }
158
159 func (s *Service) userAgent() string {
160 if s.UserAgent == "" {
161 return googleapi.UserAgent
162 }
163 return googleapi.UserAgent + " " + s.UserAgent
164 }
165
166 func NewProjectsService(s *Service) *ProjectsService {
167 rs := &ProjectsService{s: s}
168 rs.ClientEvents = NewProjectsClientEventsService(s)
169 rs.Companies = NewProjectsCompaniesService(s)
170 rs.Jobs = NewProjectsJobsService(s)
171 rs.Operations = NewProjectsOperationsService(s)
172 return rs
173 }
174
175 type ProjectsService struct {
176 s *Service
177
178 ClientEvents *ProjectsClientEventsService
179
180 Companies *ProjectsCompaniesService
181
182 Jobs *ProjectsJobsService
183
184 Operations *ProjectsOperationsService
185 }
186
187 func NewProjectsClientEventsService(s *Service) *ProjectsClientEventsService {
188 rs := &ProjectsClientEventsService{s: s}
189 return rs
190 }
191
192 type ProjectsClientEventsService struct {
193 s *Service
194 }
195
196 func NewProjectsCompaniesService(s *Service) *ProjectsCompaniesService {
197 rs := &ProjectsCompaniesService{s: s}
198 return rs
199 }
200
201 type ProjectsCompaniesService struct {
202 s *Service
203 }
204
205 func NewProjectsJobsService(s *Service) *ProjectsJobsService {
206 rs := &ProjectsJobsService{s: s}
207 return rs
208 }
209
210 type ProjectsJobsService struct {
211 s *Service
212 }
213
214 func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
215 rs := &ProjectsOperationsService{s: s}
216 return rs
217 }
218
219 type ProjectsOperationsService struct {
220 s *Service
221 }
222
223 // ApplicationInfo: Application related details of a job posting.
224 type ApplicationInfo struct {
225 // Emails: Optional but at least one of uris, emails or instruction must be
226 // specified. Use this field to specify email address(es) to which resumes or
227 // applications can be sent. The maximum number of allowed characters for each
228 // entry is 255.
229 Emails []string `json:"emails,omitempty"`
230 // Instruction: Optional but at least one of uris, emails or instruction must
231 // be specified. Use this field to provide instructions, such as "Mail your
232 // application to ...", that a candidate can follow to apply for the job. This
233 // field accepts and sanitizes HTML input, and also accepts bold, italic,
234 // ordered list, and unordered list markup tags. The maximum number of allowed
235 // characters is 3,000.
236 Instruction string `json:"instruction,omitempty"`
237 // Uris: Optional but at least one of uris, emails or instruction must be
238 // specified. Use this URI field to direct an applicant to a website, for
239 // example to link to an online application form. The maximum number of allowed
240 // characters for each entry is 2,000.
241 Uris []string `json:"uris,omitempty"`
242 // ForceSendFields is a list of field names (e.g. "Emails") to unconditionally
243 // include in API requests. By default, fields with empty or default values are
244 // omitted from API requests. See
245 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
246 // details.
247 ForceSendFields []string `json:"-"`
248 // NullFields is a list of field names (e.g. "Emails") to include in API
249 // requests with the JSON null value. By default, fields with empty values are
250 // omitted from API requests. See
251 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
252 NullFields []string `json:"-"`
253 }
254
255 func (s ApplicationInfo) MarshalJSON() ([]byte, error) {
256 type NoMethod ApplicationInfo
257 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
258 }
259
260 // BatchDeleteJobsRequest: Input only. Batch delete jobs request.
261 type BatchDeleteJobsRequest struct {
262 // Filter: Required. The filter string specifies the jobs to be deleted.
263 // Supported operator: =, AND The fields eligible for filtering are: *
264 // `companyName` (Required) * `requisitionId` (Required) Sample Query:
265 // companyName = "projects/api-test-project/companies/123" AND requisitionId =
266 // "req-1"
267 Filter string `json:"filter,omitempty"`
268 // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally
269 // include in API requests. By default, fields with empty or default values are
270 // omitted from API requests. See
271 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
272 // details.
273 ForceSendFields []string `json:"-"`
274 // NullFields is a list of field names (e.g. "Filter") to include in API
275 // requests with the JSON null value. By default, fields with empty values are
276 // omitted from API requests. See
277 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
278 NullFields []string `json:"-"`
279 }
280
281 func (s BatchDeleteJobsRequest) MarshalJSON() ([]byte, error) {
282 type NoMethod BatchDeleteJobsRequest
283 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
284 }
285
286 // BucketRange: Represents starting and ending value of a range in double.
287 type BucketRange struct {
288 // From: Starting value of the bucket range.
289 From float64 `json:"from,omitempty"`
290 // To: Ending value of the bucket range.
291 To float64 `json:"to,omitempty"`
292 // ForceSendFields is a list of field names (e.g. "From") to unconditionally
293 // include in API requests. By default, fields with empty or default values are
294 // omitted from API requests. See
295 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
296 // details.
297 ForceSendFields []string `json:"-"`
298 // NullFields is a list of field names (e.g. "From") to include in API requests
299 // with the JSON null value. By default, fields with empty values are omitted
300 // from API requests. See
301 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
302 NullFields []string `json:"-"`
303 }
304
305 func (s BucketRange) MarshalJSON() ([]byte, error) {
306 type NoMethod BucketRange
307 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
308 }
309
310 func (s *BucketRange) UnmarshalJSON(data []byte) error {
311 type NoMethod BucketRange
312 var s1 struct {
313 From gensupport.JSONFloat64 `json:"from"`
314 To gensupport.JSONFloat64 `json:"to"`
315 *NoMethod
316 }
317 s1.NoMethod = (*NoMethod)(s)
318 if err := json.Unmarshal(data, &s1); err != nil {
319 return err
320 }
321 s.From = float64(s1.From)
322 s.To = float64(s1.To)
323 return nil
324 }
325
326 // BucketizedCount: Represents count of jobs within one bucket.
327 type BucketizedCount struct {
328 // Count: Number of jobs whose numeric field value fall into `range`.
329 Count int64 `json:"count,omitempty"`
330 // Range: Bucket range on which histogram was performed for the numeric field,
331 // that is, the count represents number of jobs in this range.
332 Range *BucketRange `json:"range,omitempty"`
333 // ForceSendFields is a list of field names (e.g. "Count") to unconditionally
334 // include in API requests. By default, fields with empty or default values are
335 // omitted from API requests. See
336 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
337 // details.
338 ForceSendFields []string `json:"-"`
339 // NullFields is a list of field names (e.g. "Count") to include in API
340 // requests with the JSON null value. By default, fields with empty values are
341 // omitted from API requests. See
342 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
343 NullFields []string `json:"-"`
344 }
345
346 func (s BucketizedCount) MarshalJSON() ([]byte, error) {
347 type NoMethod BucketizedCount
348 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
349 }
350
351 // ClientEvent: An event issued when an end user interacts with the application
352 // that implements Cloud Talent Solution. Providing this information improves
353 // the quality of search and recommendation for the API clients, enabling the
354 // service to perform optimally. The number of events sent must be consistent
355 // with other calls, such as job searches, issued to the service by the client.
356 type ClientEvent struct {
357 // CreateTime: Required. The timestamp of the event.
358 CreateTime string `json:"createTime,omitempty"`
359 // EventId: Required. A unique identifier, generated by the client application.
360 // This `event_id` is used to establish the relationship between different
361 // events (see parent_event_id).
362 EventId string `json:"eventId,omitempty"`
363 // ExtraInfo: Optional. Extra information about this event. Used for storing
364 // information with no matching field in event payload, for example, user
365 // application specific context or details. At most 20 keys are supported. The
366 // maximum total size of all keys and values is 2 KB.
367 ExtraInfo map[string]string `json:"extraInfo,omitempty"`
368 // JobEvent: A event issued when a job seeker interacts with the application
369 // that implements Cloud Talent Solution.
370 JobEvent *JobEvent `json:"jobEvent,omitempty"`
371 // ParentEventId: Optional. The event_id of an event that resulted in the
372 // current event. For example, a Job view event usually follows a parent
373 // impression event: A job seeker first does a search where a list of jobs
374 // appears (impression). The job seeker then selects a result and views the
375 // description of a particular job (Job view).
376 ParentEventId string `json:"parentEventId,omitempty"`
377 // RequestId: Required. A unique ID generated in the API responses. It can be
378 // found in ResponseMetadata.request_id.
379 RequestId string `json:"requestId,omitempty"`
380
381 // ServerResponse contains the HTTP response code and headers from the server.
382 googleapi.ServerResponse `json:"-"`
383 // ForceSendFields is a list of field names (e.g. "CreateTime") to
384 // unconditionally include in API requests. By default, fields with empty or
385 // default values are omitted from API requests. See
386 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
387 // details.
388 ForceSendFields []string `json:"-"`
389 // NullFields is a list of field names (e.g. "CreateTime") to include in API
390 // requests with the JSON null value. By default, fields with empty values are
391 // omitted from API requests. See
392 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
393 NullFields []string `json:"-"`
394 }
395
396 func (s ClientEvent) MarshalJSON() ([]byte, error) {
397 type NoMethod ClientEvent
398 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
399 }
400
401 // CommuteFilter: Input only. Parameters needed for commute search.
402 type CommuteFilter struct {
403 // AllowImpreciseAddresses: Optional. If true, jobs without "precise" addresses
404 // (street level addresses or GPS coordinates) might also be returned. For city
405 // and coarser level addresses, text matching is used. If this field is set to
406 // false or is not specified, only jobs that include precise addresses are
407 // returned by Commute Search. Note: If `allow_imprecise_addresses` is set to
408 // true, Commute Search is not able to calculate accurate commute times to jobs
409 // with city level and coarser address information. Jobs with imprecise
410 // addresses will return a `travel_duration` time of 0 regardless of distance
411 // from the job seeker.
412 AllowImpreciseAddresses bool `json:"allowImpreciseAddresses,omitempty"`
413 // CommuteMethod: Required. The method of transportation for which to calculate
414 // the commute time.
415 //
416 // Possible values:
417 // "COMMUTE_METHOD_UNSPECIFIED" - Commute method is not specified.
418 // "DRIVING" - Commute time is calculated based on driving time.
419 // "TRANSIT" - Commute time is calculated based on public transit including
420 // bus, metro, subway, etc.
421 // "WALKING" - Commute time is calculated based on walking time.
422 // "CYCLING" - Commute time is calculated based on biking time.
423 CommuteMethod string `json:"commuteMethod,omitempty"`
424 // DepartureTime: Optional. The departure time used to calculate traffic
425 // impact, represented as google.type.TimeOfDay in local time zone. Currently
426 // traffic model is restricted to hour level resolution.
427 DepartureTime *TimeOfDay `json:"departureTime,omitempty"`
428 // RoadTraffic: Optional. Specifies the traffic density to use when calculating
429 // commute time.
430 //
431 // Possible values:
432 // "ROAD_TRAFFIC_UNSPECIFIED" - Road traffic situation is not specified.
433 // "TRAFFIC_FREE" - Optimal commute time without considering any traffic
434 // impact.
435 // "BUSY_HOUR" - Commute time calculation takes in account the peak traffic
436 // impact.
437 RoadTraffic string `json:"roadTraffic,omitempty"`
438 // StartCoordinates: Required. The latitude and longitude of the location from
439 // which to calculate the commute time.
440 StartCoordinates *LatLng `json:"startCoordinates,omitempty"`
441 // TravelDuration: Required. The maximum travel time in seconds. The maximum
442 // allowed value is `3600s` (one hour). Format is `123s`.
443 TravelDuration string `json:"travelDuration,omitempty"`
444 // ForceSendFields is a list of field names (e.g. "AllowImpreciseAddresses") to
445 // unconditionally include in API requests. By default, fields with empty or
446 // default values are omitted from API requests. See
447 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
448 // details.
449 ForceSendFields []string `json:"-"`
450 // NullFields is a list of field names (e.g. "AllowImpreciseAddresses") to
451 // include in API requests with the JSON null value. By default, fields with
452 // empty values are omitted from API requests. See
453 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
454 NullFields []string `json:"-"`
455 }
456
457 func (s CommuteFilter) MarshalJSON() ([]byte, error) {
458 type NoMethod CommuteFilter
459 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
460 }
461
462 // CommuteInfo: Output only. Commute details related to this job.
463 type CommuteInfo struct {
464 // JobLocation: Location used as the destination in the commute calculation.
465 JobLocation *Location `json:"jobLocation,omitempty"`
466 // TravelDuration: The number of seconds required to travel to the job location
467 // from the query location. A duration of 0 seconds indicates that the job is
468 // not reachable within the requested duration, but was returned as part of an
469 // expanded query.
470 TravelDuration string `json:"travelDuration,omitempty"`
471 // ForceSendFields is a list of field names (e.g. "JobLocation") to
472 // unconditionally include in API requests. By default, fields with empty or
473 // default values are omitted from API requests. See
474 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
475 // details.
476 ForceSendFields []string `json:"-"`
477 // NullFields is a list of field names (e.g. "JobLocation") to include in API
478 // requests with the JSON null value. By default, fields with empty values are
479 // omitted from API requests. See
480 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
481 NullFields []string `json:"-"`
482 }
483
484 func (s CommuteInfo) MarshalJSON() ([]byte, error) {
485 type NoMethod CommuteInfo
486 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
487 }
488
489 // Company: A Company resource represents a company in the service. A company
490 // is the entity that owns job postings, that is, the hiring entity responsible
491 // for employing applicants for the job position.
492 type Company struct {
493 // CareerSiteUri: Optional. The URI to employer's career site or careers page
494 // on the employer's web site, for example, "https://careers.google.com".
495 CareerSiteUri string `json:"careerSiteUri,omitempty"`
496 // DerivedInfo: Output only. Derived details about the company.
497 DerivedInfo *CompanyDerivedInfo `json:"derivedInfo,omitempty"`
498 // DisplayName: Required. The display name of the company, for example, "Google
499 // LLC".
500 DisplayName string `json:"displayName,omitempty"`
501 // EeoText: Optional. Equal Employment Opportunity legal disclaimer text to be
502 // associated with all jobs, and typically to be displayed in all roles. The
503 // maximum number of allowed characters is 500.
504 EeoText string `json:"eeoText,omitempty"`
505 // ExternalId: Required. Client side company identifier, used to uniquely
506 // identify the company. The maximum number of allowed characters is 255.
507 ExternalId string `json:"externalId,omitempty"`
508 // HeadquartersAddress: Optional. The street address of the company's main
509 // headquarters, which may be different from the job location. The service
510 // attempts to geolocate the provided address, and populates a more specific
511 // location wherever possible in DerivedInfo.headquarters_location.
512 HeadquartersAddress string `json:"headquartersAddress,omitempty"`
513 // HiringAgency: Optional. Set to true if it is the hiring agency that post
514 // jobs for other employers. Defaults to false if not provided.
515 HiringAgency bool `json:"hiringAgency,omitempty"`
516 // ImageUri: Optional. A URI that hosts the employer's company logo.
517 ImageUri string `json:"imageUri,omitempty"`
518 // KeywordSearchableJobCustomAttributes: Optional. This field is deprecated.
519 // Please set the searchability of the custom attribute in the
520 // Job.custom_attributes going forward. A list of keys of filterable
521 // Job.custom_attributes, whose corresponding `string_values` are used in
522 // keyword search. Jobs with `string_values` under these specified field keys
523 // are returned if any of the values matches the search keyword. Custom field
524 // values with parenthesis, brackets and special symbols won't be properly
525 // searchable, and those keyword queries need to be surrounded by quotes.
526 KeywordSearchableJobCustomAttributes []string `json:"keywordSearchableJobCustomAttributes,omitempty"`
527 // Name: Required during company update. The resource name for a company. This
528 // is generated by the service when a company is created. The format is
529 // "projects/{project_id}/companies/{company_id}", for example,
530 // "projects/api-test-project/companies/foo".
531 Name string `json:"name,omitempty"`
532 // Size: Optional. The employer's company size.
533 //
534 // Possible values:
535 // "COMPANY_SIZE_UNSPECIFIED" - Default value if the size is not specified.
536 // "MINI" - The company has less than 50 employees.
537 // "SMALL" - The company has between 50 and 99 employees.
538 // "SMEDIUM" - The company has between 100 and 499 employees.
539 // "MEDIUM" - The company has between 500 and 999 employees.
540 // "BIG" - The company has between 1,000 and 4,999 employees.
541 // "BIGGER" - The company has between 5,000 and 9,999 employees.
542 // "GIANT" - The company has 10,000 or more employees.
543 Size string `json:"size,omitempty"`
544 // Suspended: Output only. Indicates whether a company is flagged to be
545 // suspended from public availability by the service when job content appears
546 // suspicious, abusive, or spammy.
547 Suspended bool `json:"suspended,omitempty"`
548 // WebsiteUri: Optional. The URI representing the company's primary web site or
549 // home page, for example, "https://www.google.com". The maximum number of
550 // allowed characters is 255.
551 WebsiteUri string `json:"websiteUri,omitempty"`
552
553 // ServerResponse contains the HTTP response code and headers from the server.
554 googleapi.ServerResponse `json:"-"`
555 // ForceSendFields is a list of field names (e.g. "CareerSiteUri") to
556 // unconditionally include in API requests. By default, fields with empty or
557 // default values are omitted from API requests. See
558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
559 // details.
560 ForceSendFields []string `json:"-"`
561 // NullFields is a list of field names (e.g. "CareerSiteUri") to include in API
562 // requests with the JSON null value. By default, fields with empty values are
563 // omitted from API requests. See
564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
565 NullFields []string `json:"-"`
566 }
567
568 func (s Company) MarshalJSON() ([]byte, error) {
569 type NoMethod Company
570 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
571 }
572
573 // CompanyDerivedInfo: Derived details about the company.
574 type CompanyDerivedInfo struct {
575 // HeadquartersLocation: A structured headquarters location of the company,
576 // resolved from Company.hq_location if provided.
577 HeadquartersLocation *Location `json:"headquartersLocation,omitempty"`
578 // ForceSendFields is a list of field names (e.g. "HeadquartersLocation") to
579 // unconditionally include in API requests. By default, fields with empty or
580 // default values are omitted from API requests. See
581 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
582 // details.
583 ForceSendFields []string `json:"-"`
584 // NullFields is a list of field names (e.g. "HeadquartersLocation") to include
585 // in API requests with the JSON null value. By default, fields with empty
586 // values are omitted from API requests. See
587 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
588 NullFields []string `json:"-"`
589 }
590
591 func (s CompanyDerivedInfo) MarshalJSON() ([]byte, error) {
592 type NoMethod CompanyDerivedInfo
593 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
594 }
595
596 // CompensationEntry: A compensation entry that represents one component of
597 // compensation, such as base pay, bonus, or other compensation type.
598 // Annualization: One compensation entry can be annualized if - it contains
599 // valid amount or range. - and its expected_units_per_year is set or can be
600 // derived. Its annualized range is determined as (amount or range) times
601 // expected_units_per_year.
602 type CompensationEntry struct {
603 // Amount: Optional. Compensation amount.
604 Amount *Money `json:"amount,omitempty"`
605 // Description: Optional. Compensation description. For example, could indicate
606 // equity terms or provide additional context to an estimated bonus.
607 Description string `json:"description,omitempty"`
608 // ExpectedUnitsPerYear: Optional. Expected number of units paid each year. If
609 // not specified, when Job.employment_types is FULLTIME, a default value is
610 // inferred based on unit. Default values: - HOURLY: 2080 - DAILY: 260 -
611 // WEEKLY: 52 - MONTHLY: 12 - ANNUAL: 1
612 ExpectedUnitsPerYear float64 `json:"expectedUnitsPerYear,omitempty"`
613 // Range: Optional. Compensation range.
614 Range *CompensationRange `json:"range,omitempty"`
615 // Type: Optional. Compensation type. Default is
616 // CompensationUnit.COMPENSATION_TYPE_UNSPECIFIED.
617 //
618 // Possible values:
619 // "COMPENSATION_TYPE_UNSPECIFIED" - Default value.
620 // "BASE" - Base compensation: Refers to the fixed amount of money paid to an
621 // employee by an employer in return for work performed. Base compensation does
622 // not include benefits, bonuses or any other potential compensation from an
623 // employer.
624 // "BONUS" - Bonus.
625 // "SIGNING_BONUS" - Signing bonus.
626 // "EQUITY" - Equity.
627 // "PROFIT_SHARING" - Profit sharing.
628 // "COMMISSIONS" - Commission.
629 // "TIPS" - Tips.
630 // "OTHER_COMPENSATION_TYPE" - Other compensation type.
631 Type string `json:"type,omitempty"`
632 // Unit: Optional. Frequency of the specified amount. Default is
633 // CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED.
634 //
635 // Possible values:
636 // "COMPENSATION_UNIT_UNSPECIFIED" - Default value.
637 // "HOURLY" - Hourly.
638 // "DAILY" - Daily.
639 // "WEEKLY" - Weekly
640 // "MONTHLY" - Monthly.
641 // "YEARLY" - Yearly.
642 // "ONE_TIME" - One time.
643 // "OTHER_COMPENSATION_UNIT" - Other compensation units.
644 Unit string `json:"unit,omitempty"`
645 // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally
646 // include in API requests. By default, fields with empty or default values are
647 // omitted from API requests. See
648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
649 // details.
650 ForceSendFields []string `json:"-"`
651 // NullFields is a list of field names (e.g. "Amount") to include in API
652 // requests with the JSON null value. By default, fields with empty values are
653 // omitted from API requests. See
654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
655 NullFields []string `json:"-"`
656 }
657
658 func (s CompensationEntry) MarshalJSON() ([]byte, error) {
659 type NoMethod CompensationEntry
660 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
661 }
662
663 func (s *CompensationEntry) UnmarshalJSON(data []byte) error {
664 type NoMethod CompensationEntry
665 var s1 struct {
666 ExpectedUnitsPerYear gensupport.JSONFloat64 `json:"expectedUnitsPerYear"`
667 *NoMethod
668 }
669 s1.NoMethod = (*NoMethod)(s)
670 if err := json.Unmarshal(data, &s1); err != nil {
671 return err
672 }
673 s.ExpectedUnitsPerYear = float64(s1.ExpectedUnitsPerYear)
674 return nil
675 }
676
677 // CompensationFilter: Input only. Filter on job compensation type and amount.
678 type CompensationFilter struct {
679 // IncludeJobsWithUnspecifiedCompensationRange: Optional. If set to true, jobs
680 // with unspecified compensation range fields are included.
681 IncludeJobsWithUnspecifiedCompensationRange bool `json:"includeJobsWithUnspecifiedCompensationRange,omitempty"`
682 // Range: Optional. Compensation range.
683 Range *CompensationRange `json:"range,omitempty"`
684 // Type: Required. Type of filter.
685 //
686 // Possible values:
687 // "FILTER_TYPE_UNSPECIFIED" - Filter type unspecified. Position holder,
688 // INVALID, should never be used.
689 // "UNIT_ONLY" - Filter by `base compensation entry's` unit. A job is a match
690 // if and only if the job contains a base CompensationEntry and the base
691 // CompensationEntry's unit matches provided units. Populate one or more units.
692 // See CompensationInfo.CompensationEntry for definition of base compensation
693 // entry.
694 // "UNIT_AND_AMOUNT" - Filter by `base compensation entry's` unit and amount
695 // / range. A job is a match if and only if the job contains a base
696 // CompensationEntry, and the base entry's unit matches provided
697 // compensation_units and amount or range overlaps with provided
698 // compensation_range. See CompensationInfo.CompensationEntry for definition of
699 // base compensation entry. Set exactly one units and populate range.
700 // "ANNUALIZED_BASE_AMOUNT" - Filter by annualized base compensation amount
701 // and `base compensation entry's` unit. Populate range and zero or more units.
702 // "ANNUALIZED_TOTAL_AMOUNT" - Filter by annualized total compensation amount
703 // and `base compensation entry's` unit . Populate range and zero or more
704 // units.
705 Type string `json:"type,omitempty"`
706 // Units: Required. Specify desired `base compensation entry's`
707 // CompensationInfo.CompensationUnit.
708 //
709 // Possible values:
710 // "COMPENSATION_UNIT_UNSPECIFIED" - Default value.
711 // "HOURLY" - Hourly.
712 // "DAILY" - Daily.
713 // "WEEKLY" - Weekly
714 // "MONTHLY" - Monthly.
715 // "YEARLY" - Yearly.
716 // "ONE_TIME" - One time.
717 // "OTHER_COMPENSATION_UNIT" - Other compensation units.
718 Units []string `json:"units,omitempty"`
719 // ForceSendFields is a list of field names (e.g.
720 // "IncludeJobsWithUnspecifiedCompensationRange") to unconditionally include in
721 // API requests. By default, fields with empty or default values are omitted
722 // from API requests. See
723 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
724 // details.
725 ForceSendFields []string `json:"-"`
726 // NullFields is a list of field names (e.g.
727 // "IncludeJobsWithUnspecifiedCompensationRange") to include in API requests
728 // with the JSON null value. By default, fields with empty values are omitted
729 // from API requests. See
730 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
731 NullFields []string `json:"-"`
732 }
733
734 func (s CompensationFilter) MarshalJSON() ([]byte, error) {
735 type NoMethod CompensationFilter
736 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
737 }
738
739 // CompensationHistogramRequest: Input only. Compensation based histogram
740 // request.
741 type CompensationHistogramRequest struct {
742 // BucketingOption: Required. Numeric histogram options, like buckets, whether
743 // include min or max value.
744 BucketingOption *NumericBucketingOption `json:"bucketingOption,omitempty"`
745 // Type: Required. Type of the request, representing which field the
746 // histogramming should be performed over. A single request can only specify
747 // one histogram of each `CompensationHistogramRequestType`.
748 //
749 // Possible values:
750 // "COMPENSATION_HISTOGRAM_REQUEST_TYPE_UNSPECIFIED" - Default value.
751 // Invalid.
752 // "BASE" - Histogram by job's base compensation. See CompensationEntry for
753 // definition of base compensation.
754 // "ANNUALIZED_BASE" - Histogram by job's annualized base compensation. See
755 // CompensationEntry for definition of annualized base compensation.
756 // "ANNUALIZED_TOTAL" - Histogram by job's annualized total compensation. See
757 // CompensationEntry for definition of annualized total compensation.
758 Type string `json:"type,omitempty"`
759 // ForceSendFields is a list of field names (e.g. "BucketingOption") to
760 // unconditionally include in API requests. By default, fields with empty or
761 // default values are omitted from API requests. See
762 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
763 // details.
764 ForceSendFields []string `json:"-"`
765 // NullFields is a list of field names (e.g. "BucketingOption") to include in
766 // API requests with the JSON null value. By default, fields with empty values
767 // are omitted from API requests. See
768 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
769 NullFields []string `json:"-"`
770 }
771
772 func (s CompensationHistogramRequest) MarshalJSON() ([]byte, error) {
773 type NoMethod CompensationHistogramRequest
774 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
775 }
776
777 // CompensationHistogramResult: Output only. Compensation based histogram
778 // result.
779 type CompensationHistogramResult struct {
780 // Result: Histogram result.
781 Result *NumericBucketingResult `json:"result,omitempty"`
782 // Type: Type of the request, corresponding to
783 // CompensationHistogramRequest.type.
784 //
785 // Possible values:
786 // "COMPENSATION_HISTOGRAM_REQUEST_TYPE_UNSPECIFIED" - Default value.
787 // Invalid.
788 // "BASE" - Histogram by job's base compensation. See CompensationEntry for
789 // definition of base compensation.
790 // "ANNUALIZED_BASE" - Histogram by job's annualized base compensation. See
791 // CompensationEntry for definition of annualized base compensation.
792 // "ANNUALIZED_TOTAL" - Histogram by job's annualized total compensation. See
793 // CompensationEntry for definition of annualized total compensation.
794 Type string `json:"type,omitempty"`
795 // ForceSendFields is a list of field names (e.g. "Result") to unconditionally
796 // include in API requests. By default, fields with empty or default values are
797 // omitted from API requests. See
798 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
799 // details.
800 ForceSendFields []string `json:"-"`
801 // NullFields is a list of field names (e.g. "Result") to include in API
802 // requests with the JSON null value. By default, fields with empty values are
803 // omitted from API requests. See
804 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
805 NullFields []string `json:"-"`
806 }
807
808 func (s CompensationHistogramResult) MarshalJSON() ([]byte, error) {
809 type NoMethod CompensationHistogramResult
810 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
811 }
812
813 // CompensationInfo: Job compensation details.
814 type CompensationInfo struct {
815 // AnnualizedBaseCompensationRange: Output only. Annualized base compensation
816 // range. Computed as base compensation entry's CompensationEntry.compensation
817 // times CompensationEntry.expected_units_per_year. See CompensationEntry for
818 // explanation on compensation annualization.
819 AnnualizedBaseCompensationRange *CompensationRange `json:"annualizedBaseCompensationRange,omitempty"`
820 // AnnualizedTotalCompensationRange: Output only. Annualized total compensation
821 // range. Computed as all compensation entries' CompensationEntry.compensation
822 // times CompensationEntry.expected_units_per_year. See CompensationEntry for
823 // explanation on compensation annualization.
824 AnnualizedTotalCompensationRange *CompensationRange `json:"annualizedTotalCompensationRange,omitempty"`
825 // Entries: Optional. Job compensation information. At most one entry can be of
826 // type CompensationInfo.CompensationType.BASE, which is referred as ** base
827 // compensation entry ** for the job.
828 Entries []*CompensationEntry `json:"entries,omitempty"`
829 // ForceSendFields is a list of field names (e.g.
830 // "AnnualizedBaseCompensationRange") to unconditionally include in API
831 // requests. By default, fields with empty or default values are omitted from
832 // API requests. See
833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
834 // details.
835 ForceSendFields []string `json:"-"`
836 // NullFields is a list of field names (e.g. "AnnualizedBaseCompensationRange")
837 // to include in API requests with the JSON null value. By default, fields with
838 // empty values are omitted from API requests. See
839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
840 NullFields []string `json:"-"`
841 }
842
843 func (s CompensationInfo) MarshalJSON() ([]byte, error) {
844 type NoMethod CompensationInfo
845 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
846 }
847
848 // CompensationRange: Compensation range.
849 type CompensationRange struct {
850 // MaxCompensation: Optional. The maximum amount of compensation. If left
851 // empty, the value is set to a maximal compensation value and the currency
852 // code is set to match the currency code of min_compensation.
853 MaxCompensation *Money `json:"maxCompensation,omitempty"`
854 // MinCompensation: Optional. The minimum amount of compensation. If left
855 // empty, the value is set to zero and the currency code is set to match the
856 // currency code of max_compensation.
857 MinCompensation *Money `json:"minCompensation,omitempty"`
858 // ForceSendFields is a list of field names (e.g. "MaxCompensation") to
859 // unconditionally include in API requests. By default, fields with empty or
860 // default values are omitted from API requests. See
861 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
862 // details.
863 ForceSendFields []string `json:"-"`
864 // NullFields is a list of field names (e.g. "MaxCompensation") to include in
865 // API requests with the JSON null value. By default, fields with empty values
866 // are omitted from API requests. See
867 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
868 NullFields []string `json:"-"`
869 }
870
871 func (s CompensationRange) MarshalJSON() ([]byte, error) {
872 type NoMethod CompensationRange
873 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
874 }
875
876 // CompleteQueryResponse: Output only. Response of auto-complete query.
877 type CompleteQueryResponse struct {
878 // CompletionResults: Results of the matching job/company candidates.
879 CompletionResults []*CompletionResult `json:"completionResults,omitempty"`
880 // Metadata: Additional information for the API invocation, such as the request
881 // tracking id.
882 Metadata *ResponseMetadata `json:"metadata,omitempty"`
883
884 // ServerResponse contains the HTTP response code and headers from the server.
885 googleapi.ServerResponse `json:"-"`
886 // ForceSendFields is a list of field names (e.g. "CompletionResults") to
887 // unconditionally include in API requests. By default, fields with empty or
888 // default values are omitted from API requests. See
889 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
890 // details.
891 ForceSendFields []string `json:"-"`
892 // NullFields is a list of field names (e.g. "CompletionResults") to include in
893 // API requests with the JSON null value. By default, fields with empty values
894 // are omitted from API requests. See
895 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
896 NullFields []string `json:"-"`
897 }
898
899 func (s CompleteQueryResponse) MarshalJSON() ([]byte, error) {
900 type NoMethod CompleteQueryResponse
901 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
902 }
903
904 // CompletionResult: Output only. Resource that represents completion results.
905 type CompletionResult struct {
906 // ImageUri: The URI of the company image for CompletionType.COMPANY_NAME.
907 ImageUri string `json:"imageUri,omitempty"`
908 // Suggestion: The suggestion for the query.
909 Suggestion string `json:"suggestion,omitempty"`
910 // Type: The completion topic.
911 //
912 // Possible values:
913 // "COMPLETION_TYPE_UNSPECIFIED" - Default value.
914 // "JOB_TITLE" - Only suggest job titles.
915 // "COMPANY_NAME" - Only suggest company names.
916 // "COMBINED" - Suggest both job titles and company names.
917 Type string `json:"type,omitempty"`
918 // ForceSendFields is a list of field names (e.g. "ImageUri") to
919 // unconditionally include in API requests. By default, fields with empty or
920 // default values are omitted from API requests. See
921 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
922 // details.
923 ForceSendFields []string `json:"-"`
924 // NullFields is a list of field names (e.g. "ImageUri") to include in API
925 // requests with the JSON null value. By default, fields with empty values are
926 // omitted from API requests. See
927 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
928 NullFields []string `json:"-"`
929 }
930
931 func (s CompletionResult) MarshalJSON() ([]byte, error) {
932 type NoMethod CompletionResult
933 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
934 }
935
936 // CreateClientEventRequest: The report event request.
937 type CreateClientEventRequest struct {
938 // ClientEvent: Required. Events issued when end user interacts with customer's
939 // application that uses Cloud Talent Solution.
940 ClientEvent *ClientEvent `json:"clientEvent,omitempty"`
941 // ForceSendFields is a list of field names (e.g. "ClientEvent") to
942 // unconditionally include in API requests. By default, fields with empty or
943 // default values are omitted from API requests. See
944 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
945 // details.
946 ForceSendFields []string `json:"-"`
947 // NullFields is a list of field names (e.g. "ClientEvent") to include in API
948 // requests with the JSON null value. By default, fields with empty values are
949 // omitted from API requests. See
950 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
951 NullFields []string `json:"-"`
952 }
953
954 func (s CreateClientEventRequest) MarshalJSON() ([]byte, error) {
955 type NoMethod CreateClientEventRequest
956 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
957 }
958
959 // CreateCompanyRequest: Input only. The Request of the CreateCompany method.
960 type CreateCompanyRequest struct {
961 // Company: Required. The company to be created.
962 Company *Company `json:"company,omitempty"`
963 // ForceSendFields is a list of field names (e.g. "Company") to unconditionally
964 // include in API requests. By default, fields with empty or default values are
965 // omitted from API requests. See
966 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
967 // details.
968 ForceSendFields []string `json:"-"`
969 // NullFields is a list of field names (e.g. "Company") to include in API
970 // requests with the JSON null value. By default, fields with empty values are
971 // omitted from API requests. See
972 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
973 NullFields []string `json:"-"`
974 }
975
976 func (s CreateCompanyRequest) MarshalJSON() ([]byte, error) {
977 type NoMethod CreateCompanyRequest
978 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
979 }
980
981 // CreateJobRequest: Input only. Create job request.
982 type CreateJobRequest struct {
983 // Job: Required. The Job to be created.
984 Job *Job `json:"job,omitempty"`
985 // ForceSendFields is a list of field names (e.g. "Job") to unconditionally
986 // include in API requests. By default, fields with empty or default values are
987 // omitted from API requests. See
988 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
989 // details.
990 ForceSendFields []string `json:"-"`
991 // NullFields is a list of field names (e.g. "Job") to include in API requests
992 // with the JSON null value. By default, fields with empty values are omitted
993 // from API requests. See
994 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
995 NullFields []string `json:"-"`
996 }
997
998 func (s CreateJobRequest) MarshalJSON() ([]byte, error) {
999 type NoMethod CreateJobRequest
1000 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1001 }
1002
1003 // CustomAttribute: Custom attribute values that are either filterable or
1004 // non-filterable.
1005 type CustomAttribute struct {
1006 // Filterable: Optional. If the `filterable` flag is true, the custom field
1007 // values may be used for custom attribute filters
1008 // JobQuery.custom_attribute_filter. If false, these values may not be used for
1009 // custom attribute filters. Default is false.
1010 Filterable bool `json:"filterable,omitempty"`
1011 // LongValues: Optional but exactly one of string_values or long_values must be
1012 // specified. This field is used to perform number range search. (`EQ`, `GT`,
1013 // `GE`, `LE`, `LT`) over filterable `long_value`. Currently at most 1
1014 // long_values is supported.
1015 LongValues googleapi.Int64s `json:"longValues,omitempty"`
1016 // StringValues: Optional but exactly one of string_values or long_values must
1017 // be specified. This field is used to perform a string match
1018 // (`CASE_SENSITIVE_MATCH` or `CASE_INSENSITIVE_MATCH`) search. For filterable
1019 // `string_value`s, a maximum total number of 200 values is allowed, with each
1020 // `string_value` has a byte size of no more than 500B. For unfilterable
1021 // `string_values`, the maximum total byte size of unfilterable `string_values`
1022 // is 50KB. Empty string is not allowed.
1023 StringValues []string `json:"stringValues,omitempty"`
1024 // ForceSendFields is a list of field names (e.g. "Filterable") to
1025 // unconditionally include in API requests. By default, fields with empty or
1026 // default values are omitted from API requests. See
1027 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1028 // details.
1029 ForceSendFields []string `json:"-"`
1030 // NullFields is a list of field names (e.g. "Filterable") to include in API
1031 // requests with the JSON null value. By default, fields with empty values are
1032 // omitted from API requests. See
1033 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1034 NullFields []string `json:"-"`
1035 }
1036
1037 func (s CustomAttribute) MarshalJSON() ([]byte, error) {
1038 type NoMethod CustomAttribute
1039 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1040 }
1041
1042 // CustomAttributeHistogramRequest: Custom attributes histogram request. An
1043 // error is thrown if neither string_value_histogram or
1044 // long_value_histogram_bucketing_option has been defined.
1045 type CustomAttributeHistogramRequest struct {
1046 // Key: Required. Specifies the custom field key to perform a histogram on. If
1047 // specified without `long_value_histogram_bucketing_option`, histogram on
1048 // string values of the given `key` is triggered, otherwise histogram is
1049 // performed on long values.
1050 Key string `json:"key,omitempty"`
1051 // LongValueHistogramBucketingOption: Optional. Specifies buckets used to
1052 // perform a range histogram on Job's filterable long custom field values, or
1053 // min/max value requirements.
1054 LongValueHistogramBucketingOption *NumericBucketingOption `json:"longValueHistogramBucketingOption,omitempty"`
1055 // StringValueHistogram: Optional. If set to true, the response includes the
1056 // histogram value for each key as a string.
1057 StringValueHistogram bool `json:"stringValueHistogram,omitempty"`
1058 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally
1059 // include in API requests. By default, fields with empty or default values are
1060 // omitted from API requests. See
1061 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1062 // details.
1063 ForceSendFields []string `json:"-"`
1064 // NullFields is a list of field names (e.g. "Key") to include in API requests
1065 // with the JSON null value. By default, fields with empty values are omitted
1066 // from API requests. See
1067 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1068 NullFields []string `json:"-"`
1069 }
1070
1071 func (s CustomAttributeHistogramRequest) MarshalJSON() ([]byte, error) {
1072 type NoMethod CustomAttributeHistogramRequest
1073 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1074 }
1075
1076 // CustomAttributeHistogramResult: Output only. Custom attribute histogram
1077 // result.
1078 type CustomAttributeHistogramResult struct {
1079 // Key: Stores the key of custom attribute the histogram is performed on.
1080 Key string `json:"key,omitempty"`
1081 // LongValueHistogramResult: Stores bucketed histogram counting result or
1082 // min/max values for custom attribute long values associated with `key`.
1083 LongValueHistogramResult *NumericBucketingResult `json:"longValueHistogramResult,omitempty"`
1084 // StringValueHistogramResult: Stores a map from the values of string custom
1085 // field associated with `key` to the number of jobs with that value in this
1086 // histogram result.
1087 StringValueHistogramResult map[string]int64 `json:"stringValueHistogramResult,omitempty"`
1088 // ForceSendFields is a list of field names (e.g. "Key") to unconditionally
1089 // include in API requests. By default, fields with empty or default values are
1090 // omitted from API requests. See
1091 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1092 // details.
1093 ForceSendFields []string `json:"-"`
1094 // NullFields is a list of field names (e.g. "Key") to include in API requests
1095 // with the JSON null value. By default, fields with empty values are omitted
1096 // from API requests. See
1097 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1098 NullFields []string `json:"-"`
1099 }
1100
1101 func (s CustomAttributeHistogramResult) MarshalJSON() ([]byte, error) {
1102 type NoMethod CustomAttributeHistogramResult
1103 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1104 }
1105
1106 // CustomRankingInfo: Input only. Custom ranking information for
1107 // SearchJobsRequest.
1108 type CustomRankingInfo struct {
1109 // ImportanceLevel: Required. Controls over how important the score of
1110 // CustomRankingInfo.ranking_expression gets applied to job's final ranking
1111 // position. An error is thrown if not specified.
1112 //
1113 // Possible values:
1114 // "IMPORTANCE_LEVEL_UNSPECIFIED" - Default value if the importance level is
1115 // not specified.
1116 // "NONE" - The given ranking expression is of None importance, existing
1117 // relevance score (determined by API algorithm) dominates job's final ranking
1118 // position.
1119 // "LOW" - The given ranking expression is of Low importance in terms of
1120 // job's final ranking position compared to existing relevance score
1121 // (determined by API algorithm).
1122 // "MILD" - The given ranking expression is of Mild importance in terms of
1123 // job's final ranking position compared to existing relevance score
1124 // (determined by API algorithm).
1125 // "MEDIUM" - The given ranking expression is of Medium importance in terms
1126 // of job's final ranking position compared to existing relevance score
1127 // (determined by API algorithm).
1128 // "HIGH" - The given ranking expression is of High importance in terms of
1129 // job's final ranking position compared to existing relevance score
1130 // (determined by API algorithm).
1131 // "EXTREME" - The given ranking expression is of Extreme importance, and
1132 // dominates job's final ranking position with existing relevance score
1133 // (determined by API algorithm) ignored.
1134 ImportanceLevel string `json:"importanceLevel,omitempty"`
1135 // RankingExpression: Required. Controls over how job documents get ranked on
1136 // top of existing relevance score (determined by API algorithm). A combination
1137 // of the ranking expression and relevance score is used to determine job's
1138 // final ranking position. The syntax for this expression is a subset of Google
1139 // SQL syntax. Supported operators are: +, -, *, /, where the left and right
1140 // side of the operator is either a numeric Job.custom_attributes key,
1141 // integer/double value or an expression that can be evaluated to a number.
1142 // Parenthesis are supported to adjust calculation precedence. The expression
1143 // must be < 200 characters in length. The expression is considered invalid for
1144 // a job if the expression references custom attributes that are not populated
1145 // on the job or if the expression results in a divide by zero. If an
1146 // expression is invalid for a job, that job is demoted to the end of the
1147 // results. Sample ranking expression (year + 25) * 0.25 - (freshness / 0.5)
1148 RankingExpression string `json:"rankingExpression,omitempty"`
1149 // ForceSendFields is a list of field names (e.g. "ImportanceLevel") to
1150 // unconditionally include in API requests. By default, fields with empty or
1151 // default values are omitted from API requests. See
1152 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1153 // details.
1154 ForceSendFields []string `json:"-"`
1155 // NullFields is a list of field names (e.g. "ImportanceLevel") to include in
1156 // API requests with the JSON null value. By default, fields with empty values
1157 // are omitted from API requests. See
1158 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1159 NullFields []string `json:"-"`
1160 }
1161
1162 func (s CustomRankingInfo) MarshalJSON() ([]byte, error) {
1163 type NoMethod CustomRankingInfo
1164 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1165 }
1166
1167 // DeviceInfo: Device information collected from the job seeker, candidate, or
1168 // other entity conducting the job search. Providing this information improves
1169 // the quality of the search results across devices.
1170 type DeviceInfo struct {
1171 // DeviceType: Optional. Type of the device.
1172 //
1173 // Possible values:
1174 // "DEVICE_TYPE_UNSPECIFIED" - The device type isn't specified.
1175 // "WEB" - A desktop web browser, such as, Chrome, Firefox, Safari, or
1176 // Internet Explorer)
1177 // "MOBILE_WEB" - A mobile device web browser, such as a phone or tablet with
1178 // a Chrome browser.
1179 // "ANDROID" - An Android device native application.
1180 // "IOS" - An iOS device native application.
1181 // "BOT" - A bot, as opposed to a device operated by human beings, such as a
1182 // web crawler.
1183 // "OTHER" - Other devices types.
1184 DeviceType string `json:"deviceType,omitempty"`
1185 // Id: Optional. A device-specific ID. The ID must be a unique identifier that
1186 // distinguishes the device from other devices.
1187 Id string `json:"id,omitempty"`
1188 // ForceSendFields is a list of field names (e.g. "DeviceType") to
1189 // unconditionally include in API requests. By default, fields with empty or
1190 // default values are omitted from API requests. See
1191 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1192 // details.
1193 ForceSendFields []string `json:"-"`
1194 // NullFields is a list of field names (e.g. "DeviceType") to include in API
1195 // requests with the JSON null value. By default, fields with empty values are
1196 // omitted from API requests. See
1197 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1198 NullFields []string `json:"-"`
1199 }
1200
1201 func (s DeviceInfo) MarshalJSON() ([]byte, error) {
1202 type NoMethod DeviceInfo
1203 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1204 }
1205
1206 // Empty: A generic empty message that you can re-use to avoid defining
1207 // duplicated empty messages in your APIs. A typical example is to use it as
1208 // the request or the response type of an API method. For instance: service Foo
1209 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1210 type Empty struct {
1211 // ServerResponse contains the HTTP response code and headers from the server.
1212 googleapi.ServerResponse `json:"-"`
1213 }
1214
1215 // HistogramFacets: Input only. Histogram facets to be specified in
1216 // SearchJobsRequest.
1217 type HistogramFacets struct {
1218 // CompensationHistogramFacets: Optional. Specifies compensation field-based
1219 // histogram requests. Duplicate values of CompensationHistogramRequest.type
1220 // are not allowed.
1221 CompensationHistogramFacets []*CompensationHistogramRequest `json:"compensationHistogramFacets,omitempty"`
1222 // CustomAttributeHistogramFacets: Optional. Specifies the custom attributes
1223 // histogram requests. Duplicate values of CustomAttributeHistogramRequest.key
1224 // are not allowed.
1225 CustomAttributeHistogramFacets []*CustomAttributeHistogramRequest `json:"customAttributeHistogramFacets,omitempty"`
1226 // SimpleHistogramFacets: Optional. Specifies the simple type of histogram
1227 // facets, for example, `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc.
1228 //
1229 // Possible values:
1230 // "SEARCH_TYPE_UNSPECIFIED" - The default value if search type is not
1231 // specified.
1232 // "COMPANY_ID" - Filter by the company id field.
1233 // "EMPLOYMENT_TYPE" - Filter by the employment type field, such as
1234 // `FULL_TIME` or `PART_TIME`.
1235 // "COMPANY_SIZE" - Filter by the company size type field, such as `BIG`,
1236 // `SMALL` or `BIGGER`.
1237 // "DATE_PUBLISHED" - Filter by the date published field. Possible return
1238 // values are: * PAST_24_HOURS (The past 24 hours) * PAST_3_DAYS (The past 3
1239 // days) * PAST_WEEK (The past 7 days) * PAST_MONTH (The past 30 days) *
1240 // PAST_YEAR (The past 365 days)
1241 // "EDUCATION_LEVEL" - Filter by the required education level of the job.
1242 // "EXPERIENCE_LEVEL" - Filter by the required experience level of the job.
1243 // "ADMIN_1" - Filter by Admin1, which is a global placeholder for referring
1244 // to state, province, or the particular term a country uses to define the
1245 // geographic structure below the country level. Examples include states codes
1246 // such as "CA", "IL", "NY", and provinces, such as "BC".
1247 // "COUNTRY" - Filter by the country code of job, such as US, JP, FR.
1248 // "CITY" - Filter by the "city name", "Admin1 code", for example, "Mountain
1249 // View, CA" or "New York, NY".
1250 // "LOCALE" - Filter by the locale field of a job, such as "en-US", "fr-FR".
1251 // This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more
1252 // information, see [Tags for Identifying
1253 // Languages](https://tools.ietf.org/html/bcp47).
1254 // "LANGUAGE" - Filter by the language code portion of the locale field, such
1255 // as "en" or "fr".
1256 // "CATEGORY" - Filter by the Category.
1257 // "CITY_COORDINATE" - Filter by the city center GPS coordinate (latitude and
1258 // longitude), for example, 37.4038522,-122.0987765. Since the coordinates of a
1259 // city center can change, clients may need to refresh them periodically.
1260 // "ADMIN_1_COUNTRY" - A combination of state or province code with a country
1261 // code. This field differs from `JOB_ADMIN1`, which can be used in multiple
1262 // countries.
1263 // "COMPANY_DISPLAY_NAME" - Company display name.
1264 // "BASE_COMPENSATION_UNIT" - Base compensation unit.
1265 SimpleHistogramFacets []string `json:"simpleHistogramFacets,omitempty"`
1266 // ForceSendFields is a list of field names (e.g.
1267 // "CompensationHistogramFacets") to unconditionally include in API requests.
1268 // By default, fields with empty or default values are omitted from API
1269 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1270 // for more details.
1271 ForceSendFields []string `json:"-"`
1272 // NullFields is a list of field names (e.g. "CompensationHistogramFacets") to
1273 // include in API requests with the JSON null value. By default, fields with
1274 // empty values are omitted from API requests. See
1275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1276 NullFields []string `json:"-"`
1277 }
1278
1279 func (s HistogramFacets) MarshalJSON() ([]byte, error) {
1280 type NoMethod HistogramFacets
1281 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1282 }
1283
1284 // HistogramQuery: Input Only. The histogram request.
1285 type HistogramQuery struct {
1286 // HistogramQuery: An expression specifies a histogram request against matching
1287 // resources (for example, jobs) for searches. Expression syntax is a
1288 // aggregation function call with histogram facets and other options. Available
1289 // aggregation function calls are: * `count(string_histogram_facet)`: Count the
1290 // number of matching entity, for each distinct attribute value. *
1291 // `count(numeric_histogram_facet, list of buckets)`: Count the number of
1292 // matching entity within each bucket. A maximum of 200 histogram buckets are
1293 // supported. Data types: * Histogram facet: facet names with format a-zA-Z+. *
1294 // String: string like "any string with backslash escape for quote(\")." *
1295 // Number: whole number and floating point number like 10, -1 and -0.01. *
1296 // List: list of elements with comma(,) separator surrounded by square
1297 // brackets. For example, [1, 2, 3] and ["one", "two", "three"]. Built-in
1298 // constants: * MIN (minimum number similar to java Double.MIN_VALUE) * MAX
1299 // (maximum number similar to java Double.MAX_VALUE) Built-in functions: *
1300 // bucket(start, end[, label]): bucket built-in function creates a bucket with
1301 // range of start, end). Note that the end is exclusive. For example, bucket(1,
1302 // MAX, "positive number") or bucket(1, 10). Job histogram facets: *
1303 // company_id: histogram by [Job.distributor_company_id. *
1304 // company_display_name: histogram by Job.company_display_name. *
1305 // employment_type: histogram by Job.employment_types. For example,
1306 // "FULL_TIME", "PART_TIME". * company_size (DEPRECATED): histogram by
1307 // CompanySize, for example, "SMALL", "MEDIUM", "BIG". * publish_time_in_day:
1308 // histogram by the Job.publish_time in days. Must specify list of numeric
1309 // buckets in spec. * publish_time_in_month: histogram by the Job.publish_time
1310 // in months. Must specify list of numeric buckets in spec. *
1311 // publish_time_in_year: histogram by the Job.publish_time in years. Must
1312 // specify list of numeric buckets in spec. * degree_type: histogram by the
1313 // Job.degree_type. For example, "Bachelors", "Masters". * job_level: histogram
1314 // by the Job.job_level. For example, "Entry Level". * country: histogram by
1315 // the country code of jobs. For example, "US", "FR". * admin1: histogram by
1316 // the admin1 code of jobs, which is a global placeholder referring to the
1317 // state, province, or the particular term a country uses to define the
1318 // geographic structure below the country level. For example, "CA", "IL". *
1319 // city: histogram by a combination of the "city name, admin1 code". For
1320 // example, "Mountain View, CA", "New York, NY". * admin1_country: histogram by
1321 // a combination of the "admin1 code, country". For example, "CA, US", "IL,
1322 // US". * city_coordinate: histogram by the city center's GPS coordinates
1323 // (latitude and longitude). For example, 37.4038522,-122.0987765. Since the
1324 // coordinates of a city center can change, customers may need to refresh them
1325 // periodically. * locale: histogram by the Job.language_code. For example,
1326 // "en-US", "fr-FR". * language: histogram by the language subtag of the
1327 // Job.language_code. For example, "en", "fr". * category: histogram by the
1328 // JobCategory. For example, "COMPUTER_AND_IT", "HEALTHCARE". *
1329 // base_compensation_unit: histogram by the CompensationUnit of base salary.
1330 // For example, "WEEKLY", "MONTHLY". * base_compensation: histogram by the base
1331 // salary. Must specify list of numeric buckets to group results by. *
1332 // annualized_base_compensation: histogram by the base annualized salary. Must
1333 // specify list of numeric buckets to group results by. *
1334 // annualized_total_compensation: histogram by the total annualized salary.
1335 // Must specify list of numeric buckets to group results by. *
1336 // string_custom_attribute: histogram by string Job.custom_attributes. Values
1337 // can be accessed via square bracket notations like
1338 // string_custom_attribute["key1"]. * numeric_custom_attribute: histogram by
1339 // numeric Job.custom_attributes. Values can be accessed via square bracket
1340 // notations like numeric_custom_attribute["key1"]. Must specify list of
1341 // numeric buckets to group results by. Example expressions: * count(admin1) *
1342 // count(base_compensation, [bucket(1000, 10000), bucket(10000, 100000),
1343 // bucket(100000, MAX)]) *
1344 // count(string_custom_attribute["some-string-custom-attribute"]) *
1345 // count(numeric_custom_attribute["some-numeric-custom-attribute"],
1346 // [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])
1347 HistogramQuery string `json:"histogramQuery,omitempty"`
1348 // ForceSendFields is a list of field names (e.g. "HistogramQuery") to
1349 // unconditionally include in API requests. By default, fields with empty or
1350 // default values are omitted from API requests. See
1351 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1352 // details.
1353 ForceSendFields []string `json:"-"`
1354 // NullFields is a list of field names (e.g. "HistogramQuery") to include in
1355 // API requests with the JSON null value. By default, fields with empty values
1356 // are omitted from API requests. See
1357 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1358 NullFields []string `json:"-"`
1359 }
1360
1361 func (s HistogramQuery) MarshalJSON() ([]byte, error) {
1362 type NoMethod HistogramQuery
1363 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1364 }
1365
1366 // HistogramQueryResult: Output only. Histogram result that matches
1367 // HistogramSpec specified in searches.
1368 type HistogramQueryResult struct {
1369 // Histogram: A map from the values of the facet associated with distinct
1370 // values to the number of matching entries with corresponding value. The key
1371 // format is: * (for string histogram) string values stored in the field. *
1372 // (for named numeric bucket) name specified in `bucket()` function, like for
1373 // `bucket(0, MAX, "non-negative")`, the key will be `non-negative`. * (for
1374 // anonymous numeric bucket) range formatted as `-`, for example, `0-1000`,
1375 // `MIN-0`, and `0-MAX`.
1376 Histogram map[string]string `json:"histogram,omitempty"`
1377 // HistogramQuery: Requested histogram expression.
1378 HistogramQuery string `json:"histogramQuery,omitempty"`
1379 // ForceSendFields is a list of field names (e.g. "Histogram") to
1380 // unconditionally include in API requests. By default, fields with empty or
1381 // default values are omitted from API requests. See
1382 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1383 // details.
1384 ForceSendFields []string `json:"-"`
1385 // NullFields is a list of field names (e.g. "Histogram") to include in API
1386 // requests with the JSON null value. By default, fields with empty values are
1387 // omitted from API requests. See
1388 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1389 NullFields []string `json:"-"`
1390 }
1391
1392 func (s HistogramQueryResult) MarshalJSON() ([]byte, error) {
1393 type NoMethod HistogramQueryResult
1394 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1395 }
1396
1397 // HistogramResult: Output only. Result of a histogram call. The response
1398 // contains the histogram map for the search type specified by
1399 // HistogramResult.field. The response is a map of each filter value to the
1400 // corresponding count of jobs for that filter.
1401 type HistogramResult struct {
1402 // SearchType: The Histogram search filters.
1403 //
1404 // Possible values:
1405 // "SEARCH_TYPE_UNSPECIFIED" - The default value if search type is not
1406 // specified.
1407 // "COMPANY_ID" - Filter by the company id field.
1408 // "EMPLOYMENT_TYPE" - Filter by the employment type field, such as
1409 // `FULL_TIME` or `PART_TIME`.
1410 // "COMPANY_SIZE" - Filter by the company size type field, such as `BIG`,
1411 // `SMALL` or `BIGGER`.
1412 // "DATE_PUBLISHED" - Filter by the date published field. Possible return
1413 // values are: * PAST_24_HOURS (The past 24 hours) * PAST_3_DAYS (The past 3
1414 // days) * PAST_WEEK (The past 7 days) * PAST_MONTH (The past 30 days) *
1415 // PAST_YEAR (The past 365 days)
1416 // "EDUCATION_LEVEL" - Filter by the required education level of the job.
1417 // "EXPERIENCE_LEVEL" - Filter by the required experience level of the job.
1418 // "ADMIN_1" - Filter by Admin1, which is a global placeholder for referring
1419 // to state, province, or the particular term a country uses to define the
1420 // geographic structure below the country level. Examples include states codes
1421 // such as "CA", "IL", "NY", and provinces, such as "BC".
1422 // "COUNTRY" - Filter by the country code of job, such as US, JP, FR.
1423 // "CITY" - Filter by the "city name", "Admin1 code", for example, "Mountain
1424 // View, CA" or "New York, NY".
1425 // "LOCALE" - Filter by the locale field of a job, such as "en-US", "fr-FR".
1426 // This is the BCP-47 language code, such as "en-US" or "sr-Latn". For more
1427 // information, see [Tags for Identifying
1428 // Languages](https://tools.ietf.org/html/bcp47).
1429 // "LANGUAGE" - Filter by the language code portion of the locale field, such
1430 // as "en" or "fr".
1431 // "CATEGORY" - Filter by the Category.
1432 // "CITY_COORDINATE" - Filter by the city center GPS coordinate (latitude and
1433 // longitude), for example, 37.4038522,-122.0987765. Since the coordinates of a
1434 // city center can change, clients may need to refresh them periodically.
1435 // "ADMIN_1_COUNTRY" - A combination of state or province code with a country
1436 // code. This field differs from `JOB_ADMIN1`, which can be used in multiple
1437 // countries.
1438 // "COMPANY_DISPLAY_NAME" - Company display name.
1439 // "BASE_COMPENSATION_UNIT" - Base compensation unit.
1440 SearchType string `json:"searchType,omitempty"`
1441 // Values: A map from the values of field to the number of jobs with that value
1442 // in this search result. Key: search type (filter names, such as the
1443 // companyName). Values: the count of jobs that match the filter for this
1444 // search.
1445 Values map[string]int64 `json:"values,omitempty"`
1446 // ForceSendFields is a list of field names (e.g. "SearchType") to
1447 // unconditionally include in API requests. By default, fields with empty or
1448 // default values are omitted from API requests. See
1449 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1450 // details.
1451 ForceSendFields []string `json:"-"`
1452 // NullFields is a list of field names (e.g. "SearchType") to include in API
1453 // requests with the JSON null value. By default, fields with empty values are
1454 // omitted from API requests. See
1455 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1456 NullFields []string `json:"-"`
1457 }
1458
1459 func (s HistogramResult) MarshalJSON() ([]byte, error) {
1460 type NoMethod HistogramResult
1461 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1462 }
1463
1464 // HistogramResults: Output only. Histogram results that match HistogramFacets
1465 // specified in SearchJobsRequest.
1466 type HistogramResults struct {
1467 // CompensationHistogramResults: Specifies compensation field-based histogram
1468 // results that match HistogramFacets.compensation_histogram_requests.
1469 CompensationHistogramResults []*CompensationHistogramResult `json:"compensationHistogramResults,omitempty"`
1470 // CustomAttributeHistogramResults: Specifies histogram results for custom
1471 // attributes that match HistogramFacets.custom_attribute_histogram_facets.
1472 CustomAttributeHistogramResults []*CustomAttributeHistogramResult `json:"customAttributeHistogramResults,omitempty"`
1473 // SimpleHistogramResults: Specifies histogram results that matches
1474 // HistogramFacets.simple_histogram_facets.
1475 SimpleHistogramResults []*HistogramResult `json:"simpleHistogramResults,omitempty"`
1476 // ForceSendFields is a list of field names (e.g.
1477 // "CompensationHistogramResults") to unconditionally include in API requests.
1478 // By default, fields with empty or default values are omitted from API
1479 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
1480 // for more details.
1481 ForceSendFields []string `json:"-"`
1482 // NullFields is a list of field names (e.g. "CompensationHistogramResults") to
1483 // include in API requests with the JSON null value. By default, fields with
1484 // empty values are omitted from API requests. See
1485 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1486 NullFields []string `json:"-"`
1487 }
1488
1489 func (s HistogramResults) MarshalJSON() ([]byte, error) {
1490 type NoMethod HistogramResults
1491 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1492 }
1493
1494 // Job: A Job resource represents a job posting (also referred to as a "job
1495 // listing" or "job requisition"). A job belongs to a Company, which is the
1496 // hiring entity responsible for the job.
1497 type Job struct {
1498 // Addresses: Optional but strongly recommended for the best service
1499 // experience. Location(s) where the employer is looking to hire for this job
1500 // posting. Specifying the full street address(es) of the hiring location
1501 // enables better API results, especially job searches by commute time. At most
1502 // 50 locations are allowed for best search performance. If a job has more
1503 // locations, it is suggested to split it into multiple jobs with unique
1504 // requisition_ids (e.g. 'ReqA' becomes 'ReqA-1', 'ReqA-2', etc.) as multiple
1505 // jobs with the same company_name, language_code and requisition_id are not
1506 // allowed. If the original requisition_id must be preserved, a custom field
1507 // should be used for storage. It is also suggested to group the locations that
1508 // close to each other in the same job for better search experience. Jobs with
1509 // multiple addresses must have their addresses with the same LocationType to
1510 // allow location filtering to work properly. (For example, a Job with
1511 // addresses "1600 Amphitheatre Parkway, Mountain View, CA, USA" and "London,
1512 // UK" may not have location filters applied correctly at search time since the
1513 // first is a LocationType.STREET_ADDRESS and the second is a
1514 // LocationType.LOCALITY.) If a job needs to have multiple addresses, it is
1515 // suggested to split it into multiple jobs with same LocationTypes. The
1516 // maximum number of allowed characters is 500.
1517 Addresses []string `json:"addresses,omitempty"`
1518 // ApplicationInfo: Required. At least one field within ApplicationInfo must be
1519 // specified. Job application information.
1520 ApplicationInfo *ApplicationInfo `json:"applicationInfo,omitempty"`
1521 // CompanyDisplayName: Output only. Display name of the company listing the
1522 // job.
1523 CompanyDisplayName string `json:"companyDisplayName,omitempty"`
1524 // CompanyName: Required. The resource name of the company listing the job,
1525 // such as "projects/api-test-project/companies/foo".
1526 CompanyName string `json:"companyName,omitempty"`
1527 // CompensationInfo: Optional. Job compensation information.
1528 CompensationInfo *CompensationInfo `json:"compensationInfo,omitempty"`
1529 // CustomAttributes: Optional. A map of fields to hold both filterable and
1530 // non-filterable custom job attributes that are not covered by the provided
1531 // structured fields. The keys of the map are strings up to 64 bytes and must
1532 // match the pattern: a-zA-Z*. For example, key0LikeThis or KEY_1_LIKE_THIS. At
1533 // most 100 filterable and at most 100 unfilterable keys are supported. For
1534 // filterable `string_values`, across all keys at most 200 values are allowed,
1535 // with each string no more than 255 characters. For unfilterable
1536 // `string_values`, the maximum total size of `string_values` across all keys
1537 // is 50KB.
1538 CustomAttributes map[string]CustomAttribute `json:"customAttributes,omitempty"`
1539 // DegreeTypes: Optional. The desired education degrees for the job, such as
1540 // Bachelors, Masters.
1541 //
1542 // Possible values:
1543 // "DEGREE_TYPE_UNSPECIFIED" - Default value. Represents no degree, or early
1544 // childhood education. Maps to ISCED code 0. Ex) Kindergarten
1545 // "PRIMARY_EDUCATION" - Primary education which is typically the first stage
1546 // of compulsory education. ISCED code 1. Ex) Elementary school
1547 // "LOWER_SECONDARY_EDUCATION" - Lower secondary education; First stage of
1548 // secondary education building on primary education, typically with a more
1549 // subject-oriented curriculum. ISCED code 2. Ex) Middle school
1550 // "UPPER_SECONDARY_EDUCATION" - Middle education; Second/final stage of
1551 // secondary education preparing for tertiary education and/or providing skills
1552 // relevant to employment. Usually with an increased range of subject options
1553 // and streams. ISCED code 3. Ex) High school
1554 // "ADULT_REMEDIAL_EDUCATION" - Adult Remedial Education; Programmes
1555 // providing learning experiences that build on secondary education and prepare
1556 // for labour market entry and/or tertiary education. The content is broader
1557 // than secondary but not as complex as tertiary education. ISCED code 4.
1558 // "ASSOCIATES_OR_EQUIVALENT" - Associate's or equivalent; Short first
1559 // tertiary programmes that are typically practically-based,
1560 // occupationally-specific and prepare for labour market entry. These
1561 // programmes may also provide a pathway to other tertiary programmes. ISCED
1562 // code 5.
1563 // "BACHELORS_OR_EQUIVALENT" - Bachelor's or equivalent; Programmes designed
1564 // to provide intermediate academic and/or professional knowledge, skills and
1565 // competencies leading to a first tertiary degree or equivalent qualification.
1566 // ISCED code 6.
1567 // "MASTERS_OR_EQUIVALENT" - Master's or equivalent; Programmes designed to
1568 // provide advanced academic and/or professional knowledge, skills and
1569 // competencies leading to a second tertiary degree or equivalent
1570 // qualification. ISCED code 7.
1571 // "DOCTORAL_OR_EQUIVALENT" - Doctoral or equivalent; Programmes designed
1572 // primarily to lead to an advanced research qualification, usually concluding
1573 // with the submission and defense of a substantive dissertation of publishable
1574 // quality based on original research. ISCED code 8.
1575 DegreeTypes []string `json:"degreeTypes,omitempty"`
1576 // Department: Optional. The department or functional area within the company
1577 // with the open position. The maximum number of allowed characters is 255.
1578 Department string `json:"department,omitempty"`
1579 // DerivedInfo: Output only. Derived details about the job posting.
1580 DerivedInfo *JobDerivedInfo `json:"derivedInfo,omitempty"`
1581 // Description: Required. The description of the job, which typically includes
1582 // a multi-paragraph description of the company and related information.
1583 // Separate fields are provided on the job object for responsibilities,
1584 // qualifications, and other job characteristics. Use of these separate job
1585 // fields is recommended. This field accepts and sanitizes HTML input, and also
1586 // accepts bold, italic, ordered list, and unordered list markup tags. The
1587 // maximum number of allowed characters is 100,000.
1588 Description string `json:"description,omitempty"`
1589 // EmploymentTypes: Optional. The employment type(s) of a job, for example,
1590 // full time or part time.
1591 //
1592 // Possible values:
1593 // "EMPLOYMENT_TYPE_UNSPECIFIED" - The default value if the employment type
1594 // is not specified.
1595 // "FULL_TIME" - The job requires working a number of hours that constitute
1596 // full time employment, typically 40 or more hours per week.
1597 // "PART_TIME" - The job entails working fewer hours than a full time job,
1598 // typically less than 40 hours a week.
1599 // "CONTRACTOR" - The job is offered as a contracted, as opposed to a
1600 // salaried employee, position.
1601 // "CONTRACT_TO_HIRE" - The job is offered as a contracted position with the
1602 // understanding that it's converted into a full-time position at the end of
1603 // the contract. Jobs of this type are also returned by a search for
1604 // EmploymentType.CONTRACTOR jobs.
1605 // "TEMPORARY" - The job is offered as a temporary employment opportunity,
1606 // usually a short-term engagement.
1607 // "INTERN" - The job is a fixed-term opportunity for students or entry-level
1608 // job seekers to obtain on-the-job training, typically offered as a summer
1609 // position.
1610 // "VOLUNTEER" - The is an opportunity for an individual to volunteer, where
1611 // there's no expectation of compensation for the provided services.
1612 // "PER_DIEM" - The job requires an employee to work on an as-needed basis
1613 // with a flexible schedule.
1614 // "FLY_IN_FLY_OUT" - The job involves employing people in remote areas and
1615 // flying them temporarily to the work site instead of relocating employees and
1616 // their families permanently.
1617 // "OTHER_EMPLOYMENT_TYPE" - The job does not fit any of the other listed
1618 // types.
1619 EmploymentTypes []string `json:"employmentTypes,omitempty"`
1620 // Incentives: Optional. A description of bonus, commission, and other
1621 // compensation incentives associated with the job not including salary or pay.
1622 // The maximum number of allowed characters is 10,000.
1623 Incentives string `json:"incentives,omitempty"`
1624 // JobBenefits: Optional. The benefits included with the job.
1625 //
1626 // Possible values:
1627 // "JOB_BENEFIT_UNSPECIFIED" - Default value if the type is not specified.
1628 // "CHILD_CARE" - The job includes access to programs that support child
1629 // care, such as daycare.
1630 // "DENTAL" - The job includes dental services covered by a dental insurance
1631 // plan.
1632 // "DOMESTIC_PARTNER" - The job offers specific benefits to domestic
1633 // partners.
1634 // "FLEXIBLE_HOURS" - The job allows for a flexible work schedule.
1635 // "MEDICAL" - The job includes health services covered by a medical
1636 // insurance plan.
1637 // "LIFE_INSURANCE" - The job includes a life insurance plan provided by the
1638 // employer or available for purchase by the employee.
1639 // "PARENTAL_LEAVE" - The job allows for a leave of absence to a parent to
1640 // care for a newborn child.
1641 // "RETIREMENT_PLAN" - The job includes a workplace retirement plan provided
1642 // by the employer or available for purchase by the employee.
1643 // "SICK_DAYS" - The job allows for paid time off due to illness.
1644 // "VACATION" - The job includes paid time off for vacation.
1645 // "VISION" - The job includes vision services covered by a vision insurance
1646 // plan.
1647 JobBenefits []string `json:"jobBenefits,omitempty"`
1648 // JobEndTime: Optional. The end timestamp of the job. Typically this field is
1649 // used for contracting engagements. Invalid timestamps are ignored.
1650 JobEndTime string `json:"jobEndTime,omitempty"`
1651 // JobLevel: Optional. The experience level associated with the job, such as
1652 // "Entry Level".
1653 //
1654 // Possible values:
1655 // "JOB_LEVEL_UNSPECIFIED" - The default value if the level is not specified.
1656 // "ENTRY_LEVEL" - Entry-level individual contributors, typically with less
1657 // than 2 years of experience in a similar role. Includes interns.
1658 // "EXPERIENCED" - Experienced individual contributors, typically with 2+
1659 // years of experience in a similar role.
1660 // "MANAGER" - Entry- to mid-level managers responsible for managing a team
1661 // of people.
1662 // "DIRECTOR" - Senior-level managers responsible for managing teams of
1663 // managers.
1664 // "EXECUTIVE" - Executive-level managers and above, including C-level
1665 // positions.
1666 JobLevel string `json:"jobLevel,omitempty"`
1667 // JobStartTime: Optional. The start timestamp of the job in UTC time zone.
1668 // Typically this field is used for contracting engagements. Invalid timestamps
1669 // are ignored.
1670 JobStartTime string `json:"jobStartTime,omitempty"`
1671 // LanguageCode: Optional. The language of the posting. This field is distinct
1672 // from any requirements for fluency that are associated with the job. Language
1673 // codes must be in BCP-47 format, such as "en-US" or "sr-Latn". For more
1674 // information, see Tags for Identifying Languages
1675 // (https://tools.ietf.org/html/bcp47){: class="external" target="_blank" }. If
1676 // this field is unspecified and Job.description is present, detected language
1677 // code based on Job.description is assigned, otherwise defaults to 'en_US'.
1678 LanguageCode string `json:"languageCode,omitempty"`
1679 // Name: Required during job update. The resource name for the job. This is
1680 // generated by the service when a job is created. The format is
1681 // "projects/{project_id}/jobs/{job_id}", for example,
1682 // "projects/api-test-project/jobs/1234". Use of this field in job queries and
1683 // API calls is preferred over the use of requisition_id since this value is
1684 // unique.
1685 Name string `json:"name,omitempty"`
1686 // PostingCreateTime: Output only. The timestamp when this job posting was
1687 // created.
1688 PostingCreateTime string `json:"postingCreateTime,omitempty"`
1689 // PostingExpireTime: Optional but strongly recommended for the best service
1690 // experience. The expiration timestamp of the job. After this timestamp, the
1691 // job is marked as expired, and it no longer appears in search results. The
1692 // expired job can't be deleted or listed by the DeleteJob and ListJobs APIs,
1693 // but it can be retrieved with the GetJob API or updated with the UpdateJob
1694 // API. An expired job can be updated and opened again by using a future
1695 // expiration timestamp. Updating an expired job fails if there is another
1696 // existing open job with same company_name, language_code and requisition_id.
1697 // The expired jobs are retained in our system for 90 days. However, the
1698 // overall expired job count cannot exceed 3 times the maximum of open jobs
1699 // count over the past week, otherwise jobs with earlier expire time are
1700 // cleaned first. Expired jobs are no longer accessible after they are cleaned
1701 // out. Invalid timestamps are ignored, and treated as expire time not
1702 // provided. Timestamp before the instant request is made is considered valid,
1703 // the job will be treated as expired immediately. If this value is not
1704 // provided at the time of job creation or is invalid, the job posting expires
1705 // after 30 days from the job's creation time. For example, if the job was
1706 // created on 2017/01/01 13:00AM UTC with an unspecified expiration date, the
1707 // job expires after 2017/01/31 13:00AM UTC. If this value is not provided on
1708 // job update, it depends on the field masks set by
1709 // UpdateJobRequest.update_mask. If the field masks include expiry_time, or the
1710 // masks are empty meaning that every field is updated, the job posting expires
1711 // after 30 days from the job's last update time. Otherwise the expiration date
1712 // isn't updated.
1713 PostingExpireTime string `json:"postingExpireTime,omitempty"`
1714 // PostingPublishTime: Optional. The timestamp this job posting was most
1715 // recently published. The default value is the time the request arrives at the
1716 // server. Invalid timestamps are ignored.
1717 PostingPublishTime string `json:"postingPublishTime,omitempty"`
1718 // PostingRegion: Optional. The job PostingRegion (for example, state, country)
1719 // throughout which the job is available. If this field is set, a
1720 // LocationFilter in a search query within the job region finds this job
1721 // posting if an exact location match isn't specified. If this field is set to
1722 // PostingRegion.NATION or PostingRegion.ADMINISTRATIVE_AREA, setting job
1723 // Job.addresses to the same location level as this field is strongly
1724 // recommended.
1725 //
1726 // Possible values:
1727 // "POSTING_REGION_UNSPECIFIED" - If the region is unspecified, the job is
1728 // only returned if it matches the LocationFilter.
1729 // "ADMINISTRATIVE_AREA" - In addition to exact location matching, job
1730 // posting is returned when the LocationFilter in the search query is in the
1731 // same administrative area as the returned job posting. For example, if a
1732 // `ADMINISTRATIVE_AREA` job is posted in "CA, USA", it's returned if
1733 // LocationFilter has "Mountain View". Administrative area refers to top-level
1734 // administrative subdivision of this country. For example, US state, IT
1735 // region, UK constituent nation and JP prefecture.
1736 // "NATION" - In addition to exact location matching, job is returned when
1737 // LocationFilter in search query is in the same country as this job. For
1738 // example, if a `NATION_WIDE` job is posted in "USA", it's returned if
1739 // LocationFilter has 'Mountain View'.
1740 // "TELECOMMUTE" - Job allows employees to work remotely (telecommute). If
1741 // locations are provided with this value, the job is considered as having a
1742 // location, but telecommuting is allowed.
1743 PostingRegion string `json:"postingRegion,omitempty"`
1744 // PostingUpdateTime: Output only. The timestamp when this job posting was last
1745 // updated.
1746 PostingUpdateTime string `json:"postingUpdateTime,omitempty"`
1747 // ProcessingOptions: Optional. Options for job processing.
1748 ProcessingOptions *ProcessingOptions `json:"processingOptions,omitempty"`
1749 // PromotionValue: Optional. A promotion value of the job, as determined by the
1750 // client. The value determines the sort order of the jobs returned when
1751 // searching for jobs using the featured jobs search call, with higher
1752 // promotional values being returned first and ties being resolved by relevance
1753 // sort. Only the jobs with a promotionValue >0 are returned in a
1754 // FEATURED_JOB_SEARCH. Default value is 0, and negative values are treated as
1755 // 0.
1756 PromotionValue int64 `json:"promotionValue,omitempty"`
1757 // Qualifications: Optional. A description of the qualifications required to
1758 // perform the job. The use of this field is recommended as an alternative to
1759 // using the more general description field. This field accepts and sanitizes
1760 // HTML input, and also accepts bold, italic, ordered list, and unordered list
1761 // markup tags. The maximum number of allowed characters is 10,000.
1762 Qualifications string `json:"qualifications,omitempty"`
1763 // RequisitionId: Required. The requisition ID, also referred to as the posting
1764 // ID, assigned by the client to identify a job. This field is intended to be
1765 // used by clients for client identification and tracking of postings. A job is
1766 // not allowed to be created if there is another job with the same
1767 // [company_name], language_code and requisition_id. The maximum number of
1768 // allowed characters is 255.
1769 RequisitionId string `json:"requisitionId,omitempty"`
1770 // Responsibilities: Optional. A description of job responsibilities. The use
1771 // of this field is recommended as an alternative to using the more general
1772 // description field. This field accepts and sanitizes HTML input, and also
1773 // accepts bold, italic, ordered list, and unordered list markup tags. The
1774 // maximum number of allowed characters is 10,000.
1775 Responsibilities string `json:"responsibilities,omitempty"`
1776 // Title: Required. The title of the job, such as "Software Engineer" The
1777 // maximum number of allowed characters is 500.
1778 Title string `json:"title,omitempty"`
1779 // Visibility: Deprecated. The job is only visible to the owner. The visibility
1780 // of the job. Defaults to Visibility.ACCOUNT_ONLY if not specified.
1781 //
1782 // Possible values:
1783 // "VISIBILITY_UNSPECIFIED" - Default value.
1784 // "ACCOUNT_ONLY" - The resource is only visible to the GCP account who owns
1785 // it.
1786 // "SHARED_WITH_GOOGLE" - The resource is visible to the owner and may be
1787 // visible to other applications and processes at Google.
1788 // "SHARED_WITH_PUBLIC" - The resource is visible to the owner and may be
1789 // visible to all other API clients.
1790 Visibility string `json:"visibility,omitempty"`
1791
1792 // ServerResponse contains the HTTP response code and headers from the server.
1793 googleapi.ServerResponse `json:"-"`
1794 // ForceSendFields is a list of field names (e.g. "Addresses") to
1795 // unconditionally include in API requests. By default, fields with empty or
1796 // default values are omitted from API requests. See
1797 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1798 // details.
1799 ForceSendFields []string `json:"-"`
1800 // NullFields is a list of field names (e.g. "Addresses") to include in API
1801 // requests with the JSON null value. By default, fields with empty values are
1802 // omitted from API requests. See
1803 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1804 NullFields []string `json:"-"`
1805 }
1806
1807 func (s Job) MarshalJSON() ([]byte, error) {
1808 type NoMethod Job
1809 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1810 }
1811
1812 // JobDerivedInfo: Output only. Derived details about the job posting.
1813 type JobDerivedInfo struct {
1814 // JobCategories: Job categories derived from Job.title and Job.description.
1815 //
1816 // Possible values:
1817 // "JOB_CATEGORY_UNSPECIFIED" - The default value if the category isn't
1818 // specified.
1819 // "ACCOUNTING_AND_FINANCE" - An accounting and finance job, such as an
1820 // Accountant.
1821 // "ADMINISTRATIVE_AND_OFFICE" - An administrative and office job, such as an
1822 // Administrative Assistant.
1823 // "ADVERTISING_AND_MARKETING" - An advertising and marketing job, such as
1824 // Marketing Manager.
1825 // "ANIMAL_CARE" - An animal care job, such as Veterinarian.
1826 // "ART_FASHION_AND_DESIGN" - An art, fashion, or design job, such as
1827 // Designer.
1828 // "BUSINESS_OPERATIONS" - A business operations job, such as Business
1829 // Operations Manager.
1830 // "CLEANING_AND_FACILITIES" - A cleaning and facilities job, such as
1831 // Custodial Staff.
1832 // "COMPUTER_AND_IT" - A computer and IT job, such as Systems Administrator.
1833 // "CONSTRUCTION" - A construction job, such as General Laborer.
1834 // "CUSTOMER_SERVICE" - A customer service job, such s Cashier.
1835 // "EDUCATION" - An education job, such as School Teacher.
1836 // "ENTERTAINMENT_AND_TRAVEL" - An entertainment and travel job, such as
1837 // Flight Attendant.
1838 // "FARMING_AND_OUTDOORS" - A farming or outdoor job, such as Park Ranger.
1839 // "HEALTHCARE" - A healthcare job, such as Registered Nurse.
1840 // "HUMAN_RESOURCES" - A human resources job, such as Human Resources
1841 // Director.
1842 // "INSTALLATION_MAINTENANCE_AND_REPAIR" - An installation, maintenance, or
1843 // repair job, such as Electrician.
1844 // "LEGAL" - A legal job, such as Law Clerk.
1845 // "MANAGEMENT" - A management job, often used in conjunction with another
1846 // category, such as Store Manager.
1847 // "MANUFACTURING_AND_WAREHOUSE" - A manufacturing or warehouse job, such as
1848 // Assembly Technician.
1849 // "MEDIA_COMMUNICATIONS_AND_WRITING" - A media, communications, or writing
1850 // job, such as Media Relations.
1851 // "OIL_GAS_AND_MINING" - An oil, gas or mining job, such as Offshore
1852 // Driller.
1853 // "PERSONAL_CARE_AND_SERVICES" - A personal care and services job, such as
1854 // Hair Stylist.
1855 // "PROTECTIVE_SERVICES" - A protective services job, such as Security Guard.
1856 // "REAL_ESTATE" - A real estate job, such as Buyer's Agent.
1857 // "RESTAURANT_AND_HOSPITALITY" - A restaurant and hospitality job, such as
1858 // Restaurant Server.
1859 // "SALES_AND_RETAIL" - A sales and/or retail job, such Sales Associate.
1860 // "SCIENCE_AND_ENGINEERING" - A science and engineering job, such as Lab
1861 // Technician.
1862 // "SOCIAL_SERVICES_AND_NON_PROFIT" - A social services or non-profit job,
1863 // such as Case Worker.
1864 // "SPORTS_FITNESS_AND_RECREATION" - A sports, fitness, or recreation job,
1865 // such as Personal Trainer.
1866 // "TRANSPORTATION_AND_LOGISTICS" - A transportation or logistics job, such
1867 // as Truck Driver.
1868 JobCategories []string `json:"jobCategories,omitempty"`
1869 // Locations: Structured locations of the job, resolved from Job.addresses.
1870 // locations are exactly matched to Job.addresses in the same order.
1871 Locations []*Location `json:"locations,omitempty"`
1872 // ForceSendFields is a list of field names (e.g. "JobCategories") to
1873 // unconditionally include in API requests. By default, fields with empty or
1874 // default values are omitted from API requests. See
1875 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1876 // details.
1877 ForceSendFields []string `json:"-"`
1878 // NullFields is a list of field names (e.g. "JobCategories") to include in API
1879 // requests with the JSON null value. By default, fields with empty values are
1880 // omitted from API requests. See
1881 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1882 NullFields []string `json:"-"`
1883 }
1884
1885 func (s JobDerivedInfo) MarshalJSON() ([]byte, error) {
1886 type NoMethod JobDerivedInfo
1887 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1888 }
1889
1890 // JobEvent: An event issued when a job seeker interacts with the application
1891 // that implements Cloud Talent Solution.
1892 type JobEvent struct {
1893 // Jobs: Required. The job name(s) associated with this event. For example, if
1894 // this is an impression event, this field contains the identifiers of all jobs
1895 // shown to the job seeker. If this was a view event, this field contains the
1896 // identifier of the viewed job.
1897 Jobs []string `json:"jobs,omitempty"`
1898 // Type: Required. The type of the event (see JobEventType).
1899 //
1900 // Possible values:
1901 // "JOB_EVENT_TYPE_UNSPECIFIED" - The event is unspecified by other provided
1902 // values.
1903 // "IMPRESSION" - The job seeker or other entity interacting with the service
1904 // has had a job rendered in their view, such as in a list of search results in
1905 // a compressed or clipped format. This event is typically associated with the
1906 // viewing of a jobs list on a single page by a job seeker.
1907 // "VIEW" - The job seeker, or other entity interacting with the service, has
1908 // viewed the details of a job, including the full description. This event
1909 // doesn't apply to the viewing a snippet of a job appearing as a part of the
1910 // job search results. Viewing a snippet is associated with an impression).
1911 // "VIEW_REDIRECT" - The job seeker or other entity interacting with the
1912 // service performed an action to view a job and was redirected to a different
1913 // website for job.
1914 // "APPLICATION_START" - The job seeker or other entity interacting with the
1915 // service began the process or demonstrated the intention of applying for a
1916 // job.
1917 // "APPLICATION_FINISH" - The job seeker or other entity interacting with the
1918 // service submitted an application for a job.
1919 // "APPLICATION_QUICK_SUBMISSION" - The job seeker or other entity
1920 // interacting with the service submitted an application for a job with a
1921 // single click without entering information. If a job seeker performs this
1922 // action, send only this event to the service. Do not also send
1923 // JobEventType.APPLICATION_START or JobEventType.APPLICATION_FINISH events.
1924 // "APPLICATION_REDIRECT" - The job seeker or other entity interacting with
1925 // the service performed an action to apply to a job and was redirected to a
1926 // different website to complete the application.
1927 // "APPLICATION_START_FROM_SEARCH" - The job seeker or other entity
1928 // interacting with the service began the process or demonstrated the intention
1929 // of applying for a job from the search results page without viewing the
1930 // details of the job posting. If sending this event, JobEventType.VIEW event
1931 // shouldn't be sent.
1932 // "APPLICATION_REDIRECT_FROM_SEARCH" - The job seeker, or other entity
1933 // interacting with the service, performs an action with a single click from
1934 // the search results page to apply to a job (without viewing the details of
1935 // the job posting), and is redirected to a different website to complete the
1936 // application. If a candidate performs this action, send only this event to
1937 // the service. Do not also send JobEventType.APPLICATION_START,
1938 // JobEventType.APPLICATION_FINISH or JobEventType.VIEW events.
1939 // "APPLICATION_COMPANY_SUBMIT" - This event should be used when a company
1940 // submits an application on behalf of a job seeker. This event is intended for
1941 // use by staffing agencies attempting to place candidates.
1942 // "BOOKMARK" - The job seeker or other entity interacting with the service
1943 // demonstrated an interest in a job by bookmarking or saving it.
1944 // "NOTIFICATION" - The job seeker or other entity interacting with the
1945 // service was sent a notification, such as an email alert or device
1946 // notification, containing one or more jobs listings generated by the service.
1947 // "HIRED" - The job seeker or other entity interacting with the service was
1948 // employed by the hiring entity (employer). Send this event only if the job
1949 // seeker was hired through an application that was initiated by a search
1950 // conducted through the Cloud Talent Solution service.
1951 // "SENT_CV" - A recruiter or staffing agency submitted an application on
1952 // behalf of the candidate after interacting with the service to identify a
1953 // suitable job posting.
1954 // "INTERVIEW_GRANTED" - The entity interacting with the service (for
1955 // example, the job seeker), was granted an initial interview by the hiring
1956 // entity (employer). This event should only be sent if the job seeker was
1957 // granted an interview as part of an application that was initiated by a
1958 // search conducted through / recommendation provided by the Cloud Talent
1959 // Solution service.
1960 // "NOT_INTERESTED" - The job seeker or other entity interacting with the
1961 // service showed no interest in the job.
1962 Type string `json:"type,omitempty"`
1963 // ForceSendFields is a list of field names (e.g. "Jobs") to unconditionally
1964 // include in API requests. By default, fields with empty or default values are
1965 // omitted from API requests. See
1966 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1967 // details.
1968 ForceSendFields []string `json:"-"`
1969 // NullFields is a list of field names (e.g. "Jobs") to include in API requests
1970 // with the JSON null value. By default, fields with empty values are omitted
1971 // from API requests. See
1972 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1973 NullFields []string `json:"-"`
1974 }
1975
1976 func (s JobEvent) MarshalJSON() ([]byte, error) {
1977 type NoMethod JobEvent
1978 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1979 }
1980
1981 // JobQuery: Input only. The query required to perform a search query.
1982 type JobQuery struct {
1983 // CommuteFilter: Optional. Allows filtering jobs by commute time with
1984 // different travel methods (for example, driving or public transit). Note:
1985 // This only works with COMMUTE MODE. When specified,
1986 // [JobQuery.location_filters] is ignored. Currently we don't support sorting
1987 // by commute time.
1988 CommuteFilter *CommuteFilter `json:"commuteFilter,omitempty"`
1989 // CompanyDisplayNames: Optional. This filter specifies the company
1990 // Company.display_name of the jobs to search against. The company name must
1991 // match the value exactly. Alternatively, the value being searched for can be
1992 // wrapped in different match operators. `SUBSTRING_MATCH([value])` The company
1993 // name must contain a case insensitive substring match of the value. Using
1994 // this function may increase latency. Sample Value: `SUBSTRING_MATCH(google)`
1995 // `MULTI_WORD_TOKEN_MATCH([value])` The value will be treated as a multi word
1996 // token and the company name must contain a case insensitive match of the
1997 // value. Using this function may increase latency. Sample Value:
1998 // `MULTI_WORD_TOKEN_MATCH(google)` If a value isn't specified, jobs within the
1999 // search results are associated with any company. If multiple values are
2000 // specified, jobs within the search results may be associated with any of the
2001 // specified companies. At most 20 company display name filters are allowed.
2002 CompanyDisplayNames []string `json:"companyDisplayNames,omitempty"`
2003 // CompanyNames: Optional. This filter specifies the company entities to search
2004 // against. If a value isn't specified, jobs are searched for against all
2005 // companies. If multiple values are specified, jobs are searched against the
2006 // companies specified. The format is
2007 // "projects/{project_id}/companies/{company_id}", for example,
2008 // "projects/api-test-project/companies/foo". At most 20 company filters are
2009 // allowed.
2010 CompanyNames []string `json:"companyNames,omitempty"`
2011 // CompensationFilter: Optional. This search filter is applied only to
2012 // Job.compensation_info. For example, if the filter is specified as "Hourly
2013 // job with per-hour compensation > $15", only jobs meeting these criteria are
2014 // searched. If a filter isn't defined, all open jobs are searched.
2015 CompensationFilter *CompensationFilter `json:"compensationFilter,omitempty"`
2016 // CustomAttributeFilter: Optional. This filter specifies a structured syntax
2017 // to match against the Job.custom_attributes marked as `filterable`. The
2018 // syntax for this expression is a subset of SQL syntax. Supported operators
2019 // are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the left of the operator is a
2020 // custom field key and the right of the operator is a number or a quoted
2021 // string. You must escape backslash (\\) and quote (\") characters. Supported
2022 // functions are `LOWER([field_name])` to perform a case insensitive match and
2023 // `EMPTY([field_name])` to filter on the existence of a key. Boolean
2024 // expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for
2025 // example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 comparisons
2026 // or functions are allowed in the expression. The expression must be < 10000
2027 // bytes in length. Sample Query: `(LOWER(driving_license)="class \"a\"" OR
2028 // EMPTY(driving_license)) AND driving_years > 10`
2029 CustomAttributeFilter string `json:"customAttributeFilter,omitempty"`
2030 // DisableSpellCheck: Optional. This flag controls the spell-check feature. If
2031 // false, the service attempts to correct a misspelled query, for example,
2032 // "enginee" is corrected to "engineer". Defaults to false: a spell check is
2033 // performed.
2034 DisableSpellCheck bool `json:"disableSpellCheck,omitempty"`
2035 // EmploymentTypes: Optional. The employment type filter specifies the
2036 // employment type of jobs to search against, such as EmploymentType.FULL_TIME.
2037 // If a value is not specified, jobs in the search results includes any
2038 // employment type. If multiple values are specified, jobs in the search
2039 // results include any of the specified employment types.
2040 //
2041 // Possible values:
2042 // "EMPLOYMENT_TYPE_UNSPECIFIED" - The default value if the employment type
2043 // is not specified.
2044 // "FULL_TIME" - The job requires working a number of hours that constitute
2045 // full time employment, typically 40 or more hours per week.
2046 // "PART_TIME" - The job entails working fewer hours than a full time job,
2047 // typically less than 40 hours a week.
2048 // "CONTRACTOR" - The job is offered as a contracted, as opposed to a
2049 // salaried employee, position.
2050 // "CONTRACT_TO_HIRE" - The job is offered as a contracted position with the
2051 // understanding that it's converted into a full-time position at the end of
2052 // the contract. Jobs of this type are also returned by a search for
2053 // EmploymentType.CONTRACTOR jobs.
2054 // "TEMPORARY" - The job is offered as a temporary employment opportunity,
2055 // usually a short-term engagement.
2056 // "INTERN" - The job is a fixed-term opportunity for students or entry-level
2057 // job seekers to obtain on-the-job training, typically offered as a summer
2058 // position.
2059 // "VOLUNTEER" - The is an opportunity for an individual to volunteer, where
2060 // there's no expectation of compensation for the provided services.
2061 // "PER_DIEM" - The job requires an employee to work on an as-needed basis
2062 // with a flexible schedule.
2063 // "FLY_IN_FLY_OUT" - The job involves employing people in remote areas and
2064 // flying them temporarily to the work site instead of relocating employees and
2065 // their families permanently.
2066 // "OTHER_EMPLOYMENT_TYPE" - The job does not fit any of the other listed
2067 // types.
2068 EmploymentTypes []string `json:"employmentTypes,omitempty"`
2069 // ExcludedJobs: Optional. This filter specifies a list of job names to be
2070 // excluded during search. At most 400 excluded job names are allowed.
2071 ExcludedJobs []string `json:"excludedJobs,omitempty"`
2072 // JobCategories: Optional. The category filter specifies the categories of
2073 // jobs to search against. See Category for more information. If a value is not
2074 // specified, jobs from any category are searched against. If multiple values
2075 // are specified, jobs from any of the specified categories are searched
2076 // against.
2077 //
2078 // Possible values:
2079 // "JOB_CATEGORY_UNSPECIFIED" - The default value if the category isn't
2080 // specified.
2081 // "ACCOUNTING_AND_FINANCE" - An accounting and finance job, such as an
2082 // Accountant.
2083 // "ADMINISTRATIVE_AND_OFFICE" - An administrative and office job, such as an
2084 // Administrative Assistant.
2085 // "ADVERTISING_AND_MARKETING" - An advertising and marketing job, such as
2086 // Marketing Manager.
2087 // "ANIMAL_CARE" - An animal care job, such as Veterinarian.
2088 // "ART_FASHION_AND_DESIGN" - An art, fashion, or design job, such as
2089 // Designer.
2090 // "BUSINESS_OPERATIONS" - A business operations job, such as Business
2091 // Operations Manager.
2092 // "CLEANING_AND_FACILITIES" - A cleaning and facilities job, such as
2093 // Custodial Staff.
2094 // "COMPUTER_AND_IT" - A computer and IT job, such as Systems Administrator.
2095 // "CONSTRUCTION" - A construction job, such as General Laborer.
2096 // "CUSTOMER_SERVICE" - A customer service job, such s Cashier.
2097 // "EDUCATION" - An education job, such as School Teacher.
2098 // "ENTERTAINMENT_AND_TRAVEL" - An entertainment and travel job, such as
2099 // Flight Attendant.
2100 // "FARMING_AND_OUTDOORS" - A farming or outdoor job, such as Park Ranger.
2101 // "HEALTHCARE" - A healthcare job, such as Registered Nurse.
2102 // "HUMAN_RESOURCES" - A human resources job, such as Human Resources
2103 // Director.
2104 // "INSTALLATION_MAINTENANCE_AND_REPAIR" - An installation, maintenance, or
2105 // repair job, such as Electrician.
2106 // "LEGAL" - A legal job, such as Law Clerk.
2107 // "MANAGEMENT" - A management job, often used in conjunction with another
2108 // category, such as Store Manager.
2109 // "MANUFACTURING_AND_WAREHOUSE" - A manufacturing or warehouse job, such as
2110 // Assembly Technician.
2111 // "MEDIA_COMMUNICATIONS_AND_WRITING" - A media, communications, or writing
2112 // job, such as Media Relations.
2113 // "OIL_GAS_AND_MINING" - An oil, gas or mining job, such as Offshore
2114 // Driller.
2115 // "PERSONAL_CARE_AND_SERVICES" - A personal care and services job, such as
2116 // Hair Stylist.
2117 // "PROTECTIVE_SERVICES" - A protective services job, such as Security Guard.
2118 // "REAL_ESTATE" - A real estate job, such as Buyer's Agent.
2119 // "RESTAURANT_AND_HOSPITALITY" - A restaurant and hospitality job, such as
2120 // Restaurant Server.
2121 // "SALES_AND_RETAIL" - A sales and/or retail job, such Sales Associate.
2122 // "SCIENCE_AND_ENGINEERING" - A science and engineering job, such as Lab
2123 // Technician.
2124 // "SOCIAL_SERVICES_AND_NON_PROFIT" - A social services or non-profit job,
2125 // such as Case Worker.
2126 // "SPORTS_FITNESS_AND_RECREATION" - A sports, fitness, or recreation job,
2127 // such as Personal Trainer.
2128 // "TRANSPORTATION_AND_LOGISTICS" - A transportation or logistics job, such
2129 // as Truck Driver.
2130 JobCategories []string `json:"jobCategories,omitempty"`
2131 // LanguageCodes: Optional. This filter specifies the locale of jobs to search
2132 // against, for example, "en-US". If a value isn't specified, the search
2133 // results can contain jobs in any locale. Language codes should be in BCP-47
2134 // format, such as "en-US" or "sr-Latn". For more information, see Tags for
2135 // Identifying Languages (https://tools.ietf.org/html/bcp47). At most 10
2136 // language code filters are allowed.
2137 LanguageCodes []string `json:"languageCodes,omitempty"`
2138 // LocationFilters: Optional. The location filter specifies geo-regions
2139 // containing the jobs to search against. See LocationFilter for more
2140 // information. If a location value isn't specified, jobs fitting the other
2141 // search criteria are retrieved regardless of where they're located. If
2142 // multiple values are specified, jobs are retrieved from any of the specified
2143 // locations. If different values are specified for the
2144 // LocationFilter.distance_in_miles parameter, the maximum provided distance is
2145 // used for all locations. At most 5 location filters are allowed.
2146 LocationFilters []*LocationFilter `json:"locationFilters,omitempty"`
2147 // PublishTimeRange: Optional. Jobs published within a range specified by this
2148 // filter are searched against.
2149 PublishTimeRange *TimestampRange `json:"publishTimeRange,omitempty"`
2150 // Query: Optional. The query string that matches against the job title,
2151 // description, and location fields. The maximum number of allowed characters
2152 // is 255.
2153 Query string `json:"query,omitempty"`
2154 // QueryLanguageCode: The language code of query. For example, "en-US". This
2155 // field helps to better interpret the query. If a value isn't specified, the
2156 // query language code is automatically detected, which may not be accurate.
2157 // Language code should be in BCP-47 format, such as "en-US" or "sr-Latn". For
2158 // more information, see Tags for Identifying Languages
2159 // (https://tools.ietf.org/html/bcp47).
2160 QueryLanguageCode string `json:"queryLanguageCode,omitempty"`
2161 // ForceSendFields is a list of field names (e.g. "CommuteFilter") to
2162 // unconditionally include in API requests. By default, fields with empty or
2163 // default values are omitted from API requests. See
2164 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2165 // details.
2166 ForceSendFields []string `json:"-"`
2167 // NullFields is a list of field names (e.g. "CommuteFilter") to include in API
2168 // requests with the JSON null value. By default, fields with empty values are
2169 // omitted from API requests. See
2170 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2171 NullFields []string `json:"-"`
2172 }
2173
2174 func (s JobQuery) MarshalJSON() ([]byte, error) {
2175 type NoMethod JobQuery
2176 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2177 }
2178
2179 // LatLng: An object that represents a latitude/longitude pair. This is
2180 // expressed as a pair of doubles to represent degrees latitude and degrees
2181 // longitude. Unless specified otherwise, this object must conform to the WGS84
2182 // standard. Values must be within normalized ranges.
2183 type LatLng struct {
2184 // Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0].
2185 Latitude float64 `json:"latitude,omitempty"`
2186 // Longitude: The longitude in degrees. It must be in the range [-180.0,
2187 // +180.0].
2188 Longitude float64 `json:"longitude,omitempty"`
2189 // ForceSendFields is a list of field names (e.g. "Latitude") to
2190 // unconditionally include in API requests. By default, fields with empty or
2191 // default values are omitted from API requests. See
2192 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2193 // details.
2194 ForceSendFields []string `json:"-"`
2195 // NullFields is a list of field names (e.g. "Latitude") to include in API
2196 // requests with the JSON null value. By default, fields with empty values are
2197 // omitted from API requests. See
2198 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2199 NullFields []string `json:"-"`
2200 }
2201
2202 func (s LatLng) MarshalJSON() ([]byte, error) {
2203 type NoMethod LatLng
2204 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2205 }
2206
2207 func (s *LatLng) UnmarshalJSON(data []byte) error {
2208 type NoMethod LatLng
2209 var s1 struct {
2210 Latitude gensupport.JSONFloat64 `json:"latitude"`
2211 Longitude gensupport.JSONFloat64 `json:"longitude"`
2212 *NoMethod
2213 }
2214 s1.NoMethod = (*NoMethod)(s)
2215 if err := json.Unmarshal(data, &s1); err != nil {
2216 return err
2217 }
2218 s.Latitude = float64(s1.Latitude)
2219 s.Longitude = float64(s1.Longitude)
2220 return nil
2221 }
2222
2223 // ListCompaniesResponse: Output only. The List companies response object.
2224 type ListCompaniesResponse struct {
2225 // Companies: Companies for the current client.
2226 Companies []*Company `json:"companies,omitempty"`
2227 // Metadata: Additional information for the API invocation, such as the request
2228 // tracking id.
2229 Metadata *ResponseMetadata `json:"metadata,omitempty"`
2230 // NextPageToken: A token to retrieve the next page of results.
2231 NextPageToken string `json:"nextPageToken,omitempty"`
2232
2233 // ServerResponse contains the HTTP response code and headers from the server.
2234 googleapi.ServerResponse `json:"-"`
2235 // ForceSendFields is a list of field names (e.g. "Companies") to
2236 // unconditionally include in API requests. By default, fields with empty or
2237 // default values are omitted from API requests. See
2238 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2239 // details.
2240 ForceSendFields []string `json:"-"`
2241 // NullFields is a list of field names (e.g. "Companies") to include in API
2242 // requests with the JSON null value. By default, fields with empty values are
2243 // omitted from API requests. See
2244 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2245 NullFields []string `json:"-"`
2246 }
2247
2248 func (s ListCompaniesResponse) MarshalJSON() ([]byte, error) {
2249 type NoMethod ListCompaniesResponse
2250 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2251 }
2252
2253 // ListJobsResponse: Output only. List jobs response.
2254 type ListJobsResponse struct {
2255 // Jobs: The Jobs for a given company. The maximum number of items returned is
2256 // based on the limit field provided in the request.
2257 Jobs []*Job `json:"jobs,omitempty"`
2258 // Metadata: Additional information for the API invocation, such as the request
2259 // tracking id.
2260 Metadata *ResponseMetadata `json:"metadata,omitempty"`
2261 // NextPageToken: A token to retrieve the next page of results.
2262 NextPageToken string `json:"nextPageToken,omitempty"`
2263
2264 // ServerResponse contains the HTTP response code and headers from the server.
2265 googleapi.ServerResponse `json:"-"`
2266 // ForceSendFields is a list of field names (e.g. "Jobs") to unconditionally
2267 // include in API requests. By default, fields with empty or default values are
2268 // omitted from API requests. See
2269 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2270 // details.
2271 ForceSendFields []string `json:"-"`
2272 // NullFields is a list of field names (e.g. "Jobs") to include in API requests
2273 // with the JSON null value. By default, fields with empty values are omitted
2274 // from API requests. See
2275 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2276 NullFields []string `json:"-"`
2277 }
2278
2279 func (s ListJobsResponse) MarshalJSON() ([]byte, error) {
2280 type NoMethod ListJobsResponse
2281 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2282 }
2283
2284 // Location: Output only. A resource that represents a location with full
2285 // geographic information.
2286 type Location struct {
2287 // LatLng: An object representing a latitude/longitude pair.
2288 LatLng *LatLng `json:"latLng,omitempty"`
2289 // LocationType: The type of a location, which corresponds to the address lines
2290 // field of PostalAddress. For example, "Downtown, Atlanta, GA, USA" has a type
2291 // of LocationType#NEIGHBORHOOD, and "Kansas City, KS, USA" has a type of
2292 // LocationType#LOCALITY.
2293 //
2294 // Possible values:
2295 // "LOCATION_TYPE_UNSPECIFIED" - Default value if the type is not specified.
2296 // "COUNTRY" - A country level location.
2297 // "ADMINISTRATIVE_AREA" - A state or equivalent level location.
2298 // "SUB_ADMINISTRATIVE_AREA" - A county or equivalent level location.
2299 // "LOCALITY" - A city or equivalent level location.
2300 // "POSTAL_CODE" - A postal code level location.
2301 // "SUB_LOCALITY" - A sublocality is a subdivision of a locality, for example
2302 // a city borough, ward, or arrondissement. Sublocalities are usually
2303 // recognized by a local political authority. For example, Manhattan and
2304 // Brooklyn are recognized as boroughs by the City of New York, and are
2305 // therefore modeled as sublocalities.
2306 // "SUB_LOCALITY_1" - A district or equivalent level location.
2307 // "SUB_LOCALITY_2" - A smaller district or equivalent level display.
2308 // "NEIGHBORHOOD" - A neighborhood level location.
2309 // "STREET_ADDRESS" - A street address level location.
2310 LocationType string `json:"locationType,omitempty"`
2311 // PostalAddress: Postal address of the location that includes human readable
2312 // information, such as postal delivery and payments addresses. Given a postal
2313 // address, a postal service can deliver items to a premises, P.O. Box, or
2314 // other delivery location.
2315 PostalAddress *PostalAddress `json:"postalAddress,omitempty"`
2316 // RadiusInMiles: Radius in miles of the job location. This value is derived
2317 // from the location bounding box in which a circle with the specified radius
2318 // centered from LatLng covers the area associated with the job location. For
2319 // example, currently, "Mountain View, CA, USA" has a radius of 6.17 miles.
2320 RadiusInMiles float64 `json:"radiusInMiles,omitempty"`
2321 // ForceSendFields is a list of field names (e.g. "LatLng") to unconditionally
2322 // include in API requests. By default, fields with empty or default values are
2323 // omitted from API requests. See
2324 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2325 // details.
2326 ForceSendFields []string `json:"-"`
2327 // NullFields is a list of field names (e.g. "LatLng") to include in API
2328 // requests with the JSON null value. By default, fields with empty values are
2329 // omitted from API requests. See
2330 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2331 NullFields []string `json:"-"`
2332 }
2333
2334 func (s Location) MarshalJSON() ([]byte, error) {
2335 type NoMethod Location
2336 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2337 }
2338
2339 func (s *Location) UnmarshalJSON(data []byte) error {
2340 type NoMethod Location
2341 var s1 struct {
2342 RadiusInMiles gensupport.JSONFloat64 `json:"radiusInMiles"`
2343 *NoMethod
2344 }
2345 s1.NoMethod = (*NoMethod)(s)
2346 if err := json.Unmarshal(data, &s1); err != nil {
2347 return err
2348 }
2349 s.RadiusInMiles = float64(s1.RadiusInMiles)
2350 return nil
2351 }
2352
2353 // LocationFilter: Input only. Geographic region of the search.
2354 type LocationFilter struct {
2355 // Address: Optional. The address name, such as "Mountain View" or "Bay Area".
2356 Address string `json:"address,omitempty"`
2357 // DistanceInMiles: Optional. The distance_in_miles is applied when the
2358 // location being searched for is identified as a city or smaller. When the
2359 // location being searched for is a state or larger, this field is ignored.
2360 DistanceInMiles float64 `json:"distanceInMiles,omitempty"`
2361 // LatLng: Optional. The latitude and longitude of the geographic center from
2362 // which to search. This field's ignored if `address` is provided.
2363 LatLng *LatLng `json:"latLng,omitempty"`
2364 // RegionCode: Optional. CLDR region code of the country/region. This field may
2365 // be used in two ways: 1) If telecommute preference is not set, this field is
2366 // used address ambiguity of the user-input address. For example, "Liverpool"
2367 // may refer to "Liverpool, NY, US" or "Liverpool, UK". This region code biases
2368 // the address resolution toward a specific country or territory. If this field
2369 // is not set, address resolution is biased toward the United States by
2370 // default. 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the
2371 // telecommute location filter will be limited to the region specified in this
2372 // field. If this field is not set, the telecommute job locations will not be
2373 // limited. See
2374 // https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html
2375 // for details. Example: "CH" for Switzerland.
2376 RegionCode string `json:"regionCode,omitempty"`
2377 // TelecommutePreference: Optional. Allows the client to return jobs without a
2378 // set location, specifically, telecommuting jobs (telecommuting is considered
2379 // by the service as a special location). Job.posting_region indicates if a job
2380 // permits telecommuting. If this field is set to
2381 // TelecommutePreference.TELECOMMUTE_ALLOWED, telecommuting jobs are searched,
2382 // and address and lat_lng are ignored. If not set or set to
2383 // TelecommutePreference.TELECOMMUTE_EXCLUDED, the telecommute status of the
2384 // jobs is ignored. Jobs that have PostingRegion.TELECOMMUTE and have
2385 // additional Job.addresses may still be matched based on other location
2386 // filters using address or latlng. This filter can be used by itself to search
2387 // exclusively for telecommuting jobs, or it can be combined with another
2388 // location filter to search for a combination of job locations, such as
2389 // "Mountain View" or "telecommuting" jobs. However, when used in combination
2390 // with other location filters, telecommuting jobs can be treated as less
2391 // relevant than other jobs in the search response.
2392 //
2393 // Possible values:
2394 // "TELECOMMUTE_PREFERENCE_UNSPECIFIED" - Default value if the telecommute
2395 // preference is not specified.
2396 // "TELECOMMUTE_EXCLUDED" - Deprecated: Ignore telecommute status of jobs.
2397 // Use TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs.
2398 // "TELECOMMUTE_ALLOWED" - Allow telecommute jobs.
2399 // "TELECOMMUTE_JOBS_EXCLUDED" - Exclude telecommute jobs.
2400 TelecommutePreference string `json:"telecommutePreference,omitempty"`
2401 // ForceSendFields is a list of field names (e.g. "Address") to unconditionally
2402 // include in API requests. By default, fields with empty or default values are
2403 // omitted from API requests. See
2404 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2405 // details.
2406 ForceSendFields []string `json:"-"`
2407 // NullFields is a list of field names (e.g. "Address") to include in API
2408 // requests with the JSON null value. By default, fields with empty values are
2409 // omitted from API requests. See
2410 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2411 NullFields []string `json:"-"`
2412 }
2413
2414 func (s LocationFilter) MarshalJSON() ([]byte, error) {
2415 type NoMethod LocationFilter
2416 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2417 }
2418
2419 func (s *LocationFilter) UnmarshalJSON(data []byte) error {
2420 type NoMethod LocationFilter
2421 var s1 struct {
2422 DistanceInMiles gensupport.JSONFloat64 `json:"distanceInMiles"`
2423 *NoMethod
2424 }
2425 s1.NoMethod = (*NoMethod)(s)
2426 if err := json.Unmarshal(data, &s1); err != nil {
2427 return err
2428 }
2429 s.DistanceInMiles = float64(s1.DistanceInMiles)
2430 return nil
2431 }
2432
2433 // MatchingJob: Output only. Job entry with metadata inside SearchJobsResponse.
2434 type MatchingJob struct {
2435 // CommuteInfo: Commute information which is generated based on specified
2436 // CommuteFilter.
2437 CommuteInfo *CommuteInfo `json:"commuteInfo,omitempty"`
2438 // Job: Job resource that matches the specified SearchJobsRequest.
2439 Job *Job `json:"job,omitempty"`
2440 // JobSummary: A summary of the job with core information that's displayed on
2441 // the search results listing page.
2442 JobSummary string `json:"jobSummary,omitempty"`
2443 // JobTitleSnippet: Contains snippets of text from the Job.job_title field most
2444 // closely matching a search query's keywords, if available. The matching query
2445 // keywords are enclosed in HTML bold tags.
2446 JobTitleSnippet string `json:"jobTitleSnippet,omitempty"`
2447 // SearchTextSnippet: Contains snippets of text from the Job.description and
2448 // similar fields that most closely match a search query's keywords, if
2449 // available. All HTML tags in the original fields are stripped when returned
2450 // in this field, and matching query keywords are enclosed in HTML bold tags.
2451 SearchTextSnippet string `json:"searchTextSnippet,omitempty"`
2452 // ForceSendFields is a list of field names (e.g. "CommuteInfo") to
2453 // unconditionally include in API requests. By default, fields with empty or
2454 // default values are omitted from API requests. See
2455 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2456 // details.
2457 ForceSendFields []string `json:"-"`
2458 // NullFields is a list of field names (e.g. "CommuteInfo") to include in API
2459 // requests with the JSON null value. By default, fields with empty values are
2460 // omitted from API requests. See
2461 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2462 NullFields []string `json:"-"`
2463 }
2464
2465 func (s MatchingJob) MarshalJSON() ([]byte, error) {
2466 type NoMethod MatchingJob
2467 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2468 }
2469
2470 // Money: Represents an amount of money with its currency type.
2471 type Money struct {
2472 // CurrencyCode: The three-letter currency code defined in ISO 4217.
2473 CurrencyCode string `json:"currencyCode,omitempty"`
2474 // Nanos: Number of nano (10^-9) units of the amount. The value must be between
2475 // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
2476 // must be positive or zero. If `units` is zero, `nanos` can be positive, zero,
2477 // or negative. If `units` is negative, `nanos` must be negative or zero. For
2478 // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
2479 Nanos int64 `json:"nanos,omitempty"`
2480 // Units: The whole units of the amount. For example if `currencyCode` is
2481 // "USD", then 1 unit is one US dollar.
2482 Units int64 `json:"units,omitempty,string"`
2483 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to
2484 // unconditionally include in API requests. By default, fields with empty or
2485 // default values are omitted from API requests. See
2486 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2487 // details.
2488 ForceSendFields []string `json:"-"`
2489 // NullFields is a list of field names (e.g. "CurrencyCode") to include in API
2490 // requests with the JSON null value. By default, fields with empty values are
2491 // omitted from API requests. See
2492 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2493 NullFields []string `json:"-"`
2494 }
2495
2496 func (s Money) MarshalJSON() ([]byte, error) {
2497 type NoMethod Money
2498 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2499 }
2500
2501 // NumericBucketingOption: Input only. Use this field to specify bucketing
2502 // option for the histogram search response.
2503 type NumericBucketingOption struct {
2504 // BucketBounds: Required. Two adjacent values form a histogram bucket. Values
2505 // should be in ascending order. For example, if [5, 10, 15] are provided, four
2506 // buckets are created: (-inf, 5), 5, 10), [10, 15), [15, inf). At most 20
2507 // [buckets_bound is supported.
2508 BucketBounds []float64 `json:"bucketBounds,omitempty"`
2509 // RequiresMinMax: Optional. If set to true, the histogram result includes
2510 // minimum/maximum value of the numeric field.
2511 RequiresMinMax bool `json:"requiresMinMax,omitempty"`
2512 // ForceSendFields is a list of field names (e.g. "BucketBounds") to
2513 // unconditionally include in API requests. By default, fields with empty or
2514 // default values are omitted from API requests. See
2515 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2516 // details.
2517 ForceSendFields []string `json:"-"`
2518 // NullFields is a list of field names (e.g. "BucketBounds") to include in API
2519 // requests with the JSON null value. By default, fields with empty values are
2520 // omitted from API requests. See
2521 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2522 NullFields []string `json:"-"`
2523 }
2524
2525 func (s NumericBucketingOption) MarshalJSON() ([]byte, error) {
2526 type NoMethod NumericBucketingOption
2527 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2528 }
2529
2530 func (s *NumericBucketingOption) UnmarshalJSON(data []byte) error {
2531 type NoMethod NumericBucketingOption
2532 var s1 struct {
2533 BucketBounds []gensupport.JSONFloat64 `json:"bucketBounds"`
2534 *NoMethod
2535 }
2536 s1.NoMethod = (*NoMethod)(s)
2537 if err := json.Unmarshal(data, &s1); err != nil {
2538 return err
2539 }
2540 s.BucketBounds = make([]float64, len(s1.BucketBounds))
2541 for i := range s1.BucketBounds {
2542 s.BucketBounds[i] = float64(s1.BucketBounds[i])
2543 }
2544 return nil
2545 }
2546
2547 // NumericBucketingResult: Output only. Custom numeric bucketing result.
2548 type NumericBucketingResult struct {
2549 // Counts: Count within each bucket. Its size is the length of
2550 // NumericBucketingOption.bucket_bounds plus 1.
2551 Counts []*BucketizedCount `json:"counts,omitempty"`
2552 // MaxValue: Stores the maximum value of the numeric field. Is populated only
2553 // if [NumericBucketingOption.requires_min_max] is set to true.
2554 MaxValue float64 `json:"maxValue,omitempty"`
2555 // MinValue: Stores the minimum value of the numeric field. Will be populated
2556 // only if [NumericBucketingOption.requires_min_max] is set to true.
2557 MinValue float64 `json:"minValue,omitempty"`
2558 // ForceSendFields is a list of field names (e.g. "Counts") to unconditionally
2559 // include in API requests. By default, fields with empty or default values are
2560 // omitted from API requests. See
2561 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2562 // details.
2563 ForceSendFields []string `json:"-"`
2564 // NullFields is a list of field names (e.g. "Counts") to include in API
2565 // requests with the JSON null value. By default, fields with empty values are
2566 // omitted from API requests. See
2567 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2568 NullFields []string `json:"-"`
2569 }
2570
2571 func (s NumericBucketingResult) MarshalJSON() ([]byte, error) {
2572 type NoMethod NumericBucketingResult
2573 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2574 }
2575
2576 func (s *NumericBucketingResult) UnmarshalJSON(data []byte) error {
2577 type NoMethod NumericBucketingResult
2578 var s1 struct {
2579 MaxValue gensupport.JSONFloat64 `json:"maxValue"`
2580 MinValue gensupport.JSONFloat64 `json:"minValue"`
2581 *NoMethod
2582 }
2583 s1.NoMethod = (*NoMethod)(s)
2584 if err := json.Unmarshal(data, &s1); err != nil {
2585 return err
2586 }
2587 s.MaxValue = float64(s1.MaxValue)
2588 s.MinValue = float64(s1.MinValue)
2589 return nil
2590 }
2591
2592 // Operation: This resource represents a long-running operation that is the
2593 // result of a network API call.
2594 type Operation struct {
2595 // Done: If the value is `false`, it means the operation is still in progress.
2596 // If `true`, the operation is completed, and either `error` or `response` is
2597 // available.
2598 Done bool `json:"done,omitempty"`
2599 // Error: The error result of the operation in case of failure or cancellation.
2600 Error *Status `json:"error,omitempty"`
2601 // Metadata: Service-specific metadata associated with the operation. It
2602 // typically contains progress information and common metadata such as create
2603 // time. Some services might not provide such metadata. Any method that returns
2604 // a long-running operation should document the metadata type, if any.
2605 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2606 // Name: The server-assigned name, which is only unique within the same service
2607 // that originally returns it. If you use the default HTTP mapping, the `name`
2608 // should be a resource name ending with `operations/{unique_id}`.
2609 Name string `json:"name,omitempty"`
2610 // Response: The normal, successful response of the operation. If the original
2611 // method returns no data on success, such as `Delete`, the response is
2612 // `google.protobuf.Empty`. If the original method is standard
2613 // `Get`/`Create`/`Update`, the response should be the resource. For other
2614 // methods, the response should have the type `XxxResponse`, where `Xxx` is the
2615 // original method name. For example, if the original method name is
2616 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
2617 Response googleapi.RawMessage `json:"response,omitempty"`
2618
2619 // ServerResponse contains the HTTP response code and headers from the server.
2620 googleapi.ServerResponse `json:"-"`
2621 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
2622 // include in API requests. By default, fields with empty or default values are
2623 // omitted from API requests. See
2624 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2625 // details.
2626 ForceSendFields []string `json:"-"`
2627 // NullFields is a list of field names (e.g. "Done") to include in API requests
2628 // with the JSON null value. By default, fields with empty values are omitted
2629 // from API requests. See
2630 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2631 NullFields []string `json:"-"`
2632 }
2633
2634 func (s Operation) MarshalJSON() ([]byte, error) {
2635 type NoMethod Operation
2636 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2637 }
2638
2639 // PostalAddress: Represents a postal address, such as for postal delivery or
2640 // payments addresses. With a postal address, a postal service can deliver
2641 // items to a premise, P.O. box, or similar. A postal address is not intended
2642 // to model geographical locations like roads, towns, or mountains. In typical
2643 // usage, an address would be created by user input or from importing existing
2644 // data, depending on the type of process. Advice on address input or editing:
2645 // - Use an internationalization-ready address widget such as
2646 // https://github.com/google/libaddressinput. - Users should not be presented
2647 // with UI elements for input or editing of fields outside countries where that
2648 // field is used. For more guidance on how to use this schema, see:
2649 // https://support.google.com/business/answer/6397478.
2650 type PostalAddress struct {
2651 // AddressLines: Unstructured address lines describing the lower levels of an
2652 // address. Because values in `address_lines` do not have type information and
2653 // may sometimes contain multiple values in a single field (for example,
2654 // "Austin, TX"), it is important that the line order is clear. The order of
2655 // address lines should be "envelope order" for the country or region of the
2656 // address. In places where this can vary (for example, Japan),
2657 // `address_language` is used to make it explicit (for example, "ja" for
2658 // large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this
2659 // way, the most specific line of an address can be selected based on the
2660 // language. The minimum permitted structural representation of an address
2661 // consists of a `region_code` with all remaining information placed in the
2662 // `address_lines`. It would be possible to format such an address very
2663 // approximately without geocoding, but no semantic reasoning could be made
2664 // about any of the address components until it was at least partially
2665 // resolved. Creating an address only containing a `region_code` and
2666 // `address_lines` and then geocoding is the recommended way to handle
2667 // completely unstructured addresses (as opposed to guessing which parts of the
2668 // address should be localities or administrative areas).
2669 AddressLines []string `json:"addressLines,omitempty"`
2670 // AdministrativeArea: Optional. Highest administrative subdivision which is
2671 // used for postal addresses of a country or region. For example, this can be a
2672 // state, a province, an oblast, or a prefecture. For Spain, this is the
2673 // province and not the autonomous community (for example, "Barcelona" and not
2674 // "Catalonia"). Many countries don't use an administrative area in postal
2675 // addresses. For example, in Switzerland, this should be left unpopulated.
2676 AdministrativeArea string `json:"administrativeArea,omitempty"`
2677 // LanguageCode: Optional. BCP-47 language code of the contents of this address
2678 // (if known). This is often the UI language of the input form or is expected
2679 // to match one of the languages used in the address' country/region, or their
2680 // transliterated equivalents. This can affect formatting in certain countries,
2681 // but is not critical to the correctness of the data and will never affect any
2682 // validation or other non-formatting related operations. If this value is not
2683 // known, it should be omitted (rather than specifying a possibly incorrect
2684 // default). Examples: "zh-Hant", "ja", "ja-Latn", "en".
2685 LanguageCode string `json:"languageCode,omitempty"`
2686 // Locality: Optional. Generally refers to the city or town portion of the
2687 // address. Examples: US city, IT comune, UK post town. In regions of the world
2688 // where localities are not well defined or do not fit into this structure
2689 // well, leave `locality` empty and use `address_lines`.
2690 Locality string `json:"locality,omitempty"`
2691 // Organization: Optional. The name of the organization at the address.
2692 Organization string `json:"organization,omitempty"`
2693 // PostalCode: Optional. Postal code of the address. Not all countries use or
2694 // require postal codes to be present, but where they are used, they may
2695 // trigger additional validation with other parts of the address (for example,
2696 // state or zip code validation in the United States).
2697 PostalCode string `json:"postalCode,omitempty"`
2698 // Recipients: Optional. The recipient at the address. This field may, under
2699 // certain circumstances, contain multiline information. For example, it might
2700 // contain "care of" information.
2701 Recipients []string `json:"recipients,omitempty"`
2702 // RegionCode: Required. CLDR region code of the country/region of the address.
2703 // This is never inferred and it is up to the user to ensure the value is
2704 // correct. See https://cldr.unicode.org/ and
2705 // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
2706 // for details. Example: "CH" for Switzerland.
2707 RegionCode string `json:"regionCode,omitempty"`
2708 // Revision: The schema revision of the `PostalAddress`. This must be set to 0,
2709 // which is the latest revision. All new revisions **must** be backward
2710 // compatible with old revisions.
2711 Revision int64 `json:"revision,omitempty"`
2712 // SortingCode: Optional. Additional, country-specific, sorting code. This is
2713 // not used in most regions. Where it is used, the value is either a string
2714 // like "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or
2715 // just a number alone, representing the "sector code" (Jamaica), "delivery
2716 // area indicator" (Malawi) or "post office indicator" (Côte d'Ivoire).
2717 SortingCode string `json:"sortingCode,omitempty"`
2718 // Sublocality: Optional. Sublocality of the address. For example, this can be
2719 // a neighborhood, borough, or district.
2720 Sublocality string `json:"sublocality,omitempty"`
2721 // ForceSendFields is a list of field names (e.g. "AddressLines") to
2722 // unconditionally include in API requests. By default, fields with empty or
2723 // default values are omitted from API requests. See
2724 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2725 // details.
2726 ForceSendFields []string `json:"-"`
2727 // NullFields is a list of field names (e.g. "AddressLines") to include in API
2728 // requests with the JSON null value. By default, fields with empty values are
2729 // omitted from API requests. See
2730 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2731 NullFields []string `json:"-"`
2732 }
2733
2734 func (s PostalAddress) MarshalJSON() ([]byte, error) {
2735 type NoMethod PostalAddress
2736 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2737 }
2738
2739 // ProcessingOptions: Input only. Options for job processing.
2740 type ProcessingOptions struct {
2741 // DisableStreetAddressResolution: Optional. If set to `true`, the service does
2742 // not attempt to resolve a more precise address for the job.
2743 DisableStreetAddressResolution bool `json:"disableStreetAddressResolution,omitempty"`
2744 // HtmlSanitization: Optional. Option for job HTML content sanitization.
2745 // Applied fields are: * description * applicationInfo.instruction * incentives
2746 // * qualifications * responsibilities HTML tags in these fields may be
2747 // stripped if sanitiazation is not disabled. Defaults to
2748 // HtmlSanitization.SIMPLE_FORMATTING_ONLY.
2749 //
2750 // Possible values:
2751 // "HTML_SANITIZATION_UNSPECIFIED" - Default value.
2752 // "HTML_SANITIZATION_DISABLED" - Disables sanitization on HTML input.
2753 // "SIMPLE_FORMATTING_ONLY" - Sanitizes HTML input, only accepts bold,
2754 // italic, ordered list, and unordered list markup tags.
2755 HtmlSanitization string `json:"htmlSanitization,omitempty"`
2756 // ForceSendFields is a list of field names (e.g.
2757 // "DisableStreetAddressResolution") to unconditionally include in API
2758 // requests. By default, fields with empty or default values are omitted from
2759 // API requests. See
2760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2761 // details.
2762 ForceSendFields []string `json:"-"`
2763 // NullFields is a list of field names (e.g. "DisableStreetAddressResolution")
2764 // to include in API requests with the JSON null value. By default, fields with
2765 // empty values are omitted from API requests. See
2766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2767 NullFields []string `json:"-"`
2768 }
2769
2770 func (s ProcessingOptions) MarshalJSON() ([]byte, error) {
2771 type NoMethod ProcessingOptions
2772 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2773 }
2774
2775 // RequestMetadata: Input only. Meta information related to the job searcher or
2776 // entity conducting the job search. This information is used to improve the
2777 // performance of the service.
2778 type RequestMetadata struct {
2779 // DeviceInfo: Optional. The type of device used by the job seeker at the time
2780 // of the call to the service.
2781 DeviceInfo *DeviceInfo `json:"deviceInfo,omitempty"`
2782 // Domain: Required. The client-defined scope or source of the service call,
2783 // which typically is the domain on which the service has been implemented and
2784 // is currently being run. For example, if the service is being run by client
2785 // *Foo, Inc.*, on job board www.foo.com and career site www.bar.com, then this
2786 // field is set to "foo.com" for use on the job board, and "bar.com" for use on
2787 // the career site. If this field isn't available for some reason, send
2788 // "UNKNOWN". Any improvements to the model for a particular tenant site rely
2789 // on this field being set correctly to a domain. The maximum number of allowed
2790 // characters is 255.
2791 Domain string `json:"domain,omitempty"`
2792 // SessionId: Required. A unique session identification string. A session is
2793 // defined as the duration of an end user's interaction with the service over a
2794 // certain period. Obfuscate this field for privacy concerns before providing
2795 // it to the service. If this field is not available for some reason, send
2796 // "UNKNOWN". Note that any improvements to the model for a particular tenant
2797 // site, rely on this field being set correctly to some unique session_id. The
2798 // maximum number of allowed characters is 255.
2799 SessionId string `json:"sessionId,omitempty"`
2800 // UserId: Required. A unique user identification string, as determined by the
2801 // client. To have the strongest positive impact on search quality make sure
2802 // the client-level is unique. Obfuscate this field for privacy concerns before
2803 // providing it to the service. If this field is not available for some reason,
2804 // send "UNKNOWN". Note that any improvements to the model for a particular
2805 // tenant site, rely on this field being set correctly to a unique user_id. The
2806 // maximum number of allowed characters is 255.
2807 UserId string `json:"userId,omitempty"`
2808 // ForceSendFields is a list of field names (e.g. "DeviceInfo") to
2809 // unconditionally include in API requests. By default, fields with empty or
2810 // default values are omitted from API requests. See
2811 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2812 // details.
2813 ForceSendFields []string `json:"-"`
2814 // NullFields is a list of field names (e.g. "DeviceInfo") to include in API
2815 // requests with the JSON null value. By default, fields with empty values are
2816 // omitted from API requests. See
2817 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2818 NullFields []string `json:"-"`
2819 }
2820
2821 func (s RequestMetadata) MarshalJSON() ([]byte, error) {
2822 type NoMethod RequestMetadata
2823 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2824 }
2825
2826 // ResponseMetadata: Output only. Additional information returned to client,
2827 // such as debugging information.
2828 type ResponseMetadata struct {
2829 // RequestId: A unique id associated with this call. This id is logged for
2830 // tracking purposes.
2831 RequestId string `json:"requestId,omitempty"`
2832 // ForceSendFields is a list of field names (e.g. "RequestId") to
2833 // unconditionally include in API requests. By default, fields with empty or
2834 // default values are omitted from API requests. See
2835 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2836 // details.
2837 ForceSendFields []string `json:"-"`
2838 // NullFields is a list of field names (e.g. "RequestId") to include in API
2839 // requests with the JSON null value. By default, fields with empty values are
2840 // omitted from API requests. See
2841 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2842 NullFields []string `json:"-"`
2843 }
2844
2845 func (s ResponseMetadata) MarshalJSON() ([]byte, error) {
2846 type NoMethod ResponseMetadata
2847 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2848 }
2849
2850 // SearchJobsRequest: Input only. The Request body of the `SearchJobs` call.
2851 type SearchJobsRequest struct {
2852 // CustomRankingInfo: Optional. Controls over how job documents get ranked on
2853 // top of existing relevance score (determined by API algorithm).
2854 CustomRankingInfo *CustomRankingInfo `json:"customRankingInfo,omitempty"`
2855 // DisableKeywordMatch: Optional. Controls whether to disable exact keyword
2856 // match on Job.job_title, Job.description, Job.company_display_name,
2857 // Job.locations, Job.qualifications. When disable keyword match is turned off,
2858 // a keyword match returns jobs that do not match given category filters when
2859 // there are matching keywords. For example, the query "program manager," a
2860 // result is returned even if the job posting has the title "software
2861 // developer," which does not fall into "program manager" ontology, but does
2862 // have "program manager" appearing in its description. For queries like
2863 // "cloud" that does not contain title or location specific ontology, jobs with
2864 // "cloud" keyword matches are returned regardless of this flag's value. Please
2865 // use Company.keyword_searchable_custom_fields or
2866 // Company.keyword_searchable_custom_attributes if company specific globally
2867 // matched custom field/attribute string values is needed. Enabling keyword
2868 // match improves recall of subsequent search requests. Defaults to false.
2869 DisableKeywordMatch bool `json:"disableKeywordMatch,omitempty"`
2870 // DiversificationLevel: Optional. Controls whether highly similar jobs are
2871 // returned next to each other in the search results. Jobs are identified as
2872 // highly similar based on their titles, job categories, and locations. Highly
2873 // similar results are clustered so that only one representative job of the
2874 // cluster is displayed to the job seeker higher up in the results, with the
2875 // other jobs being displayed lower down in the results. Defaults to
2876 // DiversificationLevel.SIMPLE if no value is specified.
2877 //
2878 // Possible values:
2879 // "DIVERSIFICATION_LEVEL_UNSPECIFIED" - The diversification level isn't
2880 // specified. By default, jobs with this enum are ordered according to SIMPLE
2881 // diversifying behavior.
2882 // "DISABLED" - Disables diversification. Jobs that would normally be pushed
2883 // to the last page would not have their positions altered. This may result in
2884 // highly similar jobs appearing in sequence in the search results.
2885 // "SIMPLE" - Default diversifying behavior. The result list is ordered so
2886 // that highly similar results are pushed to the end of the last page of search
2887 // results.
2888 DiversificationLevel string `json:"diversificationLevel,omitempty"`
2889 // EnableBroadening: Optional. Controls whether to broaden the search when it
2890 // produces sparse results. Broadened queries append results to the end of the
2891 // matching results list. Defaults to false.
2892 EnableBroadening bool `json:"enableBroadening,omitempty"`
2893 // HistogramFacets: Optional. Histogram requests for jobs matching JobQuery.
2894 HistogramFacets *HistogramFacets `json:"histogramFacets,omitempty"`
2895 // HistogramQueries: Optional. Expression based histogram requests for jobs
2896 // matching JobQuery.
2897 HistogramQueries []*HistogramQuery `json:"histogramQueries,omitempty"`
2898 // JobQuery: Optional. Query used to search against jobs, such as keyword,
2899 // location filters, etc.
2900 JobQuery *JobQuery `json:"jobQuery,omitempty"`
2901 // JobView: Optional. The desired job attributes returned for jobs in the
2902 // search response. Defaults to JobView.SMALL if no value is specified.
2903 //
2904 // Possible values:
2905 // "JOB_VIEW_UNSPECIFIED" - Default value.
2906 // "JOB_VIEW_ID_ONLY" - A ID only view of job, with following attributes:
2907 // Job.name, Job.requisition_id, Job.language_code.
2908 // "JOB_VIEW_MINIMAL" - A minimal view of the job, with the following
2909 // attributes: Job.name, Job.requisition_id, Job.title, Job.company_name,
2910 // Job.DerivedInfo.locations, Job.language_code.
2911 // "JOB_VIEW_SMALL" - A small view of the job, with the following attributes
2912 // in the search results: Job.name, Job.requisition_id, Job.title,
2913 // Job.company_name, Job.DerivedInfo.locations, Job.visibility,
2914 // Job.language_code, Job.description.
2915 // "JOB_VIEW_FULL" - All available attributes are included in the search
2916 // results.
2917 JobView string `json:"jobView,omitempty"`
2918 // Offset: Optional. An integer that specifies the current offset (that is,
2919 // starting result location, amongst the jobs deemed by the API as relevant) in
2920 // search results. This field is only considered if page_token is unset. The
2921 // maximum allowed value is 5000. Otherwise an error is thrown. For example, 0
2922 // means to return results starting from the first matching job, and 10 means
2923 // to return from the 11th job. This can be used for pagination, (for example,
2924 // pageSize = 10 and offset = 10 means to return from the second page).
2925 Offset int64 `json:"offset,omitempty"`
2926 // OrderBy: Optional. The criteria determining how search results are sorted.
2927 // Default is "relevance desc". Supported options are: * "relevance desc": By
2928 // relevance descending, as determined by the API algorithms. Relevance
2929 // thresholding of query results is only available with this ordering. *
2930 // "posting_publish_time desc": By Job.posting_publish_time descending. *
2931 // "posting_update_time desc": By Job.posting_update_time descending. *
2932 // "title": By Job.title ascending. * "title desc": By Job.title
2933 // descending. * "annualized_base_compensation": By job's
2934 // CompensationInfo.annualized_base_compensation_range ascending. Jobs whose
2935 // annualized base compensation is unspecified are put at the end of search
2936 // results. * "annualized_base_compensation desc": By job's
2937 // CompensationInfo.annualized_base_compensation_range descending. Jobs whose
2938 // annualized base compensation is unspecified are put at the end of search
2939 // results. * "annualized_total_compensation": By job's
2940 // CompensationInfo.annualized_total_compensation_range ascending. Jobs whose
2941 // annualized base compensation is unspecified are put at the end of search
2942 // results. * "annualized_total_compensation desc": By job's
2943 // CompensationInfo.annualized_total_compensation_range descending. Jobs whose
2944 // annualized base compensation is unspecified are put at the end of search
2945 // results. * "custom_ranking desc": By the relevance score adjusted to the
2946 // SearchJobsRequest.custom_ranking_info.ranking_expression with weight factor
2947 // assigned by SearchJobsRequest.custom_ranking_info.importance_level in
2948 // descending order. * Location sorting: Use the special syntax to order jobs
2949 // by distance: "distance_from('Hawaii')": Order by distance from Hawaii.
2950 // "distance_from(19.89, 155.5)": Order by distance from a coordinate.
2951 // "distance_from('Hawaii'), distance_from('Puerto Rico')": Order by multiple
2952 // locations. See details below. "distance_from('Hawaii'),
2953 // distance_from(19.89, 155.5)": Order by multiple locations. See details
2954 // below. The string can have a maximum of 256 characters. When multiple
2955 // distance centers are provided, a job that is close to any of the distance
2956 // centers would have a high rank. When a job has multiple locations, the job
2957 // location closest to one of the distance centers will be used. Jobs that
2958 // don't have locations will be ranked at the bottom. Distance is calculated
2959 // with a precision of 11.3 meters (37.4 feet). Diversification strategy is
2960 // still applied unless explicitly disabled in diversification_level.
2961 OrderBy string `json:"orderBy,omitempty"`
2962 // PageSize: Optional. A limit on the number of jobs returned in the search
2963 // results. Increasing this value above the default value of 10 can increase
2964 // search response time. The value can be between 1 and 100.
2965 PageSize int64 `json:"pageSize,omitempty"`
2966 // PageToken: Optional. The token specifying the current offset within search
2967 // results. See SearchJobsResponse.next_page_token for an explanation of how to
2968 // obtain the next set of query results.
2969 PageToken string `json:"pageToken,omitempty"`
2970 // RequestMetadata: Required. The meta information collected about the job
2971 // searcher, used to improve the search quality of the service. The identifiers
2972 // (such as `user_id`) are provided by users, and must be unique and
2973 // consistent.
2974 RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"`
2975 // RequirePreciseResultSize: This field is deprecated.
2976 RequirePreciseResultSize bool `json:"requirePreciseResultSize,omitempty"`
2977 // SearchMode: Optional. Mode of a search. Defaults to SearchMode.JOB_SEARCH.
2978 //
2979 // Possible values:
2980 // "SEARCH_MODE_UNSPECIFIED" - The mode of the search method isn't specified.
2981 // The default search behavior is identical to JOB_SEARCH search behavior.
2982 // "JOB_SEARCH" - The job search matches against all jobs, and featured jobs
2983 // (jobs with promotionValue > 0) are not specially handled.
2984 // "FEATURED_JOB_SEARCH" - The job search matches only against featured jobs
2985 // (jobs with a promotionValue > 0). This method doesn't return any jobs having
2986 // a promotionValue <= 0. The search results order is determined by the
2987 // promotionValue (jobs with a higher promotionValue are returned higher up in
2988 // the search results), with relevance being used as a tiebreaker.
2989 SearchMode string `json:"searchMode,omitempty"`
2990 // ForceSendFields is a list of field names (e.g. "CustomRankingInfo") to
2991 // unconditionally include in API requests. By default, fields with empty or
2992 // default values are omitted from API requests. See
2993 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2994 // details.
2995 ForceSendFields []string `json:"-"`
2996 // NullFields is a list of field names (e.g. "CustomRankingInfo") to include in
2997 // API requests with the JSON null value. By default, fields with empty values
2998 // are omitted from API requests. See
2999 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3000 NullFields []string `json:"-"`
3001 }
3002
3003 func (s SearchJobsRequest) MarshalJSON() ([]byte, error) {
3004 type NoMethod SearchJobsRequest
3005 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3006 }
3007
3008 // SearchJobsResponse: Output only. Response for SearchJob method.
3009 type SearchJobsResponse struct {
3010 // BroadenedQueryJobsCount: If query broadening is enabled, we may append
3011 // additional results from the broadened query. This number indicates how many
3012 // of the jobs returned in the jobs field are from the broadened query. These
3013 // results are always at the end of the jobs list. In particular, a value of 0,
3014 // or if the field isn't set, all the jobs in the jobs list are from the
3015 // original (without broadening) query. If this field is non-zero, subsequent
3016 // requests with offset after this result set should contain all broadened
3017 // results.
3018 BroadenedQueryJobsCount int64 `json:"broadenedQueryJobsCount,omitempty"`
3019 // EstimatedTotalSize: An estimation of the number of jobs that match the
3020 // specified query. This number is not guaranteed to be accurate. For accurate
3021 // results, see SearchJobsResponse.total_size.
3022 EstimatedTotalSize int64 `json:"estimatedTotalSize,omitempty"`
3023 // HistogramQueryResults: The histogram results that match with specified
3024 // SearchJobsRequest.histogram_queries.
3025 HistogramQueryResults []*HistogramQueryResult `json:"histogramQueryResults,omitempty"`
3026 // HistogramResults: The histogram results that match specified
3027 // SearchJobsRequest.histogram_facets.
3028 HistogramResults *HistogramResults `json:"histogramResults,omitempty"`
3029 // LocationFilters: The location filters that the service applied to the
3030 // specified query. If any filters are lat-lng based, the
3031 // JobLocation.location_type is
3032 // JobLocation.LocationType#LOCATION_TYPE_UNSPECIFIED.
3033 LocationFilters []*Location `json:"locationFilters,omitempty"`
3034 // MatchingJobs: The Job entities that match the specified SearchJobsRequest.
3035 MatchingJobs []*MatchingJob `json:"matchingJobs,omitempty"`
3036 // Metadata: Additional information for the API invocation, such as the request
3037 // tracking id.
3038 Metadata *ResponseMetadata `json:"metadata,omitempty"`
3039 // NextPageToken: The token that specifies the starting position of the next
3040 // page of results. This field is empty if there are no more results.
3041 NextPageToken string `json:"nextPageToken,omitempty"`
3042 // SpellCorrection: The spell checking result, and correction.
3043 SpellCorrection *SpellingCorrection `json:"spellCorrection,omitempty"`
3044 // TotalSize: The precise result count with limit 100,000.
3045 TotalSize int64 `json:"totalSize,omitempty"`
3046
3047 // ServerResponse contains the HTTP response code and headers from the server.
3048 googleapi.ServerResponse `json:"-"`
3049 // ForceSendFields is a list of field names (e.g. "BroadenedQueryJobsCount") to
3050 // unconditionally include in API requests. By default, fields with empty or
3051 // default values are omitted from API requests. See
3052 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3053 // details.
3054 ForceSendFields []string `json:"-"`
3055 // NullFields is a list of field names (e.g. "BroadenedQueryJobsCount") to
3056 // include in API requests with the JSON null value. By default, fields with
3057 // empty values are omitted from API requests. See
3058 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3059 NullFields []string `json:"-"`
3060 }
3061
3062 func (s SearchJobsResponse) MarshalJSON() ([]byte, error) {
3063 type NoMethod SearchJobsResponse
3064 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3065 }
3066
3067 // SpellingCorrection: Output only. Spell check result.
3068 type SpellingCorrection struct {
3069 // Corrected: Indicates if the query was corrected by the spell checker.
3070 Corrected bool `json:"corrected,omitempty"`
3071 // CorrectedText: Correction output consisting of the corrected keyword string.
3072 CorrectedText string `json:"correctedText,omitempty"`
3073 // ForceSendFields is a list of field names (e.g. "Corrected") to
3074 // unconditionally include in API requests. By default, fields with empty or
3075 // default values are omitted from API requests. See
3076 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3077 // details.
3078 ForceSendFields []string `json:"-"`
3079 // NullFields is a list of field names (e.g. "Corrected") to include in API
3080 // requests with the JSON null value. By default, fields with empty values are
3081 // omitted from API requests. See
3082 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3083 NullFields []string `json:"-"`
3084 }
3085
3086 func (s SpellingCorrection) MarshalJSON() ([]byte, error) {
3087 type NoMethod SpellingCorrection
3088 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3089 }
3090
3091 // Status: The `Status` type defines a logical error model that is suitable for
3092 // different programming environments, including REST APIs and RPC APIs. It is
3093 // used by gRPC (https://github.com/grpc). Each `Status` message contains three
3094 // pieces of data: error code, error message, and error details. You can find
3095 // out more about this error model and how to work with it in the API Design
3096 // Guide (https://cloud.google.com/apis/design/errors).
3097 type Status struct {
3098 // Code: The status code, which should be an enum value of google.rpc.Code.
3099 Code int64 `json:"code,omitempty"`
3100 // Details: A list of messages that carry the error details. There is a common
3101 // set of message types for APIs to use.
3102 Details []googleapi.RawMessage `json:"details,omitempty"`
3103 // Message: A developer-facing error message, which should be in English. Any
3104 // user-facing error message should be localized and sent in the
3105 // google.rpc.Status.details field, or localized by the client.
3106 Message string `json:"message,omitempty"`
3107 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
3108 // include in API requests. By default, fields with empty or default values are
3109 // omitted from API requests. See
3110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3111 // details.
3112 ForceSendFields []string `json:"-"`
3113 // NullFields is a list of field names (e.g. "Code") to include in API requests
3114 // with the JSON null value. By default, fields with empty values are omitted
3115 // from API requests. See
3116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3117 NullFields []string `json:"-"`
3118 }
3119
3120 func (s Status) MarshalJSON() ([]byte, error) {
3121 type NoMethod Status
3122 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3123 }
3124
3125 // TimeOfDay: Represents a time of day. The date and time zone are either not
3126 // significant or are specified elsewhere. An API may choose to allow leap
3127 // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
3128 type TimeOfDay struct {
3129 // Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0
3130 // and typically must be less than or equal to 23. An API may choose to allow
3131 // the value "24:00:00" for scenarios like business closing time.
3132 Hours int64 `json:"hours,omitempty"`
3133 // Minutes: Minutes of an hour. Must be greater than or equal to 0 and less
3134 // than or equal to 59.
3135 Minutes int64 `json:"minutes,omitempty"`
3136 // Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal
3137 // to 0 and less than or equal to 999,999,999.
3138 Nanos int64 `json:"nanos,omitempty"`
3139 // Seconds: Seconds of a minute. Must be greater than or equal to 0 and
3140 // typically must be less than or equal to 59. An API may allow the value 60 if
3141 // it allows leap-seconds.
3142 Seconds int64 `json:"seconds,omitempty"`
3143 // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
3144 // include in API requests. By default, fields with empty or default values are
3145 // omitted from API requests. See
3146 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3147 // details.
3148 ForceSendFields []string `json:"-"`
3149 // NullFields is a list of field names (e.g. "Hours") to include in API
3150 // requests with the JSON null value. By default, fields with empty values are
3151 // omitted from API requests. See
3152 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3153 NullFields []string `json:"-"`
3154 }
3155
3156 func (s TimeOfDay) MarshalJSON() ([]byte, error) {
3157 type NoMethod TimeOfDay
3158 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3159 }
3160
3161 // TimestampRange: Message representing a period of time between two
3162 // timestamps.
3163 type TimestampRange struct {
3164 // EndTime: End of the period.
3165 EndTime string `json:"endTime,omitempty"`
3166 // StartTime: Begin of the period.
3167 StartTime string `json:"startTime,omitempty"`
3168 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
3169 // include in API requests. By default, fields with empty or default values are
3170 // omitted from API requests. See
3171 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3172 // details.
3173 ForceSendFields []string `json:"-"`
3174 // NullFields is a list of field names (e.g. "EndTime") to include in API
3175 // requests with the JSON null value. By default, fields with empty values are
3176 // omitted from API requests. See
3177 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3178 NullFields []string `json:"-"`
3179 }
3180
3181 func (s TimestampRange) MarshalJSON() ([]byte, error) {
3182 type NoMethod TimestampRange
3183 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3184 }
3185
3186 // UpdateCompanyRequest: Input only. Request for updating a specified company.
3187 type UpdateCompanyRequest struct {
3188 // Company: Required. The company resource to replace the current resource in
3189 // the system.
3190 Company *Company `json:"company,omitempty"`
3191 // UpdateMask: Optional but strongly recommended for the best service
3192 // experience. If update_mask is provided, only the specified fields in company
3193 // are updated. Otherwise all the fields are updated. A field mask to specify
3194 // the company fields to be updated. Only top level fields of Company are
3195 // supported.
3196 UpdateMask string `json:"updateMask,omitempty"`
3197 // ForceSendFields is a list of field names (e.g. "Company") to unconditionally
3198 // include in API requests. By default, fields with empty or default values are
3199 // omitted from API requests. See
3200 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3201 // details.
3202 ForceSendFields []string `json:"-"`
3203 // NullFields is a list of field names (e.g. "Company") to include in API
3204 // requests with the JSON null value. By default, fields with empty values are
3205 // omitted from API requests. See
3206 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3207 NullFields []string `json:"-"`
3208 }
3209
3210 func (s UpdateCompanyRequest) MarshalJSON() ([]byte, error) {
3211 type NoMethod UpdateCompanyRequest
3212 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3213 }
3214
3215 // UpdateJobRequest: Input only. Update job request.
3216 type UpdateJobRequest struct {
3217 // Job: Required. The Job to be updated.
3218 Job *Job `json:"job,omitempty"`
3219 // UpdateMask: Optional but strongly recommended to be provided for the best
3220 // service experience. If update_mask is provided, only the specified fields in
3221 // job are updated. Otherwise all the fields are updated. A field mask to
3222 // restrict the fields that are updated. Only top level fields of Job are
3223 // supported.
3224 UpdateMask string `json:"updateMask,omitempty"`
3225 // ForceSendFields is a list of field names (e.g. "Job") to unconditionally
3226 // include in API requests. By default, fields with empty or default values are
3227 // omitted from API requests. See
3228 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3229 // details.
3230 ForceSendFields []string `json:"-"`
3231 // NullFields is a list of field names (e.g. "Job") to include in API requests
3232 // with the JSON null value. By default, fields with empty values are omitted
3233 // from API requests. See
3234 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3235 NullFields []string `json:"-"`
3236 }
3237
3238 func (s UpdateJobRequest) MarshalJSON() ([]byte, error) {
3239 type NoMethod UpdateJobRequest
3240 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3241 }
3242
3243 type ProjectsCompleteCall struct {
3244 s *Service
3245 name string
3246 urlParams_ gensupport.URLParams
3247 ifNoneMatch_ string
3248 ctx_ context.Context
3249 header_ http.Header
3250 }
3251
3252 // Complete: Completes the specified prefix with keyword suggestions. Intended
3253 // for use by a job search auto-complete search box.
3254 //
3255 // - name: Resource name of project the completion is performed within. The
3256 // format is "projects/{project_id}", for example,
3257 // "projects/api-test-project".
3258 func (r *ProjectsService) Complete(name string) *ProjectsCompleteCall {
3259 c := &ProjectsCompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3260 c.name = name
3261 return c
3262 }
3263
3264 // CompanyName sets the optional parameter "companyName": If provided,
3265 // restricts completion to specified company. The format is
3266 // "projects/{project_id}/companies/{company_id}", for example,
3267 // "projects/api-test-project/companies/foo".
3268 func (c *ProjectsCompleteCall) CompanyName(companyName string) *ProjectsCompleteCall {
3269 c.urlParams_.Set("companyName", companyName)
3270 return c
3271 }
3272
3273 // LanguageCode sets the optional parameter "languageCode": Deprecated. Use
3274 // language_codes instead. The language of the query. This is the BCP-47
3275 // language code, such as "en-US" or "sr-Latn". For more information, see Tags
3276 // for Identifying Languages (https://tools.ietf.org/html/bcp47). For
3277 // CompletionType.JOB_TITLE type, only open jobs with the same language_code
3278 // are returned. For CompletionType.COMPANY_NAME type, only companies having
3279 // open jobs with the same language_code are returned. For
3280 // CompletionType.COMBINED type, only open jobs with the same language_code or
3281 // companies having open jobs with the same language_code are returned. The
3282 // maximum number of allowed characters is 255.
3283 func (c *ProjectsCompleteCall) LanguageCode(languageCode string) *ProjectsCompleteCall {
3284 c.urlParams_.Set("languageCode", languageCode)
3285 return c
3286 }
3287
3288 // LanguageCodes sets the optional parameter "languageCodes": The list of
3289 // languages of the query. This is the BCP-47 language code, such as "en-US" or
3290 // "sr-Latn". For more information, see Tags for Identifying Languages
3291 // (https://tools.ietf.org/html/bcp47). For CompletionType.JOB_TITLE type, only
3292 // open jobs with the same language_codes are returned. For
3293 // CompletionType.COMPANY_NAME type, only companies having open jobs with the
3294 // same language_codes are returned. For CompletionType.COMBINED type, only
3295 // open jobs with the same language_codes or companies having open jobs with
3296 // the same language_codes are returned. The maximum number of allowed
3297 // characters is 255.
3298 func (c *ProjectsCompleteCall) LanguageCodes(languageCodes ...string) *ProjectsCompleteCall {
3299 c.urlParams_.SetMulti("languageCodes", append([]string{}, languageCodes...))
3300 return c
3301 }
3302
3303 // PageSize sets the optional parameter "pageSize": Required. Completion result
3304 // count. The maximum allowed page size is 10.
3305 func (c *ProjectsCompleteCall) PageSize(pageSize int64) *ProjectsCompleteCall {
3306 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3307 return c
3308 }
3309
3310 // Query sets the optional parameter "query": Required. The query used to
3311 // generate suggestions. The maximum number of allowed characters is 255.
3312 func (c *ProjectsCompleteCall) Query(query string) *ProjectsCompleteCall {
3313 c.urlParams_.Set("query", query)
3314 return c
3315 }
3316
3317 // Scope sets the optional parameter "scope": The scope of the completion. The
3318 // defaults is CompletionScope.PUBLIC.
3319 //
3320 // Possible values:
3321 //
3322 // "COMPLETION_SCOPE_UNSPECIFIED" - Default value.
3323 // "TENANT" - Suggestions are based only on the data provided by the client.
3324 // "PUBLIC" - Suggestions are based on all jobs data in the system that's
3325 //
3326 // visible to the client
3327 func (c *ProjectsCompleteCall) Scope(scope string) *ProjectsCompleteCall {
3328 c.urlParams_.Set("scope", scope)
3329 return c
3330 }
3331
3332 // Type sets the optional parameter "type": The completion topic. The default
3333 // is CompletionType.COMBINED.
3334 //
3335 // Possible values:
3336 //
3337 // "COMPLETION_TYPE_UNSPECIFIED" - Default value.
3338 // "JOB_TITLE" - Only suggest job titles.
3339 // "COMPANY_NAME" - Only suggest company names.
3340 // "COMBINED" - Suggest both job titles and company names.
3341 func (c *ProjectsCompleteCall) Type(type_ string) *ProjectsCompleteCall {
3342 c.urlParams_.Set("type", type_)
3343 return c
3344 }
3345
3346 // Fields allows partial responses to be retrieved. See
3347 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3348 // details.
3349 func (c *ProjectsCompleteCall) Fields(s ...googleapi.Field) *ProjectsCompleteCall {
3350 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3351 return c
3352 }
3353
3354 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3355 // object's ETag matches the given value. This is useful for getting updates
3356 // only after the object has changed since the last request.
3357 func (c *ProjectsCompleteCall) IfNoneMatch(entityTag string) *ProjectsCompleteCall {
3358 c.ifNoneMatch_ = entityTag
3359 return c
3360 }
3361
3362 // Context sets the context to be used in this call's Do method.
3363 func (c *ProjectsCompleteCall) Context(ctx context.Context) *ProjectsCompleteCall {
3364 c.ctx_ = ctx
3365 return c
3366 }
3367
3368 // Header returns a http.Header that can be modified by the caller to add
3369 // headers to the request.
3370 func (c *ProjectsCompleteCall) Header() http.Header {
3371 if c.header_ == nil {
3372 c.header_ = make(http.Header)
3373 }
3374 return c.header_
3375 }
3376
3377 func (c *ProjectsCompleteCall) doRequest(alt string) (*http.Response, error) {
3378 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3379 if c.ifNoneMatch_ != "" {
3380 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3381 }
3382 c.urlParams_.Set("alt", alt)
3383 c.urlParams_.Set("prettyPrint", "false")
3384 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}:complete")
3385 urls += "?" + c.urlParams_.Encode()
3386 req, err := http.NewRequest("GET", urls, nil)
3387 if err != nil {
3388 return nil, err
3389 }
3390 req.Header = reqHeaders
3391 googleapi.Expand(req.URL, map[string]string{
3392 "name": c.name,
3393 })
3394 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.complete", "request", internallog.HTTPRequest(req, nil))
3395 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3396 }
3397
3398 // Do executes the "jobs.projects.complete" call.
3399 // Any non-2xx status code is an error. Response headers are in either
3400 // *CompleteQueryResponse.ServerResponse.Header or (if a response was returned
3401 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3402 // check whether the returned error was because http.StatusNotModified was
3403 // returned.
3404 func (c *ProjectsCompleteCall) Do(opts ...googleapi.CallOption) (*CompleteQueryResponse, error) {
3405 gensupport.SetOptions(c.urlParams_, opts...)
3406 res, err := c.doRequest("json")
3407 if res != nil && res.StatusCode == http.StatusNotModified {
3408 if res.Body != nil {
3409 res.Body.Close()
3410 }
3411 return nil, gensupport.WrapError(&googleapi.Error{
3412 Code: res.StatusCode,
3413 Header: res.Header,
3414 })
3415 }
3416 if err != nil {
3417 return nil, err
3418 }
3419 defer googleapi.CloseBody(res)
3420 if err := googleapi.CheckResponse(res); err != nil {
3421 return nil, gensupport.WrapError(err)
3422 }
3423 ret := &CompleteQueryResponse{
3424 ServerResponse: googleapi.ServerResponse{
3425 Header: res.Header,
3426 HTTPStatusCode: res.StatusCode,
3427 },
3428 }
3429 target := &ret
3430 b, err := gensupport.DecodeResponseBytes(target, res)
3431 if err != nil {
3432 return nil, err
3433 }
3434 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.complete", "response", internallog.HTTPResponse(res, b))
3435 return ret, nil
3436 }
3437
3438 type ProjectsClientEventsCreateCall struct {
3439 s *Service
3440 parent string
3441 createclienteventrequest *CreateClientEventRequest
3442 urlParams_ gensupport.URLParams
3443 ctx_ context.Context
3444 header_ http.Header
3445 }
3446
3447 // Create: Report events issued when end user interacts with customer's
3448 // application that uses Cloud Talent Solution. You may inspect the created
3449 // events in self service tools
3450 // (https://console.cloud.google.com/talent-solution/overview). Learn more
3451 // (https://cloud.google.com/talent-solution/docs/management-tools) about self
3452 // service tools.
3453 //
3454 // - parent: Parent project name.
3455 func (r *ProjectsClientEventsService) Create(parent string, createclienteventrequest *CreateClientEventRequest) *ProjectsClientEventsCreateCall {
3456 c := &ProjectsClientEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3457 c.parent = parent
3458 c.createclienteventrequest = createclienteventrequest
3459 return c
3460 }
3461
3462 // Fields allows partial responses to be retrieved. See
3463 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3464 // details.
3465 func (c *ProjectsClientEventsCreateCall) Fields(s ...googleapi.Field) *ProjectsClientEventsCreateCall {
3466 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3467 return c
3468 }
3469
3470 // Context sets the context to be used in this call's Do method.
3471 func (c *ProjectsClientEventsCreateCall) Context(ctx context.Context) *ProjectsClientEventsCreateCall {
3472 c.ctx_ = ctx
3473 return c
3474 }
3475
3476 // Header returns a http.Header that can be modified by the caller to add
3477 // headers to the request.
3478 func (c *ProjectsClientEventsCreateCall) Header() http.Header {
3479 if c.header_ == nil {
3480 c.header_ = make(http.Header)
3481 }
3482 return c.header_
3483 }
3484
3485 func (c *ProjectsClientEventsCreateCall) doRequest(alt string) (*http.Response, error) {
3486 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3487 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createclienteventrequest)
3488 if err != nil {
3489 return nil, err
3490 }
3491 c.urlParams_.Set("alt", alt)
3492 c.urlParams_.Set("prettyPrint", "false")
3493 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/clientEvents")
3494 urls += "?" + c.urlParams_.Encode()
3495 req, err := http.NewRequest("POST", urls, body)
3496 if err != nil {
3497 return nil, err
3498 }
3499 req.Header = reqHeaders
3500 googleapi.Expand(req.URL, map[string]string{
3501 "parent": c.parent,
3502 })
3503 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.clientEvents.create", "request", internallog.HTTPRequest(req, body.Bytes()))
3504 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3505 }
3506
3507 // Do executes the "jobs.projects.clientEvents.create" call.
3508 // Any non-2xx status code is an error. Response headers are in either
3509 // *ClientEvent.ServerResponse.Header or (if a response was returned at all) in
3510 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3511 // whether the returned error was because http.StatusNotModified was returned.
3512 func (c *ProjectsClientEventsCreateCall) Do(opts ...googleapi.CallOption) (*ClientEvent, error) {
3513 gensupport.SetOptions(c.urlParams_, opts...)
3514 res, err := c.doRequest("json")
3515 if res != nil && res.StatusCode == http.StatusNotModified {
3516 if res.Body != nil {
3517 res.Body.Close()
3518 }
3519 return nil, gensupport.WrapError(&googleapi.Error{
3520 Code: res.StatusCode,
3521 Header: res.Header,
3522 })
3523 }
3524 if err != nil {
3525 return nil, err
3526 }
3527 defer googleapi.CloseBody(res)
3528 if err := googleapi.CheckResponse(res); err != nil {
3529 return nil, gensupport.WrapError(err)
3530 }
3531 ret := &ClientEvent{
3532 ServerResponse: googleapi.ServerResponse{
3533 Header: res.Header,
3534 HTTPStatusCode: res.StatusCode,
3535 },
3536 }
3537 target := &ret
3538 b, err := gensupport.DecodeResponseBytes(target, res)
3539 if err != nil {
3540 return nil, err
3541 }
3542 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.clientEvents.create", "response", internallog.HTTPResponse(res, b))
3543 return ret, nil
3544 }
3545
3546 type ProjectsCompaniesCreateCall struct {
3547 s *Service
3548 parent string
3549 createcompanyrequest *CreateCompanyRequest
3550 urlParams_ gensupport.URLParams
3551 ctx_ context.Context
3552 header_ http.Header
3553 }
3554
3555 // Create: Creates a new company entity.
3556 //
3557 // - parent: Resource name of the project under which the company is created.
3558 // The format is "projects/{project_id}", for example,
3559 // "projects/api-test-project".
3560 func (r *ProjectsCompaniesService) Create(parent string, createcompanyrequest *CreateCompanyRequest) *ProjectsCompaniesCreateCall {
3561 c := &ProjectsCompaniesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3562 c.parent = parent
3563 c.createcompanyrequest = createcompanyrequest
3564 return c
3565 }
3566
3567 // Fields allows partial responses to be retrieved. See
3568 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3569 // details.
3570 func (c *ProjectsCompaniesCreateCall) Fields(s ...googleapi.Field) *ProjectsCompaniesCreateCall {
3571 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3572 return c
3573 }
3574
3575 // Context sets the context to be used in this call's Do method.
3576 func (c *ProjectsCompaniesCreateCall) Context(ctx context.Context) *ProjectsCompaniesCreateCall {
3577 c.ctx_ = ctx
3578 return c
3579 }
3580
3581 // Header returns a http.Header that can be modified by the caller to add
3582 // headers to the request.
3583 func (c *ProjectsCompaniesCreateCall) Header() http.Header {
3584 if c.header_ == nil {
3585 c.header_ = make(http.Header)
3586 }
3587 return c.header_
3588 }
3589
3590 func (c *ProjectsCompaniesCreateCall) doRequest(alt string) (*http.Response, error) {
3591 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3592 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createcompanyrequest)
3593 if err != nil {
3594 return nil, err
3595 }
3596 c.urlParams_.Set("alt", alt)
3597 c.urlParams_.Set("prettyPrint", "false")
3598 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/companies")
3599 urls += "?" + c.urlParams_.Encode()
3600 req, err := http.NewRequest("POST", urls, body)
3601 if err != nil {
3602 return nil, err
3603 }
3604 req.Header = reqHeaders
3605 googleapi.Expand(req.URL, map[string]string{
3606 "parent": c.parent,
3607 })
3608 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.companies.create", "request", internallog.HTTPRequest(req, body.Bytes()))
3609 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3610 }
3611
3612 // Do executes the "jobs.projects.companies.create" call.
3613 // Any non-2xx status code is an error. Response headers are in either
3614 // *Company.ServerResponse.Header or (if a response was returned at all) in
3615 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3616 // whether the returned error was because http.StatusNotModified was returned.
3617 func (c *ProjectsCompaniesCreateCall) Do(opts ...googleapi.CallOption) (*Company, error) {
3618 gensupport.SetOptions(c.urlParams_, opts...)
3619 res, err := c.doRequest("json")
3620 if res != nil && res.StatusCode == http.StatusNotModified {
3621 if res.Body != nil {
3622 res.Body.Close()
3623 }
3624 return nil, gensupport.WrapError(&googleapi.Error{
3625 Code: res.StatusCode,
3626 Header: res.Header,
3627 })
3628 }
3629 if err != nil {
3630 return nil, err
3631 }
3632 defer googleapi.CloseBody(res)
3633 if err := googleapi.CheckResponse(res); err != nil {
3634 return nil, gensupport.WrapError(err)
3635 }
3636 ret := &Company{
3637 ServerResponse: googleapi.ServerResponse{
3638 Header: res.Header,
3639 HTTPStatusCode: res.StatusCode,
3640 },
3641 }
3642 target := &ret
3643 b, err := gensupport.DecodeResponseBytes(target, res)
3644 if err != nil {
3645 return nil, err
3646 }
3647 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.companies.create", "response", internallog.HTTPResponse(res, b))
3648 return ret, nil
3649 }
3650
3651 type ProjectsCompaniesDeleteCall struct {
3652 s *Service
3653 name string
3654 urlParams_ gensupport.URLParams
3655 ctx_ context.Context
3656 header_ http.Header
3657 }
3658
3659 // Delete: Deletes specified company. Prerequisite: The company has no jobs
3660 // associated with it.
3661 //
3662 // - name: The resource name of the company to be deleted. The format is
3663 // "projects/{project_id}/companies/{company_id}", for example,
3664 // "projects/api-test-project/companies/foo".
3665 func (r *ProjectsCompaniesService) Delete(name string) *ProjectsCompaniesDeleteCall {
3666 c := &ProjectsCompaniesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3667 c.name = name
3668 return c
3669 }
3670
3671 // Fields allows partial responses to be retrieved. See
3672 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3673 // details.
3674 func (c *ProjectsCompaniesDeleteCall) Fields(s ...googleapi.Field) *ProjectsCompaniesDeleteCall {
3675 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3676 return c
3677 }
3678
3679 // Context sets the context to be used in this call's Do method.
3680 func (c *ProjectsCompaniesDeleteCall) Context(ctx context.Context) *ProjectsCompaniesDeleteCall {
3681 c.ctx_ = ctx
3682 return c
3683 }
3684
3685 // Header returns a http.Header that can be modified by the caller to add
3686 // headers to the request.
3687 func (c *ProjectsCompaniesDeleteCall) Header() http.Header {
3688 if c.header_ == nil {
3689 c.header_ = make(http.Header)
3690 }
3691 return c.header_
3692 }
3693
3694 func (c *ProjectsCompaniesDeleteCall) doRequest(alt string) (*http.Response, error) {
3695 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3696 c.urlParams_.Set("alt", alt)
3697 c.urlParams_.Set("prettyPrint", "false")
3698 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
3699 urls += "?" + c.urlParams_.Encode()
3700 req, err := http.NewRequest("DELETE", urls, nil)
3701 if err != nil {
3702 return nil, err
3703 }
3704 req.Header = reqHeaders
3705 googleapi.Expand(req.URL, map[string]string{
3706 "name": c.name,
3707 })
3708 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.companies.delete", "request", internallog.HTTPRequest(req, nil))
3709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3710 }
3711
3712 // Do executes the "jobs.projects.companies.delete" call.
3713 // Any non-2xx status code is an error. Response headers are in either
3714 // *Empty.ServerResponse.Header or (if a response was returned at all) in
3715 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3716 // whether the returned error was because http.StatusNotModified was returned.
3717 func (c *ProjectsCompaniesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3718 gensupport.SetOptions(c.urlParams_, opts...)
3719 res, err := c.doRequest("json")
3720 if res != nil && res.StatusCode == http.StatusNotModified {
3721 if res.Body != nil {
3722 res.Body.Close()
3723 }
3724 return nil, gensupport.WrapError(&googleapi.Error{
3725 Code: res.StatusCode,
3726 Header: res.Header,
3727 })
3728 }
3729 if err != nil {
3730 return nil, err
3731 }
3732 defer googleapi.CloseBody(res)
3733 if err := googleapi.CheckResponse(res); err != nil {
3734 return nil, gensupport.WrapError(err)
3735 }
3736 ret := &Empty{
3737 ServerResponse: googleapi.ServerResponse{
3738 Header: res.Header,
3739 HTTPStatusCode: res.StatusCode,
3740 },
3741 }
3742 target := &ret
3743 b, err := gensupport.DecodeResponseBytes(target, res)
3744 if err != nil {
3745 return nil, err
3746 }
3747 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.companies.delete", "response", internallog.HTTPResponse(res, b))
3748 return ret, nil
3749 }
3750
3751 type ProjectsCompaniesGetCall struct {
3752 s *Service
3753 name string
3754 urlParams_ gensupport.URLParams
3755 ifNoneMatch_ string
3756 ctx_ context.Context
3757 header_ http.Header
3758 }
3759
3760 // Get: Retrieves specified company.
3761 //
3762 // - name: The resource name of the company to be retrieved. The format is
3763 // "projects/{project_id}/companies/{company_id}", for example,
3764 // "projects/api-test-project/companies/foo".
3765 func (r *ProjectsCompaniesService) Get(name string) *ProjectsCompaniesGetCall {
3766 c := &ProjectsCompaniesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3767 c.name = name
3768 return c
3769 }
3770
3771 // Fields allows partial responses to be retrieved. See
3772 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3773 // details.
3774 func (c *ProjectsCompaniesGetCall) Fields(s ...googleapi.Field) *ProjectsCompaniesGetCall {
3775 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3776 return c
3777 }
3778
3779 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3780 // object's ETag matches the given value. This is useful for getting updates
3781 // only after the object has changed since the last request.
3782 func (c *ProjectsCompaniesGetCall) IfNoneMatch(entityTag string) *ProjectsCompaniesGetCall {
3783 c.ifNoneMatch_ = entityTag
3784 return c
3785 }
3786
3787 // Context sets the context to be used in this call's Do method.
3788 func (c *ProjectsCompaniesGetCall) Context(ctx context.Context) *ProjectsCompaniesGetCall {
3789 c.ctx_ = ctx
3790 return c
3791 }
3792
3793 // Header returns a http.Header that can be modified by the caller to add
3794 // headers to the request.
3795 func (c *ProjectsCompaniesGetCall) Header() http.Header {
3796 if c.header_ == nil {
3797 c.header_ = make(http.Header)
3798 }
3799 return c.header_
3800 }
3801
3802 func (c *ProjectsCompaniesGetCall) doRequest(alt string) (*http.Response, error) {
3803 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3804 if c.ifNoneMatch_ != "" {
3805 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3806 }
3807 c.urlParams_.Set("alt", alt)
3808 c.urlParams_.Set("prettyPrint", "false")
3809 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
3810 urls += "?" + c.urlParams_.Encode()
3811 req, err := http.NewRequest("GET", urls, nil)
3812 if err != nil {
3813 return nil, err
3814 }
3815 req.Header = reqHeaders
3816 googleapi.Expand(req.URL, map[string]string{
3817 "name": c.name,
3818 })
3819 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.companies.get", "request", internallog.HTTPRequest(req, nil))
3820 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3821 }
3822
3823 // Do executes the "jobs.projects.companies.get" call.
3824 // Any non-2xx status code is an error. Response headers are in either
3825 // *Company.ServerResponse.Header or (if a response was returned at all) in
3826 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3827 // whether the returned error was because http.StatusNotModified was returned.
3828 func (c *ProjectsCompaniesGetCall) Do(opts ...googleapi.CallOption) (*Company, error) {
3829 gensupport.SetOptions(c.urlParams_, opts...)
3830 res, err := c.doRequest("json")
3831 if res != nil && res.StatusCode == http.StatusNotModified {
3832 if res.Body != nil {
3833 res.Body.Close()
3834 }
3835 return nil, gensupport.WrapError(&googleapi.Error{
3836 Code: res.StatusCode,
3837 Header: res.Header,
3838 })
3839 }
3840 if err != nil {
3841 return nil, err
3842 }
3843 defer googleapi.CloseBody(res)
3844 if err := googleapi.CheckResponse(res); err != nil {
3845 return nil, gensupport.WrapError(err)
3846 }
3847 ret := &Company{
3848 ServerResponse: googleapi.ServerResponse{
3849 Header: res.Header,
3850 HTTPStatusCode: res.StatusCode,
3851 },
3852 }
3853 target := &ret
3854 b, err := gensupport.DecodeResponseBytes(target, res)
3855 if err != nil {
3856 return nil, err
3857 }
3858 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.companies.get", "response", internallog.HTTPResponse(res, b))
3859 return ret, nil
3860 }
3861
3862 type ProjectsCompaniesListCall struct {
3863 s *Service
3864 parent string
3865 urlParams_ gensupport.URLParams
3866 ifNoneMatch_ string
3867 ctx_ context.Context
3868 header_ http.Header
3869 }
3870
3871 // List: Lists all companies associated with the service account.
3872 //
3873 // - parent: Resource name of the project under which the company is created.
3874 // The format is "projects/{project_id}", for example,
3875 // "projects/api-test-project".
3876 func (r *ProjectsCompaniesService) List(parent string) *ProjectsCompaniesListCall {
3877 c := &ProjectsCompaniesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3878 c.parent = parent
3879 return c
3880 }
3881
3882 // PageSize sets the optional parameter "pageSize": The maximum number of
3883 // companies to be returned, at most 100. Default is 100 if a non-positive
3884 // number is provided.
3885 func (c *ProjectsCompaniesListCall) PageSize(pageSize int64) *ProjectsCompaniesListCall {
3886 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3887 return c
3888 }
3889
3890 // PageToken sets the optional parameter "pageToken": The starting indicator
3891 // from which to return results.
3892 func (c *ProjectsCompaniesListCall) PageToken(pageToken string) *ProjectsCompaniesListCall {
3893 c.urlParams_.Set("pageToken", pageToken)
3894 return c
3895 }
3896
3897 // RequireOpenJobs sets the optional parameter "requireOpenJobs": Set to true
3898 // if the companies requested must have open jobs. Defaults to false. If true,
3899 // at most page_size of companies are fetched, among which only those with open
3900 // jobs are returned.
3901 func (c *ProjectsCompaniesListCall) RequireOpenJobs(requireOpenJobs bool) *ProjectsCompaniesListCall {
3902 c.urlParams_.Set("requireOpenJobs", fmt.Sprint(requireOpenJobs))
3903 return c
3904 }
3905
3906 // Fields allows partial responses to be retrieved. See
3907 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3908 // details.
3909 func (c *ProjectsCompaniesListCall) Fields(s ...googleapi.Field) *ProjectsCompaniesListCall {
3910 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3911 return c
3912 }
3913
3914 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3915 // object's ETag matches the given value. This is useful for getting updates
3916 // only after the object has changed since the last request.
3917 func (c *ProjectsCompaniesListCall) IfNoneMatch(entityTag string) *ProjectsCompaniesListCall {
3918 c.ifNoneMatch_ = entityTag
3919 return c
3920 }
3921
3922 // Context sets the context to be used in this call's Do method.
3923 func (c *ProjectsCompaniesListCall) Context(ctx context.Context) *ProjectsCompaniesListCall {
3924 c.ctx_ = ctx
3925 return c
3926 }
3927
3928 // Header returns a http.Header that can be modified by the caller to add
3929 // headers to the request.
3930 func (c *ProjectsCompaniesListCall) Header() http.Header {
3931 if c.header_ == nil {
3932 c.header_ = make(http.Header)
3933 }
3934 return c.header_
3935 }
3936
3937 func (c *ProjectsCompaniesListCall) doRequest(alt string) (*http.Response, error) {
3938 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3939 if c.ifNoneMatch_ != "" {
3940 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3941 }
3942 c.urlParams_.Set("alt", alt)
3943 c.urlParams_.Set("prettyPrint", "false")
3944 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/companies")
3945 urls += "?" + c.urlParams_.Encode()
3946 req, err := http.NewRequest("GET", urls, nil)
3947 if err != nil {
3948 return nil, err
3949 }
3950 req.Header = reqHeaders
3951 googleapi.Expand(req.URL, map[string]string{
3952 "parent": c.parent,
3953 })
3954 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.companies.list", "request", internallog.HTTPRequest(req, nil))
3955 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3956 }
3957
3958 // Do executes the "jobs.projects.companies.list" call.
3959 // Any non-2xx status code is an error. Response headers are in either
3960 // *ListCompaniesResponse.ServerResponse.Header or (if a response was returned
3961 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3962 // check whether the returned error was because http.StatusNotModified was
3963 // returned.
3964 func (c *ProjectsCompaniesListCall) Do(opts ...googleapi.CallOption) (*ListCompaniesResponse, error) {
3965 gensupport.SetOptions(c.urlParams_, opts...)
3966 res, err := c.doRequest("json")
3967 if res != nil && res.StatusCode == http.StatusNotModified {
3968 if res.Body != nil {
3969 res.Body.Close()
3970 }
3971 return nil, gensupport.WrapError(&googleapi.Error{
3972 Code: res.StatusCode,
3973 Header: res.Header,
3974 })
3975 }
3976 if err != nil {
3977 return nil, err
3978 }
3979 defer googleapi.CloseBody(res)
3980 if err := googleapi.CheckResponse(res); err != nil {
3981 return nil, gensupport.WrapError(err)
3982 }
3983 ret := &ListCompaniesResponse{
3984 ServerResponse: googleapi.ServerResponse{
3985 Header: res.Header,
3986 HTTPStatusCode: res.StatusCode,
3987 },
3988 }
3989 target := &ret
3990 b, err := gensupport.DecodeResponseBytes(target, res)
3991 if err != nil {
3992 return nil, err
3993 }
3994 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.companies.list", "response", internallog.HTTPResponse(res, b))
3995 return ret, nil
3996 }
3997
3998 // Pages invokes f for each page of results.
3999 // A non-nil error returned from f will halt the iteration.
4000 // The provided context supersedes any context provided to the Context method.
4001 func (c *ProjectsCompaniesListCall) Pages(ctx context.Context, f func(*ListCompaniesResponse) error) error {
4002 c.ctx_ = ctx
4003 defer c.PageToken(c.urlParams_.Get("pageToken"))
4004 for {
4005 x, err := c.Do()
4006 if err != nil {
4007 return err
4008 }
4009 if err := f(x); err != nil {
4010 return err
4011 }
4012 if x.NextPageToken == "" {
4013 return nil
4014 }
4015 c.PageToken(x.NextPageToken)
4016 }
4017 }
4018
4019 type ProjectsCompaniesPatchCall struct {
4020 s *Service
4021 name string
4022 updatecompanyrequest *UpdateCompanyRequest
4023 urlParams_ gensupport.URLParams
4024 ctx_ context.Context
4025 header_ http.Header
4026 }
4027
4028 // Patch: Updates specified company. Company names can't be updated. To update
4029 // a company name, delete the company and all jobs associated with it, and only
4030 // then re-create them.
4031 //
4032 // - name: Required during company update. The resource name for a company.
4033 // This is generated by the service when a company is created. The format is
4034 // "projects/{project_id}/companies/{company_id}", for example,
4035 // "projects/api-test-project/companies/foo".
4036 func (r *ProjectsCompaniesService) Patch(name string, updatecompanyrequest *UpdateCompanyRequest) *ProjectsCompaniesPatchCall {
4037 c := &ProjectsCompaniesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4038 c.name = name
4039 c.updatecompanyrequest = updatecompanyrequest
4040 return c
4041 }
4042
4043 // Fields allows partial responses to be retrieved. See
4044 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4045 // details.
4046 func (c *ProjectsCompaniesPatchCall) Fields(s ...googleapi.Field) *ProjectsCompaniesPatchCall {
4047 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4048 return c
4049 }
4050
4051 // Context sets the context to be used in this call's Do method.
4052 func (c *ProjectsCompaniesPatchCall) Context(ctx context.Context) *ProjectsCompaniesPatchCall {
4053 c.ctx_ = ctx
4054 return c
4055 }
4056
4057 // Header returns a http.Header that can be modified by the caller to add
4058 // headers to the request.
4059 func (c *ProjectsCompaniesPatchCall) Header() http.Header {
4060 if c.header_ == nil {
4061 c.header_ = make(http.Header)
4062 }
4063 return c.header_
4064 }
4065
4066 func (c *ProjectsCompaniesPatchCall) doRequest(alt string) (*http.Response, error) {
4067 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4068 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatecompanyrequest)
4069 if err != nil {
4070 return nil, err
4071 }
4072 c.urlParams_.Set("alt", alt)
4073 c.urlParams_.Set("prettyPrint", "false")
4074 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
4075 urls += "?" + c.urlParams_.Encode()
4076 req, err := http.NewRequest("PATCH", urls, body)
4077 if err != nil {
4078 return nil, err
4079 }
4080 req.Header = reqHeaders
4081 googleapi.Expand(req.URL, map[string]string{
4082 "name": c.name,
4083 })
4084 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.companies.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
4085 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4086 }
4087
4088 // Do executes the "jobs.projects.companies.patch" call.
4089 // Any non-2xx status code is an error. Response headers are in either
4090 // *Company.ServerResponse.Header or (if a response was returned at all) in
4091 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4092 // whether the returned error was because http.StatusNotModified was returned.
4093 func (c *ProjectsCompaniesPatchCall) Do(opts ...googleapi.CallOption) (*Company, error) {
4094 gensupport.SetOptions(c.urlParams_, opts...)
4095 res, err := c.doRequest("json")
4096 if res != nil && res.StatusCode == http.StatusNotModified {
4097 if res.Body != nil {
4098 res.Body.Close()
4099 }
4100 return nil, gensupport.WrapError(&googleapi.Error{
4101 Code: res.StatusCode,
4102 Header: res.Header,
4103 })
4104 }
4105 if err != nil {
4106 return nil, err
4107 }
4108 defer googleapi.CloseBody(res)
4109 if err := googleapi.CheckResponse(res); err != nil {
4110 return nil, gensupport.WrapError(err)
4111 }
4112 ret := &Company{
4113 ServerResponse: googleapi.ServerResponse{
4114 Header: res.Header,
4115 HTTPStatusCode: res.StatusCode,
4116 },
4117 }
4118 target := &ret
4119 b, err := gensupport.DecodeResponseBytes(target, res)
4120 if err != nil {
4121 return nil, err
4122 }
4123 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.companies.patch", "response", internallog.HTTPResponse(res, b))
4124 return ret, nil
4125 }
4126
4127 type ProjectsJobsBatchDeleteCall struct {
4128 s *Service
4129 parent string
4130 batchdeletejobsrequest *BatchDeleteJobsRequest
4131 urlParams_ gensupport.URLParams
4132 ctx_ context.Context
4133 header_ http.Header
4134 }
4135
4136 // BatchDelete: Deletes a list of Jobs by filter.
4137 //
4138 // - parent: The resource name of the project under which the job is created.
4139 // The format is "projects/{project_id}", for example,
4140 // "projects/api-test-project".
4141 func (r *ProjectsJobsService) BatchDelete(parent string, batchdeletejobsrequest *BatchDeleteJobsRequest) *ProjectsJobsBatchDeleteCall {
4142 c := &ProjectsJobsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4143 c.parent = parent
4144 c.batchdeletejobsrequest = batchdeletejobsrequest
4145 return c
4146 }
4147
4148 // Fields allows partial responses to be retrieved. See
4149 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4150 // details.
4151 func (c *ProjectsJobsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobsBatchDeleteCall {
4152 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4153 return c
4154 }
4155
4156 // Context sets the context to be used in this call's Do method.
4157 func (c *ProjectsJobsBatchDeleteCall) Context(ctx context.Context) *ProjectsJobsBatchDeleteCall {
4158 c.ctx_ = ctx
4159 return c
4160 }
4161
4162 // Header returns a http.Header that can be modified by the caller to add
4163 // headers to the request.
4164 func (c *ProjectsJobsBatchDeleteCall) Header() http.Header {
4165 if c.header_ == nil {
4166 c.header_ = make(http.Header)
4167 }
4168 return c.header_
4169 }
4170
4171 func (c *ProjectsJobsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
4172 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4173 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.batchdeletejobsrequest)
4174 if err != nil {
4175 return nil, err
4176 }
4177 c.urlParams_.Set("alt", alt)
4178 c.urlParams_.Set("prettyPrint", "false")
4179 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/jobs:batchDelete")
4180 urls += "?" + c.urlParams_.Encode()
4181 req, err := http.NewRequest("POST", urls, body)
4182 if err != nil {
4183 return nil, err
4184 }
4185 req.Header = reqHeaders
4186 googleapi.Expand(req.URL, map[string]string{
4187 "parent": c.parent,
4188 })
4189 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.batchDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
4190 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4191 }
4192
4193 // Do executes the "jobs.projects.jobs.batchDelete" call.
4194 // Any non-2xx status code is an error. Response headers are in either
4195 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4196 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4197 // whether the returned error was because http.StatusNotModified was returned.
4198 func (c *ProjectsJobsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4199 gensupport.SetOptions(c.urlParams_, opts...)
4200 res, err := c.doRequest("json")
4201 if res != nil && res.StatusCode == http.StatusNotModified {
4202 if res.Body != nil {
4203 res.Body.Close()
4204 }
4205 return nil, gensupport.WrapError(&googleapi.Error{
4206 Code: res.StatusCode,
4207 Header: res.Header,
4208 })
4209 }
4210 if err != nil {
4211 return nil, err
4212 }
4213 defer googleapi.CloseBody(res)
4214 if err := googleapi.CheckResponse(res); err != nil {
4215 return nil, gensupport.WrapError(err)
4216 }
4217 ret := &Empty{
4218 ServerResponse: googleapi.ServerResponse{
4219 Header: res.Header,
4220 HTTPStatusCode: res.StatusCode,
4221 },
4222 }
4223 target := &ret
4224 b, err := gensupport.DecodeResponseBytes(target, res)
4225 if err != nil {
4226 return nil, err
4227 }
4228 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.batchDelete", "response", internallog.HTTPResponse(res, b))
4229 return ret, nil
4230 }
4231
4232 type ProjectsJobsCreateCall struct {
4233 s *Service
4234 parent string
4235 createjobrequest *CreateJobRequest
4236 urlParams_ gensupport.URLParams
4237 ctx_ context.Context
4238 header_ http.Header
4239 }
4240
4241 // Create: Creates a new job. Typically, the job becomes searchable within 10
4242 // seconds, but it may take up to 5 minutes.
4243 //
4244 // - parent: The resource name of the project under which the job is created.
4245 // The format is "projects/{project_id}", for example,
4246 // "projects/api-test-project".
4247 func (r *ProjectsJobsService) Create(parent string, createjobrequest *CreateJobRequest) *ProjectsJobsCreateCall {
4248 c := &ProjectsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4249 c.parent = parent
4250 c.createjobrequest = createjobrequest
4251 return c
4252 }
4253
4254 // Fields allows partial responses to be retrieved. See
4255 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4256 // details.
4257 func (c *ProjectsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsJobsCreateCall {
4258 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4259 return c
4260 }
4261
4262 // Context sets the context to be used in this call's Do method.
4263 func (c *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
4264 c.ctx_ = ctx
4265 return c
4266 }
4267
4268 // Header returns a http.Header that can be modified by the caller to add
4269 // headers to the request.
4270 func (c *ProjectsJobsCreateCall) Header() http.Header {
4271 if c.header_ == nil {
4272 c.header_ = make(http.Header)
4273 }
4274 return c.header_
4275 }
4276
4277 func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
4278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4279 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.createjobrequest)
4280 if err != nil {
4281 return nil, err
4282 }
4283 c.urlParams_.Set("alt", alt)
4284 c.urlParams_.Set("prettyPrint", "false")
4285 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/jobs")
4286 urls += "?" + c.urlParams_.Encode()
4287 req, err := http.NewRequest("POST", urls, body)
4288 if err != nil {
4289 return nil, err
4290 }
4291 req.Header = reqHeaders
4292 googleapi.Expand(req.URL, map[string]string{
4293 "parent": c.parent,
4294 })
4295 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.create", "request", internallog.HTTPRequest(req, body.Bytes()))
4296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4297 }
4298
4299 // Do executes the "jobs.projects.jobs.create" call.
4300 // Any non-2xx status code is an error. Response headers are in either
4301 // *Job.ServerResponse.Header or (if a response was returned at all) in
4302 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4303 // whether the returned error was because http.StatusNotModified was returned.
4304 func (c *ProjectsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) {
4305 gensupport.SetOptions(c.urlParams_, opts...)
4306 res, err := c.doRequest("json")
4307 if res != nil && res.StatusCode == http.StatusNotModified {
4308 if res.Body != nil {
4309 res.Body.Close()
4310 }
4311 return nil, gensupport.WrapError(&googleapi.Error{
4312 Code: res.StatusCode,
4313 Header: res.Header,
4314 })
4315 }
4316 if err != nil {
4317 return nil, err
4318 }
4319 defer googleapi.CloseBody(res)
4320 if err := googleapi.CheckResponse(res); err != nil {
4321 return nil, gensupport.WrapError(err)
4322 }
4323 ret := &Job{
4324 ServerResponse: googleapi.ServerResponse{
4325 Header: res.Header,
4326 HTTPStatusCode: res.StatusCode,
4327 },
4328 }
4329 target := &ret
4330 b, err := gensupport.DecodeResponseBytes(target, res)
4331 if err != nil {
4332 return nil, err
4333 }
4334 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.create", "response", internallog.HTTPResponse(res, b))
4335 return ret, nil
4336 }
4337
4338 type ProjectsJobsDeleteCall struct {
4339 s *Service
4340 name string
4341 urlParams_ gensupport.URLParams
4342 ctx_ context.Context
4343 header_ http.Header
4344 }
4345
4346 // Delete: Deletes the specified job. Typically, the job becomes unsearchable
4347 // within 10 seconds, but it may take up to 5 minutes.
4348 //
4349 // - name: The resource name of the job to be deleted. The format is
4350 // "projects/{project_id}/jobs/{job_id}", for example,
4351 // "projects/api-test-project/jobs/1234".
4352 func (r *ProjectsJobsService) Delete(name string) *ProjectsJobsDeleteCall {
4353 c := &ProjectsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4354 c.name = name
4355 return c
4356 }
4357
4358 // Fields allows partial responses to be retrieved. See
4359 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4360 // details.
4361 func (c *ProjectsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobsDeleteCall {
4362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4363 return c
4364 }
4365
4366 // Context sets the context to be used in this call's Do method.
4367 func (c *ProjectsJobsDeleteCall) Context(ctx context.Context) *ProjectsJobsDeleteCall {
4368 c.ctx_ = ctx
4369 return c
4370 }
4371
4372 // Header returns a http.Header that can be modified by the caller to add
4373 // headers to the request.
4374 func (c *ProjectsJobsDeleteCall) Header() http.Header {
4375 if c.header_ == nil {
4376 c.header_ = make(http.Header)
4377 }
4378 return c.header_
4379 }
4380
4381 func (c *ProjectsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
4382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4383 c.urlParams_.Set("alt", alt)
4384 c.urlParams_.Set("prettyPrint", "false")
4385 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
4386 urls += "?" + c.urlParams_.Encode()
4387 req, err := http.NewRequest("DELETE", urls, nil)
4388 if err != nil {
4389 return nil, err
4390 }
4391 req.Header = reqHeaders
4392 googleapi.Expand(req.URL, map[string]string{
4393 "name": c.name,
4394 })
4395 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.delete", "request", internallog.HTTPRequest(req, nil))
4396 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4397 }
4398
4399 // Do executes the "jobs.projects.jobs.delete" call.
4400 // Any non-2xx status code is an error. Response headers are in either
4401 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4402 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4403 // whether the returned error was because http.StatusNotModified was returned.
4404 func (c *ProjectsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4405 gensupport.SetOptions(c.urlParams_, opts...)
4406 res, err := c.doRequest("json")
4407 if res != nil && res.StatusCode == http.StatusNotModified {
4408 if res.Body != nil {
4409 res.Body.Close()
4410 }
4411 return nil, gensupport.WrapError(&googleapi.Error{
4412 Code: res.StatusCode,
4413 Header: res.Header,
4414 })
4415 }
4416 if err != nil {
4417 return nil, err
4418 }
4419 defer googleapi.CloseBody(res)
4420 if err := googleapi.CheckResponse(res); err != nil {
4421 return nil, gensupport.WrapError(err)
4422 }
4423 ret := &Empty{
4424 ServerResponse: googleapi.ServerResponse{
4425 Header: res.Header,
4426 HTTPStatusCode: res.StatusCode,
4427 },
4428 }
4429 target := &ret
4430 b, err := gensupport.DecodeResponseBytes(target, res)
4431 if err != nil {
4432 return nil, err
4433 }
4434 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.delete", "response", internallog.HTTPResponse(res, b))
4435 return ret, nil
4436 }
4437
4438 type ProjectsJobsGetCall struct {
4439 s *Service
4440 name string
4441 urlParams_ gensupport.URLParams
4442 ifNoneMatch_ string
4443 ctx_ context.Context
4444 header_ http.Header
4445 }
4446
4447 // Get: Retrieves the specified job, whose status is OPEN or recently EXPIRED
4448 // within the last 90 days.
4449 //
4450 // - name: The resource name of the job to retrieve. The format is
4451 // "projects/{project_id}/jobs/{job_id}", for example,
4452 // "projects/api-test-project/jobs/1234".
4453 func (r *ProjectsJobsService) Get(name string) *ProjectsJobsGetCall {
4454 c := &ProjectsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4455 c.name = name
4456 return c
4457 }
4458
4459 // Fields allows partial responses to be retrieved. See
4460 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4461 // details.
4462 func (c *ProjectsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsJobsGetCall {
4463 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4464 return c
4465 }
4466
4467 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4468 // object's ETag matches the given value. This is useful for getting updates
4469 // only after the object has changed since the last request.
4470 func (c *ProjectsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsJobsGetCall {
4471 c.ifNoneMatch_ = entityTag
4472 return c
4473 }
4474
4475 // Context sets the context to be used in this call's Do method.
4476 func (c *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
4477 c.ctx_ = ctx
4478 return c
4479 }
4480
4481 // Header returns a http.Header that can be modified by the caller to add
4482 // headers to the request.
4483 func (c *ProjectsJobsGetCall) Header() http.Header {
4484 if c.header_ == nil {
4485 c.header_ = make(http.Header)
4486 }
4487 return c.header_
4488 }
4489
4490 func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
4491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4492 if c.ifNoneMatch_ != "" {
4493 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4494 }
4495 c.urlParams_.Set("alt", alt)
4496 c.urlParams_.Set("prettyPrint", "false")
4497 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
4498 urls += "?" + c.urlParams_.Encode()
4499 req, err := http.NewRequest("GET", urls, nil)
4500 if err != nil {
4501 return nil, err
4502 }
4503 req.Header = reqHeaders
4504 googleapi.Expand(req.URL, map[string]string{
4505 "name": c.name,
4506 })
4507 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.get", "request", internallog.HTTPRequest(req, nil))
4508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4509 }
4510
4511 // Do executes the "jobs.projects.jobs.get" call.
4512 // Any non-2xx status code is an error. Response headers are in either
4513 // *Job.ServerResponse.Header or (if a response was returned at all) in
4514 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4515 // whether the returned error was because http.StatusNotModified was returned.
4516 func (c *ProjectsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
4517 gensupport.SetOptions(c.urlParams_, opts...)
4518 res, err := c.doRequest("json")
4519 if res != nil && res.StatusCode == http.StatusNotModified {
4520 if res.Body != nil {
4521 res.Body.Close()
4522 }
4523 return nil, gensupport.WrapError(&googleapi.Error{
4524 Code: res.StatusCode,
4525 Header: res.Header,
4526 })
4527 }
4528 if err != nil {
4529 return nil, err
4530 }
4531 defer googleapi.CloseBody(res)
4532 if err := googleapi.CheckResponse(res); err != nil {
4533 return nil, gensupport.WrapError(err)
4534 }
4535 ret := &Job{
4536 ServerResponse: googleapi.ServerResponse{
4537 Header: res.Header,
4538 HTTPStatusCode: res.StatusCode,
4539 },
4540 }
4541 target := &ret
4542 b, err := gensupport.DecodeResponseBytes(target, res)
4543 if err != nil {
4544 return nil, err
4545 }
4546 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.get", "response", internallog.HTTPResponse(res, b))
4547 return ret, nil
4548 }
4549
4550 type ProjectsJobsListCall struct {
4551 s *Service
4552 parent string
4553 urlParams_ gensupport.URLParams
4554 ifNoneMatch_ string
4555 ctx_ context.Context
4556 header_ http.Header
4557 }
4558
4559 // List: Lists jobs by filter.
4560 //
4561 // - parent: The resource name of the project under which the job is created.
4562 // The format is "projects/{project_id}", for example,
4563 // "projects/api-test-project".
4564 func (r *ProjectsJobsService) List(parent string) *ProjectsJobsListCall {
4565 c := &ProjectsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4566 c.parent = parent
4567 return c
4568 }
4569
4570 // Filter sets the optional parameter "filter": Required. The filter string
4571 // specifies the jobs to be enumerated. Supported operator: =, AND The fields
4572 // eligible for filtering are: * `companyName` * `requisitionId` * `status`
4573 // Available values: OPEN, EXPIRED, ALL. Defaults to OPEN if no value is
4574 // specified. At least one of `companyName` and `requisitionId` must present or
4575 // an INVALID_ARGUMENT error is thrown. Sample Query: * companyName =
4576 // "projects/api-test-project/companies/123" * companyName =
4577 // "projects/api-test-project/companies/123" AND requisitionId = "req-1" *
4578 // companyName = "projects/api-test-project/companies/123" AND status =
4579 // "EXPIRED" * requisitionId = "req-1" * requisitionId = "req-1" AND status =
4580 // "EXPIRED"
4581 func (c *ProjectsJobsListCall) Filter(filter string) *ProjectsJobsListCall {
4582 c.urlParams_.Set("filter", filter)
4583 return c
4584 }
4585
4586 // JobView sets the optional parameter "jobView": The desired job attributes
4587 // returned for jobs in the search response. Defaults to JobView.JOB_VIEW_FULL
4588 // if no value is specified.
4589 //
4590 // Possible values:
4591 //
4592 // "JOB_VIEW_UNSPECIFIED" - Default value.
4593 // "JOB_VIEW_ID_ONLY" - A ID only view of job, with following attributes:
4594 //
4595 // Job.name, Job.requisition_id, Job.language_code.
4596 //
4597 // "JOB_VIEW_MINIMAL" - A minimal view of the job, with the following
4598 //
4599 // attributes: Job.name, Job.requisition_id, Job.title, Job.company_name,
4600 // Job.DerivedInfo.locations, Job.language_code.
4601 //
4602 // "JOB_VIEW_SMALL" - A small view of the job, with the following attributes
4603 //
4604 // in the search results: Job.name, Job.requisition_id, Job.title,
4605 // Job.company_name, Job.DerivedInfo.locations, Job.visibility,
4606 // Job.language_code, Job.description.
4607 //
4608 // "JOB_VIEW_FULL" - All available attributes are included in the search
4609 //
4610 // results.
4611 func (c *ProjectsJobsListCall) JobView(jobView string) *ProjectsJobsListCall {
4612 c.urlParams_.Set("jobView", jobView)
4613 return c
4614 }
4615
4616 // PageSize sets the optional parameter "pageSize": The maximum number of jobs
4617 // to be returned per page of results. If job_view is set to
4618 // JobView.JOB_VIEW_ID_ONLY, the maximum allowed page size is 1000. Otherwise,
4619 // the maximum allowed page size is 100. Default is 100 if empty or a number <
4620 // 1 is specified.
4621 func (c *ProjectsJobsListCall) PageSize(pageSize int64) *ProjectsJobsListCall {
4622 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4623 return c
4624 }
4625
4626 // PageToken sets the optional parameter "pageToken": The starting point of a
4627 // query result.
4628 func (c *ProjectsJobsListCall) PageToken(pageToken string) *ProjectsJobsListCall {
4629 c.urlParams_.Set("pageToken", pageToken)
4630 return c
4631 }
4632
4633 // Fields allows partial responses to be retrieved. See
4634 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4635 // details.
4636 func (c *ProjectsJobsListCall) Fields(s ...googleapi.Field) *ProjectsJobsListCall {
4637 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4638 return c
4639 }
4640
4641 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4642 // object's ETag matches the given value. This is useful for getting updates
4643 // only after the object has changed since the last request.
4644 func (c *ProjectsJobsListCall) IfNoneMatch(entityTag string) *ProjectsJobsListCall {
4645 c.ifNoneMatch_ = entityTag
4646 return c
4647 }
4648
4649 // Context sets the context to be used in this call's Do method.
4650 func (c *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
4651 c.ctx_ = ctx
4652 return c
4653 }
4654
4655 // Header returns a http.Header that can be modified by the caller to add
4656 // headers to the request.
4657 func (c *ProjectsJobsListCall) Header() http.Header {
4658 if c.header_ == nil {
4659 c.header_ = make(http.Header)
4660 }
4661 return c.header_
4662 }
4663
4664 func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
4665 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4666 if c.ifNoneMatch_ != "" {
4667 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4668 }
4669 c.urlParams_.Set("alt", alt)
4670 c.urlParams_.Set("prettyPrint", "false")
4671 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/jobs")
4672 urls += "?" + c.urlParams_.Encode()
4673 req, err := http.NewRequest("GET", urls, nil)
4674 if err != nil {
4675 return nil, err
4676 }
4677 req.Header = reqHeaders
4678 googleapi.Expand(req.URL, map[string]string{
4679 "parent": c.parent,
4680 })
4681 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.list", "request", internallog.HTTPRequest(req, nil))
4682 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4683 }
4684
4685 // Do executes the "jobs.projects.jobs.list" call.
4686 // Any non-2xx status code is an error. Response headers are in either
4687 // *ListJobsResponse.ServerResponse.Header or (if a response was returned at
4688 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4689 // check whether the returned error was because http.StatusNotModified was
4690 // returned.
4691 func (c *ProjectsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
4692 gensupport.SetOptions(c.urlParams_, opts...)
4693 res, err := c.doRequest("json")
4694 if res != nil && res.StatusCode == http.StatusNotModified {
4695 if res.Body != nil {
4696 res.Body.Close()
4697 }
4698 return nil, gensupport.WrapError(&googleapi.Error{
4699 Code: res.StatusCode,
4700 Header: res.Header,
4701 })
4702 }
4703 if err != nil {
4704 return nil, err
4705 }
4706 defer googleapi.CloseBody(res)
4707 if err := googleapi.CheckResponse(res); err != nil {
4708 return nil, gensupport.WrapError(err)
4709 }
4710 ret := &ListJobsResponse{
4711 ServerResponse: googleapi.ServerResponse{
4712 Header: res.Header,
4713 HTTPStatusCode: res.StatusCode,
4714 },
4715 }
4716 target := &ret
4717 b, err := gensupport.DecodeResponseBytes(target, res)
4718 if err != nil {
4719 return nil, err
4720 }
4721 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.list", "response", internallog.HTTPResponse(res, b))
4722 return ret, nil
4723 }
4724
4725 // Pages invokes f for each page of results.
4726 // A non-nil error returned from f will halt the iteration.
4727 // The provided context supersedes any context provided to the Context method.
4728 func (c *ProjectsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
4729 c.ctx_ = ctx
4730 defer c.PageToken(c.urlParams_.Get("pageToken"))
4731 for {
4732 x, err := c.Do()
4733 if err != nil {
4734 return err
4735 }
4736 if err := f(x); err != nil {
4737 return err
4738 }
4739 if x.NextPageToken == "" {
4740 return nil
4741 }
4742 c.PageToken(x.NextPageToken)
4743 }
4744 }
4745
4746 type ProjectsJobsPatchCall struct {
4747 s *Service
4748 name string
4749 updatejobrequest *UpdateJobRequest
4750 urlParams_ gensupport.URLParams
4751 ctx_ context.Context
4752 header_ http.Header
4753 }
4754
4755 // Patch: Updates specified job. Typically, updated contents become visible in
4756 // search results within 10 seconds, but it may take up to 5 minutes.
4757 //
4758 // - name: Required during job update. The resource name for the job. This is
4759 // generated by the service when a job is created. The format is
4760 // "projects/{project_id}/jobs/{job_id}", for example,
4761 // "projects/api-test-project/jobs/1234". Use of this field in job queries
4762 // and API calls is preferred over the use of requisition_id since this value
4763 // is unique.
4764 func (r *ProjectsJobsService) Patch(name string, updatejobrequest *UpdateJobRequest) *ProjectsJobsPatchCall {
4765 c := &ProjectsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4766 c.name = name
4767 c.updatejobrequest = updatejobrequest
4768 return c
4769 }
4770
4771 // Fields allows partial responses to be retrieved. See
4772 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4773 // details.
4774 func (c *ProjectsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsJobsPatchCall {
4775 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4776 return c
4777 }
4778
4779 // Context sets the context to be used in this call's Do method.
4780 func (c *ProjectsJobsPatchCall) Context(ctx context.Context) *ProjectsJobsPatchCall {
4781 c.ctx_ = ctx
4782 return c
4783 }
4784
4785 // Header returns a http.Header that can be modified by the caller to add
4786 // headers to the request.
4787 func (c *ProjectsJobsPatchCall) Header() http.Header {
4788 if c.header_ == nil {
4789 c.header_ = make(http.Header)
4790 }
4791 return c.header_
4792 }
4793
4794 func (c *ProjectsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
4795 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4796 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.updatejobrequest)
4797 if err != nil {
4798 return nil, err
4799 }
4800 c.urlParams_.Set("alt", alt)
4801 c.urlParams_.Set("prettyPrint", "false")
4802 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
4803 urls += "?" + c.urlParams_.Encode()
4804 req, err := http.NewRequest("PATCH", urls, body)
4805 if err != nil {
4806 return nil, err
4807 }
4808 req.Header = reqHeaders
4809 googleapi.Expand(req.URL, map[string]string{
4810 "name": c.name,
4811 })
4812 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
4813 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4814 }
4815
4816 // Do executes the "jobs.projects.jobs.patch" call.
4817 // Any non-2xx status code is an error. Response headers are in either
4818 // *Job.ServerResponse.Header or (if a response was returned at all) in
4819 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4820 // whether the returned error was because http.StatusNotModified was returned.
4821 func (c *ProjectsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, error) {
4822 gensupport.SetOptions(c.urlParams_, opts...)
4823 res, err := c.doRequest("json")
4824 if res != nil && res.StatusCode == http.StatusNotModified {
4825 if res.Body != nil {
4826 res.Body.Close()
4827 }
4828 return nil, gensupport.WrapError(&googleapi.Error{
4829 Code: res.StatusCode,
4830 Header: res.Header,
4831 })
4832 }
4833 if err != nil {
4834 return nil, err
4835 }
4836 defer googleapi.CloseBody(res)
4837 if err := googleapi.CheckResponse(res); err != nil {
4838 return nil, gensupport.WrapError(err)
4839 }
4840 ret := &Job{
4841 ServerResponse: googleapi.ServerResponse{
4842 Header: res.Header,
4843 HTTPStatusCode: res.StatusCode,
4844 },
4845 }
4846 target := &ret
4847 b, err := gensupport.DecodeResponseBytes(target, res)
4848 if err != nil {
4849 return nil, err
4850 }
4851 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.patch", "response", internallog.HTTPResponse(res, b))
4852 return ret, nil
4853 }
4854
4855 type ProjectsJobsSearchCall struct {
4856 s *Service
4857 parent string
4858 searchjobsrequest *SearchJobsRequest
4859 urlParams_ gensupport.URLParams
4860 ctx_ context.Context
4861 header_ http.Header
4862 }
4863
4864 // Search: Searches for jobs using the provided SearchJobsRequest. This call
4865 // constrains the visibility of jobs present in the database, and only returns
4866 // jobs that the caller has permission to search against.
4867 //
4868 // - parent: The resource name of the project to search within. The format is
4869 // "projects/{project_id}", for example, "projects/api-test-project".
4870 func (r *ProjectsJobsService) Search(parent string, searchjobsrequest *SearchJobsRequest) *ProjectsJobsSearchCall {
4871 c := &ProjectsJobsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4872 c.parent = parent
4873 c.searchjobsrequest = searchjobsrequest
4874 return c
4875 }
4876
4877 // Fields allows partial responses to be retrieved. See
4878 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4879 // details.
4880 func (c *ProjectsJobsSearchCall) Fields(s ...googleapi.Field) *ProjectsJobsSearchCall {
4881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4882 return c
4883 }
4884
4885 // Context sets the context to be used in this call's Do method.
4886 func (c *ProjectsJobsSearchCall) Context(ctx context.Context) *ProjectsJobsSearchCall {
4887 c.ctx_ = ctx
4888 return c
4889 }
4890
4891 // Header returns a http.Header that can be modified by the caller to add
4892 // headers to the request.
4893 func (c *ProjectsJobsSearchCall) Header() http.Header {
4894 if c.header_ == nil {
4895 c.header_ = make(http.Header)
4896 }
4897 return c.header_
4898 }
4899
4900 func (c *ProjectsJobsSearchCall) doRequest(alt string) (*http.Response, error) {
4901 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4902 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.searchjobsrequest)
4903 if err != nil {
4904 return nil, err
4905 }
4906 c.urlParams_.Set("alt", alt)
4907 c.urlParams_.Set("prettyPrint", "false")
4908 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/jobs:search")
4909 urls += "?" + c.urlParams_.Encode()
4910 req, err := http.NewRequest("POST", urls, body)
4911 if err != nil {
4912 return nil, err
4913 }
4914 req.Header = reqHeaders
4915 googleapi.Expand(req.URL, map[string]string{
4916 "parent": c.parent,
4917 })
4918 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.search", "request", internallog.HTTPRequest(req, body.Bytes()))
4919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4920 }
4921
4922 // Do executes the "jobs.projects.jobs.search" call.
4923 // Any non-2xx status code is an error. Response headers are in either
4924 // *SearchJobsResponse.ServerResponse.Header or (if a response was returned at
4925 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4926 // check whether the returned error was because http.StatusNotModified was
4927 // returned.
4928 func (c *ProjectsJobsSearchCall) Do(opts ...googleapi.CallOption) (*SearchJobsResponse, error) {
4929 gensupport.SetOptions(c.urlParams_, opts...)
4930 res, err := c.doRequest("json")
4931 if res != nil && res.StatusCode == http.StatusNotModified {
4932 if res.Body != nil {
4933 res.Body.Close()
4934 }
4935 return nil, gensupport.WrapError(&googleapi.Error{
4936 Code: res.StatusCode,
4937 Header: res.Header,
4938 })
4939 }
4940 if err != nil {
4941 return nil, err
4942 }
4943 defer googleapi.CloseBody(res)
4944 if err := googleapi.CheckResponse(res); err != nil {
4945 return nil, gensupport.WrapError(err)
4946 }
4947 ret := &SearchJobsResponse{
4948 ServerResponse: googleapi.ServerResponse{
4949 Header: res.Header,
4950 HTTPStatusCode: res.StatusCode,
4951 },
4952 }
4953 target := &ret
4954 b, err := gensupport.DecodeResponseBytes(target, res)
4955 if err != nil {
4956 return nil, err
4957 }
4958 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.search", "response", internallog.HTTPResponse(res, b))
4959 return ret, nil
4960 }
4961
4962 // Pages invokes f for each page of results.
4963 // A non-nil error returned from f will halt the iteration.
4964 // The provided context supersedes any context provided to the Context method.
4965 func (c *ProjectsJobsSearchCall) Pages(ctx context.Context, f func(*SearchJobsResponse) error) error {
4966 c.ctx_ = ctx
4967 defer func(pt string) { c.searchjobsrequest.PageToken = pt }(c.searchjobsrequest.PageToken)
4968 for {
4969 x, err := c.Do()
4970 if err != nil {
4971 return err
4972 }
4973 if err := f(x); err != nil {
4974 return err
4975 }
4976 if x.NextPageToken == "" {
4977 return nil
4978 }
4979 c.searchjobsrequest.PageToken = x.NextPageToken
4980 }
4981 }
4982
4983 type ProjectsJobsSearchForAlertCall struct {
4984 s *Service
4985 parent string
4986 searchjobsrequest *SearchJobsRequest
4987 urlParams_ gensupport.URLParams
4988 ctx_ context.Context
4989 header_ http.Header
4990 }
4991
4992 // SearchForAlert: Searches for jobs using the provided SearchJobsRequest. This
4993 // API call is intended for the use case of targeting passive job seekers (for
4994 // example, job seekers who have signed up to receive email alerts about
4995 // potential job opportunities), and has different algorithmic adjustments that
4996 // are targeted to passive job seekers. This call constrains the visibility of
4997 // jobs present in the database, and only returns jobs the caller has
4998 // permission to search against.
4999 //
5000 // - parent: The resource name of the project to search within. The format is
5001 // "projects/{project_id}", for example, "projects/api-test-project".
5002 func (r *ProjectsJobsService) SearchForAlert(parent string, searchjobsrequest *SearchJobsRequest) *ProjectsJobsSearchForAlertCall {
5003 c := &ProjectsJobsSearchForAlertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5004 c.parent = parent
5005 c.searchjobsrequest = searchjobsrequest
5006 return c
5007 }
5008
5009 // Fields allows partial responses to be retrieved. See
5010 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5011 // details.
5012 func (c *ProjectsJobsSearchForAlertCall) Fields(s ...googleapi.Field) *ProjectsJobsSearchForAlertCall {
5013 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5014 return c
5015 }
5016
5017 // Context sets the context to be used in this call's Do method.
5018 func (c *ProjectsJobsSearchForAlertCall) Context(ctx context.Context) *ProjectsJobsSearchForAlertCall {
5019 c.ctx_ = ctx
5020 return c
5021 }
5022
5023 // Header returns a http.Header that can be modified by the caller to add
5024 // headers to the request.
5025 func (c *ProjectsJobsSearchForAlertCall) Header() http.Header {
5026 if c.header_ == nil {
5027 c.header_ = make(http.Header)
5028 }
5029 return c.header_
5030 }
5031
5032 func (c *ProjectsJobsSearchForAlertCall) doRequest(alt string) (*http.Response, error) {
5033 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5034 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.searchjobsrequest)
5035 if err != nil {
5036 return nil, err
5037 }
5038 c.urlParams_.Set("alt", alt)
5039 c.urlParams_.Set("prettyPrint", "false")
5040 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+parent}/jobs:searchForAlert")
5041 urls += "?" + c.urlParams_.Encode()
5042 req, err := http.NewRequest("POST", urls, body)
5043 if err != nil {
5044 return nil, err
5045 }
5046 req.Header = reqHeaders
5047 googleapi.Expand(req.URL, map[string]string{
5048 "parent": c.parent,
5049 })
5050 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.jobs.searchForAlert", "request", internallog.HTTPRequest(req, body.Bytes()))
5051 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5052 }
5053
5054 // Do executes the "jobs.projects.jobs.searchForAlert" call.
5055 // Any non-2xx status code is an error. Response headers are in either
5056 // *SearchJobsResponse.ServerResponse.Header or (if a response was returned at
5057 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5058 // check whether the returned error was because http.StatusNotModified was
5059 // returned.
5060 func (c *ProjectsJobsSearchForAlertCall) Do(opts ...googleapi.CallOption) (*SearchJobsResponse, error) {
5061 gensupport.SetOptions(c.urlParams_, opts...)
5062 res, err := c.doRequest("json")
5063 if res != nil && res.StatusCode == http.StatusNotModified {
5064 if res.Body != nil {
5065 res.Body.Close()
5066 }
5067 return nil, gensupport.WrapError(&googleapi.Error{
5068 Code: res.StatusCode,
5069 Header: res.Header,
5070 })
5071 }
5072 if err != nil {
5073 return nil, err
5074 }
5075 defer googleapi.CloseBody(res)
5076 if err := googleapi.CheckResponse(res); err != nil {
5077 return nil, gensupport.WrapError(err)
5078 }
5079 ret := &SearchJobsResponse{
5080 ServerResponse: googleapi.ServerResponse{
5081 Header: res.Header,
5082 HTTPStatusCode: res.StatusCode,
5083 },
5084 }
5085 target := &ret
5086 b, err := gensupport.DecodeResponseBytes(target, res)
5087 if err != nil {
5088 return nil, err
5089 }
5090 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.jobs.searchForAlert", "response", internallog.HTTPResponse(res, b))
5091 return ret, nil
5092 }
5093
5094 // Pages invokes f for each page of results.
5095 // A non-nil error returned from f will halt the iteration.
5096 // The provided context supersedes any context provided to the Context method.
5097 func (c *ProjectsJobsSearchForAlertCall) Pages(ctx context.Context, f func(*SearchJobsResponse) error) error {
5098 c.ctx_ = ctx
5099 defer func(pt string) { c.searchjobsrequest.PageToken = pt }(c.searchjobsrequest.PageToken)
5100 for {
5101 x, err := c.Do()
5102 if err != nil {
5103 return err
5104 }
5105 if err := f(x); err != nil {
5106 return err
5107 }
5108 if x.NextPageToken == "" {
5109 return nil
5110 }
5111 c.searchjobsrequest.PageToken = x.NextPageToken
5112 }
5113 }
5114
5115 type ProjectsOperationsGetCall struct {
5116 s *Service
5117 name string
5118 urlParams_ gensupport.URLParams
5119 ifNoneMatch_ string
5120 ctx_ context.Context
5121 header_ http.Header
5122 }
5123
5124 // Get: Gets the latest state of a long-running operation. Clients can use this
5125 // method to poll the operation result at intervals as recommended by the API
5126 // service.
5127 //
5128 // - name: The name of the operation resource.
5129 func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
5130 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5131 c.name = name
5132 return c
5133 }
5134
5135 // Fields allows partial responses to be retrieved. See
5136 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5137 // details.
5138 func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
5139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5140 return c
5141 }
5142
5143 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5144 // object's ETag matches the given value. This is useful for getting updates
5145 // only after the object has changed since the last request.
5146 func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
5147 c.ifNoneMatch_ = entityTag
5148 return c
5149 }
5150
5151 // Context sets the context to be used in this call's Do method.
5152 func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
5153 c.ctx_ = ctx
5154 return c
5155 }
5156
5157 // Header returns a http.Header that can be modified by the caller to add
5158 // headers to the request.
5159 func (c *ProjectsOperationsGetCall) Header() http.Header {
5160 if c.header_ == nil {
5161 c.header_ = make(http.Header)
5162 }
5163 return c.header_
5164 }
5165
5166 func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
5167 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5168 if c.ifNoneMatch_ != "" {
5169 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5170 }
5171 c.urlParams_.Set("alt", alt)
5172 c.urlParams_.Set("prettyPrint", "false")
5173 urls := googleapi.ResolveRelative(c.s.BasePath, "v3p1beta1/{+name}")
5174 urls += "?" + c.urlParams_.Encode()
5175 req, err := http.NewRequest("GET", urls, nil)
5176 if err != nil {
5177 return nil, err
5178 }
5179 req.Header = reqHeaders
5180 googleapi.Expand(req.URL, map[string]string{
5181 "name": c.name,
5182 })
5183 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "jobs.projects.operations.get", "request", internallog.HTTPRequest(req, nil))
5184 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5185 }
5186
5187 // Do executes the "jobs.projects.operations.get" call.
5188 // Any non-2xx status code is an error. Response headers are in either
5189 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5190 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5191 // whether the returned error was because http.StatusNotModified was returned.
5192 func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5193 gensupport.SetOptions(c.urlParams_, opts...)
5194 res, err := c.doRequest("json")
5195 if res != nil && res.StatusCode == http.StatusNotModified {
5196 if res.Body != nil {
5197 res.Body.Close()
5198 }
5199 return nil, gensupport.WrapError(&googleapi.Error{
5200 Code: res.StatusCode,
5201 Header: res.Header,
5202 })
5203 }
5204 if err != nil {
5205 return nil, err
5206 }
5207 defer googleapi.CloseBody(res)
5208 if err := googleapi.CheckResponse(res); err != nil {
5209 return nil, gensupport.WrapError(err)
5210 }
5211 ret := &Operation{
5212 ServerResponse: googleapi.ServerResponse{
5213 Header: res.Header,
5214 HTTPStatusCode: res.StatusCode,
5215 },
5216 }
5217 target := &ret
5218 b, err := gensupport.DecodeResponseBytes(target, res)
5219 if err != nil {
5220 return nil, err
5221 }
5222 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "jobs.projects.operations.get", "response", internallog.HTTPResponse(res, b))
5223 return ret, nil
5224 }