Skip to content

Commit

Permalink
build: library of v4 jobs onboarded to SAM (googleapis#800)
Browse files Browse the repository at this point in the history
- [ ] 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
  • Loading branch information
gcf-owl-bot[bot] committed Jul 1, 2022
1 parent 0be012a commit 04bc94b
Show file tree
Hide file tree
Showing 229 changed files with 10,237 additions and 0 deletions.
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_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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,40 @@
/*
* 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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,38 @@
/*
* 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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,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_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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,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_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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,40 @@
/*
* 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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,40 @@
/*
* 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 for illustrative purposes only.
// It may require modifications to work in your environment.
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,46 @@
/*
* 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 for illustrative purposes only.
// It may require modifications to work in your environment.
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]
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_deletecompany_sync]
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 SyncDeleteCompany {

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

public static void syncDeleteCompany() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
try (CompanyServiceClient companyServiceClient = CompanyServiceClient.create()) {
DeleteCompanyRequest request =
DeleteCompanyRequest.newBuilder()
.setName(CompanyName.of("[PROJECT]", "[TENANT]", "[COMPANY]").toString())
.build();
companyServiceClient.deleteCompany(request);
}
}
}
// [END talent_v4_generated_companyserviceclient_deletecompany_sync]
Loading

0 comments on commit 04bc94b

Please sign in to comment.