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.
 
 
 

6965 lines
245 KiB

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