use of com.google.api.ads.admanager.jaxws.v202205.Company in project java-talent by googleapis.
the class ITSystemTest method listCompaniesTest.
@Test
public void listCompaniesTest() {
ListCompaniesRequest request = ListCompaniesRequest.newBuilder().setParent(tenantName.toString()).build();
for (Company actual : companyServiceClient.listCompanies(request).iterateAll()) {
if (company.getName().equals(actual.getName())) {
assertEquals(company.getName(), actual.getName());
assertEquals(company.getDisplayName(), actual.getDisplayName());
assertEquals(company.getExternalId(), actual.getExternalId());
}
}
}
use of com.google.api.ads.admanager.jaxws.v202205.Company in project java-talent by googleapis.
the class ITSystemTest method getCompanyTest.
@Test
public void getCompanyTest() {
GetCompanyRequest request = GetCompanyRequest.newBuilder().setName(companyName.toString()).build();
Company actual = companyServiceClient.getCompany(request);
assertEquals(company.getName(), actual.getName());
assertEquals(company.getDisplayName(), actual.getDisplayName());
assertEquals(company.getExternalId(), actual.getExternalId());
}
use of com.google.api.ads.admanager.jaxws.v202205.Company in project java-talent by googleapis.
the class JobSearchGetCompany method getCompany.
// Get Company.
public static void getCompany(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.of(projectId, tenantId, companyId);
GetCompanyRequest request = GetCompanyRequest.newBuilder().setName(name.toString()).build();
Company response = companyServiceClient.getCompany(request);
System.out.format("Company name: %s%n", response.getName());
System.out.format("Display name: %s%n", response.getDisplayName());
}
}
Aggregations