Skip to content

Commit 04bc94b

Browse files
build: library of v4 jobs onboarded to SAM (googleapis#800)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 457827103 Source-Link: googleapis/googleapis@67f6d0b Source-Link: https://github.com/googleapis/googleapis-gen/commit/ba91dc0d519670d03b6bc890f265356e9f3bd3b7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmE5MWRjMGQ1MTk2NzBkMDNiNmJjODkwZjI2NTM1NmU5ZjNiZDNiNyJ9 build: library of v4 jobs onboarded to SAM PiperOrigin-RevId: 457783072 Source-Link: googleapis/googleapis@6ff6b49 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e485ffbb0be33b64fdd93e3a6f866250491017c6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTQ4NWZmYmIwYmUzM2I2NGZkZDkzZTNhNmY4NjYyNTA0OTEwMTdjNiJ9
1 parent 0be012a commit 04bc94b

File tree

229 files changed

+10237
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+10237
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_create_setcredentialsprovider_sync]
20+
import com.google.api.gax.core.FixedCredentialsProvider;
21+
import com.google.cloud.talent.v4.CompanyServiceClient;
22+
import com.google.cloud.talent.v4.CompanyServiceSettings;
23+
import com.google.cloud.talent.v4.myCredentials;
24+
25+
public class SyncCreateSetCredentialsProvider {
26+
27+
public static void main(String[] args) throws Exception {
28+
syncCreateSetCredentialsProvider();
29+
}
30+
31+
public static void syncCreateSetCredentialsProvider() throws Exception {
32+
// This snippet has been automatically generated for illustrative purposes only.
33+
// It may require modifications to work in your environment.
34+
CompanyServiceSettings companyServiceSettings =
35+
CompanyServiceSettings.newBuilder()
36+
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
37+
.build();
38+
CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
39+
}
40+
}
41+
// [END talent_v4_generated_companyserviceclient_create_setcredentialsprovider_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_create_setcredentialsprovider1_sync]
20+
import com.google.cloud.talent.v4.CompanyServiceClient;
21+
import com.google.cloud.talent.v4.CompanyServiceSettings;
22+
23+
public class SyncCreateSetCredentialsProvider1 {
24+
25+
public static void main(String[] args) throws Exception {
26+
syncCreateSetCredentialsProvider1();
27+
}
28+
29+
public static void syncCreateSetCredentialsProvider1() throws Exception {
30+
// This snippet has been automatically generated for illustrative purposes only.
31+
// It may require modifications to work in your environment.
32+
CompanyServiceSettings companyServiceSettings =
33+
CompanyServiceSettings.newBuilder()
34+
.setTransportChannelProvider(
35+
CompanyServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
36+
.build();
37+
CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
38+
}
39+
}
40+
// [END talent_v4_generated_companyserviceclient_create_setcredentialsprovider1_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_create_setendpoint_sync]
20+
import com.google.cloud.talent.v4.CompanyServiceClient;
21+
import com.google.cloud.talent.v4.CompanyServiceSettings;
22+
import com.google.cloud.talent.v4.myEndpoint;
23+
24+
public class SyncCreateSetEndpoint {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateSetEndpoint();
28+
}
29+
30+
public static void syncCreateSetEndpoint() throws Exception {
31+
// This snippet has been automatically generated for illustrative purposes only.
32+
// It may require modifications to work in your environment.
33+
CompanyServiceSettings companyServiceSettings =
34+
CompanyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
35+
CompanyServiceClient companyServiceClient = CompanyServiceClient.create(companyServiceSettings);
36+
}
37+
}
38+
// [END talent_v4_generated_companyserviceclient_create_setendpoint_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_createcompany_async]
20+
import com.google.api.core.ApiFuture;
21+
import com.google.cloud.talent.v4.Company;
22+
import com.google.cloud.talent.v4.CompanyServiceClient;
23+
import com.google.cloud.talent.v4.CreateCompanyRequest;
24+
import com.google.cloud.talent.v4.TenantName;
25+
26+
public class AsyncCreateCompany {
27+
28+
public static void main(String[] args) throws Exception {
29+
asyncCreateCompany();
30+
}
31+
32+
public static void asyncCreateCompany() throws Exception {
33+
// This snippet has been automatically generated for illustrative purposes only.
34+
// It may require modifications to work in your environment.
35+
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
36+
CreateCompanyRequest request =
37+
CreateCompanyRequest.newBuilder()
38+
.setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
39+
.setCompany(Company.newBuilder().build())
40+
.build();
41+
ApiFuture<Company> future = companyServiceClient.createCompanyCallable().futureCall(request);
42+
// Do something.
43+
Company response = future.get();
44+
}
45+
}
46+
}
47+
// [END talent_v4_generated_companyserviceclient_createcompany_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_createcompany_sync]
20+
import com.google.cloud.talent.v4.Company;
21+
import com.google.cloud.talent.v4.CompanyServiceClient;
22+
import com.google.cloud.talent.v4.CreateCompanyRequest;
23+
import com.google.cloud.talent.v4.TenantName;
24+
25+
public class SyncCreateCompany {
26+
27+
public static void main(String[] args) throws Exception {
28+
syncCreateCompany();
29+
}
30+
31+
public static void syncCreateCompany() throws Exception {
32+
// This snippet has been automatically generated for illustrative purposes only.
33+
// It may require modifications to work in your environment.
34+
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
35+
CreateCompanyRequest request =
36+
CreateCompanyRequest.newBuilder()
37+
.setParent(TenantName.of("[PROJECT]", "[TENANT]").toString())
38+
.setCompany(Company.newBuilder().build())
39+
.build();
40+
Company response = companyServiceClient.createCompany(request);
41+
}
42+
}
43+
}
44+
// [END talent_v4_generated_companyserviceclient_createcompany_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_createcompany_stringcompany_sync]
20+
import com.google.cloud.talent.v4.Company;
21+
import com.google.cloud.talent.v4.CompanyServiceClient;
22+
import com.google.cloud.talent.v4.TenantName;
23+
24+
public class SyncCreateCompanyStringCompany {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateCompanyStringCompany();
28+
}
29+
30+
public static void syncCreateCompanyStringCompany() throws Exception {
31+
// This snippet has been automatically generated for illustrative purposes only.
32+
// It may require modifications to work in your environment.
33+
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
34+
String parent = TenantName.of("[PROJECT]", "[TENANT]").toString();
35+
Company company = Company.newBuilder().build();
36+
Company response = companyServiceClient.createCompany(parent, company);
37+
}
38+
}
39+
}
40+
// [END talent_v4_generated_companyserviceclient_createcompany_stringcompany_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_createcompany_tenantnamecompany_sync]
20+
import com.google.cloud.talent.v4.Company;
21+
import com.google.cloud.talent.v4.CompanyServiceClient;
22+
import com.google.cloud.talent.v4.TenantName;
23+
24+
public class SyncCreateCompanyTenantnameCompany {
25+
26+
public static void main(String[] args) throws Exception {
27+
syncCreateCompanyTenantnameCompany();
28+
}
29+
30+
public static void syncCreateCompanyTenantnameCompany() throws Exception {
31+
// This snippet has been automatically generated for illustrative purposes only.
32+
// It may require modifications to work in your environment.
33+
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
34+
TenantName parent = TenantName.of("[PROJECT]", "[TENANT]");
35+
Company company = Company.newBuilder().build();
36+
Company response = companyServiceClient.createCompany(parent, company);
37+
}
38+
}
39+
}
40+
// [END talent_v4_generated_companyserviceclient_createcompany_tenantnamecompany_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_deletecompany_async]
20+
import com.google.api.core.ApiFuture;
21+
import com.google.cloud.talent.v4.CompanyName;
22+
import com.google.cloud.talent.v4.CompanyServiceClient;
23+
import com.google.cloud.talent.v4.DeleteCompanyRequest;
24+
import com.google.protobuf.Empty;
25+
26+
public class AsyncDeleteCompany {
27+
28+
public static void main(String[] args) throws Exception {
29+
asyncDeleteCompany();
30+
}
31+
32+
public static void asyncDeleteCompany() throws Exception {
33+
// This snippet has been automatically generated for illustrative purposes only.
34+
// It may require modifications to work in your environment.
35+
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
36+
DeleteCompanyRequest request =
37+
DeleteCompanyRequest.newBuilder()
38+
.setName(CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]").toString())
39+
.build();
40+
ApiFuture<Empty> future = companyServiceClient.deleteCompanyCallable().futureCall(request);
41+
// Do something.
42+
future.get();
43+
}
44+
}
45+
}
46+
// [END talent_v4_generated_companyserviceclient_deletecompany_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2022 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.cloud.talent.v4.samples;
18+
19+
// [START talent_v4_generated_companyserviceclient_deletecompany_sync]
20+
import com.google.cloud.talent.v4.CompanyName;
21+
import com.google.cloud.talent.v4.CompanyServiceClient;
22+
import com.google.cloud.talent.v4.DeleteCompanyRequest;
23+
import com.google.protobuf.Empty;
24+
25+
public class SyncDeleteCompany {
26+
27+
public static void main(String[] args) throws Exception {
28+
syncDeleteCompany();
29+
}
30+
31+
public static void syncDeleteCompany() throws Exception {
32+
// This snippet has been automatically generated for illustrative purposes only.
33+
// It may require modifications to work in your environment.
34+
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
35+
DeleteCompanyRequest request =
36+
DeleteCompanyRequest.newBuilder()
37+
.setName(CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]").toString())
38+
.build();
39+
companyServiceClient.deleteCompany(request);
40+
}
41+
}
42+
}
43+
// [END talent_v4_generated_companyserviceclient_deletecompany_sync]

0 commit comments

Comments
 (0)