8000 chore: add job prefix to job sample (#11890) · dtest/python-docs-samples@8d11473 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d11473

Browse files
chore: add job prefix to job sample (GoogleCloudPlatform#11890)
* chore: add job prefix to job sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4cc745b commit 8d11473

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

jobs/v3/api_client/base_job_sample.py

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

17+
# [START job_instantiate]
1718
# [START instantiate]
1819
import os
1920
import random
@@ -25,8 +26,10 @@
2526
client_service = build("jobs", "v3")
2627
parent = "projects/" + os.environ["GOOGLE_CLOUD_PROJECT"]
2728
# [END instantiate]
29+
# [END job_instantiate]
2830

2931

32+
# [START job_basic_job]
3033
# [START basic_job]
3134
def generate_job_with_required_fields(company_name):
3235
# Requisition id should be a unique Id in your system.
@@ -50,8 +53,10 @@ def generate_job_with_required_fields(company_name):
5053

5154

5255
# [END basic_job]
56+
# [END job_basic_job]
5357

5458

59+
# [START job_create_job]
5560
# [START create_job]
5661
def create_job(client_service, job_to_be_created):
5762
try:
@@ -70,8 +75,10 @@ def create_job(client_service, job_to_be_created):
7075

7176

7277
# [END create_job]
78+
# [END job_create_job]
7379

7480

81+
# [START job_get_job]
7582
# [START get_job]
7683
def get_job(client_service, job_name):
7784
try:
@@ -84,9 +91,11 @@ def get_job(client_service, job_name):
8491

8592

8693
# [END get_job]
94+
# [END job_get_job]
8795

8896

8997
# [START update_job]
98+
# [START job_update_job]
9099
def update_job(client_service, job_name, job_to_be_updated):
91100
try:
92101
request = {"job": job_to_be_updated}
@@ -104,8 +113,10 @@ def update_job(client_service, job_name, job_to_be_updated):
104113

105114

106115
# [END update_job]
116+
# [END job_update_job]
107117

108118

119+
# [START job_update_job_with_field_mask]
109120
# [START update_job_with_field_mask]
110121
def update_job_with_field_mask(client_service, job_name, job_to_be_updated, field_mask):
111122
try:
@@ -124,8 +135,10 @@ def update_job_with_field_mask(client_service, job_name, job_to_be_updated, fiel
124135

125136

126137
# [END update_job_with_field_mask]
138+
# [END job_update_job_with_field_mask]
127139

128140

141+
# [START job_delete_job]
129142
# [START delete_job]
130143
def delete_job(client_service, job_name):
131144
try:
@@ -137,6 +150,7 @@ def delete_job(client_service, job_name):
137150

138151

139152
# [END delete_job]
153+
# [END job_delete_job]
140154

141155

142156
def run_sample():

jobs/v3/api_client/commute_search_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
parent = "projects/" + os.environ["GOOGLE_CLOUD_PROJECT"]
2525
# [END instantiate]
2626

27+
2728
# [START job_discovery_commute_search]
2829
# [START commute_search]
2930
def commute_search(client_service, company_name):
@@ -53,7 +54,7 @@ def commute_search(client_service, company_name):
5354
)
5455
print(response)
5556

56-
57+
5758
# [END commute_search]
5859
# [END job_discovery_commute_search]
5960

0 commit comments

Comments
 (0)
0