use of com.google.cloud.talent.v4beta1.DeleteCompanyRequest in project java-docs-samples by GoogleCloudPlatform.
the class JobSearchDeleteCompany method deleteCompany.
// Delete Company.
public static void deleteCompany(String projectId, String tenantId, String companyId) throws IOException {
// the "close" method on the client to safely clean up any remaining background resources.
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
CompanyName name = CompanyName.ofProjectTenantCompanyName(projectId, tenantId, companyId);
DeleteCompanyRequest request = DeleteCompanyRequest.newBuilder().setName(name.toString()).build();
companyServiceClient.deleteCompany(request);
System.out.println("Deleted company");
}
}
Aggregations