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