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.
 
 
 

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