You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

8031 lines
278 KiB

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