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

migrate code from googleapis/java-talent #7401

Closed
wants to merge 93 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
96f2f31
samples: add generated samples (#67)
yoshi-automation Feb 5, 2020
7836c01
samples: move generated samples to generated directory (#80)
chingor13 Feb 24, 2020
5948f75
samples: scaffold pom.xml files (#95)
yoshi-automation Mar 17, 2020
2ec08db
chore(deps): update dependency com.google.cloud:libraries-bom to v4.3…
renovate-bot Mar 23, 2020
6117aa0
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Mar 26, 2020
f4f4e72
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Mar 30, 2020
20f829e
chore(deps): update dependency com.google.cloud:libraries-bom to v4.4…
renovate-bot Apr 1, 2020
e769f57
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 6, 2020
a993237
chore(deps): update dependency com.google.cloud:libraries-bom to v4.4…
renovate-bot Apr 6, 2020
36b79cb
chore(deps): update dependency com.google.cloud:libraries-bom to v5 (…
renovate-bot Apr 14, 2020
d9796d9
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 16, 2020
76ab880
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 17, 2020
ad27968
chore(deps): update dependency com.google.cloud:libraries-bom to v5.2…
renovate-bot Apr 23, 2020
21266fd
chore(deps): update dependency com.google.cloud:libraries-bom to v5.3…
renovate-bot Apr 28, 2020
caea276
chore(deps): update dependency com.google.cloud:libraries-bom to v5.4…
renovate-bot May 19, 2020
84f9ede
chore(deps): update dependency com.google.cloud:libraries-bom to v5.5…
renovate-bot May 29, 2020
a09b521
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 10, 2020
052c856
chore(deps): update dependency com.google.cloud:libraries-bom to v5.7…
renovate-bot Jun 10, 2020
5102000
chore(deps): update dependency com.google.cloud:libraries-bom to v6 (…
renovate-bot Jun 16, 2020
50d25c7
chore(deps): update dependency com.google.cloud:libraries-bom to v7 (…
renovate-bot Jun 17, 2020
6898dec
chore(deps): update dependency com.google.cloud:libraries-bom to v7.0…
renovate-bot Jun 22, 2020
e189725
chore(deps): update dependency com.google.cloud:libraries-bom to v8 (…
renovate-bot Jun 26, 2020
a5ec5b1
chore(deps): update dependency com.google.cloud:libraries-bom to v8.1…
renovate-bot Jul 16, 2020
1af22ad
chore(deps): update dependency com.google.cloud:libraries-bom to v10 …
renovate-bot Sep 9, 2020
346b44c
chore(deps): update dependency com.google.cloud:libraries-bom to v10.…
renovate-bot Sep 9, 2020
df5402c
chore(deps): update dependency com.google.cloud:libraries-bom to v11 …
renovate-bot Sep 24, 2020
930b111
chore(deps): update dependency com.google.cloud:libraries-bom to v11.…
renovate-bot Oct 1, 2020
d19fca7
chore(deps): update dependency com.google.cloud:libraries-bom to v12 …
renovate-bot Oct 6, 2020
cdd28d1
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Oct 9, 2020
63bd2e2
test(deps): update dependency junit:junit to v4.13.1
renovate-bot Oct 12, 2020
62438ad
samples: add Job Search v4 samples (#275)
saumyasahu-bot Oct 14, 2020
115d637
chore(deps): update dependency com.google.cloud:libraries-bom to v12.…
renovate-bot Oct 15, 2020
f55d72f
chore(deps): update dependency com.google.cloud:libraries-bom to v13 …
renovate-bot Oct 20, 2020
7cc284c
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 21, 2020
d23719b
test(deps): update dependency com.google.truth:truth to v1.1 (#292)
renovate-bot Oct 22, 2020
75dc820
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 23, 2020
fddd568
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 27, 2020
5052c02
chore(deps): update dependency com.google.cloud:libraries-bom to v13.…
renovate-bot Oct 30, 2020
6cd8021
chore(deps): update dependency com.google.cloud:libraries-bom to v14 …
renovate-bot Nov 4, 2020
11ea366
chore(deps): update dependency com.google.cloud:libraries-bom to v15 …
renovate-bot Nov 5, 2020
87e072d
chore(deps): update dependency com.google.cloud:libraries-bom to v16 …
renovate-bot Nov 19, 2020
b555461
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Dec 15, 2020
ab17da2
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Jan 7, 2021
d8d6167
chore(deps): update dependency com.google.cloud:libraries-bom to v16.…
renovate-bot Jan 20, 2021
f88d189
test(deps): update dependency com.google.truth:truth to v1.1.2 (#393)
renovate-bot Jan 25, 2021
adb8241
test(deps): update dependency junit:junit to v4.13.2 (#411)
renovate-bot Feb 19, 2021
d5f6707
chore(deps): update dependency com.google.cloud:libraries-bom to v17 …
renovate-bot Feb 24, 2021
1cf474e
chore(deps): update dependency com.google.cloud:libraries-bom to v18 …
renovate-bot Feb 25, 2021
a897821
chore(deps): update dependency com.google.cloud:libraries-bom to v19 …
renovate-bot Mar 4, 2021
8001750
chore(deps): update dependency com.google.cloud:libraries-bom to v19.…
renovate-bot Mar 29, 2021
a462f1f
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Apr 9, 2021
e404d92
chore(deps): update dependency com.google.cloud:libraries-bom to v20 …
renovate-bot Apr 12, 2021
eb36e56
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Apr 19, 2021
976792e
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Apr 29, 2021
dcfba6f
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 13, 2021
ff9010a
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 17, 2021
21581a7
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot May 25, 2021
ad3e609
test(deps): update dependency com.google.truth:truth to v1.1.3 (#521)
renovate-bot May 26, 2021
73354e2
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jun 7, 2021
92ff1f4
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Jun 7, 2021
f8791a2
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jun 23, 2021
2cfaad8
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jul 9, 2021
a904e82
chore(deps): update dependency com.google.cloud:libraries-bom to v20.…
renovate-bot Jul 27, 2021
f516fe8
chore(deps): update dependency com.google.cloud:libraries-bom to v21 …
renovate-bot Aug 19, 2021
2ec5e29
chore(deps): update dependency com.google.cloud:libraries-bom to v22 …
renovate-bot Aug 27, 2021
38d25f4
chore: migrate to owlbot (#606)
Neenu1995 Sep 5, 2021
05f4eb2
chore(deps): update dependency com.google.cloud:libraries-bom to v23 …
renovate-bot Sep 13, 2021
54848bf
feat: Added a new `KeywordMatchMode` field to support more keyword ma…
gcf-owl-bot[bot] Sep 20, 2021
5915591
chore(deps): update dependency com.google.cloud:libraries-bom to v23.…
renovate-bot Oct 1, 2021
b9953d5
chore(deps): update dependency com.google.cloud:libraries-bom to v24 …
renovate-bot Oct 27, 2021
5188111
chore(deps): update dependency com.google.cloud.samples:shared-config…
renovate-bot Dec 6, 2021
afc51f4
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Dec 8, 2021
8a33621
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Dec 28, 2021
204e70d
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Jan 7, 2022
f546fc4
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Jan 18, 2022
48aea92
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Feb 8, 2022
6bb3b3f
chore(deps): update dependency com.google.cloud:libraries-bom to v24.…
renovate-bot Mar 3, 2022
bfab223
chore(deps): update dependency com.google.cloud:libraries-bom to v25 …
renovate-bot Mar 14, 2022
064c64c
test: fix sample test (#762)
eaball35 Mar 22, 2022
b911760
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Apr 1, 2022
b93a5dd
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Apr 27, 2022
d7b98da
chore: remove legacy generated samples (#783)
eaball35 May 13, 2022
85911f5
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot May 16, 2022
8f39373
chore(deps): update dependency com.google.cloud:libraries-bom to v25.…
renovate-bot Jun 6, 2022
a1b6c0e
build: library of v4 jobs onboarded to SAM (#800)
gcf-owl-bot[bot] Jul 1, 2022
22ae57d
chore(deps): update dependency com.google.cloud:libraries-bom to v26 …
renovate-bot Jul 11, 2022
5e80e81
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Aug 16, 2022
6727e46
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Aug 31, 2022
eb7408f
chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, gener…
gcf-owl-bot[bot] Sep 9, 2022
907c0ed
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Sep 20, 2022
2ea8771
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Oct 7, 2022
cbce55a
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
renovate-bot Nov 8, 2022
6bdd120
Merge remote-tracking branch 'migration/main' into java-talent-migration
NimJay Nov 10, 2022
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_create_setcredentialsprovider_sync]
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.CompanyServiceSettings;
import com.google.cloud.talent.v4.myCredentials;

public class SyncCreateSetCredentialsProvider {

public static void main(String[] args) throws Exception {
syncCreateSetCredentialsProvider();
}

public static void syncCreateSetCredentialsProvider() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CompanyServiceSettings companyServiceSettings =
CompanyServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
}
}
// [END talent_v4_generated_companyserviceclient_create_setcredentialsprovider_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_create_setcredentialsprovider1_sync]
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.CompanyServiceSettings;

public class SyncCreateSetCredentialsProvider1 {

public static void main(String[] args) throws Exception {
syncCreateSetCredentialsProvider1();
}

public static void syncCreateSetCredentialsProvider1() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CompanyServiceSettings companyServiceSettings =
CompanyServiceSettings.newBuilder()
.setTransportChannelProvider(
CompanyServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
.build();
CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
}
}
// [END talent_v4_generated_companyserviceclient_create_setcredentialsprovider1_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_create_setendpoint_sync]
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.CompanyServiceSettings;
import com.google.cloud.talent.v4.myEndpoint;

public class SyncCreateSetEndpoint {

public static void main(String[] args) throws Exception {
syncCreateSetEndpoint();
}

public static void syncCreateSetEndpoint() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CompanyServiceSettings companyServiceSettings =
CompanyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
}
}
// [END talent_v4_generated_companyserviceclient_create_setendpoint_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_createcompany_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.talent.v4.Company;
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.CreateCompanyRequest;
import com.google.cloud.talent.v4.TenantName;

public class AsyncCreateCompany {

public static void main(String[] args) throws Exception {
asyncCreateCompany();
}

public static void asyncCreateCompany() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
CreateCompanyRequest request =
CreateCompanyRequest.newBuilder()
.setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
.setCompany(Company.newBuilder().build())
.build();
ApiFuture<Company> future = companyServiceClient.createCompanyCallable().futureCall(request);
// Do something.
Company response = future.get();
}
}
}
// [END talent_v4_generated_companyserviceclient_createcompany_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_createcompany_sync]
import com.google.cloud.talent.v4.Company;
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.CreateCompanyRequest;
import com.google.cloud.talent.v4.TenantName;

public class SyncCreateCompany {

public static void main(String[] args) throws Exception {
syncCreateCompany();
}

public static void syncCreateCompany() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
CreateCompanyRequest request =
CreateCompanyRequest.newBuilder()
.setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
.setCompany(Company.newBuilder().build())
.build();
Company response = companyServiceClient.createCompany(request);
}
}
}
// [END talent_v4_generated_companyserviceclient_createcompany_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_createcompany_stringcompany_sync]
import com.google.cloud.talent.v4.Company;
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.TenantName;

public class SyncCreateCompanyStringCompany {

public static void main(String[] args) throws Exception {
syncCreateCompanyStringCompany();
}

public static void syncCreateCompanyStringCompany() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
String parent = TenantName.of("[PROJECT]", "[TENANT]").toString();
Company company = Company.newBuilder().build();
Company response = companyServiceClient.createCompany(parent, company);
}
}
}
// [END talent_v4_generated_companyserviceclient_createcompany_stringcompany_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_createcompany_tenantnamecompany_sync]
import com.google.cloud.talent.v4.Company;
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.TenantName;

public class SyncCreateCompanyTenantnameCompany {

public static void main(String[] args) throws Exception {
syncCreateCompanyTenantnameCompany();
}

public static void syncCreateCompanyTenantnameCompany() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
Company company = Company.newBuilder().build();
Company response = companyServiceClient.createCompany(parent, company);
}
}
}
// [END talent_v4_generated_companyserviceclient_createcompany_tenantnamecompany_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.talent.v4.samples;

// [START talent_v4_generated_companyserviceclient_deletecompany_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.talent.v4.CompanyName;
import com.google.cloud.talent.v4.CompanyServiceClient;
import com.google.cloud.talent.v4.DeleteCompanyRequest;
import com.google.protobuf.Empty;

public class AsyncDeleteCompany {

public static void main(String[] args) throws Exception {
asyncDeleteCompany();
}

public static void asyncDeleteCompany() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
DeleteCompanyRequest request =
DeleteCompanyRequest.newBuilder()
.setName(CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]").toString())
.build();
ApiFuture<Empty> future = companyServiceClient.deleteCompanyCallable().futureCall(request);
// Do something.
future.get();
}
}
}
// [END talent_v4_generated_companyserviceclient_deletecompany_async]
Loading