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