Skip to content

Commit d9aa208

Browse files
committed
chore(refactor): Changing name of sample region for Job product
1 parent f5d43e6 commit d9aa208

12 files changed

+100
-100
lines changed

jobs/v3/api_client/auto_complete_sample.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# [START instantiate]
17+
# [START job_instantiate]
1818
import os
1919
import time
2020

2121
from googleapiclient.discovery import build
2222

2323
client_service = build('jobs', 'v3')
2424
name = 'projects/' + os.environ['GOOGLE_CLOUD_PROJECT']
25-
# [END instantiate]
25+
# [END job_instantiate]
2626

2727

28-
# [START auto_complete_job_title]
28+
# [START job_auto_complete_job_title]
2929
def job_title_auto_complete(client_service, query, company_name):
3030
complete = client_service.projects().complete(
3131
name=name, query=query,
@@ -35,10 +35,10 @@ def job_title_auto_complete(client_service, query, company_name):
3535

3636
results = complete.execute()
3737
print(results)
38-
# [END auto_complete_job_title]
38+
# [END job_auto_complete_job_title]
3939

4040

41-
# [START auto_complete_default]
41+
# [START job_auto_complete_default]
4242
def auto_complete_default(client_service, query, company_name):
4343
complete = client_service.projects().complete(
4444
name=name, query=query, languageCode='en-US', pageSize=10)
@@ -47,7 +47,7 @@ def auto_complete_default(client_service, query, company_name):
4747

4848
results = complete.execute()
4949
print(results)
50-
# [END auto_complete_default]
50+
# [END job_auto_complete_default]
5151

5252

5353
def set_up():

jobs/v3/api_client/base_company_sample.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717

18-
# [START jobs_instantiate]
18+
# [START job_jobs_instantiate]
1919
import os
2020
import random
2121
import string
@@ -26,10 +26,10 @@
2626
client_service = build('jobs', 'v3')
2727
parent = 'projects/' + os.environ['GOOGLE_CLOUD_PROJECT']
2828

29-
# [END jobs_instantiate]
29+
# [END job_jobs_instantiate]
3030

3131

32-
# [START jobs_basic_company]
32+
# [START job_jobs_basic_company]
3333
def generate_company():
3434
# external id should be a unique Id in your system.
3535
external_id = 'company:' + ''.join(
@@ -46,10 +46,10 @@ def generate_company():
4646
}
4747
print('Company generated: %s' % company)
4848
return company
49-
# [END jobs_basic_company]
49+
# [END job_jobs_basic_company]
5050

5151

52-
# [START jobs_create_company]
52+
# [START job_jobs_create_company]
5353
def create_company(client_service, company_to_be_created):
5454
try:
5555
request = {'company': company_to_be_created}
@@ -60,10 +60,10 @@ def create_company(client_service, company_to_be_created):
6060
except Error as e:
6161
print('Got exception while creating company')
6262
raise e
63-
# [END jobs_create_company]
63+
# [END job_jobs_create_company]
6464

6565

66-
# [START jobs_get_company]
66+
# [START job_jobs_get_company]
6767
def get_company(client_service, company_name):
6868
try:
6969
company_existed = client_service.projects().companies().get(
@@ -73,10 +73,10 @@ def get_company(client_service, company_name):
7373
except Error as e:
7474
print('Got exception while getting company')
7575
raise e
76-
# [END jobs_get_company]
76+
# [END job_jobs_get_company]
7777

7878

79-
# [START jobs_update_company]
79+
# [START job_jobs_update_company]
8080
def update_company(client_service, company_name, company_to_be_updated):
8181
try:
8282
request = {'company': company_to_be_updated}
@@ -87,10 +87,10 @@ def update_company(client_service, company_name, company_to_be_updated):
8787
except Error as e:
8888
print('Got exception while updating company')
8989
raise e
90-
# [END jobs_update_company]
90+
# [END job_jobs_update_company]
9191

9292

93-
# [START jobs_update_company_with_field_mask]
93+
# [START job_jobs_update_company_with_field_mask]
9494
def update_company_with_field_mask(client_service, company_name,
9595
company_to_be_updated, field_mask):
9696
try:
@@ -106,10 +106,10 @@ def update_company_with_field_mask(client_service, company_name,
106106
except Error as e:
107107
print('Got exception while updating company with field mask')
108108
raise e
109-
# [END jobs_update_company_with_field_mask]
109+
# [END job_jobs_update_company_with_field_mask]
110110

111111

112-
# [START jobs_delete_company]
112+
# [START job_jobs_delete_company]
113113
def delete_company(client_service, company_name):
114114
try:
115115
client_service.projects().companies().delete(
@@ -118,7 +118,7 @@ def delete_company(client_service, company_name):
118118
except Error as e:
119119
print('Got exception while deleting company')
120120
raise e
121-
# [END jobs_delete_company]
121+
# [END job_jobs_delete_company]
122122

123123

124124
def run_sample():

jobs/v3/api_client/base_job_sample.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# [START instantiate]
17+
# [START job_instantiate]
1818
import os
1919
import random
2020
import string
@@ -24,10 +24,10 @@
2424

2525
client_service = build('jobs', 'v3')
2626
parent = 'projects/' + os.environ['GOOGLE_CLOUD_PROJECT']
27-
# [END instantiate]
27+
# [END job_instantiate]
2828

2929

30-
# [START basic_job]
30+
# [START job_basic_job]
3131
def generate_job_with_required_fields(company_name):
3232
# Requisition id should be a unique Id in your system.
3333
requisition_id = 'job_with_required_fields:' + ''.join(
@@ -48,10 +48,10 @@ def generate_job_with_required_fields(company_name):
4848
}
4949
print('Job generated: %s' % job)
5050
return job
51-
# [END basic_job]
51+
# [END job_basic_job]
5252

5353

54-
# [START create_job]
54+
# [START job_create_job]
5555
def create_job(client_service, job_to_be_created):
5656
try:
5757
request = {'job': job_to_be_created}
@@ -62,10 +62,10 @@ def create_job(client_service, job_to_be_created):
6262
except Error as e:
6363
print('Got exception while creating job')
6464
raise e
65-
# [END create_job]
65+
# [END job_create_job]
6666

6767

68-
# [START get_job]
68+
# [START job_get_job]
6969
def get_job(client_service, job_name):
7070
try:
7171
job_existed = client_service.projects().jobs().get(
@@ -75,10 +75,10 @@ def get_job(client_service, job_name):
7575
except Error as e:
7676
print('Got exception while getting job')
7777
raise e
78-
# [END get_job]
78+
# [END job_get_job]
7979

8080

81-
# [START update_job]
81+
# [START job_update_job]
8282
def update_job(client_service, job_name, job_to_be_updated):
8383
try:
8484
request = {'job': job_to_be_updated}
@@ -89,10 +89,10 @@ def update_job(client_service, job_name, job_to_be_updated):
8989
except Error as e:
9090
print('Got exception while updating job')
9191
raise e
92-
# [END update_job]
92+
# [END job_update_job]
9393

9494

95-
# [START update_job_with_field_mask]
95+
# [START job_update_job_with_field_mask]
9696
def update_job_with_field_mask(client_service, job_name, job_to_be_updated,
9797
field_mask):
9898
try:
@@ -104,18 +104,18 @@ def update_job_with_field_mask(client_service, job_name, job_to_be_updated,
104104
except Error as e:
105105
print('Got exception while updating job with field mask')
106106
raise e
107-
# [END update_job_with_field_mask]
107+
# [END job_update_job_with_field_mask]
108108

109109

110-
# [START delete_job]
110+
# [START job_delete_job]
111111
def delete_job(client_service, job_name):
112112
try:
113113
client_service.projects().jobs().delete(name=job_name).execute()
114114
print('Job deleted')
115115
except Error as e:
116116
print('Got exception while deleting job')
117117
raise e
118-
# [END delete_job]
118+
# [END job_delete_job]
119119

120120

121121
def run_sample():

jobs/v3/api_client/batch_operation_sample.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# [START instantiate]
17+
# [START job_instantiate]
1818
import os
1919

2020
from googleapiclient.discovery import build
2121

2222
client_service = build('jobs', 'v3')
2323
parent = 'projects/' + os.environ['GOOGLE_CLOUD_PROJECT']
24-
# [END instantiate]
24+
# [END job_instantiate]
2525

2626

27-
# [START batch_job_create]
27+
# [START job_batch_job_create]
2828
def batch_job_create(client_service, company_name):
2929
import base_job_sample
3030
created_jobs = []
@@ -55,10 +55,10 @@ def job_create_callback(request_id, response, exception):
5555
batch.execute()
5656

5757
return created_jobs
58-
# [END batch_job_create]
58+
# [END job_batch_job_create]
5959

6060

61-
# [START batch_job_update]
61+
# [START job_batch_job_update]
6262
def batch_job_update(client_service, jobs_to_be_updated):
6363
updated_jobs = []
6464

@@ -91,10 +91,10 @@ def job_update_callback(request_id, response, exception):
9191
batch.execute()
9292

9393
return updated_jobs
94-
# [END batch_job_update]
94+
# [END job_batch_job_update]
9595

9696

97-
# [START batch_job_delete]
97+
# [START job_batch_job_delete]
9898
def batch_job_delete(client_service, jobs_to_be_deleted):
9999

100100
def job_delete_callback(request_id, response, exception):
@@ -113,7 +113,7 @@ def job_delete_callback(request_id, response, exception):
113113
callback=job_delete_callback)
114114

115115
batch.execute()
116-
# [END batch_job_delete]
116+
# [END job_batch_job_delete]
117117

118118

119119
def run_sample():

jobs/v3/api_client/commute_search_sample.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# [START instantiate]
17+
# [START job_instantiate]
1818
import os
1919
import time
2020

2121
from googleapiclient.discovery import build
2222
client_service = build('jobs', 'v3')
2323
parent = 'projects/' + os.environ['GOOGLE_CLOUD_PROJECT']
24-
# [END instantiate]
24+
# [END job_instantiate]
2525

2626

27-
# [START commute_search]
27+
# [START job_commute_search]
2828
def commute_search(client_service, company_name):
2929
request_metadata = {
3030
'user_id': 'HashedUserId',
@@ -50,7 +50,7 @@ def commute_search(client_service, company_name):
5050
response = client_service.projects().jobs().search(
5151
parent=parent, body=request).execute()
5252
print(response)
53-
# [END commute_search]
53+
# [END job_commute_search]
5454

5555

5656
def set_up():

jobs/v3/api_client/custom_attribute_sample.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717

18-
# [START instantiate]
18+
# [START job_instantiate]
1919
import os
2020
import random
2121
import string
@@ -25,10 +25,10 @@
2525

2626
client_service = build('jobs', 'v3')
2727
parent = 'projects/' + os.environ['GOOGLE_CLOUD_PROJECT']
28-
# [END instantiate]
28+
# [END job_instantiate]
2929

3030

31-
# [START custom_attribute_job]
31+
# [START job_custom_attribute_job]
3232
def generate_job_with_custom_attributes(company_name):
3333
# Requisition id should be a unique Id in your system.
3434
requisition_id = 'job_with_custom_attributes:' + ''.join(
@@ -61,10 +61,10 @@ def generate_job_with_custom_attributes(company_name):
6161
}
6262
print('Job generated: %s' % job)
6363
return job
64-
# [END custom_attribute_job]
64+
# [END job_custom_attribute_job]
6565

6666

67-
# [START custom_attribute_filter_string_value]
67+
# [START job_custom_attribute_filter_string_value]
6868
def custom_attribute_filter_string_value(client_service):
6969
request_metadata = {
7070
'user_id': 'HashedUserId',
@@ -83,10 +83,10 @@ def custom_attribute_filter_string_value(client_service):
8383
response = client_service.projects().jobs().search(
8484
parent=parent, body=request).execute()
8585
print(response)
86-
# [END custom_attribute_filter_string_value]
86+
# [END job_custom_attribute_filter_string_value]
8787

8888

89-
# [START custom_attribute_filter_long_value]
89+
# [START job_custom_attribute_filter_long_value]
9090
def custom_attribute_filter_long_value(client_service):
9191
request_metadata = {
9292
'user_id': 'HashedUserId',
@@ -106,10 +106,10 @@ def custom_attribute_filter_long_value(client_service):
106106
response = client_service.projects().jobs().search(
107107
parent=parent, body=request).execute()
108108
print(response)
109-
# [END custom_attribute_filter_long_value]
109+
# [END job_custom_attribute_filter_long_value]
110110

111111

112-
# [START custom_attribute_filter_multi_attributes]
112+
# [START job_custom_attribute_filter_multi_attributes]
113113
def custom_attribute_filter_multi_attributes(client_service):
114114
request_metadata = {
115115
'user_id': 'HashedUserId',
@@ -130,7 +130,7 @@ def custom_attribute_filter_multi_attributes(client_service):
130130
response = client_service.projects().jobs().search(
131131
parent=parent, body=request).execute()
132132
print(response)
133-
# [END custom_attribute_filter_multi_attributes]
133+
# [END job_custom_attribute_filter_multi_attributes]
134134

135135

136136
def set_up():

0 commit comments

Comments
 (0)