Skip to content

Commit 11b9b88

Browse files
chore(job): migrate regions step 3 - remove regions in base_company_sample.py & custom_attribute_sample.py (#13030)
* chore(job): migrate regions step 3 - remove regions in base_company_sample.py * chore(job): migrate regions step 3 - remove regions in custom_attribute_sample.py
1 parent 4ab8b31 commit 11b9b88

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

jobs/v3/api_client/base_company_sample.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828

2929
# [START job_basic_company]
30-
# [START jobs_basic_company]
3130
def generate_company():
3231
# external id should be a unique Id in your system.
3332
external_id = "company:" + "".join(
@@ -44,14 +43,10 @@ def generate_company():
4443
}
4544
print("Company generated: %s" % company)
4645
return company
47-
48-
49-
# [END jobs_basic_company]
5046
# [END job_basic_company]
5147

5248

5349
# [START job_create_company]
54-
# [START jobs_create_company]
5550
def create_company(client_service, company_to_be_created):
5651
try:
5752
request = {"company": company_to_be_created}
@@ -66,14 +61,10 @@ def create_company(client_service, company_to_be_created):
6661
except Error as e:
6762
print("Got exception while creating company")
6863
raise e
69-
70-
71-
# [END jobs_create_company]
7264
# [END job_create_company]
7365

7466

7567
# [START job_get_company]
76-
# [START jobs_get_company]
7768
def get_company(client_service, company_name):
7869
try:
7970
company_existed = (
@@ -84,14 +75,10 @@ def get_company(client_service, company_name):
8475
except Error as e:
8576
print("Got exception while getting company")
8677
raise e
87-
88-
89-
# [END jobs_get_company]
9078
# [END job_get_company]
9179

9280

9381
# [START job_update_company]
94-
# [START jobs_update_company]
9582
def update_company(client_service, company_name, company_to_be_updated):
9683
try:
9784
request = {"company": company_to_be_updated}
@@ -106,14 +93,10 @@ def update_company(client_service, company_name, company_to_be_updated):
10693
except Error as e:
10794
print("Got exception while updating company")
10895
raise e
109-
110-
111-
# [END jobs_update_company]
11296
# [END job_update_company]
11397

11498

11599
# [START job_update_company_with_field_mask]
116-
# [START jobs_update_company_with_field_mask]
117100
def update_company_with_field_mask(
118101
client_service, company_name, company_to_be_updated, field_mask
119102
):
@@ -130,24 +113,17 @@ def update_company_with_field_mask(
130113
except Error as e:
131114
print("Got exception while updating company with field mask")
132115
raise e
133-
134-
135-
# [END jobs_update_company_with_field_mask]
136116
# [END job_update_company_with_field_mask]
137117

138118

139119
# [START job_delete_company]
140-
# [START jobs_delete_company]
141120
def delete_company(client_service, company_name):
142121
try:
143122
client_service.projects().companies().delete(name=company_name).execute()
144123
print("Company deleted")
145124
except Error as e:
146125
print("Got exception while deleting company")
147126
raise e
148-
149-
150-
# [END jobs_delete_company]
151127
# [END job_delete_company]
152128

153129

jobs/v3/api_client/custom_attribute_sample.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ def generate_job_with_custom_attributes(company_name):
5252
}
5353
print("Job generated: %s" % job)
5454
return job
55-
56-
5755
# [END job_custom_attribute_job]
5856

5957

6058
# [START job_custom_attribute_filter_string_value]
61-
# [START custom_attribute_filter_string_value]
6259
def custom_attribute_filter_string_value(client_service):
6360
request_metadata = {
6461
"user_id": "HashedUserId",
@@ -78,14 +75,10 @@ def custom_attribute_filter_string_value(client_service):
7875
client_service.projects().jobs().search(parent=parent, body=request).execute()
7976
)
8077
print(response)
81-
82-
83-
# [END custom_attribute_filter_string_value]
8478
# [END job_custom_attribute_filter_string_value]
8579

8680

8781
# [START job_custom_attribute_filter_long_value]
88-
# [START custom_attribute_filter_long_value]
8982
def custom_attribute_filter_long_value(client_service):
9083
request_metadata = {
9184
"user_id": "HashedUserId",
@@ -105,14 +98,10 @@ def custom_attribute_filter_long_value(client_service):
10598
client_service.projects().jobs().search(parent=parent, body=request).execute()
10699
)
107100
print(response)
108-
109-
110-
# [END custom_attribute_filter_long_value]
111101
# [END job_custom_attribute_filter_long_value]
112102

113103

114104
# [START job_custom_attribute_filter_multi_attributes]
115-
# [START custom_attribute_filter_multi_attributes]
116105
def custom_attribute_filter_multi_attributes(client_service):
117106
request_metadata = {
118107
"user_id": "HashedUserId",
@@ -135,9 +124,6 @@ def custom_attribute_filter_multi_attributes(client_service):
135124
client_service.projects().jobs().search(parent=parent, body=request).execute()
136125
)
137126
print(response)
138-
139-
140-
# [END custom_attribute_filter_multi_attributes]
141127
# [END job_custom_attribute_filter_multi_attributes]
142128

143129

0 commit comments

Comments
 (0)