google-cloud-talent/samples/batch_delete_jobs.rb
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.




Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Unless required by applicable law or agreed to in writing software distributed under the License is distributed on an " AS IS " BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied . See the License for the specific language governing permissions and limitations under the License .
def sample_batch_delete_jobs project_id, tenant_id, job_name_one, job_name_two
  require "google/cloud/talent"
  job_service = Google::Cloud::Talent.job_service
  formatted_parent = job_service.tenant_path project: project_id, tenant: tenant_id
  names = [job_name_one, job_name_two]
  operation = job_service.batch_delete_jobs parent: formatted_parent, names: names
  operation.wait_until_done!
  raise operation.results.message if operation.error?
  response = operation.response
  puts "Batch response: #{response.inspect}"
end
def sample_batch_delete_jobs project_id , tenant_id , job_name_one , job_name_two require "google/cloud/talent" job_service = Google :: Cloud :: Talent . job_service formatted_parent = job_service . tenant_path project : project_id , tenant : tenant_id names = [ job_name_one , job_name_two ] operation = job_service . batch_delete_jobs parent : formatted_parent , names : names operation . wait_until_done! raise operation . results . message if operation . error? response = operation . response puts "Batch response: #{response.inspect}" end
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Copyright 2020 Google LLC Licensed under the Apache License Version 2 . 0 ( the " License " ) ; you may not use this file except in compliance with the License .
# [START job_search_batch_delete_jobs] # Instantiate a client # project_id = "Your Google Cloud Project ID" # tenant_id = "Your Tenant ID (using tenancy is required)" # the name of jobs to be deleted. # Make the long-running operation request # Block until operation complete # [END job_search_batch_delete_jobs]
project_id
<not_specific>
tenant_id
<not_specific>
job_name_one
<not_specific>
job_name_two
<not_specific>