Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(job): migrate region step 3 - remove regions in jobs/v3/api_client/base_job_sample.py #12977

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions jobs/v3/api_client/base_job_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@


# [START job_basic_job]
# [START basic_job]
def generate_job_with_required_fields(company_name):
# Requisition id should be a unique Id in your system.
requisition_id = "job_with_required_fields:" + "".join(
Expand All @@ -52,12 +51,10 @@ def generate_job_with_required_fields(company_name):
return job


# [END basic_job]
# [END job_basic_job]


# [START job_create_job]
# [START create_job]
def create_job(client_service, job_to_be_created):
try:
request = {"job": job_to_be_created}
Expand All @@ -74,7 +71,6 @@ def create_job(client_service, job_to_be_created):
raise e


# [END create_job]
# [END job_create_job]


Expand All @@ -92,7 +88,6 @@ def get_job(client_service, job_name):
# [END job_get_job]


# [START update_job]
# [START job_update_job]
def update_job(client_service, job_name, job_to_be_updated):
try:
Expand All @@ -110,12 +105,10 @@ def update_job(client_service, job_name, job_to_be_updated):
raise e


# [END update_job]
# [END job_update_job]


# [START job_update_job_with_field_mask]
# [START update_job_with_field_mask]
def update_job_with_field_mask(client_service, job_name, job_to_be_updated, field_mask):
try:
request = {"job": job_to_be_updated, "update_mask": field_mask}
Expand All @@ -132,12 +125,10 @@ def update_job_with_field_mask(client_service, job_name, job_to_be_updated, fiel
raise e


# [END update_job_with_field_mask]
# [END job_update_job_with_field_mask]


# [START job_delete_job]
# [START delete_job]
def delete_job(client_service, job_name):
try:
client_service.projects().jobs().delete(name=job_name).execute()
Expand All @@ -147,7 +138,6 @@ def delete_job(client_service, job_name):
raise e


# [END delete_job]
# [END job_delete_job]


Expand Down