From f615c91f7893e6be02ddaaeb45bdaa8f16bd6214 Mon Sep 17 00:00:00 2001 From: Yoshi Yamaguchi Date: Wed, 3 Jul 2024 15:48:58 +0900 Subject: [PATCH] fixit: migrate to new region tag with prefix 'job_' (#4227) --- jobs/v3/howto/basic_company_sample.go | 12 ------------ jobs/v3/howto/basic_job_sample.go | 8 -------- jobs/v3/howto/custom_attribute_sample.go | 8 -------- jobs/v3/howto/location_based_search_sample.go | 16 ++++++++++------ 4 files changed, 10 insertions(+), 34 deletions(-) diff --git a/jobs/v3/howto/basic_company_sample.go b/jobs/v3/howto/basic_company_sample.go index 2c1662c575..ca7b096003 100644 --- a/jobs/v3/howto/basic_company_sample.go +++ b/jobs/v3/howto/basic_company_sample.go @@ -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) { @@ -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) { @@ -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) { @@ -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. @@ -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 { @@ -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) { @@ -207,5 +196,4 @@ func listCompanies(w io.Writer, projectID string) (*talent.ListCompaniesResponse return resp, nil } -// [END list_companies] // [END job_list_companies] diff --git a/jobs/v3/howto/basic_job_sample.go b/jobs/v3/howto/basic_job_sample.go index 07fcd48394..8e8dd7ef01 100644 --- a/jobs/v3/howto/basic_job_sample.go +++ b/jobs/v3/howto/basic_job_sample.go @@ -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) { @@ -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. @@ -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 { @@ -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"`. @@ -206,5 +199,4 @@ func listJobs(w io.Writer, projectID, filter string) (*talent.ListJobsResponse, return resp, err } -// [END list_jobs] // [END job_list_jobs] diff --git a/jobs/v3/howto/custom_attribute_sample.go b/jobs/v3/howto/custom_attribute_sample.go index 7d5d638596..8d95cba330 100644 --- a/jobs/v3/howto/custom_attribute_sample.go +++ b/jobs/v3/howto/custom_attribute_sample.go @@ -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 { @@ -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. @@ -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. @@ -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. @@ -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] diff --git a/jobs/v3/howto/location_based_search_sample.go b/jobs/v3/howto/location_based_search_sample.go index 8328612cb1..e23162e763 100644 --- a/jobs/v3/howto/location_based_search_sample.go +++ b/jobs/v3/howto/location_based_search_sample.go @@ -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) { @@ -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. @@ -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 @@ -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. @@ -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. @@ -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]