1// Copyright 2019 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// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/jobs/v2" 16// ... 17// ctx := context.Background() 18// jobsService, err := jobs.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// jobsService, err := jobs.NewService(ctx, option.WithScopes(jobs.JobsScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// jobsService, err := jobs.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// jobsService, err := jobs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package jobs // import "google.golang.org/api/jobs/v2" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 gensupport "google.golang.org/api/gensupport" 57 googleapi "google.golang.org/api/googleapi" 58 option "google.golang.org/api/option" 59 htransport "google.golang.org/api/transport/http" 60) 61 62// Always reference these packages, just in case the auto-generated code 63// below doesn't. 64var _ = bytes.NewBuffer 65var _ = strconv.Itoa 66var _ = fmt.Sprintf 67var _ = json.NewDecoder 68var _ = io.Copy 69var _ = url.Parse 70var _ = gensupport.MarshalJSON 71var _ = googleapi.Version 72var _ = errors.New 73var _ = strings.Replace 74var _ = context.Canceled 75 76const apiId = "jobs:v2" 77const apiName = "jobs" 78const apiVersion = "v2" 79const basePath = "https://jobs.googleapis.com/" 80 81// OAuth2 scopes used by this API. 82const ( 83 // View and manage your data across Google Cloud Platform services 84 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 85 86 // Manage job postings 87 JobsScope = "https://www.googleapis.com/auth/jobs" 88) 89 90// NewService creates a new Service. 91func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 92 scopesOption := option.WithScopes( 93 "https://www.googleapis.com/auth/cloud-platform", 94 "https://www.googleapis.com/auth/jobs", 95 ) 96 // NOTE: prepend, so we don't override user-specified scopes. 97 opts = append([]option.ClientOption{scopesOption}, opts...) 98 client, endpoint, err := htransport.NewClient(ctx, opts...) 99 if err != nil { 100 return nil, err 101 } 102 s, err := New(client) 103 if err != nil { 104 return nil, err 105 } 106 if endpoint != "" { 107 s.BasePath = endpoint 108 } 109 return s, nil 110} 111 112// New creates a new Service. It uses the provided http.Client for requests. 113// 114// Deprecated: please use NewService instead. 115// To provide a custom HTTP client, use option.WithHTTPClient. 116// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 117func New(client *http.Client) (*Service, error) { 118 if client == nil { 119 return nil, errors.New("client is nil") 120 } 121 s := &Service{client: client, BasePath: basePath} 122 s.Companies = NewCompaniesService(s) 123 s.Jobs = NewJobsService(s) 124 s.V2 = NewV2Service(s) 125 return s, nil 126} 127 128type Service struct { 129 client *http.Client 130 BasePath string // API endpoint base URL 131 UserAgent string // optional additional User-Agent fragment 132 133 Companies *CompaniesService 134 135 Jobs *JobsService 136 137 V2 *V2Service 138} 139 140func (s *Service) userAgent() string { 141 if s.UserAgent == "" { 142 return googleapi.UserAgent 143 } 144 return googleapi.UserAgent + " " + s.UserAgent 145} 146 147func NewCompaniesService(s *Service) *CompaniesService { 148 rs := &CompaniesService{s: s} 149 rs.Jobs = NewCompaniesJobsService(s) 150 return rs 151} 152 153type CompaniesService struct { 154 s *Service 155 156 Jobs *CompaniesJobsService 157} 158 159func NewCompaniesJobsService(s *Service) *CompaniesJobsService { 160 rs := &CompaniesJobsService{s: s} 161 return rs 162} 163 164type CompaniesJobsService struct { 165 s *Service 166} 167 168func NewJobsService(s *Service) *JobsService { 169 rs := &JobsService{s: s} 170 return rs 171} 172 173type JobsService struct { 174 s *Service 175} 176 177func NewV2Service(s *Service) *V2Service { 178 rs := &V2Service{s: s} 179 return rs 180} 181 182type V2Service struct { 183 s *Service 184} 185 186// BatchDeleteJobsRequest: Input only. 187// 188// Batch delete jobs request. 189type BatchDeleteJobsRequest struct { 190 // Filter: Required. 191 // 192 // The filter string specifies the jobs to be deleted. 193 // 194 // Supported operator: =, AND 195 // 196 // The fields eligible for filtering are: 197 // 198 // * `companyName` (Required) 199 // * `requisitionId` (Required) 200 // 201 // Sample Query: companyName = "companies/123" AND requisitionId = 202 // "req-1" 203 Filter string `json:"filter,omitempty"` 204 205 // ForceSendFields is a list of field names (e.g. "Filter") to 206 // unconditionally include in API requests. By default, fields with 207 // empty values are omitted from API requests. However, any non-pointer, 208 // non-interface field appearing in ForceSendFields will be sent to the 209 // server regardless of whether the field is empty or not. This may be 210 // used to include empty fields in Patch requests. 211 ForceSendFields []string `json:"-"` 212 213 // NullFields is a list of field names (e.g. "Filter") to include in API 214 // requests with the JSON null value. By default, fields with empty 215 // values are omitted from API requests. However, any field with an 216 // empty value appearing in NullFields will be sent to the server as 217 // null. It is an error if a field in this list has a non-empty value. 218 // This may be used to include null fields in Patch requests. 219 NullFields []string `json:"-"` 220} 221 222func (s *BatchDeleteJobsRequest) MarshalJSON() ([]byte, error) { 223 type NoMethod BatchDeleteJobsRequest 224 raw := NoMethod(*s) 225 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 226} 227 228// BucketRange: Represents starting and ending value of a range in 229// double. 230type BucketRange struct { 231 // From: Starting value of the bucket range. 232 From float64 `json:"from,omitempty"` 233 234 // To: Ending value of the bucket range. 235 To float64 `json:"to,omitempty"` 236 237 // ForceSendFields is a list of field names (e.g. "From") to 238 // unconditionally include in API requests. By default, fields with 239 // empty values are omitted from API requests. However, any non-pointer, 240 // non-interface field appearing in ForceSendFields will be sent to the 241 // server regardless of whether the field is empty or not. This may be 242 // used to include empty fields in Patch requests. 243 ForceSendFields []string `json:"-"` 244 245 // NullFields is a list of field names (e.g. "From") to include in API 246 // requests with the JSON null value. By default, fields with empty 247 // values are omitted from API requests. However, any field with an 248 // empty value appearing in NullFields will be sent to the server as 249 // null. It is an error if a field in this list has a non-empty value. 250 // This may be used to include null fields in Patch requests. 251 NullFields []string `json:"-"` 252} 253 254func (s *BucketRange) MarshalJSON() ([]byte, error) { 255 type NoMethod BucketRange 256 raw := NoMethod(*s) 257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 258} 259 260func (s *BucketRange) UnmarshalJSON(data []byte) error { 261 type NoMethod BucketRange 262 var s1 struct { 263 From gensupport.JSONFloat64 `json:"from"` 264 To gensupport.JSONFloat64 `json:"to"` 265 *NoMethod 266 } 267 s1.NoMethod = (*NoMethod)(s) 268 if err := json.Unmarshal(data, &s1); err != nil { 269 return err 270 } 271 s.From = float64(s1.From) 272 s.To = float64(s1.To) 273 return nil 274} 275 276// BucketizedCount: Represents count of jobs within one bucket. 277type BucketizedCount struct { 278 // Count: Number of jobs whose numeric field value fall into `range`. 279 Count int64 `json:"count,omitempty"` 280 281 // Range: Bucket range on which histogram was performed for the numeric 282 // field, 283 // that is, the count represents number of jobs in this range. 284 Range *BucketRange `json:"range,omitempty"` 285 286 // ForceSendFields is a list of field names (e.g. "Count") to 287 // unconditionally include in API requests. By default, fields with 288 // empty values are omitted from API requests. However, any non-pointer, 289 // non-interface field appearing in ForceSendFields will be sent to the 290 // server regardless of whether the field is empty or not. This may be 291 // used to include empty fields in Patch requests. 292 ForceSendFields []string `json:"-"` 293 294 // NullFields is a list of field names (e.g. "Count") to include in API 295 // requests with the JSON null value. By default, fields with empty 296 // values are omitted from API requests. However, any field with an 297 // empty value appearing in NullFields will be sent to the server as 298 // null. It is an error if a field in this list has a non-empty value. 299 // This may be used to include null fields in Patch requests. 300 NullFields []string `json:"-"` 301} 302 303func (s *BucketizedCount) MarshalJSON() ([]byte, error) { 304 type NoMethod BucketizedCount 305 raw := NoMethod(*s) 306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 307} 308 309// CommuteInfo: Output only. 310// 311// Commute details related to this job. 312type CommuteInfo struct { 313 // JobLocation: Location used as the destination in the commute 314 // calculation. 315 JobLocation *JobLocation `json:"jobLocation,omitempty"` 316 317 // TravelDuration: The number of seconds required to travel to the job 318 // location from the query 319 // location. A duration of 0 seconds indicates that the job is 320 // not 321 // reachable within the requested duration, but was returned as part of 322 // an 323 // expanded query. 324 TravelDuration string `json:"travelDuration,omitempty"` 325 326 // ForceSendFields is a list of field names (e.g. "JobLocation") to 327 // unconditionally include in API requests. By default, fields with 328 // empty values are omitted from API requests. However, any non-pointer, 329 // non-interface field appearing in ForceSendFields will be sent to the 330 // server regardless of whether the field is empty or not. This may be 331 // used to include empty fields in Patch requests. 332 ForceSendFields []string `json:"-"` 333 334 // NullFields is a list of field names (e.g. "JobLocation") to include 335 // in API requests with the JSON null value. By default, fields with 336 // empty values are omitted from API requests. However, any field with 337 // an empty value appearing in NullFields will be sent to the server as 338 // null. It is an error if a field in this list has a non-empty value. 339 // This may be used to include null fields in Patch requests. 340 NullFields []string `json:"-"` 341} 342 343func (s *CommuteInfo) MarshalJSON() ([]byte, error) { 344 type NoMethod CommuteInfo 345 raw := NoMethod(*s) 346 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 347} 348 349// CommutePreference: Input only. 350// 351// Parameters needed for commute search. 352type CommutePreference struct { 353 // AllowNonStreetLevelAddress: Optional. 354 // If `true`, jobs without street level addresses may also be 355 // returned. 356 // For city level addresses, the city center is used. For state and 357 // coarser 358 // level addresses, text matching is used. 359 // If this field is set to `false` or is not specified, only jobs that 360 // include 361 // street level addresses will be returned by commute search. 362 AllowNonStreetLevelAddress bool `json:"allowNonStreetLevelAddress,omitempty"` 363 364 // DepartureHourLocal: Optional. 365 // 366 // The departure hour to use to calculate traffic impact. Accepts 367 // an 368 // integer between 0 and 23, representing the hour in the time zone of 369 // the 370 // start_location. Must not be present if road_traffic is specified. 371 DepartureHourLocal int64 `json:"departureHourLocal,omitempty"` 372 373 // Method: Required. 374 // 375 // The method of transportation for which to calculate the commute time. 376 // 377 // Possible values: 378 // "COMMUTE_METHOD_UNSPECIFIED" - Commute method is not specified. 379 // "DRIVING" - Commute time is calculated based on driving time. 380 // "TRANSIT" - Commute time is calculated based on public transit 381 // including bus, metro, 382 // subway, etc. 383 Method string `json:"method,omitempty"` 384 385 // RoadTraffic: Optional. 386 // 387 // Specifies the traffic density to use when calculating commute 388 // time. 389 // Must not be present if departure_hour_local is specified. 390 // 391 // Possible values: 392 // "ROAD_TRAFFIC_UNSPECIFIED" - Road traffic situation is not 393 // specified. 394 // "TRAFFIC_FREE" - Optimal commute time without considering any 395 // traffic impact. 396 // "BUSY_HOUR" - Commute time calculation takes in account the peak 397 // traffic impact. 398 RoadTraffic string `json:"roadTraffic,omitempty"` 399 400 // StartLocation: Required. 401 // 402 // The latitude and longitude of the location from which to calculate 403 // the 404 // commute time. 405 StartLocation *LatLng `json:"startLocation,omitempty"` 406 407 // TravelTime: Required. 408 // 409 // The maximum travel time in seconds. The maximum allowed value is 410 // `3600s` 411 // (one hour). Format is `123s`. 412 TravelTime string `json:"travelTime,omitempty"` 413 414 // ForceSendFields is a list of field names (e.g. 415 // "AllowNonStreetLevelAddress") to unconditionally include in API 416 // requests. By default, fields with empty values are omitted from API 417 // requests. However, any non-pointer, non-interface field appearing in 418 // ForceSendFields will be sent to the server regardless of whether the 419 // field is empty or not. This may be used to include empty fields in 420 // Patch requests. 421 ForceSendFields []string `json:"-"` 422 423 // NullFields is a list of field names (e.g. 424 // "AllowNonStreetLevelAddress") to include in API requests with the 425 // JSON null value. By default, fields with empty values are omitted 426 // from API requests. However, any field with an empty value appearing 427 // in NullFields will be sent to the server as null. It is an error if a 428 // field in this list has a non-empty value. This may be used to include 429 // null fields in Patch requests. 430 NullFields []string `json:"-"` 431} 432 433func (s *CommutePreference) MarshalJSON() ([]byte, error) { 434 type NoMethod CommutePreference 435 raw := NoMethod(*s) 436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 437} 438 439// Company: A Company resource represents a company in the service. A 440// company is the 441// entity that owns job listings, that is, the hiring entity responsible 442// for 443// employing applicants for the job position. 444type Company struct { 445 // CareerPageLink: Optional. 446 // 447 // The URL to employer's career site or careers page on the employer's 448 // web 449 // site. 450 CareerPageLink string `json:"careerPageLink,omitempty"` 451 452 // CompanyInfoSources: Optional. 453 // 454 // Identifiers external to the application that help to further 455 // identify 456 // the employer. 457 CompanyInfoSources []*CompanyInfoSource `json:"companyInfoSources,omitempty"` 458 459 // CompanySize: Optional. 460 // 461 // The employer's company size. 462 // 463 // Possible values: 464 // "COMPANY_SIZE_UNSPECIFIED" - Default value if the size is not 465 // specified. 466 // "MINI" - The company has less than 50 employees. 467 // "SMALL" - The company has between 50 and 99 employees. 468 // "SMEDIUM" - The company has between 100 and 499 employees. 469 // "MEDIUM" - The company has between 500 and 999 employees. 470 // "BIG" - The company has between 1,000 and 4,999 employees. 471 // "BIGGER" - The company has between 5,000 and 9,999 employees. 472 // "GIANT" - The company has 10,000 or more employees. 473 CompanySize string `json:"companySize,omitempty"` 474 475 // DisableLocationOptimization: Deprecated. Do not use this 476 // field. 477 // 478 // Optional. 479 // 480 // This field is no longer used. Any value set to it is ignored. 481 DisableLocationOptimization bool `json:"disableLocationOptimization,omitempty"` 482 483 // DisplayName: Required. 484 // 485 // The name of the employer to be displayed with the job, 486 // for example, "Google, LLC.". 487 DisplayName string `json:"displayName,omitempty"` 488 489 // DistributorBillingCompanyId: Optional. 490 // 491 // The unique company identifier provided by the client to identify 492 // an 493 // employer for billing purposes. Recommended practice is to use 494 // the distributor_company_id. 495 // 496 // Defaults to same value as distributor_company_id when a value 497 // is not provided. 498 DistributorBillingCompanyId string `json:"distributorBillingCompanyId,omitempty"` 499 500 // DistributorCompanyId: Required. 501 // 502 // A client's company identifier, used to uniquely identify the 503 // company. If an employer has a subsidiary or sub-brand, such as 504 // "Alphabet" 505 // and "Google", which the client wishes to use as the company displayed 506 // on 507 // the job. Best practice is to create a distinct company identifier for 508 // each 509 // distinct brand displayed. 510 // 511 // The maximum number of allowed characters is 255. 512 DistributorCompanyId string `json:"distributorCompanyId,omitempty"` 513 514 // EeoText: Optional. 515 // 516 // Equal Employment Opportunity legal disclaimer text to be 517 // associated with all jobs, and typically to be displayed in 518 // all 519 // roles. 520 // 521 // The maximum number of allowed characters is 500. 522 EeoText string `json:"eeoText,omitempty"` 523 524 // HiringAgency: Optional. 525 // 526 // Set to true if it is the hiring agency that post jobs for 527 // other 528 // employers. 529 // 530 // Defaults to false if not provided. 531 HiringAgency bool `json:"hiringAgency,omitempty"` 532 533 // HqLocation: Optional. 534 // 535 // The street address of the company's main headquarters, which may 536 // be 537 // different from the job location. The service attempts 538 // to geolocate the provided address, and populates a more 539 // specific 540 // location wherever possible in structured_company_hq_location. 541 HqLocation string `json:"hqLocation,omitempty"` 542 543 // ImageUrl: Optional. 544 // 545 // A URL that hosts the employer's company logo. If provided, 546 // the logo image should be squared at 80x80 pixels. 547 // 548 // The url must be a Google Photos or Google Album url. 549 // Only images in these Google sub-domains are accepted. 550 ImageUrl string `json:"imageUrl,omitempty"` 551 552 // KeywordSearchableCustomAttributes: Optional. 553 // 554 // A list of keys of filterable Job.custom_attributes, 555 // whose 556 // corresponding `string_values` are used in keyword search. Jobs 557 // with 558 // `string_values` under these specified field keys are returned if 559 // any 560 // of the values matches the search keyword. Custom field values 561 // with 562 // parenthesis, brackets and special symbols might not be properly 563 // searchable, 564 // and those keyword queries need to be surrounded by quotes. 565 KeywordSearchableCustomAttributes []string `json:"keywordSearchableCustomAttributes,omitempty"` 566 567 // KeywordSearchableCustomFields: Deprecated. Use 568 // keyword_searchable_custom_attributes instead. 569 // 570 // Optional. 571 // 572 // A list of filterable custom fields that should be used in 573 // keyword 574 // search. The jobs of this company are returned if any of these 575 // custom 576 // fields matches the search keyword. Custom field values with 577 // parenthesis, 578 // brackets and special symbols might not be properly searchable, and 579 // those 580 // keyword queries need to be surrounded by quotes. 581 KeywordSearchableCustomFields []int64 `json:"keywordSearchableCustomFields,omitempty"` 582 583 // Name: Required during company update. 584 // 585 // The resource name for a company. This is generated by the service 586 // when a 587 // company is created, for 588 // example, 589 // "companies/0000aaaa-1111-bbbb-2222-cccc3333dddd". 590 Name string `json:"name,omitempty"` 591 592 // StructuredCompanyHqLocation: Output only. 593 // 594 // A structured headquarters location of the company, 595 // resolved from hq_location if possible. 596 StructuredCompanyHqLocation *JobLocation `json:"structuredCompanyHqLocation,omitempty"` 597 598 // Suspended: Output only. 599 // 600 // Indicates whether a company is flagged to be suspended from 601 // public 602 // availability by the service when job content appears 603 // suspicious, 604 // abusive, or spammy. 605 Suspended bool `json:"suspended,omitempty"` 606 607 // Title: Deprecated. Use display_name instead. 608 // 609 // Required. 610 // 611 // The name of the employer to be displayed with the job, 612 // for example, "Google, LLC.". 613 Title string `json:"title,omitempty"` 614 615 // Website: Optional. 616 // 617 // The URL representing the company's primary web site or home 618 // page, 619 // such as, "www.google.com". 620 Website string `json:"website,omitempty"` 621 622 // ServerResponse contains the HTTP response code and headers from the 623 // server. 624 googleapi.ServerResponse `json:"-"` 625 626 // ForceSendFields is a list of field names (e.g. "CareerPageLink") to 627 // unconditionally include in API requests. By default, fields with 628 // empty values are omitted from API requests. However, any non-pointer, 629 // non-interface field appearing in ForceSendFields will be sent to the 630 // server regardless of whether the field is empty or not. This may be 631 // used to include empty fields in Patch requests. 632 ForceSendFields []string `json:"-"` 633 634 // NullFields is a list of field names (e.g. "CareerPageLink") to 635 // include in API requests with the JSON null value. By default, fields 636 // with empty values are omitted from API requests. However, any field 637 // with an empty value appearing in NullFields will be sent to the 638 // server as null. It is an error if a field in this list has a 639 // non-empty value. This may be used to include null fields in Patch 640 // requests. 641 NullFields []string `json:"-"` 642} 643 644func (s *Company) MarshalJSON() ([]byte, error) { 645 type NoMethod Company 646 raw := NoMethod(*s) 647 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 648} 649 650// CompanyInfoSource: A resource that represents an external Google 651// identifier for a company, 652// for example, a Google+ business page or a Google Maps business 653// page. 654// For unsupported types, use `unknown_type_id`. 655type CompanyInfoSource struct { 656 // FreebaseMid: Optional. 657 // 658 // The Google's Knowledge Graph value for the employer's company. 659 FreebaseMid string `json:"freebaseMid,omitempty"` 660 661 // GplusId: Optional. 662 // 663 // The numeric identifier for the employer's Google+ business page. 664 GplusId string `json:"gplusId,omitempty"` 665 666 // MapsCid: Optional. 667 // 668 // The numeric identifier for the employer's headquarters on Google 669 // Maps, 670 // namely, the Google Maps CID (cell id). 671 MapsCid string `json:"mapsCid,omitempty"` 672 673 // UnknownTypeId: Optional. 674 // 675 // A Google identifier that does not match any of the other types. 676 UnknownTypeId string `json:"unknownTypeId,omitempty"` 677 678 // ForceSendFields is a list of field names (e.g. "FreebaseMid") to 679 // unconditionally include in API requests. By default, fields with 680 // empty values are omitted from API requests. However, any non-pointer, 681 // non-interface field appearing in ForceSendFields will be sent to the 682 // server regardless of whether the field is empty or not. This may be 683 // used to include empty fields in Patch requests. 684 ForceSendFields []string `json:"-"` 685 686 // NullFields is a list of field names (e.g. "FreebaseMid") to include 687 // in API requests with the JSON null value. By default, fields with 688 // empty values are omitted from API requests. However, any field with 689 // an empty value appearing in NullFields will be sent to the server as 690 // null. It is an error if a field in this list has a non-empty value. 691 // This may be used to include null fields in Patch requests. 692 NullFields []string `json:"-"` 693} 694 695func (s *CompanyInfoSource) MarshalJSON() ([]byte, error) { 696 type NoMethod CompanyInfoSource 697 raw := NoMethod(*s) 698 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 699} 700 701// CompensationEntry: A compensation entry that represents one component 702// of compensation, such 703// as base pay, bonus, or other compensation type. 704// 705// Annualization: One compensation entry can be annualized if 706// - it contains valid amount or range. 707// - and its expected_units_per_year is set or can be derived. 708// Its annualized range is determined as (amount or range) 709// times 710// expected_units_per_year. 711type CompensationEntry struct { 712 // Amount: Optional. 713 // 714 // Compensation amount. 715 Amount *Money `json:"amount,omitempty"` 716 717 // Description: Optional. 718 // 719 // Compensation description. For example, could 720 // indicate equity terms or provide additional context to an 721 // estimated 722 // bonus. 723 Description string `json:"description,omitempty"` 724 725 // ExpectedUnitsPerYear: Optional. 726 // 727 // Expected number of units paid each year. If not specified, 728 // when 729 // Job.employment_types is FULLTIME, a default value is inferred 730 // based on unit. Default values: 731 // - HOURLY: 2080 732 // - DAILY: 260 733 // - WEEKLY: 52 734 // - MONTHLY: 12 735 // - ANNUAL: 1 736 ExpectedUnitsPerYear float64 `json:"expectedUnitsPerYear,omitempty"` 737 738 // Range: Optional. 739 // 740 // Compensation range. 741 Range *CompensationRange `json:"range,omitempty"` 742 743 // Type: Required. 744 // 745 // Compensation type. 746 // 747 // Possible values: 748 // "COMPENSATION_TYPE_UNSPECIFIED" - Default value. Equivalent to 749 // OTHER_COMPENSATION_TYPE. 750 // "BASE" - Base compensation: Refers to the fixed amount of money 751 // paid to an 752 // employee by an employer in return for work performed. Base 753 // compensation 754 // does not include benefits, bonuses or any other potential 755 // compensation 756 // from an employer. 757 // "BONUS" - Bonus. 758 // "SIGNING_BONUS" - Signing bonus. 759 // "EQUITY" - Equity. 760 // "PROFIT_SHARING" - Profit sharing. 761 // "COMMISSIONS" - Commission. 762 // "TIPS" - Tips. 763 // "OTHER_COMPENSATION_TYPE" - Other compensation type. 764 Type string `json:"type,omitempty"` 765 766 // Unit: Optional. 767 // 768 // Frequency of the specified amount. 769 // 770 // Default is CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED. 771 // 772 // Possible values: 773 // "COMPENSATION_UNIT_UNSPECIFIED" - Default value. Equivalent to 774 // OTHER_COMPENSATION_UNIT. 775 // "HOURLY" - Hourly. 776 // "DAILY" - Daily. 777 // "WEEKLY" - Weekly 778 // "MONTHLY" - Monthly. 779 // "YEARLY" - Yearly. 780 // "ONE_TIME" - One time. 781 // "OTHER_COMPENSATION_UNIT" - Other compensation units. 782 Unit string `json:"unit,omitempty"` 783 784 // ForceSendFields is a list of field names (e.g. "Amount") to 785 // unconditionally include in API requests. By default, fields with 786 // empty values are omitted from API requests. However, any non-pointer, 787 // non-interface field appearing in ForceSendFields will be sent to the 788 // server regardless of whether the field is empty or not. This may be 789 // used to include empty fields in Patch requests. 790 ForceSendFields []string `json:"-"` 791 792 // NullFields is a list of field names (e.g. "Amount") to include in API 793 // requests with the JSON null value. By default, fields with empty 794 // values are omitted from API requests. However, any field with an 795 // empty value appearing in NullFields will be sent to the server as 796 // null. It is an error if a field in this list has a non-empty value. 797 // This may be used to include null fields in Patch requests. 798 NullFields []string `json:"-"` 799} 800 801func (s *CompensationEntry) MarshalJSON() ([]byte, error) { 802 type NoMethod CompensationEntry 803 raw := NoMethod(*s) 804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 805} 806 807func (s *CompensationEntry) UnmarshalJSON(data []byte) error { 808 type NoMethod CompensationEntry 809 var s1 struct { 810 ExpectedUnitsPerYear gensupport.JSONFloat64 `json:"expectedUnitsPerYear"` 811 *NoMethod 812 } 813 s1.NoMethod = (*NoMethod)(s) 814 if err := json.Unmarshal(data, &s1); err != nil { 815 return err 816 } 817 s.ExpectedUnitsPerYear = float64(s1.ExpectedUnitsPerYear) 818 return nil 819} 820 821// CompensationFilter: Input only. 822// 823// Filter on job compensation type and amount. 824type CompensationFilter struct { 825 // IncludeJobsWithUnspecifiedCompensationRange: Optional. 826 // 827 // Whether to include jobs whose compensation range is unspecified. 828 IncludeJobsWithUnspecifiedCompensationRange bool `json:"includeJobsWithUnspecifiedCompensationRange,omitempty"` 829 830 // Range: Optional. 831 // 832 // Compensation range. 833 Range *CompensationRange `json:"range,omitempty"` 834 835 // Type: Required. 836 // 837 // Type of filter. 838 // 839 // Possible values: 840 // "FILTER_TYPE_UNSPECIFIED" - Filter type unspecified. Position 841 // holder, INVALID, should never be used. 842 // "UNIT_ONLY" - Filter by `base compensation entry's` unit. A job is 843 // a match if and 844 // only if the job contains a base CompensationEntry and the 845 // base 846 // CompensationEntry's unit matches provided units. 847 // Populate one or more units. 848 // 849 // See CompensationInfo.CompensationEntry for definition of 850 // base compensation entry. 851 // "UNIT_AND_AMOUNT" - Filter by `base compensation entry's` unit and 852 // amount / range. A job 853 // is a match if and only if the job contains a base CompensationEntry, 854 // and 855 // the base entry's unit matches provided compensation_units and 856 // amount 857 // or range overlaps with provided compensation_range. 858 // 859 // See CompensationInfo.CompensationEntry for definition of 860 // base compensation entry. 861 // 862 // Set exactly one units and populate range. 863 // "ANNUALIZED_BASE_AMOUNT" - Filter by annualized base compensation 864 // amount and `base compensation 865 // entry's` unit. Populate range and zero or more units. 866 // "ANNUALIZED_TOTAL_AMOUNT" - Filter by annualized total compensation 867 // amount and `base compensation 868 // entry's` unit . Populate range and zero or more units. 869 Type string `json:"type,omitempty"` 870 871 // Units: Required. 872 // 873 // Specify desired `base compensation 874 // entry's` 875 // CompensationInfo.CompensationUnit. 876 // 877 // Possible values: 878 // "COMPENSATION_UNIT_UNSPECIFIED" - Default value. Equivalent to 879 // OTHER_COMPENSATION_UNIT. 880 // "HOURLY" - Hourly. 881 // "DAILY" - Daily. 882 // "WEEKLY" - Weekly 883 // "MONTHLY" - Monthly. 884 // "YEARLY" - Yearly. 885 // "ONE_TIME" - One time. 886 // "OTHER_COMPENSATION_UNIT" - Other compensation units. 887 Units []string `json:"units,omitempty"` 888 889 // ForceSendFields is a list of field names (e.g. 890 // "IncludeJobsWithUnspecifiedCompensationRange") to unconditionally 891 // include in API requests. By default, fields with empty values are 892 // omitted from API requests. However, any non-pointer, non-interface 893 // field appearing in ForceSendFields will be sent to the server 894 // regardless of whether the field is empty or not. This may be used to 895 // include empty fields in Patch requests. 896 ForceSendFields []string `json:"-"` 897 898 // NullFields is a list of field names (e.g. 899 // "IncludeJobsWithUnspecifiedCompensationRange") to include in API 900 // requests with the JSON null value. By default, fields with empty 901 // values are omitted from API requests. However, any field with an 902 // empty value appearing in NullFields will be sent to the server as 903 // null. It is an error if a field in this list has a non-empty value. 904 // This may be used to include null fields in Patch requests. 905 NullFields []string `json:"-"` 906} 907 908func (s *CompensationFilter) MarshalJSON() ([]byte, error) { 909 type NoMethod CompensationFilter 910 raw := NoMethod(*s) 911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 912} 913 914// CompensationHistogramRequest: Input only. 915// 916// Compensation based histogram request. 917type CompensationHistogramRequest struct { 918 // BucketingOption: Required. 919 // 920 // Numeric histogram options, like buckets, whether include min or max 921 // value. 922 BucketingOption *NumericBucketingOption `json:"bucketingOption,omitempty"` 923 924 // Type: Required. 925 // 926 // Type of the request, representing which field the histogramming 927 // should be 928 // performed over. A single request can only specify one histogram of 929 // each 930 // `CompensationHistogramRequestType`. 931 // 932 // Possible values: 933 // "COMPENSATION_HISTOGRAM_REQUEST_TYPE_UNSPECIFIED" - Default value. 934 // Invalid. 935 // "BASE" - Histogram by job's base compensation. See 936 // CompensationEntry for 937 // definition of base compensation. 938 // "ANNUALIZED_BASE" - Histogram by job's annualized base 939 // compensation. See CompensationEntry 940 // for definition of annualized base compensation. 941 // "ANNUALIZED_TOTAL" - Histogram by job's annualized total 942 // compensation. See CompensationEntry 943 // for definition of annualized total compensation. 944 Type string `json:"type,omitempty"` 945 946 // ForceSendFields is a list of field names (e.g. "BucketingOption") to 947 // unconditionally include in API requests. By default, fields with 948 // empty values are omitted from API requests. However, any non-pointer, 949 // non-interface field appearing in ForceSendFields will be sent to the 950 // server regardless of whether the field is empty or not. This may be 951 // used to include empty fields in Patch requests. 952 ForceSendFields []string `json:"-"` 953 954 // NullFields is a list of field names (e.g. "BucketingOption") to 955 // include in API requests with the JSON null value. By default, fields 956 // with empty values are omitted from API requests. However, any field 957 // with an empty value appearing in NullFields will be sent to the 958 // server as null. It is an error if a field in this list has a 959 // non-empty value. This may be used to include null fields in Patch 960 // requests. 961 NullFields []string `json:"-"` 962} 963 964func (s *CompensationHistogramRequest) MarshalJSON() ([]byte, error) { 965 type NoMethod CompensationHistogramRequest 966 raw := NoMethod(*s) 967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 968} 969 970// CompensationHistogramResult: Output only. 971// 972// Compensation based histogram result. 973type CompensationHistogramResult struct { 974 // Result: Histogram result. 975 Result *NumericBucketingResult `json:"result,omitempty"` 976 977 // Type: Type of the request, corresponding 978 // to 979 // CompensationHistogramRequest.type. 980 // 981 // Possible values: 982 // "COMPENSATION_HISTOGRAM_REQUEST_TYPE_UNSPECIFIED" - Default value. 983 // Invalid. 984 // "BASE" - Histogram by job's base compensation. See 985 // CompensationEntry for 986 // definition of base compensation. 987 // "ANNUALIZED_BASE" - Histogram by job's annualized base 988 // compensation. See CompensationEntry 989 // for definition of annualized base compensation. 990 // "ANNUALIZED_TOTAL" - Histogram by job's annualized total 991 // compensation. See CompensationEntry 992 // for definition of annualized total compensation. 993 Type string `json:"type,omitempty"` 994 995 // ForceSendFields is a list of field names (e.g. "Result") to 996 // unconditionally include in API requests. By default, fields with 997 // empty values are omitted from API requests. However, any non-pointer, 998 // non-interface field appearing in ForceSendFields will be sent to the 999 // server regardless of whether the field is empty or not. This may be 1000 // used to include empty fields in Patch requests. 1001 ForceSendFields []string `json:"-"` 1002 1003 // NullFields is a list of field names (e.g. "Result") to include in API 1004 // requests with the JSON null value. By default, fields with empty 1005 // values are omitted from API requests. However, any field with an 1006 // empty value appearing in NullFields will be sent to the server as 1007 // null. It is an error if a field in this list has a non-empty value. 1008 // This may be used to include null fields in Patch requests. 1009 NullFields []string `json:"-"` 1010} 1011 1012func (s *CompensationHistogramResult) MarshalJSON() ([]byte, error) { 1013 type NoMethod CompensationHistogramResult 1014 raw := NoMethod(*s) 1015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1016} 1017 1018// CompensationInfo: Job compensation details. 1019type CompensationInfo struct { 1020 // Amount: Deprecated. Use entries instead. 1021 // 1022 // Optional. 1023 // 1024 // The amount of compensation or pay for the job. 1025 // As an alternative, compensation_amount_min 1026 // and 1027 // compensation_amount_max may be used to define a range 1028 // of 1029 // compensation. 1030 Amount *Money `json:"amount,omitempty"` 1031 1032 // AnnualizedBaseCompensationRange: Output only. 1033 // 1034 // Annualized base compensation range. Computed as 1035 // base compensation entry's CompensationEntry.compensation 1036 // times 1037 // CompensationEntry.expected_units_per_year. 1038 // 1039 // See CompensationEntry for explanation on compensation annualization. 1040 AnnualizedBaseCompensationRange *CompensationRange `json:"annualizedBaseCompensationRange,omitempty"` 1041 1042 // AnnualizedTotalCompensationRange: Output only. 1043 // 1044 // Annualized total compensation range. Computed as 1045 // all compensation entries' CompensationEntry.compensation 1046 // times 1047 // CompensationEntry.expected_units_per_year. 1048 // 1049 // See CompensationEntry for explanation on compensation annualization. 1050 AnnualizedTotalCompensationRange *CompensationRange `json:"annualizedTotalCompensationRange,omitempty"` 1051 1052 // Entries: Optional. 1053 // 1054 // Job compensation information. 1055 // 1056 // At most one entry can be of 1057 // type 1058 // CompensationInfo.CompensationType.BASE, which is 1059 // referred as ** base compensation entry ** for the job. 1060 Entries []*CompensationEntry `json:"entries,omitempty"` 1061 1062 // Max: Deprecated. Use entries instead. 1063 // 1064 // Optional. 1065 // 1066 // An upper bound on a range for compensation or pay for the job. 1067 // The currency type is specified in compensation_amount. 1068 Max *Money `json:"max,omitempty"` 1069 1070 // Min: Deprecated. Use entries instead. 1071 // 1072 // Optional. 1073 // 1074 // A lower bound on a range for compensation or pay for the job. 1075 // The currency type is specified in compensation_amount. 1076 Min *Money `json:"min,omitempty"` 1077 1078 // Type: Deprecated. Use entries instead. 1079 // 1080 // Optional. 1081 // 1082 // Type of job compensation. 1083 // 1084 // Possible values: 1085 // "JOB_COMPENSATION_TYPE_UNSPECIFIED" - The default value if the type 1086 // is not specified. 1087 // "HOURLY" - The job compensation is quoted by the number of hours 1088 // worked. 1089 // "SALARY" - The job compensation is quoted on an annual basis. 1090 // "PER_PROJECT" - The job compensation is quoted by project 1091 // completion. 1092 // "COMMISSION" - The job compensation is quoted based solely on 1093 // commission. 1094 // "OTHER_TYPE" - The job compensation is not quoted according to the 1095 // listed compensation 1096 // options. 1097 Type string `json:"type,omitempty"` 1098 1099 // ForceSendFields is a list of field names (e.g. "Amount") to 1100 // unconditionally include in API requests. By default, fields with 1101 // empty values are omitted from API requests. However, any non-pointer, 1102 // non-interface field appearing in ForceSendFields will be sent to the 1103 // server regardless of whether the field is empty or not. This may be 1104 // used to include empty fields in Patch requests. 1105 ForceSendFields []string `json:"-"` 1106 1107 // NullFields is a list of field names (e.g. "Amount") to include in API 1108 // requests with the JSON null value. By default, fields with empty 1109 // values are omitted from API requests. However, any field with an 1110 // empty value appearing in NullFields will be sent to the server as 1111 // null. It is an error if a field in this list has a non-empty value. 1112 // This may be used to include null fields in Patch requests. 1113 NullFields []string `json:"-"` 1114} 1115 1116func (s *CompensationInfo) MarshalJSON() ([]byte, error) { 1117 type NoMethod CompensationInfo 1118 raw := NoMethod(*s) 1119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1120} 1121 1122// CompensationRange: Compensation range. 1123type CompensationRange struct { 1124 // Max: Optional. 1125 // 1126 // The maximum amount of compensation. If left empty, the value is 1127 // set 1128 // to a maximal compensation value and the currency code is set to 1129 // match the currency code of 1130 // min_compensation. 1131 Max *Money `json:"max,omitempty"` 1132 1133 // Min: Optional. 1134 // 1135 // The minimum amount of compensation. If left empty, the value is 1136 // set 1137 // to zero and the currency code is set to match the 1138 // currency code of max_compensation. 1139 Min *Money `json:"min,omitempty"` 1140 1141 // ForceSendFields is a list of field names (e.g. "Max") to 1142 // unconditionally include in API requests. By default, fields with 1143 // empty values are omitted from API requests. However, any non-pointer, 1144 // non-interface field appearing in ForceSendFields will be sent to the 1145 // server regardless of whether the field is empty or not. This may be 1146 // used to include empty fields in Patch requests. 1147 ForceSendFields []string `json:"-"` 1148 1149 // NullFields is a list of field names (e.g. "Max") to include in API 1150 // requests with the JSON null value. By default, fields with empty 1151 // values are omitted from API requests. However, any field with an 1152 // empty value appearing in NullFields will be sent to the server as 1153 // null. It is an error if a field in this list has a non-empty value. 1154 // This may be used to include null fields in Patch requests. 1155 NullFields []string `json:"-"` 1156} 1157 1158func (s *CompensationRange) MarshalJSON() ([]byte, error) { 1159 type NoMethod CompensationRange 1160 raw := NoMethod(*s) 1161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1162} 1163 1164// CompleteQueryResponse: Output only. 1165// 1166// Response of auto-complete query. 1167type CompleteQueryResponse struct { 1168 // CompletionResults: Results of the matching job/company candidates. 1169 CompletionResults []*CompletionResult `json:"completionResults,omitempty"` 1170 1171 // Metadata: Additional information for the API invocation, such as the 1172 // request 1173 // tracking id. 1174 Metadata *ResponseMetadata `json:"metadata,omitempty"` 1175 1176 // ServerResponse contains the HTTP response code and headers from the 1177 // server. 1178 googleapi.ServerResponse `json:"-"` 1179 1180 // ForceSendFields is a list of field names (e.g. "CompletionResults") 1181 // to unconditionally include in API requests. By default, fields with 1182 // empty values are omitted from API requests. However, any non-pointer, 1183 // non-interface field appearing in ForceSendFields will be sent to the 1184 // server regardless of whether the field is empty or not. This may be 1185 // used to include empty fields in Patch requests. 1186 ForceSendFields []string `json:"-"` 1187 1188 // NullFields is a list of field names (e.g. "CompletionResults") to 1189 // include in API requests with the JSON null value. By default, fields 1190 // with empty values are omitted from API requests. However, any field 1191 // with an empty value appearing in NullFields will be sent to the 1192 // server as null. It is an error if a field in this list has a 1193 // non-empty value. This may be used to include null fields in Patch 1194 // requests. 1195 NullFields []string `json:"-"` 1196} 1197 1198func (s *CompleteQueryResponse) MarshalJSON() ([]byte, error) { 1199 type NoMethod CompleteQueryResponse 1200 raw := NoMethod(*s) 1201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1202} 1203 1204// CompletionResult: Output only. 1205// 1206// Resource that represents completion results. 1207type CompletionResult struct { 1208 // ImageUrl: The URL for the company logo if `type=COMPANY_NAME`. 1209 ImageUrl string `json:"imageUrl,omitempty"` 1210 1211 // Suggestion: The suggestion for the query. 1212 Suggestion string `json:"suggestion,omitempty"` 1213 1214 // Type: The completion topic. 1215 // 1216 // Possible values: 1217 // "COMPLETION_TYPE_UNSPECIFIED" - Default value. 1218 // "JOB_TITLE" - Only suggest job titles. 1219 // "COMPANY_NAME" - Only suggest company names. 1220 // "COMBINED" - Suggest both job titles and company names. 1221 Type string `json:"type,omitempty"` 1222 1223 // ForceSendFields is a list of field names (e.g. "ImageUrl") to 1224 // unconditionally include in API requests. By default, fields with 1225 // empty values are omitted from API requests. However, any non-pointer, 1226 // non-interface field appearing in ForceSendFields will be sent to the 1227 // server regardless of whether the field is empty or not. This may be 1228 // used to include empty fields in Patch requests. 1229 ForceSendFields []string `json:"-"` 1230 1231 // NullFields is a list of field names (e.g. "ImageUrl") to include in 1232 // API requests with the JSON null value. By default, fields with empty 1233 // values are omitted from API requests. However, any field with an 1234 // empty value appearing in NullFields will be sent to the server as 1235 // null. It is an error if a field in this list has a non-empty value. 1236 // This may be used to include null fields in Patch requests. 1237 NullFields []string `json:"-"` 1238} 1239 1240func (s *CompletionResult) MarshalJSON() ([]byte, error) { 1241 type NoMethod CompletionResult 1242 raw := NoMethod(*s) 1243 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1244} 1245 1246// CreateJobRequest: Input only. 1247// 1248// Create job request. 1249type CreateJobRequest struct { 1250 // DisableStreetAddressResolution: Deprecated. Please use 1251 // processing_options. This flag is ignored if 1252 // processing_options is set. 1253 // 1254 // Optional. 1255 // 1256 // If set to `true`, the service does not attempt to resolve a 1257 // more precise address for the job. 1258 DisableStreetAddressResolution bool `json:"disableStreetAddressResolution,omitempty"` 1259 1260 // Job: Required. 1261 // 1262 // The Job to be created. 1263 Job *Job `json:"job,omitempty"` 1264 1265 // ProcessingOptions: Optional. 1266 // 1267 // Options for job processing. 1268 ProcessingOptions *JobProcessingOptions `json:"processingOptions,omitempty"` 1269 1270 // ForceSendFields is a list of field names (e.g. 1271 // "DisableStreetAddressResolution") to unconditionally include in API 1272 // requests. By default, fields with empty values are omitted from API 1273 // requests. However, any non-pointer, non-interface field appearing in 1274 // ForceSendFields will be sent to the server regardless of whether the 1275 // field is empty or not. This may be used to include empty fields in 1276 // Patch requests. 1277 ForceSendFields []string `json:"-"` 1278 1279 // NullFields is a list of field names (e.g. 1280 // "DisableStreetAddressResolution") to include in API requests with the 1281 // JSON null value. By default, fields with empty values are omitted 1282 // from API requests. However, any field with an empty value appearing 1283 // in NullFields will be sent to the server as null. It is an error if a 1284 // field in this list has a non-empty value. This may be used to include 1285 // null fields in Patch requests. 1286 NullFields []string `json:"-"` 1287} 1288 1289func (s *CreateJobRequest) MarshalJSON() ([]byte, error) { 1290 type NoMethod CreateJobRequest 1291 raw := NoMethod(*s) 1292 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1293} 1294 1295// CustomAttribute: Custom attribute values that are either filterable 1296// or non-filterable. 1297type CustomAttribute struct { 1298 // Filterable: Optional. 1299 // 1300 // If the `filterable` flag is true, custom field values are 1301 // searchable. 1302 // If false, values are not searchable. 1303 // 1304 // Default is false. 1305 Filterable bool `json:"filterable,omitempty"` 1306 1307 // LongValue: Optional but at least one of string_values or long_value 1308 // must 1309 // be specified. 1310 // 1311 // This field is used to perform number range search. 1312 // (`EQ`, `GT`, `GE`, `LE`, `LT`) over filterable `long_value`. 1313 // For 1314 // `long_value`, a value between Long.MIN and Long.MAX is allowed. 1315 LongValue int64 `json:"longValue,omitempty,string"` 1316 1317 // StringValues: Optional but at least one of string_values or 1318 // long_value must 1319 // be specified. 1320 // 1321 // This field is used to perform a string match (`CASE_SENSITIVE_MATCH` 1322 // or 1323 // `CASE_INSENSITIVE_MATCH`) search. 1324 // For filterable `string_values`, a maximum total number of 200 1325 // values 1326 // is allowed, with each `string_value` has a byte size of no more 1327 // than 1328 // 255B. For unfilterable `string_values`, the maximum total byte size 1329 // of 1330 // unfilterable `string_values` is 50KB. 1331 // 1332 // Empty strings are not allowed. 1333 StringValues *StringValues `json:"stringValues,omitempty"` 1334 1335 // ForceSendFields is a list of field names (e.g. "Filterable") to 1336 // unconditionally include in API requests. By default, fields with 1337 // empty values are omitted from API requests. However, any non-pointer, 1338 // non-interface field appearing in ForceSendFields will be sent to the 1339 // server regardless of whether the field is empty or not. This may be 1340 // used to include empty fields in Patch requests. 1341 ForceSendFields []string `json:"-"` 1342 1343 // NullFields is a list of field names (e.g. "Filterable") to include in 1344 // API requests with the JSON null value. By default, fields with empty 1345 // values are omitted from API requests. However, any field with an 1346 // empty value appearing in NullFields will be sent to the server as 1347 // null. It is an error if a field in this list has a non-empty value. 1348 // This may be used to include null fields in Patch requests. 1349 NullFields []string `json:"-"` 1350} 1351 1352func (s *CustomAttribute) MarshalJSON() ([]byte, error) { 1353 type NoMethod CustomAttribute 1354 raw := NoMethod(*s) 1355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1356} 1357 1358// CustomAttributeHistogramRequest: Custom attributes histogram request. 1359// An error will be thrown if neither 1360// string_value_histogram or long_value_histogram_bucketing_option 1361// has 1362// been defined. 1363type CustomAttributeHistogramRequest struct { 1364 // Key: Required. 1365 // 1366 // Specifies the custom field key to perform a histogram on. If 1367 // specified 1368 // without `long_value_histogram_bucketing_option`, histogram on string 1369 // values 1370 // of the given `key` is triggered, otherwise histogram is performed on 1371 // long 1372 // values. 1373 Key string `json:"key,omitempty"` 1374 1375 // LongValueHistogramBucketingOption: Optional. 1376 // 1377 // Specifies buckets used to perform a range histogram on 1378 // Job's 1379 // filterable long custom field values, or min/max value requirements. 1380 LongValueHistogramBucketingOption *NumericBucketingOption `json:"longValueHistogramBucketingOption,omitempty"` 1381 1382 // StringValueHistogram: Optional. If set to true, the response will 1383 // include the histogram value for 1384 // each key as a string. 1385 StringValueHistogram bool `json:"stringValueHistogram,omitempty"` 1386 1387 // ForceSendFields is a list of field names (e.g. "Key") to 1388 // unconditionally include in API requests. By default, fields with 1389 // empty values are omitted from API requests. However, any non-pointer, 1390 // non-interface field appearing in ForceSendFields will be sent to the 1391 // server regardless of whether the field is empty or not. This may be 1392 // used to include empty fields in Patch requests. 1393 ForceSendFields []string `json:"-"` 1394 1395 // NullFields is a list of field names (e.g. "Key") to include in API 1396 // requests with the JSON null value. By default, fields with empty 1397 // values are omitted from API requests. However, any field with an 1398 // empty value appearing in NullFields will be sent to the server as 1399 // null. It is an error if a field in this list has a non-empty value. 1400 // This may be used to include null fields in Patch requests. 1401 NullFields []string `json:"-"` 1402} 1403 1404func (s *CustomAttributeHistogramRequest) MarshalJSON() ([]byte, error) { 1405 type NoMethod CustomAttributeHistogramRequest 1406 raw := NoMethod(*s) 1407 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1408} 1409 1410// CustomAttributeHistogramResult: Output only. 1411// 1412// Custom attribute histogram result. 1413type CustomAttributeHistogramResult struct { 1414 // Key: Stores the key of custom attribute the histogram is performed 1415 // on. 1416 Key string `json:"key,omitempty"` 1417 1418 // LongValueHistogramResult: Stores bucketed histogram counting result 1419 // or min/max values for 1420 // custom attribute long values associated with `key`. 1421 LongValueHistogramResult *NumericBucketingResult `json:"longValueHistogramResult,omitempty"` 1422 1423 // StringValueHistogramResult: Stores a map from the values of string 1424 // custom field associated 1425 // with `key` to the number of jobs with that value in this histogram 1426 // result. 1427 StringValueHistogramResult map[string]int64 `json:"stringValueHistogramResult,omitempty"` 1428 1429 // ForceSendFields is a list of field names (e.g. "Key") to 1430 // unconditionally include in API requests. By default, fields with 1431 // empty values are omitted from API requests. However, any non-pointer, 1432 // non-interface field appearing in ForceSendFields will be sent to the 1433 // server regardless of whether the field is empty or not. This may be 1434 // used to include empty fields in Patch requests. 1435 ForceSendFields []string `json:"-"` 1436 1437 // NullFields is a list of field names (e.g. "Key") to include in API 1438 // requests with the JSON null value. By default, fields with empty 1439 // values are omitted from API requests. However, any field with an 1440 // empty value appearing in NullFields will be sent to the server as 1441 // null. It is an error if a field in this list has a non-empty value. 1442 // This may be used to include null fields in Patch requests. 1443 NullFields []string `json:"-"` 1444} 1445 1446func (s *CustomAttributeHistogramResult) MarshalJSON() ([]byte, error) { 1447 type NoMethod CustomAttributeHistogramResult 1448 raw := NoMethod(*s) 1449 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1450} 1451 1452// CustomField: Resource that represents the custom data not captured by 1453// the standard fields. 1454type CustomField struct { 1455 // Values: Optional. 1456 // 1457 // The values of the custom data. 1458 Values []string `json:"values,omitempty"` 1459 1460 // ForceSendFields is a list of field names (e.g. "Values") to 1461 // unconditionally include in API requests. By default, fields with 1462 // empty values are omitted from API requests. However, any non-pointer, 1463 // non-interface field appearing in ForceSendFields will be sent to the 1464 // server regardless of whether the field is empty or not. This may be 1465 // used to include empty fields in Patch requests. 1466 ForceSendFields []string `json:"-"` 1467 1468 // NullFields is a list of field names (e.g. "Values") to include in API 1469 // requests with the JSON null value. By default, fields with empty 1470 // values are omitted from API requests. However, any field with an 1471 // empty value appearing in NullFields will be sent to the server as 1472 // null. It is an error if a field in this list has a non-empty value. 1473 // This may be used to include null fields in Patch requests. 1474 NullFields []string `json:"-"` 1475} 1476 1477func (s *CustomField) MarshalJSON() ([]byte, error) { 1478 type NoMethod CustomField 1479 raw := NoMethod(*s) 1480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1481} 1482 1483// CustomFieldFilter: Input only. 1484// 1485// Custom field filter of the search. 1486type CustomFieldFilter struct { 1487 // Queries: Required. 1488 // 1489 // The query strings for the filter. 1490 Queries []string `json:"queries,omitempty"` 1491 1492 // Type: Optional. 1493 // 1494 // The type of filter. 1495 // Defaults to FilterType.OR. 1496 // 1497 // Possible values: 1498 // "FILTER_TYPE_UNSPECIFIED" - Default value. 1499 // "OR" - Search for a match with any query. 1500 // "AND" - Search for a match with all queries. 1501 // "NOT" - Negate the set of filter values for the search. 1502 Type string `json:"type,omitempty"` 1503 1504 // ForceSendFields is a list of field names (e.g. "Queries") to 1505 // unconditionally include in API requests. By default, fields with 1506 // empty values are omitted from API requests. However, any non-pointer, 1507 // non-interface field appearing in ForceSendFields will be sent to the 1508 // server regardless of whether the field is empty or not. This may be 1509 // used to include empty fields in Patch requests. 1510 ForceSendFields []string `json:"-"` 1511 1512 // NullFields is a list of field names (e.g. "Queries") to include in 1513 // API requests with the JSON null value. By default, fields with empty 1514 // values are omitted from API requests. However, any field with an 1515 // empty value appearing in NullFields will be sent to the server as 1516 // null. It is an error if a field in this list has a non-empty value. 1517 // This may be used to include null fields in Patch requests. 1518 NullFields []string `json:"-"` 1519} 1520 1521func (s *CustomFieldFilter) MarshalJSON() ([]byte, error) { 1522 type NoMethod CustomFieldFilter 1523 raw := NoMethod(*s) 1524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1525} 1526 1527// Date: Represents a whole or partial calendar date, e.g. a birthday. 1528// The time of day 1529// and time zone are either specified elsewhere or are not significant. 1530// The date 1531// is relative to the Proleptic Gregorian Calendar. This can 1532// represent: 1533// 1534// * A full date, with non-zero year, month and day values 1535// * A month and day value, with a zero year, e.g. an anniversary 1536// * A year on its own, with zero month and day values 1537// * A year and month value, with a zero day, e.g. a credit card 1538// expiration date 1539// 1540// Related types are google.type.TimeOfDay and 1541// `google.protobuf.Timestamp`. 1542type Date struct { 1543 // Day: Day of month. Must be from 1 to 31 and valid for the year and 1544 // month, or 0 1545 // if specifying a year by itself or a year and month where the day is 1546 // not 1547 // significant. 1548 Day int64 `json:"day,omitempty"` 1549 1550 // Month: Month of year. Must be from 1 to 12, or 0 if specifying a year 1551 // without a 1552 // month and day. 1553 Month int64 `json:"month,omitempty"` 1554 1555 // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date 1556 // without 1557 // a year. 1558 Year int64 `json:"year,omitempty"` 1559 1560 // ForceSendFields is a list of field names (e.g. "Day") to 1561 // unconditionally include in API requests. By default, fields with 1562 // empty values are omitted from API requests. However, any non-pointer, 1563 // non-interface field appearing in ForceSendFields will be sent to the 1564 // server regardless of whether the field is empty or not. This may be 1565 // used to include empty fields in Patch requests. 1566 ForceSendFields []string `json:"-"` 1567 1568 // NullFields is a list of field names (e.g. "Day") to include in API 1569 // requests with the JSON null value. By default, fields with empty 1570 // values are omitted from API requests. However, any field with an 1571 // empty value appearing in NullFields will be sent to the server as 1572 // null. It is an error if a field in this list has a non-empty value. 1573 // This may be used to include null fields in Patch requests. 1574 NullFields []string `json:"-"` 1575} 1576 1577func (s *Date) MarshalJSON() ([]byte, error) { 1578 type NoMethod Date 1579 raw := NoMethod(*s) 1580 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1581} 1582 1583// DeleteJobsByFilterRequest: Deprecated. Use BatchDeleteJobsRequest 1584// instead. 1585// 1586// Input only. 1587// 1588// Delete job by filter request. 1589// 1590// The job typically becomes unsearchable within 10 seconds, but it may 1591// take 1592// up to 5 minutes. 1593type DeleteJobsByFilterRequest struct { 1594 // DisableFastProcess: Optional. 1595 // 1596 // If set to true, this call waits for all processing steps to 1597 // complete 1598 // before the job is cleaned up. Otherwise, the call returns while 1599 // some 1600 // steps are still taking place asynchronously, hence faster. 1601 DisableFastProcess bool `json:"disableFastProcess,omitempty"` 1602 1603 // Filter: Required. 1604 // 1605 // Restrictions on the scope of the delete request. 1606 Filter *Filter `json:"filter,omitempty"` 1607 1608 // ForceSendFields is a list of field names (e.g. "DisableFastProcess") 1609 // to unconditionally include in API requests. By default, fields with 1610 // empty values are omitted from API requests. However, any non-pointer, 1611 // non-interface field appearing in ForceSendFields will be sent to the 1612 // server regardless of whether the field is empty or not. This may be 1613 // used to include empty fields in Patch requests. 1614 ForceSendFields []string `json:"-"` 1615 1616 // NullFields is a list of field names (e.g. "DisableFastProcess") to 1617 // include in API requests with the JSON null value. By default, fields 1618 // with empty values are omitted from API requests. However, any field 1619 // with an empty value appearing in NullFields will be sent to the 1620 // server as null. It is an error if a field in this list has a 1621 // non-empty value. This may be used to include null fields in Patch 1622 // requests. 1623 NullFields []string `json:"-"` 1624} 1625 1626func (s *DeleteJobsByFilterRequest) MarshalJSON() ([]byte, error) { 1627 type NoMethod DeleteJobsByFilterRequest 1628 raw := NoMethod(*s) 1629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1630} 1631 1632// DeviceInfo: Input only. 1633// 1634// Device information collected from the job seeker, candidate, or 1635// other entity conducting the job search. Providing this information 1636// improves 1637// the quality of the search results across devices. 1638type DeviceInfo struct { 1639 // DeviceType: Optional. 1640 // 1641 // Type of the device. 1642 // 1643 // Possible values: 1644 // "DEVICE_TYPE_UNSPECIFIED" - The device type isn't specified. 1645 // "WEB" - A desktop web browser, such as, Chrome, Firefox, Safari, or 1646 // Internet 1647 // Explorer) 1648 // "MOBILE_WEB" - A mobile device web browser, such as a phone or 1649 // tablet with a Chrome 1650 // browser. 1651 // "ANDROID" - An Android device native application. 1652 // "IOS" - An iOS device native application. 1653 // "BOT" - A bot, as opposed to a device operated by human beings, 1654 // such as a web 1655 // crawler. 1656 // "OTHER" - Other devices types. 1657 DeviceType string `json:"deviceType,omitempty"` 1658 1659 // Id: Optional. 1660 // 1661 // A device-specific ID. The ID must be a unique identifier that 1662 // distinguishes 1663 // the device from other devices. 1664 Id string `json:"id,omitempty"` 1665 1666 // ForceSendFields is a list of field names (e.g. "DeviceType") to 1667 // unconditionally include in API requests. By default, fields with 1668 // empty values are omitted from API requests. However, any non-pointer, 1669 // non-interface field appearing in ForceSendFields will be sent to the 1670 // server regardless of whether the field is empty or not. This may be 1671 // used to include empty fields in Patch requests. 1672 ForceSendFields []string `json:"-"` 1673 1674 // NullFields is a list of field names (e.g. "DeviceType") to include in 1675 // API requests with the JSON null value. By default, fields with empty 1676 // values are omitted from API requests. However, any field with an 1677 // empty value appearing in NullFields will be sent to the server as 1678 // null. It is an error if a field in this list has a non-empty value. 1679 // This may be used to include null fields in Patch requests. 1680 NullFields []string `json:"-"` 1681} 1682 1683func (s *DeviceInfo) MarshalJSON() ([]byte, error) { 1684 type NoMethod DeviceInfo 1685 raw := NoMethod(*s) 1686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1687} 1688 1689// Empty: A generic empty message that you can re-use to avoid defining 1690// duplicated 1691// empty messages in your APIs. A typical example is to use it as the 1692// request 1693// or the response type of an API method. For instance: 1694// 1695// service Foo { 1696// rpc Bar(google.protobuf.Empty) returns 1697// (google.protobuf.Empty); 1698// } 1699// 1700// The JSON representation for `Empty` is empty JSON object `{}`. 1701type Empty struct { 1702 // ServerResponse contains the HTTP response code and headers from the 1703 // server. 1704 googleapi.ServerResponse `json:"-"` 1705} 1706 1707// ExtendedCompensationFilter: Deprecated. Always use 1708// CompensationFilter. 1709// 1710// Input only. 1711// 1712// Filter on job compensation type and amount. 1713type ExtendedCompensationFilter struct { 1714 // CompensationRange: Optional. 1715 // 1716 // Compensation range. 1717 CompensationRange *ExtendedCompensationInfoCompensationRange `json:"compensationRange,omitempty"` 1718 1719 // CompensationUnits: Required. 1720 // 1721 // Specify desired `base compensation 1722 // entry's` 1723 // ExtendedCompensationInfo.CompensationUnit. 1724 // 1725 // Possible values: 1726 // "EXTENDED_COMPENSATION_UNIT_UNSPECIFIED" - Default value. 1727 // Equivalent to OTHER_COMPENSATION_UNIT. 1728 // "HOURLY" - Hourly. 1729 // "DAILY" - Daily. 1730 // "WEEKLY" - Weekly 1731 // "MONTHLY" - Monthly. 1732 // "YEARLY" - Yearly. 1733 // "ONE_TIME" - One time. 1734 // "OTHER_COMPENSATION_UNIT" - Other compensation units. 1735 CompensationUnits []string `json:"compensationUnits,omitempty"` 1736 1737 // Currency: Optional. 1738 // 1739 // Specify currency in 3-letter 1740 // [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) format. 1741 // If 1742 // unspecified, jobs are returned regardless of currency. 1743 Currency string `json:"currency,omitempty"` 1744 1745 // IncludeJobWithUnspecifiedCompensationRange: Optional. 1746 // 1747 // Whether to include jobs whose compensation range is unspecified. 1748 IncludeJobWithUnspecifiedCompensationRange bool `json:"includeJobWithUnspecifiedCompensationRange,omitempty"` 1749 1750 // Type: Required. 1751 // 1752 // Type of filter. 1753 // 1754 // Possible values: 1755 // "FILTER_TYPE_UNSPECIFIED" - Filter type unspecified. Position 1756 // holder, INVALID, should never be used. 1757 // "UNIT_ONLY" - Filter by `base compensation entry's` unit. A job is 1758 // a match if and 1759 // only if the job contains a base CompensationEntry and the 1760 // base 1761 // CompensationEntry's unit matches provided 1762 // compensation_units. 1763 // Populate one or more compensation_units. 1764 // 1765 // See ExtendedCompensationInfo.CompensationEntry for definition of 1766 // base compensation entry. 1767 // "UNIT_AND_AMOUNT" - Filter by `base compensation entry's` unit and 1768 // amount / range. A job 1769 // is a match if and only if the job contains a base CompensationEntry, 1770 // and 1771 // the base entry's unit matches provided compensation_units and 1772 // amount 1773 // or range overlaps with provided compensation_range. 1774 // 1775 // See ExtendedCompensationInfo.CompensationEntry for definition of 1776 // base compensation entry. 1777 // 1778 // Set exactly one 1779 // compensation_units and populate 1780 // compensation_range. 1781 // "ANNUALIZED_BASE_AMOUNT" - Filter by annualized base compensation 1782 // amount and `base compensation 1783 // entry's` unit. Populate compensation_range and zero or 1784 // more 1785 // compensation_units. 1786 // "ANNUALIZED_TOTAL_AMOUNT" - Filter by annualized total compensation 1787 // amount and `base compensation 1788 // entry's` unit . Populate compensation_range and zero or 1789 // more 1790 // compensation_units. 1791 Type string `json:"type,omitempty"` 1792 1793 // ForceSendFields is a list of field names (e.g. "CompensationRange") 1794 // to unconditionally include in API requests. By default, fields with 1795 // empty values are omitted from API requests. However, any non-pointer, 1796 // non-interface field appearing in ForceSendFields will be sent to the 1797 // server regardless of whether the field is empty or not. This may be 1798 // used to include empty fields in Patch requests. 1799 ForceSendFields []string `json:"-"` 1800 1801 // NullFields is a list of field names (e.g. "CompensationRange") to 1802 // include in API requests with the JSON null value. By default, fields 1803 // with empty values are omitted from API requests. However, any field 1804 // with an empty value appearing in NullFields will be sent to the 1805 // server as null. It is an error if a field in this list has a 1806 // non-empty value. This may be used to include null fields in Patch 1807 // requests. 1808 NullFields []string `json:"-"` 1809} 1810 1811func (s *ExtendedCompensationFilter) MarshalJSON() ([]byte, error) { 1812 type NoMethod ExtendedCompensationFilter 1813 raw := NoMethod(*s) 1814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1815} 1816 1817// ExtendedCompensationInfo: Deprecated. Use 1818// CompensationInfo. 1819// 1820// Describes job compensation. 1821type ExtendedCompensationInfo struct { 1822 // AnnualizedBaseCompensationRange: Output only. 1823 // 1824 // Annualized base compensation range. 1825 AnnualizedBaseCompensationRange *ExtendedCompensationInfoCompensationRange `json:"annualizedBaseCompensationRange,omitempty"` 1826 1827 // AnnualizedBaseCompensationUnspecified: Output only. 1828 // 1829 // Indicates annualized base compensation range cannot be derived, due 1830 // to 1831 // the job's base compensation entry cannot be annualized. 1832 // See CompensationEntry for explanation on annualization and 1833 // base 1834 // compensation entry. 1835 AnnualizedBaseCompensationUnspecified bool `json:"annualizedBaseCompensationUnspecified,omitempty"` 1836 1837 // AnnualizedTotalCompensationRange: Output only. 1838 // 1839 // Annualized total compensation range. 1840 AnnualizedTotalCompensationRange *ExtendedCompensationInfoCompensationRange `json:"annualizedTotalCompensationRange,omitempty"` 1841 1842 // AnnualizedTotalCompensationUnspecified: Output only. 1843 // 1844 // Indicates annualized total compensation range cannot be derived, due 1845 // to 1846 // the job's all CompensationEntry cannot be annualized. 1847 // See CompensationEntry for explanation on annualization and 1848 // base 1849 // compensation entry. 1850 AnnualizedTotalCompensationUnspecified bool `json:"annualizedTotalCompensationUnspecified,omitempty"` 1851 1852 // Currency: Optional. 1853 // 1854 // A 3-letter [ISO 1855 // 4217](https://www.iso.org/iso-4217-currency-codes.html) 1856 // currency code. 1857 Currency string `json:"currency,omitempty"` 1858 1859 // Entries: Optional. 1860 // 1861 // Job compensation information. 1862 // 1863 // At most one entry can be of 1864 // type 1865 // ExtendedCompensationInfo.CompensationType.BASE, which is 1866 // referred as ** base compensation entry ** for the job. 1867 Entries []*ExtendedCompensationInfoCompensationEntry `json:"entries,omitempty"` 1868 1869 // ForceSendFields is a list of field names (e.g. 1870 // "AnnualizedBaseCompensationRange") to unconditionally include in API 1871 // requests. By default, fields with empty values are omitted from API 1872 // requests. However, any non-pointer, non-interface field appearing in 1873 // ForceSendFields will be sent to the server regardless of whether the 1874 // field is empty or not. This may be used to include empty fields in 1875 // Patch requests. 1876 ForceSendFields []string `json:"-"` 1877 1878 // NullFields is a list of field names (e.g. 1879 // "AnnualizedBaseCompensationRange") to include in API requests with 1880 // the JSON null value. By default, fields with empty values are omitted 1881 // from API requests. However, any field with an empty value appearing 1882 // in NullFields will be sent to the server as null. It is an error if a 1883 // field in this list has a non-empty value. This may be used to include 1884 // null fields in Patch requests. 1885 NullFields []string `json:"-"` 1886} 1887 1888func (s *ExtendedCompensationInfo) MarshalJSON() ([]byte, error) { 1889 type NoMethod ExtendedCompensationInfo 1890 raw := NoMethod(*s) 1891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1892} 1893 1894// ExtendedCompensationInfoCompensationEntry: Deprecated. See 1895// CompensationInfo. 1896// 1897// A compensation entry that represents one component of compensation, 1898// such 1899// as base pay, bonus, or other compensation type. 1900// 1901// Annualization: One compensation entry can be annualized if 1902// - it contains valid amount or range. 1903// - and its expected_units_per_year is set or can be derived. 1904// Its annualized range is determined as (amount or range) 1905// times 1906// expected_units_per_year. 1907type ExtendedCompensationInfoCompensationEntry struct { 1908 // Amount: Optional. 1909 // 1910 // Monetary amount. 1911 Amount *ExtendedCompensationInfoDecimal `json:"amount,omitempty"` 1912 1913 // Description: Optional. 1914 // 1915 // Compensation description. 1916 Description string `json:"description,omitempty"` 1917 1918 // ExpectedUnitsPerYear: Optional. 1919 // 1920 // Expected number of units paid each year. If not specified, 1921 // when 1922 // Job.employment_types is FULLTIME, a default value is inferred 1923 // based on unit. Default values: 1924 // - HOURLY: 2080 1925 // - DAILY: 260 1926 // - WEEKLY: 52 1927 // - MONTHLY: 12 1928 // - ANNUAL: 1 1929 ExpectedUnitsPerYear *ExtendedCompensationInfoDecimal `json:"expectedUnitsPerYear,omitempty"` 1930 1931 // Range: Optional. 1932 // 1933 // Compensation range. 1934 Range *ExtendedCompensationInfoCompensationRange `json:"range,omitempty"` 1935 1936 // Type: Required. 1937 // 1938 // Compensation type. 1939 // 1940 // Possible values: 1941 // "EXTENDED_COMPENSATION_TYPE_UNSPECIFIED" - Default value. 1942 // Equivalent to OTHER_COMPENSATION_TYPE. 1943 // "BASE" - Base compensation: Refers to the fixed amount of money 1944 // paid to an 1945 // employee by an employer in return for work performed. Base 1946 // compensation 1947 // does not include benefits, bonuses or any other potential 1948 // compensation 1949 // from an employer. 1950 // "BONUS" - Bonus. 1951 // "SIGNING_BONUS" - Signing bonus. 1952 // "EQUITY" - Equity. 1953 // "PROFIT_SHARING" - Profit sharing. 1954 // "COMMISSIONS" - Commission. 1955 // "TIPS" - Tips. 1956 // "OTHER_COMPENSATION_TYPE" - Other compensation type. 1957 Type string `json:"type,omitempty"` 1958 1959 // Unit: Optional. 1960 // 1961 // Frequency of the specified amount. 1962 // 1963 // Default is CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED. 1964 // 1965 // Possible values: 1966 // "EXTENDED_COMPENSATION_UNIT_UNSPECIFIED" - Default value. 1967 // Equivalent to OTHER_COMPENSATION_UNIT. 1968 // "HOURLY" - Hourly. 1969 // "DAILY" - Daily. 1970 // "WEEKLY" - Weekly 1971 // "MONTHLY" - Monthly. 1972 // "YEARLY" - Yearly. 1973 // "ONE_TIME" - One time. 1974 // "OTHER_COMPENSATION_UNIT" - Other compensation units. 1975 Unit string `json:"unit,omitempty"` 1976 1977 // Unspecified: Optional. 1978 // 1979 // Indicates compensation amount and range are unset. 1980 Unspecified bool `json:"unspecified,omitempty"` 1981 1982 // ForceSendFields is a list of field names (e.g. "Amount") to 1983 // unconditionally include in API requests. By default, fields with 1984 // empty values are omitted from API requests. However, any non-pointer, 1985 // non-interface field appearing in ForceSendFields will be sent to the 1986 // server regardless of whether the field is empty or not. This may be 1987 // used to include empty fields in Patch requests. 1988 ForceSendFields []string `json:"-"` 1989 1990 // NullFields is a list of field names (e.g. "Amount") to include in API 1991 // requests with the JSON null value. By default, fields with empty 1992 // values are omitted from API requests. However, any field with an 1993 // empty value appearing in NullFields will be sent to the server as 1994 // null. It is an error if a field in this list has a non-empty value. 1995 // This may be used to include null fields in Patch requests. 1996 NullFields []string `json:"-"` 1997} 1998 1999func (s *ExtendedCompensationInfoCompensationEntry) MarshalJSON() ([]byte, error) { 2000 type NoMethod ExtendedCompensationInfoCompensationEntry 2001 raw := NoMethod(*s) 2002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2003} 2004 2005// ExtendedCompensationInfoCompensationRange: Deprecated. See 2006// CompensationInfo. 2007// 2008// Compensation range. 2009type ExtendedCompensationInfoCompensationRange struct { 2010 // Max: Required. 2011 // 2012 // Maximum value. 2013 Max *ExtendedCompensationInfoDecimal `json:"max,omitempty"` 2014 2015 // Min: Required. 2016 // 2017 // Minimum value. 2018 Min *ExtendedCompensationInfoDecimal `json:"min,omitempty"` 2019 2020 // ForceSendFields is a list of field names (e.g. "Max") to 2021 // unconditionally include in API requests. By default, fields with 2022 // empty values are omitted from API requests. However, any non-pointer, 2023 // non-interface field appearing in ForceSendFields will be sent to the 2024 // server regardless of whether the field is empty or not. This may be 2025 // used to include empty fields in Patch requests. 2026 ForceSendFields []string `json:"-"` 2027 2028 // NullFields is a list of field names (e.g. "Max") to include in API 2029 // requests with the JSON null value. By default, fields with empty 2030 // values are omitted from API requests. However, any field with an 2031 // empty value appearing in NullFields will be sent to the server as 2032 // null. It is an error if a field in this list has a non-empty value. 2033 // This may be used to include null fields in Patch requests. 2034 NullFields []string `json:"-"` 2035} 2036 2037func (s *ExtendedCompensationInfoCompensationRange) MarshalJSON() ([]byte, error) { 2038 type NoMethod ExtendedCompensationInfoCompensationRange 2039 raw := NoMethod(*s) 2040 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2041} 2042 2043// ExtendedCompensationInfoDecimal: Deprecated. See 2044// CompensationInfo. 2045// 2046// Decimal number. 2047type ExtendedCompensationInfoDecimal struct { 2048 // Micros: Micro (10^-6) units. 2049 // The value must be between -999,999 and +999,999 inclusive. 2050 // If `units` is positive, `micros` must be positive or zero. 2051 // If `units` is zero, `micros` can be positive, zero, or negative. 2052 // If `units` is negative, `micros` must be negative or zero. 2053 // For example -1.75 is represented as `units`=-1 and `micros`=-750,000. 2054 Micros int64 `json:"micros,omitempty"` 2055 2056 // Units: Whole units. 2057 Units int64 `json:"units,omitempty,string"` 2058 2059 // ForceSendFields is a list of field names (e.g. "Micros") to 2060 // unconditionally include in API requests. By default, fields with 2061 // empty values are omitted from API requests. However, any non-pointer, 2062 // non-interface field appearing in ForceSendFields will be sent to the 2063 // server regardless of whether the field is empty or not. This may be 2064 // used to include empty fields in Patch requests. 2065 ForceSendFields []string `json:"-"` 2066 2067 // NullFields is a list of field names (e.g. "Micros") to include in API 2068 // requests with the JSON null value. By default, fields with empty 2069 // values are omitted from API requests. However, any field with an 2070 // empty value appearing in NullFields will be sent to the server as 2071 // null. It is an error if a field in this list has a non-empty value. 2072 // This may be used to include null fields in Patch requests. 2073 NullFields []string `json:"-"` 2074} 2075 2076func (s *ExtendedCompensationInfoDecimal) MarshalJSON() ([]byte, error) { 2077 type NoMethod ExtendedCompensationInfoDecimal 2078 raw := NoMethod(*s) 2079 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2080} 2081 2082// Filter: Deprecated. Use BatchDeleteJobsRequest instead. 2083// 2084// Input only. 2085// 2086// Filter for jobs to be deleted. 2087type Filter struct { 2088 // RequisitionId: Required. 2089 // 2090 // The requisition ID (or posting ID) assigned by the client to identify 2091 // a 2092 // job. This is intended for client identification and tracking 2093 // of 2094 // listings. 2095 // name takes precedence over this field 2096 // The maximum number of allowed characters is 225. 2097 RequisitionId string `json:"requisitionId,omitempty"` 2098 2099 // ForceSendFields is a list of field names (e.g. "RequisitionId") to 2100 // unconditionally include in API requests. By default, fields with 2101 // empty values are omitted from API requests. However, any non-pointer, 2102 // non-interface field appearing in ForceSendFields will be sent to the 2103 // server regardless of whether the field is empty or not. This may be 2104 // used to include empty fields in Patch requests. 2105 ForceSendFields []string `json:"-"` 2106 2107 // NullFields is a list of field names (e.g. "RequisitionId") to include 2108 // in API requests with the JSON null value. By default, fields with 2109 // empty values are omitted from API requests. However, any field with 2110 // an empty value appearing in NullFields will be sent to the server as 2111 // null. It is an error if a field in this list has a non-empty value. 2112 // This may be used to include null fields in Patch requests. 2113 NullFields []string `json:"-"` 2114} 2115 2116func (s *Filter) MarshalJSON() ([]byte, error) { 2117 type NoMethod Filter 2118 raw := NoMethod(*s) 2119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2120} 2121 2122// GetHistogramRequest: Deprecated. Use 2123// SearchJobsRequest.histogram_facets instead to make 2124// a single call with both search and histogram. 2125// 2126// Input only. 2127// 2128// A request for the `GetHistogram` method. 2129type GetHistogramRequest struct { 2130 // AllowBroadening: Optional. 2131 // 2132 // Controls whether to broaden the search to avoid too few results for 2133 // a 2134 // given query in instances where a search has sparse results. Results 2135 // from a 2136 // broadened query is a superset of the results from the original 2137 // query. 2138 // 2139 // Defaults to false. 2140 AllowBroadening bool `json:"allowBroadening,omitempty"` 2141 2142 // Filters: Deprecated. Use query instead. 2143 // 2144 // Optional. 2145 // 2146 // Restrictions on the scope of the histogram. 2147 Filters *JobFilters `json:"filters,omitempty"` 2148 2149 // Query: Optional. 2150 // 2151 // Query used to search against jobs, such as keyword, location filters, 2152 // etc. 2153 Query *JobQuery `json:"query,omitempty"` 2154 2155 // RequestMetadata: Meta information, such as `user_id`, collected from 2156 // the job searcher or 2157 // other entity conducting a job search, is used to improve the 2158 // service's 2159 // search quality. Users determine identifier values, which must 2160 // be 2161 // unique and consist. 2162 RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"` 2163 2164 // SearchTypes: Required. 2165 // 2166 // A list of facets that specify the histogram data to be 2167 // calculated 2168 // against and returned. 2169 // 2170 // Histogram response times can be slow, and counts 2171 // can be approximations. This call may be temporarily or permanently 2172 // removed 2173 // prior to the production release of Cloud Talent Solution. 2174 // 2175 // Possible values: 2176 // "JOB_FIELD_UNSPECIFIED" - The default value if search type is not 2177 // specified. 2178 // "COMPANY_ID" - Filter by the company id field. 2179 // "EMPLOYMENT_TYPE" - Filter by the employment type field, such as 2180 // `FULL_TIME` or `PART_TIME`. 2181 // "COMPANY_SIZE" - Filter by the company size type field, such as 2182 // `BIG`, `SMALL` or `BIGGER`. 2183 // "DATE_PUBLISHED" - Filter by the date published field. Values are 2184 // stringified 2185 // with TimeRange, for example, TimeRange.PAST_MONTH. 2186 // "CUSTOM_FIELD_1" - Filter by custom field 1. 2187 // "CUSTOM_FIELD_2" - Filter by custom field 2. 2188 // "CUSTOM_FIELD_3" - Filter by custom field 3. 2189 // "CUSTOM_FIELD_4" - Filter by custom field 4. 2190 // "CUSTOM_FIELD_5" - Filter by custom field 5. 2191 // "CUSTOM_FIELD_6" - Filter by custom field 6. 2192 // "CUSTOM_FIELD_7" - Filter by custom field 7. 2193 // "CUSTOM_FIELD_8" - Filter by custom field 8. 2194 // "CUSTOM_FIELD_9" - Filter by custom field 9. 2195 // "CUSTOM_FIELD_10" - Filter by custom field 10. 2196 // "CUSTOM_FIELD_11" - Filter by custom field 11. 2197 // "CUSTOM_FIELD_12" - Filter by custom field 12. 2198 // "CUSTOM_FIELD_13" - Filter by custom field 13. 2199 // "CUSTOM_FIELD_14" - Filter by custom field 14. 2200 // "CUSTOM_FIELD_15" - Filter by custom field 15. 2201 // "CUSTOM_FIELD_16" - Filter by custom field 16. 2202 // "CUSTOM_FIELD_17" - Filter by custom field 17. 2203 // "CUSTOM_FIELD_18" - Filter by custom field 18. 2204 // "CUSTOM_FIELD_19" - Filter by custom field 19. 2205 // "CUSTOM_FIELD_20" - Filter by custom field 20. 2206 // "EDUCATION_LEVEL" - Filter by the required education level of the 2207 // job. 2208 // "EXPERIENCE_LEVEL" - Filter by the required experience level of the 2209 // job. 2210 // "ADMIN1" - Filter by Admin1, which is a global placeholder 2211 // for 2212 // referring to state, province, or the particular term a country uses 2213 // to 2214 // define the geographic structure below the country level. 2215 // Examples include states codes such as "CA", "IL", "NY", 2216 // and 2217 // provinces, such as "BC". 2218 // "COUNTRY" - Filter by the country code of job, such as US, JP, FR. 2219 // "CITY" - Filter by the "city name", "Admin1 code", for 2220 // example, 2221 // "Mountain View, CA" or "New York, NY". 2222 // "LOCALE" - Filter by the locale field of a job, such as "en-US", 2223 // "fr-FR". 2224 // 2225 // This is the BCP-47 language code, such as "en-US" or "sr-Latn". 2226 // For more information, see 2227 // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). 2228 // "LANGUAGE" - Filter by the language code portion of the locale 2229 // field, such as "en" or 2230 // "fr". 2231 // "CATEGORY" - Filter by the Category. 2232 // "CITY_COORDINATE" - Filter by the city center GPS coordinate 2233 // (latitude and longitude), for 2234 // example, 37.4038522,-122.0987765. Since the coordinates of a city 2235 // center 2236 // can change, clients may need to refresh them periodically. 2237 // "ADMIN1_COUNTRY" - A combination of state or province code with a 2238 // country code. This field 2239 // differs from `JOB_ADMIN1`, which can be used in multiple countries. 2240 // "COMPANY_TITLE" - Deprecated. Use COMPANY_DISPLAY_NAME 2241 // instead. 2242 // 2243 // Company display name. 2244 // "COMPANY_DISPLAY_NAME" - Company display name. 2245 // "BASE_COMPENSATION_UNIT" - Base compensation unit. 2246 SearchTypes []string `json:"searchTypes,omitempty"` 2247 2248 // ForceSendFields is a list of field names (e.g. "AllowBroadening") to 2249 // unconditionally include in API requests. By default, fields with 2250 // empty values are omitted from API requests. However, any non-pointer, 2251 // non-interface field appearing in ForceSendFields will be sent to the 2252 // server regardless of whether the field is empty or not. This may be 2253 // used to include empty fields in Patch requests. 2254 ForceSendFields []string `json:"-"` 2255 2256 // NullFields is a list of field names (e.g. "AllowBroadening") to 2257 // include in API requests with the JSON null value. By default, fields 2258 // with empty values are omitted from API requests. However, any field 2259 // with an empty value appearing in NullFields will be sent to the 2260 // server as null. It is an error if a field in this list has a 2261 // non-empty value. This may be used to include null fields in Patch 2262 // requests. 2263 NullFields []string `json:"-"` 2264} 2265 2266func (s *GetHistogramRequest) MarshalJSON() ([]byte, error) { 2267 type NoMethod GetHistogramRequest 2268 raw := NoMethod(*s) 2269 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2270} 2271 2272// GetHistogramResponse: Deprecated. Use 2273// SearchJobsRequest.histogram_facets instead to make 2274// a single call with both search and histogram. 2275// 2276// Output only. 2277// 2278// The response of the GetHistogram method. 2279type GetHistogramResponse struct { 2280 // Metadata: Additional information for the API invocation, such as the 2281 // request 2282 // tracking id. 2283 Metadata *ResponseMetadata `json:"metadata,omitempty"` 2284 2285 // Results: The Histogram results. 2286 Results []*HistogramResult `json:"results,omitempty"` 2287 2288 // ServerResponse contains the HTTP response code and headers from the 2289 // server. 2290 googleapi.ServerResponse `json:"-"` 2291 2292 // ForceSendFields is a list of field names (e.g. "Metadata") to 2293 // unconditionally include in API requests. By default, fields with 2294 // empty values are omitted from API requests. However, any non-pointer, 2295 // non-interface field appearing in ForceSendFields will be sent to the 2296 // server regardless of whether the field is empty or not. This may be 2297 // used to include empty fields in Patch requests. 2298 ForceSendFields []string `json:"-"` 2299 2300 // NullFields is a list of field names (e.g. "Metadata") to include in 2301 // API requests with the JSON null value. By default, fields with empty 2302 // values are omitted from API requests. However, any field with an 2303 // empty value appearing in NullFields will be sent to the server as 2304 // null. It is an error if a field in this list has a non-empty value. 2305 // This may be used to include null fields in Patch requests. 2306 NullFields []string `json:"-"` 2307} 2308 2309func (s *GetHistogramResponse) MarshalJSON() ([]byte, error) { 2310 type NoMethod GetHistogramResponse 2311 raw := NoMethod(*s) 2312 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2313} 2314 2315// HistogramFacets: Input only. 2316// 2317// Histogram facets to be specified in SearchJobsRequest. 2318type HistogramFacets struct { 2319 // CompensationHistogramFacets: Optional. 2320 // 2321 // Specifies compensation field-based histogram requests. 2322 // Duplicate values of CompensationHistogramRequest.type are not 2323 // allowed. 2324 CompensationHistogramFacets []*CompensationHistogramRequest `json:"compensationHistogramFacets,omitempty"` 2325 2326 // CustomAttributeHistogramFacets: Optional. 2327 // 2328 // Specifies the custom attributes histogram requests. 2329 // Duplicate values of CustomAttributeHistogramRequest.key are 2330 // not 2331 // allowed. 2332 CustomAttributeHistogramFacets []*CustomAttributeHistogramRequest `json:"customAttributeHistogramFacets,omitempty"` 2333 2334 // SimpleHistogramFacets: Optional. Specifies the simple type of 2335 // histogram facets, for example, 2336 // `COMPANY_SIZE`, `EMPLOYMENT_TYPE` etc. This field is equivalent 2337 // to 2338 // GetHistogramRequest. 2339 // 2340 // Possible values: 2341 // "JOB_FIELD_UNSPECIFIED" - The default value if search type is not 2342 // specified. 2343 // "COMPANY_ID" - Filter by the company id field. 2344 // "EMPLOYMENT_TYPE" - Filter by the employment type field, such as 2345 // `FULL_TIME` or `PART_TIME`. 2346 // "COMPANY_SIZE" - Filter by the company size type field, such as 2347 // `BIG`, `SMALL` or `BIGGER`. 2348 // "DATE_PUBLISHED" - Filter by the date published field. Values are 2349 // stringified 2350 // with TimeRange, for example, TimeRange.PAST_MONTH. 2351 // "CUSTOM_FIELD_1" - Filter by custom field 1. 2352 // "CUSTOM_FIELD_2" - Filter by custom field 2. 2353 // "CUSTOM_FIELD_3" - Filter by custom field 3. 2354 // "CUSTOM_FIELD_4" - Filter by custom field 4. 2355 // "CUSTOM_FIELD_5" - Filter by custom field 5. 2356 // "CUSTOM_FIELD_6" - Filter by custom field 6. 2357 // "CUSTOM_FIELD_7" - Filter by custom field 7. 2358 // "CUSTOM_FIELD_8" - Filter by custom field 8. 2359 // "CUSTOM_FIELD_9" - Filter by custom field 9. 2360 // "CUSTOM_FIELD_10" - Filter by custom field 10. 2361 // "CUSTOM_FIELD_11" - Filter by custom field 11. 2362 // "CUSTOM_FIELD_12" - Filter by custom field 12. 2363 // "CUSTOM_FIELD_13" - Filter by custom field 13. 2364 // "CUSTOM_FIELD_14" - Filter by custom field 14. 2365 // "CUSTOM_FIELD_15" - Filter by custom field 15. 2366 // "CUSTOM_FIELD_16" - Filter by custom field 16. 2367 // "CUSTOM_FIELD_17" - Filter by custom field 17. 2368 // "CUSTOM_FIELD_18" - Filter by custom field 18. 2369 // "CUSTOM_FIELD_19" - Filter by custom field 19. 2370 // "CUSTOM_FIELD_20" - Filter by custom field 20. 2371 // "EDUCATION_LEVEL" - Filter by the required education level of the 2372 // job. 2373 // "EXPERIENCE_LEVEL" - Filter by the required experience level of the 2374 // job. 2375 // "ADMIN1" - Filter by Admin1, which is a global placeholder 2376 // for 2377 // referring to state, province, or the particular term a country uses 2378 // to 2379 // define the geographic structure below the country level. 2380 // Examples include states codes such as "CA", "IL", "NY", 2381 // and 2382 // provinces, such as "BC". 2383 // "COUNTRY" - Filter by the country code of job, such as US, JP, FR. 2384 // "CITY" - Filter by the "city name", "Admin1 code", for 2385 // example, 2386 // "Mountain View, CA" or "New York, NY". 2387 // "LOCALE" - Filter by the locale field of a job, such as "en-US", 2388 // "fr-FR". 2389 // 2390 // This is the BCP-47 language code, such as "en-US" or "sr-Latn". 2391 // For more information, see 2392 // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). 2393 // "LANGUAGE" - Filter by the language code portion of the locale 2394 // field, such as "en" or 2395 // "fr". 2396 // "CATEGORY" - Filter by the Category. 2397 // "CITY_COORDINATE" - Filter by the city center GPS coordinate 2398 // (latitude and longitude), for 2399 // example, 37.4038522,-122.0987765. Since the coordinates of a city 2400 // center 2401 // can change, clients may need to refresh them periodically. 2402 // "ADMIN1_COUNTRY" - A combination of state or province code with a 2403 // country code. This field 2404 // differs from `JOB_ADMIN1`, which can be used in multiple countries. 2405 // "COMPANY_TITLE" - Deprecated. Use COMPANY_DISPLAY_NAME 2406 // instead. 2407 // 2408 // Company display name. 2409 // "COMPANY_DISPLAY_NAME" - Company display name. 2410 // "BASE_COMPENSATION_UNIT" - Base compensation unit. 2411 SimpleHistogramFacets []string `json:"simpleHistogramFacets,omitempty"` 2412 2413 // ForceSendFields is a list of field names (e.g. 2414 // "CompensationHistogramFacets") to unconditionally include in API 2415 // requests. By default, fields with empty values are omitted from API 2416 // requests. However, any non-pointer, non-interface field appearing in 2417 // ForceSendFields will be sent to the server regardless of whether the 2418 // field is empty or not. This may be used to include empty fields in 2419 // Patch requests. 2420 ForceSendFields []string `json:"-"` 2421 2422 // NullFields is a list of field names (e.g. 2423 // "CompensationHistogramFacets") to include in API requests with the 2424 // JSON null value. By default, fields with empty values are omitted 2425 // from API requests. However, any field with an empty value appearing 2426 // in NullFields will be sent to the server as null. It is an error if a 2427 // field in this list has a non-empty value. This may be used to include 2428 // null fields in Patch requests. 2429 NullFields []string `json:"-"` 2430} 2431 2432func (s *HistogramFacets) MarshalJSON() ([]byte, error) { 2433 type NoMethod HistogramFacets 2434 raw := NoMethod(*s) 2435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2436} 2437 2438// HistogramResult: Output only. 2439// 2440// Result of a histogram call. The response contains the histogram map 2441// for the 2442// search type specified by HistogramResult.field. 2443// The response is a map of each filter value to the corresponding count 2444// of 2445// jobs for that filter. 2446type HistogramResult struct { 2447 // SearchType: The Histogram search filters. 2448 // 2449 // Possible values: 2450 // "JOB_FIELD_UNSPECIFIED" - The default value if search type is not 2451 // specified. 2452 // "COMPANY_ID" - Filter by the company id field. 2453 // "EMPLOYMENT_TYPE" - Filter by the employment type field, such as 2454 // `FULL_TIME` or `PART_TIME`. 2455 // "COMPANY_SIZE" - Filter by the company size type field, such as 2456 // `BIG`, `SMALL` or `BIGGER`. 2457 // "DATE_PUBLISHED" - Filter by the date published field. Values are 2458 // stringified 2459 // with TimeRange, for example, TimeRange.PAST_MONTH. 2460 // "CUSTOM_FIELD_1" - Filter by custom field 1. 2461 // "CUSTOM_FIELD_2" - Filter by custom field 2. 2462 // "CUSTOM_FIELD_3" - Filter by custom field 3. 2463 // "CUSTOM_FIELD_4" - Filter by custom field 4. 2464 // "CUSTOM_FIELD_5" - Filter by custom field 5. 2465 // "CUSTOM_FIELD_6" - Filter by custom field 6. 2466 // "CUSTOM_FIELD_7" - Filter by custom field 7. 2467 // "CUSTOM_FIELD_8" - Filter by custom field 8. 2468 // "CUSTOM_FIELD_9" - Filter by custom field 9. 2469 // "CUSTOM_FIELD_10" - Filter by custom field 10. 2470 // "CUSTOM_FIELD_11" - Filter by custom field 11. 2471 // "CUSTOM_FIELD_12" - Filter by custom field 12. 2472 // "CUSTOM_FIELD_13" - Filter by custom field 13. 2473 // "CUSTOM_FIELD_14" - Filter by custom field 14. 2474 // "CUSTOM_FIELD_15" - Filter by custom field 15. 2475 // "CUSTOM_FIELD_16" - Filter by custom field 16. 2476 // "CUSTOM_FIELD_17" - Filter by custom field 17. 2477 // "CUSTOM_FIELD_18" - Filter by custom field 18. 2478 // "CUSTOM_FIELD_19" - Filter by custom field 19. 2479 // "CUSTOM_FIELD_20" - Filter by custom field 20. 2480 // "EDUCATION_LEVEL" - Filter by the required education level of the 2481 // job. 2482 // "EXPERIENCE_LEVEL" - Filter by the required experience level of the 2483 // job. 2484 // "ADMIN1" - Filter by Admin1, which is a global placeholder 2485 // for 2486 // referring to state, province, or the particular term a country uses 2487 // to 2488 // define the geographic structure below the country level. 2489 // Examples include states codes such as "CA", "IL", "NY", 2490 // and 2491 // provinces, such as "BC". 2492 // "COUNTRY" - Filter by the country code of job, such as US, JP, FR. 2493 // "CITY" - Filter by the "city name", "Admin1 code", for 2494 // example, 2495 // "Mountain View, CA" or "New York, NY". 2496 // "LOCALE" - Filter by the locale field of a job, such as "en-US", 2497 // "fr-FR". 2498 // 2499 // This is the BCP-47 language code, such as "en-US" or "sr-Latn". 2500 // For more information, see 2501 // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). 2502 // "LANGUAGE" - Filter by the language code portion of the locale 2503 // field, such as "en" or 2504 // "fr". 2505 // "CATEGORY" - Filter by the Category. 2506 // "CITY_COORDINATE" - Filter by the city center GPS coordinate 2507 // (latitude and longitude), for 2508 // example, 37.4038522,-122.0987765. Since the coordinates of a city 2509 // center 2510 // can change, clients may need to refresh them periodically. 2511 // "ADMIN1_COUNTRY" - A combination of state or province code with a 2512 // country code. This field 2513 // differs from `JOB_ADMIN1`, which can be used in multiple countries. 2514 // "COMPANY_TITLE" - Deprecated. Use COMPANY_DISPLAY_NAME 2515 // instead. 2516 // 2517 // Company display name. 2518 // "COMPANY_DISPLAY_NAME" - Company display name. 2519 // "BASE_COMPENSATION_UNIT" - Base compensation unit. 2520 SearchType string `json:"searchType,omitempty"` 2521 2522 // Values: A map from the values of field to the number of jobs with 2523 // that value 2524 // in this search result. 2525 // 2526 // Key: search type (filter names, such as the companyName). 2527 // 2528 // Values: the count of jobs that match the filter for this search. 2529 Values map[string]int64 `json:"values,omitempty"` 2530 2531 // ForceSendFields is a list of field names (e.g. "SearchType") to 2532 // unconditionally include in API requests. By default, fields with 2533 // empty values are omitted from API requests. However, any non-pointer, 2534 // non-interface field appearing in ForceSendFields will be sent to the 2535 // server regardless of whether the field is empty or not. This may be 2536 // used to include empty fields in Patch requests. 2537 ForceSendFields []string `json:"-"` 2538 2539 // NullFields is a list of field names (e.g. "SearchType") to include in 2540 // API requests with the JSON null value. By default, fields with empty 2541 // values are omitted from API requests. However, any field with an 2542 // empty value appearing in NullFields will be sent to the server as 2543 // null. It is an error if a field in this list has a non-empty value. 2544 // This may be used to include null fields in Patch requests. 2545 NullFields []string `json:"-"` 2546} 2547 2548func (s *HistogramResult) MarshalJSON() ([]byte, error) { 2549 type NoMethod HistogramResult 2550 raw := NoMethod(*s) 2551 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2552} 2553 2554// HistogramResults: Output only. 2555// 2556// Histogram results that matches HistogramFacets specified 2557// in 2558// SearchJobsRequest. 2559type HistogramResults struct { 2560 // CompensationHistogramResults: Specifies compensation field-based 2561 // histogram results that 2562 // matches 2563 // HistogramFacets.compensation_histogram_requests. 2564 CompensationHistogramResults []*CompensationHistogramResult `json:"compensationHistogramResults,omitempty"` 2565 2566 // CustomAttributeHistogramResults: Specifies histogram results for 2567 // custom attributes that 2568 // matches HistogramFacets.custom_attribute_histogram_facets. 2569 CustomAttributeHistogramResults []*CustomAttributeHistogramResult `json:"customAttributeHistogramResults,omitempty"` 2570 2571 // SimpleHistogramResults: Specifies histogram results that 2572 // matches 2573 // HistogramFacets.simple_histogram_facets. 2574 SimpleHistogramResults []*HistogramResult `json:"simpleHistogramResults,omitempty"` 2575 2576 // ForceSendFields is a list of field names (e.g. 2577 // "CompensationHistogramResults") to unconditionally include in API 2578 // requests. By default, fields with empty values are omitted from API 2579 // requests. However, any non-pointer, non-interface field appearing in 2580 // ForceSendFields will be sent to the server regardless of whether the 2581 // field is empty or not. This may be used to include empty fields in 2582 // Patch requests. 2583 ForceSendFields []string `json:"-"` 2584 2585 // NullFields is a list of field names (e.g. 2586 // "CompensationHistogramResults") to include in API requests with the 2587 // JSON null value. By default, fields with empty values are omitted 2588 // from API requests. However, any field with an empty value appearing 2589 // in NullFields will be sent to the server as null. It is an error if a 2590 // field in this list has a non-empty value. This may be used to include 2591 // null fields in Patch requests. 2592 NullFields []string `json:"-"` 2593} 2594 2595func (s *HistogramResults) MarshalJSON() ([]byte, error) { 2596 type NoMethod HistogramResults 2597 raw := NoMethod(*s) 2598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2599} 2600 2601// Job: A Job resource represents a job posting (also referred to as a 2602// "job listing" 2603// or "job requisition"). A job belongs to a Company, which is the 2604// hiring 2605// entity responsible for the job. 2606type Job struct { 2607 // ApplicationEmailList: Optional but at least one of 2608 // application_urls, 2609 // application_email_list or application_instruction must 2610 // be 2611 // specified. 2612 // 2613 // Use this field to specify email address(es) to which resumes 2614 // or 2615 // applications can be sent. 2616 // 2617 // The maximum number of allowed characters is 255. 2618 ApplicationEmailList []string `json:"applicationEmailList,omitempty"` 2619 2620 // ApplicationInstruction: Optional but at least one of 2621 // application_urls, 2622 // application_email_list or application_instruction must 2623 // be 2624 // specified. 2625 // 2626 // Use this field to provide instructions, such as "Mail your 2627 // application 2628 // to ...", that a candidate can follow to apply for the job. 2629 // 2630 // This field accepts and sanitizes HTML input, and also accepts 2631 // bold, italic, ordered list, and unordered list markup tags. 2632 // 2633 // The maximum number of allowed characters is 3,000. 2634 ApplicationInstruction string `json:"applicationInstruction,omitempty"` 2635 2636 // ApplicationUrls: Optional but at least one of 2637 // application_urls, 2638 // application_email_list or application_instruction must 2639 // be 2640 // specified. 2641 // 2642 // Use this URL field to direct an applicant to a website, for example 2643 // to 2644 // link to an online application form. 2645 // 2646 // The maximum number of allowed characters is 2,000. 2647 ApplicationUrls []string `json:"applicationUrls,omitempty"` 2648 2649 // Benefits: Optional. 2650 // 2651 // The benefits included with the job. 2652 // 2653 // Possible values: 2654 // "JOB_BENEFIT_TYPE_UNSPECIFIED" - Default value if the type is not 2655 // specified. 2656 // "CHILD_CARE" - The job includes access to programs that support 2657 // child care, such 2658 // as daycare. 2659 // "DENTAL" - The job includes dental services that are covered by a 2660 // dental 2661 // insurance plan. 2662 // "DOMESTIC_PARTNER" - The job offers specific benefits to domestic 2663 // partners. 2664 // "FLEXIBLE_HOURS" - The job allows for a flexible work schedule. 2665 // "MEDICAL" - The job includes health services that are covered by a 2666 // medical 2667 // insurance plan. 2668 // "LIFE_INSURANCE" - The job includes a life insurance plan provided 2669 // by the employer or 2670 // available for purchase by the employee. 2671 // "PARENTAL_LEAVE" - The job allows for a leave of absence to a 2672 // parent to care for a newborn 2673 // child. 2674 // "RETIREMENT_PLAN" - The job includes a workplace retirement plan 2675 // provided by the 2676 // employer or available for purchase by the employee. 2677 // "SICK_DAYS" - The job allows for paid time off due to illness. 2678 // "TELECOMMUTE" - Deprecated. Set Region.TELECOMMUTE instead. 2679 // 2680 // The job allows telecommuting (working remotely). 2681 // "VACATION" - The job includes paid time off for vacation. 2682 // "VISION" - The job includes vision services that are covered by a 2683 // vision 2684 // insurance plan. 2685 Benefits []string `json:"benefits,omitempty"` 2686 2687 // CompanyDisplayName: Output only. 2688 // 2689 // The name of the company listing the job. 2690 CompanyDisplayName string `json:"companyDisplayName,omitempty"` 2691 2692 // CompanyName: Optional but one of company_name or 2693 // distributor_company_id must be 2694 // provided. 2695 // 2696 // The resource name of the company listing the job, such 2697 // as 2698 // /companies/foo. This field takes precedence over 2699 // the 2700 // distributor-assigned company identifier, distributor_company_id. 2701 CompanyName string `json:"companyName,omitempty"` 2702 2703 // CompanyTitle: Deprecated. Use company_display_name instead. 2704 // 2705 // Output only. 2706 // 2707 // The name of the company listing the job. 2708 CompanyTitle string `json:"companyTitle,omitempty"` 2709 2710 // CompensationInfo: Optional. 2711 // 2712 // Job compensation information. 2713 CompensationInfo *CompensationInfo `json:"compensationInfo,omitempty"` 2714 2715 // CreateTime: Output only. 2716 // 2717 // The timestamp when this job was created. 2718 CreateTime string `json:"createTime,omitempty"` 2719 2720 // CustomAttributes: Optional. 2721 // 2722 // A map of fields to hold both filterable and non-filterable custom 2723 // job 2724 // attributes that are not covered by the provided structured 2725 // fields. 2726 // 2727 // This field is a more general combination of the deprecated 2728 // id-based 2729 // filterable_custom_fields and 2730 // string-based 2731 // non_filterable_custom_fields. 2732 // 2733 // The keys of the map are strings up to 64 bytes and must match 2734 // the 2735 // pattern: a-zA-Z*. 2736 // 2737 // At most 100 filterable and at most 100 unfilterable keys are 2738 // supported. 2739 // For filterable `string_values`, across all keys at most 200 values 2740 // are 2741 // allowed, with each string no more than 255 characters. For 2742 // unfilterable 2743 // `string_values`, the maximum total size of `string_values` across all 2744 // keys 2745 // is 50KB. 2746 CustomAttributes map[string]CustomAttribute `json:"customAttributes,omitempty"` 2747 2748 // Department: Optional. 2749 // 2750 // The department or functional area within the company with the 2751 // open 2752 // position. 2753 // 2754 // The maximum number of allowed characters is 255. 2755 Department string `json:"department,omitempty"` 2756 2757 // Description: Required. 2758 // 2759 // The description of the job, which typically includes a 2760 // multi-paragraph 2761 // description of the company and related information. Separate fields 2762 // are 2763 // provided on the job object for responsibilities, 2764 // qualifications, and other job characteristics. Use of 2765 // these separate job fields is recommended. 2766 // 2767 // This field accepts and sanitizes HTML input, and also accepts 2768 // bold, italic, ordered list, and unordered list markup tags. 2769 // 2770 // The maximum number of allowed characters is 100,000. 2771 Description string `json:"description,omitempty"` 2772 2773 // DistributorCompanyId: Optional but one of company_name or 2774 // distributor_company_id must be 2775 // provided. 2776 // 2777 // A unique company identifier used by job distributors to identify 2778 // an 2779 // employer's company entity. company_name takes precedence over 2780 // this field, and is the recommended field to use to identify 2781 // companies. 2782 // 2783 // The maximum number of allowed characters is 255. 2784 DistributorCompanyId string `json:"distributorCompanyId,omitempty"` 2785 2786 // EducationLevels: Optional. 2787 // 2788 // The desired education level for the job, such as 2789 // "Bachelors", "Masters", "Doctorate". 2790 // 2791 // Possible values: 2792 // "EDUCATION_LEVEL_UNSPECIFIED" - The default value if the level is 2793 // not specified. 2794 // "HIGH_SCHOOL" - A High School diploma is required for the position. 2795 // "ASSOCIATE" - An Associate degree is required for the position. 2796 // "BACHELORS" - A Bachelors degree is required for the position. 2797 // "MASTERS" - A Masters degree is required for the position. 2798 // "DOCTORATE" - A Doctorate degree is required for the position. 2799 // "NO_DEGREE_REQUIRED" - No formal education is required for the 2800 // position. 2801 EducationLevels []string `json:"educationLevels,omitempty"` 2802 2803 // EmploymentTypes: Optional. 2804 // 2805 // The employment type(s) of a job, for example, 2806 // full time or 2807 // part time. 2808 // 2809 // Possible values: 2810 // "EMPLOYMENT_TYPE_UNSPECIFIED" - The default value if the employment 2811 // type is not specified. 2812 // "FULL_TIME" - The job requires working a number of hours that 2813 // constitute full 2814 // time employment, typically 40 or more hours per week. 2815 // "PART_TIME" - The job entails working fewer hours than a full time 2816 // job, 2817 // typically less than 40 hours a week. 2818 // "CONTRACTOR" - The job is offered as a contracted, as opposed to a 2819 // salaried employee, 2820 // position. 2821 // "TEMPORARY" - The job is offered as a temporary employment 2822 // opportunity, usually 2823 // a short-term engagement. 2824 // "INTERN" - The job is a fixed-term opportunity for students or 2825 // entry-level job seekers 2826 // to obtain on-the-job training, typically offered as a summer 2827 // position. 2828 // "VOLUNTEER" - The is an opportunity for an individual to volunteer, 2829 // where there is no 2830 // expectation of compensation for the provided services. 2831 // "PER_DIEM" - The job requires an employee to work on an as-needed 2832 // basis with a 2833 // flexible schedule. 2834 // "CONTRACT_TO_HIRE" - The job is offered as a contracted position 2835 // with the understanding 2836 // that it is converted into a full-time position at the end of 2837 // the 2838 // contract. Jobs of this type are also returned by a search 2839 // for 2840 // EmploymentType.CONTRACTOR jobs. 2841 // "FLY_IN_FLY_OUT" - The job involves employing people in remote 2842 // areas and flying them 2843 // temporarily to the work site instead of relocating employees and 2844 // their 2845 // families permanently. 2846 // "OTHER" - The job does not fit any of the other listed types. 2847 EmploymentTypes []string `json:"employmentTypes,omitempty"` 2848 2849 // EndDate: Optional. 2850 // 2851 // The end date of the job in UTC time zone. Typically this field 2852 // is used for contracting engagements. 2853 // Dates prior to 1970/1/1 and invalid date formats are ignored. 2854 EndDate *Date `json:"endDate,omitempty"` 2855 2856 // ExpireTime: Optional but strongly recommended for the best 2857 // service 2858 // experience. 2859 // 2860 // The expiration timestamp of the job. After this timestamp, the 2861 // job is marked as expired, and it no longer appears in search results. 2862 // The 2863 // expired job can't be deleted or listed by the DeleteJob and 2864 // ListJobs APIs, but it can be retrieved with the GetJob API or 2865 // updated with the UpdateJob API. An expired job can be updated 2866 // and 2867 // opened again by using a future expiration timestamp. Updating an 2868 // expired 2869 // job fails if there is another existing open job with 2870 // same 2871 // requisition_id, company_name and language_code. 2872 // 2873 // The expired jobs are retained in our system for 90 days. However, 2874 // the 2875 // overall expired job count cannot exceed 3 times the maximum of open 2876 // jobs 2877 // count over the past week, otherwise jobs with earlier expire time 2878 // are 2879 // cleaned first. Expired jobs are no longer accessible after they are 2880 // cleaned 2881 // out. 2882 // The format of this field is RFC 3339 date strings. 2883 // Example: 2884 // 2000-01-01T00:00:00.999999999Z 2885 // See 2886 // [https://www.ietf.org/rfc/ 2887 // rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). 2888 // 2889 // A valid date range is between 1970-01-01T00:00:00.0Z 2890 // and 2891 // 2100-12-31T23:59:59.999Z. Invalid dates are ignored and treated as 2892 // expire 2893 // time not provided. 2894 // 2895 // If this value is not provided at the time of job creation or is 2896 // invalid, 2897 // the job posting expires after 30 days from the job's creation time. 2898 // For 2899 // example, if the job was created on 2017/01/01 13:00AM UTC with 2900 // an 2901 // unspecified expiration date, the job expires after 2017/01/31 13:00AM 2902 // UTC. 2903 // 2904 // If this value is not provided but expiry_date is, expiry_date 2905 // is 2906 // used. 2907 // 2908 // If this value is not provided on job update, it depends on the field 2909 // masks 2910 // set by UpdateJobRequest.update_job_fields. If the field masks 2911 // include 2912 // expiry_time, or the masks are empty meaning that every field 2913 // is 2914 // updated, the job posting expires after 30 days from the job's 2915 // last 2916 // update time. Otherwise the expiration date isn't updated. 2917 ExpireTime string `json:"expireTime,omitempty"` 2918 2919 // ExpiryDate: Deprecated. Use expire_time instead. 2920 // 2921 // Optional but strongly recommended to be provided for the best 2922 // service 2923 // experience. 2924 // 2925 // The expiration date of the job in UTC time. After 12 am on this date, 2926 // the 2927 // job is marked as expired, and it no longer appears in search 2928 // results. 2929 // The expired job can't be deleted or listed by the DeleteJob 2930 // and 2931 // ListJobs APIs, but it can be retrieved with the GetJob API or 2932 // updated with the UpdateJob API. An expired job can be updated 2933 // and 2934 // opened again by using a future expiration date. It can also remain 2935 // expired. 2936 // Updating an expired job to be open fails if there is another existing 2937 // open 2938 // job with same requisition_id, company_name and language_code. 2939 // 2940 // The expired jobs are retained in our system for 90 days. However, 2941 // the 2942 // overall expired job count cannot exceed 3 times the maximum of open 2943 // jobs 2944 // count over the past week, otherwise jobs with earlier expire time 2945 // are 2946 // removed first. Expired jobs are no longer accessible after they are 2947 // cleaned 2948 // out. 2949 // 2950 // A valid date range is between 1970/1/1 and 2100/12/31. Invalid dates 2951 // are 2952 // ignored and treated as expiry date not provided. 2953 // 2954 // If this value is not provided on job creation or is invalid, the 2955 // job 2956 // posting expires after 30 days from the job's creation time. For 2957 // example, if 2958 // the job was created on 2017/01/01 13:00AM UTC with an 2959 // unspecified 2960 // expiration date, the job expires after 2017/01/31 13:00AM UTC. 2961 // 2962 // If this value is not provided on job update, it depends on the field 2963 // masks 2964 // set by UpdateJobRequest.update_job_fields. If the field masks 2965 // include 2966 // expiry_date, or the masks are empty meaning that every field 2967 // is 2968 // updated, the job expires after 30 days from the job's last update 2969 // time. 2970 // Otherwise the expiration date isn't updated. 2971 ExpiryDate *Date `json:"expiryDate,omitempty"` 2972 2973 // ExtendedCompensationInfo: Deprecated. Always use 2974 // compensation_info. 2975 // 2976 // Optional. 2977 // 2978 // Job compensation information. 2979 // 2980 // This field replaces compensation_info. Only 2981 // CompensationInfo.entries or extended_compensation_info can be 2982 // set, 2983 // otherwise an exception is thrown. 2984 ExtendedCompensationInfo *ExtendedCompensationInfo `json:"extendedCompensationInfo,omitempty"` 2985 2986 // FilterableCustomFields: Deprecated. Use custom_attributes 2987 // instead. 2988 // 2989 // Optional. 2990 // 2991 // A map of fields to hold filterable custom job attributes not captured 2992 // by 2993 // the standard fields such as job_title, company_name, or 2994 // level. These custom fields store arbitrary 2995 // string values, and can be used for purposes not covered by 2996 // the structured fields. For the best search experience, use of 2997 // the 2998 // structured rather than custom fields is recommended. 2999 // 3000 // Data stored in these custom fields fields are indexed and 3001 // searched against by keyword searches 3002 // (see 3003 // SearchJobsRequest.custom_field_filters][]). 3004 // 3005 // The map key must be a number between 1-20. If an invalid key 3006 // is 3007 // provided on job create or update, an error is returned. 3008 FilterableCustomFields map[string]CustomField `json:"filterableCustomFields,omitempty"` 3009 3010 // Incentives: Optional. 3011 // 3012 // A description of bonus, commission, and other compensation 3013 // incentives associated with the job not including salary or pay. 3014 // 3015 // The maximum number of allowed characters is 10,000. 3016 Incentives string `json:"incentives,omitempty"` 3017 3018 // JobLocations: Output only. 3019 // 3020 // Structured locations of the job, resolved from locations. 3021 JobLocations []*JobLocation `json:"jobLocations,omitempty"` 3022 3023 // JobTitle: Required. 3024 // 3025 // The title of the job, such as "Software Engineer" 3026 // 3027 // The maximum number of allowed characters is 500. 3028 JobTitle string `json:"jobTitle,omitempty"` 3029 3030 // LanguageCode: Optional. 3031 // 3032 // The language of the posting. This field is distinct from 3033 // any requirements for fluency that are associated with the 3034 // job. 3035 // 3036 // Language codes must be in BCP-47 format, such as "en-US" or 3037 // "sr-Latn". 3038 // For more information, see 3039 // [Tags for Identifying 3040 // Languages](https://tools.ietf.org/html/bcp47){: 3041 // class="external" target="_blank" }. 3042 // 3043 // If this field is unspecified and Job.description is present, 3044 // detected 3045 // language code based on Job.description is assigned, 3046 // otherwise 3047 // defaults to 'en_US'. 3048 LanguageCode string `json:"languageCode,omitempty"` 3049 3050 // Level: Optional. 3051 // 3052 // The experience level associated with the job, such as "Entry Level". 3053 // 3054 // Possible values: 3055 // "JOB_LEVEL_UNSPECIFIED" - The default value if the level is not 3056 // specified. 3057 // "ENTRY_LEVEL" - Entry-level individual contributors, typically with 3058 // less than 2 years of 3059 // experience in a similar role. Includes interns. 3060 // "EXPERIENCED" - Experienced individual contributors, typically with 3061 // 2+ years of 3062 // experience in a similar role. 3063 // "MANAGER" - Entry- to mid-level managers responsible for managing a 3064 // team of people. 3065 // "DIRECTOR" - Senior-level managers responsible for managing teams 3066 // of managers. 3067 // "EXECUTIVE" - Executive-level managers and above, including C-level 3068 // positions. 3069 Level string `json:"level,omitempty"` 3070 3071 // Locations: Optional but strongly recommended for the best service 3072 // experience. 3073 // 3074 // Location(s) where the emploeyer is looking to hire for this job 3075 // posting. 3076 // 3077 // Specifying the full street address(es) of the hiring location 3078 // enables 3079 // better API results, especially job searches by commute time. 3080 // 3081 // At most 50 locations are allowed for best search performance. If a 3082 // job has 3083 // more locations, it is suggested to split it into multiple jobs with 3084 // unique 3085 // requisition_ids (e.g. 'ReqA' becomes 'ReqA-1', 'ReqA-2', etc.) 3086 // as 3087 // multiple jobs with the same requisition_id, company_name 3088 // and 3089 // language_code are not allowed. If the original requisition_id must 3090 // be preserved, a custom field should be used for storage. It is 3091 // also 3092 // suggested to group the locations that close to each other in the same 3093 // job 3094 // for better search experience. 3095 // 3096 // The maximum number of allowed characters is 500. 3097 Locations []string `json:"locations,omitempty"` 3098 3099 // Name: Required during job update. 3100 // 3101 // Resource name assigned to a job by the API, for example, "/jobs/foo". 3102 // Use 3103 // of this field in job queries and API calls is preferred over the use 3104 // of 3105 // requisition_id since this value is unique. 3106 Name string `json:"name,omitempty"` 3107 3108 // PromotionValue: Optional. 3109 // 3110 // A promotion value of the job, as determined by the client. 3111 // The value determines the sort order of the jobs returned when 3112 // searching for 3113 // jobs using the featured jobs search call, with higher promotional 3114 // values 3115 // being returned first and ties being resolved by relevance sort. Only 3116 // the 3117 // jobs with a promotionValue >0 are returned in a 3118 // FEATURED_JOB_SEARCH. 3119 // 3120 // Default value is 0, and negative values are treated as 0. 3121 PromotionValue int64 `json:"promotionValue,omitempty"` 3122 3123 // PublishDate: Optional. 3124 // 3125 // The date this job was most recently published in UTC format. The 3126 // default 3127 // value is the time the request arrives at the server. 3128 PublishDate *Date `json:"publishDate,omitempty"` 3129 3130 // Qualifications: Optional. 3131 // 3132 // A description of the qualifications required to perform the 3133 // job. The use of this field is recommended 3134 // as an alternative to using the more general description field. 3135 // 3136 // This field accepts and sanitizes HTML input, and also accepts 3137 // bold, italic, ordered list, and unordered list markup tags. 3138 // 3139 // The maximum number of allowed characters is 10,000. 3140 Qualifications string `json:"qualifications,omitempty"` 3141 3142 // ReferenceUrl: Output only. 3143 // 3144 // The URL of a web page that displays job details. 3145 ReferenceUrl string `json:"referenceUrl,omitempty"` 3146 3147 // Region: Optional. 3148 // 3149 // The job Region (for example, state, country) throughout which the 3150 // job 3151 // is available. If this field is set, a 3152 // LocationFilter in a search query within the job region 3153 // finds this job if an exact location match is not specified. 3154 // If this field is set, setting job locations 3155 // to the same location level as this field is strongly recommended. 3156 // 3157 // Possible values: 3158 // "REGION_UNSPECIFIED" - If the region is unspecified, the job is 3159 // only returned if it 3160 // matches the LocationFilter. 3161 // "STATE_WIDE" - In additiona to exact location matching, job is 3162 // returned when the 3163 // LocationFilter in search query is in the same state as this job. 3164 // For example, if a `STATE_WIDE` job is posted in "CA, USA", it 3165 // is 3166 // returned if LocationFilter has "Mountain View". 3167 // "NATION_WIDE" - In addition to exact location matching, job is 3168 // returned when 3169 // LocationFilter in search query is in the same country as this 3170 // job. 3171 // For example, if a `NATION_WIDE` job is posted in "USA", it 3172 // is 3173 // returned if LocationFilter has 'Mountain View'. 3174 // "TELECOMMUTE" - Job allows employees to work remotely 3175 // (telecommute). 3176 // If locations are provided with this value, the job is 3177 // considered as having a location, but telecommuting is allowed. 3178 Region string `json:"region,omitempty"` 3179 3180 // RequisitionId: Required. 3181 // 3182 // The requisition ID, also referred to as the posting ID, assigned by 3183 // the 3184 // client to identify a job. This field is intended to be used by 3185 // clients 3186 // for client identification and tracking of listings. A job is not 3187 // allowed 3188 // to be created if there is another job with the same 3189 // requisition_id, 3190 // company_name and language_code. 3191 // 3192 // The maximum number of allowed characters is 255. 3193 RequisitionId string `json:"requisitionId,omitempty"` 3194 3195 // Responsibilities: Optional. 3196 // 3197 // A description of job responsibilities. The use of this field 3198 // is 3199 // recommended as an alternative to using the more general 3200 // description 3201 // field. 3202 // 3203 // This field accepts and sanitizes HTML input, and also accepts 3204 // bold, italic, ordered list, and unordered list markup tags. 3205 // 3206 // The maximum number of allowed characters is 10,000. 3207 Responsibilities string `json:"responsibilities,omitempty"` 3208 3209 // StartDate: Optional. 3210 // 3211 // The start date of the job in UTC time zone. Typically this field 3212 // is used for contracting engagements. 3213 // Dates prior to 1970/1/1 and invalid date formats are ignored. 3214 StartDate *Date `json:"startDate,omitempty"` 3215 3216 // UnindexedCustomFields: Deprecated. Use custom_attributes 3217 // instead. 3218 // 3219 // Optional. 3220 // 3221 // A map of fields to hold non-filterable custom job attributes, similar 3222 // to 3223 // filterable_custom_fields. These fields are distinct in that the 3224 // data 3225 // in these fields are not indexed. Therefore, the client cannot 3226 // search 3227 // against them, nor can the client use them to list jobs. 3228 // 3229 // The key of the map can be any valid string. 3230 UnindexedCustomFields map[string]CustomField `json:"unindexedCustomFields,omitempty"` 3231 3232 // UpdateTime: Output only. 3233 // 3234 // The timestamp when this job was last updated. 3235 UpdateTime string `json:"updateTime,omitempty"` 3236 3237 // Visibility: Optional. 3238 // 3239 // The visibility of the job. 3240 // Defaults to JobVisibility.PRIVATE if not specified. 3241 // Currently only JobVisibility.PRIVATE is supported. 3242 // 3243 // Possible values: 3244 // "JOB_VISIBILITY_UNSPECIFIED" - Default value. 3245 // "PRIVATE" - The Job is only visible to the owner. 3246 // "GOOGLE" - The Job is visible to the owner and may be visible to 3247 // other applications 3248 // and processes at Google. 3249 // 3250 // Not yet supported. Use PRIVATE. 3251 // "PUBLIC" - The Job is visible to the owner and may be visible to 3252 // all other API 3253 // clients. 3254 // 3255 // Not yet supported. Use PRIVATE. 3256 Visibility string `json:"visibility,omitempty"` 3257 3258 // ServerResponse contains the HTTP response code and headers from the 3259 // server. 3260 googleapi.ServerResponse `json:"-"` 3261 3262 // ForceSendFields is a list of field names (e.g. 3263 // "ApplicationEmailList") to unconditionally include in API requests. 3264 // By default, fields with empty values are omitted from API requests. 3265 // However, any non-pointer, non-interface field appearing in 3266 // ForceSendFields will be sent to the server regardless of whether the 3267 // field is empty or not. This may be used to include empty fields in 3268 // Patch requests. 3269 ForceSendFields []string `json:"-"` 3270 3271 // NullFields is a list of field names (e.g. "ApplicationEmailList") to 3272 // include in API requests with the JSON null value. By default, fields 3273 // with empty values are omitted from API requests. However, any field 3274 // with an empty value appearing in NullFields will be sent to the 3275 // server as null. It is an error if a field in this list has a 3276 // non-empty value. This may be used to include null fields in Patch 3277 // requests. 3278 NullFields []string `json:"-"` 3279} 3280 3281func (s *Job) MarshalJSON() ([]byte, error) { 3282 type NoMethod Job 3283 raw := NoMethod(*s) 3284 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3285} 3286 3287// JobFilters: Input only. 3288// 3289// Deprecated. Use JobQuery instead. 3290// 3291// The filters required to perform a search query or histogram. 3292type JobFilters struct { 3293 // Categories: Optional. 3294 // 3295 // The category filter specifies the categories of jobs to search 3296 // against. 3297 // See Category for more information. 3298 // 3299 // If a value is not specified, jobs from any category are searched 3300 // against. 3301 // 3302 // If multiple values are specified, jobs from any of the 3303 // specified 3304 // categories are searched against. 3305 // 3306 // Possible values: 3307 // "JOB_CATEGORY_UNSPECIFIED" - The default value if the category is 3308 // not specified. 3309 // "ACCOUNTING_AND_FINANCE" - An accounting and finance job, such as 3310 // an Accountant. 3311 // "ADMINISTRATIVE_AND_OFFICE" - And administrative and office job, 3312 // such as an Administrative Assistant. 3313 // "ADVERTISING_AND_MARKETING" - An advertising and marketing job, 3314 // such as Marketing Manager. 3315 // "ANIMAL_CARE" - An animal care job, such as Veterinarian. 3316 // "ART_FASHION_AND_DESIGN" - An art, fashion, or design job, such as 3317 // Designer. 3318 // "BUSINESS_OPERATIONS" - A business operations job, such as Business 3319 // Operations Manager. 3320 // "CLEANING_AND_FACILITIES" - A cleaning and facilities job, such as 3321 // Custodial Staff. 3322 // "COMPUTER_AND_IT" - A computer and IT job, such as Systems 3323 // Administrator. 3324 // "CONSTRUCTION" - A construction job, such as General Laborer. 3325 // "CUSTOMER_SERVICE" - A customer service job, such s Cashier. 3326 // "EDUCATION" - An education job, such as School Teacher. 3327 // "ENTERTAINMENT_AND_TRAVEL" - An entertainment and travel job, such 3328 // as Flight Attendant. 3329 // "FARMING_AND_OUTDOORS" - A farming or outdoor job, such as Park 3330 // Ranger. 3331 // "HEALTHCARE" - A healthcare job, such as Registered Nurse. 3332 // "HUMAN_RESOURCES" - A human resources job, such as Human Resources 3333 // Director. 3334 // "INSTALLATION_MAINTENANCE_AND_REPAIR" - An installation, 3335 // maintenance, or repair job, such as Electrician. 3336 // "LEGAL" - A legal job, such as Law Clerk. 3337 // "MANAGEMENT" - A management job, often used in conjunction with 3338 // another category, 3339 // such as Store Manager. 3340 // "MANUFACTURING_AND_WAREHOUSE" - A manufacturing or warehouse job, 3341 // such as Assembly Technician. 3342 // "MEDIA_COMMUNICATIONS_AND_WRITING" - A media, communications, or 3343 // writing job, such as Media Relations. 3344 // "OIL_GAS_AND_MINING" - An oil, gas or mining job, such as Offshore 3345 // Driller. 3346 // "PERSONAL_CARE_AND_SERVICES" - A personal care and services job, 3347 // such as Hair Stylist. 3348 // "PROTECTIVE_SERVICES" - A protective services job, such as Security 3349 // Guard. 3350 // "REAL_ESTATE" - A real estate job, such as Buyer's Agent. 3351 // "RESTAURANT_AND_HOSPITALITY" - A restaurant and hospitality job, 3352 // such as Restaurant Server. 3353 // "SALES_AND_RETAIL" - A sales and/or retail job, such Sales 3354 // Associate. 3355 // "SCIENCE_AND_ENGINEERING" - A science and engineering job, such as 3356 // Lab Technician. 3357 // "SOCIAL_SERVICES_AND_NON_PROFIT" - A social services or non-profit 3358 // job, such as Case Worker. 3359 // "SPORTS_FITNESS_AND_RECREATION" - A sports, fitness, or recreation 3360 // job, such as Personal Trainer. 3361 // "TRANSPORTATION_AND_LOGISTICS" - A transportation or logistics job, 3362 // such as Truck Driver. 3363 Categories []string `json:"categories,omitempty"` 3364 3365 // CommuteFilter: Optional. 3366 // 3367 // Allows filtering jobs by commute time with different travel methods 3368 // (e.g. 3369 // driving or public transit). Note: this only works with COMMUTE 3370 // MODE. When specified, [JobFilters.location_filters] will be 3371 // ignored. 3372 // 3373 // Currently we do not support sorting by commute time. 3374 CommuteFilter *CommutePreference `json:"commuteFilter,omitempty"` 3375 3376 // CompanyNames: Optional. 3377 // 3378 // The company names filter specifies the company entities to 3379 // search 3380 // against. 3381 // 3382 // If a value is not specified, jobs are searched for against all 3383 // companies. 3384 // 3385 // If multiple values are specified, jobs are searched against 3386 // the 3387 // specified companies. 3388 // 3389 // At most 20 company filters are allowed. 3390 CompanyNames []string `json:"companyNames,omitempty"` 3391 3392 // CompanyTitles: Optional. 3393 // 3394 // This filter specifies the exact company titles 3395 // of jobs to search against. 3396 // 3397 // If a value is not specified, jobs within the search results can 3398 // be 3399 // associated with any company. 3400 // 3401 // If multiple values are specified, jobs within the search results may 3402 // be 3403 // associated with any of the specified companies. 3404 // 3405 // At most 20 company title filters are allowed. 3406 CompanyTitles []string `json:"companyTitles,omitempty"` 3407 3408 // CompensationFilter: Optional. 3409 // 3410 // This search filter is applied only to 3411 // Job.compensation_info. For example, if the filter is specified 3412 // as "Hourly job with per-hour compensation > $15", only jobs that 3413 // meet 3414 // this criteria are searched. If a filter is not defined, all open 3415 // jobs 3416 // are searched. 3417 CompensationFilter *CompensationFilter `json:"compensationFilter,omitempty"` 3418 3419 // CustomAttributeFilter: Optional. 3420 // 3421 // This filter specifies a structured syntax to match against 3422 // the 3423 // Job.custom_attributes that are marked as `filterable`. 3424 // 3425 // The syntax for this expression is a subset of Google SQL 3426 // syntax. 3427 // 3428 // Supported operators are: =, !=, <, <=, >, >= where the left of the 3429 // operator 3430 // is a custom field key and the right of the operator is a number or 3431 // string 3432 // (surrounded by quotes) value. 3433 // 3434 // Supported functions are LOWER(<field_name>) to 3435 // perform case insensitive match and EMPTY(<field_name>) to filter on 3436 // the 3437 // existence of a key. 3438 // 3439 // Boolean expressions (AND/OR/NOT) are supported up to 3 levels 3440 // of 3441 // nesting (For example, "((A AND B AND C) OR NOT D) AND E"), and there 3442 // can 3443 // be a maximum of 100 comparisons/functions in the expression. The 3444 // expression 3445 // must be < 3000 bytes in length. 3446 // 3447 // Sample Query: 3448 // (key1 = "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1)) AND key2 > 3449 // 100 3450 CustomAttributeFilter string `json:"customAttributeFilter,omitempty"` 3451 3452 // CustomFieldFilters: Deprecated. Use custom_attribute_filter 3453 // instead. 3454 // 3455 // Optional. 3456 // 3457 // This filter specifies searching against 3458 // custom field values. See Job.filterable_custom_fields for 3459 // information. 3460 // The key value specifies a number between 1-20 (the service 3461 // supports 20 custom fields) corresponding to the desired custom field 3462 // map 3463 // value. If an invalid key is provided or specified together 3464 // with 3465 // custom_attribute_filter, an error is thrown. 3466 CustomFieldFilters map[string]CustomFieldFilter `json:"customFieldFilters,omitempty"` 3467 3468 // DisableSpellCheck: Optional. 3469 // 3470 // This flag controls the spell-check feature. If false, the 3471 // service attempts to correct a misspelled query, 3472 // for example, "enginee" is corrected to "engineer". 3473 // 3474 // Defaults to false: a spell check is performed. 3475 DisableSpellCheck bool `json:"disableSpellCheck,omitempty"` 3476 3477 // EmploymentTypes: Optional. 3478 // 3479 // The employment type filter specifies the employment type of jobs 3480 // to 3481 // search against, such as EmploymentType.FULL_TIME. 3482 // 3483 // If a value is not specified, jobs in the search results include 3484 // any 3485 // employment type. 3486 // 3487 // If multiple values are specified, jobs in the search results include 3488 // any 3489 // of the specified employment types. 3490 // 3491 // Possible values: 3492 // "EMPLOYMENT_TYPE_UNSPECIFIED" - The default value if the employment 3493 // type is not specified. 3494 // "FULL_TIME" - The job requires working a number of hours that 3495 // constitute full 3496 // time employment, typically 40 or more hours per week. 3497 // "PART_TIME" - The job entails working fewer hours than a full time 3498 // job, 3499 // typically less than 40 hours a week. 3500 // "CONTRACTOR" - The job is offered as a contracted, as opposed to a 3501 // salaried employee, 3502 // position. 3503 // "TEMPORARY" - The job is offered as a temporary employment 3504 // opportunity, usually 3505 // a short-term engagement. 3506 // "INTERN" - The job is a fixed-term opportunity for students or 3507 // entry-level job seekers 3508 // to obtain on-the-job training, typically offered as a summer 3509 // position. 3510 // "VOLUNTEER" - The is an opportunity for an individual to volunteer, 3511 // where there is no 3512 // expectation of compensation for the provided services. 3513 // "PER_DIEM" - The job requires an employee to work on an as-needed 3514 // basis with a 3515 // flexible schedule. 3516 // "CONTRACT_TO_HIRE" - The job is offered as a contracted position 3517 // with the understanding 3518 // that it is converted into a full-time position at the end of 3519 // the 3520 // contract. Jobs of this type are also returned by a search 3521 // for 3522 // EmploymentType.CONTRACTOR jobs. 3523 // "FLY_IN_FLY_OUT" - The job involves employing people in remote 3524 // areas and flying them 3525 // temporarily to the work site instead of relocating employees and 3526 // their 3527 // families permanently. 3528 // "OTHER" - The job does not fit any of the other listed types. 3529 EmploymentTypes []string `json:"employmentTypes,omitempty"` 3530 3531 // ExtendedCompensationFilter: Deprecated. Always use 3532 // compensation_filter. 3533 // 3534 // Optional. 3535 // 3536 // This search filter is applied only to 3537 // Job.extended_compensation_info. For example, if the filter is 3538 // specified 3539 // as "Hourly job with per-hour compensation > $15", only jobs that 3540 // meet 3541 // these criteria are searched. If a filter is not defined, all open 3542 // jobs 3543 // are searched. 3544 ExtendedCompensationFilter *ExtendedCompensationFilter `json:"extendedCompensationFilter,omitempty"` 3545 3546 // LanguageCodes: Optional. 3547 // 3548 // This filter specifies the locale of jobs to search against, 3549 // for example, "en-US". 3550 // 3551 // If a value is not specified, the search results may contain jobs in 3552 // any 3553 // locale. 3554 // 3555 // 3556 // Language codes should be in BCP-47 format, for example, "en-US" 3557 // or 3558 // "sr-Latn". For more information, see [Tags for 3559 // Identifying 3560 // Languages](https://tools.ietf.org/html/bcp47). 3561 // 3562 // At most 10 language code filters are allowed. 3563 LanguageCodes []string `json:"languageCodes,omitempty"` 3564 3565 // LocationFilters: Optional. 3566 // 3567 // The location filter specifies geo-regions containing the jobs 3568 // to 3569 // search against. See LocationFilter for more information. 3570 // 3571 // If a location value is not specified, jobs are retrieved 3572 // from all locations. 3573 // 3574 // If multiple values are specified, jobs are retrieved from any of 3575 // the 3576 // specified locations. If different values are specified for 3577 // the 3578 // LocationFilter.distance_in_miles parameter, the maximum 3579 // provided 3580 // distance is used for all locations. 3581 // 3582 // At most 5 location filters are allowed. 3583 LocationFilters []*LocationFilter `json:"locationFilters,omitempty"` 3584 3585 // PublishDateRange: Optional. 3586 // 3587 // Jobs published within a range specified by this filter are 3588 // searched 3589 // against, for example, DateRange.PAST_MONTH. If a value is 3590 // not 3591 // specified, all open jobs are searched against regardless of the 3592 // date they were published. 3593 // 3594 // Possible values: 3595 // "DATE_RANGE_UNSPECIFIED" - Default value: Filtering on time is not 3596 // performed. 3597 // "PAST_24_HOURS" - The past 24 hours 3598 // "PAST_WEEK" - The past week (7 days) 3599 // "PAST_MONTH" - The past month (30 days) 3600 // "PAST_YEAR" - The past year (365 days) 3601 // "PAST_3_DAYS" - The past 3 days 3602 PublishDateRange string `json:"publishDateRange,omitempty"` 3603 3604 // Query: Optional. 3605 // 3606 // The query filter contains the keywords that match against the 3607 // job 3608 // title, description, and location fields. 3609 // 3610 // The maximum query size is 255 bytes/characters. 3611 Query string `json:"query,omitempty"` 3612 3613 // TenantJobOnly: Deprecated. Do not use this field. 3614 // 3615 // This flag controls whether the job search should be restricted to 3616 // jobs 3617 // owned by the current user. 3618 // 3619 // Defaults to false where all jobs accessible to the 3620 // user are searched against. 3621 TenantJobOnly bool `json:"tenantJobOnly,omitempty"` 3622 3623 // ForceSendFields is a list of field names (e.g. "Categories") to 3624 // unconditionally include in API requests. By default, fields with 3625 // empty values are omitted from API requests. However, any non-pointer, 3626 // non-interface field appearing in ForceSendFields will be sent to the 3627 // server regardless of whether the field is empty or not. This may be 3628 // used to include empty fields in Patch requests. 3629 ForceSendFields []string `json:"-"` 3630 3631 // NullFields is a list of field names (e.g. "Categories") to include in 3632 // API requests with the JSON null value. By default, fields with empty 3633 // values are omitted from API requests. However, any field with an 3634 // empty value appearing in NullFields will be sent to the server as 3635 // null. It is an error if a field in this list has a non-empty value. 3636 // This may be used to include null fields in Patch requests. 3637 NullFields []string `json:"-"` 3638} 3639 3640func (s *JobFilters) MarshalJSON() ([]byte, error) { 3641 type NoMethod JobFilters 3642 raw := NoMethod(*s) 3643 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3644} 3645 3646// JobLocation: Output only. 3647// 3648// A resource that represents a location with full 3649// geographic 3650// information. 3651type JobLocation struct { 3652 // LatLng: An object representing a latitude/longitude pair. 3653 LatLng *LatLng `json:"latLng,omitempty"` 3654 3655 // LocationType: The type of a location, which corresponds to the 3656 // address lines field of 3657 // PostalAddress. For example, "Downtown, Atlanta, GA, USA" has a type 3658 // of 3659 // LocationType#NEIGHBORHOOD, and "Kansas City, KS, USA" has a type 3660 // of 3661 // LocationType#LOCALITY. 3662 // 3663 // Possible values: 3664 // "LOCATION_TYPE_UNSPECIFIED" - Default value if the type is not 3665 // specified. 3666 // "COUNTRY" - A country level location. 3667 // "ADMINISTRATIVE_AREA" - A state or equivalent level location. 3668 // "SUB_ADMINISTRATIVE_AREA" - A county or equivalent level location. 3669 // "LOCALITY" - A city or equivalent level location. 3670 // "POSTAL_CODE" - A postal code level location. 3671 // "SUB_LOCALITY" - A sublocality is a subdivision of a locality, for 3672 // example a city borough, 3673 // ward, or arrondissement. Sublocalities are usually recognized by a 3674 // local 3675 // political authority. For example, Manhattan and Brooklyn are 3676 // recognized 3677 // as boroughs by the City of New York, and are therefore modeled 3678 // as 3679 // sublocalities. 3680 // "SUB_LOCALITY_1" - A district or equivalent level location. 3681 // "SUB_LOCALITY_2" - A smaller district or equivalent level display. 3682 // "NEIGHBORHOOD" - A neighborhood level location. 3683 // "STREET_ADDRESS" - A street address level location. 3684 LocationType string `json:"locationType,omitempty"` 3685 3686 // PostalAddress: Postal address of the location that includes human 3687 // readable information, 3688 // such as postal delivery and payments addresses. Given a postal 3689 // address, 3690 // a postal service can deliver items to a premises, P.O. Box, or 3691 // other 3692 // delivery location. 3693 PostalAddress *PostalAddress `json:"postalAddress,omitempty"` 3694 3695 // RadiusMeters: Radius in meters of the job location. This value is 3696 // derived from the 3697 // location bounding box in which a circle with the specified 3698 // radius 3699 // centered from LatLng coves the area associated with the job 3700 // location. 3701 // For example, currently, "Mountain View, CA, USA" has a radius 3702 // of 3703 // 7885.79 meters. 3704 RadiusMeters float64 `json:"radiusMeters,omitempty"` 3705 3706 // ForceSendFields is a list of field names (e.g. "LatLng") to 3707 // unconditionally include in API requests. By default, fields with 3708 // empty values are omitted from API requests. However, any non-pointer, 3709 // non-interface field appearing in ForceSendFields will be sent to the 3710 // server regardless of whether the field is empty or not. This may be 3711 // used to include empty fields in Patch requests. 3712 ForceSendFields []string `json:"-"` 3713 3714 // NullFields is a list of field names (e.g. "LatLng") to include in API 3715 // requests with the JSON null value. By default, fields with empty 3716 // values are omitted from API requests. However, any field with an 3717 // empty value appearing in NullFields will be sent to the server as 3718 // null. It is an error if a field in this list has a non-empty value. 3719 // This may be used to include null fields in Patch requests. 3720 NullFields []string `json:"-"` 3721} 3722 3723func (s *JobLocation) MarshalJSON() ([]byte, error) { 3724 type NoMethod JobLocation 3725 raw := NoMethod(*s) 3726 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3727} 3728 3729func (s *JobLocation) UnmarshalJSON(data []byte) error { 3730 type NoMethod JobLocation 3731 var s1 struct { 3732 RadiusMeters gensupport.JSONFloat64 `json:"radiusMeters"` 3733 *NoMethod 3734 } 3735 s1.NoMethod = (*NoMethod)(s) 3736 if err := json.Unmarshal(data, &s1); err != nil { 3737 return err 3738 } 3739 s.RadiusMeters = float64(s1.RadiusMeters) 3740 return nil 3741} 3742 3743// JobProcessingOptions: Input only. 3744// 3745// Options for job processing. 3746type JobProcessingOptions struct { 3747 // DisableStreetAddressResolution: Optional. 3748 // 3749 // If set to `true`, the service does not attempt to resolve a 3750 // more precise address for the job. 3751 DisableStreetAddressResolution bool `json:"disableStreetAddressResolution,omitempty"` 3752 3753 // HtmlSanitization: Optional. 3754 // 3755 // Option for job HTML content sanitization. Applied fields are: 3756 // 3757 // * description 3758 // * applicationInstruction 3759 // * incentives 3760 // * qualifications 3761 // * responsibilities 3762 // 3763 // HTML tags in these fields may be stripped if sanitiazation is not 3764 // disabled. 3765 // 3766 // Defaults to HtmlSanitization.SIMPLE_FORMATTING_ONLY. 3767 // 3768 // Possible values: 3769 // "HTML_SANITIZATION_UNSPECIFIED" - Default value. 3770 // "HTML_SANITIZATION_DISABLED" - Disables sanitization on HTML input. 3771 // "SIMPLE_FORMATTING_ONLY" - Sanitizes HTML input, only accepts bold, 3772 // italic, ordered list, and 3773 // unordered list markup tags. 3774 HtmlSanitization string `json:"htmlSanitization,omitempty"` 3775 3776 // ForceSendFields is a list of field names (e.g. 3777 // "DisableStreetAddressResolution") to unconditionally include in API 3778 // requests. By default, fields with empty values are omitted from API 3779 // requests. However, any non-pointer, non-interface field appearing in 3780 // ForceSendFields will be sent to the server regardless of whether the 3781 // field is empty or not. This may be used to include empty fields in 3782 // Patch requests. 3783 ForceSendFields []string `json:"-"` 3784 3785 // NullFields is a list of field names (e.g. 3786 // "DisableStreetAddressResolution") to include in API requests with the 3787 // JSON null value. By default, fields with empty values are omitted 3788 // from API requests. However, any field with an empty value appearing 3789 // in NullFields will be sent to the server as null. It is an error if a 3790 // field in this list has a non-empty value. This may be used to include 3791 // null fields in Patch requests. 3792 NullFields []string `json:"-"` 3793} 3794 3795func (s *JobProcessingOptions) MarshalJSON() ([]byte, error) { 3796 type NoMethod JobProcessingOptions 3797 raw := NoMethod(*s) 3798 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3799} 3800 3801// JobQuery: Input only. 3802// 3803// The query required to perform a search query or histogram. 3804type JobQuery struct { 3805 // Categories: Optional. 3806 // 3807 // The category filter specifies the categories of jobs to search 3808 // against. 3809 // See Category for more information. 3810 // 3811 // If a value is not specified, jobs from any category are searched 3812 // against. 3813 // 3814 // If multiple values are specified, jobs from any of the 3815 // specified 3816 // categories are searched against. 3817 // 3818 // Possible values: 3819 // "JOB_CATEGORY_UNSPECIFIED" - The default value if the category is 3820 // not specified. 3821 // "ACCOUNTING_AND_FINANCE" - An accounting and finance job, such as 3822 // an Accountant. 3823 // "ADMINISTRATIVE_AND_OFFICE" - And administrative and office job, 3824 // such as an Administrative Assistant. 3825 // "ADVERTISING_AND_MARKETING" - An advertising and marketing job, 3826 // such as Marketing Manager. 3827 // "ANIMAL_CARE" - An animal care job, such as Veterinarian. 3828 // "ART_FASHION_AND_DESIGN" - An art, fashion, or design job, such as 3829 // Designer. 3830 // "BUSINESS_OPERATIONS" - A business operations job, such as Business 3831 // Operations Manager. 3832 // "CLEANING_AND_FACILITIES" - A cleaning and facilities job, such as 3833 // Custodial Staff. 3834 // "COMPUTER_AND_IT" - A computer and IT job, such as Systems 3835 // Administrator. 3836 // "CONSTRUCTION" - A construction job, such as General Laborer. 3837 // "CUSTOMER_SERVICE" - A customer service job, such s Cashier. 3838 // "EDUCATION" - An education job, such as School Teacher. 3839 // "ENTERTAINMENT_AND_TRAVEL" - An entertainment and travel job, such 3840 // as Flight Attendant. 3841 // "FARMING_AND_OUTDOORS" - A farming or outdoor job, such as Park 3842 // Ranger. 3843 // "HEALTHCARE" - A healthcare job, such as Registered Nurse. 3844 // "HUMAN_RESOURCES" - A human resources job, such as Human Resources 3845 // Director. 3846 // "INSTALLATION_MAINTENANCE_AND_REPAIR" - An installation, 3847 // maintenance, or repair job, such as Electrician. 3848 // "LEGAL" - A legal job, such as Law Clerk. 3849 // "MANAGEMENT" - A management job, often used in conjunction with 3850 // another category, 3851 // such as Store Manager. 3852 // "MANUFACTURING_AND_WAREHOUSE" - A manufacturing or warehouse job, 3853 // such as Assembly Technician. 3854 // "MEDIA_COMMUNICATIONS_AND_WRITING" - A media, communications, or 3855 // writing job, such as Media Relations. 3856 // "OIL_GAS_AND_MINING" - An oil, gas or mining job, such as Offshore 3857 // Driller. 3858 // "PERSONAL_CARE_AND_SERVICES" - A personal care and services job, 3859 // such as Hair Stylist. 3860 // "PROTECTIVE_SERVICES" - A protective services job, such as Security 3861 // Guard. 3862 // "REAL_ESTATE" - A real estate job, such as Buyer's Agent. 3863 // "RESTAURANT_AND_HOSPITALITY" - A restaurant and hospitality job, 3864 // such as Restaurant Server. 3865 // "SALES_AND_RETAIL" - A sales and/or retail job, such Sales 3866 // Associate. 3867 // "SCIENCE_AND_ENGINEERING" - A science and engineering job, such as 3868 // Lab Technician. 3869 // "SOCIAL_SERVICES_AND_NON_PROFIT" - A social services or non-profit 3870 // job, such as Case Worker. 3871 // "SPORTS_FITNESS_AND_RECREATION" - A sports, fitness, or recreation 3872 // job, such as Personal Trainer. 3873 // "TRANSPORTATION_AND_LOGISTICS" - A transportation or logistics job, 3874 // such as Truck Driver. 3875 Categories []string `json:"categories,omitempty"` 3876 3877 // CommuteFilter: Optional. 3878 // 3879 // Allows filtering jobs by commute time with different travel methods 3880 // (for 3881 // example, driving or public transit). Note: This only works with 3882 // COMMUTE 3883 // MODE. When specified, [JobQuery.location_filters] is 3884 // ignored. 3885 // 3886 // Currently we don't support sorting by commute time. 3887 CommuteFilter *CommutePreference `json:"commuteFilter,omitempty"` 3888 3889 // CompanyDisplayNames: Optional. 3890 // 3891 // This filter specifies the exact company display 3892 // name of the jobs to search against. 3893 // 3894 // If a value isn't specified, jobs within the search results 3895 // are 3896 // associated with any company. 3897 // 3898 // If multiple values are specified, jobs within the search results may 3899 // be 3900 // associated with any of the specified companies. 3901 // 3902 // At most 20 company display name filters are allowed. 3903 CompanyDisplayNames []string `json:"companyDisplayNames,omitempty"` 3904 3905 // CompanyNames: Optional. 3906 // 3907 // This filter specifies the company entities to search against. 3908 // 3909 // If a value isn't specified, jobs are searched for against 3910 // all 3911 // companies. 3912 // 3913 // If multiple values are specified, jobs are searched against 3914 // the 3915 // companies specified. 3916 // 3917 // At most 20 company filters are allowed. 3918 CompanyNames []string `json:"companyNames,omitempty"` 3919 3920 // CompensationFilter: Optional. 3921 // 3922 // This search filter is applied only to 3923 // Job.compensation_info. For example, if the filter is specified 3924 // as "Hourly job with per-hour compensation > $15", only jobs 3925 // meeting 3926 // these criteria are searched. If a filter isn't defined, all open 3927 // jobs 3928 // are searched. 3929 CompensationFilter *CompensationFilter `json:"compensationFilter,omitempty"` 3930 3931 // CustomAttributeFilter: Optional. 3932 // 3933 // This filter specifies a structured syntax to match against 3934 // the 3935 // Job.custom_attributes marked as `filterable`. 3936 // 3937 // The syntax for this expression is a subset of Google SQL 3938 // syntax. 3939 // 3940 // Supported operators are: =, !=, <, <=, >, >= where the left of the 3941 // operator 3942 // is a custom field key and the right of the operator is a number or 3943 // string 3944 // (surrounded by quotes) value. 3945 // 3946 // Supported functions are LOWER(<field_name>) to 3947 // perform case insensitive match and EMPTY(<field_name>) to filter on 3948 // the 3949 // existence of a key. 3950 // 3951 // Boolean expressions (AND/OR/NOT) are supported up to 3 levels 3952 // of 3953 // nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum 3954 // of 50 3955 // comparisons/functions are allowed in the expression. The 3956 // expression 3957 // must be < 2000 characters in length. 3958 // 3959 // Sample Query: 3960 // (key1 = "TEST" OR LOWER(key1)="test" OR NOT EMPTY(key1)) AND key2 > 3961 // 100 3962 CustomAttributeFilter string `json:"customAttributeFilter,omitempty"` 3963 3964 // DisableSpellCheck: Optional. 3965 // 3966 // This flag controls the spell-check feature. If false, the 3967 // service attempts to correct a misspelled query, 3968 // for example, "enginee" is corrected to "engineer". 3969 // 3970 // Defaults to false: a spell check is performed. 3971 DisableSpellCheck bool `json:"disableSpellCheck,omitempty"` 3972 3973 // EmploymentTypes: Optional. 3974 // 3975 // The employment type filter specifies the employment type of jobs 3976 // to 3977 // search against, such as EmploymentType.FULL_TIME. 3978 // 3979 // If a value is not specified, jobs in the search results include 3980 // any 3981 // employment type. 3982 // 3983 // If multiple values are specified, jobs in the search results 3984 // include 3985 // any of the specified employment types. 3986 // 3987 // Possible values: 3988 // "EMPLOYMENT_TYPE_UNSPECIFIED" - The default value if the employment 3989 // type is not specified. 3990 // "FULL_TIME" - The job requires working a number of hours that 3991 // constitute full 3992 // time employment, typically 40 or more hours per week. 3993 // "PART_TIME" - The job entails working fewer hours than a full time 3994 // job, 3995 // typically less than 40 hours a week. 3996 // "CONTRACTOR" - The job is offered as a contracted, as opposed to a 3997 // salaried employee, 3998 // position. 3999 // "TEMPORARY" - The job is offered as a temporary employment 4000 // opportunity, usually 4001 // a short-term engagement. 4002 // "INTERN" - The job is a fixed-term opportunity for students or 4003 // entry-level job seekers 4004 // to obtain on-the-job training, typically offered as a summer 4005 // position. 4006 // "VOLUNTEER" - The is an opportunity for an individual to volunteer, 4007 // where there is no 4008 // expectation of compensation for the provided services. 4009 // "PER_DIEM" - The job requires an employee to work on an as-needed 4010 // basis with a 4011 // flexible schedule. 4012 // "CONTRACT_TO_HIRE" - The job is offered as a contracted position 4013 // with the understanding 4014 // that it is converted into a full-time position at the end of 4015 // the 4016 // contract. Jobs of this type are also returned by a search 4017 // for 4018 // EmploymentType.CONTRACTOR jobs. 4019 // "FLY_IN_FLY_OUT" - The job involves employing people in remote 4020 // areas and flying them 4021 // temporarily to the work site instead of relocating employees and 4022 // their 4023 // families permanently. 4024 // "OTHER" - The job does not fit any of the other listed types. 4025 EmploymentTypes []string `json:"employmentTypes,omitempty"` 4026 4027 // LanguageCodes: Optional. 4028 // 4029 // This filter specifies the locale of jobs to search against, 4030 // for example, "en-US". 4031 // 4032 // If a value isn't specified, the search results can contain jobs in 4033 // any 4034 // locale. 4035 // 4036 // 4037 // Language codes should be in BCP-47 format, such as "en-US" or 4038 // "sr-Latn". 4039 // For more information, see 4040 // [Tags for Identifying 4041 // Languages](https://tools.ietf.org/html/bcp47). 4042 // 4043 // At most 10 language code filters are allowed. 4044 LanguageCodes []string `json:"languageCodes,omitempty"` 4045 4046 // LocationFilters: Optional. 4047 // 4048 // The location filter specifies geo-regions containing the jobs 4049 // to 4050 // search against. See LocationFilter for more information. 4051 // 4052 // If a location value isn't specified, jobs fitting the other 4053 // search 4054 // criteria are retrieved regardless of where they're located. 4055 // 4056 // If multiple values are specified, jobs are retrieved from any of 4057 // the 4058 // specified locations. If different values are specified for 4059 // the 4060 // LocationFilter.distance_in_miles parameter, the maximum 4061 // provided 4062 // distance is used for all locations. 4063 // 4064 // At most 5 location filters are allowed. 4065 LocationFilters []*LocationFilter `json:"locationFilters,omitempty"` 4066 4067 // PublishDateRange: Optional. 4068 // 4069 // Jobs published within a range specified by this filter are 4070 // searched 4071 // against, for example, DateRange.PAST_MONTH. If a value 4072 // isn't 4073 // specified, all open jobs are searched against regardless of 4074 // their 4075 // published date. 4076 // 4077 // Possible values: 4078 // "DATE_RANGE_UNSPECIFIED" - Default value: Filtering on time is not 4079 // performed. 4080 // "PAST_24_HOURS" - The past 24 hours 4081 // "PAST_WEEK" - The past week (7 days) 4082 // "PAST_MONTH" - The past month (30 days) 4083 // "PAST_YEAR" - The past year (365 days) 4084 // "PAST_3_DAYS" - The past 3 days 4085 PublishDateRange string `json:"publishDateRange,omitempty"` 4086 4087 // Query: Optional. 4088 // 4089 // The query string that matches against the job title, description, 4090 // and 4091 // location fields. 4092 // 4093 // The maximum query size is 255 bytes. 4094 Query string `json:"query,omitempty"` 4095 4096 // ForceSendFields is a list of field names (e.g. "Categories") to 4097 // unconditionally include in API requests. By default, fields with 4098 // empty values are omitted from API requests. However, any non-pointer, 4099 // non-interface field appearing in ForceSendFields will be sent to the 4100 // server regardless of whether the field is empty or not. This may be 4101 // used to include empty fields in Patch requests. 4102 ForceSendFields []string `json:"-"` 4103 4104 // NullFields is a list of field names (e.g. "Categories") to include in 4105 // API requests with the JSON null value. By default, fields with empty 4106 // values are omitted from API requests. However, any field with an 4107 // empty value appearing in NullFields will be sent to the server as 4108 // null. It is an error if a field in this list has a non-empty value. 4109 // This may be used to include null fields in Patch requests. 4110 NullFields []string `json:"-"` 4111} 4112 4113func (s *JobQuery) MarshalJSON() ([]byte, error) { 4114 type NoMethod JobQuery 4115 raw := NoMethod(*s) 4116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4117} 4118 4119// LatLng: An object representing a latitude/longitude pair. This is 4120// expressed as a pair 4121// of doubles representing degrees latitude and degrees longitude. 4122// Unless 4123// specified otherwise, this must conform to the 4124// <a 4125// href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 4126// st 4127// andard</a>. Values must be within normalized ranges. 4128type LatLng struct { 4129 // Latitude: The latitude in degrees. It must be in the range [-90.0, 4130 // +90.0]. 4131 Latitude float64 `json:"latitude,omitempty"` 4132 4133 // Longitude: The longitude in degrees. It must be in the range [-180.0, 4134 // +180.0]. 4135 Longitude float64 `json:"longitude,omitempty"` 4136 4137 // ForceSendFields is a list of field names (e.g. "Latitude") to 4138 // unconditionally include in API requests. By default, fields with 4139 // empty values are omitted from API requests. However, any non-pointer, 4140 // non-interface field appearing in ForceSendFields will be sent to the 4141 // server regardless of whether the field is empty or not. This may be 4142 // used to include empty fields in Patch requests. 4143 ForceSendFields []string `json:"-"` 4144 4145 // NullFields is a list of field names (e.g. "Latitude") to include in 4146 // API requests with the JSON null value. By default, fields with empty 4147 // values are omitted from API requests. However, any field with an 4148 // empty value appearing in NullFields will be sent to the server as 4149 // null. It is an error if a field in this list has a non-empty value. 4150 // This may be used to include null fields in Patch requests. 4151 NullFields []string `json:"-"` 4152} 4153 4154func (s *LatLng) MarshalJSON() ([]byte, error) { 4155 type NoMethod LatLng 4156 raw := NoMethod(*s) 4157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4158} 4159 4160func (s *LatLng) UnmarshalJSON(data []byte) error { 4161 type NoMethod LatLng 4162 var s1 struct { 4163 Latitude gensupport.JSONFloat64 `json:"latitude"` 4164 Longitude gensupport.JSONFloat64 `json:"longitude"` 4165 *NoMethod 4166 } 4167 s1.NoMethod = (*NoMethod)(s) 4168 if err := json.Unmarshal(data, &s1); err != nil { 4169 return err 4170 } 4171 s.Latitude = float64(s1.Latitude) 4172 s.Longitude = float64(s1.Longitude) 4173 return nil 4174} 4175 4176// ListCompaniesResponse: Output only. 4177// 4178// The List companies response object. 4179type ListCompaniesResponse struct { 4180 // Companies: Companies for the current client. 4181 Companies []*Company `json:"companies,omitempty"` 4182 4183 // Metadata: Additional information for the API invocation, such as the 4184 // request 4185 // tracking id. 4186 Metadata *ResponseMetadata `json:"metadata,omitempty"` 4187 4188 // NextPageToken: A token to retrieve the next page of results. 4189 NextPageToken string `json:"nextPageToken,omitempty"` 4190 4191 // ServerResponse contains the HTTP response code and headers from the 4192 // server. 4193 googleapi.ServerResponse `json:"-"` 4194 4195 // ForceSendFields is a list of field names (e.g. "Companies") to 4196 // unconditionally include in API requests. By default, fields with 4197 // empty values are omitted from API requests. However, any non-pointer, 4198 // non-interface field appearing in ForceSendFields will be sent to the 4199 // server regardless of whether the field is empty or not. This may be 4200 // used to include empty fields in Patch requests. 4201 ForceSendFields []string `json:"-"` 4202 4203 // NullFields is a list of field names (e.g. "Companies") to include in 4204 // API requests with the JSON null value. By default, fields with empty 4205 // values are omitted from API requests. However, any field with an 4206 // empty value appearing in NullFields will be sent to the server as 4207 // null. It is an error if a field in this list has a non-empty value. 4208 // This may be used to include null fields in Patch requests. 4209 NullFields []string `json:"-"` 4210} 4211 4212func (s *ListCompaniesResponse) MarshalJSON() ([]byte, error) { 4213 type NoMethod ListCompaniesResponse 4214 raw := NoMethod(*s) 4215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4216} 4217 4218// ListCompanyJobsResponse: Deprecated. Use ListJobsResponse 4219// instead. 4220// 4221// Output only. 4222// 4223// The List jobs response object. 4224type ListCompanyJobsResponse struct { 4225 // Jobs: The Jobs for a given company. 4226 // 4227 // The maximum number of items returned is based on the limit 4228 // field 4229 // provided in the request. 4230 Jobs []*Job `json:"jobs,omitempty"` 4231 4232 // Metadata: Additional information for the API invocation, such as the 4233 // request 4234 // tracking id. 4235 Metadata *ResponseMetadata `json:"metadata,omitempty"` 4236 4237 // NextPageToken: A token to retrieve the next page of results. 4238 NextPageToken string `json:"nextPageToken,omitempty"` 4239 4240 // TotalSize: The total number of open jobs. The result will be 4241 // empty if ListCompanyJobsRequest.include_jobs_count is not enabled 4242 // or if no open jobs are available. 4243 TotalSize int64 `json:"totalSize,omitempty,string"` 4244 4245 // ServerResponse contains the HTTP response code and headers from the 4246 // server. 4247 googleapi.ServerResponse `json:"-"` 4248 4249 // ForceSendFields is a list of field names (e.g. "Jobs") to 4250 // unconditionally include in API requests. By default, fields with 4251 // empty values are omitted from API requests. However, any non-pointer, 4252 // non-interface field appearing in ForceSendFields will be sent to the 4253 // server regardless of whether the field is empty or not. This may be 4254 // used to include empty fields in Patch requests. 4255 ForceSendFields []string `json:"-"` 4256 4257 // NullFields is a list of field names (e.g. "Jobs") to include in API 4258 // requests with the JSON null value. By default, fields with empty 4259 // values are omitted from API requests. However, any field with an 4260 // empty value appearing in NullFields will be sent to the server as 4261 // null. It is an error if a field in this list has a non-empty value. 4262 // This may be used to include null fields in Patch requests. 4263 NullFields []string `json:"-"` 4264} 4265 4266func (s *ListCompanyJobsResponse) MarshalJSON() ([]byte, error) { 4267 type NoMethod ListCompanyJobsResponse 4268 raw := NoMethod(*s) 4269 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4270} 4271 4272// ListJobsResponse: Output only. 4273// 4274// List jobs response. 4275type ListJobsResponse struct { 4276 // Jobs: The Jobs for a given company. 4277 // 4278 // The maximum number of items returned is based on the limit 4279 // field 4280 // provided in the request. 4281 Jobs []*Job `json:"jobs,omitempty"` 4282 4283 // Metadata: Additional information for the API invocation, such as the 4284 // request 4285 // tracking id. 4286 Metadata *ResponseMetadata `json:"metadata,omitempty"` 4287 4288 // NextPageToken: A token to retrieve the next page of results. 4289 NextPageToken string `json:"nextPageToken,omitempty"` 4290 4291 // ServerResponse contains the HTTP response code and headers from the 4292 // server. 4293 googleapi.ServerResponse `json:"-"` 4294 4295 // ForceSendFields is a list of field names (e.g. "Jobs") to 4296 // unconditionally include in API requests. By default, fields with 4297 // empty values are omitted from API requests. However, any non-pointer, 4298 // non-interface field appearing in ForceSendFields will be sent to the 4299 // server regardless of whether the field is empty or not. This may be 4300 // used to include empty fields in Patch requests. 4301 ForceSendFields []string `json:"-"` 4302 4303 // NullFields is a list of field names (e.g. "Jobs") to include in API 4304 // requests with the JSON null value. By default, fields with empty 4305 // values are omitted from API requests. However, any field with an 4306 // empty value appearing in NullFields will be sent to the server as 4307 // null. It is an error if a field in this list has a non-empty value. 4308 // This may be used to include null fields in Patch requests. 4309 NullFields []string `json:"-"` 4310} 4311 4312func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { 4313 type NoMethod ListJobsResponse 4314 raw := NoMethod(*s) 4315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4316} 4317 4318// LocationFilter: Input only. 4319// 4320// Geographic region of the search. 4321type LocationFilter struct { 4322 // DistanceInMiles: Optional. 4323 // 4324 // 4325 // The distance_in_miles is applied when the location being searched for 4326 // is 4327 // identified as a city or smaller. When the location being searched for 4328 // is a 4329 // state or larger, this field is ignored. 4330 DistanceInMiles float64 `json:"distanceInMiles,omitempty"` 4331 4332 // IsTelecommute: Optional. 4333 // 4334 // Allows the client to return jobs without a 4335 // set location, specifically, telecommuting jobs (telecomuting is 4336 // considered 4337 // by the service as a special location. 4338 // Job.allow_telecommute indicates if a job permits telecommuting. 4339 // If this field is true, telecommuting jobs are searched, and 4340 // name and lat_lng are 4341 // ignored. 4342 // This filter can be used by itself to search exclusively for 4343 // telecommuting 4344 // jobs, or it can be combined with another location 4345 // filter to search for a combination of job locations, 4346 // such as "Mountain View" or "telecommuting" jobs. However, when used 4347 // in 4348 // combination with other location filters, telecommuting jobs can 4349 // be 4350 // treated as less relevant than other jobs in the search response. 4351 IsTelecommute bool `json:"isTelecommute,omitempty"` 4352 4353 // LatLng: Optional. 4354 // 4355 // The latitude and longitude of the geographic center from which 4356 // to 4357 // search. This field is ignored if `location_name` is provided. 4358 LatLng *LatLng `json:"latLng,omitempty"` 4359 4360 // Name: Optional. 4361 // 4362 // The address name, such as "Mountain View" or "Bay Area". 4363 Name string `json:"name,omitempty"` 4364 4365 // RegionCode: Optional. 4366 // 4367 // CLDR region code of the country/region of the address. This will be 4368 // used 4369 // to address ambiguity of the user-input location, e.g. 4370 // "Liverpool" 4371 // against "Liverpool, NY, US" or "Liverpool, UK". 4372 // 4373 // Set this field if all the jobs to search against are from a same 4374 // region, 4375 // or jobs are world-wide but the job seeker is from a specific 4376 // region. 4377 // 4378 // See http://cldr.unicode.org/ 4379 // and 4380 // http://www.unicode.org/cldr/charts/30/supplemental/territory_infor 4381 // mation.html 4382 // for details. Example: "CH" for Switzerland. 4383 RegionCode string `json:"regionCode,omitempty"` 4384 4385 // ForceSendFields is a list of field names (e.g. "DistanceInMiles") to 4386 // unconditionally include in API requests. By default, fields with 4387 // empty values are omitted from API requests. However, any non-pointer, 4388 // non-interface field appearing in ForceSendFields will be sent to the 4389 // server regardless of whether the field is empty or not. This may be 4390 // used to include empty fields in Patch requests. 4391 ForceSendFields []string `json:"-"` 4392 4393 // NullFields is a list of field names (e.g. "DistanceInMiles") to 4394 // include in API requests with the JSON null value. By default, fields 4395 // with empty values are omitted from API requests. However, any field 4396 // with an empty value appearing in NullFields will be sent to the 4397 // server as null. It is an error if a field in this list has a 4398 // non-empty value. This may be used to include null fields in Patch 4399 // requests. 4400 NullFields []string `json:"-"` 4401} 4402 4403func (s *LocationFilter) MarshalJSON() ([]byte, error) { 4404 type NoMethod LocationFilter 4405 raw := NoMethod(*s) 4406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4407} 4408 4409func (s *LocationFilter) UnmarshalJSON(data []byte) error { 4410 type NoMethod LocationFilter 4411 var s1 struct { 4412 DistanceInMiles gensupport.JSONFloat64 `json:"distanceInMiles"` 4413 *NoMethod 4414 } 4415 s1.NoMethod = (*NoMethod)(s) 4416 if err := json.Unmarshal(data, &s1); err != nil { 4417 return err 4418 } 4419 s.DistanceInMiles = float64(s1.DistanceInMiles) 4420 return nil 4421} 4422 4423// MatchingJob: Output only. 4424// 4425// Job entry with metadata inside SearchJobsResponse. 4426type MatchingJob struct { 4427 // CommuteInfo: Commute information which is generated based on 4428 // specified 4429 // CommutePreference. 4430 CommuteInfo *CommuteInfo `json:"commuteInfo,omitempty"` 4431 4432 // Job: Job resource that matches the specified SearchJobsRequest. 4433 Job *Job `json:"job,omitempty"` 4434 4435 // JobSummary: A summary of the job with core information that's 4436 // displayed on the search 4437 // results listing page. 4438 JobSummary string `json:"jobSummary,omitempty"` 4439 4440 // JobTitleSnippet: Contains snippets of text from the Job.job_title 4441 // field most 4442 // closely matching a search query's keywords, if available. The 4443 // matching 4444 // query keywords are enclosed in HTML bold tags. 4445 JobTitleSnippet string `json:"jobTitleSnippet,omitempty"` 4446 4447 // SearchTextSnippet: Contains snippets of text from the Job.description 4448 // and similar 4449 // fields that most closely match a search query's keywords, if 4450 // available. 4451 // All HTML tags in the original fields are stripped when returned in 4452 // this 4453 // field, and matching query keywords are enclosed in HTML bold tags. 4454 SearchTextSnippet string `json:"searchTextSnippet,omitempty"` 4455 4456 // ForceSendFields is a list of field names (e.g. "CommuteInfo") to 4457 // unconditionally include in API requests. By default, fields with 4458 // empty values are omitted from API requests. However, any non-pointer, 4459 // non-interface field appearing in ForceSendFields will be sent to the 4460 // server regardless of whether the field is empty or not. This may be 4461 // used to include empty fields in Patch requests. 4462 ForceSendFields []string `json:"-"` 4463 4464 // NullFields is a list of field names (e.g. "CommuteInfo") to include 4465 // in API requests with the JSON null value. By default, fields with 4466 // empty values are omitted from API requests. However, any field with 4467 // an empty value appearing in NullFields will be sent to the server as 4468 // null. It is an error if a field in this list has a non-empty value. 4469 // This may be used to include null fields in Patch requests. 4470 NullFields []string `json:"-"` 4471} 4472 4473func (s *MatchingJob) MarshalJSON() ([]byte, error) { 4474 type NoMethod MatchingJob 4475 raw := NoMethod(*s) 4476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4477} 4478 4479// Money: Represents an amount of money with its currency type. 4480type Money struct { 4481 // CurrencyCode: The 3-letter currency code defined in ISO 4217. 4482 CurrencyCode string `json:"currencyCode,omitempty"` 4483 4484 // Nanos: Number of nano (10^-9) units of the amount. 4485 // The value must be between -999,999,999 and +999,999,999 inclusive. 4486 // If `units` is positive, `nanos` must be positive or zero. 4487 // If `units` is zero, `nanos` can be positive, zero, or negative. 4488 // If `units` is negative, `nanos` must be negative or zero. 4489 // For example $-1.75 is represented as `units`=-1 and 4490 // `nanos`=-750,000,000. 4491 Nanos int64 `json:"nanos,omitempty"` 4492 4493 // Units: The whole units of the amount. 4494 // For example if `currencyCode` is "USD", then 1 unit is one US 4495 // dollar. 4496 Units int64 `json:"units,omitempty,string"` 4497 4498 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 4499 // unconditionally include in API requests. By default, fields with 4500 // empty values are omitted from API requests. However, any non-pointer, 4501 // non-interface field appearing in ForceSendFields will be sent to the 4502 // server regardless of whether the field is empty or not. This may be 4503 // used to include empty fields in Patch requests. 4504 ForceSendFields []string `json:"-"` 4505 4506 // NullFields is a list of field names (e.g. "CurrencyCode") to include 4507 // in API requests with the JSON null value. By default, fields with 4508 // empty values are omitted from API requests. However, any field with 4509 // an empty value appearing in NullFields will be sent to the server as 4510 // null. It is an error if a field in this list has a non-empty value. 4511 // This may be used to include null fields in Patch requests. 4512 NullFields []string `json:"-"` 4513} 4514 4515func (s *Money) MarshalJSON() ([]byte, error) { 4516 type NoMethod Money 4517 raw := NoMethod(*s) 4518 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4519} 4520 4521// NumericBucketingOption: Input only. 4522// 4523// Use this field to specify bucketing option for the histogram search 4524// response. 4525type NumericBucketingOption struct { 4526 // BucketBounds: Required. 4527 // 4528 // Two adjacent values form a histogram bucket. Values should be 4529 // in 4530 // ascending order. For example, if [5, 10, 15] are provided, four 4531 // buckets are 4532 // created: (-inf, 5), 5, 10), [10, 15), [15, inf). At most 4533 // 20 4534 // [buckets_bound is supported. 4535 BucketBounds []float64 `json:"bucketBounds,omitempty"` 4536 4537 // RequiresMinMax: Optional. 4538 // 4539 // If set to true, the histogram result includes minimum/maximum 4540 // value of the numeric field. 4541 RequiresMinMax bool `json:"requiresMinMax,omitempty"` 4542 4543 // ForceSendFields is a list of field names (e.g. "BucketBounds") to 4544 // unconditionally include in API requests. By default, fields with 4545 // empty values are omitted from API requests. However, any non-pointer, 4546 // non-interface field appearing in ForceSendFields will be sent to the 4547 // server regardless of whether the field is empty or not. This may be 4548 // used to include empty fields in Patch requests. 4549 ForceSendFields []string `json:"-"` 4550 4551 // NullFields is a list of field names (e.g. "BucketBounds") to include 4552 // in API requests with the JSON null value. By default, fields with 4553 // empty values are omitted from API requests. However, any field with 4554 // an empty value appearing in NullFields will be sent to the server as 4555 // null. It is an error if a field in this list has a non-empty value. 4556 // This may be used to include null fields in Patch requests. 4557 NullFields []string `json:"-"` 4558} 4559 4560func (s *NumericBucketingOption) MarshalJSON() ([]byte, error) { 4561 type NoMethod NumericBucketingOption 4562 raw := NoMethod(*s) 4563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4564} 4565 4566// NumericBucketingResult: Output only. 4567// 4568// Custom numeric bucketing result. 4569type NumericBucketingResult struct { 4570 // Counts: Count within each bucket. Its size is the length 4571 // of 4572 // NumericBucketingOption.bucket_bounds plus 1. 4573 Counts []*BucketizedCount `json:"counts,omitempty"` 4574 4575 // MaxValue: Stores the maximum value of the numeric field. Will be 4576 // populated only if 4577 // [NumericBucketingOption.requires_min_max] is set to true. 4578 MaxValue float64 `json:"maxValue,omitempty"` 4579 4580 // MinValue: Stores the minimum value of the numeric field. Will be 4581 // populated only if 4582 // [NumericBucketingOption.requires_min_max] is set to true. 4583 MinValue float64 `json:"minValue,omitempty"` 4584 4585 // ForceSendFields is a list of field names (e.g. "Counts") to 4586 // unconditionally include in API requests. By default, fields with 4587 // empty values are omitted from API requests. However, any non-pointer, 4588 // non-interface field appearing in ForceSendFields will be sent to the 4589 // server regardless of whether the field is empty or not. This may be 4590 // used to include empty fields in Patch requests. 4591 ForceSendFields []string `json:"-"` 4592 4593 // NullFields is a list of field names (e.g. "Counts") to include in API 4594 // requests with the JSON null value. By default, fields with empty 4595 // values are omitted from API requests. However, any field with an 4596 // empty value appearing in NullFields will be sent to the server as 4597 // null. It is an error if a field in this list has a non-empty value. 4598 // This may be used to include null fields in Patch requests. 4599 NullFields []string `json:"-"` 4600} 4601 4602func (s *NumericBucketingResult) MarshalJSON() ([]byte, error) { 4603 type NoMethod NumericBucketingResult 4604 raw := NoMethod(*s) 4605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4606} 4607 4608func (s *NumericBucketingResult) UnmarshalJSON(data []byte) error { 4609 type NoMethod NumericBucketingResult 4610 var s1 struct { 4611 MaxValue gensupport.JSONFloat64 `json:"maxValue"` 4612 MinValue gensupport.JSONFloat64 `json:"minValue"` 4613 *NoMethod 4614 } 4615 s1.NoMethod = (*NoMethod)(s) 4616 if err := json.Unmarshal(data, &s1); err != nil { 4617 return err 4618 } 4619 s.MaxValue = float64(s1.MaxValue) 4620 s.MinValue = float64(s1.MinValue) 4621 return nil 4622} 4623 4624// PostalAddress: Represents a postal address, e.g. for postal delivery 4625// or payments addresses. 4626// Given a postal address, a postal service can deliver items to a 4627// premise, P.O. 4628// Box or similar. 4629// It is not intended to model geographical locations (roads, 4630// towns, 4631// mountains). 4632// 4633// In typical usage an address would be created via user input or from 4634// importing 4635// existing data, depending on the type of process. 4636// 4637// Advice on address input / editing: 4638// - Use an i18n-ready address widget such as 4639// https://github.com/googlei18n/libaddressinput) 4640// - Users should not be presented with UI elements for input or editing 4641// of 4642// fields outside countries where that field is used. 4643// 4644// For more guidance on how to use this schema, please 4645// see: 4646// https://support.google.com/business/answer/6397478 4647type PostalAddress struct { 4648 // AddressLines: Unstructured address lines describing the lower levels 4649 // of an address. 4650 // 4651 // Because values in address_lines do not have type information and 4652 // may 4653 // sometimes contain multiple values in a single field (e.g. 4654 // "Austin, TX"), it is important that the line order is clear. The 4655 // order of 4656 // address lines should be "envelope order" for the country/region of 4657 // the 4658 // address. In places where this can vary (e.g. Japan), address_language 4659 // is 4660 // used to make it explicit (e.g. "ja" for large-to-small ordering 4661 // and 4662 // "ja-Latn" or "en" for small-to-large). This way, the most specific 4663 // line of 4664 // an address can be selected based on the language. 4665 // 4666 // The minimum permitted structural representation of an address 4667 // consists 4668 // of a region_code with all remaining information placed in 4669 // the 4670 // address_lines. It would be possible to format such an address 4671 // very 4672 // approximately without geocoding, but no semantic reasoning could 4673 // be 4674 // made about any of the address components until it was at 4675 // least 4676 // partially resolved. 4677 // 4678 // Creating an address only containing a region_code and address_lines, 4679 // and 4680 // then geocoding is the recommended way to handle completely 4681 // unstructured 4682 // addresses (as opposed to guessing which parts of the address should 4683 // be 4684 // localities or administrative areas). 4685 AddressLines []string `json:"addressLines,omitempty"` 4686 4687 // AdministrativeArea: Optional. Highest administrative subdivision 4688 // which is used for postal 4689 // addresses of a country or region. 4690 // For example, this can be a state, a province, an oblast, or a 4691 // prefecture. 4692 // Specifically, for Spain this is the province and not the 4693 // autonomous 4694 // community (e.g. "Barcelona" and not "Catalonia"). 4695 // Many countries don't use an administrative area in postal addresses. 4696 // E.g. 4697 // in Switzerland this should be left unpopulated. 4698 AdministrativeArea string `json:"administrativeArea,omitempty"` 4699 4700 // LanguageCode: Optional. BCP-47 language code of the contents of this 4701 // address (if 4702 // known). This is often the UI language of the input form or is 4703 // expected 4704 // to match one of the languages used in the address' country/region, or 4705 // their 4706 // transliterated equivalents. 4707 // This can affect formatting in certain countries, but is not 4708 // critical 4709 // to the correctness of the data and will never affect any validation 4710 // or 4711 // other non-formatting related operations. 4712 // 4713 // If this value is not known, it should be omitted (rather than 4714 // specifying a 4715 // possibly incorrect default). 4716 // 4717 // Examples: "zh-Hant", "ja", "ja-Latn", "en". 4718 LanguageCode string `json:"languageCode,omitempty"` 4719 4720 // Locality: Optional. Generally refers to the city/town portion of the 4721 // address. 4722 // Examples: US city, IT comune, UK post town. 4723 // In regions of the world where localities are not well defined or do 4724 // not fit 4725 // into this structure well, leave locality empty and use address_lines. 4726 Locality string `json:"locality,omitempty"` 4727 4728 // Organization: Optional. The name of the organization at the address. 4729 Organization string `json:"organization,omitempty"` 4730 4731 // PostalCode: Optional. Postal code of the address. Not all countries 4732 // use or require 4733 // postal codes to be present, but where they are used, they may 4734 // trigger 4735 // additional validation with other parts of the address (e.g. 4736 // state/zip 4737 // validation in the U.S.A.). 4738 PostalCode string `json:"postalCode,omitempty"` 4739 4740 // Recipients: Optional. The recipient at the address. 4741 // This field may, under certain circumstances, contain multiline 4742 // information. 4743 // For example, it might contain "care of" information. 4744 Recipients []string `json:"recipients,omitempty"` 4745 4746 // RegionCode: Required. CLDR region code of the country/region of the 4747 // address. This 4748 // is never inferred and it is up to the user to ensure the value 4749 // is 4750 // correct. See http://cldr.unicode.org/ 4751 // and 4752 // http://www.unicode.org/cldr/charts/30/supplemental/territory_infor 4753 // mation.html 4754 // for details. Example: "CH" for Switzerland. 4755 RegionCode string `json:"regionCode,omitempty"` 4756 4757 // Revision: The schema revision of the `PostalAddress`. This must be 4758 // set to 0, which is 4759 // the latest revision. 4760 // 4761 // All new revisions **must** be backward compatible with old revisions. 4762 Revision int64 `json:"revision,omitempty"` 4763 4764 // SortingCode: Optional. Additional, country-specific, sorting code. 4765 // This is not used 4766 // in most regions. Where it is used, the value is either a string 4767 // like 4768 // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a 4769 // number 4770 // alone, representing the "sector code" (Jamaica), "delivery area 4771 // indicator" 4772 // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). 4773 SortingCode string `json:"sortingCode,omitempty"` 4774 4775 // Sublocality: Optional. Sublocality of the address. 4776 // For example, this can be neighborhoods, boroughs, districts. 4777 Sublocality string `json:"sublocality,omitempty"` 4778 4779 // ForceSendFields is a list of field names (e.g. "AddressLines") to 4780 // unconditionally include in API requests. By default, fields with 4781 // empty values are omitted from API requests. However, any non-pointer, 4782 // non-interface field appearing in ForceSendFields will be sent to the 4783 // server regardless of whether the field is empty or not. This may be 4784 // used to include empty fields in Patch requests. 4785 ForceSendFields []string `json:"-"` 4786 4787 // NullFields is a list of field names (e.g. "AddressLines") to include 4788 // in API requests with the JSON null value. By default, fields with 4789 // empty values are omitted from API requests. However, any field with 4790 // an empty value appearing in NullFields will be sent to the server as 4791 // null. It is an error if a field in this list has a non-empty value. 4792 // This may be used to include null fields in Patch requests. 4793 NullFields []string `json:"-"` 4794} 4795 4796func (s *PostalAddress) MarshalJSON() ([]byte, error) { 4797 type NoMethod PostalAddress 4798 raw := NoMethod(*s) 4799 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4800} 4801 4802// RequestMetadata: Input only. 4803// 4804// Meta information related to the job searcher or entity 4805// conducting the job search. This information is used to improve 4806// the 4807// performance of the service. 4808type RequestMetadata struct { 4809 // DeviceInfo: Optional. 4810 // 4811 // The type of device used by the job seeker at the time of the call to 4812 // the 4813 // service. 4814 DeviceInfo *DeviceInfo `json:"deviceInfo,omitempty"` 4815 4816 // Domain: Required. 4817 // 4818 // The client-defined scope or source of the service call, which 4819 // typically 4820 // is the domain on 4821 // which the service has been implemented and is currently being 4822 // run. 4823 // 4824 // For example, if the service is being run by client <em>Foo, 4825 // Inc.</em>, on 4826 // job board www.foo.com and career site www.bar.com, then this field 4827 // is 4828 // set to "foo.com" for use on the job board, and "bar.com" for use on 4829 // the 4830 // career site. 4831 // 4832 // If this field is not available for some reason, send "UNKNOWN". Note 4833 // that 4834 // any improvements to the service model for a particular tenant site 4835 // rely on 4836 // this field being set correctly to some domain. 4837 Domain string `json:"domain,omitempty"` 4838 4839 // SessionId: Required. 4840 // 4841 // A unique session identification string. A session is defined as 4842 // the 4843 // duration of an end user's interaction with the service over a 4844 // period. 4845 // Obfuscate this field for privacy concerns before 4846 // providing it to the API. 4847 // 4848 // If this field is not available for some reason, please send 4849 // "UNKNOWN". Note 4850 // that any improvements to the service model for a particular tenant 4851 // site, 4852 // rely on this field being set correctly to some unique session_id. 4853 SessionId string `json:"sessionId,omitempty"` 4854 4855 // UserId: Required. 4856 // 4857 // A unique user identification string, as determined by the client. 4858 // The 4859 // client is responsible for ensuring client-level uniqueness of this 4860 // value 4861 // in order to have the strongest positive impact on search 4862 // quality. 4863 // Obfuscate this field for privacy concerns before 4864 // providing it to the service. 4865 // 4866 // If this field is not available for some reason, please send 4867 // "UNKNOWN". Note 4868 // that any improvements to the service model for a particular tenant 4869 // site, 4870 // rely on this field being set correctly to some unique user_id. 4871 UserId string `json:"userId,omitempty"` 4872 4873 // ForceSendFields is a list of field names (e.g. "DeviceInfo") to 4874 // unconditionally include in API requests. By default, fields with 4875 // empty values are omitted from API requests. However, any non-pointer, 4876 // non-interface field appearing in ForceSendFields will be sent to the 4877 // server regardless of whether the field is empty or not. This may be 4878 // used to include empty fields in Patch requests. 4879 ForceSendFields []string `json:"-"` 4880 4881 // NullFields is a list of field names (e.g. "DeviceInfo") to include in 4882 // API requests with the JSON null value. By default, fields with empty 4883 // values are omitted from API requests. However, any field with an 4884 // empty value appearing in NullFields will be sent to the server as 4885 // null. It is an error if a field in this list has a non-empty value. 4886 // This may be used to include null fields in Patch requests. 4887 NullFields []string `json:"-"` 4888} 4889 4890func (s *RequestMetadata) MarshalJSON() ([]byte, error) { 4891 type NoMethod RequestMetadata 4892 raw := NoMethod(*s) 4893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4894} 4895 4896// ResponseMetadata: Output only. 4897// 4898// Additional information returned to client, such as 4899// debugging 4900// information. 4901type ResponseMetadata struct { 4902 // ExperimentIdList: Identifiers for the versions of the search 4903 // algorithm used during 4904 // this API invocation if multiple algorithms are used. 4905 // The default value is empty. 4906 // For search response only. 4907 ExperimentIdList []int64 `json:"experimentIdList,omitempty"` 4908 4909 // Mode: For search response only. Indicates the mode of a performed 4910 // search. 4911 // 4912 // Possible values: 4913 // "SEARCH_MODE_UNSPECIFIED" - The mode of the search method isn't 4914 // specified. 4915 // "JOB_SEARCH" - The job search doesn't include support for featured 4916 // jobs. 4917 // "FEATURED_JOB_SEARCH" - The job search matches only against 4918 // featured jobs (jobs with a 4919 // promotionValue > 0). This method doesn't return any jobs having 4920 // a 4921 // promotionValue <= 0. The search results order is determined by 4922 // the 4923 // promotionValue (jobs with a higher promotionValue are returned higher 4924 // up in 4925 // the search results), with relevance being used as a tiebreaker. 4926 // "EMAIL_ALERT_SEARCH" - Deprecated. Please use the 4927 // SearchJobsForAlert API. 4928 // 4929 // The job search matches against jobs suited to email notifications. 4930 Mode string `json:"mode,omitempty"` 4931 4932 // RequestId: A unique id associated with this call. 4933 // This id is logged for tracking purposes. 4934 RequestId string `json:"requestId,omitempty"` 4935 4936 // ForceSendFields is a list of field names (e.g. "ExperimentIdList") to 4937 // unconditionally include in API requests. By default, fields with 4938 // empty values are omitted from API requests. However, any non-pointer, 4939 // non-interface field appearing in ForceSendFields will be sent to the 4940 // server regardless of whether the field is empty or not. This may be 4941 // used to include empty fields in Patch requests. 4942 ForceSendFields []string `json:"-"` 4943 4944 // NullFields is a list of field names (e.g. "ExperimentIdList") to 4945 // include in API requests with the JSON null value. By default, fields 4946 // with empty values are omitted from API requests. However, any field 4947 // with an empty value appearing in NullFields will be sent to the 4948 // server as null. It is an error if a field in this list has a 4949 // non-empty value. This may be used to include null fields in Patch 4950 // requests. 4951 NullFields []string `json:"-"` 4952} 4953 4954func (s *ResponseMetadata) MarshalJSON() ([]byte, error) { 4955 type NoMethod ResponseMetadata 4956 raw := NoMethod(*s) 4957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4958} 4959 4960// SearchJobsRequest: Input only. 4961// 4962// The Request body of the `SearchJobs` call. 4963type SearchJobsRequest struct { 4964 // DisableRelevanceThresholding: Optional. 4965 // 4966 // Controls whether to disable relevance thresholding. 4967 // Relevance 4968 // thresholding removes jobs that have low relevance in search 4969 // results, 4970 // for example, removing "Assistant to the CEO" positions from the 4971 // search 4972 // results of a search for "CEO". 4973 // 4974 // Disabling relevance thresholding improves the accuracy of 4975 // subsequent 4976 // search requests. 4977 // 4978 // Defaults to false. 4979 DisableRelevanceThresholding bool `json:"disableRelevanceThresholding,omitempty"` 4980 4981 // EnableBroadening: Optional. 4982 // 4983 // Controls whether to broaden the search when it produces sparse 4984 // results. 4985 // Broadened queries append results to the end of the matching 4986 // results 4987 // list. 4988 // 4989 // Defaults to false. 4990 EnableBroadening bool `json:"enableBroadening,omitempty"` 4991 4992 // EnablePreciseResultSize: Optional. 4993 // 4994 // Controls if the search job request requires the return of a 4995 // precise 4996 // count of the first 300 results. Setting this to `true` 4997 // ensures 4998 // consistency in the number of results per page. Best practice is to 4999 // set this 5000 // value to true if a client allows users to jump directly to 5001 // a 5002 // non-sequential search results page. 5003 // 5004 // Enabling this flag may adversely impact performance. 5005 // 5006 // Defaults to false. 5007 EnablePreciseResultSize bool `json:"enablePreciseResultSize,omitempty"` 5008 5009 // Filters: Deprecated. Use query instead. 5010 // 5011 // Optional. 5012 // 5013 // Restrictions on the scope of the search request, such as filtering 5014 // by location. 5015 Filters *JobFilters `json:"filters,omitempty"` 5016 5017 // HistogramFacets: Optional. 5018 // 5019 // Restrictions on what fields to perform histogram on, such 5020 // as 5021 // `COMPANY_SIZE` etc. 5022 HistogramFacets *HistogramFacets `json:"histogramFacets,omitempty"` 5023 5024 // JobView: Optional. 5025 // 5026 // The number of job attributes returned for jobs in the 5027 // search response. Defaults to JobView.SMALL if no value is specified. 5028 // 5029 // Possible values: 5030 // "JOB_VIEW_UNSPECIFIED" - Default value. 5031 // "SMALL" - A small view of the job, with the following attributes in 5032 // the search 5033 // results: Job.name, Job.requisition_id, 5034 // Job.job_title, 5035 // Job.company_name, Job.job_locations, 5036 // Job.description, 5037 // Job.visibility. 5038 // Note: Job.description is deprecated. It is scheduled to be 5039 // removed 5040 // from MatchingJob.Job objects in the SearchJobsResponse results 5041 // on 12/31/2018. 5042 // "MINIMAL" - A minimal view of the job, with the following 5043 // attributes in the search 5044 // results: Job.name, Job.requisition_id, 5045 // Job.job_title, 5046 // Job.company_name, Job.job_locations. 5047 // "FULL" - All available attributes are included in the search 5048 // results. 5049 // Note: [Job.description, Job.responsibilities, 5050 // Job.qualifications and Job.incentives are deprecated. 5051 // These fields are scheduled to be removed from MatchingJob.Job 5052 // objects 5053 // in the SearchJobsResponse results on 12/31/2018. 5054 // See the alternative MatchingJob.search_text_snippet 5055 // and 5056 // MatchingJob.job_summary fields. 5057 JobView string `json:"jobView,omitempty"` 5058 5059 // Mode: Required. 5060 // 5061 // Mode of a search. 5062 // 5063 // Possible values: 5064 // "SEARCH_MODE_UNSPECIFIED" - The mode of the search method isn't 5065 // specified. 5066 // "JOB_SEARCH" - The job search doesn't include support for featured 5067 // jobs. 5068 // "FEATURED_JOB_SEARCH" - The job search matches only against 5069 // featured jobs (jobs with a 5070 // promotionValue > 0). This method doesn't return any jobs having 5071 // a 5072 // promotionValue <= 0. The search results order is determined by 5073 // the 5074 // promotionValue (jobs with a higher promotionValue are returned higher 5075 // up in 5076 // the search results), with relevance being used as a tiebreaker. 5077 // "EMAIL_ALERT_SEARCH" - Deprecated. Please use the 5078 // SearchJobsForAlert API. 5079 // 5080 // The job search matches against jobs suited to email notifications. 5081 Mode string `json:"mode,omitempty"` 5082 5083 // Offset: Optional. 5084 // 5085 // An integer that specifies the current offset (that is, starting 5086 // result 5087 // location, amongst the jobs deemed by the API as relevant) in 5088 // search 5089 // results. This field is only considered if page_token is unset. 5090 // 5091 // For example, 0 means to return results starting from the first 5092 // matching 5093 // job, and 10 means to return from the 11th job. This can be used 5094 // for 5095 // pagination, (for example, pageSize = 10 and offset = 10 means to 5096 // return 5097 // from the second page). 5098 Offset int64 `json:"offset,omitempty"` 5099 5100 // OrderBy: Deprecated. Use sort_by instead. 5101 // 5102 // Optional. 5103 // 5104 // The criteria determining how search results are sorted. 5105 // Defaults to SortBy.RELEVANCE_DESC if no value is specified. 5106 // 5107 // Possible values: 5108 // "SORT_BY_UNSPECIFIED" - Default value. 5109 // "RELEVANCE_DESC" - By descending relevance, as determined by the 5110 // API algorithms. 5111 // 5112 // Relevance thresholding of query results is only available for queries 5113 // if 5114 // RELEVANCE_DESC sort ordering is specified. 5115 // "PUBLISHED_DATE_DESC" - Sort by published date descending. 5116 // "UPDATED_DATE_DESC" - Sort by updated date descending. 5117 // "TITLE" - Sort by job title ascending. 5118 // "TITLE_DESC" - Sort by job title descending. 5119 // "ANNUALIZED_BASE_COMPENSATION" - Sort by job annualized base 5120 // compensation in ascending order. 5121 // If job's annualized base compensation is unspecified, they are put 5122 // at 5123 // the end of search result. 5124 // "ANNUALIZED_TOTAL_COMPENSATION" - Sort by job annualized total 5125 // compensation in ascending order. 5126 // If job's annualized total compensation is unspecified, they are put 5127 // at 5128 // the end of search result. 5129 // "ANNUALIZED_BASE_COMPENSATION_DESC" - Sort by job annualized base 5130 // compensation in descending order. 5131 // If job's annualized base compensation is unspecified, they are put 5132 // at 5133 // the end of search result. 5134 // "ANNUALIZED_TOTAL_COMPENSATION_DESC" - Sort by job annualized total 5135 // compensation in descending order. 5136 // If job's annualized total compensation is unspecified, they are put 5137 // at 5138 // the end of search result. 5139 OrderBy string `json:"orderBy,omitempty"` 5140 5141 // PageSize: Optional. 5142 // 5143 // A limit on the number of jobs returned in the search 5144 // results. 5145 // Increasing this value above the default value of 10 can increase 5146 // search 5147 // response time. The value can be between 1 and 100. 5148 PageSize int64 `json:"pageSize,omitempty"` 5149 5150 // PageToken: Optional. 5151 // 5152 // The token specifying the current offset within 5153 // search results. See SearchJobsResponse.next_page_token for 5154 // an explanation of how to obtain the next set of query results. 5155 PageToken string `json:"pageToken,omitempty"` 5156 5157 // Query: Optional. 5158 // 5159 // Query used to search against jobs, such as keyword, location filters, 5160 // etc. 5161 Query *JobQuery `json:"query,omitempty"` 5162 5163 // RequestMetadata: Required. 5164 // 5165 // The meta information collected about the job searcher, used to 5166 // improve the 5167 // search quality of the service. The identifiers, (such as `user_id`) 5168 // are 5169 // provided by users, and must be unique and consistent. 5170 RequestMetadata *RequestMetadata `json:"requestMetadata,omitempty"` 5171 5172 // SortBy: Optional. 5173 // 5174 // The criteria determining how search results are sorted. 5175 // Defaults to SortBy.RELEVANCE_DESC if no value is specified. 5176 // 5177 // Possible values: 5178 // "SORT_BY_UNSPECIFIED" - Default value. 5179 // "RELEVANCE_DESC" - By descending relevance, as determined by the 5180 // API algorithms. 5181 // 5182 // Relevance thresholding of query results is only available for queries 5183 // if 5184 // RELEVANCE_DESC sort ordering is specified. 5185 // "PUBLISHED_DATE_DESC" - Sort by published date descending. 5186 // "UPDATED_DATE_DESC" - Sort by updated date descending. 5187 // "TITLE" - Sort by job title ascending. 5188 // "TITLE_DESC" - Sort by job title descending. 5189 // "ANNUALIZED_BASE_COMPENSATION" - Sort by job annualized base 5190 // compensation in ascending order. 5191 // If job's annualized base compensation is unspecified, they are put 5192 // at 5193 // the end of search result. 5194 // "ANNUALIZED_TOTAL_COMPENSATION" - Sort by job annualized total 5195 // compensation in ascending order. 5196 // If job's annualized total compensation is unspecified, they are put 5197 // at 5198 // the end of search result. 5199 // "ANNUALIZED_BASE_COMPENSATION_DESC" - Sort by job annualized base 5200 // compensation in descending order. 5201 // If job's annualized base compensation is unspecified, they are put 5202 // at 5203 // the end of search result. 5204 // "ANNUALIZED_TOTAL_COMPENSATION_DESC" - Sort by job annualized total 5205 // compensation in descending order. 5206 // If job's annualized total compensation is unspecified, they are put 5207 // at 5208 // the end of search result. 5209 SortBy string `json:"sortBy,omitempty"` 5210 5211 // ForceSendFields is a list of field names (e.g. 5212 // "DisableRelevanceThresholding") to unconditionally include in API 5213 // requests. By default, fields with empty values are omitted from API 5214 // requests. However, any non-pointer, non-interface field appearing in 5215 // ForceSendFields will be sent to the server regardless of whether the 5216 // field is empty or not. This may be used to include empty fields in 5217 // Patch requests. 5218 ForceSendFields []string `json:"-"` 5219 5220 // NullFields is a list of field names (e.g. 5221 // "DisableRelevanceThresholding") to include in API requests with the 5222 // JSON null value. By default, fields with empty values are omitted 5223 // from API requests. However, any field with an empty value appearing 5224 // in NullFields will be sent to the server as null. It is an error if a 5225 // field in this list has a non-empty value. This may be used to include 5226 // null fields in Patch requests. 5227 NullFields []string `json:"-"` 5228} 5229 5230func (s *SearchJobsRequest) MarshalJSON() ([]byte, error) { 5231 type NoMethod SearchJobsRequest 5232 raw := NoMethod(*s) 5233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5234} 5235 5236// SearchJobsResponse: Output only. 5237// 5238// Response for SearchJob method. 5239type SearchJobsResponse struct { 5240 // AppliedCommuteFilter: The commute filter the service applied to the 5241 // specified query. This 5242 // information is only available when query has a valid 5243 // CommutePreference. 5244 AppliedCommuteFilter *CommutePreference `json:"appliedCommuteFilter,omitempty"` 5245 5246 // AppliedJobLocationFilters: The location filters that the service 5247 // applied to the specified query. If 5248 // any filters are lat-lng based, the JobLocation.location_type 5249 // is 5250 // JobLocation.LocationType#LOCATION_TYPE_UNSPECIFIED. 5251 AppliedJobLocationFilters []*JobLocation `json:"appliedJobLocationFilters,omitempty"` 5252 5253 // EstimatedTotalSize: An estimation of the number of jobs that match 5254 // the specified query. 5255 // 5256 // This number is not guaranteed to be accurate. For accurate 5257 // results, 5258 // seenenable_precise_result_size. 5259 EstimatedTotalSize int64 `json:"estimatedTotalSize,omitempty,string"` 5260 5261 // HistogramResults: The histogram results that match 5262 // specified 5263 // SearchJobsRequest.HistogramFacets. 5264 HistogramResults *HistogramResults `json:"histogramResults,omitempty"` 5265 5266 // JobView: Corresponds to SearchJobsRequest.job_view. 5267 // 5268 // Possible values: 5269 // "JOB_VIEW_UNSPECIFIED" - Default value. 5270 // "SMALL" - A small view of the job, with the following attributes in 5271 // the search 5272 // results: Job.name, Job.requisition_id, 5273 // Job.job_title, 5274 // Job.company_name, Job.job_locations, 5275 // Job.description, 5276 // Job.visibility. 5277 // Note: Job.description is deprecated. It is scheduled to be 5278 // removed 5279 // from MatchingJob.Job objects in the SearchJobsResponse results 5280 // on 12/31/2018. 5281 // "MINIMAL" - A minimal view of the job, with the following 5282 // attributes in the search 5283 // results: Job.name, Job.requisition_id, 5284 // Job.job_title, 5285 // Job.company_name, Job.job_locations. 5286 // "FULL" - All available attributes are included in the search 5287 // results. 5288 // Note: [Job.description, Job.responsibilities, 5289 // Job.qualifications and Job.incentives are deprecated. 5290 // These fields are scheduled to be removed from MatchingJob.Job 5291 // objects 5292 // in the SearchJobsResponse results on 12/31/2018. 5293 // See the alternative MatchingJob.search_text_snippet 5294 // and 5295 // MatchingJob.job_summary fields. 5296 JobView string `json:"jobView,omitempty"` 5297 5298 // MatchingJobs: The Job entities that match the specified 5299 // SearchJobsRequest. 5300 MatchingJobs []*MatchingJob `json:"matchingJobs,omitempty"` 5301 5302 // Metadata: Additional information for the API invocation, such as the 5303 // request 5304 // tracking id. 5305 Metadata *ResponseMetadata `json:"metadata,omitempty"` 5306 5307 // NextPageToken: The token that specifies the starting position of the 5308 // next page of results. 5309 // This field is empty if there are no more results. 5310 NextPageToken string `json:"nextPageToken,omitempty"` 5311 5312 // NumJobsFromBroadenedQuery: If query broadening is enabled, we may 5313 // append additional results from the 5314 // broadened query. This number indicates how many of the jobs returned 5315 // in the 5316 // jobs field are from the broadened query. These results are always at 5317 // the 5318 // end of the jobs list. In particular, a value of 0 means all the jobs 5319 // in the 5320 // jobs list are from the original (without broadening) query. If 5321 // this 5322 // field is non-zero, subsequent requests with offset after this result 5323 // set 5324 // should contain all broadened results. 5325 NumJobsFromBroadenedQuery int64 `json:"numJobsFromBroadenedQuery,omitempty"` 5326 5327 // SpellResult: The spell checking result, and correction. 5328 SpellResult *SpellingCorrection `json:"spellResult,omitempty"` 5329 5330 // TotalSize: The precise result count, which is available only if the 5331 // client set 5332 // enable_precise_result_size to `true` or if the response 5333 // is the last page of results. Otherwise, the value will be `-1`. 5334 TotalSize int64 `json:"totalSize,omitempty,string"` 5335 5336 // ServerResponse contains the HTTP response code and headers from the 5337 // server. 5338 googleapi.ServerResponse `json:"-"` 5339 5340 // ForceSendFields is a list of field names (e.g. 5341 // "AppliedCommuteFilter") to unconditionally include in API requests. 5342 // By default, fields with empty values are omitted from API requests. 5343 // However, any non-pointer, non-interface field appearing in 5344 // ForceSendFields will be sent to the server regardless of whether the 5345 // field is empty or not. This may be used to include empty fields in 5346 // Patch requests. 5347 ForceSendFields []string `json:"-"` 5348 5349 // NullFields is a list of field names (e.g. "AppliedCommuteFilter") to 5350 // include in API requests with the JSON null value. By default, fields 5351 // with empty values are omitted from API requests. However, any field 5352 // with an empty value appearing in NullFields will be sent to the 5353 // server as null. It is an error if a field in this list has a 5354 // non-empty value. This may be used to include null fields in Patch 5355 // requests. 5356 NullFields []string `json:"-"` 5357} 5358 5359func (s *SearchJobsResponse) MarshalJSON() ([]byte, error) { 5360 type NoMethod SearchJobsResponse 5361 raw := NoMethod(*s) 5362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5363} 5364 5365// SpellingCorrection: Output only. 5366// 5367// Spell check result. 5368type SpellingCorrection struct { 5369 // Corrected: Indicates if the query was corrected by the spell checker. 5370 Corrected bool `json:"corrected,omitempty"` 5371 5372 // CorrectedText: Correction output consisting of the corrected keyword 5373 // string. 5374 CorrectedText string `json:"correctedText,omitempty"` 5375 5376 // ForceSendFields is a list of field names (e.g. "Corrected") to 5377 // unconditionally include in API requests. By default, fields with 5378 // empty values are omitted from API requests. However, any non-pointer, 5379 // non-interface field appearing in ForceSendFields will be sent to the 5380 // server regardless of whether the field is empty or not. This may be 5381 // used to include empty fields in Patch requests. 5382 ForceSendFields []string `json:"-"` 5383 5384 // NullFields is a list of field names (e.g. "Corrected") to include in 5385 // API requests with the JSON null value. By default, fields with empty 5386 // values are omitted from API requests. However, any field with an 5387 // empty value appearing in NullFields will be sent to the server as 5388 // null. It is an error if a field in this list has a non-empty value. 5389 // This may be used to include null fields in Patch requests. 5390 NullFields []string `json:"-"` 5391} 5392 5393func (s *SpellingCorrection) MarshalJSON() ([]byte, error) { 5394 type NoMethod SpellingCorrection 5395 raw := NoMethod(*s) 5396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5397} 5398 5399// StringValues: Represents array of string values. 5400type StringValues struct { 5401 // Values: Required. 5402 // 5403 // String values. 5404 Values []string `json:"values,omitempty"` 5405 5406 // ForceSendFields is a list of field names (e.g. "Values") to 5407 // unconditionally include in API requests. By default, fields with 5408 // empty values are omitted from API requests. However, any non-pointer, 5409 // non-interface field appearing in ForceSendFields will be sent to the 5410 // server regardless of whether the field is empty or not. This may be 5411 // used to include empty fields in Patch requests. 5412 ForceSendFields []string `json:"-"` 5413 5414 // NullFields is a list of field names (e.g. "Values") to include in API 5415 // requests with the JSON null value. By default, fields with empty 5416 // values are omitted from API requests. However, any field with an 5417 // empty value appearing in NullFields will be sent to the server as 5418 // null. It is an error if a field in this list has a non-empty value. 5419 // This may be used to include null fields in Patch requests. 5420 NullFields []string `json:"-"` 5421} 5422 5423func (s *StringValues) MarshalJSON() ([]byte, error) { 5424 type NoMethod StringValues 5425 raw := NoMethod(*s) 5426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5427} 5428 5429// UpdateJobRequest: Input only. 5430// 5431// Update job request. 5432type UpdateJobRequest struct { 5433 // DisableStreetAddressResolution: Deprecated. Please use 5434 // processing_options. This flag is ignored if 5435 // processing_options is set. 5436 // 5437 // Optional. 5438 // 5439 // If set to `true`, the service does not attempt resolve a more 5440 // precise 5441 // address for the job. 5442 DisableStreetAddressResolution bool `json:"disableStreetAddressResolution,omitempty"` 5443 5444 // Job: Required. 5445 // 5446 // The Job to be updated. 5447 Job *Job `json:"job,omitempty"` 5448 5449 // ProcessingOptions: Optional. 5450 // 5451 // Options for job 5452 // processing. 5453 // 5454 // UpdateJobRequest.disable_street_address_resolution is ignored if 5455 // this 5456 // flag is set. 5457 ProcessingOptions *JobProcessingOptions `json:"processingOptions,omitempty"` 5458 5459 // UpdateJobFields: Optional but strongly recommended to be provided for 5460 // the best service 5461 // experience. 5462 // 5463 // If update_job_fields is provided, only the specified fields in 5464 // job are updated. Otherwise all the fields are updated. 5465 // 5466 // A field mask to restrict the fields that are updated. Valid values 5467 // are: 5468 // 5469 // * jobTitle 5470 // * employmentTypes 5471 // * description 5472 // * applicationUrls 5473 // * applicationEmailList 5474 // * applicationInstruction 5475 // * responsibilities 5476 // * qualifications 5477 // * educationLevels 5478 // * level 5479 // * department 5480 // * startDate 5481 // * endDate 5482 // * compensationInfo 5483 // * incentives 5484 // * languageCode 5485 // * benefits 5486 // * expireTime 5487 // * customAttributes 5488 // * visibility 5489 // * publishDate 5490 // * promotionValue 5491 // * locations 5492 // * region 5493 // * expiryDate (deprecated) 5494 // * filterableCustomFields (deprecated) 5495 // * unindexedCustomFields (deprecated) 5496 UpdateJobFields string `json:"updateJobFields,omitempty"` 5497 5498 // ForceSendFields is a list of field names (e.g. 5499 // "DisableStreetAddressResolution") to unconditionally include in API 5500 // requests. By default, fields with empty values are omitted from API 5501 // requests. However, any non-pointer, non-interface field appearing in 5502 // ForceSendFields will be sent to the server regardless of whether the 5503 // field is empty or not. This may be used to include empty fields in 5504 // Patch requests. 5505 ForceSendFields []string `json:"-"` 5506 5507 // NullFields is a list of field names (e.g. 5508 // "DisableStreetAddressResolution") to include in API requests with the 5509 // JSON null value. By default, fields with empty values are omitted 5510 // from API requests. However, any field with an empty value appearing 5511 // in NullFields will be sent to the server as null. It is an error if a 5512 // field in this list has a non-empty value. This may be used to include 5513 // null fields in Patch requests. 5514 NullFields []string `json:"-"` 5515} 5516 5517func (s *UpdateJobRequest) MarshalJSON() ([]byte, error) { 5518 type NoMethod UpdateJobRequest 5519 raw := NoMethod(*s) 5520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5521} 5522 5523// method id "jobs.companies.create": 5524 5525type CompaniesCreateCall struct { 5526 s *Service 5527 company *Company 5528 urlParams_ gensupport.URLParams 5529 ctx_ context.Context 5530 header_ http.Header 5531} 5532 5533// Create: Creates a new company entity. 5534func (r *CompaniesService) Create(company *Company) *CompaniesCreateCall { 5535 c := &CompaniesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5536 c.company = company 5537 return c 5538} 5539 5540// Fields allows partial responses to be retrieved. See 5541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5542// for more information. 5543func (c *CompaniesCreateCall) Fields(s ...googleapi.Field) *CompaniesCreateCall { 5544 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5545 return c 5546} 5547 5548// Context sets the context to be used in this call's Do method. Any 5549// pending HTTP request will be aborted if the provided context is 5550// canceled. 5551func (c *CompaniesCreateCall) Context(ctx context.Context) *CompaniesCreateCall { 5552 c.ctx_ = ctx 5553 return c 5554} 5555 5556// Header returns an http.Header that can be modified by the caller to 5557// add HTTP headers to the request. 5558func (c *CompaniesCreateCall) Header() http.Header { 5559 if c.header_ == nil { 5560 c.header_ = make(http.Header) 5561 } 5562 return c.header_ 5563} 5564 5565func (c *CompaniesCreateCall) doRequest(alt string) (*http.Response, error) { 5566 reqHeaders := make(http.Header) 5567 for k, v := range c.header_ { 5568 reqHeaders[k] = v 5569 } 5570 reqHeaders.Set("User-Agent", c.s.userAgent()) 5571 var body io.Reader = nil 5572 body, err := googleapi.WithoutDataWrapper.JSONReader(c.company) 5573 if err != nil { 5574 return nil, err 5575 } 5576 reqHeaders.Set("Content-Type", "application/json") 5577 c.urlParams_.Set("alt", alt) 5578 c.urlParams_.Set("prettyPrint", "false") 5579 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/companies") 5580 urls += "?" + c.urlParams_.Encode() 5581 req, err := http.NewRequest("POST", urls, body) 5582 if err != nil { 5583 return nil, err 5584 } 5585 req.Header = reqHeaders 5586 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5587} 5588 5589// Do executes the "jobs.companies.create" call. 5590// Exactly one of *Company or error will be non-nil. Any non-2xx status 5591// code is an error. Response headers are in either 5592// *Company.ServerResponse.Header or (if a response was returned at all) 5593// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5594// check whether the returned error was because http.StatusNotModified 5595// was returned. 5596func (c *CompaniesCreateCall) Do(opts ...googleapi.CallOption) (*Company, error) { 5597 gensupport.SetOptions(c.urlParams_, opts...) 5598 res, err := c.doRequest("json") 5599 if res != nil && res.StatusCode == http.StatusNotModified { 5600 if res.Body != nil { 5601 res.Body.Close() 5602 } 5603 return nil, &googleapi.Error{ 5604 Code: res.StatusCode, 5605 Header: res.Header, 5606 } 5607 } 5608 if err != nil { 5609 return nil, err 5610 } 5611 defer googleapi.CloseBody(res) 5612 if err := googleapi.CheckResponse(res); err != nil { 5613 return nil, err 5614 } 5615 ret := &Company{ 5616 ServerResponse: googleapi.ServerResponse{ 5617 Header: res.Header, 5618 HTTPStatusCode: res.StatusCode, 5619 }, 5620 } 5621 target := &ret 5622 if err := gensupport.DecodeResponse(target, res); err != nil { 5623 return nil, err 5624 } 5625 return ret, nil 5626 // { 5627 // "description": "Creates a new company entity.", 5628 // "flatPath": "v2/companies", 5629 // "httpMethod": "POST", 5630 // "id": "jobs.companies.create", 5631 // "parameterOrder": [], 5632 // "parameters": {}, 5633 // "path": "v2/companies", 5634 // "request": { 5635 // "$ref": "Company" 5636 // }, 5637 // "response": { 5638 // "$ref": "Company" 5639 // }, 5640 // "scopes": [ 5641 // "https://www.googleapis.com/auth/cloud-platform", 5642 // "https://www.googleapis.com/auth/jobs" 5643 // ] 5644 // } 5645 5646} 5647 5648// method id "jobs.companies.delete": 5649 5650type CompaniesDeleteCall struct { 5651 s *Service 5652 name string 5653 urlParams_ gensupport.URLParams 5654 ctx_ context.Context 5655 header_ http.Header 5656} 5657 5658// Delete: Deletes the specified company. 5659func (r *CompaniesService) Delete(name string) *CompaniesDeleteCall { 5660 c := &CompaniesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5661 c.name = name 5662 return c 5663} 5664 5665// Fields allows partial responses to be retrieved. See 5666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5667// for more information. 5668func (c *CompaniesDeleteCall) Fields(s ...googleapi.Field) *CompaniesDeleteCall { 5669 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5670 return c 5671} 5672 5673// Context sets the context to be used in this call's Do method. Any 5674// pending HTTP request will be aborted if the provided context is 5675// canceled. 5676func (c *CompaniesDeleteCall) Context(ctx context.Context) *CompaniesDeleteCall { 5677 c.ctx_ = ctx 5678 return c 5679} 5680 5681// Header returns an http.Header that can be modified by the caller to 5682// add HTTP headers to the request. 5683func (c *CompaniesDeleteCall) Header() http.Header { 5684 if c.header_ == nil { 5685 c.header_ = make(http.Header) 5686 } 5687 return c.header_ 5688} 5689 5690func (c *CompaniesDeleteCall) doRequest(alt string) (*http.Response, error) { 5691 reqHeaders := make(http.Header) 5692 for k, v := range c.header_ { 5693 reqHeaders[k] = v 5694 } 5695 reqHeaders.Set("User-Agent", c.s.userAgent()) 5696 var body io.Reader = nil 5697 c.urlParams_.Set("alt", alt) 5698 c.urlParams_.Set("prettyPrint", "false") 5699 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 5700 urls += "?" + c.urlParams_.Encode() 5701 req, err := http.NewRequest("DELETE", urls, body) 5702 if err != nil { 5703 return nil, err 5704 } 5705 req.Header = reqHeaders 5706 googleapi.Expand(req.URL, map[string]string{ 5707 "name": c.name, 5708 }) 5709 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5710} 5711 5712// Do executes the "jobs.companies.delete" call. 5713// Exactly one of *Empty or error will be non-nil. Any non-2xx status 5714// code is an error. Response headers are in either 5715// *Empty.ServerResponse.Header or (if a response was returned at all) 5716// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5717// check whether the returned error was because http.StatusNotModified 5718// was returned. 5719func (c *CompaniesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5720 gensupport.SetOptions(c.urlParams_, opts...) 5721 res, err := c.doRequest("json") 5722 if res != nil && res.StatusCode == http.StatusNotModified { 5723 if res.Body != nil { 5724 res.Body.Close() 5725 } 5726 return nil, &googleapi.Error{ 5727 Code: res.StatusCode, 5728 Header: res.Header, 5729 } 5730 } 5731 if err != nil { 5732 return nil, err 5733 } 5734 defer googleapi.CloseBody(res) 5735 if err := googleapi.CheckResponse(res); err != nil { 5736 return nil, err 5737 } 5738 ret := &Empty{ 5739 ServerResponse: googleapi.ServerResponse{ 5740 Header: res.Header, 5741 HTTPStatusCode: res.StatusCode, 5742 }, 5743 } 5744 target := &ret 5745 if err := gensupport.DecodeResponse(target, res); err != nil { 5746 return nil, err 5747 } 5748 return ret, nil 5749 // { 5750 // "description": "Deletes the specified company.", 5751 // "flatPath": "v2/companies/{companiesId}", 5752 // "httpMethod": "DELETE", 5753 // "id": "jobs.companies.delete", 5754 // "parameterOrder": [ 5755 // "name" 5756 // ], 5757 // "parameters": { 5758 // "name": { 5759 // "description": "Required.\n\nThe resource name of the company to be deleted,\nsuch as, \"companies/0000aaaa-1111-bbbb-2222-cccc3333dddd\".", 5760 // "location": "path", 5761 // "pattern": "^companies/[^/]+$", 5762 // "required": true, 5763 // "type": "string" 5764 // } 5765 // }, 5766 // "path": "v2/{+name}", 5767 // "response": { 5768 // "$ref": "Empty" 5769 // }, 5770 // "scopes": [ 5771 // "https://www.googleapis.com/auth/cloud-platform", 5772 // "https://www.googleapis.com/auth/jobs" 5773 // ] 5774 // } 5775 5776} 5777 5778// method id "jobs.companies.get": 5779 5780type CompaniesGetCall struct { 5781 s *Service 5782 name string 5783 urlParams_ gensupport.URLParams 5784 ifNoneMatch_ string 5785 ctx_ context.Context 5786 header_ http.Header 5787} 5788 5789// Get: Retrieves the specified company. 5790func (r *CompaniesService) Get(name string) *CompaniesGetCall { 5791 c := &CompaniesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5792 c.name = name 5793 return c 5794} 5795 5796// Fields allows partial responses to be retrieved. See 5797// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5798// for more information. 5799func (c *CompaniesGetCall) Fields(s ...googleapi.Field) *CompaniesGetCall { 5800 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5801 return c 5802} 5803 5804// IfNoneMatch sets the optional parameter which makes the operation 5805// fail if the object's ETag matches the given value. This is useful for 5806// getting updates only after the object has changed since the last 5807// request. Use googleapi.IsNotModified to check whether the response 5808// error from Do is the result of In-None-Match. 5809func (c *CompaniesGetCall) IfNoneMatch(entityTag string) *CompaniesGetCall { 5810 c.ifNoneMatch_ = entityTag 5811 return c 5812} 5813 5814// Context sets the context to be used in this call's Do method. Any 5815// pending HTTP request will be aborted if the provided context is 5816// canceled. 5817func (c *CompaniesGetCall) Context(ctx context.Context) *CompaniesGetCall { 5818 c.ctx_ = ctx 5819 return c 5820} 5821 5822// Header returns an http.Header that can be modified by the caller to 5823// add HTTP headers to the request. 5824func (c *CompaniesGetCall) Header() http.Header { 5825 if c.header_ == nil { 5826 c.header_ = make(http.Header) 5827 } 5828 return c.header_ 5829} 5830 5831func (c *CompaniesGetCall) doRequest(alt string) (*http.Response, error) { 5832 reqHeaders := make(http.Header) 5833 for k, v := range c.header_ { 5834 reqHeaders[k] = v 5835 } 5836 reqHeaders.Set("User-Agent", c.s.userAgent()) 5837 if c.ifNoneMatch_ != "" { 5838 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5839 } 5840 var body io.Reader = nil 5841 c.urlParams_.Set("alt", alt) 5842 c.urlParams_.Set("prettyPrint", "false") 5843 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 5844 urls += "?" + c.urlParams_.Encode() 5845 req, err := http.NewRequest("GET", urls, body) 5846 if err != nil { 5847 return nil, err 5848 } 5849 req.Header = reqHeaders 5850 googleapi.Expand(req.URL, map[string]string{ 5851 "name": c.name, 5852 }) 5853 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5854} 5855 5856// Do executes the "jobs.companies.get" call. 5857// Exactly one of *Company or error will be non-nil. Any non-2xx status 5858// code is an error. Response headers are in either 5859// *Company.ServerResponse.Header or (if a response was returned at all) 5860// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5861// check whether the returned error was because http.StatusNotModified 5862// was returned. 5863func (c *CompaniesGetCall) Do(opts ...googleapi.CallOption) (*Company, error) { 5864 gensupport.SetOptions(c.urlParams_, opts...) 5865 res, err := c.doRequest("json") 5866 if res != nil && res.StatusCode == http.StatusNotModified { 5867 if res.Body != nil { 5868 res.Body.Close() 5869 } 5870 return nil, &googleapi.Error{ 5871 Code: res.StatusCode, 5872 Header: res.Header, 5873 } 5874 } 5875 if err != nil { 5876 return nil, err 5877 } 5878 defer googleapi.CloseBody(res) 5879 if err := googleapi.CheckResponse(res); err != nil { 5880 return nil, err 5881 } 5882 ret := &Company{ 5883 ServerResponse: googleapi.ServerResponse{ 5884 Header: res.Header, 5885 HTTPStatusCode: res.StatusCode, 5886 }, 5887 } 5888 target := &ret 5889 if err := gensupport.DecodeResponse(target, res); err != nil { 5890 return nil, err 5891 } 5892 return ret, nil 5893 // { 5894 // "description": "Retrieves the specified company.", 5895 // "flatPath": "v2/companies/{companiesId}", 5896 // "httpMethod": "GET", 5897 // "id": "jobs.companies.get", 5898 // "parameterOrder": [ 5899 // "name" 5900 // ], 5901 // "parameters": { 5902 // "name": { 5903 // "description": "Required.\n\nResource name of the company to retrieve,\nsuch as \"companies/0000aaaa-1111-bbbb-2222-cccc3333dddd\".", 5904 // "location": "path", 5905 // "pattern": "^companies/[^/]+$", 5906 // "required": true, 5907 // "type": "string" 5908 // } 5909 // }, 5910 // "path": "v2/{+name}", 5911 // "response": { 5912 // "$ref": "Company" 5913 // }, 5914 // "scopes": [ 5915 // "https://www.googleapis.com/auth/cloud-platform", 5916 // "https://www.googleapis.com/auth/jobs" 5917 // ] 5918 // } 5919 5920} 5921 5922// method id "jobs.companies.list": 5923 5924type CompaniesListCall struct { 5925 s *Service 5926 urlParams_ gensupport.URLParams 5927 ifNoneMatch_ string 5928 ctx_ context.Context 5929 header_ http.Header 5930} 5931 5932// List: Lists all companies associated with a Cloud Talent Solution 5933// account. 5934func (r *CompaniesService) List() *CompaniesListCall { 5935 c := &CompaniesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5936 return c 5937} 5938 5939// MustHaveOpenJobs sets the optional parameter "mustHaveOpenJobs": Set 5940// to true if the companies request must have open jobs. 5941// 5942// Defaults to false. 5943// 5944// If true, at most page_size of companies are fetched, among which 5945// only those with open jobs are returned. 5946func (c *CompaniesListCall) MustHaveOpenJobs(mustHaveOpenJobs bool) *CompaniesListCall { 5947 c.urlParams_.Set("mustHaveOpenJobs", fmt.Sprint(mustHaveOpenJobs)) 5948 return c 5949} 5950 5951// PageSize sets the optional parameter "pageSize": The maximum number 5952// of companies to be returned, at most 100. 5953// Default is 100 if a non-positive number is provided. 5954func (c *CompaniesListCall) PageSize(pageSize int64) *CompaniesListCall { 5955 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5956 return c 5957} 5958 5959// PageToken sets the optional parameter "pageToken": The starting 5960// indicator from which to return results. 5961func (c *CompaniesListCall) PageToken(pageToken string) *CompaniesListCall { 5962 c.urlParams_.Set("pageToken", pageToken) 5963 return c 5964} 5965 5966// Fields allows partial responses to be retrieved. See 5967// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5968// for more information. 5969func (c *CompaniesListCall) Fields(s ...googleapi.Field) *CompaniesListCall { 5970 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5971 return c 5972} 5973 5974// IfNoneMatch sets the optional parameter which makes the operation 5975// fail if the object's ETag matches the given value. This is useful for 5976// getting updates only after the object has changed since the last 5977// request. Use googleapi.IsNotModified to check whether the response 5978// error from Do is the result of In-None-Match. 5979func (c *CompaniesListCall) IfNoneMatch(entityTag string) *CompaniesListCall { 5980 c.ifNoneMatch_ = entityTag 5981 return c 5982} 5983 5984// Context sets the context to be used in this call's Do method. Any 5985// pending HTTP request will be aborted if the provided context is 5986// canceled. 5987func (c *CompaniesListCall) Context(ctx context.Context) *CompaniesListCall { 5988 c.ctx_ = ctx 5989 return c 5990} 5991 5992// Header returns an http.Header that can be modified by the caller to 5993// add HTTP headers to the request. 5994func (c *CompaniesListCall) Header() http.Header { 5995 if c.header_ == nil { 5996 c.header_ = make(http.Header) 5997 } 5998 return c.header_ 5999} 6000 6001func (c *CompaniesListCall) doRequest(alt string) (*http.Response, error) { 6002 reqHeaders := make(http.Header) 6003 for k, v := range c.header_ { 6004 reqHeaders[k] = v 6005 } 6006 reqHeaders.Set("User-Agent", c.s.userAgent()) 6007 if c.ifNoneMatch_ != "" { 6008 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6009 } 6010 var body io.Reader = nil 6011 c.urlParams_.Set("alt", alt) 6012 c.urlParams_.Set("prettyPrint", "false") 6013 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/companies") 6014 urls += "?" + c.urlParams_.Encode() 6015 req, err := http.NewRequest("GET", urls, body) 6016 if err != nil { 6017 return nil, err 6018 } 6019 req.Header = reqHeaders 6020 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6021} 6022 6023// Do executes the "jobs.companies.list" call. 6024// Exactly one of *ListCompaniesResponse or error will be non-nil. Any 6025// non-2xx status code is an error. Response headers are in either 6026// *ListCompaniesResponse.ServerResponse.Header or (if a response was 6027// returned at all) in error.(*googleapi.Error).Header. Use 6028// googleapi.IsNotModified to check whether the returned error was 6029// because http.StatusNotModified was returned. 6030func (c *CompaniesListCall) Do(opts ...googleapi.CallOption) (*ListCompaniesResponse, error) { 6031 gensupport.SetOptions(c.urlParams_, opts...) 6032 res, err := c.doRequest("json") 6033 if res != nil && res.StatusCode == http.StatusNotModified { 6034 if res.Body != nil { 6035 res.Body.Close() 6036 } 6037 return nil, &googleapi.Error{ 6038 Code: res.StatusCode, 6039 Header: res.Header, 6040 } 6041 } 6042 if err != nil { 6043 return nil, err 6044 } 6045 defer googleapi.CloseBody(res) 6046 if err := googleapi.CheckResponse(res); err != nil { 6047 return nil, err 6048 } 6049 ret := &ListCompaniesResponse{ 6050 ServerResponse: googleapi.ServerResponse{ 6051 Header: res.Header, 6052 HTTPStatusCode: res.StatusCode, 6053 }, 6054 } 6055 target := &ret 6056 if err := gensupport.DecodeResponse(target, res); err != nil { 6057 return nil, err 6058 } 6059 return ret, nil 6060 // { 6061 // "description": "Lists all companies associated with a Cloud Talent Solution account.", 6062 // "flatPath": "v2/companies", 6063 // "httpMethod": "GET", 6064 // "id": "jobs.companies.list", 6065 // "parameterOrder": [], 6066 // "parameters": { 6067 // "mustHaveOpenJobs": { 6068 // "description": "Optional.\n\nSet to true if the companies request must have open jobs.\n\nDefaults to false.\n\nIf true, at most page_size of companies are fetched, among which\nonly those with open jobs are returned.", 6069 // "location": "query", 6070 // "type": "boolean" 6071 // }, 6072 // "pageSize": { 6073 // "description": "Optional.\n\nThe maximum number of companies to be returned, at most 100.\nDefault is 100 if a non-positive number is provided.", 6074 // "format": "int32", 6075 // "location": "query", 6076 // "type": "integer" 6077 // }, 6078 // "pageToken": { 6079 // "description": "Optional.\n\nThe starting indicator from which to return results.", 6080 // "location": "query", 6081 // "type": "string" 6082 // } 6083 // }, 6084 // "path": "v2/companies", 6085 // "response": { 6086 // "$ref": "ListCompaniesResponse" 6087 // }, 6088 // "scopes": [ 6089 // "https://www.googleapis.com/auth/cloud-platform", 6090 // "https://www.googleapis.com/auth/jobs" 6091 // ] 6092 // } 6093 6094} 6095 6096// Pages invokes f for each page of results. 6097// A non-nil error returned from f will halt the iteration. 6098// The provided context supersedes any context provided to the Context method. 6099func (c *CompaniesListCall) Pages(ctx context.Context, f func(*ListCompaniesResponse) error) error { 6100 c.ctx_ = ctx 6101 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6102 for { 6103 x, err := c.Do() 6104 if err != nil { 6105 return err 6106 } 6107 if err := f(x); err != nil { 6108 return err 6109 } 6110 if x.NextPageToken == "" { 6111 return nil 6112 } 6113 c.PageToken(x.NextPageToken) 6114 } 6115} 6116 6117// method id "jobs.companies.patch": 6118 6119type CompaniesPatchCall struct { 6120 s *Service 6121 name string 6122 company *Company 6123 urlParams_ gensupport.URLParams 6124 ctx_ context.Context 6125 header_ http.Header 6126} 6127 6128// Patch: Updates the specified company. Company names can't be updated. 6129// To update a 6130// company name, delete the company and all jobs associated with it, and 6131// only 6132// then re-create them. 6133func (r *CompaniesService) Patch(name string, company *Company) *CompaniesPatchCall { 6134 c := &CompaniesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6135 c.name = name 6136 c.company = company 6137 return c 6138} 6139 6140// UpdateCompanyFields sets the optional parameter 6141// "updateCompanyFields": Optional but strongly recommended to be 6142// provided for the best service 6143// experience. 6144// 6145// If update_company_fields is provided, only the specified fields 6146// in 6147// company are updated. Otherwise all the fields are updated. 6148// 6149// A field mask to specify the company fields to update. Valid values 6150// are: 6151// 6152// * displayName 6153// * website 6154// * imageUrl 6155// * companySize 6156// * distributorBillingCompanyId 6157// * companyInfoSources 6158// * careerPageLink 6159// * hiringAgency 6160// * hqLocation 6161// * eeoText 6162// * keywordSearchableCustomAttributes 6163// * title (deprecated) 6164// * keywordSearchableCustomFields (deprecated) 6165func (c *CompaniesPatchCall) UpdateCompanyFields(updateCompanyFields string) *CompaniesPatchCall { 6166 c.urlParams_.Set("updateCompanyFields", updateCompanyFields) 6167 return c 6168} 6169 6170// Fields allows partial responses to be retrieved. See 6171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6172// for more information. 6173func (c *CompaniesPatchCall) Fields(s ...googleapi.Field) *CompaniesPatchCall { 6174 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6175 return c 6176} 6177 6178// Context sets the context to be used in this call's Do method. Any 6179// pending HTTP request will be aborted if the provided context is 6180// canceled. 6181func (c *CompaniesPatchCall) Context(ctx context.Context) *CompaniesPatchCall { 6182 c.ctx_ = ctx 6183 return c 6184} 6185 6186// Header returns an http.Header that can be modified by the caller to 6187// add HTTP headers to the request. 6188func (c *CompaniesPatchCall) Header() http.Header { 6189 if c.header_ == nil { 6190 c.header_ = make(http.Header) 6191 } 6192 return c.header_ 6193} 6194 6195func (c *CompaniesPatchCall) doRequest(alt string) (*http.Response, error) { 6196 reqHeaders := make(http.Header) 6197 for k, v := range c.header_ { 6198 reqHeaders[k] = v 6199 } 6200 reqHeaders.Set("User-Agent", c.s.userAgent()) 6201 var body io.Reader = nil 6202 body, err := googleapi.WithoutDataWrapper.JSONReader(c.company) 6203 if err != nil { 6204 return nil, err 6205 } 6206 reqHeaders.Set("Content-Type", "application/json") 6207 c.urlParams_.Set("alt", alt) 6208 c.urlParams_.Set("prettyPrint", "false") 6209 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 6210 urls += "?" + c.urlParams_.Encode() 6211 req, err := http.NewRequest("PATCH", urls, body) 6212 if err != nil { 6213 return nil, err 6214 } 6215 req.Header = reqHeaders 6216 googleapi.Expand(req.URL, map[string]string{ 6217 "name": c.name, 6218 }) 6219 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6220} 6221 6222// Do executes the "jobs.companies.patch" call. 6223// Exactly one of *Company or error will be non-nil. Any non-2xx status 6224// code is an error. Response headers are in either 6225// *Company.ServerResponse.Header or (if a response was returned at all) 6226// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6227// check whether the returned error was because http.StatusNotModified 6228// was returned. 6229func (c *CompaniesPatchCall) Do(opts ...googleapi.CallOption) (*Company, error) { 6230 gensupport.SetOptions(c.urlParams_, opts...) 6231 res, err := c.doRequest("json") 6232 if res != nil && res.StatusCode == http.StatusNotModified { 6233 if res.Body != nil { 6234 res.Body.Close() 6235 } 6236 return nil, &googleapi.Error{ 6237 Code: res.StatusCode, 6238 Header: res.Header, 6239 } 6240 } 6241 if err != nil { 6242 return nil, err 6243 } 6244 defer googleapi.CloseBody(res) 6245 if err := googleapi.CheckResponse(res); err != nil { 6246 return nil, err 6247 } 6248 ret := &Company{ 6249 ServerResponse: googleapi.ServerResponse{ 6250 Header: res.Header, 6251 HTTPStatusCode: res.StatusCode, 6252 }, 6253 } 6254 target := &ret 6255 if err := gensupport.DecodeResponse(target, res); err != nil { 6256 return nil, err 6257 } 6258 return ret, nil 6259 // { 6260 // "description": "Updates the specified company. Company names can't be updated. To update a\ncompany name, delete the company and all jobs associated with it, and only\nthen re-create them.", 6261 // "flatPath": "v2/companies/{companiesId}", 6262 // "httpMethod": "PATCH", 6263 // "id": "jobs.companies.patch", 6264 // "parameterOrder": [ 6265 // "name" 6266 // ], 6267 // "parameters": { 6268 // "name": { 6269 // "description": "Required during company update.\n\nThe resource name for a company. This is generated by the service when a\ncompany is created, for example,\n\"companies/0000aaaa-1111-bbbb-2222-cccc3333dddd\".", 6270 // "location": "path", 6271 // "pattern": "^companies/[^/]+$", 6272 // "required": true, 6273 // "type": "string" 6274 // }, 6275 // "updateCompanyFields": { 6276 // "description": "Optional but strongly recommended to be provided for the best service\nexperience.\n\nIf update_company_fields is provided, only the specified fields in\ncompany are updated. Otherwise all the fields are updated.\n\nA field mask to specify the company fields to update. Valid values are:\n\n* displayName\n* website\n* imageUrl\n* companySize\n* distributorBillingCompanyId\n* companyInfoSources\n* careerPageLink\n* hiringAgency\n* hqLocation\n* eeoText\n* keywordSearchableCustomAttributes\n* title (deprecated)\n* keywordSearchableCustomFields (deprecated)", 6277 // "format": "google-fieldmask", 6278 // "location": "query", 6279 // "type": "string" 6280 // } 6281 // }, 6282 // "path": "v2/{+name}", 6283 // "request": { 6284 // "$ref": "Company" 6285 // }, 6286 // "response": { 6287 // "$ref": "Company" 6288 // }, 6289 // "scopes": [ 6290 // "https://www.googleapis.com/auth/cloud-platform", 6291 // "https://www.googleapis.com/auth/jobs" 6292 // ] 6293 // } 6294 6295} 6296 6297// method id "jobs.companies.jobs.list": 6298 6299type CompaniesJobsListCall struct { 6300 s *Service 6301 companyName string 6302 urlParams_ gensupport.URLParams 6303 ifNoneMatch_ string 6304 ctx_ context.Context 6305 header_ http.Header 6306} 6307 6308// List: Deprecated. Use ListJobs instead. 6309// 6310// Lists all jobs associated with a company. 6311func (r *CompaniesJobsService) List(companyName string) *CompaniesJobsListCall { 6312 c := &CompaniesJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6313 c.companyName = companyName 6314 return c 6315} 6316 6317// IdsOnly sets the optional parameter "idsOnly": If set to `true`, only 6318// job ID, job requisition ID and language code will be 6319// returned. 6320// 6321// A typical use is to synchronize job repositories. 6322// 6323// Defaults to false. 6324func (c *CompaniesJobsListCall) IdsOnly(idsOnly bool) *CompaniesJobsListCall { 6325 c.urlParams_.Set("idsOnly", fmt.Sprint(idsOnly)) 6326 return c 6327} 6328 6329// IncludeJobsCount sets the optional parameter "includeJobsCount": 6330// Deprecated. Please DO NOT use this field except for small 6331// companies. 6332// Suggest counting jobs page by page instead. 6333// 6334// 6335// 6336// Set to true if the total number of open jobs is to be 6337// returned. 6338// 6339// Defaults to false. 6340func (c *CompaniesJobsListCall) IncludeJobsCount(includeJobsCount bool) *CompaniesJobsListCall { 6341 c.urlParams_.Set("includeJobsCount", fmt.Sprint(includeJobsCount)) 6342 return c 6343} 6344 6345// JobRequisitionId sets the optional parameter "jobRequisitionId": The 6346// requisition ID, also known as posting ID, assigned by the company 6347// to the job. 6348// 6349// The maximum number of allowable characters is 225. 6350func (c *CompaniesJobsListCall) JobRequisitionId(jobRequisitionId string) *CompaniesJobsListCall { 6351 c.urlParams_.Set("jobRequisitionId", jobRequisitionId) 6352 return c 6353} 6354 6355// PageSize sets the optional parameter "pageSize": The maximum number 6356// of jobs to be returned per page of results. 6357// 6358// If ids_only is set to true, the maximum allowed page size 6359// is 1000. Otherwise, the maximum allowed page size is 100. 6360// 6361// Default is 100 if empty or a number < 1 is specified. 6362func (c *CompaniesJobsListCall) PageSize(pageSize int64) *CompaniesJobsListCall { 6363 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6364 return c 6365} 6366 6367// PageToken sets the optional parameter "pageToken": The starting point 6368// of a query result. 6369func (c *CompaniesJobsListCall) PageToken(pageToken string) *CompaniesJobsListCall { 6370 c.urlParams_.Set("pageToken", pageToken) 6371 return c 6372} 6373 6374// Fields allows partial responses to be retrieved. See 6375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6376// for more information. 6377func (c *CompaniesJobsListCall) Fields(s ...googleapi.Field) *CompaniesJobsListCall { 6378 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6379 return c 6380} 6381 6382// IfNoneMatch sets the optional parameter which makes the operation 6383// fail if the object's ETag matches the given value. This is useful for 6384// getting updates only after the object has changed since the last 6385// request. Use googleapi.IsNotModified to check whether the response 6386// error from Do is the result of In-None-Match. 6387func (c *CompaniesJobsListCall) IfNoneMatch(entityTag string) *CompaniesJobsListCall { 6388 c.ifNoneMatch_ = entityTag 6389 return c 6390} 6391 6392// Context sets the context to be used in this call's Do method. Any 6393// pending HTTP request will be aborted if the provided context is 6394// canceled. 6395func (c *CompaniesJobsListCall) Context(ctx context.Context) *CompaniesJobsListCall { 6396 c.ctx_ = ctx 6397 return c 6398} 6399 6400// Header returns an http.Header that can be modified by the caller to 6401// add HTTP headers to the request. 6402func (c *CompaniesJobsListCall) Header() http.Header { 6403 if c.header_ == nil { 6404 c.header_ = make(http.Header) 6405 } 6406 return c.header_ 6407} 6408 6409func (c *CompaniesJobsListCall) doRequest(alt string) (*http.Response, error) { 6410 reqHeaders := make(http.Header) 6411 for k, v := range c.header_ { 6412 reqHeaders[k] = v 6413 } 6414 reqHeaders.Set("User-Agent", c.s.userAgent()) 6415 if c.ifNoneMatch_ != "" { 6416 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6417 } 6418 var body io.Reader = nil 6419 c.urlParams_.Set("alt", alt) 6420 c.urlParams_.Set("prettyPrint", "false") 6421 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+companyName}/jobs") 6422 urls += "?" + c.urlParams_.Encode() 6423 req, err := http.NewRequest("GET", urls, body) 6424 if err != nil { 6425 return nil, err 6426 } 6427 req.Header = reqHeaders 6428 googleapi.Expand(req.URL, map[string]string{ 6429 "companyName": c.companyName, 6430 }) 6431 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6432} 6433 6434// Do executes the "jobs.companies.jobs.list" call. 6435// Exactly one of *ListCompanyJobsResponse or error will be non-nil. Any 6436// non-2xx status code is an error. Response headers are in either 6437// *ListCompanyJobsResponse.ServerResponse.Header or (if a response was 6438// returned at all) in error.(*googleapi.Error).Header. Use 6439// googleapi.IsNotModified to check whether the returned error was 6440// because http.StatusNotModified was returned. 6441func (c *CompaniesJobsListCall) Do(opts ...googleapi.CallOption) (*ListCompanyJobsResponse, error) { 6442 gensupport.SetOptions(c.urlParams_, opts...) 6443 res, err := c.doRequest("json") 6444 if res != nil && res.StatusCode == http.StatusNotModified { 6445 if res.Body != nil { 6446 res.Body.Close() 6447 } 6448 return nil, &googleapi.Error{ 6449 Code: res.StatusCode, 6450 Header: res.Header, 6451 } 6452 } 6453 if err != nil { 6454 return nil, err 6455 } 6456 defer googleapi.CloseBody(res) 6457 if err := googleapi.CheckResponse(res); err != nil { 6458 return nil, err 6459 } 6460 ret := &ListCompanyJobsResponse{ 6461 ServerResponse: googleapi.ServerResponse{ 6462 Header: res.Header, 6463 HTTPStatusCode: res.StatusCode, 6464 }, 6465 } 6466 target := &ret 6467 if err := gensupport.DecodeResponse(target, res); err != nil { 6468 return nil, err 6469 } 6470 return ret, nil 6471 // { 6472 // "description": "Deprecated. Use ListJobs instead.\n\nLists all jobs associated with a company.", 6473 // "flatPath": "v2/companies/{companiesId}/jobs", 6474 // "httpMethod": "GET", 6475 // "id": "jobs.companies.jobs.list", 6476 // "parameterOrder": [ 6477 // "companyName" 6478 // ], 6479 // "parameters": { 6480 // "companyName": { 6481 // "description": "Required.\n\nThe resource name of the company that owns the jobs to be listed,\nsuch as, \"companies/0000aaaa-1111-bbbb-2222-cccc3333dddd\".", 6482 // "location": "path", 6483 // "pattern": "^companies/[^/]+$", 6484 // "required": true, 6485 // "type": "string" 6486 // }, 6487 // "idsOnly": { 6488 // "description": "Optional.\n\nIf set to `true`, only job ID, job requisition ID and language code will be\nreturned.\n\nA typical use is to synchronize job repositories.\n\nDefaults to false.", 6489 // "location": "query", 6490 // "type": "boolean" 6491 // }, 6492 // "includeJobsCount": { 6493 // "description": "Deprecated. Please DO NOT use this field except for small companies.\nSuggest counting jobs page by page instead.\n\nOptional.\n\nSet to true if the total number of open jobs is to be returned.\n\nDefaults to false.", 6494 // "location": "query", 6495 // "type": "boolean" 6496 // }, 6497 // "jobRequisitionId": { 6498 // "description": "Optional.\n\nThe requisition ID, also known as posting ID, assigned by the company\nto the job.\n\nThe maximum number of allowable characters is 225.", 6499 // "location": "query", 6500 // "type": "string" 6501 // }, 6502 // "pageSize": { 6503 // "description": "Optional.\n\nThe maximum number of jobs to be returned per page of results.\n\nIf ids_only is set to true, the maximum allowed page size\nis 1000. Otherwise, the maximum allowed page size is 100.\n\nDefault is 100 if empty or a number \u003c 1 is specified.", 6504 // "format": "int32", 6505 // "location": "query", 6506 // "type": "integer" 6507 // }, 6508 // "pageToken": { 6509 // "description": "Optional.\n\nThe starting point of a query result.", 6510 // "location": "query", 6511 // "type": "string" 6512 // } 6513 // }, 6514 // "path": "v2/{+companyName}/jobs", 6515 // "response": { 6516 // "$ref": "ListCompanyJobsResponse" 6517 // }, 6518 // "scopes": [ 6519 // "https://www.googleapis.com/auth/cloud-platform", 6520 // "https://www.googleapis.com/auth/jobs" 6521 // ] 6522 // } 6523 6524} 6525 6526// Pages invokes f for each page of results. 6527// A non-nil error returned from f will halt the iteration. 6528// The provided context supersedes any context provided to the Context method. 6529func (c *CompaniesJobsListCall) Pages(ctx context.Context, f func(*ListCompanyJobsResponse) error) error { 6530 c.ctx_ = ctx 6531 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6532 for { 6533 x, err := c.Do() 6534 if err != nil { 6535 return err 6536 } 6537 if err := f(x); err != nil { 6538 return err 6539 } 6540 if x.NextPageToken == "" { 6541 return nil 6542 } 6543 c.PageToken(x.NextPageToken) 6544 } 6545} 6546 6547// method id "jobs.jobs.batchDelete": 6548 6549type JobsBatchDeleteCall struct { 6550 s *Service 6551 batchdeletejobsrequest *BatchDeleteJobsRequest 6552 urlParams_ gensupport.URLParams 6553 ctx_ context.Context 6554 header_ http.Header 6555} 6556 6557// BatchDelete: Deletes a list of Job postings by filter. 6558func (r *JobsService) BatchDelete(batchdeletejobsrequest *BatchDeleteJobsRequest) *JobsBatchDeleteCall { 6559 c := &JobsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6560 c.batchdeletejobsrequest = batchdeletejobsrequest 6561 return c 6562} 6563 6564// Fields allows partial responses to be retrieved. See 6565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6566// for more information. 6567func (c *JobsBatchDeleteCall) Fields(s ...googleapi.Field) *JobsBatchDeleteCall { 6568 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6569 return c 6570} 6571 6572// Context sets the context to be used in this call's Do method. Any 6573// pending HTTP request will be aborted if the provided context is 6574// canceled. 6575func (c *JobsBatchDeleteCall) Context(ctx context.Context) *JobsBatchDeleteCall { 6576 c.ctx_ = ctx 6577 return c 6578} 6579 6580// Header returns an http.Header that can be modified by the caller to 6581// add HTTP headers to the request. 6582func (c *JobsBatchDeleteCall) Header() http.Header { 6583 if c.header_ == nil { 6584 c.header_ = make(http.Header) 6585 } 6586 return c.header_ 6587} 6588 6589func (c *JobsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { 6590 reqHeaders := make(http.Header) 6591 for k, v := range c.header_ { 6592 reqHeaders[k] = v 6593 } 6594 reqHeaders.Set("User-Agent", c.s.userAgent()) 6595 var body io.Reader = nil 6596 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchdeletejobsrequest) 6597 if err != nil { 6598 return nil, err 6599 } 6600 reqHeaders.Set("Content-Type", "application/json") 6601 c.urlParams_.Set("alt", alt) 6602 c.urlParams_.Set("prettyPrint", "false") 6603 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs:batchDelete") 6604 urls += "?" + c.urlParams_.Encode() 6605 req, err := http.NewRequest("POST", urls, body) 6606 if err != nil { 6607 return nil, err 6608 } 6609 req.Header = reqHeaders 6610 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6611} 6612 6613// Do executes the "jobs.jobs.batchDelete" call. 6614// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6615// code is an error. Response headers are in either 6616// *Empty.ServerResponse.Header or (if a response was returned at all) 6617// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6618// check whether the returned error was because http.StatusNotModified 6619// was returned. 6620func (c *JobsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6621 gensupport.SetOptions(c.urlParams_, opts...) 6622 res, err := c.doRequest("json") 6623 if res != nil && res.StatusCode == http.StatusNotModified { 6624 if res.Body != nil { 6625 res.Body.Close() 6626 } 6627 return nil, &googleapi.Error{ 6628 Code: res.StatusCode, 6629 Header: res.Header, 6630 } 6631 } 6632 if err != nil { 6633 return nil, err 6634 } 6635 defer googleapi.CloseBody(res) 6636 if err := googleapi.CheckResponse(res); err != nil { 6637 return nil, err 6638 } 6639 ret := &Empty{ 6640 ServerResponse: googleapi.ServerResponse{ 6641 Header: res.Header, 6642 HTTPStatusCode: res.StatusCode, 6643 }, 6644 } 6645 target := &ret 6646 if err := gensupport.DecodeResponse(target, res); err != nil { 6647 return nil, err 6648 } 6649 return ret, nil 6650 // { 6651 // "description": "Deletes a list of Job postings by filter.", 6652 // "flatPath": "v2/jobs:batchDelete", 6653 // "httpMethod": "POST", 6654 // "id": "jobs.jobs.batchDelete", 6655 // "parameterOrder": [], 6656 // "parameters": {}, 6657 // "path": "v2/jobs:batchDelete", 6658 // "request": { 6659 // "$ref": "BatchDeleteJobsRequest" 6660 // }, 6661 // "response": { 6662 // "$ref": "Empty" 6663 // }, 6664 // "scopes": [ 6665 // "https://www.googleapis.com/auth/cloud-platform", 6666 // "https://www.googleapis.com/auth/jobs" 6667 // ] 6668 // } 6669 6670} 6671 6672// method id "jobs.jobs.create": 6673 6674type JobsCreateCall struct { 6675 s *Service 6676 createjobrequest *CreateJobRequest 6677 urlParams_ gensupport.URLParams 6678 ctx_ context.Context 6679 header_ http.Header 6680} 6681 6682// Create: Creates a new job. 6683// 6684// Typically, the job becomes searchable within 10 seconds, but it may 6685// take 6686// up to 5 minutes. 6687func (r *JobsService) Create(createjobrequest *CreateJobRequest) *JobsCreateCall { 6688 c := &JobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6689 c.createjobrequest = createjobrequest 6690 return c 6691} 6692 6693// Fields allows partial responses to be retrieved. See 6694// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6695// for more information. 6696func (c *JobsCreateCall) Fields(s ...googleapi.Field) *JobsCreateCall { 6697 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6698 return c 6699} 6700 6701// Context sets the context to be used in this call's Do method. Any 6702// pending HTTP request will be aborted if the provided context is 6703// canceled. 6704func (c *JobsCreateCall) Context(ctx context.Context) *JobsCreateCall { 6705 c.ctx_ = ctx 6706 return c 6707} 6708 6709// Header returns an http.Header that can be modified by the caller to 6710// add HTTP headers to the request. 6711func (c *JobsCreateCall) Header() http.Header { 6712 if c.header_ == nil { 6713 c.header_ = make(http.Header) 6714 } 6715 return c.header_ 6716} 6717 6718func (c *JobsCreateCall) doRequest(alt string) (*http.Response, error) { 6719 reqHeaders := make(http.Header) 6720 for k, v := range c.header_ { 6721 reqHeaders[k] = v 6722 } 6723 reqHeaders.Set("User-Agent", c.s.userAgent()) 6724 var body io.Reader = nil 6725 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createjobrequest) 6726 if err != nil { 6727 return nil, err 6728 } 6729 reqHeaders.Set("Content-Type", "application/json") 6730 c.urlParams_.Set("alt", alt) 6731 c.urlParams_.Set("prettyPrint", "false") 6732 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs") 6733 urls += "?" + c.urlParams_.Encode() 6734 req, err := http.NewRequest("POST", urls, body) 6735 if err != nil { 6736 return nil, err 6737 } 6738 req.Header = reqHeaders 6739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6740} 6741 6742// Do executes the "jobs.jobs.create" call. 6743// Exactly one of *Job or error will be non-nil. Any non-2xx status code 6744// is an error. Response headers are in either 6745// *Job.ServerResponse.Header or (if a response was returned at all) in 6746// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 6747// whether the returned error was because http.StatusNotModified was 6748// returned. 6749func (c *JobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, error) { 6750 gensupport.SetOptions(c.urlParams_, opts...) 6751 res, err := c.doRequest("json") 6752 if res != nil && res.StatusCode == http.StatusNotModified { 6753 if res.Body != nil { 6754 res.Body.Close() 6755 } 6756 return nil, &googleapi.Error{ 6757 Code: res.StatusCode, 6758 Header: res.Header, 6759 } 6760 } 6761 if err != nil { 6762 return nil, err 6763 } 6764 defer googleapi.CloseBody(res) 6765 if err := googleapi.CheckResponse(res); err != nil { 6766 return nil, err 6767 } 6768 ret := &Job{ 6769 ServerResponse: googleapi.ServerResponse{ 6770 Header: res.Header, 6771 HTTPStatusCode: res.StatusCode, 6772 }, 6773 } 6774 target := &ret 6775 if err := gensupport.DecodeResponse(target, res); err != nil { 6776 return nil, err 6777 } 6778 return ret, nil 6779 // { 6780 // "description": "Creates a new job.\n\nTypically, the job becomes searchable within 10 seconds, but it may take\nup to 5 minutes.", 6781 // "flatPath": "v2/jobs", 6782 // "httpMethod": "POST", 6783 // "id": "jobs.jobs.create", 6784 // "parameterOrder": [], 6785 // "parameters": {}, 6786 // "path": "v2/jobs", 6787 // "request": { 6788 // "$ref": "CreateJobRequest" 6789 // }, 6790 // "response": { 6791 // "$ref": "Job" 6792 // }, 6793 // "scopes": [ 6794 // "https://www.googleapis.com/auth/cloud-platform", 6795 // "https://www.googleapis.com/auth/jobs" 6796 // ] 6797 // } 6798 6799} 6800 6801// method id "jobs.jobs.delete": 6802 6803type JobsDeleteCall struct { 6804 s *Service 6805 name string 6806 urlParams_ gensupport.URLParams 6807 ctx_ context.Context 6808 header_ http.Header 6809} 6810 6811// Delete: Deletes the specified job. 6812// 6813// Typically, the job becomes unsearchable within 10 seconds, but it may 6814// take 6815// up to 5 minutes. 6816func (r *JobsService) Delete(name string) *JobsDeleteCall { 6817 c := &JobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6818 c.name = name 6819 return c 6820} 6821 6822// DisableFastProcess sets the optional parameter "disableFastProcess": 6823// Deprecated. This field is not working anymore. 6824// 6825// 6826// 6827// If set to true, this call waits for all processing steps to 6828// complete 6829// before the job is cleaned up. Otherwise, the call returns while 6830// some 6831// steps are still taking place asynchronously, hence faster. 6832func (c *JobsDeleteCall) DisableFastProcess(disableFastProcess bool) *JobsDeleteCall { 6833 c.urlParams_.Set("disableFastProcess", fmt.Sprint(disableFastProcess)) 6834 return c 6835} 6836 6837// Fields allows partial responses to be retrieved. See 6838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6839// for more information. 6840func (c *JobsDeleteCall) Fields(s ...googleapi.Field) *JobsDeleteCall { 6841 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6842 return c 6843} 6844 6845// Context sets the context to be used in this call's Do method. Any 6846// pending HTTP request will be aborted if the provided context is 6847// canceled. 6848func (c *JobsDeleteCall) Context(ctx context.Context) *JobsDeleteCall { 6849 c.ctx_ = ctx 6850 return c 6851} 6852 6853// Header returns an http.Header that can be modified by the caller to 6854// add HTTP headers to the request. 6855func (c *JobsDeleteCall) Header() http.Header { 6856 if c.header_ == nil { 6857 c.header_ = make(http.Header) 6858 } 6859 return c.header_ 6860} 6861 6862func (c *JobsDeleteCall) doRequest(alt string) (*http.Response, error) { 6863 reqHeaders := make(http.Header) 6864 for k, v := range c.header_ { 6865 reqHeaders[k] = v 6866 } 6867 reqHeaders.Set("User-Agent", c.s.userAgent()) 6868 var body io.Reader = nil 6869 c.urlParams_.Set("alt", alt) 6870 c.urlParams_.Set("prettyPrint", "false") 6871 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 6872 urls += "?" + c.urlParams_.Encode() 6873 req, err := http.NewRequest("DELETE", urls, body) 6874 if err != nil { 6875 return nil, err 6876 } 6877 req.Header = reqHeaders 6878 googleapi.Expand(req.URL, map[string]string{ 6879 "name": c.name, 6880 }) 6881 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6882} 6883 6884// Do executes the "jobs.jobs.delete" call. 6885// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6886// code is an error. Response headers are in either 6887// *Empty.ServerResponse.Header or (if a response was returned at all) 6888// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6889// check whether the returned error was because http.StatusNotModified 6890// was returned. 6891func (c *JobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6892 gensupport.SetOptions(c.urlParams_, opts...) 6893 res, err := c.doRequest("json") 6894 if res != nil && res.StatusCode == http.StatusNotModified { 6895 if res.Body != nil { 6896 res.Body.Close() 6897 } 6898 return nil, &googleapi.Error{ 6899 Code: res.StatusCode, 6900 Header: res.Header, 6901 } 6902 } 6903 if err != nil { 6904 return nil, err 6905 } 6906 defer googleapi.CloseBody(res) 6907 if err := googleapi.CheckResponse(res); err != nil { 6908 return nil, err 6909 } 6910 ret := &Empty{ 6911 ServerResponse: googleapi.ServerResponse{ 6912 Header: res.Header, 6913 HTTPStatusCode: res.StatusCode, 6914 }, 6915 } 6916 target := &ret 6917 if err := gensupport.DecodeResponse(target, res); err != nil { 6918 return nil, err 6919 } 6920 return ret, nil 6921 // { 6922 // "description": "Deletes the specified job.\n\nTypically, the job becomes unsearchable within 10 seconds, but it may take\nup to 5 minutes.", 6923 // "flatPath": "v2/jobs/{jobsId}", 6924 // "httpMethod": "DELETE", 6925 // "id": "jobs.jobs.delete", 6926 // "parameterOrder": [ 6927 // "name" 6928 // ], 6929 // "parameters": { 6930 // "disableFastProcess": { 6931 // "description": "Deprecated. This field is not working anymore.\n\nOptional.\n\nIf set to true, this call waits for all processing steps to complete\nbefore the job is cleaned up. Otherwise, the call returns while some\nsteps are still taking place asynchronously, hence faster.", 6932 // "location": "query", 6933 // "type": "boolean" 6934 // }, 6935 // "name": { 6936 // "description": "Required.\n\nThe resource name of the job to be deleted, such as \"jobs/11111111\".", 6937 // "location": "path", 6938 // "pattern": "^jobs/[^/]+$", 6939 // "required": true, 6940 // "type": "string" 6941 // } 6942 // }, 6943 // "path": "v2/{+name}", 6944 // "response": { 6945 // "$ref": "Empty" 6946 // }, 6947 // "scopes": [ 6948 // "https://www.googleapis.com/auth/cloud-platform", 6949 // "https://www.googleapis.com/auth/jobs" 6950 // ] 6951 // } 6952 6953} 6954 6955// method id "jobs.jobs.deleteByFilter": 6956 6957type JobsDeleteByFilterCall struct { 6958 s *Service 6959 deletejobsbyfilterrequest *DeleteJobsByFilterRequest 6960 urlParams_ gensupport.URLParams 6961 ctx_ context.Context 6962 header_ http.Header 6963} 6964 6965// DeleteByFilter: Deprecated. Use BatchDeleteJobs instead. 6966// 6967// Deletes the specified job by filter. You can specify whether 6968// to 6969// synchronously wait for validation, indexing, and general processing 6970// to be 6971// completed before the response is returned. 6972func (r *JobsService) DeleteByFilter(deletejobsbyfilterrequest *DeleteJobsByFilterRequest) *JobsDeleteByFilterCall { 6973 c := &JobsDeleteByFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6974 c.deletejobsbyfilterrequest = deletejobsbyfilterrequest 6975 return c 6976} 6977 6978// Fields allows partial responses to be retrieved. See 6979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6980// for more information. 6981func (c *JobsDeleteByFilterCall) Fields(s ...googleapi.Field) *JobsDeleteByFilterCall { 6982 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6983 return c 6984} 6985 6986// Context sets the context to be used in this call's Do method. Any 6987// pending HTTP request will be aborted if the provided context is 6988// canceled. 6989func (c *JobsDeleteByFilterCall) Context(ctx context.Context) *JobsDeleteByFilterCall { 6990 c.ctx_ = ctx 6991 return c 6992} 6993 6994// Header returns an http.Header that can be modified by the caller to 6995// add HTTP headers to the request. 6996func (c *JobsDeleteByFilterCall) Header() http.Header { 6997 if c.header_ == nil { 6998 c.header_ = make(http.Header) 6999 } 7000 return c.header_ 7001} 7002 7003func (c *JobsDeleteByFilterCall) doRequest(alt string) (*http.Response, error) { 7004 reqHeaders := make(http.Header) 7005 for k, v := range c.header_ { 7006 reqHeaders[k] = v 7007 } 7008 reqHeaders.Set("User-Agent", c.s.userAgent()) 7009 var body io.Reader = nil 7010 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deletejobsbyfilterrequest) 7011 if err != nil { 7012 return nil, err 7013 } 7014 reqHeaders.Set("Content-Type", "application/json") 7015 c.urlParams_.Set("alt", alt) 7016 c.urlParams_.Set("prettyPrint", "false") 7017 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs:deleteByFilter") 7018 urls += "?" + c.urlParams_.Encode() 7019 req, err := http.NewRequest("POST", urls, body) 7020 if err != nil { 7021 return nil, err 7022 } 7023 req.Header = reqHeaders 7024 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7025} 7026 7027// Do executes the "jobs.jobs.deleteByFilter" call. 7028// Exactly one of *Empty or error will be non-nil. Any non-2xx status 7029// code is an error. Response headers are in either 7030// *Empty.ServerResponse.Header or (if a response was returned at all) 7031// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7032// check whether the returned error was because http.StatusNotModified 7033// was returned. 7034func (c *JobsDeleteByFilterCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 7035 gensupport.SetOptions(c.urlParams_, opts...) 7036 res, err := c.doRequest("json") 7037 if res != nil && res.StatusCode == http.StatusNotModified { 7038 if res.Body != nil { 7039 res.Body.Close() 7040 } 7041 return nil, &googleapi.Error{ 7042 Code: res.StatusCode, 7043 Header: res.Header, 7044 } 7045 } 7046 if err != nil { 7047 return nil, err 7048 } 7049 defer googleapi.CloseBody(res) 7050 if err := googleapi.CheckResponse(res); err != nil { 7051 return nil, err 7052 } 7053 ret := &Empty{ 7054 ServerResponse: googleapi.ServerResponse{ 7055 Header: res.Header, 7056 HTTPStatusCode: res.StatusCode, 7057 }, 7058 } 7059 target := &ret 7060 if err := gensupport.DecodeResponse(target, res); err != nil { 7061 return nil, err 7062 } 7063 return ret, nil 7064 // { 7065 // "description": "Deprecated. Use BatchDeleteJobs instead.\n\nDeletes the specified job by filter. You can specify whether to\nsynchronously wait for validation, indexing, and general processing to be\ncompleted before the response is returned.", 7066 // "flatPath": "v2/jobs:deleteByFilter", 7067 // "httpMethod": "POST", 7068 // "id": "jobs.jobs.deleteByFilter", 7069 // "parameterOrder": [], 7070 // "parameters": {}, 7071 // "path": "v2/jobs:deleteByFilter", 7072 // "request": { 7073 // "$ref": "DeleteJobsByFilterRequest" 7074 // }, 7075 // "response": { 7076 // "$ref": "Empty" 7077 // }, 7078 // "scopes": [ 7079 // "https://www.googleapis.com/auth/cloud-platform", 7080 // "https://www.googleapis.com/auth/jobs" 7081 // ] 7082 // } 7083 7084} 7085 7086// method id "jobs.jobs.get": 7087 7088type JobsGetCall struct { 7089 s *Service 7090 name string 7091 urlParams_ gensupport.URLParams 7092 ifNoneMatch_ string 7093 ctx_ context.Context 7094 header_ http.Header 7095} 7096 7097// Get: Retrieves the specified job, whose status is OPEN or recently 7098// EXPIRED 7099// within the last 90 days. 7100func (r *JobsService) Get(name string) *JobsGetCall { 7101 c := &JobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7102 c.name = name 7103 return c 7104} 7105 7106// Fields allows partial responses to be retrieved. See 7107// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7108// for more information. 7109func (c *JobsGetCall) Fields(s ...googleapi.Field) *JobsGetCall { 7110 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7111 return c 7112} 7113 7114// IfNoneMatch sets the optional parameter which makes the operation 7115// fail if the object's ETag matches the given value. This is useful for 7116// getting updates only after the object has changed since the last 7117// request. Use googleapi.IsNotModified to check whether the response 7118// error from Do is the result of In-None-Match. 7119func (c *JobsGetCall) IfNoneMatch(entityTag string) *JobsGetCall { 7120 c.ifNoneMatch_ = entityTag 7121 return c 7122} 7123 7124// Context sets the context to be used in this call's Do method. Any 7125// pending HTTP request will be aborted if the provided context is 7126// canceled. 7127func (c *JobsGetCall) Context(ctx context.Context) *JobsGetCall { 7128 c.ctx_ = ctx 7129 return c 7130} 7131 7132// Header returns an http.Header that can be modified by the caller to 7133// add HTTP headers to the request. 7134func (c *JobsGetCall) Header() http.Header { 7135 if c.header_ == nil { 7136 c.header_ = make(http.Header) 7137 } 7138 return c.header_ 7139} 7140 7141func (c *JobsGetCall) doRequest(alt string) (*http.Response, error) { 7142 reqHeaders := make(http.Header) 7143 for k, v := range c.header_ { 7144 reqHeaders[k] = v 7145 } 7146 reqHeaders.Set("User-Agent", c.s.userAgent()) 7147 if c.ifNoneMatch_ != "" { 7148 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7149 } 7150 var body io.Reader = nil 7151 c.urlParams_.Set("alt", alt) 7152 c.urlParams_.Set("prettyPrint", "false") 7153 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 7154 urls += "?" + c.urlParams_.Encode() 7155 req, err := http.NewRequest("GET", urls, body) 7156 if err != nil { 7157 return nil, err 7158 } 7159 req.Header = reqHeaders 7160 googleapi.Expand(req.URL, map[string]string{ 7161 "name": c.name, 7162 }) 7163 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7164} 7165 7166// Do executes the "jobs.jobs.get" call. 7167// Exactly one of *Job or error will be non-nil. Any non-2xx status code 7168// is an error. Response headers are in either 7169// *Job.ServerResponse.Header or (if a response was returned at all) in 7170// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7171// whether the returned error was because http.StatusNotModified was 7172// returned. 7173func (c *JobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) { 7174 gensupport.SetOptions(c.urlParams_, opts...) 7175 res, err := c.doRequest("json") 7176 if res != nil && res.StatusCode == http.StatusNotModified { 7177 if res.Body != nil { 7178 res.Body.Close() 7179 } 7180 return nil, &googleapi.Error{ 7181 Code: res.StatusCode, 7182 Header: res.Header, 7183 } 7184 } 7185 if err != nil { 7186 return nil, err 7187 } 7188 defer googleapi.CloseBody(res) 7189 if err := googleapi.CheckResponse(res); err != nil { 7190 return nil, err 7191 } 7192 ret := &Job{ 7193 ServerResponse: googleapi.ServerResponse{ 7194 Header: res.Header, 7195 HTTPStatusCode: res.StatusCode, 7196 }, 7197 } 7198 target := &ret 7199 if err := gensupport.DecodeResponse(target, res); err != nil { 7200 return nil, err 7201 } 7202 return ret, nil 7203 // { 7204 // "description": "Retrieves the specified job, whose status is OPEN or recently EXPIRED\nwithin the last 90 days.", 7205 // "flatPath": "v2/jobs/{jobsId}", 7206 // "httpMethod": "GET", 7207 // "id": "jobs.jobs.get", 7208 // "parameterOrder": [ 7209 // "name" 7210 // ], 7211 // "parameters": { 7212 // "name": { 7213 // "description": "Required.\n\nThe resource name of the job to retrieve, such as \"jobs/11111111\".", 7214 // "location": "path", 7215 // "pattern": "^jobs/[^/]+$", 7216 // "required": true, 7217 // "type": "string" 7218 // } 7219 // }, 7220 // "path": "v2/{+name}", 7221 // "response": { 7222 // "$ref": "Job" 7223 // }, 7224 // "scopes": [ 7225 // "https://www.googleapis.com/auth/cloud-platform", 7226 // "https://www.googleapis.com/auth/jobs" 7227 // ] 7228 // } 7229 7230} 7231 7232// method id "jobs.jobs.histogram": 7233 7234type JobsHistogramCall struct { 7235 s *Service 7236 gethistogramrequest *GetHistogramRequest 7237 urlParams_ gensupport.URLParams 7238 ctx_ context.Context 7239 header_ http.Header 7240} 7241 7242// Histogram: Deprecated. Use SearchJobsRequest.histogram_facets instead 7243// to make 7244// a single call with both search and histogram. 7245// 7246// Retrieves a histogram for the given 7247// GetHistogramRequest. This call provides a structured 7248// count of jobs that match against the search query, grouped by 7249// specified 7250// facets. 7251// 7252// This call constrains the visibility of jobs 7253// present in the database, and only counts jobs the caller 7254// has 7255// permission to search against. 7256// 7257// For example, use this call to generate the 7258// number of jobs in the U.S. by state. 7259func (r *JobsService) Histogram(gethistogramrequest *GetHistogramRequest) *JobsHistogramCall { 7260 c := &JobsHistogramCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7261 c.gethistogramrequest = gethistogramrequest 7262 return c 7263} 7264 7265// Fields allows partial responses to be retrieved. See 7266// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7267// for more information. 7268func (c *JobsHistogramCall) Fields(s ...googleapi.Field) *JobsHistogramCall { 7269 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7270 return c 7271} 7272 7273// Context sets the context to be used in this call's Do method. Any 7274// pending HTTP request will be aborted if the provided context is 7275// canceled. 7276func (c *JobsHistogramCall) Context(ctx context.Context) *JobsHistogramCall { 7277 c.ctx_ = ctx 7278 return c 7279} 7280 7281// Header returns an http.Header that can be modified by the caller to 7282// add HTTP headers to the request. 7283func (c *JobsHistogramCall) Header() http.Header { 7284 if c.header_ == nil { 7285 c.header_ = make(http.Header) 7286 } 7287 return c.header_ 7288} 7289 7290func (c *JobsHistogramCall) doRequest(alt string) (*http.Response, error) { 7291 reqHeaders := make(http.Header) 7292 for k, v := range c.header_ { 7293 reqHeaders[k] = v 7294 } 7295 reqHeaders.Set("User-Agent", c.s.userAgent()) 7296 var body io.Reader = nil 7297 body, err := googleapi.WithoutDataWrapper.JSONReader(c.gethistogramrequest) 7298 if err != nil { 7299 return nil, err 7300 } 7301 reqHeaders.Set("Content-Type", "application/json") 7302 c.urlParams_.Set("alt", alt) 7303 c.urlParams_.Set("prettyPrint", "false") 7304 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs:histogram") 7305 urls += "?" + c.urlParams_.Encode() 7306 req, err := http.NewRequest("POST", urls, body) 7307 if err != nil { 7308 return nil, err 7309 } 7310 req.Header = reqHeaders 7311 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7312} 7313 7314// Do executes the "jobs.jobs.histogram" call. 7315// Exactly one of *GetHistogramResponse or error will be non-nil. Any 7316// non-2xx status code is an error. Response headers are in either 7317// *GetHistogramResponse.ServerResponse.Header or (if a response was 7318// returned at all) in error.(*googleapi.Error).Header. Use 7319// googleapi.IsNotModified to check whether the returned error was 7320// because http.StatusNotModified was returned. 7321func (c *JobsHistogramCall) Do(opts ...googleapi.CallOption) (*GetHistogramResponse, error) { 7322 gensupport.SetOptions(c.urlParams_, opts...) 7323 res, err := c.doRequest("json") 7324 if res != nil && res.StatusCode == http.StatusNotModified { 7325 if res.Body != nil { 7326 res.Body.Close() 7327 } 7328 return nil, &googleapi.Error{ 7329 Code: res.StatusCode, 7330 Header: res.Header, 7331 } 7332 } 7333 if err != nil { 7334 return nil, err 7335 } 7336 defer googleapi.CloseBody(res) 7337 if err := googleapi.CheckResponse(res); err != nil { 7338 return nil, err 7339 } 7340 ret := &GetHistogramResponse{ 7341 ServerResponse: googleapi.ServerResponse{ 7342 Header: res.Header, 7343 HTTPStatusCode: res.StatusCode, 7344 }, 7345 } 7346 target := &ret 7347 if err := gensupport.DecodeResponse(target, res); err != nil { 7348 return nil, err 7349 } 7350 return ret, nil 7351 // { 7352 // "description": "Deprecated. Use SearchJobsRequest.histogram_facets instead to make\na single call with both search and histogram.\n\nRetrieves a histogram for the given\nGetHistogramRequest. This call provides a structured\ncount of jobs that match against the search query, grouped by specified\nfacets.\n\nThis call constrains the visibility of jobs\npresent in the database, and only counts jobs the caller has\npermission to search against.\n\nFor example, use this call to generate the\nnumber of jobs in the U.S. by state.", 7353 // "flatPath": "v2/jobs:histogram", 7354 // "httpMethod": "POST", 7355 // "id": "jobs.jobs.histogram", 7356 // "parameterOrder": [], 7357 // "parameters": {}, 7358 // "path": "v2/jobs:histogram", 7359 // "request": { 7360 // "$ref": "GetHistogramRequest" 7361 // }, 7362 // "response": { 7363 // "$ref": "GetHistogramResponse" 7364 // }, 7365 // "scopes": [ 7366 // "https://www.googleapis.com/auth/cloud-platform", 7367 // "https://www.googleapis.com/auth/jobs" 7368 // ] 7369 // } 7370 7371} 7372 7373// method id "jobs.jobs.list": 7374 7375type JobsListCall struct { 7376 s *Service 7377 urlParams_ gensupport.URLParams 7378 ifNoneMatch_ string 7379 ctx_ context.Context 7380 header_ http.Header 7381} 7382 7383// List: Lists jobs by filter. 7384func (r *JobsService) List() *JobsListCall { 7385 c := &JobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7386 return c 7387} 7388 7389// Filter sets the optional parameter "filter": Required. 7390// 7391// The filter string specifies the jobs to be enumerated. 7392// 7393// Supported operator: =, AND 7394// 7395// The fields eligible for filtering are: 7396// 7397// * `companyName` (Required) 7398// * `requisitionId` (Optional) 7399// 7400// Sample Query: 7401// 7402// * companyName = "companies/123" 7403// * companyName = "companies/123" AND requisitionId = "req-1" 7404func (c *JobsListCall) Filter(filter string) *JobsListCall { 7405 c.urlParams_.Set("filter", filter) 7406 return c 7407} 7408 7409// IdsOnly sets the optional parameter "idsOnly": If set to `true`, only 7410// Job.name, Job.requisition_id and 7411// Job.language_code will be returned. 7412// 7413// A typical use case is to synchronize job repositories. 7414// 7415// Defaults to false. 7416func (c *JobsListCall) IdsOnly(idsOnly bool) *JobsListCall { 7417 c.urlParams_.Set("idsOnly", fmt.Sprint(idsOnly)) 7418 return c 7419} 7420 7421// PageSize sets the optional parameter "pageSize": The maximum number 7422// of jobs to be returned per page of results. 7423// 7424// If ids_only is set to true, the maximum allowed page size 7425// is 1000. Otherwise, the maximum allowed page size is 100. 7426// 7427// Default is 100 if empty or a number < 1 is specified. 7428func (c *JobsListCall) PageSize(pageSize int64) *JobsListCall { 7429 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7430 return c 7431} 7432 7433// PageToken sets the optional parameter "pageToken": The starting point 7434// of a query result. 7435func (c *JobsListCall) PageToken(pageToken string) *JobsListCall { 7436 c.urlParams_.Set("pageToken", pageToken) 7437 return c 7438} 7439 7440// Fields allows partial responses to be retrieved. See 7441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7442// for more information. 7443func (c *JobsListCall) Fields(s ...googleapi.Field) *JobsListCall { 7444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7445 return c 7446} 7447 7448// IfNoneMatch sets the optional parameter which makes the operation 7449// fail if the object's ETag matches the given value. This is useful for 7450// getting updates only after the object has changed since the last 7451// request. Use googleapi.IsNotModified to check whether the response 7452// error from Do is the result of In-None-Match. 7453func (c *JobsListCall) IfNoneMatch(entityTag string) *JobsListCall { 7454 c.ifNoneMatch_ = entityTag 7455 return c 7456} 7457 7458// Context sets the context to be used in this call's Do method. Any 7459// pending HTTP request will be aborted if the provided context is 7460// canceled. 7461func (c *JobsListCall) Context(ctx context.Context) *JobsListCall { 7462 c.ctx_ = ctx 7463 return c 7464} 7465 7466// Header returns an http.Header that can be modified by the caller to 7467// add HTTP headers to the request. 7468func (c *JobsListCall) Header() http.Header { 7469 if c.header_ == nil { 7470 c.header_ = make(http.Header) 7471 } 7472 return c.header_ 7473} 7474 7475func (c *JobsListCall) doRequest(alt string) (*http.Response, error) { 7476 reqHeaders := make(http.Header) 7477 for k, v := range c.header_ { 7478 reqHeaders[k] = v 7479 } 7480 reqHeaders.Set("User-Agent", c.s.userAgent()) 7481 if c.ifNoneMatch_ != "" { 7482 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7483 } 7484 var body io.Reader = nil 7485 c.urlParams_.Set("alt", alt) 7486 c.urlParams_.Set("prettyPrint", "false") 7487 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs") 7488 urls += "?" + c.urlParams_.Encode() 7489 req, err := http.NewRequest("GET", urls, body) 7490 if err != nil { 7491 return nil, err 7492 } 7493 req.Header = reqHeaders 7494 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7495} 7496 7497// Do executes the "jobs.jobs.list" call. 7498// Exactly one of *ListJobsResponse or error will be non-nil. Any 7499// non-2xx status code is an error. Response headers are in either 7500// *ListJobsResponse.ServerResponse.Header or (if a response was 7501// returned at all) in error.(*googleapi.Error).Header. Use 7502// googleapi.IsNotModified to check whether the returned error was 7503// because http.StatusNotModified was returned. 7504func (c *JobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) { 7505 gensupport.SetOptions(c.urlParams_, opts...) 7506 res, err := c.doRequest("json") 7507 if res != nil && res.StatusCode == http.StatusNotModified { 7508 if res.Body != nil { 7509 res.Body.Close() 7510 } 7511 return nil, &googleapi.Error{ 7512 Code: res.StatusCode, 7513 Header: res.Header, 7514 } 7515 } 7516 if err != nil { 7517 return nil, err 7518 } 7519 defer googleapi.CloseBody(res) 7520 if err := googleapi.CheckResponse(res); err != nil { 7521 return nil, err 7522 } 7523 ret := &ListJobsResponse{ 7524 ServerResponse: googleapi.ServerResponse{ 7525 Header: res.Header, 7526 HTTPStatusCode: res.StatusCode, 7527 }, 7528 } 7529 target := &ret 7530 if err := gensupport.DecodeResponse(target, res); err != nil { 7531 return nil, err 7532 } 7533 return ret, nil 7534 // { 7535 // "description": "Lists jobs by filter.", 7536 // "flatPath": "v2/jobs", 7537 // "httpMethod": "GET", 7538 // "id": "jobs.jobs.list", 7539 // "parameterOrder": [], 7540 // "parameters": { 7541 // "filter": { 7542 // "description": "Required.\n\nThe filter string specifies the jobs to be enumerated.\n\nSupported operator: =, AND\n\nThe fields eligible for filtering are:\n\n* `companyName` (Required)\n* `requisitionId` (Optional)\n\nSample Query:\n\n* companyName = \"companies/123\"\n* companyName = \"companies/123\" AND requisitionId = \"req-1\"", 7543 // "location": "query", 7544 // "type": "string" 7545 // }, 7546 // "idsOnly": { 7547 // "description": "Optional.\n\nIf set to `true`, only Job.name, Job.requisition_id and\nJob.language_code will be returned.\n\nA typical use case is to synchronize job repositories.\n\nDefaults to false.", 7548 // "location": "query", 7549 // "type": "boolean" 7550 // }, 7551 // "pageSize": { 7552 // "description": "Optional.\n\nThe maximum number of jobs to be returned per page of results.\n\nIf ids_only is set to true, the maximum allowed page size\nis 1000. Otherwise, the maximum allowed page size is 100.\n\nDefault is 100 if empty or a number \u003c 1 is specified.", 7553 // "format": "int32", 7554 // "location": "query", 7555 // "type": "integer" 7556 // }, 7557 // "pageToken": { 7558 // "description": "Optional.\n\nThe starting point of a query result.", 7559 // "location": "query", 7560 // "type": "string" 7561 // } 7562 // }, 7563 // "path": "v2/jobs", 7564 // "response": { 7565 // "$ref": "ListJobsResponse" 7566 // }, 7567 // "scopes": [ 7568 // "https://www.googleapis.com/auth/cloud-platform", 7569 // "https://www.googleapis.com/auth/jobs" 7570 // ] 7571 // } 7572 7573} 7574 7575// Pages invokes f for each page of results. 7576// A non-nil error returned from f will halt the iteration. 7577// The provided context supersedes any context provided to the Context method. 7578func (c *JobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error { 7579 c.ctx_ = ctx 7580 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7581 for { 7582 x, err := c.Do() 7583 if err != nil { 7584 return err 7585 } 7586 if err := f(x); err != nil { 7587 return err 7588 } 7589 if x.NextPageToken == "" { 7590 return nil 7591 } 7592 c.PageToken(x.NextPageToken) 7593 } 7594} 7595 7596// method id "jobs.jobs.patch": 7597 7598type JobsPatchCall struct { 7599 s *Service 7600 name string 7601 updatejobrequest *UpdateJobRequest 7602 urlParams_ gensupport.URLParams 7603 ctx_ context.Context 7604 header_ http.Header 7605} 7606 7607// Patch: Updates specified job. 7608// 7609// Typically, updated contents become visible in search results within 7610// 10 7611// seconds, but it may take up to 5 minutes. 7612func (r *JobsService) Patch(name string, updatejobrequest *UpdateJobRequest) *JobsPatchCall { 7613 c := &JobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7614 c.name = name 7615 c.updatejobrequest = updatejobrequest 7616 return c 7617} 7618 7619// Fields allows partial responses to be retrieved. See 7620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7621// for more information. 7622func (c *JobsPatchCall) Fields(s ...googleapi.Field) *JobsPatchCall { 7623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7624 return c 7625} 7626 7627// Context sets the context to be used in this call's Do method. Any 7628// pending HTTP request will be aborted if the provided context is 7629// canceled. 7630func (c *JobsPatchCall) Context(ctx context.Context) *JobsPatchCall { 7631 c.ctx_ = ctx 7632 return c 7633} 7634 7635// Header returns an http.Header that can be modified by the caller to 7636// add HTTP headers to the request. 7637func (c *JobsPatchCall) Header() http.Header { 7638 if c.header_ == nil { 7639 c.header_ = make(http.Header) 7640 } 7641 return c.header_ 7642} 7643 7644func (c *JobsPatchCall) doRequest(alt string) (*http.Response, error) { 7645 reqHeaders := make(http.Header) 7646 for k, v := range c.header_ { 7647 reqHeaders[k] = v 7648 } 7649 reqHeaders.Set("User-Agent", c.s.userAgent()) 7650 var body io.Reader = nil 7651 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatejobrequest) 7652 if err != nil { 7653 return nil, err 7654 } 7655 reqHeaders.Set("Content-Type", "application/json") 7656 c.urlParams_.Set("alt", alt) 7657 c.urlParams_.Set("prettyPrint", "false") 7658 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 7659 urls += "?" + c.urlParams_.Encode() 7660 req, err := http.NewRequest("PATCH", urls, body) 7661 if err != nil { 7662 return nil, err 7663 } 7664 req.Header = reqHeaders 7665 googleapi.Expand(req.URL, map[string]string{ 7666 "name": c.name, 7667 }) 7668 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7669} 7670 7671// Do executes the "jobs.jobs.patch" call. 7672// Exactly one of *Job or error will be non-nil. Any non-2xx status code 7673// is an error. Response headers are in either 7674// *Job.ServerResponse.Header or (if a response was returned at all) in 7675// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7676// whether the returned error was because http.StatusNotModified was 7677// returned. 7678func (c *JobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, error) { 7679 gensupport.SetOptions(c.urlParams_, opts...) 7680 res, err := c.doRequest("json") 7681 if res != nil && res.StatusCode == http.StatusNotModified { 7682 if res.Body != nil { 7683 res.Body.Close() 7684 } 7685 return nil, &googleapi.Error{ 7686 Code: res.StatusCode, 7687 Header: res.Header, 7688 } 7689 } 7690 if err != nil { 7691 return nil, err 7692 } 7693 defer googleapi.CloseBody(res) 7694 if err := googleapi.CheckResponse(res); err != nil { 7695 return nil, err 7696 } 7697 ret := &Job{ 7698 ServerResponse: googleapi.ServerResponse{ 7699 Header: res.Header, 7700 HTTPStatusCode: res.StatusCode, 7701 }, 7702 } 7703 target := &ret 7704 if err := gensupport.DecodeResponse(target, res); err != nil { 7705 return nil, err 7706 } 7707 return ret, nil 7708 // { 7709 // "description": "Updates specified job.\n\nTypically, updated contents become visible in search results within 10\nseconds, but it may take up to 5 minutes.", 7710 // "flatPath": "v2/jobs/{jobsId}", 7711 // "httpMethod": "PATCH", 7712 // "id": "jobs.jobs.patch", 7713 // "parameterOrder": [ 7714 // "name" 7715 // ], 7716 // "parameters": { 7717 // "name": { 7718 // "description": "Required during job update.\n\nResource name assigned to a job by the API, for example, \"/jobs/foo\". Use\nof this field in job queries and API calls is preferred over the use of\nrequisition_id since this value is unique.", 7719 // "location": "path", 7720 // "pattern": "^jobs/[^/]+$", 7721 // "required": true, 7722 // "type": "string" 7723 // } 7724 // }, 7725 // "path": "v2/{+name}", 7726 // "request": { 7727 // "$ref": "UpdateJobRequest" 7728 // }, 7729 // "response": { 7730 // "$ref": "Job" 7731 // }, 7732 // "scopes": [ 7733 // "https://www.googleapis.com/auth/cloud-platform", 7734 // "https://www.googleapis.com/auth/jobs" 7735 // ] 7736 // } 7737 7738} 7739 7740// method id "jobs.jobs.search": 7741 7742type JobsSearchCall struct { 7743 s *Service 7744 searchjobsrequest *SearchJobsRequest 7745 urlParams_ gensupport.URLParams 7746 ctx_ context.Context 7747 header_ http.Header 7748} 7749 7750// Search: Searches for jobs using the provided SearchJobsRequest. 7751// 7752// This call constrains the visibility of jobs 7753// present in the database, and only returns jobs that the caller 7754// has 7755// permission to search against. 7756func (r *JobsService) Search(searchjobsrequest *SearchJobsRequest) *JobsSearchCall { 7757 c := &JobsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7758 c.searchjobsrequest = searchjobsrequest 7759 return c 7760} 7761 7762// Fields allows partial responses to be retrieved. See 7763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7764// for more information. 7765func (c *JobsSearchCall) Fields(s ...googleapi.Field) *JobsSearchCall { 7766 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7767 return c 7768} 7769 7770// Context sets the context to be used in this call's Do method. Any 7771// pending HTTP request will be aborted if the provided context is 7772// canceled. 7773func (c *JobsSearchCall) Context(ctx context.Context) *JobsSearchCall { 7774 c.ctx_ = ctx 7775 return c 7776} 7777 7778// Header returns an http.Header that can be modified by the caller to 7779// add HTTP headers to the request. 7780func (c *JobsSearchCall) Header() http.Header { 7781 if c.header_ == nil { 7782 c.header_ = make(http.Header) 7783 } 7784 return c.header_ 7785} 7786 7787func (c *JobsSearchCall) doRequest(alt string) (*http.Response, error) { 7788 reqHeaders := make(http.Header) 7789 for k, v := range c.header_ { 7790 reqHeaders[k] = v 7791 } 7792 reqHeaders.Set("User-Agent", c.s.userAgent()) 7793 var body io.Reader = nil 7794 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchjobsrequest) 7795 if err != nil { 7796 return nil, err 7797 } 7798 reqHeaders.Set("Content-Type", "application/json") 7799 c.urlParams_.Set("alt", alt) 7800 c.urlParams_.Set("prettyPrint", "false") 7801 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs:search") 7802 urls += "?" + c.urlParams_.Encode() 7803 req, err := http.NewRequest("POST", urls, body) 7804 if err != nil { 7805 return nil, err 7806 } 7807 req.Header = reqHeaders 7808 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7809} 7810 7811// Do executes the "jobs.jobs.search" call. 7812// Exactly one of *SearchJobsResponse or error will be non-nil. Any 7813// non-2xx status code is an error. Response headers are in either 7814// *SearchJobsResponse.ServerResponse.Header or (if a response was 7815// returned at all) in error.(*googleapi.Error).Header. Use 7816// googleapi.IsNotModified to check whether the returned error was 7817// because http.StatusNotModified was returned. 7818func (c *JobsSearchCall) Do(opts ...googleapi.CallOption) (*SearchJobsResponse, error) { 7819 gensupport.SetOptions(c.urlParams_, opts...) 7820 res, err := c.doRequest("json") 7821 if res != nil && res.StatusCode == http.StatusNotModified { 7822 if res.Body != nil { 7823 res.Body.Close() 7824 } 7825 return nil, &googleapi.Error{ 7826 Code: res.StatusCode, 7827 Header: res.Header, 7828 } 7829 } 7830 if err != nil { 7831 return nil, err 7832 } 7833 defer googleapi.CloseBody(res) 7834 if err := googleapi.CheckResponse(res); err != nil { 7835 return nil, err 7836 } 7837 ret := &SearchJobsResponse{ 7838 ServerResponse: googleapi.ServerResponse{ 7839 Header: res.Header, 7840 HTTPStatusCode: res.StatusCode, 7841 }, 7842 } 7843 target := &ret 7844 if err := gensupport.DecodeResponse(target, res); err != nil { 7845 return nil, err 7846 } 7847 return ret, nil 7848 // { 7849 // "description": "Searches for jobs using the provided SearchJobsRequest.\n\nThis call constrains the visibility of jobs\npresent in the database, and only returns jobs that the caller has\npermission to search against.", 7850 // "flatPath": "v2/jobs:search", 7851 // "httpMethod": "POST", 7852 // "id": "jobs.jobs.search", 7853 // "parameterOrder": [], 7854 // "parameters": {}, 7855 // "path": "v2/jobs:search", 7856 // "request": { 7857 // "$ref": "SearchJobsRequest" 7858 // }, 7859 // "response": { 7860 // "$ref": "SearchJobsResponse" 7861 // }, 7862 // "scopes": [ 7863 // "https://www.googleapis.com/auth/cloud-platform", 7864 // "https://www.googleapis.com/auth/jobs" 7865 // ] 7866 // } 7867 7868} 7869 7870// Pages invokes f for each page of results. 7871// A non-nil error returned from f will halt the iteration. 7872// The provided context supersedes any context provided to the Context method. 7873func (c *JobsSearchCall) Pages(ctx context.Context, f func(*SearchJobsResponse) error) error { 7874 c.ctx_ = ctx 7875 defer func(pt string) { c.searchjobsrequest.PageToken = pt }(c.searchjobsrequest.PageToken) // reset paging to original point 7876 for { 7877 x, err := c.Do() 7878 if err != nil { 7879 return err 7880 } 7881 if err := f(x); err != nil { 7882 return err 7883 } 7884 if x.NextPageToken == "" { 7885 return nil 7886 } 7887 c.searchjobsrequest.PageToken = x.NextPageToken 7888 } 7889} 7890 7891// method id "jobs.jobs.searchForAlert": 7892 7893type JobsSearchForAlertCall struct { 7894 s *Service 7895 searchjobsrequest *SearchJobsRequest 7896 urlParams_ gensupport.URLParams 7897 ctx_ context.Context 7898 header_ http.Header 7899} 7900 7901// SearchForAlert: Searches for jobs using the provided 7902// SearchJobsRequest. 7903// 7904// This API call is intended for the use case of targeting passive 7905// job 7906// seekers (for example, job seekers who have signed up to receive 7907// email 7908// alerts about potential job opportunities), and has different 7909// algorithmic 7910// adjustments that are targeted to passive job seekers. 7911// 7912// This call constrains the visibility of jobs 7913// present in the database, and only returns jobs the caller 7914// has 7915// permission to search against. 7916func (r *JobsService) SearchForAlert(searchjobsrequest *SearchJobsRequest) *JobsSearchForAlertCall { 7917 c := &JobsSearchForAlertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7918 c.searchjobsrequest = searchjobsrequest 7919 return c 7920} 7921 7922// Fields allows partial responses to be retrieved. See 7923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7924// for more information. 7925func (c *JobsSearchForAlertCall) Fields(s ...googleapi.Field) *JobsSearchForAlertCall { 7926 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7927 return c 7928} 7929 7930// Context sets the context to be used in this call's Do method. Any 7931// pending HTTP request will be aborted if the provided context is 7932// canceled. 7933func (c *JobsSearchForAlertCall) Context(ctx context.Context) *JobsSearchForAlertCall { 7934 c.ctx_ = ctx 7935 return c 7936} 7937 7938// Header returns an http.Header that can be modified by the caller to 7939// add HTTP headers to the request. 7940func (c *JobsSearchForAlertCall) Header() http.Header { 7941 if c.header_ == nil { 7942 c.header_ = make(http.Header) 7943 } 7944 return c.header_ 7945} 7946 7947func (c *JobsSearchForAlertCall) doRequest(alt string) (*http.Response, error) { 7948 reqHeaders := make(http.Header) 7949 for k, v := range c.header_ { 7950 reqHeaders[k] = v 7951 } 7952 reqHeaders.Set("User-Agent", c.s.userAgent()) 7953 var body io.Reader = nil 7954 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchjobsrequest) 7955 if err != nil { 7956 return nil, err 7957 } 7958 reqHeaders.Set("Content-Type", "application/json") 7959 c.urlParams_.Set("alt", alt) 7960 c.urlParams_.Set("prettyPrint", "false") 7961 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/jobs:searchForAlert") 7962 urls += "?" + c.urlParams_.Encode() 7963 req, err := http.NewRequest("POST", urls, body) 7964 if err != nil { 7965 return nil, err 7966 } 7967 req.Header = reqHeaders 7968 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7969} 7970 7971// Do executes the "jobs.jobs.searchForAlert" call. 7972// Exactly one of *SearchJobsResponse or error will be non-nil. Any 7973// non-2xx status code is an error. Response headers are in either 7974// *SearchJobsResponse.ServerResponse.Header or (if a response was 7975// returned at all) in error.(*googleapi.Error).Header. Use 7976// googleapi.IsNotModified to check whether the returned error was 7977// because http.StatusNotModified was returned. 7978func (c *JobsSearchForAlertCall) Do(opts ...googleapi.CallOption) (*SearchJobsResponse, error) { 7979 gensupport.SetOptions(c.urlParams_, opts...) 7980 res, err := c.doRequest("json") 7981 if res != nil && res.StatusCode == http.StatusNotModified { 7982 if res.Body != nil { 7983 res.Body.Close() 7984 } 7985 return nil, &googleapi.Error{ 7986 Code: res.StatusCode, 7987 Header: res.Header, 7988 } 7989 } 7990 if err != nil { 7991 return nil, err 7992 } 7993 defer googleapi.CloseBody(res) 7994 if err := googleapi.CheckResponse(res); err != nil { 7995 return nil, err 7996 } 7997 ret := &SearchJobsResponse{ 7998 ServerResponse: googleapi.ServerResponse{ 7999 Header: res.Header, 8000 HTTPStatusCode: res.StatusCode, 8001 }, 8002 } 8003 target := &ret 8004 if err := gensupport.DecodeResponse(target, res); err != nil { 8005 return nil, err 8006 } 8007 return ret, nil 8008 // { 8009 // "description": "Searches for jobs using the provided SearchJobsRequest.\n\nThis API call is intended for the use case of targeting passive job\nseekers (for example, job seekers who have signed up to receive email\nalerts about potential job opportunities), and has different algorithmic\nadjustments that are targeted to passive job seekers.\n\nThis call constrains the visibility of jobs\npresent in the database, and only returns jobs the caller has\npermission to search against.", 8010 // "flatPath": "v2/jobs:searchForAlert", 8011 // "httpMethod": "POST", 8012 // "id": "jobs.jobs.searchForAlert", 8013 // "parameterOrder": [], 8014 // "parameters": {}, 8015 // "path": "v2/jobs:searchForAlert", 8016 // "request": { 8017 // "$ref": "SearchJobsRequest" 8018 // }, 8019 // "response": { 8020 // "$ref": "SearchJobsResponse" 8021 // }, 8022 // "scopes": [ 8023 // "https://www.googleapis.com/auth/cloud-platform", 8024 // "https://www.googleapis.com/auth/jobs" 8025 // ] 8026 // } 8027 8028} 8029 8030// Pages invokes f for each page of results. 8031// A non-nil error returned from f will halt the iteration. 8032// The provided context supersedes any context provided to the Context method. 8033func (c *JobsSearchForAlertCall) Pages(ctx context.Context, f func(*SearchJobsResponse) error) error { 8034 c.ctx_ = ctx 8035 defer func(pt string) { c.searchjobsrequest.PageToken = pt }(c.searchjobsrequest.PageToken) // reset paging to original point 8036 for { 8037 x, err := c.Do() 8038 if err != nil { 8039 return err 8040 } 8041 if err := f(x); err != nil { 8042 return err 8043 } 8044 if x.NextPageToken == "" { 8045 return nil 8046 } 8047 c.searchjobsrequest.PageToken = x.NextPageToken 8048 } 8049} 8050 8051// method id "jobs.complete": 8052 8053type V2CompleteCall struct { 8054 s *Service 8055 urlParams_ gensupport.URLParams 8056 ifNoneMatch_ string 8057 ctx_ context.Context 8058 header_ http.Header 8059} 8060 8061// Complete: Completes the specified prefix with job keyword 8062// suggestions. 8063// Intended for use by a job search auto-complete search box. 8064func (r *V2Service) Complete() *V2CompleteCall { 8065 c := &V2CompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8066 return c 8067} 8068 8069// CompanyName sets the optional parameter "companyName": If provided, 8070// restricts completion to the specified company. 8071func (c *V2CompleteCall) CompanyName(companyName string) *V2CompleteCall { 8072 c.urlParams_.Set("companyName", companyName) 8073 return c 8074} 8075 8076// LanguageCode sets the optional parameter "languageCode": 8077// Required. 8078// 8079// The language of the query. This is 8080// the BCP-47 language code, such as "en-US" or "sr-Latn". 8081// For more information, see 8082// [Tags for Identifying 8083// Languages](https://tools.ietf.org/html/bcp47). 8084// 8085// For CompletionType.JOB_TITLE type, only open jobs with 8086// same 8087// language_code are returned. 8088// 8089// For CompletionType.COMPANY_NAME type, 8090// only companies having open jobs with same language_code 8091// are 8092// returned. 8093// 8094// For CompletionType.COMBINED type, only open jobs with 8095// same 8096// language_code or companies having open jobs with same 8097// language_code are returned. 8098func (c *V2CompleteCall) LanguageCode(languageCode string) *V2CompleteCall { 8099 c.urlParams_.Set("languageCode", languageCode) 8100 return c 8101} 8102 8103// PageSize sets the optional parameter "pageSize": 8104// Required. 8105// 8106// Completion result count. 8107// The maximum allowed page size is 10. 8108func (c *V2CompleteCall) PageSize(pageSize int64) *V2CompleteCall { 8109 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8110 return c 8111} 8112 8113// Query sets the optional parameter "query": Required. 8114// 8115// The query used to generate suggestions. 8116func (c *V2CompleteCall) Query(query string) *V2CompleteCall { 8117 c.urlParams_.Set("query", query) 8118 return c 8119} 8120 8121// Scope sets the optional parameter "scope": The scope of the 8122// completion. The defaults is CompletionScope.PUBLIC. 8123// 8124// Possible values: 8125// "COMPLETION_SCOPE_UNSPECIFIED" 8126// "TENANT" 8127// "PUBLIC" 8128func (c *V2CompleteCall) Scope(scope string) *V2CompleteCall { 8129 c.urlParams_.Set("scope", scope) 8130 return c 8131} 8132 8133// Type sets the optional parameter "type": The completion topic. The 8134// default is CompletionType.COMBINED. 8135// 8136// Possible values: 8137// "COMPLETION_TYPE_UNSPECIFIED" 8138// "JOB_TITLE" 8139// "COMPANY_NAME" 8140// "COMBINED" 8141func (c *V2CompleteCall) Type(type_ string) *V2CompleteCall { 8142 c.urlParams_.Set("type", type_) 8143 return c 8144} 8145 8146// Fields allows partial responses to be retrieved. See 8147// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8148// for more information. 8149func (c *V2CompleteCall) Fields(s ...googleapi.Field) *V2CompleteCall { 8150 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8151 return c 8152} 8153 8154// IfNoneMatch sets the optional parameter which makes the operation 8155// fail if the object's ETag matches the given value. This is useful for 8156// getting updates only after the object has changed since the last 8157// request. Use googleapi.IsNotModified to check whether the response 8158// error from Do is the result of In-None-Match. 8159func (c *V2CompleteCall) IfNoneMatch(entityTag string) *V2CompleteCall { 8160 c.ifNoneMatch_ = entityTag 8161 return c 8162} 8163 8164// Context sets the context to be used in this call's Do method. Any 8165// pending HTTP request will be aborted if the provided context is 8166// canceled. 8167func (c *V2CompleteCall) Context(ctx context.Context) *V2CompleteCall { 8168 c.ctx_ = ctx 8169 return c 8170} 8171 8172// Header returns an http.Header that can be modified by the caller to 8173// add HTTP headers to the request. 8174func (c *V2CompleteCall) Header() http.Header { 8175 if c.header_ == nil { 8176 c.header_ = make(http.Header) 8177 } 8178 return c.header_ 8179} 8180 8181func (c *V2CompleteCall) doRequest(alt string) (*http.Response, error) { 8182 reqHeaders := make(http.Header) 8183 for k, v := range c.header_ { 8184 reqHeaders[k] = v 8185 } 8186 reqHeaders.Set("User-Agent", c.s.userAgent()) 8187 if c.ifNoneMatch_ != "" { 8188 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8189 } 8190 var body io.Reader = nil 8191 c.urlParams_.Set("alt", alt) 8192 c.urlParams_.Set("prettyPrint", "false") 8193 urls := googleapi.ResolveRelative(c.s.BasePath, "v2:complete") 8194 urls += "?" + c.urlParams_.Encode() 8195 req, err := http.NewRequest("GET", urls, body) 8196 if err != nil { 8197 return nil, err 8198 } 8199 req.Header = reqHeaders 8200 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8201} 8202 8203// Do executes the "jobs.complete" call. 8204// Exactly one of *CompleteQueryResponse or error will be non-nil. Any 8205// non-2xx status code is an error. Response headers are in either 8206// *CompleteQueryResponse.ServerResponse.Header or (if a response was 8207// returned at all) in error.(*googleapi.Error).Header. Use 8208// googleapi.IsNotModified to check whether the returned error was 8209// because http.StatusNotModified was returned. 8210func (c *V2CompleteCall) Do(opts ...googleapi.CallOption) (*CompleteQueryResponse, error) { 8211 gensupport.SetOptions(c.urlParams_, opts...) 8212 res, err := c.doRequest("json") 8213 if res != nil && res.StatusCode == http.StatusNotModified { 8214 if res.Body != nil { 8215 res.Body.Close() 8216 } 8217 return nil, &googleapi.Error{ 8218 Code: res.StatusCode, 8219 Header: res.Header, 8220 } 8221 } 8222 if err != nil { 8223 return nil, err 8224 } 8225 defer googleapi.CloseBody(res) 8226 if err := googleapi.CheckResponse(res); err != nil { 8227 return nil, err 8228 } 8229 ret := &CompleteQueryResponse{ 8230 ServerResponse: googleapi.ServerResponse{ 8231 Header: res.Header, 8232 HTTPStatusCode: res.StatusCode, 8233 }, 8234 } 8235 target := &ret 8236 if err := gensupport.DecodeResponse(target, res); err != nil { 8237 return nil, err 8238 } 8239 return ret, nil 8240 // { 8241 // "description": "Completes the specified prefix with job keyword suggestions.\nIntended for use by a job search auto-complete search box.", 8242 // "flatPath": "v2:complete", 8243 // "httpMethod": "GET", 8244 // "id": "jobs.complete", 8245 // "parameterOrder": [], 8246 // "parameters": { 8247 // "companyName": { 8248 // "description": "Optional.\n\nIf provided, restricts completion to the specified company.", 8249 // "location": "query", 8250 // "type": "string" 8251 // }, 8252 // "languageCode": { 8253 // "description": "Required.\n\nThe language of the query. This is\nthe BCP-47 language code, such as \"en-US\" or \"sr-Latn\".\nFor more information, see\n[Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).\n\nFor CompletionType.JOB_TITLE type, only open jobs with same\nlanguage_code are returned.\n\nFor CompletionType.COMPANY_NAME type,\nonly companies having open jobs with same language_code are\nreturned.\n\nFor CompletionType.COMBINED type, only open jobs with same\nlanguage_code or companies having open jobs with same\nlanguage_code are returned.", 8254 // "location": "query", 8255 // "type": "string" 8256 // }, 8257 // "pageSize": { 8258 // "description": "Required.\n\nCompletion result count.\nThe maximum allowed page size is 10.", 8259 // "format": "int32", 8260 // "location": "query", 8261 // "type": "integer" 8262 // }, 8263 // "query": { 8264 // "description": "Required.\n\nThe query used to generate suggestions.", 8265 // "location": "query", 8266 // "type": "string" 8267 // }, 8268 // "scope": { 8269 // "description": "Optional.\n\nThe scope of the completion. The defaults is CompletionScope.PUBLIC.", 8270 // "enum": [ 8271 // "COMPLETION_SCOPE_UNSPECIFIED", 8272 // "TENANT", 8273 // "PUBLIC" 8274 // ], 8275 // "location": "query", 8276 // "type": "string" 8277 // }, 8278 // "type": { 8279 // "description": "Optional.\n\nThe completion topic. The default is CompletionType.COMBINED.", 8280 // "enum": [ 8281 // "COMPLETION_TYPE_UNSPECIFIED", 8282 // "JOB_TITLE", 8283 // "COMPANY_NAME", 8284 // "COMBINED" 8285 // ], 8286 // "location": "query", 8287 // "type": "string" 8288 // } 8289 // }, 8290 // "path": "v2:complete", 8291 // "response": { 8292 // "$ref": "CompleteQueryResponse" 8293 // }, 8294 // "scopes": [ 8295 // "https://www.googleapis.com/auth/cloud-platform", 8296 // "https://www.googleapis.com/auth/jobs" 8297 // ] 8298 // } 8299 8300} 8301