Skip to content

Commit

Permalink
fixit: migrate to new region tag with prefix 'job_' (GoogleCloudPlatf…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshi Yamaguchi authored Jul 3, 2024
1 parent 7881d74 commit f615c91
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 34 deletions.
12 changes: 0 additions & 12 deletions jobs/v3/howto/basic_company_sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
)

// [START job_create_company]
// [START create_company]

// createCompany creates a company as given.
func createCompany(w io.Writer, projectID string, companyToCreate *talent.Company) (*talent.Company, error) {
Expand Down Expand Up @@ -52,11 +51,9 @@ func createCompany(w io.Writer, projectID string, companyToCreate *talent.Compan
return company, nil
}

// [END create_company]
// [END job_create_company]

// [START job_get_company]
// [START get_company]

// getCompany gets an existing company by name.
func getCompany(w io.Writer, name string) (*talent.Company, error) {
Expand All @@ -82,11 +79,9 @@ func getCompany(w io.Writer, name string) (*talent.Company, error) {
return company, nil
}

// [END get_company]
// [END job_get_company]

// [START job_update_company]
// [START update_company]

// updateCompany update a company with all fields.
func updateCompany(w io.Writer, name string, companyToUpdate *talent.Company) (*talent.Company, error) {
Expand All @@ -113,11 +108,9 @@ func updateCompany(w io.Writer, name string, companyToUpdate *talent.Company) (*
return company, nil
}

// [END update_company]
// [END job_update_company]

// [START job_update_company_with_field_mask]
// [START update_company_with_field_mask]

// updateCompanyWithMask updates a company with specific fields.
// mask is a comma separated list of top-level fields of talent.Company.
Expand Down Expand Up @@ -146,11 +139,9 @@ func updateCompanyWithMask(w io.Writer, name string, mask string, companyToUpdat
return company, nil
}

// [END update_company_with_field_mask]
// [END job_update_company_with_field_mask]

// [START job_delete_company]
// [START delete_company]

// deleteCompany deletes an existing company by name.
func deleteCompany(w io.Writer, name string) error {
Expand All @@ -173,11 +164,9 @@ func deleteCompany(w io.Writer, name string) error {
return nil
}

// [END delete_company]
// [END job_delete_company]

// [START job_list_companies]
// [START list_companies]

// listCompanies lists all companies in the project.
func listCompanies(w io.Writer, projectID string) (*talent.ListCompaniesResponse, error) {
Expand Down Expand Up @@ -207,5 +196,4 @@ func listCompanies(w io.Writer, projectID string) (*talent.ListCompaniesResponse
return resp, nil
}

// [END list_companies]
// [END job_list_companies]
8 changes: 0 additions & 8 deletions jobs/v3/howto/basic_job_sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func getJob(w io.Writer, jobName string) (*talent.Job, error) {
// [END job_get_job]

// [START job_update_job]
// [START update_job]

// updateJob update a job with all fields except name.
func updateJob(w io.Writer, jobName string, jobToUpdate *talent.Job) (*talent.Job, error) {
Expand All @@ -111,11 +110,9 @@ func updateJob(w io.Writer, jobName string, jobToUpdate *talent.Job) (*talent.Jo
return job, err
}

// [END update_job]
// [END job_update_job]

// [START job_update_job_with_field_mask]
// [START update_job_with_field_mask]

// updateJobWithMask updates a job by name with specific fields.
// mask is a comma separated list top-level fields of talent.Job.
Expand Down Expand Up @@ -144,11 +141,9 @@ func updateJobWithMask(w io.Writer, jobName string, mask string, jobToUpdate *ta
return job, err
}

// [END update_job_with_field_mask]
// [END job_update_job_with_field_mask]

// [START job_delete_job]
// [START delete_job]

// deleteJob deletes an existing job by name.
func deleteJob(w io.Writer, jobName string) error {
Expand All @@ -171,11 +166,9 @@ func deleteJob(w io.Writer, jobName string) error {
return err
}

// [END delete_job]
// [END job_delete_job]

// [START job_list_jobs]
// [START list_jobs]

// listJobs lists jobs with a filter, for example
// `companyName="projects/my-project/companies/123"`.
Expand Down Expand Up @@ -206,5 +199,4 @@ func listJobs(w io.Writer, projectID, filter string) (*talent.ListJobsResponse,
return resp, err
}

// [END list_jobs]
// [END job_list_jobs]
8 changes: 0 additions & 8 deletions jobs/v3/howto/custom_attribute_sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
)

// [START job_custom_attribute_job]
// [START custom_attribute_job]

// constructJobWithCustomAttributes constructs a job with custom attributes.
func constructJobWithCustomAttributes(companyName string, jobTitle string) *talent.Job {
Expand Down Expand Up @@ -54,11 +53,9 @@ func constructJobWithCustomAttributes(companyName string, jobTitle string) *tale
return job
}

// [END custom_attribute_job]
// [END job_custom_attribute_job]

// [START job_custom_attribute_filter_string_value]
// [START custom_attribute_filter_string_value]

// filterOnStringValueCustomAttribute searches for jobs on a string value custom
// atrribute.
Expand Down Expand Up @@ -105,11 +102,9 @@ func filterOnStringValueCustomAttribute(w io.Writer, projectID string) (*talent.
return resp, nil
}

// [END custom_attribute_filter_string_value]
// [END job_custom_attribute_filter_string_value]

// [START job_custom_attribute_filter_long_value]
// [START custom_attribute_filter_long_value]

// filterOnLongValueCustomAttribute searches for jobs on a long value custom
// atrribute.
Expand Down Expand Up @@ -157,10 +152,8 @@ func filterOnLongValueCustomAttribute(w io.Writer, projectID string) (*talent.Se
}

// [END job_custom_attribute_filter_long_value]
// [END custom_attribute_filter_long_value]

// [START job_custom_attribute_filter_multi_attributes]
// [START custom_attribute_filter_multi_attributes]

// filterOnLongValueCustomAttribute searches for jobs on multiple custom
// atrributes.
Expand Down Expand Up @@ -207,5 +200,4 @@ func filterOnMultiCustomAttributes(w io.Writer, projectID string) (*talent.Searc
return resp, nil
}

// [END custom_attribute_filter_multi_attributes]
// [END job_custom_attribute_filter_multi_attributes]
16 changes: 10 additions & 6 deletions jobs/v3/howto/location_based_search_sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
talent "google.golang.org/api/jobs/v3"
)

// [START basic_location_search]
// [START job_basic_location_search]

// basicLocationSearch searches for jobs within distance of location.
func basicLocationSearch(w io.Writer, projectID, companyName, location string, distance float64) (*talent.SearchJobsResponse, error) {
Expand Down Expand Up @@ -82,8 +82,9 @@ func basicLocationSearch(w io.Writer, projectID, companyName, location string, d
return resp, nil
}

// [END basic_location_search]
// [END job_basic_location_search]

// [START job_city_location_search]
// [START city_location_search]

// cityLocationSearch searches for jobs in the same city of given location.
Expand Down Expand Up @@ -143,7 +144,9 @@ func cityLocationSearch(w io.Writer, projectID, companyName, location string) (*
}

// [END city_location_search]
// [END job_city_location_search]

// [START job_broadening_location_search]
// [START broadening_location_search]

// broadeningLocationSearch searches for jobs with a broadening area of given
Expand Down Expand Up @@ -205,8 +208,9 @@ func broadeningLocationSearch(w io.Writer, projectID, companyName, location stri
}

// [END broadening_location_search]
// [END job_broadening_location_search]

// [START keyword_location_search]
// [START job_keyword_location_search]

// keywordLocationSearch searches for jobs with given keyword and within the
// distance of given location.
Expand Down Expand Up @@ -267,9 +271,9 @@ func keywordLocationSearch(w io.Writer, projectID, companyName, location string,
return resp, nil
}

// [END keyword_location_search]
// [END job_keyword_location_search]

// [START multi_locations_search]
// [START job_multi_locations_search]

// multiLocationsSearch searches for jobs that fall in the distance of any given
// locations.
Expand Down Expand Up @@ -333,4 +337,4 @@ func multiLocationsSearch(w io.Writer, projectID, companyName, location, locatio
return resp, nil
}

// [END multi_locations_search]
// [END job_multi_locations_search]

0 comments on commit f615c91

Please sign in to comment.